@smartledger/bsv 7.5.3 → 7.5.5
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/CHANGELOG.md +82 -0
- package/README.md +38 -38
- package/bsv-anchor.min.js +8 -8
- package/bsv-didweb.min.js +8 -8
- package/bsv-gdaf.min.js +47 -47
- package/bsv-ltp.min.js +47 -47
- package/bsv-mnemonic.min.js +11 -11
- package/bsv-shamir.min.js +11 -11
- package/bsv-smartcontract.min.js +7 -7
- package/bsv-statuslist.min.js +29 -29
- package/bsv-vcjwt.min.js +10 -10
- package/bsv.bundle.js +47 -47
- package/bsv.min.js +47 -47
- package/docs/MODULE_REFERENCE_COMPLETE.md +27 -27
- package/docs/advanced/UTXO_MANAGER_GUIDE.md +1 -1
- package/docs/getting-started/INSTALLATION.md +23 -23
- package/docs/getting-started/QUICK_START.md +7 -7
- package/docs/migration/FROM_BSV_1_5_6.md +5 -5
- package/lib/privatekey.js +35 -1
- package/package.json +7 -5
- package/test/privatekey.js +35 -2
- package/version.js +1 -1
package/bsv-shamir.min.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
var bsvShamir=(()=>{var Gb=Object.create;var Bl=Object.defineProperty;var Vb=Object.getOwnPropertyDescriptor;var $b=Object.getOwnPropertyNames;var Zb=Object.getPrototypeOf,Yb=Object.prototype.hasOwnProperty;var Xb=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(i){throw r=[i],i}};var R=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var Jb=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of $b(e))!Yb.call(t,n)&&n!==r&&Bl(t,n,{get:()=>e[n],enumerable:!(i=Vb(e,n))||i.enumerable});return t};var Al=(t,e,r)=>(r=t!=null?Gb(Zb(t)):{},Jb(e||!t||!t.__esModule?Bl(r,"default",{value:t,enumerable:!0}):r,t));var Tl=R((KB,kl)=>{b();var Ze=kl.exports={},zt,Gt;function rs(){throw new Error("setTimeout has not been defined")}function is(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?zt=setTimeout:zt=rs}catch{zt=rs}try{typeof clearTimeout=="function"?Gt=clearTimeout:Gt=is}catch{Gt=is}})();function Rl(t){if(zt===setTimeout)return setTimeout(t,0);if((zt===rs||!zt)&&setTimeout)return zt=setTimeout,setTimeout(t,0);try{return zt(t,0)}catch{try{return zt.call(null,t,0)}catch{return zt.call(this,t,0)}}}function Qb(t){if(Gt===clearTimeout)return clearTimeout(t);if((Gt===is||!Gt)&&clearTimeout)return Gt=clearTimeout,clearTimeout(t);try{return Gt(t)}catch{try{return Gt.call(null,t)}catch{return Gt.call(this,t)}}}var sr=[],Fi=!1,ai,Xa=-1;function e2(){!Fi||!ai||(Fi=!1,ai.length?sr=ai.concat(sr):Xa=-1,sr.length&&ql())}function ql(){if(!Fi){var t=Rl(e2);Fi=!0;for(var e=sr.length;e;){for(ai=sr,sr=[];++Xa<e;)ai&&ai[Xa].run();Xa=-1,e=sr.length}ai=null,Fi=!1,Qb(t)}}Ze.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];sr.push(new Il(t,e)),sr.length===1&&!Fi&&Rl(ql)};function Il(t,e){this.fun=t,this.array=e}Il.prototype.run=function(){this.fun.apply(null,this.array)};Ze.title="browser";Ze.browser=!0;Ze.env={};Ze.argv=[];Ze.version="";Ze.versions={};function ur(){}Ze.on=ur;Ze.addListener=ur;Ze.once=ur;Ze.off=ur;Ze.removeListener=ur;Ze.removeAllListeners=ur;Ze.emit=ur;Ze.prependListener=ur;Ze.prependOnceListener=ur;Ze.listeners=function(t){return[]};Ze.binding=function(t){throw new Error("process.binding is not supported")};Ze.cwd=function(){return"/"};Ze.chdir=function(t){throw new Error("process.chdir is not supported")};Ze.umask=function(){return 0}});var Pl=R(Ja=>{"use strict";b();Ja.byteLength=r2;Ja.toByteArray=n2;Ja.fromByteArray=f2;var Vt=[],wt=[],t2=typeof Uint8Array<"u"?Uint8Array:Array,ns="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(oi=0,Cl=ns.length;oi<Cl;++oi)Vt[oi]=ns[oi],wt[ns.charCodeAt(oi)]=oi;var oi,Cl;wt[45]=62;wt[95]=63;function Ol(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var i=r===e?0:4-r%4;return[r,i]}function r2(t){var e=Ol(t),r=e[0],i=e[1];return(r+i)*3/4-i}function i2(t,e,r){return(e+r)*3/4-r}function n2(t){var e,r=Ol(t),i=r[0],n=r[1],a=new t2(i2(t,i,n)),f=0,v=n>0?i-4:i,m;for(m=0;m<v;m+=4)e=wt[t.charCodeAt(m)]<<18|wt[t.charCodeAt(m+1)]<<12|wt[t.charCodeAt(m+2)]<<6|wt[t.charCodeAt(m+3)],a[f++]=e>>16&255,a[f++]=e>>8&255,a[f++]=e&255;return n===2&&(e=wt[t.charCodeAt(m)]<<2|wt[t.charCodeAt(m+1)]>>4,a[f++]=e&255),n===1&&(e=wt[t.charCodeAt(m)]<<10|wt[t.charCodeAt(m+1)]<<4|wt[t.charCodeAt(m+2)]>>2,a[f++]=e>>8&255,a[f++]=e&255),a}function a2(t){return Vt[t>>18&63]+Vt[t>>12&63]+Vt[t>>6&63]+Vt[t&63]}function o2(t,e,r){for(var i,n=[],a=e;a<r;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(t[a+2]&255),n.push(a2(i));return n.join("")}function f2(t){for(var e,r=t.length,i=r%3,n=[],a=16383,f=0,v=r-i;f<v;f+=a)n.push(o2(t,f,f+a>v?v:f+a));return i===1?(e=t[r-1],n.push(Vt[e>>2]+Vt[e<<4&63]+"==")):i===2&&(e=(t[r-2]<<8)+t[r-1],n.push(Vt[e>>10]+Vt[e>>4&63]+Vt[e<<2&63]+"=")),n.join("")}});var Dl=R(as=>{b();as.read=function(t,e,r,i,n){var a,f,v=n*8-i-1,m=(1<<v)-1,E=m>>1,A=-7,q=r?n-1:0,I=r?-1:1,C=t[e+q];for(q+=I,a=C&(1<<-A)-1,C>>=-A,A+=v;A>0;a=a*256+t[e+q],q+=I,A-=8);for(f=a&(1<<-A)-1,a>>=-A,A+=i;A>0;f=f*256+t[e+q],q+=I,A-=8);if(a===0)a=1-E;else{if(a===m)return f?NaN:(C?-1:1)*(1/0);f=f+Math.pow(2,i),a=a-E}return(C?-1:1)*f*Math.pow(2,a-i)};as.write=function(t,e,r,i,n,a){var f,v,m,E=a*8-n-1,A=(1<<E)-1,q=A>>1,I=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=i?0:a-1,j=i?1:-1,V=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(v=isNaN(e)?1:0,f=A):(f=Math.floor(Math.log(e)/Math.LN2),e*(m=Math.pow(2,-f))<1&&(f--,m*=2),f+q>=1?e+=I/m:e+=I*Math.pow(2,1-q),e*m>=2&&(f++,m/=2),f+q>=A?(v=0,f=A):f+q>=1?(v=(e*m-1)*Math.pow(2,n),f=f+q):(v=e*Math.pow(2,q-1)*Math.pow(2,n),f=0));n>=8;t[r+C]=v&255,C+=j,v/=256,n-=8);for(f=f<<n|v,E+=n;E>0;t[r+C]=f&255,C+=j,f/=256,E-=8);t[r+C-j]|=V*128}});var ft=R(Wi=>{"use strict";b();var os=Pl(),Hi=Dl(),Ul=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Wi.Buffer=T;Wi.SlowBuffer=d2;Wi.INSPECT_MAX_BYTES=50;var Qa=2147483647;Wi.kMaxLength=Qa;T.TYPED_ARRAY_SUPPORT=s2();!T.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 s2(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function hr(t){if(t>Qa)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,T.prototype),e}function T(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return hs(t)}return jl(t,e,r)}T.poolSize=8192;function jl(t,e,r){if(typeof t=="string")return h2(t,e);if(ArrayBuffer.isView(t))return l2(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if($t(t,ArrayBuffer)||t&&$t(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&($t(t,SharedArrayBuffer)||t&&$t(t.buffer,SharedArrayBuffer)))return ss(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let i=t.valueOf&&t.valueOf();if(i!=null&&i!==t)return T.from(i,e,r);let n=c2(t);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return T.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}T.from=function(t,e,r){return jl(t,e,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function Hl(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function u2(t,e,r){return Hl(t),t<=0?hr(t):e!==void 0?typeof r=="string"?hr(t).fill(e,r):hr(t).fill(e):hr(t)}T.alloc=function(t,e,r){return u2(t,e,r)};function hs(t){return Hl(t),hr(t<0?0:ls(t)|0)}T.allocUnsafe=function(t){return hs(t)};T.allocUnsafeSlow=function(t){return hs(t)};function h2(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!T.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let r=Kl(t,e)|0,i=hr(r),n=i.write(t,e);return n!==r&&(i=i.slice(0,n)),i}function fs(t){let e=t.length<0?0:ls(t.length)|0,r=hr(e);for(let i=0;i<e;i+=1)r[i]=t[i]&255;return r}function l2(t){if($t(t,Uint8Array)){let e=new Uint8Array(t);return ss(e.buffer,e.byteOffset,e.byteLength)}return fs(t)}function ss(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let i;return e===void 0&&r===void 0?i=new Uint8Array(t):r===void 0?i=new Uint8Array(t,e):i=new Uint8Array(t,e,r),Object.setPrototypeOf(i,T.prototype),i}function c2(t){if(T.isBuffer(t)){let e=ls(t.length)|0,r=hr(e);return r.length===0||t.copy(r,0,0,e),r}if(t.length!==void 0)return typeof t.length!="number"||ds(t.length)?hr(0):fs(t);if(t.type==="Buffer"&&Array.isArray(t.data))return fs(t.data)}function ls(t){if(t>=Qa)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Qa.toString(16)+" bytes");return t|0}function d2(t){return+t!=t&&(t=0),T.alloc(+t)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,r){if($t(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),$t(r,Uint8Array)&&(r=T.from(r,r.offset,r.byteLength)),!T.isBuffer(e)||!T.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;let i=e.length,n=r.length;for(let a=0,f=Math.min(i,n);a<f;++a)if(e[a]!==r[a]){i=e[a],n=r[a];break}return i<n?-1:n<i?1:0};T.isEncoding=function(e){switch(String(e).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}};T.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return T.alloc(0);let i;if(r===void 0)for(r=0,i=0;i<e.length;++i)r+=e[i].length;let n=T.allocUnsafe(r),a=0;for(i=0;i<e.length;++i){let f=e[i];if($t(f,Uint8Array))a+f.length>n.length?(T.isBuffer(f)||(f=T.from(f)),f.copy(n,a)):Uint8Array.prototype.set.call(n,f,a);else if(T.isBuffer(f))f.copy(n,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=f.length}return n};function Kl(t,e){if(T.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||$t(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&r===0)return 0;let n=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return us(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Jl(t).length;default:if(n)return i?-1:us(t).length;e=(""+e).toLowerCase(),n=!0}}T.byteLength=Kl;function p2(t,e,r){let i=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return E2(this,e,r);case"utf8":case"utf-8":return zl(this,e,r);case"ascii":return x2(this,e,r);case"latin1":case"binary":return M2(this,e,r);case"base64":return w2(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S2(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}T.prototype._isBuffer=!0;function fi(t,e,r){let i=t[e];t[e]=t[r],t[r]=i}T.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<e;r+=2)fi(this,r,r+1);return this};T.prototype.swap32=function(){let e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<e;r+=4)fi(this,r,r+3),fi(this,r+1,r+2);return this};T.prototype.swap64=function(){let e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<e;r+=8)fi(this,r,r+7),fi(this,r+1,r+6),fi(this,r+2,r+5),fi(this,r+3,r+4);return this};T.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?zl(this,0,e):p2.apply(this,arguments)};T.prototype.toLocaleString=T.prototype.toString;T.prototype.equals=function(e){if(!T.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:T.compare(this,e)===0};T.prototype.inspect=function(){let e="",r=Wi.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"};Ul&&(T.prototype[Ul]=T.prototype.inspect);T.prototype.compare=function(e,r,i,n,a){if($t(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),i===void 0&&(i=e?e.length:0),n===void 0&&(n=0),a===void 0&&(a=this.length),r<0||i>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&r>=i)return 0;if(n>=a)return-1;if(r>=i)return 1;if(r>>>=0,i>>>=0,n>>>=0,a>>>=0,this===e)return 0;let f=a-n,v=i-r,m=Math.min(f,v),E=this.slice(n,a),A=e.slice(r,i);for(let q=0;q<m;++q)if(E[q]!==A[q]){f=E[q],v=A[q];break}return f<v?-1:v<f?1:0};function Wl(t,e,r,i,n){if(t.length===0)return-1;if(typeof r=="string"?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,ds(r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0)if(n)r=0;else return-1;if(typeof e=="string"&&(e=T.from(e,i)),T.isBuffer(e))return e.length===0?-1:Nl(t,e,r,i,n);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Nl(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function Nl(t,e,r,i,n){let a=1,f=t.length,v=e.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(t.length<2||e.length<2)return-1;a=2,f/=2,v/=2,r/=2}function m(A,q){return a===1?A[q]:A.readUInt16BE(q*a)}let E;if(n){let A=-1;for(E=r;E<f;E++)if(m(t,E)===m(e,A===-1?0:E-A)){if(A===-1&&(A=E),E-A+1===v)return A*a}else A!==-1&&(E-=E-A),A=-1}else for(r+v>f&&(r=f-v),E=r;E>=0;E--){let A=!0;for(let q=0;q<v;q++)if(m(t,E+q)!==m(e,q)){A=!1;break}if(A)return E}return-1}T.prototype.includes=function(e,r,i){return this.indexOf(e,r,i)!==-1};T.prototype.indexOf=function(e,r,i){return Wl(this,e,r,i,!0)};T.prototype.lastIndexOf=function(e,r,i){return Wl(this,e,r,i,!1)};function v2(t,e,r,i){r=Number(r)||0;let n=t.length-r;i?(i=Number(i),i>n&&(i=n)):i=n;let a=e.length;i>a/2&&(i=a/2);let f;for(f=0;f<i;++f){let v=parseInt(e.substr(f*2,2),16);if(ds(v))return f;t[r+f]=v}return f}function y2(t,e,r,i){return eo(us(e,t.length-r),t,r,i)}function g2(t,e,r,i){return eo(q2(e),t,r,i)}function m2(t,e,r,i){return eo(Jl(e),t,r,i)}function b2(t,e,r,i){return eo(I2(e,t.length-r),t,r,i)}T.prototype.write=function(e,r,i,n){if(r===void 0)n="utf8",i=this.length,r=0;else if(i===void 0&&typeof r=="string")n=r,i=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(i)?(i=i>>>0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let a=this.length-r;if((i===void 0||i>a)&&(i=a),e.length>0&&(i<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let f=!1;for(;;)switch(n){case"hex":return v2(this,e,r,i);case"utf8":case"utf-8":return y2(this,e,r,i);case"ascii":case"latin1":case"binary":return g2(this,e,r,i);case"base64":return m2(this,e,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b2(this,e,r,i);default:if(f)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),f=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function w2(t,e,r){return e===0&&r===t.length?os.fromByteArray(t):os.fromByteArray(t.slice(e,r))}function zl(t,e,r){r=Math.min(t.length,r);let i=[],n=e;for(;n<r;){let a=t[n],f=null,v=a>239?4:a>223?3:a>191?2:1;if(n+v<=r){let m,E,A,q;switch(v){case 1:a<128&&(f=a);break;case 2:m=t[n+1],(m&192)===128&&(q=(a&31)<<6|m&63,q>127&&(f=q));break;case 3:m=t[n+1],E=t[n+2],(m&192)===128&&(E&192)===128&&(q=(a&15)<<12|(m&63)<<6|E&63,q>2047&&(q<55296||q>57343)&&(f=q));break;case 4:m=t[n+1],E=t[n+2],A=t[n+3],(m&192)===128&&(E&192)===128&&(A&192)===128&&(q=(a&15)<<18|(m&63)<<12|(E&63)<<6|A&63,q>65535&&q<1114112&&(f=q))}}f===null?(f=65533,v=1):f>65535&&(f-=65536,i.push(f>>>10&1023|55296),f=56320|f&1023),i.push(f),n+=v}return _2(i)}var Ll=4096;function _2(t){let e=t.length;if(e<=Ll)return String.fromCharCode.apply(String,t);let r="",i=0;for(;i<e;)r+=String.fromCharCode.apply(String,t.slice(i,i+=Ll));return r}function x2(t,e,r){let i="";r=Math.min(t.length,r);for(let n=e;n<r;++n)i+=String.fromCharCode(t[n]&127);return i}function M2(t,e,r){let i="";r=Math.min(t.length,r);for(let n=e;n<r;++n)i+=String.fromCharCode(t[n]);return i}function E2(t,e,r){let i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);let n="";for(let a=e;a<r;++a)n+=k2[t[a]];return n}function S2(t,e,r){let i=t.slice(e,r),n="";for(let a=0;a<i.length-1;a+=2)n+=String.fromCharCode(i[a]+i[a+1]*256);return n}T.prototype.slice=function(e,r){let i=this.length;e=~~e,r=r===void 0?i:~~r,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),r<e&&(r=e);let n=this.subarray(e,r);return Object.setPrototypeOf(n,T.prototype),n};function rt(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,r,i){e=e>>>0,r=r>>>0,i||rt(e,r,this.length);let n=this[e],a=1,f=0;for(;++f<r&&(a*=256);)n+=this[e+f]*a;return n};T.prototype.readUintBE=T.prototype.readUIntBE=function(e,r,i){e=e>>>0,r=r>>>0,i||rt(e,r,this.length);let n=this[e+--r],a=1;for(;r>0&&(a*=256);)n+=this[e+--r]*a;return n};T.prototype.readUint8=T.prototype.readUInt8=function(e,r){return e=e>>>0,r||rt(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||rt(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||rt(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=Ir(function(e){e=e>>>0,Ki(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&Yn(e,this.length-8);let n=r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,a=this[++e]+this[++e]*2**8+this[++e]*2**16+i*2**24;return BigInt(n)+(BigInt(a)<<BigInt(32))});T.prototype.readBigUInt64BE=Ir(function(e){e=e>>>0,Ki(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&Yn(e,this.length-8);let n=r*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],a=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i;return(BigInt(n)<<BigInt(32))+BigInt(a)});T.prototype.readIntLE=function(e,r,i){e=e>>>0,r=r>>>0,i||rt(e,r,this.length);let n=this[e],a=1,f=0;for(;++f<r&&(a*=256);)n+=this[e+f]*a;return a*=128,n>=a&&(n-=Math.pow(2,8*r)),n};T.prototype.readIntBE=function(e,r,i){e=e>>>0,r=r>>>0,i||rt(e,r,this.length);let n=r,a=1,f=this[e+--n];for(;n>0&&(a*=256);)f+=this[e+--n]*a;return a*=128,f>=a&&(f-=Math.pow(2,8*r)),f};T.prototype.readInt8=function(e,r){return e=e>>>0,r||rt(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,r){e=e>>>0,r||rt(e,2,this.length);let i=this[e]|this[e+1]<<8;return i&32768?i|4294901760:i};T.prototype.readInt16BE=function(e,r){e=e>>>0,r||rt(e,2,this.length);let i=this[e+1]|this[e]<<8;return i&32768?i|4294901760:i};T.prototype.readInt32LE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=Ir(function(e){e=e>>>0,Ki(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&Yn(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(i<<24);return(BigInt(n)<<BigInt(32))+BigInt(r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)});T.prototype.readBigInt64BE=Ir(function(e){e=e>>>0,Ki(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&Yn(e,this.length-8);let n=(r<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i)});T.prototype.readFloatLE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),Hi.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),Hi.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||rt(e,8,this.length),Hi.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||rt(e,8,this.length),Hi.read(this,e,!1,52,8)};function vt(t,e,r,i,n,a){if(!T.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<a)throw new RangeError('"value" argument is out of bounds');if(r+i>t.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,r,i,n){if(e=+e,r=r>>>0,i=i>>>0,!n){let v=Math.pow(2,8*i)-1;vt(this,e,r,i,v,0)}let a=1,f=0;for(this[r]=e&255;++f<i&&(a*=256);)this[r+f]=e/a&255;return r+i};T.prototype.writeUintBE=T.prototype.writeUIntBE=function(e,r,i,n){if(e=+e,r=r>>>0,i=i>>>0,!n){let v=Math.pow(2,8*i)-1;vt(this,e,r,i,v,0)}let a=i-1,f=1;for(this[r+a]=e&255;--a>=0&&(f*=256);)this[r+a]=e/f&255;return r+i};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,r,i){return e=+e,r=r>>>0,i||vt(this,e,r,1,255,0),this[r]=e&255,r+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,r,i){return e=+e,r=r>>>0,i||vt(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,r,i){return e=+e,r=r>>>0,i||vt(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,r,i){return e=+e,r=r>>>0,i||vt(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,r,i){return e=+e,r=r>>>0,i||vt(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};function Gl(t,e,r,i,n){Xl(e,i,n,t,r,7);let a=Number(e&BigInt(4294967295));t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a;let f=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=f,f=f>>8,t[r++]=f,f=f>>8,t[r++]=f,f=f>>8,t[r++]=f,r}function Vl(t,e,r,i,n){Xl(e,i,n,t,r,7);let a=Number(e&BigInt(4294967295));t[r+7]=a,a=a>>8,t[r+6]=a,a=a>>8,t[r+5]=a,a=a>>8,t[r+4]=a;let f=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=f,f=f>>8,t[r+2]=f,f=f>>8,t[r+1]=f,f=f>>8,t[r]=f,r+8}T.prototype.writeBigUInt64LE=Ir(function(e,r=0){return Gl(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Ir(function(e,r=0){return Vl(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,r,i,n){if(e=+e,r=r>>>0,!n){let m=Math.pow(2,8*i-1);vt(this,e,r,i,m-1,-m)}let a=0,f=1,v=0;for(this[r]=e&255;++a<i&&(f*=256);)e<0&&v===0&&this[r+a-1]!==0&&(v=1),this[r+a]=(e/f>>0)-v&255;return r+i};T.prototype.writeIntBE=function(e,r,i,n){if(e=+e,r=r>>>0,!n){let m=Math.pow(2,8*i-1);vt(this,e,r,i,m-1,-m)}let a=i-1,f=1,v=0;for(this[r+a]=e&255;--a>=0&&(f*=256);)e<0&&v===0&&this[r+a+1]!==0&&(v=1),this[r+a]=(e/f>>0)-v&255;return r+i};T.prototype.writeInt8=function(e,r,i){return e=+e,r=r>>>0,i||vt(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1};T.prototype.writeInt16LE=function(e,r,i){return e=+e,r=r>>>0,i||vt(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2};T.prototype.writeInt16BE=function(e,r,i){return e=+e,r=r>>>0,i||vt(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2};T.prototype.writeInt32LE=function(e,r,i){return e=+e,r=r>>>0,i||vt(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4};T.prototype.writeInt32BE=function(e,r,i){return e=+e,r=r>>>0,i||vt(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};T.prototype.writeBigInt64LE=Ir(function(e,r=0){return Gl(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Ir(function(e,r=0){return Vl(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function $l(t,e,r,i,n,a){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Zl(t,e,r,i,n){return e=+e,r=r>>>0,n||$l(t,e,r,4,34028234663852886e22,-34028234663852886e22),Hi.write(t,e,r,i,23,4),r+4}T.prototype.writeFloatLE=function(e,r,i){return Zl(this,e,r,!0,i)};T.prototype.writeFloatBE=function(e,r,i){return Zl(this,e,r,!1,i)};function Yl(t,e,r,i,n){return e=+e,r=r>>>0,n||$l(t,e,r,8,17976931348623157e292,-17976931348623157e292),Hi.write(t,e,r,i,52,8),r+8}T.prototype.writeDoubleLE=function(e,r,i){return Yl(this,e,r,!0,i)};T.prototype.writeDoubleBE=function(e,r,i){return Yl(this,e,r,!1,i)};T.prototype.copy=function(e,r,i,n){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),!n&&n!==0&&(n=this.length),r>=e.length&&(r=e.length),r||(r=0),n>0&&n<i&&(n=i),n===i||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-r<n-i&&(n=e.length-r+i);let a=n-i;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,i,n):Uint8Array.prototype.set.call(e,this.subarray(i,n),r),a};T.prototype.fill=function(e,r,i,n){if(typeof e=="string"){if(typeof r=="string"?(n=r,r=0,i=this.length):typeof i=="string"&&(n=i,i=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!T.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(e.length===1){let f=e.charCodeAt(0);(n==="utf8"&&f<128||n==="latin1")&&(e=f)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(r<0||this.length<r||this.length<i)throw new RangeError("Out of range index");if(i<=r)return this;r=r>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);let a;if(typeof e=="number")for(a=r;a<i;++a)this[a]=e;else{let f=T.isBuffer(e)?e:T.from(e,n),v=f.length;if(v===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<i-r;++a)this[a+r]=f[a%v]}return this};var ji={};function cs(t,e,r){ji[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(n){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:n,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}cs("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);cs("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError);cs("ERR_OUT_OF_RANGE",function(t,e,r){let i=`The value of "${t}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=Fl(String(r)):typeof r=="bigint"&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=Fl(n)),n+="n"),i+=` It must be ${e}. Received ${n}`,i},RangeError);function Fl(t){let e="",r=t.length,i=t[0]==="-"?1:0;for(;r>=i+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function B2(t,e,r){Ki(e,"offset"),(t[e]===void 0||t[e+r]===void 0)&&Yn(e,t.length-(r+1))}function Xl(t,e,r,i,n,a){if(t>r||t<e){let f=typeof e=="bigint"?"n":"",v;throw a>3?e===0||e===BigInt(0)?v=`>= 0${f} and < 2${f} ** ${(a+1)*8}${f}`:v=`>= -(2${f} ** ${(a+1)*8-1}${f}) and < 2 ** ${(a+1)*8-1}${f}`:v=`>= ${e}${f} and <= ${r}${f}`,new ji.ERR_OUT_OF_RANGE("value",v,t)}B2(i,n,a)}function Ki(t,e){if(typeof t!="number")throw new ji.ERR_INVALID_ARG_TYPE(e,"number",t)}function Yn(t,e,r){throw Math.floor(t)!==t?(Ki(t,r),new ji.ERR_OUT_OF_RANGE(r||"offset","an integer",t)):e<0?new ji.ERR_BUFFER_OUT_OF_BOUNDS:new ji.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}var A2=/[^+/0-9A-Za-z-_]/g;function R2(t){if(t=t.split("=")[0],t=t.trim().replace(A2,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function us(t,e){e=e||1/0;let r,i=t.length,n=null,a=[];for(let f=0;f<i;++f){if(r=t.charCodeAt(f),r>55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}else if(f+1===i){(e-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(e-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function q2(t){let e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function I2(t,e){let r,i,n,a=[];for(let f=0;f<t.length&&!((e-=2)<0);++f)r=t.charCodeAt(f),i=r>>8,n=r%256,a.push(n),a.push(i);return a}function Jl(t){return os.toByteArray(R2(t))}function eo(t,e,r,i){let n;for(n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function $t(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function ds(t){return t!==t}var k2=(function(){let t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){let i=r*16;for(let n=0;n<16;++n)e[i+n]=t[r]+t[n]}return e})();function Ir(t){return typeof BigInt>"u"?T2:t}function T2(){throw new Error("BigInt not supported")}});var S,B,b=Xb(()=>{S=Al(Tl()),B=Al(ft())});var lr=R((Ql,ps)=>{b();(function(t,e){"use strict";function r(M,h){if(!M)throw new Error(h||"Assertion failed")}function i(M,h){M.super_=h;var y=function(){};y.prototype=h.prototype,M.prototype=new y,M.prototype.constructor=M}function n(M,h,y){if(n.isBN(M))return M;this.negative=0,this.words=null,this.length=0,this.red=null,M!==null&&((h==="le"||h==="be")&&(y=h,h=10),this._init(M||0,h||10,y||"be"))}typeof t=="object"?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=ft().Buffer}catch{}n.isBN=function(h){return h instanceof n?!0:h!==null&&typeof h=="object"&&h.constructor.wordSize===n.wordSize&&Array.isArray(h.words)},n.max=function(h,y){return h.cmp(y)>0?h:y},n.min=function(h,y){return h.cmp(y)<0?h:y},n.prototype._init=function(h,y,l){if(typeof h=="number")return this._initNumber(h,y,l);if(typeof h=="object")return this._initArray(h,y,l);y==="hex"&&(y=16),r(y===(y|0)&&y>=2&&y<=36),h=h.toString().replace(/\s+/g,"");var o=0;h[0]==="-"&&(o++,this.negative=1),o<h.length&&(y===16?this._parseHex(h,o,l):(this._parseBase(h,y,o),l==="le"&&this._initArray(this.toArray(),y,l)))},n.prototype._initNumber=function(h,y,l){h<0&&(this.negative=1,h=-h),h<67108864?(this.words=[h&67108863],this.length=1):h<4503599627370496?(this.words=[h&67108863,h/67108864&67108863],this.length=2):(r(h<9007199254740992),this.words=[h&67108863,h/67108864&67108863,1],this.length=3),l==="le"&&this._initArray(this.toArray(),y,l)},n.prototype._initArray=function(h,y,l){if(r(typeof h.length=="number"),h.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(h.length/3),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var s,d,g=0;if(l==="be")for(o=h.length-1,s=0;o>=0;o-=3)d=h[o]|h[o-1]<<8|h[o-2]<<16,this.words[s]|=d<<g&67108863,this.words[s+1]=d>>>26-g&67108863,g+=24,g>=26&&(g-=26,s++);else if(l==="le")for(o=0,s=0;o<h.length;o+=3)d=h[o]|h[o+1]<<8|h[o+2]<<16,this.words[s]|=d<<g&67108863,this.words[s+1]=d>>>26-g&67108863,g+=24,g>=26&&(g-=26,s++);return this.strip()};function f(M,h){var y=M.charCodeAt(h);return y>=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function v(M,h,y){var l=f(M,y);return y-1>=h&&(l|=f(M,y-1)<<4),l}n.prototype._parseHex=function(h,y,l){this.length=Math.ceil((h.length-y)/6),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var s=0,d=0,g;if(l==="be")for(o=h.length-1;o>=y;o-=2)g=v(h,y,o)<<s,this.words[d]|=g&67108863,s>=18?(s-=18,d+=1,this.words[d]|=g>>>26):s+=8;else{var p=h.length-y;for(o=p%2===0?y+1:y;o<h.length;o+=2)g=v(h,y,o)<<s,this.words[d]|=g&67108863,s>=18?(s-=18,d+=1,this.words[d]|=g>>>26):s+=8}this.strip()};function m(M,h,y,l){for(var o=0,s=Math.min(M.length,y),d=h;d<s;d++){var g=M.charCodeAt(d)-48;o*=l,g>=49?o+=g-49+10:g>=17?o+=g-17+10:o+=g}return o}n.prototype._parseBase=function(h,y,l){this.words=[0],this.length=1;for(var o=0,s=1;s<=67108863;s*=y)o++;o--,s=s/y|0;for(var d=h.length-l,g=d%o,p=Math.min(d,d-g)+l,u=0,w=l;w<p;w+=o)u=m(h,w,w+o,y),this.imuln(s),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(g!==0){var _=1;for(u=m(h,w,h.length,y),w=0;w<g;w++)_*=y;this.imuln(_),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.prototype.copy=function(h){h.words=new Array(this.length);for(var y=0;y<this.length;y++)h.words[y]=this.words[y];h.length=this.length,h.negative=this.negative,h.red=this.red},n.prototype.clone=function(){var h=new n(null);return this.copy(h),h},n.prototype._expand=function(h){for(;this.length<h;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var E=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],A=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],q=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(h,y){h=h||10,y=y|0||1;var l;if(h===16||h==="hex"){l="";for(var o=0,s=0,d=0;d<this.length;d++){var g=this.words[d],p=((g<<o|s)&16777215).toString(16);s=g>>>24-o&16777215,o+=2,o>=26&&(o-=26,d--),s!==0||d!==this.length-1?l=E[6-p.length]+p+l:l=p+l}for(s!==0&&(l=s.toString(16)+l);l.length%y!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(h===(h|0)&&h>=2&&h<=36){var u=A[h],w=q[h];l="";var _=this.clone();for(_.negative=0;!_.isZero();){var c=_.modn(w).toString(h);_=_.idivn(w),_.isZero()?l=c+l:l=E[u-c.length]+c+l}for(this.isZero()&&(l="0"+l);l.length%y!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var h=this.words[0];return this.length===2?h+=this.words[1]*67108864:this.length===3&&this.words[2]===1?h+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-h:h},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(h,y){return r(typeof a<"u"),this.toArrayLike(a,h,y)},n.prototype.toArray=function(h,y){return this.toArrayLike(Array,h,y)},n.prototype.toArrayLike=function(h,y,l){var o=this.byteLength(),s=l||Math.max(1,o);r(o<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0"),this.strip();var d=y==="le",g=new h(s),p,u,w=this.clone();if(d){for(u=0;!w.isZero();u++)p=w.andln(255),w.iushrn(8),g[u]=p;for(;u<s;u++)g[u]=0}else{for(u=0;u<s-o;u++)g[u]=0;for(u=0;!w.isZero();u++)p=w.andln(255),w.iushrn(8),g[s-u-1]=p}return g},Math.clz32?n.prototype._countBits=function(h){return 32-Math.clz32(h)}:n.prototype._countBits=function(h){var y=h,l=0;return y>=4096&&(l+=13,y>>>=13),y>=64&&(l+=7,y>>>=7),y>=8&&(l+=4,y>>>=4),y>=2&&(l+=2,y>>>=2),l+y},n.prototype._zeroBits=function(h){if(h===0)return 26;var y=h,l=0;return(y&8191)===0&&(l+=13,y>>>=13),(y&127)===0&&(l+=7,y>>>=7),(y&15)===0&&(l+=4,y>>>=4),(y&3)===0&&(l+=2,y>>>=2),(y&1)===0&&l++,l},n.prototype.bitLength=function(){var h=this.words[this.length-1],y=this._countBits(h);return(this.length-1)*26+y};function I(M){for(var h=new Array(M.bitLength()),y=0;y<h.length;y++){var l=y/26|0,o=y%26;h[y]=(M.words[l]&1<<o)>>>o}return h}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var h=0,y=0;y<this.length;y++){var l=this._zeroBits(this.words[y]);if(h+=l,l!==26)break}return h},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(h){return this.negative!==0?this.abs().inotn(h).iaddn(1):this.clone()},n.prototype.fromTwos=function(h){return this.testn(h-1)?this.notn(h).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(h){for(;this.length<h.length;)this.words[this.length++]=0;for(var y=0;y<h.length;y++)this.words[y]=this.words[y]|h.words[y];return this.strip()},n.prototype.ior=function(h){return r((this.negative|h.negative)===0),this.iuor(h)},n.prototype.or=function(h){return this.length>h.length?this.clone().ior(h):h.clone().ior(this)},n.prototype.uor=function(h){return this.length>h.length?this.clone().iuor(h):h.clone().iuor(this)},n.prototype.iuand=function(h){var y;this.length>h.length?y=h:y=this;for(var l=0;l<y.length;l++)this.words[l]=this.words[l]&h.words[l];return this.length=y.length,this.strip()},n.prototype.iand=function(h){return r((this.negative|h.negative)===0),this.iuand(h)},n.prototype.and=function(h){return this.length>h.length?this.clone().iand(h):h.clone().iand(this)},n.prototype.uand=function(h){return this.length>h.length?this.clone().iuand(h):h.clone().iuand(this)},n.prototype.iuxor=function(h){var y,l;this.length>h.length?(y=this,l=h):(y=h,l=this);for(var o=0;o<l.length;o++)this.words[o]=y.words[o]^l.words[o];if(this!==y)for(;o<y.length;o++)this.words[o]=y.words[o];return this.length=y.length,this.strip()},n.prototype.ixor=function(h){return r((this.negative|h.negative)===0),this.iuxor(h)},n.prototype.xor=function(h){return this.length>h.length?this.clone().ixor(h):h.clone().ixor(this)},n.prototype.uxor=function(h){return this.length>h.length?this.clone().iuxor(h):h.clone().iuxor(this)},n.prototype.inotn=function(h){r(typeof h=="number"&&h>=0);var y=Math.ceil(h/26)|0,l=h%26;this._expand(y),l>0&&y--;for(var o=0;o<y;o++)this.words[o]=~this.words[o]&67108863;return l>0&&(this.words[o]=~this.words[o]&67108863>>26-l),this.strip()},n.prototype.notn=function(h){return this.clone().inotn(h)},n.prototype.setn=function(h,y){r(typeof h=="number"&&h>=0);var l=h/26|0,o=h%26;return this._expand(l+1),y?this.words[l]=this.words[l]|1<<o:this.words[l]=this.words[l]&~(1<<o),this.strip()},n.prototype.iadd=function(h){var y;if(this.negative!==0&&h.negative===0)return this.negative=0,y=this.isub(h),this.negative^=1,this._normSign();if(this.negative===0&&h.negative!==0)return h.negative=0,y=this.isub(h),h.negative=1,y._normSign();var l,o;this.length>h.length?(l=this,o=h):(l=h,o=this);for(var s=0,d=0;d<o.length;d++)y=(l.words[d]|0)+(o.words[d]|0)+s,this.words[d]=y&67108863,s=y>>>26;for(;s!==0&&d<l.length;d++)y=(l.words[d]|0)+s,this.words[d]=y&67108863,s=y>>>26;if(this.length=l.length,s!==0)this.words[this.length]=s,this.length++;else if(l!==this)for(;d<l.length;d++)this.words[d]=l.words[d];return this},n.prototype.add=function(h){var y;return h.negative!==0&&this.negative===0?(h.negative=0,y=this.sub(h),h.negative^=1,y):h.negative===0&&this.negative!==0?(this.negative=0,y=h.sub(this),this.negative=1,y):this.length>h.length?this.clone().iadd(h):h.clone().iadd(this)},n.prototype.isub=function(h){if(h.negative!==0){h.negative=0;var y=this.iadd(h);return h.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(h),this.negative=1,this._normSign();var l=this.cmp(h);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var o,s;l>0?(o=this,s=h):(o=h,s=this);for(var d=0,g=0;g<s.length;g++)y=(o.words[g]|0)-(s.words[g]|0)+d,d=y>>26,this.words[g]=y&67108863;for(;d!==0&&g<o.length;g++)y=(o.words[g]|0)+d,d=y>>26,this.words[g]=y&67108863;if(d===0&&g<o.length&&o!==this)for(;g<o.length;g++)this.words[g]=o.words[g];return this.length=Math.max(this.length,g),o!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(h){return this.clone().isub(h)};function C(M,h,y){y.negative=h.negative^M.negative;var l=M.length+h.length|0;y.length=l,l=l-1|0;var o=M.words[0]|0,s=h.words[0]|0,d=o*s,g=d&67108863,p=d/67108864|0;y.words[0]=g;for(var u=1;u<l;u++){for(var w=p>>>26,_=p&67108863,c=Math.min(u,h.length-1),x=Math.max(0,u-M.length+1);x<=c;x++){var P=u-x|0;o=M.words[P]|0,s=h.words[x]|0,d=o*s+_,w+=d/67108864|0,_=d&67108863}y.words[u]=_|0,p=w|0}return p!==0?y.words[u]=p|0:y.length--,y.strip()}var j=function(h,y,l){var o=h.words,s=y.words,d=l.words,g=0,p,u,w,_=o[0]|0,c=_&8191,x=_>>>13,P=o[1]|0,N=P&8191,U=P>>>13,W=o[2]|0,K=W&8191,G=W>>>13,It=o[3]|0,Z=It&8191,Y=It>>>13,On=o[4]|0,J=On&8191,Q=On>>>13,Pn=o[5]|0,ee=Pn&8191,te=Pn>>>13,Dn=o[6]|0,re=Dn&8191,ie=Dn>>>13,Un=o[7]|0,ne=Un&8191,ae=Un>>>13,Nn=o[8]|0,oe=Nn&8191,fe=Nn>>>13,Ln=o[9]|0,se=Ln&8191,ue=Ln>>>13,Fn=s[0]|0,he=Fn&8191,le=Fn>>>13,jn=s[1]|0,ce=jn&8191,de=jn>>>13,Hn=s[2]|0,pe=Hn&8191,ve=Hn>>>13,Kn=s[3]|0,ye=Kn&8191,ge=Kn>>>13,Wn=s[4]|0,me=Wn&8191,be=Wn>>>13,zn=s[5]|0,we=zn&8191,_e=zn>>>13,Gn=s[6]|0,xe=Gn&8191,Me=Gn>>>13,Vn=s[7]|0,Ee=Vn&8191,Se=Vn>>>13,$n=s[8]|0,Be=$n&8191,Ae=$n>>>13,Zn=s[9]|0,Re=Zn&8191,qe=Zn>>>13;l.negative=h.negative^y.negative,l.length=19,p=Math.imul(c,he),u=Math.imul(c,le),u=u+Math.imul(x,he)|0,w=Math.imul(x,le);var Li=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Li>>>26)|0,Li&=67108863,p=Math.imul(N,he),u=Math.imul(N,le),u=u+Math.imul(U,he)|0,w=Math.imul(U,le),p=p+Math.imul(c,ce)|0,u=u+Math.imul(c,de)|0,u=u+Math.imul(x,ce)|0,w=w+Math.imul(x,de)|0;var Ge=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,p=Math.imul(K,he),u=Math.imul(K,le),u=u+Math.imul(G,he)|0,w=Math.imul(G,le),p=p+Math.imul(N,ce)|0,u=u+Math.imul(N,de)|0,u=u+Math.imul(U,ce)|0,w=w+Math.imul(U,de)|0,p=p+Math.imul(c,pe)|0,u=u+Math.imul(c,ve)|0,u=u+Math.imul(x,pe)|0,w=w+Math.imul(x,ve)|0;var Ve=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,p=Math.imul(Z,he),u=Math.imul(Z,le),u=u+Math.imul(Y,he)|0,w=Math.imul(Y,le),p=p+Math.imul(K,ce)|0,u=u+Math.imul(K,de)|0,u=u+Math.imul(G,ce)|0,w=w+Math.imul(G,de)|0,p=p+Math.imul(N,pe)|0,u=u+Math.imul(N,ve)|0,u=u+Math.imul(U,pe)|0,w=w+Math.imul(U,ve)|0,p=p+Math.imul(c,ye)|0,u=u+Math.imul(c,ge)|0,u=u+Math.imul(x,ye)|0,w=w+Math.imul(x,ge)|0;var Kr=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Kr>>>26)|0,Kr&=67108863,p=Math.imul(J,he),u=Math.imul(J,le),u=u+Math.imul(Q,he)|0,w=Math.imul(Q,le),p=p+Math.imul(Z,ce)|0,u=u+Math.imul(Z,de)|0,u=u+Math.imul(Y,ce)|0,w=w+Math.imul(Y,de)|0,p=p+Math.imul(K,pe)|0,u=u+Math.imul(K,ve)|0,u=u+Math.imul(G,pe)|0,w=w+Math.imul(G,ve)|0,p=p+Math.imul(N,ye)|0,u=u+Math.imul(N,ge)|0,u=u+Math.imul(U,ye)|0,w=w+Math.imul(U,ge)|0,p=p+Math.imul(c,me)|0,u=u+Math.imul(c,be)|0,u=u+Math.imul(x,me)|0,w=w+Math.imul(x,be)|0;var Wr=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,p=Math.imul(ee,he),u=Math.imul(ee,le),u=u+Math.imul(te,he)|0,w=Math.imul(te,le),p=p+Math.imul(J,ce)|0,u=u+Math.imul(J,de)|0,u=u+Math.imul(Q,ce)|0,w=w+Math.imul(Q,de)|0,p=p+Math.imul(Z,pe)|0,u=u+Math.imul(Z,ve)|0,u=u+Math.imul(Y,pe)|0,w=w+Math.imul(Y,ve)|0,p=p+Math.imul(K,ye)|0,u=u+Math.imul(K,ge)|0,u=u+Math.imul(G,ye)|0,w=w+Math.imul(G,ge)|0,p=p+Math.imul(N,me)|0,u=u+Math.imul(N,be)|0,u=u+Math.imul(U,me)|0,w=w+Math.imul(U,be)|0,p=p+Math.imul(c,we)|0,u=u+Math.imul(c,_e)|0,u=u+Math.imul(x,we)|0,w=w+Math.imul(x,_e)|0;var zr=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(zr>>>26)|0,zr&=67108863,p=Math.imul(re,he),u=Math.imul(re,le),u=u+Math.imul(ie,he)|0,w=Math.imul(ie,le),p=p+Math.imul(ee,ce)|0,u=u+Math.imul(ee,de)|0,u=u+Math.imul(te,ce)|0,w=w+Math.imul(te,de)|0,p=p+Math.imul(J,pe)|0,u=u+Math.imul(J,ve)|0,u=u+Math.imul(Q,pe)|0,w=w+Math.imul(Q,ve)|0,p=p+Math.imul(Z,ye)|0,u=u+Math.imul(Z,ge)|0,u=u+Math.imul(Y,ye)|0,w=w+Math.imul(Y,ge)|0,p=p+Math.imul(K,me)|0,u=u+Math.imul(K,be)|0,u=u+Math.imul(G,me)|0,w=w+Math.imul(G,be)|0,p=p+Math.imul(N,we)|0,u=u+Math.imul(N,_e)|0,u=u+Math.imul(U,we)|0,w=w+Math.imul(U,_e)|0,p=p+Math.imul(c,xe)|0,u=u+Math.imul(c,Me)|0,u=u+Math.imul(x,xe)|0,w=w+Math.imul(x,Me)|0;var Gr=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,p=Math.imul(ne,he),u=Math.imul(ne,le),u=u+Math.imul(ae,he)|0,w=Math.imul(ae,le),p=p+Math.imul(re,ce)|0,u=u+Math.imul(re,de)|0,u=u+Math.imul(ie,ce)|0,w=w+Math.imul(ie,de)|0,p=p+Math.imul(ee,pe)|0,u=u+Math.imul(ee,ve)|0,u=u+Math.imul(te,pe)|0,w=w+Math.imul(te,ve)|0,p=p+Math.imul(J,ye)|0,u=u+Math.imul(J,ge)|0,u=u+Math.imul(Q,ye)|0,w=w+Math.imul(Q,ge)|0,p=p+Math.imul(Z,me)|0,u=u+Math.imul(Z,be)|0,u=u+Math.imul(Y,me)|0,w=w+Math.imul(Y,be)|0,p=p+Math.imul(K,we)|0,u=u+Math.imul(K,_e)|0,u=u+Math.imul(G,we)|0,w=w+Math.imul(G,_e)|0,p=p+Math.imul(N,xe)|0,u=u+Math.imul(N,Me)|0,u=u+Math.imul(U,xe)|0,w=w+Math.imul(U,Me)|0,p=p+Math.imul(c,Ee)|0,u=u+Math.imul(c,Se)|0,u=u+Math.imul(x,Ee)|0,w=w+Math.imul(x,Se)|0;var Vr=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,p=Math.imul(oe,he),u=Math.imul(oe,le),u=u+Math.imul(fe,he)|0,w=Math.imul(fe,le),p=p+Math.imul(ne,ce)|0,u=u+Math.imul(ne,de)|0,u=u+Math.imul(ae,ce)|0,w=w+Math.imul(ae,de)|0,p=p+Math.imul(re,pe)|0,u=u+Math.imul(re,ve)|0,u=u+Math.imul(ie,pe)|0,w=w+Math.imul(ie,ve)|0,p=p+Math.imul(ee,ye)|0,u=u+Math.imul(ee,ge)|0,u=u+Math.imul(te,ye)|0,w=w+Math.imul(te,ge)|0,p=p+Math.imul(J,me)|0,u=u+Math.imul(J,be)|0,u=u+Math.imul(Q,me)|0,w=w+Math.imul(Q,be)|0,p=p+Math.imul(Z,we)|0,u=u+Math.imul(Z,_e)|0,u=u+Math.imul(Y,we)|0,w=w+Math.imul(Y,_e)|0,p=p+Math.imul(K,xe)|0,u=u+Math.imul(K,Me)|0,u=u+Math.imul(G,xe)|0,w=w+Math.imul(G,Me)|0,p=p+Math.imul(N,Ee)|0,u=u+Math.imul(N,Se)|0,u=u+Math.imul(U,Ee)|0,w=w+Math.imul(U,Se)|0,p=p+Math.imul(c,Be)|0,u=u+Math.imul(c,Ae)|0,u=u+Math.imul(x,Be)|0,w=w+Math.imul(x,Ae)|0;var $r=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+($r>>>26)|0,$r&=67108863,p=Math.imul(se,he),u=Math.imul(se,le),u=u+Math.imul(ue,he)|0,w=Math.imul(ue,le),p=p+Math.imul(oe,ce)|0,u=u+Math.imul(oe,de)|0,u=u+Math.imul(fe,ce)|0,w=w+Math.imul(fe,de)|0,p=p+Math.imul(ne,pe)|0,u=u+Math.imul(ne,ve)|0,u=u+Math.imul(ae,pe)|0,w=w+Math.imul(ae,ve)|0,p=p+Math.imul(re,ye)|0,u=u+Math.imul(re,ge)|0,u=u+Math.imul(ie,ye)|0,w=w+Math.imul(ie,ge)|0,p=p+Math.imul(ee,me)|0,u=u+Math.imul(ee,be)|0,u=u+Math.imul(te,me)|0,w=w+Math.imul(te,be)|0,p=p+Math.imul(J,we)|0,u=u+Math.imul(J,_e)|0,u=u+Math.imul(Q,we)|0,w=w+Math.imul(Q,_e)|0,p=p+Math.imul(Z,xe)|0,u=u+Math.imul(Z,Me)|0,u=u+Math.imul(Y,xe)|0,w=w+Math.imul(Y,Me)|0,p=p+Math.imul(K,Ee)|0,u=u+Math.imul(K,Se)|0,u=u+Math.imul(G,Ee)|0,w=w+Math.imul(G,Se)|0,p=p+Math.imul(N,Be)|0,u=u+Math.imul(N,Ae)|0,u=u+Math.imul(U,Be)|0,w=w+Math.imul(U,Ae)|0,p=p+Math.imul(c,Re)|0,u=u+Math.imul(c,qe)|0,u=u+Math.imul(x,Re)|0,w=w+Math.imul(x,qe)|0;var Zr=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,p=Math.imul(se,ce),u=Math.imul(se,de),u=u+Math.imul(ue,ce)|0,w=Math.imul(ue,de),p=p+Math.imul(oe,pe)|0,u=u+Math.imul(oe,ve)|0,u=u+Math.imul(fe,pe)|0,w=w+Math.imul(fe,ve)|0,p=p+Math.imul(ne,ye)|0,u=u+Math.imul(ne,ge)|0,u=u+Math.imul(ae,ye)|0,w=w+Math.imul(ae,ge)|0,p=p+Math.imul(re,me)|0,u=u+Math.imul(re,be)|0,u=u+Math.imul(ie,me)|0,w=w+Math.imul(ie,be)|0,p=p+Math.imul(ee,we)|0,u=u+Math.imul(ee,_e)|0,u=u+Math.imul(te,we)|0,w=w+Math.imul(te,_e)|0,p=p+Math.imul(J,xe)|0,u=u+Math.imul(J,Me)|0,u=u+Math.imul(Q,xe)|0,w=w+Math.imul(Q,Me)|0,p=p+Math.imul(Z,Ee)|0,u=u+Math.imul(Z,Se)|0,u=u+Math.imul(Y,Ee)|0,w=w+Math.imul(Y,Se)|0,p=p+Math.imul(K,Be)|0,u=u+Math.imul(K,Ae)|0,u=u+Math.imul(G,Be)|0,w=w+Math.imul(G,Ae)|0,p=p+Math.imul(N,Re)|0,u=u+Math.imul(N,qe)|0,u=u+Math.imul(U,Re)|0,w=w+Math.imul(U,qe)|0;var Yr=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Yr>>>26)|0,Yr&=67108863,p=Math.imul(se,pe),u=Math.imul(se,ve),u=u+Math.imul(ue,pe)|0,w=Math.imul(ue,ve),p=p+Math.imul(oe,ye)|0,u=u+Math.imul(oe,ge)|0,u=u+Math.imul(fe,ye)|0,w=w+Math.imul(fe,ge)|0,p=p+Math.imul(ne,me)|0,u=u+Math.imul(ne,be)|0,u=u+Math.imul(ae,me)|0,w=w+Math.imul(ae,be)|0,p=p+Math.imul(re,we)|0,u=u+Math.imul(re,_e)|0,u=u+Math.imul(ie,we)|0,w=w+Math.imul(ie,_e)|0,p=p+Math.imul(ee,xe)|0,u=u+Math.imul(ee,Me)|0,u=u+Math.imul(te,xe)|0,w=w+Math.imul(te,Me)|0,p=p+Math.imul(J,Ee)|0,u=u+Math.imul(J,Se)|0,u=u+Math.imul(Q,Ee)|0,w=w+Math.imul(Q,Se)|0,p=p+Math.imul(Z,Be)|0,u=u+Math.imul(Z,Ae)|0,u=u+Math.imul(Y,Be)|0,w=w+Math.imul(Y,Ae)|0,p=p+Math.imul(K,Re)|0,u=u+Math.imul(K,qe)|0,u=u+Math.imul(G,Re)|0,w=w+Math.imul(G,qe)|0;var Xr=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,p=Math.imul(se,ye),u=Math.imul(se,ge),u=u+Math.imul(ue,ye)|0,w=Math.imul(ue,ge),p=p+Math.imul(oe,me)|0,u=u+Math.imul(oe,be)|0,u=u+Math.imul(fe,me)|0,w=w+Math.imul(fe,be)|0,p=p+Math.imul(ne,we)|0,u=u+Math.imul(ne,_e)|0,u=u+Math.imul(ae,we)|0,w=w+Math.imul(ae,_e)|0,p=p+Math.imul(re,xe)|0,u=u+Math.imul(re,Me)|0,u=u+Math.imul(ie,xe)|0,w=w+Math.imul(ie,Me)|0,p=p+Math.imul(ee,Ee)|0,u=u+Math.imul(ee,Se)|0,u=u+Math.imul(te,Ee)|0,w=w+Math.imul(te,Se)|0,p=p+Math.imul(J,Be)|0,u=u+Math.imul(J,Ae)|0,u=u+Math.imul(Q,Be)|0,w=w+Math.imul(Q,Ae)|0,p=p+Math.imul(Z,Re)|0,u=u+Math.imul(Z,qe)|0,u=u+Math.imul(Y,Re)|0,w=w+Math.imul(Y,qe)|0;var Jr=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,p=Math.imul(se,me),u=Math.imul(se,be),u=u+Math.imul(ue,me)|0,w=Math.imul(ue,be),p=p+Math.imul(oe,we)|0,u=u+Math.imul(oe,_e)|0,u=u+Math.imul(fe,we)|0,w=w+Math.imul(fe,_e)|0,p=p+Math.imul(ne,xe)|0,u=u+Math.imul(ne,Me)|0,u=u+Math.imul(ae,xe)|0,w=w+Math.imul(ae,Me)|0,p=p+Math.imul(re,Ee)|0,u=u+Math.imul(re,Se)|0,u=u+Math.imul(ie,Ee)|0,w=w+Math.imul(ie,Se)|0,p=p+Math.imul(ee,Be)|0,u=u+Math.imul(ee,Ae)|0,u=u+Math.imul(te,Be)|0,w=w+Math.imul(te,Ae)|0,p=p+Math.imul(J,Re)|0,u=u+Math.imul(J,qe)|0,u=u+Math.imul(Q,Re)|0,w=w+Math.imul(Q,qe)|0;var Qr=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,p=Math.imul(se,we),u=Math.imul(se,_e),u=u+Math.imul(ue,we)|0,w=Math.imul(ue,_e),p=p+Math.imul(oe,xe)|0,u=u+Math.imul(oe,Me)|0,u=u+Math.imul(fe,xe)|0,w=w+Math.imul(fe,Me)|0,p=p+Math.imul(ne,Ee)|0,u=u+Math.imul(ne,Se)|0,u=u+Math.imul(ae,Ee)|0,w=w+Math.imul(ae,Se)|0,p=p+Math.imul(re,Be)|0,u=u+Math.imul(re,Ae)|0,u=u+Math.imul(ie,Be)|0,w=w+Math.imul(ie,Ae)|0,p=p+Math.imul(ee,Re)|0,u=u+Math.imul(ee,qe)|0,u=u+Math.imul(te,Re)|0,w=w+Math.imul(te,qe)|0;var ei=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(ei>>>26)|0,ei&=67108863,p=Math.imul(se,xe),u=Math.imul(se,Me),u=u+Math.imul(ue,xe)|0,w=Math.imul(ue,Me),p=p+Math.imul(oe,Ee)|0,u=u+Math.imul(oe,Se)|0,u=u+Math.imul(fe,Ee)|0,w=w+Math.imul(fe,Se)|0,p=p+Math.imul(ne,Be)|0,u=u+Math.imul(ne,Ae)|0,u=u+Math.imul(ae,Be)|0,w=w+Math.imul(ae,Ae)|0,p=p+Math.imul(re,Re)|0,u=u+Math.imul(re,qe)|0,u=u+Math.imul(ie,Re)|0,w=w+Math.imul(ie,qe)|0;var ti=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(ti>>>26)|0,ti&=67108863,p=Math.imul(se,Ee),u=Math.imul(se,Se),u=u+Math.imul(ue,Ee)|0,w=Math.imul(ue,Se),p=p+Math.imul(oe,Be)|0,u=u+Math.imul(oe,Ae)|0,u=u+Math.imul(fe,Be)|0,w=w+Math.imul(fe,Ae)|0,p=p+Math.imul(ne,Re)|0,u=u+Math.imul(ne,qe)|0,u=u+Math.imul(ae,Re)|0,w=w+Math.imul(ae,qe)|0;var ri=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(ri>>>26)|0,ri&=67108863,p=Math.imul(se,Be),u=Math.imul(se,Ae),u=u+Math.imul(ue,Be)|0,w=Math.imul(ue,Ae),p=p+Math.imul(oe,Re)|0,u=u+Math.imul(oe,qe)|0,u=u+Math.imul(fe,Re)|0,w=w+Math.imul(fe,qe)|0;var ii=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(ii>>>26)|0,ii&=67108863,p=Math.imul(se,Re),u=Math.imul(se,qe),u=u+Math.imul(ue,Re)|0,w=Math.imul(ue,qe);var ni=(g+p|0)+((u&8191)<<13)|0;return g=(w+(u>>>13)|0)+(ni>>>26)|0,ni&=67108863,d[0]=Li,d[1]=Ge,d[2]=Ve,d[3]=Kr,d[4]=Wr,d[5]=zr,d[6]=Gr,d[7]=Vr,d[8]=$r,d[9]=Zr,d[10]=Yr,d[11]=Xr,d[12]=Jr,d[13]=Qr,d[14]=ei,d[15]=ti,d[16]=ri,d[17]=ii,d[18]=ni,g!==0&&(d[19]=g,l.length++),l};Math.imul||(j=C);function V(M,h,y){y.negative=h.negative^M.negative,y.length=M.length+h.length;for(var l=0,o=0,s=0;s<y.length-1;s++){var d=o;o=0;for(var g=l&67108863,p=Math.min(s,h.length-1),u=Math.max(0,s-M.length+1);u<=p;u++){var w=s-u,_=M.words[w]|0,c=h.words[u]|0,x=_*c,P=x&67108863;d=d+(x/67108864|0)|0,P=P+g|0,g=P&67108863,d=d+(P>>>26)|0,o+=d>>>26,d&=67108863}y.words[s]=g,l=d,d=o}return l!==0?y.words[s]=l:y.length--,y.strip()}function X(M,h,y){var l=new z;return l.mulp(M,h,y)}n.prototype.mulTo=function(h,y){var l,o=this.length+h.length;return this.length===10&&h.length===10?l=j(this,h,y):o<63?l=C(this,h,y):o<1024?l=V(this,h,y):l=X(this,h,y),l};function z(M,h){this.x=M,this.y=h}z.prototype.makeRBT=function(h){for(var y=new Array(h),l=n.prototype._countBits(h)-1,o=0;o<h;o++)y[o]=this.revBin(o,l,h);return y},z.prototype.revBin=function(h,y,l){if(h===0||h===l-1)return h;for(var o=0,s=0;s<y;s++)o|=(h&1)<<y-s-1,h>>=1;return o},z.prototype.permute=function(h,y,l,o,s,d){for(var g=0;g<d;g++)o[g]=y[h[g]],s[g]=l[h[g]]},z.prototype.transform=function(h,y,l,o,s,d){this.permute(d,h,y,l,o,s);for(var g=1;g<s;g<<=1)for(var p=g<<1,u=Math.cos(2*Math.PI/p),w=Math.sin(2*Math.PI/p),_=0;_<s;_+=p)for(var c=u,x=w,P=0;P<g;P++){var N=l[_+P],U=o[_+P],W=l[_+P+g],K=o[_+P+g],G=c*W-x*K;K=c*K+x*W,W=G,l[_+P]=N+W,o[_+P]=U+K,l[_+P+g]=N-W,o[_+P+g]=U-K,P!==p&&(G=u*c-w*x,x=u*x+w*c,c=G)}},z.prototype.guessLen13b=function(h,y){var l=Math.max(y,h)|1,o=l&1,s=0;for(l=l/2|0;l;l=l>>>1)s++;return 1<<s+1+o},z.prototype.conjugate=function(h,y,l){if(!(l<=1))for(var o=0;o<l/2;o++){var s=h[o];h[o]=h[l-o-1],h[l-o-1]=s,s=y[o],y[o]=-y[l-o-1],y[l-o-1]=-s}},z.prototype.normalize13b=function(h,y){for(var l=0,o=0;o<y/2;o++){var s=Math.round(h[2*o+1]/y)*8192+Math.round(h[2*o]/y)+l;h[o]=s&67108863,s<67108864?l=0:l=s/67108864|0}return h},z.prototype.convert13b=function(h,y,l,o){for(var s=0,d=0;d<y;d++)s=s+(h[d]|0),l[2*d]=s&8191,s=s>>>13,l[2*d+1]=s&8191,s=s>>>13;for(d=2*y;d<o;++d)l[d]=0;r(s===0),r((s&-8192)===0)},z.prototype.stub=function(h){for(var y=new Array(h),l=0;l<h;l++)y[l]=0;return y},z.prototype.mulp=function(h,y,l){var o=2*this.guessLen13b(h.length,y.length),s=this.makeRBT(o),d=this.stub(o),g=new Array(o),p=new Array(o),u=new Array(o),w=new Array(o),_=new Array(o),c=new Array(o),x=l.words;x.length=o,this.convert13b(h.words,h.length,g,o),this.convert13b(y.words,y.length,w,o),this.transform(g,d,p,u,o,s),this.transform(w,d,_,c,o,s);for(var P=0;P<o;P++){var N=p[P]*_[P]-u[P]*c[P];u[P]=p[P]*c[P]+u[P]*_[P],p[P]=N}return this.conjugate(p,u,o),this.transform(p,u,x,d,o,s),this.conjugate(x,d,o),this.normalize13b(x,o),l.negative=h.negative^y.negative,l.length=h.length+y.length,l.strip()},n.prototype.mul=function(h){var y=new n(null);return y.words=new Array(this.length+h.length),this.mulTo(h,y)},n.prototype.mulf=function(h){var y=new n(null);return y.words=new Array(this.length+h.length),X(this,h,y)},n.prototype.imul=function(h){return this.clone().mulTo(h,this)},n.prototype.imuln=function(h){r(typeof h=="number"),r(h<67108864);for(var y=0,l=0;l<this.length;l++){var o=(this.words[l]|0)*h,s=(o&67108863)+(y&67108863);y>>=26,y+=o/67108864|0,y+=s>>>26,this.words[l]=s&67108863}return y!==0&&(this.words[l]=y,this.length++),this.length=h===0?1:this.length,this},n.prototype.muln=function(h){return this.clone().imuln(h)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(h){var y=I(h);if(y.length===0)return new n(1);for(var l=this,o=0;o<y.length&&y[o]===0;o++,l=l.sqr());if(++o<y.length)for(var s=l.sqr();o<y.length;o++,s=s.sqr())y[o]!==0&&(l=l.mul(s));return l},n.prototype.iushln=function(h){r(typeof h=="number"&&h>=0);var y=h%26,l=(h-y)/26,o=67108863>>>26-y<<26-y,s;if(y!==0){var d=0;for(s=0;s<this.length;s++){var g=this.words[s]&o,p=(this.words[s]|0)-g<<y;this.words[s]=p|d,d=g>>>26-y}d&&(this.words[s]=d,this.length++)}if(l!==0){for(s=this.length-1;s>=0;s--)this.words[s+l]=this.words[s];for(s=0;s<l;s++)this.words[s]=0;this.length+=l}return this.strip()},n.prototype.ishln=function(h){return r(this.negative===0),this.iushln(h)},n.prototype.iushrn=function(h,y,l){r(typeof h=="number"&&h>=0);var o;y?o=(y-y%26)/26:o=0;var s=h%26,d=Math.min((h-s)/26,this.length),g=67108863^67108863>>>s<<s,p=l;if(o-=d,o=Math.max(0,o),p){for(var u=0;u<d;u++)p.words[u]=this.words[u];p.length=d}if(d!==0)if(this.length>d)for(this.length-=d,u=0;u<this.length;u++)this.words[u]=this.words[u+d];else this.words[0]=0,this.length=1;var w=0;for(u=this.length-1;u>=0&&(w!==0||u>=o);u--){var _=this.words[u]|0;this.words[u]=w<<26-s|_>>>s,w=_&g}return p&&w!==0&&(p.words[p.length++]=w),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(h,y,l){return r(this.negative===0),this.iushrn(h,y,l)},n.prototype.shln=function(h){return this.clone().ishln(h)},n.prototype.ushln=function(h){return this.clone().iushln(h)},n.prototype.shrn=function(h){return this.clone().ishrn(h)},n.prototype.ushrn=function(h){return this.clone().iushrn(h)},n.prototype.testn=function(h){r(typeof h=="number"&&h>=0);var y=h%26,l=(h-y)/26,o=1<<y;if(this.length<=l)return!1;var s=this.words[l];return!!(s&o)},n.prototype.imaskn=function(h){r(typeof h=="number"&&h>=0);var y=h%26,l=(h-y)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(y!==0&&l++,this.length=Math.min(l,this.length),y!==0){var o=67108863^67108863>>>y<<y;this.words[this.length-1]&=o}return this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.maskn=function(h){return this.clone().imaskn(h)},n.prototype.iaddn=function(h){return r(typeof h=="number"),r(h<67108864),h<0?this.isubn(-h):this.negative!==0?this.length===1&&(this.words[0]|0)<h?(this.words[0]=h-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(h),this.negative=1,this):this._iaddn(h)},n.prototype._iaddn=function(h){this.words[0]+=h;for(var y=0;y<this.length&&this.words[y]>=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},n.prototype.isubn=function(h){if(r(typeof h=="number"),r(h<67108864),h<0)return this.iaddn(-h);if(this.negative!==0)return this.negative=0,this.iaddn(h),this.negative=1,this;if(this.words[0]-=h,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y<this.length&&this.words[y]<0;y++)this.words[y]+=67108864,this.words[y+1]-=1;return this.strip()},n.prototype.addn=function(h){return this.clone().iaddn(h)},n.prototype.subn=function(h){return this.clone().isubn(h)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(h,y,l){var o=h.length+l,s;this._expand(o);var d,g=0;for(s=0;s<h.length;s++){d=(this.words[s+l]|0)+g;var p=(h.words[s]|0)*y;d-=p&67108863,g=(d>>26)-(p/67108864|0),this.words[s+l]=d&67108863}for(;s<this.length-l;s++)d=(this.words[s+l]|0)+g,g=d>>26,this.words[s+l]=d&67108863;if(g===0)return this.strip();for(r(g===-1),g=0,s=0;s<this.length;s++)d=-(this.words[s]|0)+g,g=d>>26,this.words[s]=d&67108863;return this.negative=1,this.strip()},n.prototype._wordDiv=function(h,y){var l=this.length-h.length,o=this.clone(),s=h,d=s.words[s.length-1]|0,g=this._countBits(d);l=26-g,l!==0&&(s=s.ushln(l),o.iushln(l),d=s.words[s.length-1]|0);var p=o.length-s.length,u;if(y!=="mod"){u=new n(null),u.length=p+1,u.words=new Array(u.length);for(var w=0;w<u.length;w++)u.words[w]=0}var _=o.clone()._ishlnsubmul(s,1,p);_.negative===0&&(o=_,u&&(u.words[p]=1));for(var c=p-1;c>=0;c--){var x=(o.words[s.length+c]|0)*67108864+(o.words[s.length+c-1]|0);for(x=Math.min(x/d|0,67108863),o._ishlnsubmul(s,x,c);o.negative!==0;)x--,o.negative=0,o._ishlnsubmul(s,1,c),o.isZero()||(o.negative^=1);u&&(u.words[c]=x)}return u&&u.strip(),o.strip(),y!=="div"&&l!==0&&o.iushrn(l),{div:u||null,mod:o}},n.prototype.divmod=function(h,y,l){if(r(!h.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var o,s,d;return this.negative!==0&&h.negative===0?(d=this.neg().divmod(h,y),y!=="mod"&&(o=d.div.neg()),y!=="div"&&(s=d.mod.neg(),l&&s.negative!==0&&s.iadd(h)),{div:o,mod:s}):this.negative===0&&h.negative!==0?(d=this.divmod(h.neg(),y),y!=="mod"&&(o=d.div.neg()),{div:o,mod:d.mod}):(this.negative&h.negative)!==0?(d=this.neg().divmod(h.neg(),y),y!=="div"&&(s=d.mod.neg(),l&&s.negative!==0&&s.isub(h)),{div:d.div,mod:s}):h.length>this.length||this.cmp(h)<0?{div:new n(0),mod:this}:h.length===1?y==="div"?{div:this.divn(h.words[0]),mod:null}:y==="mod"?{div:null,mod:new n(this.modn(h.words[0]))}:{div:this.divn(h.words[0]),mod:new n(this.modn(h.words[0]))}:this._wordDiv(h,y)},n.prototype.div=function(h){return this.divmod(h,"div",!1).div},n.prototype.mod=function(h){return this.divmod(h,"mod",!1).mod},n.prototype.umod=function(h){return this.divmod(h,"mod",!0).mod},n.prototype.divRound=function(h){var y=this.divmod(h);if(y.mod.isZero())return y.div;var l=y.div.negative!==0?y.mod.isub(h):y.mod,o=h.ushrn(1),s=h.andln(1),d=l.cmp(o);return d<0||s===1&&d===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},n.prototype.modn=function(h){r(h<=67108863);for(var y=(1<<26)%h,l=0,o=this.length-1;o>=0;o--)l=(y*l+(this.words[o]|0))%h;return l},n.prototype.idivn=function(h){r(h<=67108863);for(var y=0,l=this.length-1;l>=0;l--){var o=(this.words[l]|0)+y*67108864;this.words[l]=o/h|0,y=o%h}return this.strip()},n.prototype.divn=function(h){return this.clone().idivn(h)},n.prototype.egcd=function(h){r(h.negative===0),r(!h.isZero());var y=this,l=h.clone();y.negative!==0?y=y.umod(h):y=y.clone();for(var o=new n(1),s=new n(0),d=new n(0),g=new n(1),p=0;y.isEven()&&l.isEven();)y.iushrn(1),l.iushrn(1),++p;for(var u=l.clone(),w=y.clone();!y.isZero();){for(var _=0,c=1;(y.words[0]&c)===0&&_<26;++_,c<<=1);if(_>0)for(y.iushrn(_);_-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(u),s.isub(w)),o.iushrn(1),s.iushrn(1);for(var x=0,P=1;(l.words[0]&P)===0&&x<26;++x,P<<=1);if(x>0)for(l.iushrn(x);x-- >0;)(d.isOdd()||g.isOdd())&&(d.iadd(u),g.isub(w)),d.iushrn(1),g.iushrn(1);y.cmp(l)>=0?(y.isub(l),o.isub(d),s.isub(g)):(l.isub(y),d.isub(o),g.isub(s))}return{a:d,b:g,gcd:l.iushln(p)}},n.prototype._invmp=function(h){r(h.negative===0),r(!h.isZero());var y=this,l=h.clone();y.negative!==0?y=y.umod(h):y=y.clone();for(var o=new n(1),s=new n(0),d=l.clone();y.cmpn(1)>0&&l.cmpn(1)>0;){for(var g=0,p=1;(y.words[0]&p)===0&&g<26;++g,p<<=1);if(g>0)for(y.iushrn(g);g-- >0;)o.isOdd()&&o.iadd(d),o.iushrn(1);for(var u=0,w=1;(l.words[0]&w)===0&&u<26;++u,w<<=1);if(u>0)for(l.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(d),s.iushrn(1);y.cmp(l)>=0?(y.isub(l),o.isub(s)):(l.isub(y),s.isub(o))}var _;return y.cmpn(1)===0?_=o:_=s,_.cmpn(0)<0&&_.iadd(h),_},n.prototype.gcd=function(h){if(this.isZero())return h.abs();if(h.isZero())return this.abs();var y=this.clone(),l=h.clone();y.negative=0,l.negative=0;for(var o=0;y.isEven()&&l.isEven();o++)y.iushrn(1),l.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;l.isEven();)l.iushrn(1);var s=y.cmp(l);if(s<0){var d=y;y=l,l=d}else if(s===0||l.cmpn(1)===0)break;y.isub(l)}while(!0);return l.iushln(o)},n.prototype.invm=function(h){return this.egcd(h).a.umod(h)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(h){return this.words[0]&h},n.prototype.bincn=function(h){r(typeof h=="number");var y=h%26,l=(h-y)/26,o=1<<y;if(this.length<=l)return this._expand(l+1),this.words[l]|=o,this;for(var s=o,d=l;s!==0&&d<this.length;d++){var g=this.words[d]|0;g+=s,s=g>>>26,g&=67108863,this.words[d]=g}return s!==0&&(this.words[d]=s,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(h){var y=h<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this.strip();var l;if(this.length>1)l=1;else{y&&(h=-h),r(h<=67108863,"Number is too big");var o=this.words[0]|0;l=o===h?0:o<h?-1:1}return this.negative!==0?-l|0:l},n.prototype.cmp=function(h){if(this.negative!==0&&h.negative===0)return-1;if(this.negative===0&&h.negative!==0)return 1;var y=this.ucmp(h);return this.negative!==0?-y|0:y},n.prototype.ucmp=function(h){if(this.length>h.length)return 1;if(this.length<h.length)return-1;for(var y=0,l=this.length-1;l>=0;l--){var o=this.words[l]|0,s=h.words[l]|0;if(o!==s){o<s?y=-1:o>s&&(y=1);break}}return y},n.prototype.gtn=function(h){return this.cmpn(h)===1},n.prototype.gt=function(h){return this.cmp(h)===1},n.prototype.gten=function(h){return this.cmpn(h)>=0},n.prototype.gte=function(h){return this.cmp(h)>=0},n.prototype.ltn=function(h){return this.cmpn(h)===-1},n.prototype.lt=function(h){return this.cmp(h)===-1},n.prototype.lten=function(h){return this.cmpn(h)<=0},n.prototype.lte=function(h){return this.cmp(h)<=0},n.prototype.eqn=function(h){return this.cmpn(h)===0},n.prototype.eq=function(h){return this.cmp(h)===0},n.red=function(h){return new F(h)},n.prototype.toRed=function(h){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),h.convertTo(this)._forceRed(h)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(h){return this.red=h,this},n.prototype.forceRed=function(h){return r(!this.red,"Already a number in reduction context"),this._forceRed(h)},n.prototype.redAdd=function(h){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,h)},n.prototype.redIAdd=function(h){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,h)},n.prototype.redSub=function(h){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,h)},n.prototype.redISub=function(h){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,h)},n.prototype.redShl=function(h){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,h)},n.prototype.redMul=function(h){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.mul(this,h)},n.prototype.redIMul=function(h){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.imul(this,h)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(h){return r(this.red&&!h.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,h)};var $={k256:null,p224:null,p192:null,p25519:null};function Le(M,h){this.name=M,this.p=new n(h,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Le.prototype._tmp=function(){var h=new n(null);return h.words=new Array(Math.ceil(this.n/13)),h},Le.prototype.ireduce=function(h){var y=h,l;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),l=y.bitLength();while(l>this.n);var o=l<this.n?-1:y.ucmp(this.p);return o===0?(y.words[0]=0,y.length=1):o>0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},Le.prototype.split=function(h,y){h.iushrn(this.n,0,y)},Le.prototype.imulK=function(h){return h.imul(this.k)};function k(){Le.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(k,Le),k.prototype.split=function(h,y){for(var l=4194303,o=Math.min(h.length,9),s=0;s<o;s++)y.words[s]=h.words[s];if(y.length=o,h.length<=9){h.words[0]=0,h.length=1;return}var d=h.words[9];for(y.words[y.length++]=d&l,s=10;s<h.length;s++){var g=h.words[s]|0;h.words[s-10]=(g&l)<<4|d>>>22,d=g}d>>>=22,h.words[s-10]=d,d===0&&h.length>10?h.length-=10:h.length-=9},k.prototype.imulK=function(h){h.words[h.length]=0,h.words[h.length+1]=0,h.length+=2;for(var y=0,l=0;l<h.length;l++){var o=h.words[l]|0;y+=o*977,h.words[l]=y&67108863,y=o*64+(y/67108864|0)}return h.words[h.length-1]===0&&(h.length--,h.words[h.length-1]===0&&h.length--),h};function O(){Le.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(O,Le);function D(){Le.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(D,Le);function L(){Le.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(L,Le),L.prototype.imulK=function(h){for(var y=0,l=0;l<h.length;l++){var o=(h.words[l]|0)*19+y,s=o&67108863;o>>>=26,h.words[l]=s,y=o}return y!==0&&(h.words[h.length++]=y),h},n._prime=function(h){if($[h])return $[h];var y;if(h==="k256")y=new k;else if(h==="p224")y=new O;else if(h==="p192")y=new D;else if(h==="p25519")y=new L;else throw new Error("Unknown prime "+h);return $[h]=y,y};function F(M){if(typeof M=="string"){var h=n._prime(M);this.m=h.p,this.prime=h}else r(M.gtn(1),"modulus must be greater than 1"),this.m=M,this.prime=null}F.prototype._verify1=function(h){r(h.negative===0,"red works only with positives"),r(h.red,"red works only with red numbers")},F.prototype._verify2=function(h,y){r((h.negative|y.negative)===0,"red works only with positives"),r(h.red&&h.red===y.red,"red works only with red numbers")},F.prototype.imod=function(h){return this.prime?this.prime.ireduce(h)._forceRed(this):h.umod(this.m)._forceRed(this)},F.prototype.neg=function(h){return h.isZero()?h.clone():this.m.sub(h)._forceRed(this)},F.prototype.add=function(h,y){this._verify2(h,y);var l=h.add(y);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},F.prototype.iadd=function(h,y){this._verify2(h,y);var l=h.iadd(y);return l.cmp(this.m)>=0&&l.isub(this.m),l},F.prototype.sub=function(h,y){this._verify2(h,y);var l=h.sub(y);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},F.prototype.isub=function(h,y){this._verify2(h,y);var l=h.isub(y);return l.cmpn(0)<0&&l.iadd(this.m),l},F.prototype.shl=function(h,y){return this._verify1(h),this.imod(h.ushln(y))},F.prototype.imul=function(h,y){return this._verify2(h,y),this.imod(h.imul(y))},F.prototype.mul=function(h,y){return this._verify2(h,y),this.imod(h.mul(y))},F.prototype.isqr=function(h){return this.imul(h,h.clone())},F.prototype.sqr=function(h){return this.mul(h,h)},F.prototype.sqrt=function(h){if(h.isZero())return h.clone();var y=this.m.andln(3);if(r(y%2===1),y===3){var l=this.m.add(new n(1)).iushrn(2);return this.pow(h,l)}for(var o=this.m.subn(1),s=0;!o.isZero()&&o.andln(1)===0;)s++,o.iushrn(1);r(!o.isZero());var d=new n(1).toRed(this),g=d.redNeg(),p=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new n(2*u*u).toRed(this);this.pow(u,p).cmp(g)!==0;)u.redIAdd(g);for(var w=this.pow(u,o),_=this.pow(h,o.addn(1).iushrn(1)),c=this.pow(h,o),x=s;c.cmp(d)!==0;){for(var P=c,N=0;P.cmp(d)!==0;N++)P=P.redSqr();r(N<x);var U=this.pow(w,new n(1).iushln(x-N-1));_=_.redMul(U),w=U.redSqr(),c=c.redMul(w),x=N}return _},F.prototype.invm=function(h){var y=h._invmp(this.m);return y.negative!==0?(y.negative=0,this.imod(y).redNeg()):this.imod(y)},F.prototype.pow=function(h,y){if(y.isZero())return new n(1).toRed(this);if(y.cmpn(1)===0)return h.clone();var l=4,o=new Array(1<<l);o[0]=new n(1).toRed(this),o[1]=h;for(var s=2;s<o.length;s++)o[s]=this.mul(o[s-1],h);var d=o[0],g=0,p=0,u=y.bitLength()%26;for(u===0&&(u=26),s=y.length-1;s>=0;s--){for(var w=y.words[s],_=u-1;_>=0;_--){var c=w>>_&1;if(d!==o[0]&&(d=this.sqr(d)),c===0&&g===0){p=0;continue}g<<=1,g|=c,p++,!(p!==l&&(s!==0||_!==0))&&(d=this.mul(d,o[g]),p=0,g=0)}u=26}return d},F.prototype.convertTo=function(h){var y=h.umod(this.m);return y===h?y.clone():y},F.prototype.convertFrom=function(h){var y=h.clone();return y.red=null,y},n.mont=function(h){return new H(h)};function H(M){F.call(this,M),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(H,F),H.prototype.convertTo=function(h){return this.imod(h.ushln(this.shift))},H.prototype.convertFrom=function(h){var y=this.imod(h.mul(this.rinv));return y.red=null,y},H.prototype.imul=function(h,y){if(h.isZero()||y.isZero())return h.words[0]=0,h.length=1,h;var l=h.imul(y),o=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=l.isub(o).iushrn(this.shift),d=s;return s.cmp(this.m)>=0?d=s.isub(this.m):s.cmpn(0)<0&&(d=s.iadd(this.m)),d._forceRed(this)},H.prototype.mul=function(h,y){if(h.isZero()||y.isZero())return new n(0)._forceRed(this);var l=h.mul(y),o=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=l.isub(o).iushrn(this.shift),d=s;return s.cmp(this.m)>=0?d=s.isub(this.m):s.cmpn(0)<0&&(d=s.iadd(this.m)),d._forceRed(this)},H.prototype.invm=function(h){var y=this.imod(h._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof ps>"u"||ps,Ql)});var Ie=R((vs,t0)=>{b();var to=ft(),Zt=to.Buffer;function e0(t,e){for(var r in t)e[r]=t[r]}Zt.from&&Zt.alloc&&Zt.allocUnsafe&&Zt.allocUnsafeSlow?t0.exports=to:(e0(to,vs),vs.Buffer=si);function si(t,e,r){return Zt(t,e,r)}si.prototype=Object.create(Zt.prototype);e0(Zt,si);si.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Zt(t,e,r)};si.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Zt(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};si.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Zt(t)};si.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return to.SlowBuffer(t)}});var ui=R((t7,gs)=>{"use strict";b();var ys=65536,C2=4294967295;function O2(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
2
|
-
Use Chrome, Firefox or Internet Explorer 11`)}var P2=Ie().Buffer,ro=globalThis.crypto||globalThis.msCrypto;ro&&ro.getRandomValues?gs.exports=D2:gs.exports=O2;function D2(t,e){if(t>C2)throw new RangeError("requested too many random bytes");var r=P2.allocUnsafe(t);if(t>0)if(t>ys)for(var i=0;i<t;i+=ys)ro.getRandomValues(r.slice(i,i+ys));else ro.getRandomValues(r);return typeof e=="function"?S.default.nextTick(function(){e(null,r)}):r}});var He=R((i7,ms)=>{b();typeof Object.create=="function"?ms.exports=function(e,r){e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:ms.exports=function(e,r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}});var Gi=R((a7,bs)=>{"use strict";b();var zi=typeof Reflect=="object"?Reflect:null,r0=zi&&typeof zi.apply=="function"?zi.apply:function(e,r,i){return Function.prototype.apply.call(e,r,i)},io;zi&&typeof zi.ownKeys=="function"?io=zi.ownKeys:Object.getOwnPropertySymbols?io=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:io=function(e){return Object.getOwnPropertyNames(e)};function U2(t){console&&console.warn&&console.warn(t)}var n0=Number.isNaN||function(e){return e!==e};function Fe(){Fe.init.call(this)}bs.exports=Fe;bs.exports.once=j2;Fe.EventEmitter=Fe;Fe.prototype._events=void 0;Fe.prototype._eventsCount=0;Fe.prototype._maxListeners=void 0;var i0=10;function no(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(Fe,"defaultMaxListeners",{enumerable:!0,get:function(){return i0},set:function(t){if(typeof t!="number"||t<0||n0(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");i0=t}});Fe.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};Fe.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||n0(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function a0(t){return t._maxListeners===void 0?Fe.defaultMaxListeners:t._maxListeners}Fe.prototype.getMaxListeners=function(){return a0(this)};Fe.prototype.emit=function(e){for(var r=[],i=1;i<arguments.length;i++)r.push(arguments[i]);var n=e==="error",a=this._events;if(a!==void 0)n=n&&a.error===void 0;else if(!n)return!1;if(n){var f;if(r.length>0&&(f=r[0]),f instanceof Error)throw f;var v=new Error("Unhandled error."+(f?" ("+f.message+")":""));throw v.context=f,v}var m=a[e];if(m===void 0)return!1;if(typeof m=="function")r0(m,this,r);else for(var E=m.length,A=h0(m,E),i=0;i<E;++i)r0(A[i],this,r);return!0};function o0(t,e,r,i){var n,a,f;if(no(r),a=t._events,a===void 0?(a=t._events=Object.create(null),t._eventsCount=0):(a.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),a=t._events),f=a[e]),f===void 0)f=a[e]=r,++t._eventsCount;else if(typeof f=="function"?f=a[e]=i?[r,f]:[f,r]:i?f.unshift(r):f.push(r),n=a0(t),n>0&&f.length>n&&!f.warned){f.warned=!0;var v=new Error("Possible EventEmitter memory leak detected. "+f.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");v.name="MaxListenersExceededWarning",v.emitter=t,v.type=e,v.count=f.length,U2(v)}return t}Fe.prototype.addListener=function(e,r){return o0(this,e,r,!1)};Fe.prototype.on=Fe.prototype.addListener;Fe.prototype.prependListener=function(e,r){return o0(this,e,r,!0)};function N2(){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 f0(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=N2.bind(i);return n.listener=r,i.wrapFn=n,n}Fe.prototype.once=function(e,r){return no(r),this.on(e,f0(this,e,r)),this};Fe.prototype.prependOnceListener=function(e,r){return no(r),this.prependListener(e,f0(this,e,r)),this};Fe.prototype.removeListener=function(e,r){var i,n,a,f,v;if(no(r),n=this._events,n===void 0)return this;if(i=n[e],i===void 0)return this;if(i===r||i.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||r));else if(typeof i!="function"){for(a=-1,f=i.length-1;f>=0;f--)if(i[f]===r||i[f].listener===r){v=i[f].listener,a=f;break}if(a<0)return this;a===0?i.shift():L2(i,a),i.length===1&&(n[e]=i[0]),n.removeListener!==void 0&&this.emit("removeListener",e,v||r)}return this};Fe.prototype.off=Fe.prototype.removeListener;Fe.prototype.removeAllListeners=function(e){var r,i,n;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[e]),this;if(arguments.length===0){var a=Object.keys(i),f;for(n=0;n<a.length;++n)f=a[n],f!=="removeListener"&&this.removeAllListeners(f);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=i[e],typeof r=="function")this.removeListener(e,r);else if(r!==void 0)for(n=r.length-1;n>=0;n--)this.removeListener(e,r[n]);return this};function s0(t,e,r){var i=t._events;if(i===void 0)return[];var n=i[e];return n===void 0?[]:typeof n=="function"?r?[n.listener||n]:[n]:r?F2(n):h0(n,n.length)}Fe.prototype.listeners=function(e){return s0(this,e,!0)};Fe.prototype.rawListeners=function(e){return s0(this,e,!1)};Fe.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):u0.call(t,e)};Fe.prototype.listenerCount=u0;function u0(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Fe.prototype.eventNames=function(){return this._eventsCount>0?io(this._events):[]};function h0(t,e){for(var r=new Array(e),i=0;i<e;++i)r[i]=t[i];return r}function L2(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function F2(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function j2(t,e){return new Promise(function(r,i){function n(f){t.removeListener(e,a),i(f)}function a(){typeof t.removeListener=="function"&&t.removeListener("error",n),r([].slice.call(arguments))}l0(t,e,a,{once:!0}),e!=="error"&&H2(t,n,{once:!0})})}function H2(t,e,r){typeof t.on=="function"&&l0(t,"error",e,r)}function l0(t,e,r,i){if(typeof t.on=="function")i.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function n(a){i.once&&t.removeEventListener(e,n),r(a)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}});var hi=R((f7,ws)=>{b();typeof Object.create=="function"?ws.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:ws.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var _s=R((u7,c0)=>{b();c0.exports=Gi().EventEmitter});var xs=R((l7,d0)=>{"use strict";b();d0.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),i=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;e[r]=n;for(var a in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var f=Object.getOwnPropertySymbols(e);if(f.length!==1||f[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var v=Object.getOwnPropertyDescriptor(e,r);if(v.value!==n||v.enumerable!==!0)return!1}return!0}});var Xn=R((d7,p0)=>{"use strict";b();var K2=xs();p0.exports=function(){return K2()&&!!Symbol.toStringTag}});var Ms=R((v7,v0)=>{"use strict";b();v0.exports=Object});var g0=R((g7,y0)=>{"use strict";b();y0.exports=Error});var b0=R((b7,m0)=>{"use strict";b();m0.exports=EvalError});var _0=R((_7,w0)=>{"use strict";b();w0.exports=RangeError});var M0=R((M7,x0)=>{"use strict";b();x0.exports=ReferenceError});var Es=R((S7,E0)=>{"use strict";b();E0.exports=SyntaxError});var li=R((A7,S0)=>{"use strict";b();S0.exports=TypeError});var A0=R((q7,B0)=>{"use strict";b();B0.exports=URIError});var q0=R((k7,R0)=>{"use strict";b();R0.exports=Math.abs});var k0=R((C7,I0)=>{"use strict";b();I0.exports=Math.floor});var C0=R((P7,T0)=>{"use strict";b();T0.exports=Math.max});var P0=R((U7,O0)=>{"use strict";b();O0.exports=Math.min});var U0=R((L7,D0)=>{"use strict";b();D0.exports=Math.pow});var L0=R((j7,N0)=>{"use strict";b();N0.exports=Math.round});var j0=R((K7,F0)=>{"use strict";b();F0.exports=Number.isNaN||function(e){return e!==e}});var K0=R((z7,H0)=>{"use strict";b();var W2=j0();H0.exports=function(e){return W2(e)||e===0?e:e<0?-1:1}});var z0=R((V7,W0)=>{"use strict";b();W0.exports=Object.getOwnPropertyDescriptor});var ci=R((Z7,G0)=>{"use strict";b();var ao=z0();if(ao)try{ao([],"length")}catch{ao=null}G0.exports=ao});var Jn=R((X7,V0)=>{"use strict";b();var oo=Object.defineProperty||!1;if(oo)try{oo({},"a",{value:1})}catch{oo=!1}V0.exports=oo});var Y0=R((Q7,Z0)=>{"use strict";b();var $0=typeof Symbol<"u"&&Symbol,z2=xs();Z0.exports=function(){return typeof $0!="function"||typeof Symbol!="function"||typeof $0("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:z2()}});var Ss=R((tA,X0)=>{"use strict";b();X0.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Bs=R((iA,J0)=>{"use strict";b();var G2=Ms();J0.exports=G2.getPrototypeOf||null});var tc=R((aA,ec)=>{"use strict";b();var V2="Function.prototype.bind called on incompatible ",$2=Object.prototype.toString,Z2=Math.max,Y2="[object Function]",Q0=function(e,r){for(var i=[],n=0;n<e.length;n+=1)i[n]=e[n];for(var a=0;a<r.length;a+=1)i[a+e.length]=r[a];return i},X2=function(e,r){for(var i=[],n=r||0,a=0;n<e.length;n+=1,a+=1)i[a]=e[n];return i},J2=function(t,e){for(var r="",i=0;i<t.length;i+=1)r+=t[i],i+1<t.length&&(r+=e);return r};ec.exports=function(e){var r=this;if(typeof r!="function"||$2.apply(r)!==Y2)throw new TypeError(V2+r);for(var i=X2(arguments,1),n,a=function(){if(this instanceof n){var A=r.apply(this,Q0(i,arguments));return Object(A)===A?A:this}return r.apply(e,Q0(i,arguments))},f=Z2(0,r.length-i.length),v=[],m=0;m<f;m++)v[m]="$"+m;if(n=Function("binder","return function ("+J2(v,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var E=function(){};E.prototype=r.prototype,n.prototype=new E,E.prototype=null}return n}});var Vi=R((fA,rc)=>{"use strict";b();var Q2=tc();rc.exports=Function.prototype.bind||Q2});var fo=R((uA,ic)=>{"use strict";b();ic.exports=Function.prototype.call});var so=R((lA,nc)=>{"use strict";b();nc.exports=Function.prototype.apply});var oc=R((dA,ac)=>{"use strict";b();ac.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var As=R((vA,fc)=>{"use strict";b();var ew=Vi(),tw=so(),rw=fo(),iw=oc();fc.exports=iw||ew.call(rw,tw)});var uo=R((gA,sc)=>{"use strict";b();var nw=Vi(),aw=li(),ow=fo(),fw=As();sc.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new aw("a function is required");return fw(nw,ow,e)}});var pc=R((bA,dc)=>{"use strict";b();var sw=uo(),uc=ci(),lc;try{lc=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var Rs=!!lc&&uc&&uc(Object.prototype,"__proto__"),cc=Object,hc=cc.getPrototypeOf;dc.exports=Rs&&typeof Rs.get=="function"?sw([Rs.get]):typeof hc=="function"?function(e){return hc(e==null?e:cc(e))}:!1});var ho=R((_A,mc)=>{"use strict";b();var vc=Ss(),yc=Bs(),gc=pc();mc.exports=vc?function(e){return vc(e)}:yc?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return yc(e)}:gc?function(e){return gc(e)}:null});var qs=R((MA,bc)=>{"use strict";b();var uw=Function.prototype.call,hw=Object.prototype.hasOwnProperty,lw=Vi();bc.exports=lw.call(uw,hw)});var Ts=R((SA,Sc)=>{"use strict";b();var Ce,cw=Ms(),dw=g0(),pw=b0(),vw=_0(),yw=M0(),Xi=Es(),Yi=li(),gw=A0(),mw=q0(),bw=k0(),ww=C0(),_w=P0(),xw=U0(),Mw=L0(),Ew=K0(),Mc=Function,Is=function(t){try{return Mc('"use strict"; return ('+t+").constructor;")()}catch{}},Qn=ci(),Sw=Jn(),ks=function(){throw new Yi},Bw=Qn?(function(){try{return arguments.callee,ks}catch{try{return Qn(arguments,"callee").get}catch{return ks}}})():ks,$i=Y0()(),it=ho(),Aw=Bs(),Rw=Ss(),Ec=so(),ea=fo(),Zi={},qw=typeof Uint8Array>"u"||!it?Ce:it(Uint8Array),di={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ce:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ce:ArrayBuffer,"%ArrayIteratorPrototype%":$i&&it?it([][Symbol.iterator]()):Ce,"%AsyncFromSyncIteratorPrototype%":Ce,"%AsyncFunction%":Zi,"%AsyncGenerator%":Zi,"%AsyncGeneratorFunction%":Zi,"%AsyncIteratorPrototype%":Zi,"%Atomics%":typeof Atomics>"u"?Ce:Atomics,"%BigInt%":typeof BigInt>"u"?Ce:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ce:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ce:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ce:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":dw,"%eval%":eval,"%EvalError%":pw,"%Float16Array%":typeof Float16Array>"u"?Ce:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Ce:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ce:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ce:FinalizationRegistry,"%Function%":Mc,"%GeneratorFunction%":Zi,"%Int8Array%":typeof Int8Array>"u"?Ce:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ce:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ce:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":$i&&it?it(it([][Symbol.iterator]())):Ce,"%JSON%":typeof JSON=="object"?JSON:Ce,"%Map%":typeof Map>"u"?Ce:Map,"%MapIteratorPrototype%":typeof Map>"u"||!$i||!it?Ce:it(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":cw,"%Object.getOwnPropertyDescriptor%":Qn,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ce:Promise,"%Proxy%":typeof Proxy>"u"?Ce:Proxy,"%RangeError%":vw,"%ReferenceError%":yw,"%Reflect%":typeof Reflect>"u"?Ce:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ce:Set,"%SetIteratorPrototype%":typeof Set>"u"||!$i||!it?Ce:it(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ce:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":$i&&it?it(""[Symbol.iterator]()):Ce,"%Symbol%":$i?Symbol:Ce,"%SyntaxError%":Xi,"%ThrowTypeError%":Bw,"%TypedArray%":qw,"%TypeError%":Yi,"%Uint8Array%":typeof Uint8Array>"u"?Ce:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ce:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ce:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ce:Uint32Array,"%URIError%":gw,"%WeakMap%":typeof WeakMap>"u"?Ce:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ce:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ce:WeakSet,"%Function.prototype.call%":ea,"%Function.prototype.apply%":Ec,"%Object.defineProperty%":Sw,"%Object.getPrototypeOf%":Aw,"%Math.abs%":mw,"%Math.floor%":bw,"%Math.max%":ww,"%Math.min%":_w,"%Math.pow%":xw,"%Math.round%":Mw,"%Math.sign%":Ew,"%Reflect.getPrototypeOf%":Rw};if(it)try{null.error}catch(t){wc=it(it(t)),di["%Error.prototype%"]=wc}var wc,Iw=function t(e){var r;if(e==="%AsyncFunction%")r=Is("async function () {}");else if(e==="%GeneratorFunction%")r=Is("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Is("async function* () {}");else if(e==="%AsyncGenerator%"){var i=t("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var n=t("%AsyncGenerator%");n&&it&&(r=it(n.prototype))}return di[e]=r,r},_c={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ta=Vi(),lo=qs(),kw=ta.call(ea,Array.prototype.concat),Tw=ta.call(Ec,Array.prototype.splice),xc=ta.call(ea,String.prototype.replace),co=ta.call(ea,String.prototype.slice),Cw=ta.call(ea,RegExp.prototype.exec),Ow=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Pw=/\\(\\)?/g,Dw=function(e){var r=co(e,0,1),i=co(e,-1);if(r==="%"&&i!=="%")throw new Xi("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&r!=="%")throw new Xi("invalid intrinsic syntax, expected opening `%`");var n=[];return xc(e,Ow,function(a,f,v,m){n[n.length]=v?xc(m,Pw,"$1"):f||a}),n},Uw=function(e,r){var i=e,n;if(lo(_c,i)&&(n=_c[i],i="%"+n[0]+"%"),lo(di,i)){var a=di[i];if(a===Zi&&(a=Iw(i)),typeof a>"u"&&!r)throw new Yi("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:a}}throw new Xi("intrinsic "+e+" does not exist!")};Sc.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Yi("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Yi('"allowMissing" argument must be a boolean');if(Cw(/^%?[^%]*%?$/,e)===null)throw new Xi("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=Dw(e),n=i.length>0?i[0]:"",a=Uw("%"+n+"%",r),f=a.name,v=a.value,m=!1,E=a.alias;E&&(n=E[0],Tw(i,kw([0,1],E)));for(var A=1,q=!0;A<i.length;A+=1){var I=i[A],C=co(I,0,1),j=co(I,-1);if((C==='"'||C==="'"||C==="`"||j==='"'||j==="'"||j==="`")&&C!==j)throw new Xi("property names with quotes must have matching quotes");if((I==="constructor"||!q)&&(m=!0),n+="."+I,f="%"+n+"%",lo(di,f))v=di[f];else if(v!=null){if(!(I in v)){if(!r)throw new Yi("base intrinsic for "+e+" exists, but the property is not available.");return}if(Qn&&A+1>=i.length){var V=Qn(v,I);q=!!V,q&&"get"in V&&!("originalValue"in V.get)?v=V.get:v=v[I]}else q=lo(v,I),v=v[I];q&&!m&&(di[f]=v)}}return v}});var pi=R((AA,Rc)=>{"use strict";b();var Bc=Ts(),Ac=uo(),Nw=Ac([Bc("%String.prototype.indexOf%")]);Rc.exports=function(e,r){var i=Bc(e,!!r);return typeof i=="function"&&Nw(e,".prototype.")>-1?Ac([i]):i}});var kc=R((qA,Ic)=>{"use strict";b();var Lw=Xn()(),Fw=pi(),Cs=Fw("Object.prototype.toString"),po=function(e){return Lw&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:Cs(e)==="[object Arguments]"},qc=function(e){return po(e)?!0:e!==null&&typeof e=="object"&&"length"in e&&typeof e.length=="number"&&e.length>=0&&Cs(e)!=="[object Array]"&&"callee"in e&&Cs(e.callee)==="[object Function]"},jw=(function(){return po(arguments)})();po.isLegacyArguments=qc;Ic.exports=jw?po:qc});var Uc=R((kA,Dc)=>{"use strict";b();var Tc=pi(),Hw=Xn()(),Kw=qs(),Ww=ci(),Ds;Hw?(Cc=Tc("RegExp.prototype.exec"),Os={},vo=function(){throw Os},Ps={toString:vo,valueOf:vo},typeof Symbol.toPrimitive=="symbol"&&(Ps[Symbol.toPrimitive]=vo),Ds=function(e){if(!e||typeof e!="object")return!1;var r=Ww(e,"lastIndex"),i=r&&Kw(r,"value");if(!i)return!1;try{Cc(e,Ps)}catch(n){return n===Os}}):(Oc=Tc("Object.prototype.toString"),Pc="[object RegExp]",Ds=function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:Oc(e)===Pc});var Cc,Os,vo,Ps,Oc,Pc;Dc.exports=Ds});var Lc=R((CA,Nc)=>{"use strict";b();var zw=pi(),Gw=Uc(),Vw=zw("RegExp.prototype.exec"),$w=li();Nc.exports=function(e){if(!Gw(e))throw new $w("`regex` must be a RegExp");return function(i){return Vw(e,i)!==null}}});var jc=R((PA,Fc)=>{"use strict";b();var Zw=function*(){}.constructor;Fc.exports=()=>Zw});var zc=R((UA,Wc)=>{"use strict";b();var Kc=pi(),Yw=Lc(),Xw=Yw(/^\s*(?:function)?\*/),Jw=Xn()(),Hc=ho(),Qw=Kc("Object.prototype.toString"),e_=Kc("Function.prototype.toString"),t_=jc();Wc.exports=function(e){if(typeof e!="function")return!1;if(Xw(e_(e)))return!0;if(!Jw){var r=Qw(e);return r==="[object GeneratorFunction]"}if(!Hc)return!1;var i=t_();return i&&Hc(e)===i.prototype}});var Zc=R((LA,$c)=>{"use strict";b();var Vc=Function.prototype.toString,Ji=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Ns,yo;if(typeof Ji=="function"&&typeof Object.defineProperty=="function")try{Ns=Object.defineProperty({},"length",{get:function(){throw yo}}),yo={},Ji(function(){throw 42},null,Ns)}catch(t){t!==yo&&(Ji=null)}else Ji=null;var r_=/^\s*class\b/,Ls=function(e){try{var r=Vc.call(e);return r_.test(r)}catch{return!1}},Us=function(e){try{return Ls(e)?!1:(Vc.call(e),!0)}catch{return!1}},go=Object.prototype.toString,i_="[object Object]",n_="[object Function]",a_="[object GeneratorFunction]",o_="[object HTMLAllCollection]",f_="[object HTML document.all class]",s_="[object HTMLCollection]",u_=typeof Symbol=="function"&&!!Symbol.toStringTag,h_=!(0 in[,]),Fs=function(){return!1};typeof document=="object"&&(Gc=document.all,go.call(Gc)===go.call(document.all)&&(Fs=function(e){if((h_||!e)&&(typeof e>"u"||typeof e=="object"))try{var r=go.call(e);return(r===o_||r===f_||r===s_||r===i_)&&e("")==null}catch{}return!1}));var Gc;$c.exports=Ji?function(e){if(Fs(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Ji(e,null,Ns)}catch(r){if(r!==yo)return!1}return!Ls(e)&&Us(e)}:function(e){if(Fs(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(u_)return Us(e);if(Ls(e))return!1;var r=go.call(e);return r!==n_&&r!==a_&&!/^\[object HTML/.test(r)?!1:Us(e)}});var Jc=R((jA,Xc)=>{"use strict";b();var l_=Zc(),c_=Object.prototype.toString,Yc=Object.prototype.hasOwnProperty,d_=function(e,r,i){for(var n=0,a=e.length;n<a;n++)Yc.call(e,n)&&(i==null?r(e[n],n,e):r.call(i,e[n],n,e))},p_=function(e,r,i){for(var n=0,a=e.length;n<a;n++)i==null?r(e.charAt(n),n,e):r.call(i,e.charAt(n),n,e)},v_=function(e,r,i){for(var n in e)Yc.call(e,n)&&(i==null?r(e[n],n,e):r.call(i,e[n],n,e))};function y_(t){return c_.call(t)==="[object Array]"}Xc.exports=function(e,r,i){if(!l_(r))throw new TypeError("iterator must be a function");var n;arguments.length>=3&&(n=i),y_(e)?d_(e,r,n):typeof e=="string"?p_(e,r,n):v_(e,r,n)}});var ed=R((KA,Qc)=>{"use strict";b();Qc.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var rd=R((zA,td)=>{"use strict";b();var js=ed(),g_=globalThis;td.exports=function(){for(var e=[],r=0;r<js.length;r++)typeof g_[js[r]]=="function"&&(e[e.length]=js[r]);return e}});var od=R((VA,ad)=>{"use strict";b();var id=Jn(),m_=Es(),Qi=li(),nd=ci();ad.exports=function(e,r,i){if(!e||typeof e!="object"&&typeof e!="function")throw new Qi("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Qi("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Qi("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Qi("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Qi("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Qi("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,v=arguments.length>6?arguments[6]:!1,m=!!nd&&nd(e,r);if(id)id(e,r,{configurable:f===null&&m?m.configurable:!f,enumerable:n===null&&m?m.enumerable:!n,value:i,writable:a===null&&m?m.writable:!a});else if(v||!n&&!a&&!f)e[r]=i;else throw new m_("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var ud=R((ZA,sd)=>{"use strict";b();var Hs=Jn(),fd=function(){return!!Hs};fd.hasArrayLengthDefineBug=function(){if(!Hs)return null;try{return Hs([],"length",{value:1}).length!==1}catch{return!0}};sd.exports=fd});var pd=R((XA,dd)=>{"use strict";b();var b_=Ts(),hd=od(),w_=ud()(),ld=ci(),cd=li(),__=b_("%Math.floor%");dd.exports=function(e,r){if(typeof e!="function")throw new cd("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||__(r)!==r)throw new cd("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,a=!0;if("length"in e&&ld){var f=ld(e,"length");f&&!f.configurable&&(n=!1),f&&!f.writable&&(a=!1)}return(n||a||!i)&&(w_?hd(e,"length",r,!0,!0):hd(e,"length",r)),e}});var yd=R((QA,vd)=>{"use strict";b();var x_=Vi(),M_=so(),E_=As();vd.exports=function(){return E_(x_,M_,arguments)}});var bd=R((t9,mo)=>{"use strict";b();var S_=pd(),gd=Jn(),B_=uo(),md=yd();mo.exports=function(e){var r=B_(arguments),i=1+e.length-(arguments.length-1);return S_(r,i>0?i:0,!0)};gd?gd(mo.exports,"apply",{value:md}):mo.exports.apply=md});var Gs=R((i9,Md)=>{"use strict";b();var _o=Jc(),A_=rd(),wd=bd(),Ws=pi(),wo=ci(),bo=ho(),R_=Ws("Object.prototype.toString"),xd=Xn()(),_d=globalThis,Ks=A_(),zs=Ws("String.prototype.slice"),q_=Ws("Array.prototype.indexOf",!0)||function(e,r){for(var i=0;i<e.length;i+=1)if(e[i]===r)return i;return-1},xo={__proto__:null};xd&&wo&&bo?_o(Ks,function(t){var e=new _d[t];if(Symbol.toStringTag in e&&bo){var r=bo(e),i=wo(r,Symbol.toStringTag);if(!i&&r){var n=bo(r);i=wo(n,Symbol.toStringTag)}if(i&&i.get){var a=wd(i.get);xo["$"+t]=a}}}):_o(Ks,function(t){var e=new _d[t],r=e.slice||e.set;if(r){var i=wd(r);xo["$"+t]=i}});var I_=function(e){var r=!1;return _o(xo,function(i,n){if(!r)try{"$"+i(e)===n&&(r=zs(n,1))}catch{}}),r},k_=function(e){var r=!1;return _o(xo,function(i,n){if(!r)try{i(e),r=zs(n,1)}catch{}}),r};Md.exports=function(e){if(!e||typeof e!="object")return!1;if(!xd){var r=zs(R_(e),8,-1);return q_(Ks,r)>-1?r:r!=="Object"?!1:k_(e)}return wo?I_(e):null}});var Vs=R((a9,Ed)=>{"use strict";b();var T_=Gs();Ed.exports=function(e){return!!T_(e)}});var Nd=R(Oe=>{"use strict";b();var C_=kc(),O_=zc(),kt=Gs(),Sd=Vs();function en(t){return t.call.bind(t)}var Bd=typeof BigInt<"u",Ad=typeof Symbol<"u",_t=en(Object.prototype.toString),P_=en(Number.prototype.valueOf),D_=en(String.prototype.valueOf),U_=en(Boolean.prototype.valueOf);Bd&&(Rd=en(BigInt.prototype.valueOf));var Rd;Ad&&(qd=en(Symbol.prototype.valueOf));var qd;function ia(t,e){if(typeof t!="object")return!1;try{return e(t),!0}catch{return!1}}Oe.isArgumentsObject=C_;Oe.isGeneratorFunction=O_;Oe.isTypedArray=Sd;function N_(t){return typeof Promise<"u"&&t instanceof Promise||t!==null&&typeof t=="object"&&typeof t.then=="function"&&typeof t.catch=="function"}Oe.isPromise=N_;function L_(t){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(t):Sd(t)||kd(t)}Oe.isArrayBufferView=L_;function F_(t){return kt(t)==="Uint8Array"}Oe.isUint8Array=F_;function j_(t){return kt(t)==="Uint8ClampedArray"}Oe.isUint8ClampedArray=j_;function H_(t){return kt(t)==="Uint16Array"}Oe.isUint16Array=H_;function K_(t){return kt(t)==="Uint32Array"}Oe.isUint32Array=K_;function W_(t){return kt(t)==="Int8Array"}Oe.isInt8Array=W_;function z_(t){return kt(t)==="Int16Array"}Oe.isInt16Array=z_;function G_(t){return kt(t)==="Int32Array"}Oe.isInt32Array=G_;function V_(t){return kt(t)==="Float32Array"}Oe.isFloat32Array=V_;function $_(t){return kt(t)==="Float64Array"}Oe.isFloat64Array=$_;function Z_(t){return kt(t)==="BigInt64Array"}Oe.isBigInt64Array=Z_;function Y_(t){return kt(t)==="BigUint64Array"}Oe.isBigUint64Array=Y_;function Mo(t){return _t(t)==="[object Map]"}Mo.working=typeof Map<"u"&&Mo(new Map);function X_(t){return typeof Map>"u"?!1:Mo.working?Mo(t):t instanceof Map}Oe.isMap=X_;function Eo(t){return _t(t)==="[object Set]"}Eo.working=typeof Set<"u"&&Eo(new Set);function J_(t){return typeof Set>"u"?!1:Eo.working?Eo(t):t instanceof Set}Oe.isSet=J_;function So(t){return _t(t)==="[object WeakMap]"}So.working=typeof WeakMap<"u"&&So(new WeakMap);function Q_(t){return typeof WeakMap>"u"?!1:So.working?So(t):t instanceof WeakMap}Oe.isWeakMap=Q_;function Zs(t){return _t(t)==="[object WeakSet]"}Zs.working=typeof WeakSet<"u"&&Zs(new WeakSet);function ex(t){return Zs(t)}Oe.isWeakSet=ex;function Bo(t){return _t(t)==="[object ArrayBuffer]"}Bo.working=typeof ArrayBuffer<"u"&&Bo(new ArrayBuffer);function Id(t){return typeof ArrayBuffer>"u"?!1:Bo.working?Bo(t):t instanceof ArrayBuffer}Oe.isArrayBuffer=Id;function Ao(t){return _t(t)==="[object DataView]"}Ao.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Ao(new DataView(new ArrayBuffer(1),0,1));function kd(t){return typeof DataView>"u"?!1:Ao.working?Ao(t):t instanceof DataView}Oe.isDataView=kd;var $s=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ra(t){return _t(t)==="[object SharedArrayBuffer]"}function Td(t){return typeof $s>"u"?!1:(typeof ra.working>"u"&&(ra.working=ra(new $s)),ra.working?ra(t):t instanceof $s)}Oe.isSharedArrayBuffer=Td;function tx(t){return _t(t)==="[object AsyncFunction]"}Oe.isAsyncFunction=tx;function rx(t){return _t(t)==="[object Map Iterator]"}Oe.isMapIterator=rx;function ix(t){return _t(t)==="[object Set Iterator]"}Oe.isSetIterator=ix;function nx(t){return _t(t)==="[object Generator]"}Oe.isGeneratorObject=nx;function ax(t){return _t(t)==="[object WebAssembly.Module]"}Oe.isWebAssemblyCompiledModule=ax;function Cd(t){return ia(t,P_)}Oe.isNumberObject=Cd;function Od(t){return ia(t,D_)}Oe.isStringObject=Od;function Pd(t){return ia(t,U_)}Oe.isBooleanObject=Pd;function Dd(t){return Bd&&ia(t,Rd)}Oe.isBigIntObject=Dd;function Ud(t){return Ad&&ia(t,qd)}Oe.isSymbolObject=Ud;function ox(t){return Cd(t)||Od(t)||Pd(t)||Dd(t)||Ud(t)}Oe.isBoxedPrimitive=ox;function fx(t){return typeof Uint8Array<"u"&&(Id(t)||Td(t))}Oe.isAnyArrayBuffer=fx;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(t){Object.defineProperty(Oe,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})})});var Fd=R((u9,Ld)=>{b();Ld.exports=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}});var oa=R(Pe=>{b();var jd=Object.getOwnPropertyDescriptors||function(e){for(var r=Object.keys(e),i={},n=0;n<r.length;n++)i[r[n]]=Object.getOwnPropertyDescriptor(e,r[n]);return i},sx=/%[sdj%]/g;Pe.format=function(t){if(!Oo(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(kr(arguments[r]));return e.join(" ")}for(var r=1,i=arguments,n=i.length,a=String(t).replace(sx,function(v){if(v==="%%")return"%";if(r>=n)return v;switch(v){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch{return"[Circular]"}default:return v}}),f=i[r];r<n;f=i[++r])Co(f)||!tn(f)?a+=" "+f:a+=" "+kr(f);return a};Pe.deprecate=function(t,e){if(typeof S.default<"u"&&S.default.noDeprecation===!0)return t;if(typeof S.default>"u")return function(){return Pe.deprecate(t,e).apply(this,arguments)};var r=!1;function i(){if(!r){if(S.default.throwDeprecation)throw new Error(e);S.default.traceDeprecation?console.trace(e):console.error(e),r=!0}return t.apply(this,arguments)}return i};var Ro={},Hd=/^$/;S.default.env.NODE_DEBUG&&(qo=S.default.env.NODE_DEBUG,qo=qo.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),Hd=new RegExp("^"+qo+"$","i"));var qo;Pe.debuglog=function(t){if(t=t.toUpperCase(),!Ro[t])if(Hd.test(t)){var e=S.default.pid;Ro[t]=function(){var r=Pe.format.apply(Pe,arguments);console.error("%s %d: %s",t,e,r)}}else Ro[t]=function(){};return Ro[t]};function kr(t,e){var r={seen:[],stylize:hx};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Qs(e)?r.showHidden=e:e&&Pe._extend(r,e),yi(r.showHidden)&&(r.showHidden=!1),yi(r.depth)&&(r.depth=2),yi(r.colors)&&(r.colors=!1),yi(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=ux),ko(r,t,r.depth)}Pe.inspect=kr;kr.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};kr.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function ux(t,e){var r=kr.styles[e];return r?"\x1B["+kr.colors[r][0]+"m"+t+"\x1B["+kr.colors[r][1]+"m":t}function hx(t,e){return t}function lx(t){var e={};return t.forEach(function(r,i){e[r]=!0}),e}function ko(t,e,r){if(t.customInspect&&e&&Io(e.inspect)&&e.inspect!==Pe.inspect&&!(e.constructor&&e.constructor.prototype===e)){var i=e.inspect(r,t);return Oo(i)||(i=ko(t,i,r)),i}var n=cx(t,e);if(n)return n;var a=Object.keys(e),f=lx(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(e)),aa(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return Ys(e);if(a.length===0){if(Io(e)){var v=e.name?": "+e.name:"";return t.stylize("[Function"+v+"]","special")}if(na(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(To(e))return t.stylize(Date.prototype.toString.call(e),"date");if(aa(e))return Ys(e)}var m="",E=!1,A=["{","}"];if(Kd(e)&&(E=!0,A=["[","]"]),Io(e)){var q=e.name?": "+e.name:"";m=" [Function"+q+"]"}if(na(e)&&(m=" "+RegExp.prototype.toString.call(e)),To(e)&&(m=" "+Date.prototype.toUTCString.call(e)),aa(e)&&(m=" "+Ys(e)),a.length===0&&(!E||e.length==0))return A[0]+m+A[1];if(r<0)return na(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var I;return E?I=dx(t,e,r,f,a):I=a.map(function(C){return Js(t,e,r,f,C,E)}),t.seen.pop(),px(I,m,A)}function cx(t,e){if(yi(e))return t.stylize("undefined","undefined");if(Oo(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(Wd(e))return t.stylize(""+e,"number");if(Qs(e))return t.stylize(""+e,"boolean");if(Co(e))return t.stylize("null","null")}function Ys(t){return"["+Error.prototype.toString.call(t)+"]"}function dx(t,e,r,i,n){for(var a=[],f=0,v=e.length;f<v;++f)zd(e,String(f))?a.push(Js(t,e,r,i,String(f),!0)):a.push("");return n.forEach(function(m){m.match(/^\d+$/)||a.push(Js(t,e,r,i,m,!0))}),a}function Js(t,e,r,i,n,a){var f,v,m;if(m=Object.getOwnPropertyDescriptor(e,n)||{value:e[n]},m.get?m.set?v=t.stylize("[Getter/Setter]","special"):v=t.stylize("[Getter]","special"):m.set&&(v=t.stylize("[Setter]","special")),zd(i,n)||(f="["+n+"]"),v||(t.seen.indexOf(m.value)<0?(Co(r)?v=ko(t,m.value,null):v=ko(t,m.value,r-1),v.indexOf(`
|
|
1
|
+
var bsvShamir=(()=>{var Db=Object.create;var ml=Object.defineProperty;var Ub=Object.getOwnPropertyDescriptor;var Nb=Object.getOwnPropertyNames;var Lb=Object.getPrototypeOf,Fb=Object.prototype.hasOwnProperty;var jb=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var R=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var Hb=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Nb(e))!Fb.call(t,i)&&i!==r&&ml(t,i,{get:()=>e[i],enumerable:!(n=Ub(e,i))||n.enumerable});return t};var bl=(t,e,r)=>(r=t!=null?Db(Lb(t)):{},Hb(e||!t||!t.__esModule?ml(r,"default",{value:t,enumerable:!0}):r,t));var El=R((CB,Ml)=>{w();var Ze=Ml.exports={},zt,Gt;function es(){throw new Error("setTimeout has not been defined")}function ts(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?zt=setTimeout:zt=es}catch{zt=es}try{typeof clearTimeout=="function"?Gt=clearTimeout:Gt=ts}catch{Gt=ts}})();function wl(t){if(zt===setTimeout)return setTimeout(t,0);if((zt===es||!zt)&&setTimeout)return zt=setTimeout,setTimeout(t,0);try{return zt(t,0)}catch{try{return zt.call(null,t,0)}catch{return zt.call(this,t,0)}}}function Kb(t){if(Gt===clearTimeout)return clearTimeout(t);if((Gt===ts||!Gt)&&clearTimeout)return Gt=clearTimeout,clearTimeout(t);try{return Gt(t)}catch{try{return Gt.call(null,t)}catch{return Gt.call(this,t)}}}var sr=[],Ni=!1,ai,Za=-1;function Wb(){!Ni||!ai||(Ni=!1,ai.length?sr=ai.concat(sr):Za=-1,sr.length&&_l())}function _l(){if(!Ni){var t=wl(Wb);Ni=!0;for(var e=sr.length;e;){for(ai=sr,sr=[];++Za<e;)ai&&ai[Za].run();Za=-1,e=sr.length}ai=null,Ni=!1,Kb(t)}}Ze.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];sr.push(new xl(t,e)),sr.length===1&&!Ni&&wl(_l)};function xl(t,e){this.fun=t,this.array=e}xl.prototype.run=function(){this.fun.apply(null,this.array)};Ze.title="browser";Ze.browser=!0;Ze.env={};Ze.argv=[];Ze.version="";Ze.versions={};function ur(){}Ze.on=ur;Ze.addListener=ur;Ze.once=ur;Ze.off=ur;Ze.removeListener=ur;Ze.removeAllListeners=ur;Ze.emit=ur;Ze.prependListener=ur;Ze.prependOnceListener=ur;Ze.listeners=function(t){return[]};Ze.binding=function(t){throw new Error("process.binding is not supported")};Ze.cwd=function(){return"/"};Ze.chdir=function(t){throw new Error("process.chdir is not supported")};Ze.umask=function(){return 0}});var Al=R(Ya=>{"use strict";w();Ya.byteLength=Gb;Ya.toByteArray=$b;Ya.fromByteArray=Xb;var Vt=[],wt=[],zb=typeof Uint8Array<"u"?Uint8Array:Array,rs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(oi=0,Sl=rs.length;oi<Sl;++oi)Vt[oi]=rs[oi],wt[rs.charCodeAt(oi)]=oi;var oi,Sl;wt[45]=62;wt[95]=63;function Bl(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function Gb(t){var e=Bl(t),r=e[0],n=e[1];return(r+n)*3/4-n}function Vb(t,e,r){return(e+r)*3/4-r}function $b(t){var e,r=Bl(t),n=r[0],i=r[1],a=new zb(Vb(t,n,i)),f=0,v=i>0?n-4:n,m;for(m=0;m<v;m+=4)e=wt[t.charCodeAt(m)]<<18|wt[t.charCodeAt(m+1)]<<12|wt[t.charCodeAt(m+2)]<<6|wt[t.charCodeAt(m+3)],a[f++]=e>>16&255,a[f++]=e>>8&255,a[f++]=e&255;return i===2&&(e=wt[t.charCodeAt(m)]<<2|wt[t.charCodeAt(m+1)]>>4,a[f++]=e&255),i===1&&(e=wt[t.charCodeAt(m)]<<10|wt[t.charCodeAt(m+1)]<<4|wt[t.charCodeAt(m+2)]>>2,a[f++]=e>>8&255,a[f++]=e&255),a}function Zb(t){return Vt[t>>18&63]+Vt[t>>12&63]+Vt[t>>6&63]+Vt[t&63]}function Yb(t,e,r){for(var n,i=[],a=e;a<r;a+=3)n=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(t[a+2]&255),i.push(Zb(n));return i.join("")}function Xb(t){for(var e,r=t.length,n=r%3,i=[],a=16383,f=0,v=r-n;f<v;f+=a)i.push(Yb(t,f,f+a>v?v:f+a));return n===1?(e=t[r-1],i.push(Vt[e>>2]+Vt[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(Vt[e>>10]+Vt[e>>4&63]+Vt[e<<2&63]+"=")),i.join("")}});var Rl=R(is=>{w();is.read=function(t,e,r,n,i){var a,f,v=i*8-n-1,m=(1<<v)-1,E=m>>1,A=-7,q=r?i-1:0,I=r?-1:1,C=t[e+q];for(q+=I,a=C&(1<<-A)-1,C>>=-A,A+=v;A>0;a=a*256+t[e+q],q+=I,A-=8);for(f=a&(1<<-A)-1,a>>=-A,A+=n;A>0;f=f*256+t[e+q],q+=I,A-=8);if(a===0)a=1-E;else{if(a===m)return f?NaN:(C?-1:1)*(1/0);f=f+Math.pow(2,n),a=a-E}return(C?-1:1)*f*Math.pow(2,a-n)};is.write=function(t,e,r,n,i,a){var f,v,m,E=a*8-i-1,A=(1<<E)-1,q=A>>1,I=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=n?0:a-1,j=n?1:-1,V=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(v=isNaN(e)?1:0,f=A):(f=Math.floor(Math.log(e)/Math.LN2),e*(m=Math.pow(2,-f))<1&&(f--,m*=2),f+q>=1?e+=I/m:e+=I*Math.pow(2,1-q),e*m>=2&&(f++,m/=2),f+q>=A?(v=0,f=A):f+q>=1?(v=(e*m-1)*Math.pow(2,i),f=f+q):(v=e*Math.pow(2,q-1)*Math.pow(2,i),f=0));i>=8;t[r+C]=v&255,C+=j,v/=256,i-=8);for(f=f<<i|v,E+=i;E>0;t[r+C]=f&255,C+=j,f/=256,E-=8);t[r+C-j]|=V*128}});var ft=R(Hi=>{"use strict";w();var ns=Al(),Fi=Rl(),ql=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Hi.Buffer=T;Hi.SlowBuffer=i2;Hi.INSPECT_MAX_BYTES=50;var Xa=2147483647;Hi.kMaxLength=Xa;T.TYPED_ARRAY_SUPPORT=Jb();!T.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 Jb(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function hr(t){if(t>Xa)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,T.prototype),e}function T(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ss(t)}return Cl(t,e,r)}T.poolSize=8192;function Cl(t,e,r){if(typeof t=="string")return e2(t,e);if(ArrayBuffer.isView(t))return t2(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if($t(t,ArrayBuffer)||t&&$t(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&($t(t,SharedArrayBuffer)||t&&$t(t.buffer,SharedArrayBuffer)))return os(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=t.valueOf&&t.valueOf();if(n!=null&&n!==t)return T.from(n,e,r);let i=r2(t);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return T.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}T.from=function(t,e,r){return Cl(t,e,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function Ol(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function Qb(t,e,r){return Ol(t),t<=0?hr(t):e!==void 0?typeof r=="string"?hr(t).fill(e,r):hr(t).fill(e):hr(t)}T.alloc=function(t,e,r){return Qb(t,e,r)};function ss(t){return Ol(t),hr(t<0?0:us(t)|0)}T.allocUnsafe=function(t){return ss(t)};T.allocUnsafeSlow=function(t){return ss(t)};function e2(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!T.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let r=Pl(t,e)|0,n=hr(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}function as(t){let e=t.length<0?0:us(t.length)|0,r=hr(e);for(let n=0;n<e;n+=1)r[n]=t[n]&255;return r}function t2(t){if($t(t,Uint8Array)){let e=new Uint8Array(t);return os(e.buffer,e.byteOffset,e.byteLength)}return as(t)}function os(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return e===void 0&&r===void 0?n=new Uint8Array(t):r===void 0?n=new Uint8Array(t,e):n=new Uint8Array(t,e,r),Object.setPrototypeOf(n,T.prototype),n}function r2(t){if(T.isBuffer(t)){let e=us(t.length)|0,r=hr(e);return r.length===0||t.copy(r,0,0,e),r}if(t.length!==void 0)return typeof t.length!="number"||ls(t.length)?hr(0):as(t);if(t.type==="Buffer"&&Array.isArray(t.data))return as(t.data)}function us(t){if(t>=Xa)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Xa.toString(16)+" bytes");return t|0}function i2(t){return+t!=t&&(t=0),T.alloc(+t)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,r){if($t(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),$t(r,Uint8Array)&&(r=T.from(r,r.offset,r.byteLength)),!T.isBuffer(e)||!T.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;let n=e.length,i=r.length;for(let a=0,f=Math.min(n,i);a<f;++a)if(e[a]!==r[a]){n=e[a],i=r[a];break}return n<i?-1:i<n?1:0};T.isEncoding=function(e){switch(String(e).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}};T.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return T.alloc(0);let n;if(r===void 0)for(r=0,n=0;n<e.length;++n)r+=e[n].length;let i=T.allocUnsafe(r),a=0;for(n=0;n<e.length;++n){let f=e[n];if($t(f,Uint8Array))a+f.length>i.length?(T.isBuffer(f)||(f=T.from(f)),f.copy(i,a)):Uint8Array.prototype.set.call(i,f,a);else if(T.isBuffer(f))f.copy(i,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=f.length}return i};function Pl(t,e){if(T.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||$t(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return fs(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Wl(t).length;default:if(i)return n?-1:fs(t).length;e=(""+e).toLowerCase(),i=!0}}T.byteLength=Pl;function n2(t,e,r){let n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return p2(this,e,r);case"utf8":case"utf-8":return Ul(this,e,r);case"ascii":return c2(this,e,r);case"latin1":case"binary":return d2(this,e,r);case"base64":return h2(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v2(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function fi(t,e,r){let n=t[e];t[e]=t[r],t[r]=n}T.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<e;r+=2)fi(this,r,r+1);return this};T.prototype.swap32=function(){let e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<e;r+=4)fi(this,r,r+3),fi(this,r+1,r+2);return this};T.prototype.swap64=function(){let e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<e;r+=8)fi(this,r,r+7),fi(this,r+1,r+6),fi(this,r+2,r+5),fi(this,r+3,r+4);return this};T.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?Ul(this,0,e):n2.apply(this,arguments)};T.prototype.toLocaleString=T.prototype.toString;T.prototype.equals=function(e){if(!T.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:T.compare(this,e)===0};T.prototype.inspect=function(){let e="",r=Hi.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"};ql&&(T.prototype[ql]=T.prototype.inspect);T.prototype.compare=function(e,r,n,i,a){if($t(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),r<0||n>e.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,a>>>=0,this===e)return 0;let f=a-i,v=n-r,m=Math.min(f,v),E=this.slice(i,a),A=e.slice(r,n);for(let q=0;q<m;++q)if(E[q]!==A[q]){f=E[q],v=A[q];break}return f<v?-1:v<f?1:0};function Dl(t,e,r,n,i){if(t.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,ls(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof e=="string"&&(e=T.from(e,n)),T.isBuffer(e))return e.length===0?-1:Il(t,e,r,n,i);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Il(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Il(t,e,r,n,i){let a=1,f=t.length,v=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||e.length<2)return-1;a=2,f/=2,v/=2,r/=2}function m(A,q){return a===1?A[q]:A.readUInt16BE(q*a)}let E;if(i){let A=-1;for(E=r;E<f;E++)if(m(t,E)===m(e,A===-1?0:E-A)){if(A===-1&&(A=E),E-A+1===v)return A*a}else A!==-1&&(E-=E-A),A=-1}else for(r+v>f&&(r=f-v),E=r;E>=0;E--){let A=!0;for(let q=0;q<v;q++)if(m(t,E+q)!==m(e,q)){A=!1;break}if(A)return E}return-1}T.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};T.prototype.indexOf=function(e,r,n){return Dl(this,e,r,n,!0)};T.prototype.lastIndexOf=function(e,r,n){return Dl(this,e,r,n,!1)};function a2(t,e,r,n){r=Number(r)||0;let i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;let a=e.length;n>a/2&&(n=a/2);let f;for(f=0;f<n;++f){let v=parseInt(e.substr(f*2,2),16);if(ls(v))return f;t[r+f]=v}return f}function o2(t,e,r,n){return Ja(fs(e,t.length-r),t,r,n)}function f2(t,e,r,n){return Ja(b2(e),t,r,n)}function s2(t,e,r,n){return Ja(Wl(e),t,r,n)}function u2(t,e,r,n){return Ja(w2(e,t.length-r),t,r,n)}T.prototype.write=function(e,r,n,i){if(r===void 0)i="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")i=r,n=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let a=this.length-r;if((n===void 0||n>a)&&(n=a),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let f=!1;for(;;)switch(i){case"hex":return a2(this,e,r,n);case"utf8":case"utf-8":return o2(this,e,r,n);case"ascii":case"latin1":case"binary":return f2(this,e,r,n);case"base64":return s2(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u2(this,e,r,n);default:if(f)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),f=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function h2(t,e,r){return e===0&&r===t.length?ns.fromByteArray(t):ns.fromByteArray(t.slice(e,r))}function Ul(t,e,r){r=Math.min(t.length,r);let n=[],i=e;for(;i<r;){let a=t[i],f=null,v=a>239?4:a>223?3:a>191?2:1;if(i+v<=r){let m,E,A,q;switch(v){case 1:a<128&&(f=a);break;case 2:m=t[i+1],(m&192)===128&&(q=(a&31)<<6|m&63,q>127&&(f=q));break;case 3:m=t[i+1],E=t[i+2],(m&192)===128&&(E&192)===128&&(q=(a&15)<<12|(m&63)<<6|E&63,q>2047&&(q<55296||q>57343)&&(f=q));break;case 4:m=t[i+1],E=t[i+2],A=t[i+3],(m&192)===128&&(E&192)===128&&(A&192)===128&&(q=(a&15)<<18|(m&63)<<12|(E&63)<<6|A&63,q>65535&&q<1114112&&(f=q))}}f===null?(f=65533,v=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|f&1023),n.push(f),i+=v}return l2(n)}var kl=4096;function l2(t){let e=t.length;if(e<=kl)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=kl));return r}function c2(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]&127);return n}function d2(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function p2(t,e,r){let n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let a=e;a<r;++a)i+=_2[t[a]];return i}function v2(t,e,r){let n=t.slice(e,r),i="";for(let a=0;a<n.length-1;a+=2)i+=String.fromCharCode(n[a]+n[a+1]*256);return i}T.prototype.slice=function(e,r){let n=this.length;e=~~e,r=r===void 0?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);let i=this.subarray(e,r);return Object.setPrototypeOf(i,T.prototype),i};function rt(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||rt(e,r,this.length);let i=this[e],a=1,f=0;for(;++f<r&&(a*=256);)i+=this[e+f]*a;return i};T.prototype.readUintBE=T.prototype.readUIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||rt(e,r,this.length);let i=this[e+--r],a=1;for(;r>0&&(a*=256);)i+=this[e+--r]*a;return i};T.prototype.readUint8=T.prototype.readUInt8=function(e,r){return e=e>>>0,r||rt(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||rt(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||rt(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=Ir(function(e){e=e>>>0,ji(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&$n(e,this.length-8);let i=r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,a=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(i)+(BigInt(a)<<BigInt(32))});T.prototype.readBigUInt64BE=Ir(function(e){e=e>>>0,ji(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&$n(e,this.length-8);let i=r*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],a=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(i)<<BigInt(32))+BigInt(a)});T.prototype.readIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||rt(e,r,this.length);let i=this[e],a=1,f=0;for(;++f<r&&(a*=256);)i+=this[e+f]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*r)),i};T.prototype.readIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||rt(e,r,this.length);let i=r,a=1,f=this[e+--i];for(;i>0&&(a*=256);)f+=this[e+--i]*a;return a*=128,f>=a&&(f-=Math.pow(2,8*r)),f};T.prototype.readInt8=function(e,r){return e=e>>>0,r||rt(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,r){e=e>>>0,r||rt(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};T.prototype.readInt16BE=function(e,r){e=e>>>0,r||rt(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};T.prototype.readInt32LE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=Ir(function(e){e=e>>>0,ji(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&$n(e,this.length-8);let i=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)});T.prototype.readBigInt64BE=Ir(function(e){e=e>>>0,ji(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&$n(e,this.length-8);let i=(r<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(i)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n)});T.prototype.readFloatLE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),Fi.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),Fi.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||rt(e,8,this.length),Fi.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||rt(e,8,this.length),Fi.read(this,e,!1,52,8)};function vt(t,e,r,n,i,a){if(!T.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){let v=Math.pow(2,8*n)-1;vt(this,e,r,n,v,0)}let a=1,f=0;for(this[r]=e&255;++f<n&&(a*=256);)this[r+f]=e/a&255;return r+n};T.prototype.writeUintBE=T.prototype.writeUIntBE=function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){let v=Math.pow(2,8*n)-1;vt(this,e,r,n,v,0)}let a=n-1,f=1;for(this[r+a]=e&255;--a>=0&&(f*=256);)this[r+a]=e/f&255;return r+n};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,r,n){return e=+e,r=r>>>0,n||vt(this,e,r,1,255,0),this[r]=e&255,r+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||vt(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||vt(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||vt(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||vt(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};function Nl(t,e,r,n,i){Kl(e,n,i,t,r,7);let a=Number(e&BigInt(4294967295));t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a;let f=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=f,f=f>>8,t[r++]=f,f=f>>8,t[r++]=f,f=f>>8,t[r++]=f,r}function Ll(t,e,r,n,i){Kl(e,n,i,t,r,7);let a=Number(e&BigInt(4294967295));t[r+7]=a,a=a>>8,t[r+6]=a,a=a>>8,t[r+5]=a,a=a>>8,t[r+4]=a;let f=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=f,f=f>>8,t[r+2]=f,f=f>>8,t[r+1]=f,f=f>>8,t[r]=f,r+8}T.prototype.writeBigUInt64LE=Ir(function(e,r=0){return Nl(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Ir(function(e,r=0){return Ll(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){let m=Math.pow(2,8*n-1);vt(this,e,r,n,m-1,-m)}let a=0,f=1,v=0;for(this[r]=e&255;++a<n&&(f*=256);)e<0&&v===0&&this[r+a-1]!==0&&(v=1),this[r+a]=(e/f>>0)-v&255;return r+n};T.prototype.writeIntBE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){let m=Math.pow(2,8*n-1);vt(this,e,r,n,m-1,-m)}let a=n-1,f=1,v=0;for(this[r+a]=e&255;--a>=0&&(f*=256);)e<0&&v===0&&this[r+a+1]!==0&&(v=1),this[r+a]=(e/f>>0)-v&255;return r+n};T.prototype.writeInt8=function(e,r,n){return e=+e,r=r>>>0,n||vt(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1};T.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||vt(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2};T.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||vt(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2};T.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||vt(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4};T.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||vt(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};T.prototype.writeBigInt64LE=Ir(function(e,r=0){return Nl(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Ir(function(e,r=0){return Ll(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Fl(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function jl(t,e,r,n,i){return e=+e,r=r>>>0,i||Fl(t,e,r,4,34028234663852886e22,-34028234663852886e22),Fi.write(t,e,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,r,n){return jl(this,e,r,!0,n)};T.prototype.writeFloatBE=function(e,r,n){return jl(this,e,r,!1,n)};function Hl(t,e,r,n,i){return e=+e,r=r>>>0,i||Fl(t,e,r,8,17976931348623157e292,-17976931348623157e292),Fi.write(t,e,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,r,n){return Hl(this,e,r,!0,n)};T.prototype.writeDoubleBE=function(e,r,n){return Hl(this,e,r,!1,n)};T.prototype.copy=function(e,r,n,i){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);let a=i-n;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,n,i):Uint8Array.prototype.set.call(e,this.subarray(n,i),r),a};T.prototype.fill=function(e,r,n,i){if(typeof e=="string"){if(typeof r=="string"?(i=r,r=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!T.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(e.length===1){let f=e.charCodeAt(0);(i==="utf8"&&f<128||i==="latin1")&&(e=f)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);let a;if(typeof e=="number")for(a=r;a<n;++a)this[a]=e;else{let f=T.isBuffer(e)?e:T.from(e,i),v=f.length;if(v===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<n-r;++a)this[a+r]=f[a%v]}return this};var Li={};function hs(t,e,r){Li[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}hs("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);hs("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError);hs("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=Tl(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Tl(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n},RangeError);function Tl(t){let e="",r=t.length,n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function y2(t,e,r){ji(e,"offset"),(t[e]===void 0||t[e+r]===void 0)&&$n(e,t.length-(r+1))}function Kl(t,e,r,n,i,a){if(t>r||t<e){let f=typeof e=="bigint"?"n":"",v;throw a>3?e===0||e===BigInt(0)?v=`>= 0${f} and < 2${f} ** ${(a+1)*8}${f}`:v=`>= -(2${f} ** ${(a+1)*8-1}${f}) and < 2 ** ${(a+1)*8-1}${f}`:v=`>= ${e}${f} and <= ${r}${f}`,new Li.ERR_OUT_OF_RANGE("value",v,t)}y2(n,i,a)}function ji(t,e){if(typeof t!="number")throw new Li.ERR_INVALID_ARG_TYPE(e,"number",t)}function $n(t,e,r){throw Math.floor(t)!==t?(ji(t,r),new Li.ERR_OUT_OF_RANGE(r||"offset","an integer",t)):e<0?new Li.ERR_BUFFER_OUT_OF_BOUNDS:new Li.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}var g2=/[^+/0-9A-Za-z-_]/g;function m2(t){if(t=t.split("=")[0],t=t.trim().replace(g2,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function fs(t,e){e=e||1/0;let r,n=t.length,i=null,a=[];for(let f=0;f<n;++f){if(r=t.charCodeAt(f),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}else if(f+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function b2(t){let e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function w2(t,e){let r,n,i,a=[];for(let f=0;f<t.length&&!((e-=2)<0);++f)r=t.charCodeAt(f),n=r>>8,i=r%256,a.push(i),a.push(n);return a}function Wl(t){return ns.toByteArray(m2(t))}function Ja(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function $t(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function ls(t){return t!==t}var _2=(function(){let t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e})();function Ir(t){return typeof BigInt>"u"?x2:t}function x2(){throw new Error("BigInt not supported")}});var S,B,w=jb(()=>{S=bl(El()),B=bl(ft())});var lr=R((zl,cs)=>{w();(function(t,e){"use strict";function r(M,h){if(!M)throw new Error(h||"Assertion failed")}function n(M,h){M.super_=h;var y=function(){};y.prototype=h.prototype,M.prototype=new y,M.prototype.constructor=M}function i(M,h,y){if(i.isBN(M))return M;this.negative=0,this.words=null,this.length=0,this.red=null,M!==null&&((h==="le"||h==="be")&&(y=h,h=10),this._init(M||0,h||10,y||"be"))}typeof t=="object"?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=ft().Buffer}catch{}i.isBN=function(h){return h instanceof i?!0:h!==null&&typeof h=="object"&&h.constructor.wordSize===i.wordSize&&Array.isArray(h.words)},i.max=function(h,y){return h.cmp(y)>0?h:y},i.min=function(h,y){return h.cmp(y)<0?h:y},i.prototype._init=function(h,y,l){if(typeof h=="number")return this._initNumber(h,y,l);if(typeof h=="object")return this._initArray(h,y,l);y==="hex"&&(y=16),r(y===(y|0)&&y>=2&&y<=36),h=h.toString().replace(/\s+/g,"");var o=0;h[0]==="-"&&(o++,this.negative=1),o<h.length&&(y===16?this._parseHex(h,o,l):(this._parseBase(h,y,o),l==="le"&&this._initArray(this.toArray(),y,l)))},i.prototype._initNumber=function(h,y,l){h<0&&(this.negative=1,h=-h),h<67108864?(this.words=[h&67108863],this.length=1):h<4503599627370496?(this.words=[h&67108863,h/67108864&67108863],this.length=2):(r(h<9007199254740992),this.words=[h&67108863,h/67108864&67108863,1],this.length=3),l==="le"&&this._initArray(this.toArray(),y,l)},i.prototype._initArray=function(h,y,l){if(r(typeof h.length=="number"),h.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(h.length/3),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var s,d,g=0;if(l==="be")for(o=h.length-1,s=0;o>=0;o-=3)d=h[o]|h[o-1]<<8|h[o-2]<<16,this.words[s]|=d<<g&67108863,this.words[s+1]=d>>>26-g&67108863,g+=24,g>=26&&(g-=26,s++);else if(l==="le")for(o=0,s=0;o<h.length;o+=3)d=h[o]|h[o+1]<<8|h[o+2]<<16,this.words[s]|=d<<g&67108863,this.words[s+1]=d>>>26-g&67108863,g+=24,g>=26&&(g-=26,s++);return this.strip()};function f(M,h){var y=M.charCodeAt(h);return y>=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function v(M,h,y){var l=f(M,y);return y-1>=h&&(l|=f(M,y-1)<<4),l}i.prototype._parseHex=function(h,y,l){this.length=Math.ceil((h.length-y)/6),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var s=0,d=0,g;if(l==="be")for(o=h.length-1;o>=y;o-=2)g=v(h,y,o)<<s,this.words[d]|=g&67108863,s>=18?(s-=18,d+=1,this.words[d]|=g>>>26):s+=8;else{var p=h.length-y;for(o=p%2===0?y+1:y;o<h.length;o+=2)g=v(h,y,o)<<s,this.words[d]|=g&67108863,s>=18?(s-=18,d+=1,this.words[d]|=g>>>26):s+=8}this.strip()};function m(M,h,y,l){for(var o=0,s=Math.min(M.length,y),d=h;d<s;d++){var g=M.charCodeAt(d)-48;o*=l,g>=49?o+=g-49+10:g>=17?o+=g-17+10:o+=g}return o}i.prototype._parseBase=function(h,y,l){this.words=[0],this.length=1;for(var o=0,s=1;s<=67108863;s*=y)o++;o--,s=s/y|0;for(var d=h.length-l,g=d%o,p=Math.min(d,d-g)+l,u=0,b=l;b<p;b+=o)u=m(h,b,b+o,y),this.imuln(s),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(g!==0){var _=1;for(u=m(h,b,h.length,y),b=0;b<g;b++)_*=y;this.imuln(_),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},i.prototype.copy=function(h){h.words=new Array(this.length);for(var y=0;y<this.length;y++)h.words[y]=this.words[y];h.length=this.length,h.negative=this.negative,h.red=this.red},i.prototype.clone=function(){var h=new i(null);return this.copy(h),h},i.prototype._expand=function(h){for(;this.length<h;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var E=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],A=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],q=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(h,y){h=h||10,y=y|0||1;var l;if(h===16||h==="hex"){l="";for(var o=0,s=0,d=0;d<this.length;d++){var g=this.words[d],p=((g<<o|s)&16777215).toString(16);s=g>>>24-o&16777215,o+=2,o>=26&&(o-=26,d--),s!==0||d!==this.length-1?l=E[6-p.length]+p+l:l=p+l}for(s!==0&&(l=s.toString(16)+l);l.length%y!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(h===(h|0)&&h>=2&&h<=36){var u=A[h],b=q[h];l="";var _=this.clone();for(_.negative=0;!_.isZero();){var c=_.modn(b).toString(h);_=_.idivn(b),_.isZero()?l=c+l:l=E[u-c.length]+c+l}for(this.isZero()&&(l="0"+l);l.length%y!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var h=this.words[0];return this.length===2?h+=this.words[1]*67108864:this.length===3&&this.words[2]===1?h+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-h:h},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(h,y){return r(typeof a<"u"),this.toArrayLike(a,h,y)},i.prototype.toArray=function(h,y){return this.toArrayLike(Array,h,y)},i.prototype.toArrayLike=function(h,y,l){var o=this.byteLength(),s=l||Math.max(1,o);r(o<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0"),this.strip();var d=y==="le",g=new h(s),p,u,b=this.clone();if(d){for(u=0;!b.isZero();u++)p=b.andln(255),b.iushrn(8),g[u]=p;for(;u<s;u++)g[u]=0}else{for(u=0;u<s-o;u++)g[u]=0;for(u=0;!b.isZero();u++)p=b.andln(255),b.iushrn(8),g[s-u-1]=p}return g},Math.clz32?i.prototype._countBits=function(h){return 32-Math.clz32(h)}:i.prototype._countBits=function(h){var y=h,l=0;return y>=4096&&(l+=13,y>>>=13),y>=64&&(l+=7,y>>>=7),y>=8&&(l+=4,y>>>=4),y>=2&&(l+=2,y>>>=2),l+y},i.prototype._zeroBits=function(h){if(h===0)return 26;var y=h,l=0;return(y&8191)===0&&(l+=13,y>>>=13),(y&127)===0&&(l+=7,y>>>=7),(y&15)===0&&(l+=4,y>>>=4),(y&3)===0&&(l+=2,y>>>=2),(y&1)===0&&l++,l},i.prototype.bitLength=function(){var h=this.words[this.length-1],y=this._countBits(h);return(this.length-1)*26+y};function I(M){for(var h=new Array(M.bitLength()),y=0;y<h.length;y++){var l=y/26|0,o=y%26;h[y]=(M.words[l]&1<<o)>>>o}return h}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var h=0,y=0;y<this.length;y++){var l=this._zeroBits(this.words[y]);if(h+=l,l!==26)break}return h},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(h){return this.negative!==0?this.abs().inotn(h).iaddn(1):this.clone()},i.prototype.fromTwos=function(h){return this.testn(h-1)?this.notn(h).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(h){for(;this.length<h.length;)this.words[this.length++]=0;for(var y=0;y<h.length;y++)this.words[y]=this.words[y]|h.words[y];return this.strip()},i.prototype.ior=function(h){return r((this.negative|h.negative)===0),this.iuor(h)},i.prototype.or=function(h){return this.length>h.length?this.clone().ior(h):h.clone().ior(this)},i.prototype.uor=function(h){return this.length>h.length?this.clone().iuor(h):h.clone().iuor(this)},i.prototype.iuand=function(h){var y;this.length>h.length?y=h:y=this;for(var l=0;l<y.length;l++)this.words[l]=this.words[l]&h.words[l];return this.length=y.length,this.strip()},i.prototype.iand=function(h){return r((this.negative|h.negative)===0),this.iuand(h)},i.prototype.and=function(h){return this.length>h.length?this.clone().iand(h):h.clone().iand(this)},i.prototype.uand=function(h){return this.length>h.length?this.clone().iuand(h):h.clone().iuand(this)},i.prototype.iuxor=function(h){var y,l;this.length>h.length?(y=this,l=h):(y=h,l=this);for(var o=0;o<l.length;o++)this.words[o]=y.words[o]^l.words[o];if(this!==y)for(;o<y.length;o++)this.words[o]=y.words[o];return this.length=y.length,this.strip()},i.prototype.ixor=function(h){return r((this.negative|h.negative)===0),this.iuxor(h)},i.prototype.xor=function(h){return this.length>h.length?this.clone().ixor(h):h.clone().ixor(this)},i.prototype.uxor=function(h){return this.length>h.length?this.clone().iuxor(h):h.clone().iuxor(this)},i.prototype.inotn=function(h){r(typeof h=="number"&&h>=0);var y=Math.ceil(h/26)|0,l=h%26;this._expand(y),l>0&&y--;for(var o=0;o<y;o++)this.words[o]=~this.words[o]&67108863;return l>0&&(this.words[o]=~this.words[o]&67108863>>26-l),this.strip()},i.prototype.notn=function(h){return this.clone().inotn(h)},i.prototype.setn=function(h,y){r(typeof h=="number"&&h>=0);var l=h/26|0,o=h%26;return this._expand(l+1),y?this.words[l]=this.words[l]|1<<o:this.words[l]=this.words[l]&~(1<<o),this.strip()},i.prototype.iadd=function(h){var y;if(this.negative!==0&&h.negative===0)return this.negative=0,y=this.isub(h),this.negative^=1,this._normSign();if(this.negative===0&&h.negative!==0)return h.negative=0,y=this.isub(h),h.negative=1,y._normSign();var l,o;this.length>h.length?(l=this,o=h):(l=h,o=this);for(var s=0,d=0;d<o.length;d++)y=(l.words[d]|0)+(o.words[d]|0)+s,this.words[d]=y&67108863,s=y>>>26;for(;s!==0&&d<l.length;d++)y=(l.words[d]|0)+s,this.words[d]=y&67108863,s=y>>>26;if(this.length=l.length,s!==0)this.words[this.length]=s,this.length++;else if(l!==this)for(;d<l.length;d++)this.words[d]=l.words[d];return this},i.prototype.add=function(h){var y;return h.negative!==0&&this.negative===0?(h.negative=0,y=this.sub(h),h.negative^=1,y):h.negative===0&&this.negative!==0?(this.negative=0,y=h.sub(this),this.negative=1,y):this.length>h.length?this.clone().iadd(h):h.clone().iadd(this)},i.prototype.isub=function(h){if(h.negative!==0){h.negative=0;var y=this.iadd(h);return h.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(h),this.negative=1,this._normSign();var l=this.cmp(h);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var o,s;l>0?(o=this,s=h):(o=h,s=this);for(var d=0,g=0;g<s.length;g++)y=(o.words[g]|0)-(s.words[g]|0)+d,d=y>>26,this.words[g]=y&67108863;for(;d!==0&&g<o.length;g++)y=(o.words[g]|0)+d,d=y>>26,this.words[g]=y&67108863;if(d===0&&g<o.length&&o!==this)for(;g<o.length;g++)this.words[g]=o.words[g];return this.length=Math.max(this.length,g),o!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(h){return this.clone().isub(h)};function C(M,h,y){y.negative=h.negative^M.negative;var l=M.length+h.length|0;y.length=l,l=l-1|0;var o=M.words[0]|0,s=h.words[0]|0,d=o*s,g=d&67108863,p=d/67108864|0;y.words[0]=g;for(var u=1;u<l;u++){for(var b=p>>>26,_=p&67108863,c=Math.min(u,h.length-1),x=Math.max(0,u-M.length+1);x<=c;x++){var P=u-x|0;o=M.words[P]|0,s=h.words[x]|0,d=o*s+_,b+=d/67108864|0,_=d&67108863}y.words[u]=_|0,p=b|0}return p!==0?y.words[u]=p|0:y.length--,y.strip()}var j=function(h,y,l){var o=h.words,s=y.words,d=l.words,g=0,p,u,b,_=o[0]|0,c=_&8191,x=_>>>13,P=o[1]|0,N=P&8191,U=P>>>13,W=o[2]|0,K=W&8191,G=W>>>13,It=o[3]|0,Z=It&8191,Y=It>>>13,Tn=o[4]|0,Q=Tn&8191,ee=Tn>>>13,Cn=o[5]|0,te=Cn&8191,re=Cn>>>13,On=o[6]|0,ie=On&8191,ne=On>>>13,Pn=o[7]|0,ae=Pn&8191,oe=Pn>>>13,Dn=o[8]|0,fe=Dn&8191,se=Dn>>>13,Un=o[9]|0,ue=Un&8191,he=Un>>>13,Nn=s[0]|0,le=Nn&8191,ce=Nn>>>13,Ln=s[1]|0,de=Ln&8191,pe=Ln>>>13,Fn=s[2]|0,ve=Fn&8191,ye=Fn>>>13,jn=s[3]|0,ge=jn&8191,me=jn>>>13,Hn=s[4]|0,be=Hn&8191,we=Hn>>>13,Kn=s[5]|0,_e=Kn&8191,xe=Kn>>>13,Wn=s[6]|0,Me=Wn&8191,Ee=Wn>>>13,zn=s[7]|0,Se=zn&8191,Be=zn>>>13,Gn=s[8]|0,Ae=Gn&8191,Re=Gn>>>13,Vn=s[9]|0,qe=Vn&8191,Ie=Vn>>>13;l.negative=h.negative^y.negative,l.length=19,p=Math.imul(c,le),u=Math.imul(c,ce),u=u+Math.imul(x,le)|0,b=Math.imul(x,ce);var Ui=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Ui>>>26)|0,Ui&=67108863,p=Math.imul(N,le),u=Math.imul(N,ce),u=u+Math.imul(U,le)|0,b=Math.imul(U,ce),p=p+Math.imul(c,de)|0,u=u+Math.imul(c,pe)|0,u=u+Math.imul(x,de)|0,b=b+Math.imul(x,pe)|0;var Ge=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,p=Math.imul(K,le),u=Math.imul(K,ce),u=u+Math.imul(G,le)|0,b=Math.imul(G,ce),p=p+Math.imul(N,de)|0,u=u+Math.imul(N,pe)|0,u=u+Math.imul(U,de)|0,b=b+Math.imul(U,pe)|0,p=p+Math.imul(c,ve)|0,u=u+Math.imul(c,ye)|0,u=u+Math.imul(x,ve)|0,b=b+Math.imul(x,ye)|0;var Ve=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,p=Math.imul(Z,le),u=Math.imul(Z,ce),u=u+Math.imul(Y,le)|0,b=Math.imul(Y,ce),p=p+Math.imul(K,de)|0,u=u+Math.imul(K,pe)|0,u=u+Math.imul(G,de)|0,b=b+Math.imul(G,pe)|0,p=p+Math.imul(N,ve)|0,u=u+Math.imul(N,ye)|0,u=u+Math.imul(U,ve)|0,b=b+Math.imul(U,ye)|0,p=p+Math.imul(c,ge)|0,u=u+Math.imul(c,me)|0,u=u+Math.imul(x,ge)|0,b=b+Math.imul(x,me)|0;var Kr=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Kr>>>26)|0,Kr&=67108863,p=Math.imul(Q,le),u=Math.imul(Q,ce),u=u+Math.imul(ee,le)|0,b=Math.imul(ee,ce),p=p+Math.imul(Z,de)|0,u=u+Math.imul(Z,pe)|0,u=u+Math.imul(Y,de)|0,b=b+Math.imul(Y,pe)|0,p=p+Math.imul(K,ve)|0,u=u+Math.imul(K,ye)|0,u=u+Math.imul(G,ve)|0,b=b+Math.imul(G,ye)|0,p=p+Math.imul(N,ge)|0,u=u+Math.imul(N,me)|0,u=u+Math.imul(U,ge)|0,b=b+Math.imul(U,me)|0,p=p+Math.imul(c,be)|0,u=u+Math.imul(c,we)|0,u=u+Math.imul(x,be)|0,b=b+Math.imul(x,we)|0;var Wr=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,p=Math.imul(te,le),u=Math.imul(te,ce),u=u+Math.imul(re,le)|0,b=Math.imul(re,ce),p=p+Math.imul(Q,de)|0,u=u+Math.imul(Q,pe)|0,u=u+Math.imul(ee,de)|0,b=b+Math.imul(ee,pe)|0,p=p+Math.imul(Z,ve)|0,u=u+Math.imul(Z,ye)|0,u=u+Math.imul(Y,ve)|0,b=b+Math.imul(Y,ye)|0,p=p+Math.imul(K,ge)|0,u=u+Math.imul(K,me)|0,u=u+Math.imul(G,ge)|0,b=b+Math.imul(G,me)|0,p=p+Math.imul(N,be)|0,u=u+Math.imul(N,we)|0,u=u+Math.imul(U,be)|0,b=b+Math.imul(U,we)|0,p=p+Math.imul(c,_e)|0,u=u+Math.imul(c,xe)|0,u=u+Math.imul(x,_e)|0,b=b+Math.imul(x,xe)|0;var zr=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(zr>>>26)|0,zr&=67108863,p=Math.imul(ie,le),u=Math.imul(ie,ce),u=u+Math.imul(ne,le)|0,b=Math.imul(ne,ce),p=p+Math.imul(te,de)|0,u=u+Math.imul(te,pe)|0,u=u+Math.imul(re,de)|0,b=b+Math.imul(re,pe)|0,p=p+Math.imul(Q,ve)|0,u=u+Math.imul(Q,ye)|0,u=u+Math.imul(ee,ve)|0,b=b+Math.imul(ee,ye)|0,p=p+Math.imul(Z,ge)|0,u=u+Math.imul(Z,me)|0,u=u+Math.imul(Y,ge)|0,b=b+Math.imul(Y,me)|0,p=p+Math.imul(K,be)|0,u=u+Math.imul(K,we)|0,u=u+Math.imul(G,be)|0,b=b+Math.imul(G,we)|0,p=p+Math.imul(N,_e)|0,u=u+Math.imul(N,xe)|0,u=u+Math.imul(U,_e)|0,b=b+Math.imul(U,xe)|0,p=p+Math.imul(c,Me)|0,u=u+Math.imul(c,Ee)|0,u=u+Math.imul(x,Me)|0,b=b+Math.imul(x,Ee)|0;var Gr=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,p=Math.imul(ae,le),u=Math.imul(ae,ce),u=u+Math.imul(oe,le)|0,b=Math.imul(oe,ce),p=p+Math.imul(ie,de)|0,u=u+Math.imul(ie,pe)|0,u=u+Math.imul(ne,de)|0,b=b+Math.imul(ne,pe)|0,p=p+Math.imul(te,ve)|0,u=u+Math.imul(te,ye)|0,u=u+Math.imul(re,ve)|0,b=b+Math.imul(re,ye)|0,p=p+Math.imul(Q,ge)|0,u=u+Math.imul(Q,me)|0,u=u+Math.imul(ee,ge)|0,b=b+Math.imul(ee,me)|0,p=p+Math.imul(Z,be)|0,u=u+Math.imul(Z,we)|0,u=u+Math.imul(Y,be)|0,b=b+Math.imul(Y,we)|0,p=p+Math.imul(K,_e)|0,u=u+Math.imul(K,xe)|0,u=u+Math.imul(G,_e)|0,b=b+Math.imul(G,xe)|0,p=p+Math.imul(N,Me)|0,u=u+Math.imul(N,Ee)|0,u=u+Math.imul(U,Me)|0,b=b+Math.imul(U,Ee)|0,p=p+Math.imul(c,Se)|0,u=u+Math.imul(c,Be)|0,u=u+Math.imul(x,Se)|0,b=b+Math.imul(x,Be)|0;var Vr=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,p=Math.imul(fe,le),u=Math.imul(fe,ce),u=u+Math.imul(se,le)|0,b=Math.imul(se,ce),p=p+Math.imul(ae,de)|0,u=u+Math.imul(ae,pe)|0,u=u+Math.imul(oe,de)|0,b=b+Math.imul(oe,pe)|0,p=p+Math.imul(ie,ve)|0,u=u+Math.imul(ie,ye)|0,u=u+Math.imul(ne,ve)|0,b=b+Math.imul(ne,ye)|0,p=p+Math.imul(te,ge)|0,u=u+Math.imul(te,me)|0,u=u+Math.imul(re,ge)|0,b=b+Math.imul(re,me)|0,p=p+Math.imul(Q,be)|0,u=u+Math.imul(Q,we)|0,u=u+Math.imul(ee,be)|0,b=b+Math.imul(ee,we)|0,p=p+Math.imul(Z,_e)|0,u=u+Math.imul(Z,xe)|0,u=u+Math.imul(Y,_e)|0,b=b+Math.imul(Y,xe)|0,p=p+Math.imul(K,Me)|0,u=u+Math.imul(K,Ee)|0,u=u+Math.imul(G,Me)|0,b=b+Math.imul(G,Ee)|0,p=p+Math.imul(N,Se)|0,u=u+Math.imul(N,Be)|0,u=u+Math.imul(U,Se)|0,b=b+Math.imul(U,Be)|0,p=p+Math.imul(c,Ae)|0,u=u+Math.imul(c,Re)|0,u=u+Math.imul(x,Ae)|0,b=b+Math.imul(x,Re)|0;var $r=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+($r>>>26)|0,$r&=67108863,p=Math.imul(ue,le),u=Math.imul(ue,ce),u=u+Math.imul(he,le)|0,b=Math.imul(he,ce),p=p+Math.imul(fe,de)|0,u=u+Math.imul(fe,pe)|0,u=u+Math.imul(se,de)|0,b=b+Math.imul(se,pe)|0,p=p+Math.imul(ae,ve)|0,u=u+Math.imul(ae,ye)|0,u=u+Math.imul(oe,ve)|0,b=b+Math.imul(oe,ye)|0,p=p+Math.imul(ie,ge)|0,u=u+Math.imul(ie,me)|0,u=u+Math.imul(ne,ge)|0,b=b+Math.imul(ne,me)|0,p=p+Math.imul(te,be)|0,u=u+Math.imul(te,we)|0,u=u+Math.imul(re,be)|0,b=b+Math.imul(re,we)|0,p=p+Math.imul(Q,_e)|0,u=u+Math.imul(Q,xe)|0,u=u+Math.imul(ee,_e)|0,b=b+Math.imul(ee,xe)|0,p=p+Math.imul(Z,Me)|0,u=u+Math.imul(Z,Ee)|0,u=u+Math.imul(Y,Me)|0,b=b+Math.imul(Y,Ee)|0,p=p+Math.imul(K,Se)|0,u=u+Math.imul(K,Be)|0,u=u+Math.imul(G,Se)|0,b=b+Math.imul(G,Be)|0,p=p+Math.imul(N,Ae)|0,u=u+Math.imul(N,Re)|0,u=u+Math.imul(U,Ae)|0,b=b+Math.imul(U,Re)|0,p=p+Math.imul(c,qe)|0,u=u+Math.imul(c,Ie)|0,u=u+Math.imul(x,qe)|0,b=b+Math.imul(x,Ie)|0;var Zr=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,p=Math.imul(ue,de),u=Math.imul(ue,pe),u=u+Math.imul(he,de)|0,b=Math.imul(he,pe),p=p+Math.imul(fe,ve)|0,u=u+Math.imul(fe,ye)|0,u=u+Math.imul(se,ve)|0,b=b+Math.imul(se,ye)|0,p=p+Math.imul(ae,ge)|0,u=u+Math.imul(ae,me)|0,u=u+Math.imul(oe,ge)|0,b=b+Math.imul(oe,me)|0,p=p+Math.imul(ie,be)|0,u=u+Math.imul(ie,we)|0,u=u+Math.imul(ne,be)|0,b=b+Math.imul(ne,we)|0,p=p+Math.imul(te,_e)|0,u=u+Math.imul(te,xe)|0,u=u+Math.imul(re,_e)|0,b=b+Math.imul(re,xe)|0,p=p+Math.imul(Q,Me)|0,u=u+Math.imul(Q,Ee)|0,u=u+Math.imul(ee,Me)|0,b=b+Math.imul(ee,Ee)|0,p=p+Math.imul(Z,Se)|0,u=u+Math.imul(Z,Be)|0,u=u+Math.imul(Y,Se)|0,b=b+Math.imul(Y,Be)|0,p=p+Math.imul(K,Ae)|0,u=u+Math.imul(K,Re)|0,u=u+Math.imul(G,Ae)|0,b=b+Math.imul(G,Re)|0,p=p+Math.imul(N,qe)|0,u=u+Math.imul(N,Ie)|0,u=u+Math.imul(U,qe)|0,b=b+Math.imul(U,Ie)|0;var Yr=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Yr>>>26)|0,Yr&=67108863,p=Math.imul(ue,ve),u=Math.imul(ue,ye),u=u+Math.imul(he,ve)|0,b=Math.imul(he,ye),p=p+Math.imul(fe,ge)|0,u=u+Math.imul(fe,me)|0,u=u+Math.imul(se,ge)|0,b=b+Math.imul(se,me)|0,p=p+Math.imul(ae,be)|0,u=u+Math.imul(ae,we)|0,u=u+Math.imul(oe,be)|0,b=b+Math.imul(oe,we)|0,p=p+Math.imul(ie,_e)|0,u=u+Math.imul(ie,xe)|0,u=u+Math.imul(ne,_e)|0,b=b+Math.imul(ne,xe)|0,p=p+Math.imul(te,Me)|0,u=u+Math.imul(te,Ee)|0,u=u+Math.imul(re,Me)|0,b=b+Math.imul(re,Ee)|0,p=p+Math.imul(Q,Se)|0,u=u+Math.imul(Q,Be)|0,u=u+Math.imul(ee,Se)|0,b=b+Math.imul(ee,Be)|0,p=p+Math.imul(Z,Ae)|0,u=u+Math.imul(Z,Re)|0,u=u+Math.imul(Y,Ae)|0,b=b+Math.imul(Y,Re)|0,p=p+Math.imul(K,qe)|0,u=u+Math.imul(K,Ie)|0,u=u+Math.imul(G,qe)|0,b=b+Math.imul(G,Ie)|0;var Xr=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,p=Math.imul(ue,ge),u=Math.imul(ue,me),u=u+Math.imul(he,ge)|0,b=Math.imul(he,me),p=p+Math.imul(fe,be)|0,u=u+Math.imul(fe,we)|0,u=u+Math.imul(se,be)|0,b=b+Math.imul(se,we)|0,p=p+Math.imul(ae,_e)|0,u=u+Math.imul(ae,xe)|0,u=u+Math.imul(oe,_e)|0,b=b+Math.imul(oe,xe)|0,p=p+Math.imul(ie,Me)|0,u=u+Math.imul(ie,Ee)|0,u=u+Math.imul(ne,Me)|0,b=b+Math.imul(ne,Ee)|0,p=p+Math.imul(te,Se)|0,u=u+Math.imul(te,Be)|0,u=u+Math.imul(re,Se)|0,b=b+Math.imul(re,Be)|0,p=p+Math.imul(Q,Ae)|0,u=u+Math.imul(Q,Re)|0,u=u+Math.imul(ee,Ae)|0,b=b+Math.imul(ee,Re)|0,p=p+Math.imul(Z,qe)|0,u=u+Math.imul(Z,Ie)|0,u=u+Math.imul(Y,qe)|0,b=b+Math.imul(Y,Ie)|0;var Jr=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,p=Math.imul(ue,be),u=Math.imul(ue,we),u=u+Math.imul(he,be)|0,b=Math.imul(he,we),p=p+Math.imul(fe,_e)|0,u=u+Math.imul(fe,xe)|0,u=u+Math.imul(se,_e)|0,b=b+Math.imul(se,xe)|0,p=p+Math.imul(ae,Me)|0,u=u+Math.imul(ae,Ee)|0,u=u+Math.imul(oe,Me)|0,b=b+Math.imul(oe,Ee)|0,p=p+Math.imul(ie,Se)|0,u=u+Math.imul(ie,Be)|0,u=u+Math.imul(ne,Se)|0,b=b+Math.imul(ne,Be)|0,p=p+Math.imul(te,Ae)|0,u=u+Math.imul(te,Re)|0,u=u+Math.imul(re,Ae)|0,b=b+Math.imul(re,Re)|0,p=p+Math.imul(Q,qe)|0,u=u+Math.imul(Q,Ie)|0,u=u+Math.imul(ee,qe)|0,b=b+Math.imul(ee,Ie)|0;var Qr=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,p=Math.imul(ue,_e),u=Math.imul(ue,xe),u=u+Math.imul(he,_e)|0,b=Math.imul(he,xe),p=p+Math.imul(fe,Me)|0,u=u+Math.imul(fe,Ee)|0,u=u+Math.imul(se,Me)|0,b=b+Math.imul(se,Ee)|0,p=p+Math.imul(ae,Se)|0,u=u+Math.imul(ae,Be)|0,u=u+Math.imul(oe,Se)|0,b=b+Math.imul(oe,Be)|0,p=p+Math.imul(ie,Ae)|0,u=u+Math.imul(ie,Re)|0,u=u+Math.imul(ne,Ae)|0,b=b+Math.imul(ne,Re)|0,p=p+Math.imul(te,qe)|0,u=u+Math.imul(te,Ie)|0,u=u+Math.imul(re,qe)|0,b=b+Math.imul(re,Ie)|0;var ei=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(ei>>>26)|0,ei&=67108863,p=Math.imul(ue,Me),u=Math.imul(ue,Ee),u=u+Math.imul(he,Me)|0,b=Math.imul(he,Ee),p=p+Math.imul(fe,Se)|0,u=u+Math.imul(fe,Be)|0,u=u+Math.imul(se,Se)|0,b=b+Math.imul(se,Be)|0,p=p+Math.imul(ae,Ae)|0,u=u+Math.imul(ae,Re)|0,u=u+Math.imul(oe,Ae)|0,b=b+Math.imul(oe,Re)|0,p=p+Math.imul(ie,qe)|0,u=u+Math.imul(ie,Ie)|0,u=u+Math.imul(ne,qe)|0,b=b+Math.imul(ne,Ie)|0;var ti=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(ti>>>26)|0,ti&=67108863,p=Math.imul(ue,Se),u=Math.imul(ue,Be),u=u+Math.imul(he,Se)|0,b=Math.imul(he,Be),p=p+Math.imul(fe,Ae)|0,u=u+Math.imul(fe,Re)|0,u=u+Math.imul(se,Ae)|0,b=b+Math.imul(se,Re)|0,p=p+Math.imul(ae,qe)|0,u=u+Math.imul(ae,Ie)|0,u=u+Math.imul(oe,qe)|0,b=b+Math.imul(oe,Ie)|0;var ri=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(ri>>>26)|0,ri&=67108863,p=Math.imul(ue,Ae),u=Math.imul(ue,Re),u=u+Math.imul(he,Ae)|0,b=Math.imul(he,Re),p=p+Math.imul(fe,qe)|0,u=u+Math.imul(fe,Ie)|0,u=u+Math.imul(se,qe)|0,b=b+Math.imul(se,Ie)|0;var ii=(g+p|0)+((u&8191)<<13)|0;g=(b+(u>>>13)|0)+(ii>>>26)|0,ii&=67108863,p=Math.imul(ue,qe),u=Math.imul(ue,Ie),u=u+Math.imul(he,qe)|0,b=Math.imul(he,Ie);var ni=(g+p|0)+((u&8191)<<13)|0;return g=(b+(u>>>13)|0)+(ni>>>26)|0,ni&=67108863,d[0]=Ui,d[1]=Ge,d[2]=Ve,d[3]=Kr,d[4]=Wr,d[5]=zr,d[6]=Gr,d[7]=Vr,d[8]=$r,d[9]=Zr,d[10]=Yr,d[11]=Xr,d[12]=Jr,d[13]=Qr,d[14]=ei,d[15]=ti,d[16]=ri,d[17]=ii,d[18]=ni,g!==0&&(d[19]=g,l.length++),l};Math.imul||(j=C);function V(M,h,y){y.negative=h.negative^M.negative,y.length=M.length+h.length;for(var l=0,o=0,s=0;s<y.length-1;s++){var d=o;o=0;for(var g=l&67108863,p=Math.min(s,h.length-1),u=Math.max(0,s-M.length+1);u<=p;u++){var b=s-u,_=M.words[b]|0,c=h.words[u]|0,x=_*c,P=x&67108863;d=d+(x/67108864|0)|0,P=P+g|0,g=P&67108863,d=d+(P>>>26)|0,o+=d>>>26,d&=67108863}y.words[s]=g,l=d,d=o}return l!==0?y.words[s]=l:y.length--,y.strip()}function X(M,h,y){var l=new z;return l.mulp(M,h,y)}i.prototype.mulTo=function(h,y){var l,o=this.length+h.length;return this.length===10&&h.length===10?l=j(this,h,y):o<63?l=C(this,h,y):o<1024?l=V(this,h,y):l=X(this,h,y),l};function z(M,h){this.x=M,this.y=h}z.prototype.makeRBT=function(h){for(var y=new Array(h),l=i.prototype._countBits(h)-1,o=0;o<h;o++)y[o]=this.revBin(o,l,h);return y},z.prototype.revBin=function(h,y,l){if(h===0||h===l-1)return h;for(var o=0,s=0;s<y;s++)o|=(h&1)<<y-s-1,h>>=1;return o},z.prototype.permute=function(h,y,l,o,s,d){for(var g=0;g<d;g++)o[g]=y[h[g]],s[g]=l[h[g]]},z.prototype.transform=function(h,y,l,o,s,d){this.permute(d,h,y,l,o,s);for(var g=1;g<s;g<<=1)for(var p=g<<1,u=Math.cos(2*Math.PI/p),b=Math.sin(2*Math.PI/p),_=0;_<s;_+=p)for(var c=u,x=b,P=0;P<g;P++){var N=l[_+P],U=o[_+P],W=l[_+P+g],K=o[_+P+g],G=c*W-x*K;K=c*K+x*W,W=G,l[_+P]=N+W,o[_+P]=U+K,l[_+P+g]=N-W,o[_+P+g]=U-K,P!==p&&(G=u*c-b*x,x=u*x+b*c,c=G)}},z.prototype.guessLen13b=function(h,y){var l=Math.max(y,h)|1,o=l&1,s=0;for(l=l/2|0;l;l=l>>>1)s++;return 1<<s+1+o},z.prototype.conjugate=function(h,y,l){if(!(l<=1))for(var o=0;o<l/2;o++){var s=h[o];h[o]=h[l-o-1],h[l-o-1]=s,s=y[o],y[o]=-y[l-o-1],y[l-o-1]=-s}},z.prototype.normalize13b=function(h,y){for(var l=0,o=0;o<y/2;o++){var s=Math.round(h[2*o+1]/y)*8192+Math.round(h[2*o]/y)+l;h[o]=s&67108863,s<67108864?l=0:l=s/67108864|0}return h},z.prototype.convert13b=function(h,y,l,o){for(var s=0,d=0;d<y;d++)s=s+(h[d]|0),l[2*d]=s&8191,s=s>>>13,l[2*d+1]=s&8191,s=s>>>13;for(d=2*y;d<o;++d)l[d]=0;r(s===0),r((s&-8192)===0)},z.prototype.stub=function(h){for(var y=new Array(h),l=0;l<h;l++)y[l]=0;return y},z.prototype.mulp=function(h,y,l){var o=2*this.guessLen13b(h.length,y.length),s=this.makeRBT(o),d=this.stub(o),g=new Array(o),p=new Array(o),u=new Array(o),b=new Array(o),_=new Array(o),c=new Array(o),x=l.words;x.length=o,this.convert13b(h.words,h.length,g,o),this.convert13b(y.words,y.length,b,o),this.transform(g,d,p,u,o,s),this.transform(b,d,_,c,o,s);for(var P=0;P<o;P++){var N=p[P]*_[P]-u[P]*c[P];u[P]=p[P]*c[P]+u[P]*_[P],p[P]=N}return this.conjugate(p,u,o),this.transform(p,u,x,d,o,s),this.conjugate(x,d,o),this.normalize13b(x,o),l.negative=h.negative^y.negative,l.length=h.length+y.length,l.strip()},i.prototype.mul=function(h){var y=new i(null);return y.words=new Array(this.length+h.length),this.mulTo(h,y)},i.prototype.mulf=function(h){var y=new i(null);return y.words=new Array(this.length+h.length),X(this,h,y)},i.prototype.imul=function(h){return this.clone().mulTo(h,this)},i.prototype.imuln=function(h){r(typeof h=="number"),r(h<67108864);for(var y=0,l=0;l<this.length;l++){var o=(this.words[l]|0)*h,s=(o&67108863)+(y&67108863);y>>=26,y+=o/67108864|0,y+=s>>>26,this.words[l]=s&67108863}return y!==0&&(this.words[l]=y,this.length++),this.length=h===0?1:this.length,this},i.prototype.muln=function(h){return this.clone().imuln(h)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(h){var y=I(h);if(y.length===0)return new i(1);for(var l=this,o=0;o<y.length&&y[o]===0;o++,l=l.sqr());if(++o<y.length)for(var s=l.sqr();o<y.length;o++,s=s.sqr())y[o]!==0&&(l=l.mul(s));return l},i.prototype.iushln=function(h){r(typeof h=="number"&&h>=0);var y=h%26,l=(h-y)/26,o=67108863>>>26-y<<26-y,s;if(y!==0){var d=0;for(s=0;s<this.length;s++){var g=this.words[s]&o,p=(this.words[s]|0)-g<<y;this.words[s]=p|d,d=g>>>26-y}d&&(this.words[s]=d,this.length++)}if(l!==0){for(s=this.length-1;s>=0;s--)this.words[s+l]=this.words[s];for(s=0;s<l;s++)this.words[s]=0;this.length+=l}return this.strip()},i.prototype.ishln=function(h){return r(this.negative===0),this.iushln(h)},i.prototype.iushrn=function(h,y,l){r(typeof h=="number"&&h>=0);var o;y?o=(y-y%26)/26:o=0;var s=h%26,d=Math.min((h-s)/26,this.length),g=67108863^67108863>>>s<<s,p=l;if(o-=d,o=Math.max(0,o),p){for(var u=0;u<d;u++)p.words[u]=this.words[u];p.length=d}if(d!==0)if(this.length>d)for(this.length-=d,u=0;u<this.length;u++)this.words[u]=this.words[u+d];else this.words[0]=0,this.length=1;var b=0;for(u=this.length-1;u>=0&&(b!==0||u>=o);u--){var _=this.words[u]|0;this.words[u]=b<<26-s|_>>>s,b=_&g}return p&&b!==0&&(p.words[p.length++]=b),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(h,y,l){return r(this.negative===0),this.iushrn(h,y,l)},i.prototype.shln=function(h){return this.clone().ishln(h)},i.prototype.ushln=function(h){return this.clone().iushln(h)},i.prototype.shrn=function(h){return this.clone().ishrn(h)},i.prototype.ushrn=function(h){return this.clone().iushrn(h)},i.prototype.testn=function(h){r(typeof h=="number"&&h>=0);var y=h%26,l=(h-y)/26,o=1<<y;if(this.length<=l)return!1;var s=this.words[l];return!!(s&o)},i.prototype.imaskn=function(h){r(typeof h=="number"&&h>=0);var y=h%26,l=(h-y)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(y!==0&&l++,this.length=Math.min(l,this.length),y!==0){var o=67108863^67108863>>>y<<y;this.words[this.length-1]&=o}return this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.maskn=function(h){return this.clone().imaskn(h)},i.prototype.iaddn=function(h){return r(typeof h=="number"),r(h<67108864),h<0?this.isubn(-h):this.negative!==0?this.length===1&&(this.words[0]|0)<h?(this.words[0]=h-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(h),this.negative=1,this):this._iaddn(h)},i.prototype._iaddn=function(h){this.words[0]+=h;for(var y=0;y<this.length&&this.words[y]>=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},i.prototype.isubn=function(h){if(r(typeof h=="number"),r(h<67108864),h<0)return this.iaddn(-h);if(this.negative!==0)return this.negative=0,this.iaddn(h),this.negative=1,this;if(this.words[0]-=h,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y<this.length&&this.words[y]<0;y++)this.words[y]+=67108864,this.words[y+1]-=1;return this.strip()},i.prototype.addn=function(h){return this.clone().iaddn(h)},i.prototype.subn=function(h){return this.clone().isubn(h)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(h,y,l){var o=h.length+l,s;this._expand(o);var d,g=0;for(s=0;s<h.length;s++){d=(this.words[s+l]|0)+g;var p=(h.words[s]|0)*y;d-=p&67108863,g=(d>>26)-(p/67108864|0),this.words[s+l]=d&67108863}for(;s<this.length-l;s++)d=(this.words[s+l]|0)+g,g=d>>26,this.words[s+l]=d&67108863;if(g===0)return this.strip();for(r(g===-1),g=0,s=0;s<this.length;s++)d=-(this.words[s]|0)+g,g=d>>26,this.words[s]=d&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(h,y){var l=this.length-h.length,o=this.clone(),s=h,d=s.words[s.length-1]|0,g=this._countBits(d);l=26-g,l!==0&&(s=s.ushln(l),o.iushln(l),d=s.words[s.length-1]|0);var p=o.length-s.length,u;if(y!=="mod"){u=new i(null),u.length=p+1,u.words=new Array(u.length);for(var b=0;b<u.length;b++)u.words[b]=0}var _=o.clone()._ishlnsubmul(s,1,p);_.negative===0&&(o=_,u&&(u.words[p]=1));for(var c=p-1;c>=0;c--){var x=(o.words[s.length+c]|0)*67108864+(o.words[s.length+c-1]|0);for(x=Math.min(x/d|0,67108863),o._ishlnsubmul(s,x,c);o.negative!==0;)x--,o.negative=0,o._ishlnsubmul(s,1,c),o.isZero()||(o.negative^=1);u&&(u.words[c]=x)}return u&&u.strip(),o.strip(),y!=="div"&&l!==0&&o.iushrn(l),{div:u||null,mod:o}},i.prototype.divmod=function(h,y,l){if(r(!h.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var o,s,d;return this.negative!==0&&h.negative===0?(d=this.neg().divmod(h,y),y!=="mod"&&(o=d.div.neg()),y!=="div"&&(s=d.mod.neg(),l&&s.negative!==0&&s.iadd(h)),{div:o,mod:s}):this.negative===0&&h.negative!==0?(d=this.divmod(h.neg(),y),y!=="mod"&&(o=d.div.neg()),{div:o,mod:d.mod}):(this.negative&h.negative)!==0?(d=this.neg().divmod(h.neg(),y),y!=="div"&&(s=d.mod.neg(),l&&s.negative!==0&&s.isub(h)),{div:d.div,mod:s}):h.length>this.length||this.cmp(h)<0?{div:new i(0),mod:this}:h.length===1?y==="div"?{div:this.divn(h.words[0]),mod:null}:y==="mod"?{div:null,mod:new i(this.modn(h.words[0]))}:{div:this.divn(h.words[0]),mod:new i(this.modn(h.words[0]))}:this._wordDiv(h,y)},i.prototype.div=function(h){return this.divmod(h,"div",!1).div},i.prototype.mod=function(h){return this.divmod(h,"mod",!1).mod},i.prototype.umod=function(h){return this.divmod(h,"mod",!0).mod},i.prototype.divRound=function(h){var y=this.divmod(h);if(y.mod.isZero())return y.div;var l=y.div.negative!==0?y.mod.isub(h):y.mod,o=h.ushrn(1),s=h.andln(1),d=l.cmp(o);return d<0||s===1&&d===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},i.prototype.modn=function(h){r(h<=67108863);for(var y=(1<<26)%h,l=0,o=this.length-1;o>=0;o--)l=(y*l+(this.words[o]|0))%h;return l},i.prototype.idivn=function(h){r(h<=67108863);for(var y=0,l=this.length-1;l>=0;l--){var o=(this.words[l]|0)+y*67108864;this.words[l]=o/h|0,y=o%h}return this.strip()},i.prototype.divn=function(h){return this.clone().idivn(h)},i.prototype.egcd=function(h){r(h.negative===0),r(!h.isZero());var y=this,l=h.clone();y.negative!==0?y=y.umod(h):y=y.clone();for(var o=new i(1),s=new i(0),d=new i(0),g=new i(1),p=0;y.isEven()&&l.isEven();)y.iushrn(1),l.iushrn(1),++p;for(var u=l.clone(),b=y.clone();!y.isZero();){for(var _=0,c=1;(y.words[0]&c)===0&&_<26;++_,c<<=1);if(_>0)for(y.iushrn(_);_-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(u),s.isub(b)),o.iushrn(1),s.iushrn(1);for(var x=0,P=1;(l.words[0]&P)===0&&x<26;++x,P<<=1);if(x>0)for(l.iushrn(x);x-- >0;)(d.isOdd()||g.isOdd())&&(d.iadd(u),g.isub(b)),d.iushrn(1),g.iushrn(1);y.cmp(l)>=0?(y.isub(l),o.isub(d),s.isub(g)):(l.isub(y),d.isub(o),g.isub(s))}return{a:d,b:g,gcd:l.iushln(p)}},i.prototype._invmp=function(h){r(h.negative===0),r(!h.isZero());var y=this,l=h.clone();y.negative!==0?y=y.umod(h):y=y.clone();for(var o=new i(1),s=new i(0),d=l.clone();y.cmpn(1)>0&&l.cmpn(1)>0;){for(var g=0,p=1;(y.words[0]&p)===0&&g<26;++g,p<<=1);if(g>0)for(y.iushrn(g);g-- >0;)o.isOdd()&&o.iadd(d),o.iushrn(1);for(var u=0,b=1;(l.words[0]&b)===0&&u<26;++u,b<<=1);if(u>0)for(l.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(d),s.iushrn(1);y.cmp(l)>=0?(y.isub(l),o.isub(s)):(l.isub(y),s.isub(o))}var _;return y.cmpn(1)===0?_=o:_=s,_.cmpn(0)<0&&_.iadd(h),_},i.prototype.gcd=function(h){if(this.isZero())return h.abs();if(h.isZero())return this.abs();var y=this.clone(),l=h.clone();y.negative=0,l.negative=0;for(var o=0;y.isEven()&&l.isEven();o++)y.iushrn(1),l.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;l.isEven();)l.iushrn(1);var s=y.cmp(l);if(s<0){var d=y;y=l,l=d}else if(s===0||l.cmpn(1)===0)break;y.isub(l)}while(!0);return l.iushln(o)},i.prototype.invm=function(h){return this.egcd(h).a.umod(h)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(h){return this.words[0]&h},i.prototype.bincn=function(h){r(typeof h=="number");var y=h%26,l=(h-y)/26,o=1<<y;if(this.length<=l)return this._expand(l+1),this.words[l]|=o,this;for(var s=o,d=l;s!==0&&d<this.length;d++){var g=this.words[d]|0;g+=s,s=g>>>26,g&=67108863,this.words[d]=g}return s!==0&&(this.words[d]=s,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(h){var y=h<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this.strip();var l;if(this.length>1)l=1;else{y&&(h=-h),r(h<=67108863,"Number is too big");var o=this.words[0]|0;l=o===h?0:o<h?-1:1}return this.negative!==0?-l|0:l},i.prototype.cmp=function(h){if(this.negative!==0&&h.negative===0)return-1;if(this.negative===0&&h.negative!==0)return 1;var y=this.ucmp(h);return this.negative!==0?-y|0:y},i.prototype.ucmp=function(h){if(this.length>h.length)return 1;if(this.length<h.length)return-1;for(var y=0,l=this.length-1;l>=0;l--){var o=this.words[l]|0,s=h.words[l]|0;if(o!==s){o<s?y=-1:o>s&&(y=1);break}}return y},i.prototype.gtn=function(h){return this.cmpn(h)===1},i.prototype.gt=function(h){return this.cmp(h)===1},i.prototype.gten=function(h){return this.cmpn(h)>=0},i.prototype.gte=function(h){return this.cmp(h)>=0},i.prototype.ltn=function(h){return this.cmpn(h)===-1},i.prototype.lt=function(h){return this.cmp(h)===-1},i.prototype.lten=function(h){return this.cmpn(h)<=0},i.prototype.lte=function(h){return this.cmp(h)<=0},i.prototype.eqn=function(h){return this.cmpn(h)===0},i.prototype.eq=function(h){return this.cmp(h)===0},i.red=function(h){return new F(h)},i.prototype.toRed=function(h){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),h.convertTo(this)._forceRed(h)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(h){return this.red=h,this},i.prototype.forceRed=function(h){return r(!this.red,"Already a number in reduction context"),this._forceRed(h)},i.prototype.redAdd=function(h){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,h)},i.prototype.redIAdd=function(h){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,h)},i.prototype.redSub=function(h){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,h)},i.prototype.redISub=function(h){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,h)},i.prototype.redShl=function(h){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,h)},i.prototype.redMul=function(h){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.mul(this,h)},i.prototype.redIMul=function(h){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.imul(this,h)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(h){return r(this.red&&!h.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,h)};var $={k256:null,p224:null,p192:null,p25519:null};function Fe(M,h){this.name=M,this.p=new i(h,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Fe.prototype._tmp=function(){var h=new i(null);return h.words=new Array(Math.ceil(this.n/13)),h},Fe.prototype.ireduce=function(h){var y=h,l;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),l=y.bitLength();while(l>this.n);var o=l<this.n?-1:y.ucmp(this.p);return o===0?(y.words[0]=0,y.length=1):o>0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},Fe.prototype.split=function(h,y){h.iushrn(this.n,0,y)},Fe.prototype.imulK=function(h){return h.imul(this.k)};function k(){Fe.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(k,Fe),k.prototype.split=function(h,y){for(var l=4194303,o=Math.min(h.length,9),s=0;s<o;s++)y.words[s]=h.words[s];if(y.length=o,h.length<=9){h.words[0]=0,h.length=1;return}var d=h.words[9];for(y.words[y.length++]=d&l,s=10;s<h.length;s++){var g=h.words[s]|0;h.words[s-10]=(g&l)<<4|d>>>22,d=g}d>>>=22,h.words[s-10]=d,d===0&&h.length>10?h.length-=10:h.length-=9},k.prototype.imulK=function(h){h.words[h.length]=0,h.words[h.length+1]=0,h.length+=2;for(var y=0,l=0;l<h.length;l++){var o=h.words[l]|0;y+=o*977,h.words[l]=y&67108863,y=o*64+(y/67108864|0)}return h.words[h.length-1]===0&&(h.length--,h.words[h.length-1]===0&&h.length--),h};function O(){Fe.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}n(O,Fe);function D(){Fe.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}n(D,Fe);function L(){Fe.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}n(L,Fe),L.prototype.imulK=function(h){for(var y=0,l=0;l<h.length;l++){var o=(h.words[l]|0)*19+y,s=o&67108863;o>>>=26,h.words[l]=s,y=o}return y!==0&&(h.words[h.length++]=y),h},i._prime=function(h){if($[h])return $[h];var y;if(h==="k256")y=new k;else if(h==="p224")y=new O;else if(h==="p192")y=new D;else if(h==="p25519")y=new L;else throw new Error("Unknown prime "+h);return $[h]=y,y};function F(M){if(typeof M=="string"){var h=i._prime(M);this.m=h.p,this.prime=h}else r(M.gtn(1),"modulus must be greater than 1"),this.m=M,this.prime=null}F.prototype._verify1=function(h){r(h.negative===0,"red works only with positives"),r(h.red,"red works only with red numbers")},F.prototype._verify2=function(h,y){r((h.negative|y.negative)===0,"red works only with positives"),r(h.red&&h.red===y.red,"red works only with red numbers")},F.prototype.imod=function(h){return this.prime?this.prime.ireduce(h)._forceRed(this):h.umod(this.m)._forceRed(this)},F.prototype.neg=function(h){return h.isZero()?h.clone():this.m.sub(h)._forceRed(this)},F.prototype.add=function(h,y){this._verify2(h,y);var l=h.add(y);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},F.prototype.iadd=function(h,y){this._verify2(h,y);var l=h.iadd(y);return l.cmp(this.m)>=0&&l.isub(this.m),l},F.prototype.sub=function(h,y){this._verify2(h,y);var l=h.sub(y);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},F.prototype.isub=function(h,y){this._verify2(h,y);var l=h.isub(y);return l.cmpn(0)<0&&l.iadd(this.m),l},F.prototype.shl=function(h,y){return this._verify1(h),this.imod(h.ushln(y))},F.prototype.imul=function(h,y){return this._verify2(h,y),this.imod(h.imul(y))},F.prototype.mul=function(h,y){return this._verify2(h,y),this.imod(h.mul(y))},F.prototype.isqr=function(h){return this.imul(h,h.clone())},F.prototype.sqr=function(h){return this.mul(h,h)},F.prototype.sqrt=function(h){if(h.isZero())return h.clone();var y=this.m.andln(3);if(r(y%2===1),y===3){var l=this.m.add(new i(1)).iushrn(2);return this.pow(h,l)}for(var o=this.m.subn(1),s=0;!o.isZero()&&o.andln(1)===0;)s++,o.iushrn(1);r(!o.isZero());var d=new i(1).toRed(this),g=d.redNeg(),p=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);this.pow(u,p).cmp(g)!==0;)u.redIAdd(g);for(var b=this.pow(u,o),_=this.pow(h,o.addn(1).iushrn(1)),c=this.pow(h,o),x=s;c.cmp(d)!==0;){for(var P=c,N=0;P.cmp(d)!==0;N++)P=P.redSqr();r(N<x);var U=this.pow(b,new i(1).iushln(x-N-1));_=_.redMul(U),b=U.redSqr(),c=c.redMul(b),x=N}return _},F.prototype.invm=function(h){var y=h._invmp(this.m);return y.negative!==0?(y.negative=0,this.imod(y).redNeg()):this.imod(y)},F.prototype.pow=function(h,y){if(y.isZero())return new i(1).toRed(this);if(y.cmpn(1)===0)return h.clone();var l=4,o=new Array(1<<l);o[0]=new i(1).toRed(this),o[1]=h;for(var s=2;s<o.length;s++)o[s]=this.mul(o[s-1],h);var d=o[0],g=0,p=0,u=y.bitLength()%26;for(u===0&&(u=26),s=y.length-1;s>=0;s--){for(var b=y.words[s],_=u-1;_>=0;_--){var c=b>>_&1;if(d!==o[0]&&(d=this.sqr(d)),c===0&&g===0){p=0;continue}g<<=1,g|=c,p++,!(p!==l&&(s!==0||_!==0))&&(d=this.mul(d,o[g]),p=0,g=0)}u=26}return d},F.prototype.convertTo=function(h){var y=h.umod(this.m);return y===h?y.clone():y},F.prototype.convertFrom=function(h){var y=h.clone();return y.red=null,y},i.mont=function(h){return new H(h)};function H(M){F.call(this,M),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(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)}n(H,F),H.prototype.convertTo=function(h){return this.imod(h.ushln(this.shift))},H.prototype.convertFrom=function(h){var y=this.imod(h.mul(this.rinv));return y.red=null,y},H.prototype.imul=function(h,y){if(h.isZero()||y.isZero())return h.words[0]=0,h.length=1,h;var l=h.imul(y),o=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=l.isub(o).iushrn(this.shift),d=s;return s.cmp(this.m)>=0?d=s.isub(this.m):s.cmpn(0)<0&&(d=s.iadd(this.m)),d._forceRed(this)},H.prototype.mul=function(h,y){if(h.isZero()||y.isZero())return new i(0)._forceRed(this);var l=h.mul(y),o=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=l.isub(o).iushrn(this.shift),d=s;return s.cmp(this.m)>=0?d=s.isub(this.m):s.cmpn(0)<0&&(d=s.iadd(this.m)),d._forceRed(this)},H.prototype.invm=function(h){var y=this.imod(h._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof cs>"u"||cs,zl)});var ke=R((ds,Vl)=>{w();var Qa=ft(),Zt=Qa.Buffer;function Gl(t,e){for(var r in t)e[r]=t[r]}Zt.from&&Zt.alloc&&Zt.allocUnsafe&&Zt.allocUnsafeSlow?Vl.exports=Qa:(Gl(Qa,ds),ds.Buffer=si);function si(t,e,r){return Zt(t,e,r)}si.prototype=Object.create(Zt.prototype);Gl(Zt,si);si.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Zt(t,e,r)};si.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=Zt(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};si.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Zt(t)};si.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Qa.SlowBuffer(t)}});var ui=R((zB,vs)=>{"use strict";w();var ps=65536,M2=4294967295;function E2(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
2
|
+
Use Chrome, Firefox or Internet Explorer 11`)}var S2=ke().Buffer,eo=globalThis.crypto||globalThis.msCrypto;eo&&eo.getRandomValues?vs.exports=B2:vs.exports=E2;function B2(t,e){if(t>M2)throw new RangeError("requested too many random bytes");var r=S2.allocUnsafe(t);if(t>0)if(t>ps)for(var n=0;n<t;n+=ps)eo.getRandomValues(r.slice(n,n+ps));else eo.getRandomValues(r);return typeof e=="function"?S.default.nextTick(function(){e(null,r)}):r}});var J=R((VB,ys)=>{w();typeof Object.create=="function"?ys.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:ys.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}}});var Wi=R((ZB,gs)=>{"use strict";w();var Ki=typeof Reflect=="object"?Reflect:null,$l=Ki&&typeof Ki.apply=="function"?Ki.apply:function(e,r,n){return Function.prototype.apply.call(e,r,n)},to;Ki&&typeof Ki.ownKeys=="function"?to=Ki.ownKeys:Object.getOwnPropertySymbols?to=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:to=function(e){return Object.getOwnPropertyNames(e)};function A2(t){console&&console.warn&&console.warn(t)}var Yl=Number.isNaN||function(e){return e!==e};function je(){je.init.call(this)}gs.exports=je;gs.exports.once=k2;je.EventEmitter=je;je.prototype._events=void 0;je.prototype._eventsCount=0;je.prototype._maxListeners=void 0;var Zl=10;function ro(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(je,"defaultMaxListeners",{enumerable:!0,get:function(){return Zl},set:function(t){if(typeof t!="number"||t<0||Yl(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");Zl=t}});je.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};je.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||Yl(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function Xl(t){return t._maxListeners===void 0?je.defaultMaxListeners:t._maxListeners}je.prototype.getMaxListeners=function(){return Xl(this)};je.prototype.emit=function(e){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i=e==="error",a=this._events;if(a!==void 0)i=i&&a.error===void 0;else if(!i)return!1;if(i){var f;if(r.length>0&&(f=r[0]),f instanceof Error)throw f;var v=new Error("Unhandled error."+(f?" ("+f.message+")":""));throw v.context=f,v}var m=a[e];if(m===void 0)return!1;if(typeof m=="function")$l(m,this,r);else for(var E=m.length,A=r0(m,E),n=0;n<E;++n)$l(A[n],this,r);return!0};function Jl(t,e,r,n){var i,a,f;if(ro(r),a=t._events,a===void 0?(a=t._events=Object.create(null),t._eventsCount=0):(a.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),a=t._events),f=a[e]),f===void 0)f=a[e]=r,++t._eventsCount;else if(typeof f=="function"?f=a[e]=n?[r,f]:[f,r]:n?f.unshift(r):f.push(r),i=Xl(t),i>0&&f.length>i&&!f.warned){f.warned=!0;var v=new Error("Possible EventEmitter memory leak detected. "+f.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");v.name="MaxListenersExceededWarning",v.emitter=t,v.type=e,v.count=f.length,A2(v)}return t}je.prototype.addListener=function(e,r){return Jl(this,e,r,!1)};je.prototype.on=je.prototype.addListener;je.prototype.prependListener=function(e,r){return Jl(this,e,r,!0)};function R2(){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 Ql(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=R2.bind(n);return i.listener=r,n.wrapFn=i,i}je.prototype.once=function(e,r){return ro(r),this.on(e,Ql(this,e,r)),this};je.prototype.prependOnceListener=function(e,r){return ro(r),this.prependListener(e,Ql(this,e,r)),this};je.prototype.removeListener=function(e,r){var n,i,a,f,v;if(ro(r),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(a=-1,f=n.length-1;f>=0;f--)if(n[f]===r||n[f].listener===r){v=n[f].listener,a=f;break}if(a<0)return this;a===0?n.shift():q2(n,a),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,v||r)}return this};je.prototype.off=je.prototype.removeListener;je.prototype.removeAllListeners=function(e){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var a=Object.keys(n),f;for(i=0;i<a.length;++i)f=a[i],f!=="removeListener"&&this.removeAllListeners(f);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[e],typeof r=="function")this.removeListener(e,r);else if(r!==void 0)for(i=r.length-1;i>=0;i--)this.removeListener(e,r[i]);return this};function e0(t,e,r){var n=t._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?I2(i):r0(i,i.length)}je.prototype.listeners=function(e){return e0(this,e,!0)};je.prototype.rawListeners=function(e){return e0(this,e,!1)};je.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):t0.call(t,e)};je.prototype.listenerCount=t0;function t0(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}je.prototype.eventNames=function(){return this._eventsCount>0?to(this._events):[]};function r0(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function q2(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function I2(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function k2(t,e){return new Promise(function(r,n){function i(f){t.removeListener(e,a),n(f)}function a(){typeof t.removeListener=="function"&&t.removeListener("error",i),r([].slice.call(arguments))}i0(t,e,a,{once:!0}),e!=="error"&&T2(t,i,{once:!0})})}function T2(t,e,r){typeof t.on=="function"&&i0(t,"error",e,r)}function i0(t,e,r,n){if(typeof t.on=="function")n.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function i(a){n.once&&t.removeEventListener(e,i),r(a)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}});var ms=R((XB,n0)=>{w();n0.exports=Wi().EventEmitter});var bs=R((QB,a0)=>{"use strict";w();a0.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(var a in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var f=Object.getOwnPropertySymbols(e);if(f.length!==1||f[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var v=Object.getOwnPropertyDescriptor(e,r);if(v.value!==i||v.enumerable!==!0)return!1}return!0}});var Zn=R((t7,o0)=>{"use strict";w();var C2=bs();o0.exports=function(){return C2()&&!!Symbol.toStringTag}});var ws=R((i7,f0)=>{"use strict";w();f0.exports=Object});var u0=R((a7,s0)=>{"use strict";w();s0.exports=Error});var l0=R((f7,h0)=>{"use strict";w();h0.exports=EvalError});var d0=R((u7,c0)=>{"use strict";w();c0.exports=RangeError});var v0=R((l7,p0)=>{"use strict";w();p0.exports=ReferenceError});var _s=R((d7,y0)=>{"use strict";w();y0.exports=SyntaxError});var hi=R((v7,g0)=>{"use strict";w();g0.exports=TypeError});var b0=R((g7,m0)=>{"use strict";w();m0.exports=URIError});var _0=R((b7,w0)=>{"use strict";w();w0.exports=Math.abs});var M0=R((_7,x0)=>{"use strict";w();x0.exports=Math.floor});var S0=R((M7,E0)=>{"use strict";w();E0.exports=Math.max});var A0=R((S7,B0)=>{"use strict";w();B0.exports=Math.min});var q0=R((A7,R0)=>{"use strict";w();R0.exports=Math.pow});var k0=R((q7,I0)=>{"use strict";w();I0.exports=Math.round});var C0=R((k7,T0)=>{"use strict";w();T0.exports=Number.isNaN||function(e){return e!==e}});var P0=R((C7,O0)=>{"use strict";w();var O2=C0();O0.exports=function(e){return O2(e)||e===0?e:e<0?-1:1}});var U0=R((P7,D0)=>{"use strict";w();D0.exports=Object.getOwnPropertyDescriptor});var li=R((U7,N0)=>{"use strict";w();var io=U0();if(io)try{io([],"length")}catch{io=null}N0.exports=io});var Yn=R((L7,L0)=>{"use strict";w();var no=Object.defineProperty||!1;if(no)try{no({},"a",{value:1})}catch{no=!1}L0.exports=no});var H0=R((j7,j0)=>{"use strict";w();var F0=typeof Symbol<"u"&&Symbol,P2=bs();j0.exports=function(){return typeof F0!="function"||typeof Symbol!="function"||typeof F0("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:P2()}});var xs=R((K7,K0)=>{"use strict";w();K0.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Ms=R((z7,W0)=>{"use strict";w();var D2=ws();W0.exports=D2.getPrototypeOf||null});var V0=R((V7,G0)=>{"use strict";w();var U2="Function.prototype.bind called on incompatible ",N2=Object.prototype.toString,L2=Math.max,F2="[object Function]",z0=function(e,r){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var a=0;a<r.length;a+=1)n[a+e.length]=r[a];return n},j2=function(e,r){for(var n=[],i=r||0,a=0;i<e.length;i+=1,a+=1)n[a]=e[i];return n},H2=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};G0.exports=function(e){var r=this;if(typeof r!="function"||N2.apply(r)!==F2)throw new TypeError(U2+r);for(var n=j2(arguments,1),i,a=function(){if(this instanceof i){var A=r.apply(this,z0(n,arguments));return Object(A)===A?A:this}return r.apply(e,z0(n,arguments))},f=L2(0,r.length-n.length),v=[],m=0;m<f;m++)v[m]="$"+m;if(i=Function("binder","return function ("+H2(v,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var E=function(){};E.prototype=r.prototype,i.prototype=new E,E.prototype=null}return i}});var zi=R((Z7,$0)=>{"use strict";w();var K2=V0();$0.exports=Function.prototype.bind||K2});var ao=R((X7,Z0)=>{"use strict";w();Z0.exports=Function.prototype.call});var oo=R((Q7,Y0)=>{"use strict";w();Y0.exports=Function.prototype.apply});var J0=R((tA,X0)=>{"use strict";w();X0.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Es=R((iA,Q0)=>{"use strict";w();var W2=zi(),z2=oo(),G2=ao(),V2=J0();Q0.exports=V2||W2.call(G2,z2)});var fo=R((aA,ec)=>{"use strict";w();var $2=zi(),Z2=hi(),Y2=ao(),X2=Es();ec.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new Z2("a function is required");return X2($2,Y2,e)}});var oc=R((fA,ac)=>{"use strict";w();var J2=fo(),tc=li(),ic;try{ic=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var Ss=!!ic&&tc&&tc(Object.prototype,"__proto__"),nc=Object,rc=nc.getPrototypeOf;ac.exports=Ss&&typeof Ss.get=="function"?J2([Ss.get]):typeof rc=="function"?function(e){return rc(e==null?e:nc(e))}:!1});var so=R((uA,hc)=>{"use strict";w();var fc=xs(),sc=Ms(),uc=oc();hc.exports=fc?function(e){return fc(e)}:sc?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return sc(e)}:uc?function(e){return uc(e)}:null});var Bs=R((lA,lc)=>{"use strict";w();var Q2=Function.prototype.call,ew=Object.prototype.hasOwnProperty,tw=zi();lc.exports=tw.call(Q2,ew)});var qs=R((dA,gc)=>{"use strict";w();var Oe,rw=ws(),iw=u0(),nw=l0(),aw=d0(),ow=v0(),Zi=_s(),$i=hi(),fw=b0(),sw=_0(),uw=M0(),hw=S0(),lw=A0(),cw=q0(),dw=k0(),pw=P0(),vc=Function,As=function(t){try{return vc('"use strict"; return ('+t+").constructor;")()}catch{}},Xn=li(),vw=Yn(),Rs=function(){throw new $i},yw=Xn?(function(){try{return arguments.callee,Rs}catch{try{return Xn(arguments,"callee").get}catch{return Rs}}})():Rs,Gi=H0()(),it=so(),gw=Ms(),mw=xs(),yc=oo(),Jn=ao(),Vi={},bw=typeof Uint8Array>"u"||!it?Oe:it(Uint8Array),ci={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Oe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Oe:ArrayBuffer,"%ArrayIteratorPrototype%":Gi&&it?it([][Symbol.iterator]()):Oe,"%AsyncFromSyncIteratorPrototype%":Oe,"%AsyncFunction%":Vi,"%AsyncGenerator%":Vi,"%AsyncGeneratorFunction%":Vi,"%AsyncIteratorPrototype%":Vi,"%Atomics%":typeof Atomics>"u"?Oe:Atomics,"%BigInt%":typeof BigInt>"u"?Oe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Oe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Oe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Oe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":iw,"%eval%":eval,"%EvalError%":nw,"%Float16Array%":typeof Float16Array>"u"?Oe:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Oe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Oe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Oe:FinalizationRegistry,"%Function%":vc,"%GeneratorFunction%":Vi,"%Int8Array%":typeof Int8Array>"u"?Oe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Oe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Oe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Gi&&it?it(it([][Symbol.iterator]())):Oe,"%JSON%":typeof JSON=="object"?JSON:Oe,"%Map%":typeof Map>"u"?Oe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Gi||!it?Oe:it(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":rw,"%Object.getOwnPropertyDescriptor%":Xn,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Oe:Promise,"%Proxy%":typeof Proxy>"u"?Oe:Proxy,"%RangeError%":aw,"%ReferenceError%":ow,"%Reflect%":typeof Reflect>"u"?Oe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Oe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Gi||!it?Oe:it(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Oe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Gi&&it?it(""[Symbol.iterator]()):Oe,"%Symbol%":Gi?Symbol:Oe,"%SyntaxError%":Zi,"%ThrowTypeError%":yw,"%TypedArray%":bw,"%TypeError%":$i,"%Uint8Array%":typeof Uint8Array>"u"?Oe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Oe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Oe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Oe:Uint32Array,"%URIError%":fw,"%WeakMap%":typeof WeakMap>"u"?Oe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Oe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Oe:WeakSet,"%Function.prototype.call%":Jn,"%Function.prototype.apply%":yc,"%Object.defineProperty%":vw,"%Object.getPrototypeOf%":gw,"%Math.abs%":sw,"%Math.floor%":uw,"%Math.max%":hw,"%Math.min%":lw,"%Math.pow%":cw,"%Math.round%":dw,"%Math.sign%":pw,"%Reflect.getPrototypeOf%":mw};if(it)try{null.error}catch(t){cc=it(it(t)),ci["%Error.prototype%"]=cc}var cc,ww=function t(e){var r;if(e==="%AsyncFunction%")r=As("async function () {}");else if(e==="%GeneratorFunction%")r=As("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=As("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&it&&(r=it(i.prototype))}return ci[e]=r,r},dc={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Qn=zi(),uo=Bs(),_w=Qn.call(Jn,Array.prototype.concat),xw=Qn.call(yc,Array.prototype.splice),pc=Qn.call(Jn,String.prototype.replace),ho=Qn.call(Jn,String.prototype.slice),Mw=Qn.call(Jn,RegExp.prototype.exec),Ew=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Sw=/\\(\\)?/g,Bw=function(e){var r=ho(e,0,1),n=ho(e,-1);if(r==="%"&&n!=="%")throw new Zi("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Zi("invalid intrinsic syntax, expected opening `%`");var i=[];return pc(e,Ew,function(a,f,v,m){i[i.length]=v?pc(m,Sw,"$1"):f||a}),i},Aw=function(e,r){var n=e,i;if(uo(dc,n)&&(i=dc[n],n="%"+i[0]+"%"),uo(ci,n)){var a=ci[n];if(a===Vi&&(a=ww(n)),typeof a>"u"&&!r)throw new $i("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new Zi("intrinsic "+e+" does not exist!")};gc.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new $i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new $i('"allowMissing" argument must be a boolean');if(Mw(/^%?[^%]*%?$/,e)===null)throw new Zi("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Bw(e),i=n.length>0?n[0]:"",a=Aw("%"+i+"%",r),f=a.name,v=a.value,m=!1,E=a.alias;E&&(i=E[0],xw(n,_w([0,1],E)));for(var A=1,q=!0;A<n.length;A+=1){var I=n[A],C=ho(I,0,1),j=ho(I,-1);if((C==='"'||C==="'"||C==="`"||j==='"'||j==="'"||j==="`")&&C!==j)throw new Zi("property names with quotes must have matching quotes");if((I==="constructor"||!q)&&(m=!0),i+="."+I,f="%"+i+"%",uo(ci,f))v=ci[f];else if(v!=null){if(!(I in v)){if(!r)throw new $i("base intrinsic for "+e+" exists, but the property is not available.");return}if(Xn&&A+1>=n.length){var V=Xn(v,I);q=!!V,q&&"get"in V&&!("originalValue"in V.get)?v=V.get:v=v[I]}else q=uo(v,I),v=v[I];q&&!m&&(ci[f]=v)}}return v}});var di=R((vA,wc)=>{"use strict";w();var mc=qs(),bc=fo(),Rw=bc([mc("%String.prototype.indexOf%")]);wc.exports=function(e,r){var n=mc(e,!!r);return typeof n=="function"&&Rw(e,".prototype.")>-1?bc([n]):n}});var Mc=R((gA,xc)=>{"use strict";w();var qw=Zn()(),Iw=di(),Is=Iw("Object.prototype.toString"),lo=function(e){return qw&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:Is(e)==="[object Arguments]"},_c=function(e){return lo(e)?!0:e!==null&&typeof e=="object"&&"length"in e&&typeof e.length=="number"&&e.length>=0&&Is(e)!=="[object Array]"&&"callee"in e&&Is(e.callee)==="[object Function]"},kw=(function(){return lo(arguments)})();lo.isLegacyArguments=_c;xc.exports=kw?lo:_c});var qc=R((bA,Rc)=>{"use strict";w();var Ec=di(),Tw=Zn()(),Cw=Bs(),Ow=li(),Cs;Tw?(Sc=Ec("RegExp.prototype.exec"),ks={},co=function(){throw ks},Ts={toString:co,valueOf:co},typeof Symbol.toPrimitive=="symbol"&&(Ts[Symbol.toPrimitive]=co),Cs=function(e){if(!e||typeof e!="object")return!1;var r=Ow(e,"lastIndex"),n=r&&Cw(r,"value");if(!n)return!1;try{Sc(e,Ts)}catch(i){return i===ks}}):(Bc=Ec("Object.prototype.toString"),Ac="[object RegExp]",Cs=function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:Bc(e)===Ac});var Sc,ks,co,Ts,Bc,Ac;Rc.exports=Cs});var kc=R((_A,Ic)=>{"use strict";w();var Pw=di(),Dw=qc(),Uw=Pw("RegExp.prototype.exec"),Nw=hi();Ic.exports=function(e){if(!Dw(e))throw new Nw("`regex` must be a RegExp");return function(n){return Uw(e,n)!==null}}});var Cc=R((MA,Tc)=>{"use strict";w();var Lw=function*(){}.constructor;Tc.exports=()=>Lw});var Uc=R((SA,Dc)=>{"use strict";w();var Pc=di(),Fw=kc(),jw=Fw(/^\s*(?:function)?\*/),Hw=Zn()(),Oc=so(),Kw=Pc("Object.prototype.toString"),Ww=Pc("Function.prototype.toString"),zw=Cc();Dc.exports=function(e){if(typeof e!="function")return!1;if(jw(Ww(e)))return!0;if(!Hw){var r=Kw(e);return r==="[object GeneratorFunction]"}if(!Oc)return!1;var n=zw();return n&&Oc(e)===n.prototype}});var jc=R((AA,Fc)=>{"use strict";w();var Lc=Function.prototype.toString,Yi=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Ps,po;if(typeof Yi=="function"&&typeof Object.defineProperty=="function")try{Ps=Object.defineProperty({},"length",{get:function(){throw po}}),po={},Yi(function(){throw 42},null,Ps)}catch(t){t!==po&&(Yi=null)}else Yi=null;var Gw=/^\s*class\b/,Ds=function(e){try{var r=Lc.call(e);return Gw.test(r)}catch{return!1}},Os=function(e){try{return Ds(e)?!1:(Lc.call(e),!0)}catch{return!1}},vo=Object.prototype.toString,Vw="[object Object]",$w="[object Function]",Zw="[object GeneratorFunction]",Yw="[object HTMLAllCollection]",Xw="[object HTML document.all class]",Jw="[object HTMLCollection]",Qw=typeof Symbol=="function"&&!!Symbol.toStringTag,e_=!(0 in[,]),Us=function(){return!1};typeof document=="object"&&(Nc=document.all,vo.call(Nc)===vo.call(document.all)&&(Us=function(e){if((e_||!e)&&(typeof e>"u"||typeof e=="object"))try{var r=vo.call(e);return(r===Yw||r===Xw||r===Jw||r===Vw)&&e("")==null}catch{}return!1}));var Nc;Fc.exports=Yi?function(e){if(Us(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Yi(e,null,Ps)}catch(r){if(r!==po)return!1}return!Ds(e)&&Os(e)}:function(e){if(Us(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(Qw)return Os(e);if(Ds(e))return!1;var r=vo.call(e);return r!==$w&&r!==Zw&&!/^\[object HTML/.test(r)?!1:Os(e)}});var Wc=R((qA,Kc)=>{"use strict";w();var t_=jc(),r_=Object.prototype.toString,Hc=Object.prototype.hasOwnProperty,i_=function(e,r,n){for(var i=0,a=e.length;i<a;i++)Hc.call(e,i)&&(n==null?r(e[i],i,e):r.call(n,e[i],i,e))},n_=function(e,r,n){for(var i=0,a=e.length;i<a;i++)n==null?r(e.charAt(i),i,e):r.call(n,e.charAt(i),i,e)},a_=function(e,r,n){for(var i in e)Hc.call(e,i)&&(n==null?r(e[i],i,e):r.call(n,e[i],i,e))};function o_(t){return r_.call(t)==="[object Array]"}Kc.exports=function(e,r,n){if(!t_(r))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),o_(e)?i_(e,r,i):typeof e=="string"?n_(e,r,i):a_(e,r,i)}});var Gc=R((kA,zc)=>{"use strict";w();zc.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var $c=R((CA,Vc)=>{"use strict";w();var Ns=Gc(),f_=globalThis;Vc.exports=function(){for(var e=[],r=0;r<Ns.length;r++)typeof f_[Ns[r]]=="function"&&(e[e.length]=Ns[r]);return e}});var Jc=R((PA,Xc)=>{"use strict";w();var Zc=Yn(),s_=_s(),Xi=hi(),Yc=li();Xc.exports=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new Xi("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Xi("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Xi("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Xi("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Xi("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Xi("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,v=arguments.length>6?arguments[6]:!1,m=!!Yc&&Yc(e,r);if(Zc)Zc(e,r,{configurable:f===null&&m?m.configurable:!f,enumerable:i===null&&m?m.enumerable:!i,value:n,writable:a===null&&m?m.writable:!a});else if(v||!i&&!a&&!f)e[r]=n;else throw new s_("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var td=R((UA,ed)=>{"use strict";w();var Ls=Yn(),Qc=function(){return!!Ls};Qc.hasArrayLengthDefineBug=function(){if(!Ls)return null;try{return Ls([],"length",{value:1}).length!==1}catch{return!0}};ed.exports=Qc});var od=R((LA,ad)=>{"use strict";w();var u_=qs(),rd=Jc(),h_=td()(),id=li(),nd=hi(),l_=u_("%Math.floor%");ad.exports=function(e,r){if(typeof e!="function")throw new nd("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||l_(r)!==r)throw new nd("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in e&&id){var f=id(e,"length");f&&!f.configurable&&(i=!1),f&&!f.writable&&(a=!1)}return(i||a||!n)&&(h_?rd(e,"length",r,!0,!0):rd(e,"length",r)),e}});var sd=R((jA,fd)=>{"use strict";w();var c_=zi(),d_=oo(),p_=Es();fd.exports=function(){return p_(c_,d_,arguments)}});var ld=R((KA,yo)=>{"use strict";w();var v_=od(),ud=Yn(),y_=fo(),hd=sd();yo.exports=function(e){var r=y_(arguments),n=1+e.length-(arguments.length-1);return v_(r,n>0?n:0,!0)};ud?ud(yo.exports,"apply",{value:hd}):yo.exports.apply=hd});var Ks=R((zA,vd)=>{"use strict";w();var bo=Wc(),g_=$c(),cd=ld(),js=di(),mo=li(),go=so(),m_=js("Object.prototype.toString"),pd=Zn()(),dd=globalThis,Fs=g_(),Hs=js("String.prototype.slice"),b_=js("Array.prototype.indexOf",!0)||function(e,r){for(var n=0;n<e.length;n+=1)if(e[n]===r)return n;return-1},wo={__proto__:null};pd&&mo&&go?bo(Fs,function(t){var e=new dd[t];if(Symbol.toStringTag in e&&go){var r=go(e),n=mo(r,Symbol.toStringTag);if(!n&&r){var i=go(r);n=mo(i,Symbol.toStringTag)}if(n&&n.get){var a=cd(n.get);wo["$"+t]=a}}}):bo(Fs,function(t){var e=new dd[t],r=e.slice||e.set;if(r){var n=cd(r);wo["$"+t]=n}});var w_=function(e){var r=!1;return bo(wo,function(n,i){if(!r)try{"$"+n(e)===i&&(r=Hs(i,1))}catch{}}),r},__=function(e){var r=!1;return bo(wo,function(n,i){if(!r)try{n(e),r=Hs(i,1)}catch{}}),r};vd.exports=function(e){if(!e||typeof e!="object")return!1;if(!pd){var r=Hs(m_(e),8,-1);return b_(Fs,r)>-1?r:r!=="Object"?!1:__(e)}return mo?w_(e):null}});var Ws=R((VA,yd)=>{"use strict";w();var x_=Ks();yd.exports=function(e){return!!x_(e)}});var Id=R(Pe=>{"use strict";w();var M_=Mc(),E_=Uc(),kt=Ks(),gd=Ws();function Ji(t){return t.call.bind(t)}var md=typeof BigInt<"u",bd=typeof Symbol<"u",_t=Ji(Object.prototype.toString),S_=Ji(Number.prototype.valueOf),B_=Ji(String.prototype.valueOf),A_=Ji(Boolean.prototype.valueOf);md&&(wd=Ji(BigInt.prototype.valueOf));var wd;bd&&(_d=Ji(Symbol.prototype.valueOf));var _d;function ta(t,e){if(typeof t!="object")return!1;try{return e(t),!0}catch{return!1}}Pe.isArgumentsObject=M_;Pe.isGeneratorFunction=E_;Pe.isTypedArray=gd;function R_(t){return typeof Promise<"u"&&t instanceof Promise||t!==null&&typeof t=="object"&&typeof t.then=="function"&&typeof t.catch=="function"}Pe.isPromise=R_;function q_(t){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(t):gd(t)||Md(t)}Pe.isArrayBufferView=q_;function I_(t){return kt(t)==="Uint8Array"}Pe.isUint8Array=I_;function k_(t){return kt(t)==="Uint8ClampedArray"}Pe.isUint8ClampedArray=k_;function T_(t){return kt(t)==="Uint16Array"}Pe.isUint16Array=T_;function C_(t){return kt(t)==="Uint32Array"}Pe.isUint32Array=C_;function O_(t){return kt(t)==="Int8Array"}Pe.isInt8Array=O_;function P_(t){return kt(t)==="Int16Array"}Pe.isInt16Array=P_;function D_(t){return kt(t)==="Int32Array"}Pe.isInt32Array=D_;function U_(t){return kt(t)==="Float32Array"}Pe.isFloat32Array=U_;function N_(t){return kt(t)==="Float64Array"}Pe.isFloat64Array=N_;function L_(t){return kt(t)==="BigInt64Array"}Pe.isBigInt64Array=L_;function F_(t){return kt(t)==="BigUint64Array"}Pe.isBigUint64Array=F_;function _o(t){return _t(t)==="[object Map]"}_o.working=typeof Map<"u"&&_o(new Map);function j_(t){return typeof Map>"u"?!1:_o.working?_o(t):t instanceof Map}Pe.isMap=j_;function xo(t){return _t(t)==="[object Set]"}xo.working=typeof Set<"u"&&xo(new Set);function H_(t){return typeof Set>"u"?!1:xo.working?xo(t):t instanceof Set}Pe.isSet=H_;function Mo(t){return _t(t)==="[object WeakMap]"}Mo.working=typeof WeakMap<"u"&&Mo(new WeakMap);function K_(t){return typeof WeakMap>"u"?!1:Mo.working?Mo(t):t instanceof WeakMap}Pe.isWeakMap=K_;function Gs(t){return _t(t)==="[object WeakSet]"}Gs.working=typeof WeakSet<"u"&&Gs(new WeakSet);function W_(t){return Gs(t)}Pe.isWeakSet=W_;function Eo(t){return _t(t)==="[object ArrayBuffer]"}Eo.working=typeof ArrayBuffer<"u"&&Eo(new ArrayBuffer);function xd(t){return typeof ArrayBuffer>"u"?!1:Eo.working?Eo(t):t instanceof ArrayBuffer}Pe.isArrayBuffer=xd;function So(t){return _t(t)==="[object DataView]"}So.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&So(new DataView(new ArrayBuffer(1),0,1));function Md(t){return typeof DataView>"u"?!1:So.working?So(t):t instanceof DataView}Pe.isDataView=Md;var zs=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ea(t){return _t(t)==="[object SharedArrayBuffer]"}function Ed(t){return typeof zs>"u"?!1:(typeof ea.working>"u"&&(ea.working=ea(new zs)),ea.working?ea(t):t instanceof zs)}Pe.isSharedArrayBuffer=Ed;function z_(t){return _t(t)==="[object AsyncFunction]"}Pe.isAsyncFunction=z_;function G_(t){return _t(t)==="[object Map Iterator]"}Pe.isMapIterator=G_;function V_(t){return _t(t)==="[object Set Iterator]"}Pe.isSetIterator=V_;function $_(t){return _t(t)==="[object Generator]"}Pe.isGeneratorObject=$_;function Z_(t){return _t(t)==="[object WebAssembly.Module]"}Pe.isWebAssemblyCompiledModule=Z_;function Sd(t){return ta(t,S_)}Pe.isNumberObject=Sd;function Bd(t){return ta(t,B_)}Pe.isStringObject=Bd;function Ad(t){return ta(t,A_)}Pe.isBooleanObject=Ad;function Rd(t){return md&&ta(t,wd)}Pe.isBigIntObject=Rd;function qd(t){return bd&&ta(t,_d)}Pe.isSymbolObject=qd;function Y_(t){return Sd(t)||Bd(t)||Ad(t)||Rd(t)||qd(t)}Pe.isBoxedPrimitive=Y_;function X_(t){return typeof Uint8Array<"u"&&(xd(t)||Ed(t))}Pe.isAnyArrayBuffer=X_;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(t){Object.defineProperty(Pe,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})})});var Td=R((XA,kd)=>{w();kd.exports=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}});var na=R(De=>{w();var Cd=Object.getOwnPropertyDescriptors||function(e){for(var r=Object.keys(e),n={},i=0;i<r.length;i++)n[r[i]]=Object.getOwnPropertyDescriptor(e,r[i]);return n},J_=/%[sdj%]/g;De.format=function(t){if(!To(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(kr(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,i=n.length,a=String(t).replace(J_,function(v){if(v==="%%")return"%";if(r>=i)return v;switch(v){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch{return"[Circular]"}default:return v}}),f=n[r];r<i;f=n[++r])ko(f)||!Qi(f)?a+=" "+f:a+=" "+kr(f);return a};De.deprecate=function(t,e){if(typeof S.default<"u"&&S.default.noDeprecation===!0)return t;if(typeof S.default>"u")return function(){return De.deprecate(t,e).apply(this,arguments)};var r=!1;function n(){if(!r){if(S.default.throwDeprecation)throw new Error(e);S.default.traceDeprecation?console.trace(e):console.error(e),r=!0}return t.apply(this,arguments)}return n};var Bo={},Od=/^$/;S.default.env.NODE_DEBUG&&(Ao=S.default.env.NODE_DEBUG,Ao=Ao.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),Od=new RegExp("^"+Ao+"$","i"));var Ao;De.debuglog=function(t){if(t=t.toUpperCase(),!Bo[t])if(Od.test(t)){var e=S.default.pid;Bo[t]=function(){var r=De.format.apply(De,arguments);console.error("%s %d: %s",t,e,r)}}else Bo[t]=function(){};return Bo[t]};function kr(t,e){var r={seen:[],stylize:ex};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Ys(e)?r.showHidden=e:e&&De._extend(r,e),vi(r.showHidden)&&(r.showHidden=!1),vi(r.depth)&&(r.depth=2),vi(r.colors)&&(r.colors=!1),vi(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Q_),qo(r,t,r.depth)}De.inspect=kr;kr.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};kr.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Q_(t,e){var r=kr.styles[e];return r?"\x1B["+kr.colors[r][0]+"m"+t+"\x1B["+kr.colors[r][1]+"m":t}function ex(t,e){return t}function tx(t){var e={};return t.forEach(function(r,n){e[r]=!0}),e}function qo(t,e,r){if(t.customInspect&&e&&Ro(e.inspect)&&e.inspect!==De.inspect&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(r,t);return To(n)||(n=qo(t,n,r)),n}var i=rx(t,e);if(i)return i;var a=Object.keys(e),f=tx(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(e)),ia(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return Vs(e);if(a.length===0){if(Ro(e)){var v=e.name?": "+e.name:"";return t.stylize("[Function"+v+"]","special")}if(ra(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(Io(e))return t.stylize(Date.prototype.toString.call(e),"date");if(ia(e))return Vs(e)}var m="",E=!1,A=["{","}"];if(Pd(e)&&(E=!0,A=["[","]"]),Ro(e)){var q=e.name?": "+e.name:"";m=" [Function"+q+"]"}if(ra(e)&&(m=" "+RegExp.prototype.toString.call(e)),Io(e)&&(m=" "+Date.prototype.toUTCString.call(e)),ia(e)&&(m=" "+Vs(e)),a.length===0&&(!E||e.length==0))return A[0]+m+A[1];if(r<0)return ra(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var I;return E?I=ix(t,e,r,f,a):I=a.map(function(C){return Zs(t,e,r,f,C,E)}),t.seen.pop(),nx(I,m,A)}function rx(t,e){if(vi(e))return t.stylize("undefined","undefined");if(To(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(Dd(e))return t.stylize(""+e,"number");if(Ys(e))return t.stylize(""+e,"boolean");if(ko(e))return t.stylize("null","null")}function Vs(t){return"["+Error.prototype.toString.call(t)+"]"}function ix(t,e,r,n,i){for(var a=[],f=0,v=e.length;f<v;++f)Ud(e,String(f))?a.push(Zs(t,e,r,n,String(f),!0)):a.push("");return i.forEach(function(m){m.match(/^\d+$/)||a.push(Zs(t,e,r,n,m,!0))}),a}function Zs(t,e,r,n,i,a){var f,v,m;if(m=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},m.get?m.set?v=t.stylize("[Getter/Setter]","special"):v=t.stylize("[Getter]","special"):m.set&&(v=t.stylize("[Setter]","special")),Ud(n,i)||(f="["+i+"]"),v||(t.seen.indexOf(m.value)<0?(ko(r)?v=qo(t,m.value,null):v=qo(t,m.value,r-1),v.indexOf(`
|
|
3
3
|
`)>-1&&(a?v=v.split(`
|
|
4
4
|
`).map(function(E){return" "+E}).join(`
|
|
5
5
|
`).slice(2):v=`
|
|
6
6
|
`+v.split(`
|
|
7
7
|
`).map(function(E){return" "+E}).join(`
|
|
8
|
-
`))):v=t.stylize("[Circular]","special")),
|
|
9
|
-
`)>=0&&
|
|
8
|
+
`))):v=t.stylize("[Circular]","special")),vi(f)){if(a&&i.match(/^\d+$/))return v;f=JSON.stringify(""+i),f.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(f=f.slice(1,-1),f=t.stylize(f,"name")):(f=f.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),f=t.stylize(f,"string"))}return f+": "+v}function nx(t,e,r){var n=0,i=t.reduce(function(a,f){return n++,f.indexOf(`
|
|
9
|
+
`)>=0&&n++,a+f.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(e===""?"":e+`
|
|
10
10
|
`)+" "+t.join(`,
|
|
11
|
-
`)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}Pe.types=Nd();function Kd(t){return Array.isArray(t)}Pe.isArray=Kd;function Qs(t){return typeof t=="boolean"}Pe.isBoolean=Qs;function Co(t){return t===null}Pe.isNull=Co;function vx(t){return t==null}Pe.isNullOrUndefined=vx;function Wd(t){return typeof t=="number"}Pe.isNumber=Wd;function Oo(t){return typeof t=="string"}Pe.isString=Oo;function yx(t){return typeof t=="symbol"}Pe.isSymbol=yx;function yi(t){return t===void 0}Pe.isUndefined=yi;function na(t){return tn(t)&&eu(t)==="[object RegExp]"}Pe.isRegExp=na;Pe.types.isRegExp=na;function tn(t){return typeof t=="object"&&t!==null}Pe.isObject=tn;function To(t){return tn(t)&&eu(t)==="[object Date]"}Pe.isDate=To;Pe.types.isDate=To;function aa(t){return tn(t)&&(eu(t)==="[object Error]"||t instanceof Error)}Pe.isError=aa;Pe.types.isNativeError=aa;function Io(t){return typeof t=="function"}Pe.isFunction=Io;function gx(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}Pe.isPrimitive=gx;Pe.isBuffer=Fd();function eu(t){return Object.prototype.toString.call(t)}function Xs(t){return t<10?"0"+t.toString(10):t.toString(10)}var mx=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function bx(){var t=new Date,e=[Xs(t.getHours()),Xs(t.getMinutes()),Xs(t.getSeconds())].join(":");return[t.getDate(),mx[t.getMonth()],e].join(" ")}Pe.log=function(){console.log("%s - %s",bx(),Pe.format.apply(Pe,arguments))};Pe.inherits=He();Pe._extend=function(t,e){if(!e||!tn(e))return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t};function zd(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var vi=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Pe.promisify=function(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');if(vi&&e[vi]){var r=e[vi];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,vi,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var i,n,a=new Promise(function(m,E){i=m,n=E}),f=[],v=0;v<arguments.length;v++)f.push(arguments[v]);f.push(function(m,E){m?n(m):i(E)});try{e.apply(this,f)}catch(m){n(m)}return a}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),vi&&Object.defineProperty(r,vi,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,jd(e))};Pe.promisify.custom=vi;function wx(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}function _x(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');function e(){for(var r=[],i=0;i<arguments.length;i++)r.push(arguments[i]);var n=r.pop();if(typeof n!="function")throw new TypeError("The last argument must be of type Function");var a=this,f=function(){return n.apply(a,arguments)};t.apply(this,r).then(function(v){S.default.nextTick(f.bind(null,null,v))},function(v){S.default.nextTick(wx.bind(null,v,f))})}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,jd(t)),e}Pe.callbackify=_x});var Xd=R((d9,Yd)=>{"use strict";b();function Gd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Vd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Gd(Object(r),!0).forEach(function(i){xx(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gd(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function xx(t,e,r){return e=Zd(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $d(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Zd(i.key),i)}}function Ex(t,e,r){return e&&$d(t.prototype,e),r&&$d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Zd(t){var e=Sx(t,"string");return typeof e=="symbol"?e:String(e)}function Sx(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Bx=ft(),Po=Bx.Buffer,Ax=oa(),tu=Ax.inspect,Rx=tu&&tu.custom||"inspect";function qx(t,e,r){Po.prototype.copy.call(t,e,r)}Yd.exports=(function(){function t(){Mx(this,t),this.head=null,this.tail=null,this.length=0}return Ex(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return Po.alloc(0);for(var i=Po.allocUnsafe(r>>>0),n=this.head,a=0;n;)qx(n.data,i,a),a+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,a=i.data;for(r-=a.length;i=i.next;){var f=i.data,v=r>f.length?f.length:r;if(v===f.length?a+=f:a+=f.slice(0,r),r-=v,r===0){v===f.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=f.slice(v));break}++n}return this.length-=n,a}},{key:"_getBuffer",value:function(r){var i=Po.allocUnsafe(r),n=this.head,a=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var f=n.data,v=r>f.length?f.length:r;if(f.copy(i,i.length-r,0,v),r-=v,r===0){v===f.length?(++a,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=f.slice(v));break}++a}return this.length-=a,i}},{key:Rx,value:function(r,i){return tu(this,Vd(Vd({},i),{},{depth:0,customInspect:!1}))}}]),t})()});var iu=R((v9,Qd)=>{"use strict";b();function Ix(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,S.default.nextTick(ru,this,t)):S.default.nextTick(ru,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(a){!e&&a?r._writableState?r._writableState.errorEmitted?S.default.nextTick(Do,r):(r._writableState.errorEmitted=!0,S.default.nextTick(Jd,r,a)):S.default.nextTick(Jd,r,a):e?(S.default.nextTick(Do,r),e(a)):S.default.nextTick(Do,r)}),this)}function Jd(t,e){ru(t,e),Do(t)}function Do(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function kx(){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 ru(t,e){t.emit("error",e)}function Tx(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}Qd.exports={destroy:Ix,undestroy:kx,errorOrDestroy:Tx}});var gi=R((g9,rp)=>{"use strict";b();function Cx(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var tp={};function xt(t,e,r){r||(r=Error);function i(a,f,v){return typeof e=="string"?e:e(a,f,v)}var n=(function(a){Cx(f,a);function f(v,m,E){return a.call(this,i(v,m,E))||this}return f})(r);n.prototype.name=r.name,n.prototype.code=t,tp[t]=n}function ep(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(i){return String(i)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:r===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}else return"of ".concat(e," ").concat(String(t))}function Ox(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Px(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Dx(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}xt("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);xt("ERR_INVALID_ARG_TYPE",function(t,e,r){var i;typeof e=="string"&&Ox(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";var n;if(Px(t," argument"))n="The ".concat(t," ").concat(i," ").concat(ep(e,"type"));else{var a=Dx(t,".")?"property":"argument";n='The "'.concat(t,'" ').concat(a," ").concat(i," ").concat(ep(e,"type"))}return n+=". Received type ".concat(typeof r),n},TypeError);xt("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");xt("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});xt("ERR_STREAM_PREMATURE_CLOSE","Premature close");xt("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});xt("ERR_MULTIPLE_CALLBACK","Callback called multiple times");xt("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");xt("ERR_STREAM_WRITE_AFTER_END","write after end");xt("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);xt("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);xt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");rp.exports.codes=tp});var nu=R((b9,ip)=>{"use strict";b();var Ux=gi().codes.ERR_INVALID_OPT_VALUE;function Nx(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Lx(t,e,r,i){var n=Nx(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var a=i?r:"highWaterMark";throw new Ux(a,n)}return Math.floor(n)}return t.objectMode?16:16*1024}ip.exports={getHighWaterMark:Lx}});var ou=R((_9,np)=>{b();np.exports=Fx;function Fx(t,e){if(au("noDeprecation"))return t;var r=!1;function i(){if(!r){if(au("throwDeprecation"))throw new Error(e);au("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return i}function au(t){try{if(!globalThis.localStorage)return!1}catch{return!1}var e=globalThis.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}});var uu=R((M9,hp)=>{"use strict";b();hp.exports=$e;function op(t){var e=this;this.next=null,this.entry=null,this.finish=function(){d6(e,t)}}var rn;$e.WritableState=sa;var jx={deprecate:ou()},fp=_s(),No=ft().Buffer,Hx=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Kx(t){return No.from(t)}function Wx(t){return No.isBuffer(t)||t instanceof Hx}var su=iu(),zx=nu(),Gx=zx.getHighWaterMark,Tr=gi().codes,Vx=Tr.ERR_INVALID_ARG_TYPE,$x=Tr.ERR_METHOD_NOT_IMPLEMENTED,Zx=Tr.ERR_MULTIPLE_CALLBACK,Yx=Tr.ERR_STREAM_CANNOT_PIPE,Xx=Tr.ERR_STREAM_DESTROYED,Jx=Tr.ERR_STREAM_NULL_VALUES,Qx=Tr.ERR_STREAM_WRITE_AFTER_END,e6=Tr.ERR_UNKNOWN_ENCODING,nn=su.errorOrDestroy;hi()($e,fp);function t6(){}function sa(t,e,r){rn=rn||mi(),t=t||{},typeof r!="boolean"&&(r=e instanceof rn),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Gx(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){s6(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new op(this)}sa.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(sa.prototype,"buffer",{get:jx.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Uo;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Uo=Function.prototype[Symbol.hasInstance],Object.defineProperty($e,Symbol.hasInstance,{value:function(e){return Uo.call(this,e)?!0:this!==$e?!1:e&&e._writableState instanceof sa}})):Uo=function(e){return e instanceof this};function $e(t){rn=rn||mi();var e=this instanceof rn;if(!e&&!Uo.call($e,this))return new $e(t);this._writableState=new sa(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),fp.call(this)}$e.prototype.pipe=function(){nn(this,new Yx)};function r6(t,e){var r=new Qx;nn(t,r),S.default.nextTick(e,r)}function i6(t,e,r,i){var n;return r===null?n=new Jx:typeof r!="string"&&!e.objectMode&&(n=new Vx("chunk",["string","Buffer"],r)),n?(nn(t,n),S.default.nextTick(i,n),!1):!0}$e.prototype.write=function(t,e,r){var i=this._writableState,n=!1,a=!i.objectMode&&Wx(t);return a&&!No.isBuffer(t)&&(t=Kx(t)),typeof e=="function"&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=t6),i.ending?r6(this,r):(a||i6(this,i,t,r))&&(i.pendingcb++,n=a6(this,i,a,t,e,r)),n};$e.prototype.cork=function(){this._writableState.corked++};$e.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&sp(this,t))};$e.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new e6(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty($e.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function n6(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=No.from(e,r)),e}Object.defineProperty($e.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function a6(t,e,r,i,n,a){if(!r){var f=n6(e,i,n);i!==f&&(r=!0,n="buffer",i=f)}var v=e.objectMode?1:i.length;e.length+=v;var m=e.length<e.highWaterMark;if(m||(e.needDrain=!0),e.writing||e.corked){var E=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},E?E.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else fu(t,e,!1,v,i,n,a);return m}function fu(t,e,r,i,n,a,f){e.writelen=i,e.writecb=f,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Xx("write")):r?t._writev(n,e.onwrite):t._write(n,a,e.onwrite),e.sync=!1}function o6(t,e,r,i,n){--e.pendingcb,r?(S.default.nextTick(n,i),S.default.nextTick(fa,t,e),t._writableState.errorEmitted=!0,nn(t,i)):(n(i),t._writableState.errorEmitted=!0,nn(t,i),fa(t,e))}function f6(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function s6(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Zx;if(f6(r),e)o6(t,r,i,e,n);else{var a=up(r)||t.destroyed;!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&sp(t,r),i?S.default.nextTick(ap,t,r,a,n):ap(t,r,a,n)}}function ap(t,e,r,i){r||u6(t,e),e.pendingcb--,i(),fa(t,e)}function u6(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function sp(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),a=e.corkedRequestsFree;a.entry=r;for(var f=0,v=!0;r;)n[f]=r,r.isBuf||(v=!1),r=r.next,f+=1;n.allBuffers=v,fu(t,e,!0,e.length,n,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new op(e),e.bufferedRequestCount=0}else{for(;r;){var m=r.chunk,E=r.encoding,A=r.callback,q=e.objectMode?1:m.length;if(fu(t,e,!1,q,m,E,A),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}$e.prototype._write=function(t,e,r){r(new $x("_write()"))};$e.prototype._writev=null;$e.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||c6(this,i,r),this};Object.defineProperty($e.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function up(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function h6(t,e){t._final(function(r){e.pendingcb--,r&&nn(t,r),e.prefinished=!0,t.emit("prefinish"),fa(t,e)})}function l6(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,S.default.nextTick(h6,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function fa(t,e){var r=up(e);if(r&&(l6(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function c6(t,e,r){e.ending=!0,fa(t,e),r&&(e.finished?S.default.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function d6(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty($e.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});$e.prototype.destroy=su.destroy;$e.prototype._undestroy=su.undestroy;$e.prototype._destroy=function(t,e){e(t)}});var mi=R((S9,cp)=>{"use strict";b();var p6=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};cp.exports=Yt;var lp=cu(),lu=uu();hi()(Yt,lp);for(hu=p6(lu.prototype),Lo=0;Lo<hu.length;Lo++)Fo=hu[Lo],Yt.prototype[Fo]||(Yt.prototype[Fo]=lu.prototype[Fo]);var hu,Fo,Lo;function Yt(t){if(!(this instanceof Yt))return new Yt(t);lp.call(this,t),lu.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",v6)))}Object.defineProperty(Yt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Yt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Yt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function v6(){this._writableState.ended||S.default.nextTick(y6,this)}function y6(t){t.end()}Object.defineProperty(Yt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var vp=R((du,pp)=>{b();var jo=ft(),cr=jo.Buffer;function dp(t,e){for(var r in t)e[r]=t[r]}cr.from&&cr.alloc&&cr.allocUnsafe&&cr.allocUnsafeSlow?pp.exports=jo:(dp(jo,du),du.Buffer=an);function an(t,e,r){return cr(t,e,r)}dp(cr,an);an.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return cr(t,e,r)};an.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=cr(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};an.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return cr(t)};an.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return jo.SlowBuffer(t)}});var on=R(gp=>{"use strict";b();var vu=vp().Buffer,yp=vu.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function g6(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function m6(t){var e=g6(t);if(typeof e!="string"&&(vu.isEncoding===yp||!yp(t)))throw new Error("Unknown encoding: "+t);return e||t}gp.StringDecoder=ua;function ua(t){this.encoding=m6(t);var e;switch(this.encoding){case"utf16le":this.text=E6,this.end=S6,e=4;break;case"utf8":this.fillLast=_6,e=4;break;case"base64":this.text=B6,this.end=A6,e=3;break;default:this.write=R6,this.end=q6;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=vu.allocUnsafe(e)}ua.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};ua.prototype.end=M6;ua.prototype.text=x6;ua.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function pu(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function b6(t,e,r){var i=e.length-1;if(i<r)return 0;var n=pu(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=pu(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=pu(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function w6(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function _6(t){var e=this.lastTotal-this.lastNeed,r=w6(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function x6(t,e){var r=b6(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function M6(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function E6(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function S6(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function B6(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function A6(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function R6(t){return t.toString(this.encoding)}function q6(t){return t&&t.length?this.write(t):""}});var Ho=R((I9,wp)=>{"use strict";b();var mp=gi().codes.ERR_STREAM_PREMATURE_CLOSE;function I6(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function k6(){}function T6(t){return t.setHeader&&typeof t.abort=="function"}function bp(t,e,r){if(typeof e=="function")return bp(t,null,e);e||(e={}),r=I6(r||k6);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,a=function(){t.writable||v()},f=t._writableState&&t._writableState.finished,v=function(){n=!1,f=!0,i||r.call(t)},m=t._readableState&&t._readableState.endEmitted,E=function(){i=!1,m=!0,n||r.call(t)},A=function(j){r.call(t,j)},q=function(){var j;if(i&&!m)return(!t._readableState||!t._readableState.ended)&&(j=new mp),r.call(t,j);if(n&&!f)return(!t._writableState||!t._writableState.ended)&&(j=new mp),r.call(t,j)},I=function(){t.req.on("finish",v)};return T6(t)?(t.on("complete",v),t.on("abort",q),t.req?I():t.on("request",I)):n&&!t._writableState&&(t.on("end",a),t.on("close",a)),t.on("end",E),t.on("finish",v),e.error!==!1&&t.on("error",A),t.on("close",q),function(){t.removeListener("complete",v),t.removeListener("abort",q),t.removeListener("request",I),t.req&&t.req.removeListener("finish",v),t.removeListener("end",a),t.removeListener("close",a),t.removeListener("finish",v),t.removeListener("end",E),t.removeListener("error",A),t.removeListener("close",q)}}wp.exports=bp});var xp=R((T9,_p)=>{"use strict";b();var Ko;function Cr(t,e,r){return e=C6(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function C6(t){var e=O6(t,"string");return typeof e=="symbol"?e:String(e)}function O6(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var P6=Ho(),Or=Symbol("lastResolve"),bi=Symbol("lastReject"),ha=Symbol("error"),Wo=Symbol("ended"),wi=Symbol("lastPromise"),yu=Symbol("handlePromise"),_i=Symbol("stream");function Pr(t,e){return{value:t,done:e}}function D6(t){var e=t[Or];if(e!==null){var r=t[_i].read();r!==null&&(t[wi]=null,t[Or]=null,t[bi]=null,e(Pr(r,!1)))}}function U6(t){S.default.nextTick(D6,t)}function N6(t,e){return function(r,i){t.then(function(){if(e[Wo]){r(Pr(void 0,!0));return}e[yu](r,i)},i)}}var L6=Object.getPrototypeOf(function(){}),F6=Object.setPrototypeOf((Ko={get stream(){return this[_i]},next:function(){var e=this,r=this[ha];if(r!==null)return Promise.reject(r);if(this[Wo])return Promise.resolve(Pr(void 0,!0));if(this[_i].destroyed)return new Promise(function(f,v){S.default.nextTick(function(){e[ha]?v(e[ha]):f(Pr(void 0,!0))})});var i=this[wi],n;if(i)n=new Promise(N6(i,this));else{var a=this[_i].read();if(a!==null)return Promise.resolve(Pr(a,!1));n=new Promise(this[yu])}return this[wi]=n,n}},Cr(Ko,Symbol.asyncIterator,function(){return this}),Cr(Ko,"return",function(){var e=this;return new Promise(function(r,i){e[_i].destroy(null,function(n){if(n){i(n);return}r(Pr(void 0,!0))})})}),Ko),L6),j6=function(e){var r,i=Object.create(F6,(r={},Cr(r,_i,{value:e,writable:!0}),Cr(r,Or,{value:null,writable:!0}),Cr(r,bi,{value:null,writable:!0}),Cr(r,ha,{value:null,writable:!0}),Cr(r,Wo,{value:e._readableState.endEmitted,writable:!0}),Cr(r,yu,{value:function(a,f){var v=i[_i].read();v?(i[wi]=null,i[Or]=null,i[bi]=null,a(Pr(v,!1))):(i[Or]=a,i[bi]=f)},writable:!0}),r));return i[wi]=null,P6(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=i[bi];a!==null&&(i[wi]=null,i[Or]=null,i[bi]=null,a(n)),i[ha]=n;return}var f=i[Or];f!==null&&(i[wi]=null,i[Or]=null,i[bi]=null,f(Pr(void 0,!0))),i[Wo]=!0}),e.on("readable",U6.bind(null,i)),i};_p.exports=j6});var Ep=R((O9,Mp)=>{b();Mp.exports=function(){throw new Error("Readable.from is not available in the browser")}});var cu=R((U9,Op)=>{"use strict";b();Op.exports=De;var fn;De.ReadableState=Rp;var D9=Gi().EventEmitter,Ap=function(e,r){return e.listeners(r).length},ca=_s(),zo=ft().Buffer,H6=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function K6(t){return zo.from(t)}function W6(t){return zo.isBuffer(t)||t instanceof H6}var gu=oa(),Te;gu&&gu.debuglog?Te=gu.debuglog("stream"):Te=function(){};var z6=Xd(),Eu=iu(),G6=nu(),V6=G6.getHighWaterMark,Go=gi().codes,$6=Go.ERR_INVALID_ARG_TYPE,Z6=Go.ERR_STREAM_PUSH_AFTER_EOF,Y6=Go.ERR_METHOD_NOT_IMPLEMENTED,X6=Go.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,sn,mu,bu;hi()(De,ca);var la=Eu.errorOrDestroy,wu=["error","close","destroy","pause","resume"];function J6(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Rp(t,e,r){fn=fn||mi(),t=t||{},typeof r!="boolean"&&(r=e instanceof fn),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=V6(this,t,"readableHighWaterMark",r),this.buffer=new z6,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=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(sn||(sn=on().StringDecoder),this.decoder=new sn(t.encoding),this.encoding=t.encoding)}function De(t){if(fn=fn||mi(),!(this instanceof De))return new De(t);var e=this instanceof fn;this._readableState=new Rp(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),ca.call(this)}Object.defineProperty(De.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});De.prototype.destroy=Eu.destroy;De.prototype._undestroy=Eu.undestroy;De.prototype._destroy=function(t,e){e(t)};De.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=zo.from(t,e),e=""),i=!0),qp(this,t,e,!1,i)};De.prototype.unshift=function(t){return qp(this,t,null,!0,!1)};function qp(t,e,r,i,n){Te("readableAddChunk",e);var a=t._readableState;if(e===null)a.reading=!1,t3(t,a);else{var f;if(n||(f=Q6(a,e)),f)la(t,f);else if(a.objectMode||e&&e.length>0)if(typeof e!="string"&&!a.objectMode&&Object.getPrototypeOf(e)!==zo.prototype&&(e=K6(e)),i)a.endEmitted?la(t,new X6):_u(t,a,e,!0);else if(a.ended)la(t,new Z6);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||e.length!==0?_u(t,a,e,!1):Mu(t,a)):_u(t,a,e,!1)}else i||(a.reading=!1,Mu(t,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function _u(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Vo(t)),Mu(t,e)}function Q6(t,e){var r;return!W6(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new $6("chunk",["string","Buffer","Uint8Array"],e)),r}De.prototype.isPaused=function(){return this._readableState.flowing===!1};De.prototype.setEncoding=function(t){sn||(sn=on().StringDecoder);var e=new sn(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var Sp=1073741824;function e3(t){return t>=Sp?t=Sp:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Bp(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=e3(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}De.prototype.read=function(t){Te("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return Te("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?xu(this):Vo(this),null;if(t=Bp(t,e),t===0&&e.ended)return e.length===0&&xu(this),null;var i=e.needReadable;Te("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,Te("length less than watermark",i)),e.ended||e.reading?(i=!1,Te("reading or ended",i)):i&&(Te("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Bp(r,e)));var n;return t>0?n=Tp(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&xu(this)),n!==null&&this.emit("data",n),n};function t3(t,e){if(Te("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Vo(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Ip(t)))}}function Vo(t){var e=t._readableState;Te("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(Te("emitReadable",e.flowing),e.emittedReadable=!0,S.default.nextTick(Ip,t))}function Ip(t){var e=t._readableState;Te("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Su(t)}function Mu(t,e){e.readingMore||(e.readingMore=!0,S.default.nextTick(r3,t,e))}function r3(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(Te("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}De.prototype._read=function(t){la(this,new Y6("_read()"))};De.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,Te("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==S.default.stdout&&t!==S.default.stderr,a=n?v:V;i.endEmitted?S.default.nextTick(a):r.once("end",a),t.on("unpipe",f);function f(X,z){Te("onunpipe"),X===r&&z&&z.hasUnpiped===!1&&(z.hasUnpiped=!0,A())}function v(){Te("onend"),t.end()}var m=i3(r);t.on("drain",m);var E=!1;function A(){Te("cleanup"),t.removeListener("close",C),t.removeListener("finish",j),t.removeListener("drain",m),t.removeListener("error",I),t.removeListener("unpipe",f),r.removeListener("end",v),r.removeListener("end",V),r.removeListener("data",q),E=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&m()}r.on("data",q);function q(X){Te("ondata");var z=t.write(X);Te("dest.write",z),z===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Cp(i.pipes,t)!==-1)&&!E&&(Te("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function I(X){Te("onerror",X),V(),t.removeListener("error",I),Ap(t,"error")===0&&la(t,X)}J6(t,"error",I);function C(){t.removeListener("finish",j),V()}t.once("close",C);function j(){Te("onfinish"),t.removeListener("close",C),V()}t.once("finish",j);function V(){Te("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(Te("pipe resume"),r.resume()),t};function i3(t){return function(){var r=t._readableState;Te("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Ap(t,"data")&&(r.flowing=!0,Su(t))}}De.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<n;a++)i[a].emit("unpipe",this,{hasUnpiped:!1});return this}var f=Cp(e.pipes,t);return f===-1?this:(e.pipes.splice(f,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};De.prototype.on=function(t,e){var r=ca.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,Te("on readable",i.length,i.reading),i.length?Vo(this):i.reading||S.default.nextTick(n3,this)),r};De.prototype.addListener=De.prototype.on;De.prototype.removeListener=function(t,e){var r=ca.prototype.removeListener.call(this,t,e);return t==="readable"&&S.default.nextTick(kp,this),r};De.prototype.removeAllListeners=function(t){var e=ca.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&S.default.nextTick(kp,this),e};function kp(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function n3(t){Te("readable nexttick read 0"),t.read(0)}De.prototype.resume=function(){var t=this._readableState;return t.flowing||(Te("resume"),t.flowing=!t.readableListening,a3(this,t)),t.paused=!1,this};function a3(t,e){e.resumeScheduled||(e.resumeScheduled=!0,S.default.nextTick(o3,t,e))}function o3(t,e){Te("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Su(t),e.flowing&&!e.reading&&t.read(0)}De.prototype.pause=function(){return Te("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Te("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Su(t){var e=t._readableState;for(Te("flow",e.flowing);e.flowing&&t.read()!==null;);}De.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(Te("wrapped end"),r.decoder&&!r.ended){var f=r.decoder.end();f&&f.length&&e.push(f)}e.push(null)}),t.on("data",function(f){if(Te("wrapped data"),r.decoder&&(f=r.decoder.write(f)),!(r.objectMode&&f==null)&&!(!r.objectMode&&(!f||!f.length))){var v=e.push(f);v||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=(function(v){return function(){return t[v].apply(t,arguments)}})(n));for(var a=0;a<wu.length;a++)t.on(wu[a],this.emit.bind(this,wu[a]));return this._read=function(f){Te("wrapped _read",f),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(De.prototype[Symbol.asyncIterator]=function(){return mu===void 0&&(mu=xp()),mu(this)});Object.defineProperty(De.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(De.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(De.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});De._fromList=Tp;Object.defineProperty(De.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Tp(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function xu(t){var e=t._readableState;Te("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,S.default.nextTick(f3,e,t))}function f3(t,e){if(Te("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(De.from=function(t,e){return bu===void 0&&(bu=Ep()),bu(De,t,e)});function Cp(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Bu=R((L9,Dp)=>{"use strict";b();Dp.exports=dr;var $o=gi().codes,s3=$o.ERR_METHOD_NOT_IMPLEMENTED,u3=$o.ERR_MULTIPLE_CALLBACK,h3=$o.ERR_TRANSFORM_ALREADY_TRANSFORMING,l3=$o.ERR_TRANSFORM_WITH_LENGTH_0,Zo=mi();hi()(dr,Zo);function c3(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new u3);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function dr(t){if(!(this instanceof dr))return new dr(t);Zo.call(this,t),this._transformState={afterTransform:c3.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",d3)}function d3(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Pp(t,e,r)}):Pp(this,null,null)}dr.prototype.push=function(t,e){return this._transformState.needTransform=!1,Zo.prototype.push.call(this,t,e)};dr.prototype._transform=function(t,e,r){r(new s3("_transform()"))};dr.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};dr.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};dr.prototype._destroy=function(t,e){Zo.prototype._destroy.call(this,t,function(r){e(r)})};function Pp(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new l3;if(t._transformState.transforming)throw new h3;return t.push(null)}});var Lp=R((j9,Np)=>{"use strict";b();Np.exports=da;var Up=Bu();hi()(da,Up);function da(t){if(!(this instanceof da))return new da(t);Up.call(this,t)}da.prototype._transform=function(t,e,r){r(null,t)}});var Wp=R((K9,Kp)=>{"use strict";b();var Au;function p3(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Hp=gi().codes,v3=Hp.ERR_MISSING_ARGS,y3=Hp.ERR_STREAM_DESTROYED;function Fp(t){if(t)throw t}function g3(t){return t.setHeader&&typeof t.abort=="function"}function m3(t,e,r,i){i=p3(i);var n=!1;t.on("close",function(){n=!0}),Au===void 0&&(Au=Ho()),Au(t,{readable:e,writable:r},function(f){if(f)return i(f);n=!0,i()});var a=!1;return function(f){if(!n&&!a){if(a=!0,g3(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(f||new y3("pipe"))}}}function jp(t){t()}function b3(t,e){return t.pipe(e)}function w3(t){return!t.length||typeof t[t.length-1]!="function"?Fp:t.pop()}function _3(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=w3(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new v3("streams");var n,a=e.map(function(f,v){var m=v<e.length-1,E=v>0;return m3(f,m,E,function(A){n||(n=A),A&&a.forEach(jp),!m&&(a.forEach(jp),i(n))})});return e.reduce(b3)}Kp.exports=_3});var qu=R((z9,zp)=>{b();zp.exports=Mt;var Ru=Gi().EventEmitter,x3=hi();x3(Mt,Ru);Mt.Readable=cu();Mt.Writable=uu();Mt.Duplex=mi();Mt.Transform=Bu();Mt.PassThrough=Lp();Mt.finished=Ho();Mt.pipeline=Wp();Mt.Stream=Mt;function Mt(){Ru.call(this)}Mt.prototype.pipe=function(t,e){var r=this;function i(A){t.writable&&t.write(A)===!1&&r.pause&&r.pause()}r.on("data",i);function n(){r.readable&&r.resume&&r.resume()}t.on("drain",n),!t._isStdio&&(!e||e.end!==!1)&&(r.on("end",f),r.on("close",v));var a=!1;function f(){a||(a=!0,t.end())}function v(){a||(a=!0,typeof t.destroy=="function"&&t.destroy())}function m(A){if(E(),Ru.listenerCount(this,"error")===0)throw A}r.on("error",m),t.on("error",m);function E(){r.removeListener("data",i),t.removeListener("drain",n),r.removeListener("end",f),r.removeListener("close",v),r.removeListener("error",m),t.removeListener("error",m),r.removeListener("end",E),r.removeListener("close",E),t.removeListener("close",E)}return r.on("end",E),r.on("close",E),t.on("close",E),t.emit("pipe",r),t}});var Gp=R((V9,Iu)=>{b();typeof Object.create=="function"?Iu.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Iu.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var Zp=R((Z9,$p)=>{"use strict";b();var Xt=Ie().Buffer,Vp=qu().Transform,M3=Gp();function Dr(t){Vp.call(this),this._block=Xt.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}M3(Dr,Vp);Dr.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(n){i=n}r(i)};Dr.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};var E3=typeof Uint8Array<"u",S3=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(Xt.prototype instanceof Uint8Array||Xt.TYPED_ARRAY_SUPPORT);function B3(t,e){if(t instanceof Xt)return t;if(typeof t=="string")return Xt.from(t,e);if(S3&&ArrayBuffer.isView(t)){if(t.byteLength===0)return Xt.alloc(0);var r=Xt.from(t.buffer,t.byteOffset,t.byteLength);if(r.byteLength===t.byteLength)return r}if(E3&&t instanceof Uint8Array||Xt.isBuffer(t)&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t))return Xt.from(t);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}Dr.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");t=B3(t,e);for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var n=this._blockOffset;n<this._blockSize;)r[n++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var a=0,f=t.length*8;f>0;++a)this._length[a]+=f,f=this._length[a]/4294967296|0,f>0&&(this._length[a]-=4294967296*f);return this};Dr.prototype._update=function(){throw new Error("_update is not implemented")};Dr.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();t!==void 0&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e};Dr.prototype._digest=function(){throw new Error("_digest is not implemented")};$p.exports=Dr});var Jo=R((X9,Xp)=>{"use strict";b();var A3=He(),Yp=Zp(),R3=Ie().Buffer,q3=new Array(16);function Yo(){Yp.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}A3(Yo,Yp);Yo.prototype._update=function(){for(var t=q3,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);var r=this._a,i=this._b,n=this._c,a=this._d;r=st(r,i,n,a,t[0],3614090360,7),a=st(a,r,i,n,t[1],3905402710,12),n=st(n,a,r,i,t[2],606105819,17),i=st(i,n,a,r,t[3],3250441966,22),r=st(r,i,n,a,t[4],4118548399,7),a=st(a,r,i,n,t[5],1200080426,12),n=st(n,a,r,i,t[6],2821735955,17),i=st(i,n,a,r,t[7],4249261313,22),r=st(r,i,n,a,t[8],1770035416,7),a=st(a,r,i,n,t[9],2336552879,12),n=st(n,a,r,i,t[10],4294925233,17),i=st(i,n,a,r,t[11],2304563134,22),r=st(r,i,n,a,t[12],1804603682,7),a=st(a,r,i,n,t[13],4254626195,12),n=st(n,a,r,i,t[14],2792965006,17),i=st(i,n,a,r,t[15],1236535329,22),r=ut(r,i,n,a,t[1],4129170786,5),a=ut(a,r,i,n,t[6],3225465664,9),n=ut(n,a,r,i,t[11],643717713,14),i=ut(i,n,a,r,t[0],3921069994,20),r=ut(r,i,n,a,t[5],3593408605,5),a=ut(a,r,i,n,t[10],38016083,9),n=ut(n,a,r,i,t[15],3634488961,14),i=ut(i,n,a,r,t[4],3889429448,20),r=ut(r,i,n,a,t[9],568446438,5),a=ut(a,r,i,n,t[14],3275163606,9),n=ut(n,a,r,i,t[3],4107603335,14),i=ut(i,n,a,r,t[8],1163531501,20),r=ut(r,i,n,a,t[13],2850285829,5),a=ut(a,r,i,n,t[2],4243563512,9),n=ut(n,a,r,i,t[7],1735328473,14),i=ut(i,n,a,r,t[12],2368359562,20),r=ht(r,i,n,a,t[5],4294588738,4),a=ht(a,r,i,n,t[8],2272392833,11),n=ht(n,a,r,i,t[11],1839030562,16),i=ht(i,n,a,r,t[14],4259657740,23),r=ht(r,i,n,a,t[1],2763975236,4),a=ht(a,r,i,n,t[4],1272893353,11),n=ht(n,a,r,i,t[7],4139469664,16),i=ht(i,n,a,r,t[10],3200236656,23),r=ht(r,i,n,a,t[13],681279174,4),a=ht(a,r,i,n,t[0],3936430074,11),n=ht(n,a,r,i,t[3],3572445317,16),i=ht(i,n,a,r,t[6],76029189,23),r=ht(r,i,n,a,t[9],3654602809,4),a=ht(a,r,i,n,t[12],3873151461,11),n=ht(n,a,r,i,t[15],530742520,16),i=ht(i,n,a,r,t[2],3299628645,23),r=lt(r,i,n,a,t[0],4096336452,6),a=lt(a,r,i,n,t[7],1126891415,10),n=lt(n,a,r,i,t[14],2878612391,15),i=lt(i,n,a,r,t[5],4237533241,21),r=lt(r,i,n,a,t[12],1700485571,6),a=lt(a,r,i,n,t[3],2399980690,10),n=lt(n,a,r,i,t[10],4293915773,15),i=lt(i,n,a,r,t[1],2240044497,21),r=lt(r,i,n,a,t[8],1873313359,6),a=lt(a,r,i,n,t[15],4264355552,10),n=lt(n,a,r,i,t[6],2734768916,15),i=lt(i,n,a,r,t[13],1309151649,21),r=lt(r,i,n,a,t[4],4149444226,6),a=lt(a,r,i,n,t[11],3174756917,10),n=lt(n,a,r,i,t[2],718787259,15),i=lt(i,n,a,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+a|0};Yo.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=R3.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};function Xo(t,e){return t<<e|t>>>32-e}function st(t,e,r,i,n,a,f){return Xo(t+(e&r|~e&i)+n+a|0,f)+e|0}function ut(t,e,r,i,n,a,f){return Xo(t+(e&i|r&~i)+n+a|0,f)+e|0}function ht(t,e,r,i,n,a,f){return Xo(t+(e^r^i)+n+a|0,f)+e|0}function lt(t,e,r,i,n,a,f){return Xo(t+(r^(e|~i))+n+a|0,f)+e|0}Xp.exports=Yo});var Tu=R((Q9,ku)=>{b();typeof Object.create=="function"?ku.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:ku.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var Qp=R((tR,Jp)=>{b();var I3={}.toString;Jp.exports=Array.isArray||function(t){return I3.call(t)=="[object Array]"}});var tv=R((iR,ev)=>{"use strict";b();var k3=li(),T3=pi(),C3=T3("TypedArray.prototype.buffer",!0),O3=Vs();ev.exports=C3||function(e){if(!O3(e))throw new k3("Not a Typed Array");return e.buffer}});var pa=R((aR,iv)=>{"use strict";b();var Tt=Ie().Buffer,P3=Qp(),D3=tv(),U3=ArrayBuffer.isView||function(e){try{return D3(e),!0}catch{return!1}},N3=typeof Uint8Array<"u",rv=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",L3=rv&&(Tt.prototype instanceof Uint8Array||Tt.TYPED_ARRAY_SUPPORT);iv.exports=function(e,r){if(Tt.isBuffer(e))return e.constructor&&!("isBuffer"in e)?Tt.from(e):e;if(typeof e=="string")return Tt.from(e,r);if(rv&&U3(e)){if(e.byteLength===0)return Tt.alloc(0);if(L3){var i=Tt.from(e.buffer,e.byteOffset,e.byteLength);if(i.byteLength===e.byteLength)return i}var n=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),a=Tt.from(n);if(a.length===e.byteLength)return a}if(N3&&e instanceof Uint8Array)return Tt.from(e);var f=P3(e);if(f)for(var v=0;v<e.length;v+=1){var m=e[v];if(typeof m!="number"||m<0||m>255||~~m!==m)throw new RangeError("Array items must be numbers in the range 0-255.")}if(f||Tt.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e))return Tt.from(e);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}});var fv=R((fR,ov)=>{"use strict";b();var F3=Ie().Buffer,j3=pa(),av=typeof Uint8Array<"u",H3=av&&typeof ArrayBuffer<"u",nv=H3&&ArrayBuffer.isView;ov.exports=function(t,e){if(typeof t=="string"||F3.isBuffer(t)||av&&t instanceof Uint8Array||nv&&nv(t))return j3(t,e);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')}});var va=R((uR,Cu)=>{"use strict";b();typeof S.default>"u"||!S.default.version||S.default.version.indexOf("v0.")===0||S.default.version.indexOf("v1.")===0&&S.default.version.indexOf("v1.8.")!==0?Cu.exports={nextTick:K3}:Cu.exports=S.default;function K3(t,e,r,i){if(typeof t!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,a,f;switch(n){case 0:case 1:return S.default.nextTick(t);case 2:return S.default.nextTick(function(){t.call(null,e)});case 3:return S.default.nextTick(function(){t.call(null,e,r)});case 4:return S.default.nextTick(function(){t.call(null,e,r,i)});default:for(a=new Array(n-1),f=0;f<a.length;)a[f++]=arguments[f];return S.default.nextTick(function(){t.apply(null,a)})}}});var uv=R((lR,sv)=>{b();var W3={}.toString;sv.exports=Array.isArray||function(t){return W3.call(t)=="[object Array]"}});var Ou=R((dR,hv)=>{b();hv.exports=Gi().EventEmitter});var ef=R((Pu,cv)=>{b();var Qo=ft(),pr=Qo.Buffer;function lv(t,e){for(var r in t)e[r]=t[r]}pr.from&&pr.alloc&&pr.allocUnsafe&&pr.allocUnsafeSlow?cv.exports=Qo:(lv(Qo,Pu),Pu.Buffer=un);function un(t,e,r){return pr(t,e,r)}lv(pr,un);un.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return pr(t,e,r)};un.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=pr(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};un.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return pr(t)};un.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Qo.SlowBuffer(t)}});var hn=R(ct=>{b();function z3(t){return Array.isArray?Array.isArray(t):tf(t)==="[object Array]"}ct.isArray=z3;function G3(t){return typeof t=="boolean"}ct.isBoolean=G3;function V3(t){return t===null}ct.isNull=V3;function $3(t){return t==null}ct.isNullOrUndefined=$3;function Z3(t){return typeof t=="number"}ct.isNumber=Z3;function Y3(t){return typeof t=="string"}ct.isString=Y3;function X3(t){return typeof t=="symbol"}ct.isSymbol=X3;function J3(t){return t===void 0}ct.isUndefined=J3;function Q3(t){return tf(t)==="[object RegExp]"}ct.isRegExp=Q3;function e4(t){return typeof t=="object"&&t!==null}ct.isObject=e4;function t4(t){return tf(t)==="[object Date]"}ct.isDate=t4;function r4(t){return tf(t)==="[object Error]"||t instanceof Error}ct.isError=r4;function i4(t){return typeof t=="function"}ct.isFunction=i4;function n4(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}ct.isPrimitive=n4;ct.isBuffer=ft().Buffer.isBuffer;function tf(t){return Object.prototype.toString.call(t)}});var pv=R((mR,Du)=>{"use strict";b();function a4(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var dv=ef().Buffer,ya=oa();function o4(t,e,r){t.copy(e,r)}Du.exports=(function(){function t(){a4(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},t.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},t.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},t.prototype.concat=function(r){if(this.length===0)return dv.alloc(0);for(var i=dv.allocUnsafe(r>>>0),n=this.head,a=0;n;)o4(n.data,i,a),a+=n.data.length,n=n.next;return i},t})();ya&&ya.inspect&&ya.inspect.custom&&(Du.exports.prototype[ya.inspect.custom]=function(){var t=ya.inspect({length:this.length});return this.constructor.name+" "+t})});var Uu=R((wR,vv)=>{"use strict";b();var rf=va();function f4(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,rf.nextTick(nf,this,t)):rf.nextTick(nf,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(a){!e&&a?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,rf.nextTick(nf,r,a)):rf.nextTick(nf,r,a):e&&e(a)}),this)}function s4(){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 nf(t,e){t.emit("error",e)}vv.exports={destroy:f4,undestroy:s4}});var Lu=R((xR,Mv)=>{"use strict";b();var xi=va();Mv.exports=Ye;function gv(t){var e=this;this.next=null,this.entry=null,this.finish=function(){B4(e,t)}}var u4=!S.default.browser&&["v0.10","v0.9."].indexOf(S.default.version.slice(0,5))>-1?setImmediate:xi.nextTick,ln;Ye.WritableState=ma;var mv=Object.create(hn());mv.inherits=He();var h4={deprecate:ou()},bv=Ou(),of=ef().Buffer,l4=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function c4(t){return of.from(t)}function d4(t){return of.isBuffer(t)||t instanceof l4}var wv=Uu();mv.inherits(Ye,bv);function p4(){}function ma(t,e){ln=ln||Mi(),t=t||{};var r=e instanceof ln;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,n=t.writableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=t.decodeStrings===!1;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(v){_4(e,v)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new gv(this)}ma.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(ma.prototype,"buffer",{get:h4.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var af;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(af=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ye,Symbol.hasInstance,{value:function(t){return af.call(this,t)?!0:this!==Ye?!1:t&&t._writableState instanceof ma}})):af=function(t){return t instanceof this};function Ye(t){if(ln=ln||Mi(),!af.call(Ye,this)&&!(this instanceof ln))return new Ye(t);this._writableState=new ma(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),bv.call(this)}Ye.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function v4(t,e){var r=new Error("write after end");t.emit("error",r),xi.nextTick(e,r)}function y4(t,e,r,i){var n=!0,a=!1;return r===null?a=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!e.objectMode&&(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),xi.nextTick(i,a),n=!1),n}Ye.prototype.write=function(t,e,r){var i=this._writableState,n=!1,a=!i.objectMode&&d4(t);return a&&!of.isBuffer(t)&&(t=c4(t)),typeof e=="function"&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=p4),i.ended?v4(this,r):(a||y4(this,i,t,r))&&(i.pendingcb++,n=m4(this,i,a,t,e,r)),n};Ye.prototype.cork=function(){var t=this._writableState;t.corked++};Ye.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&_v(this,t))};Ye.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this};function g4(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=of.from(e,r)),e}Object.defineProperty(Ye.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function m4(t,e,r,i,n,a){if(!r){var f=g4(e,i,n);i!==f&&(r=!0,n="buffer",i=f)}var v=e.objectMode?1:i.length;e.length+=v;var m=e.length<e.highWaterMark;if(m||(e.needDrain=!0),e.writing||e.corked){var E=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},E?E.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Nu(t,e,!1,v,i,n,a);return m}function Nu(t,e,r,i,n,a,f){e.writelen=i,e.writecb=f,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,a,e.onwrite),e.sync=!1}function b4(t,e,r,i,n){--e.pendingcb,r?(xi.nextTick(n,i),xi.nextTick(ga,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),ga(t,e))}function w4(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function _4(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(w4(r),e)b4(t,r,i,e,n);else{var a=xv(r);!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&_v(t,r),i?u4(yv,t,r,a,n):yv(t,r,a,n)}}function yv(t,e,r,i){r||x4(t,e),e.pendingcb--,i(),ga(t,e)}function x4(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function _v(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),a=e.corkedRequestsFree;a.entry=r;for(var f=0,v=!0;r;)n[f]=r,r.isBuf||(v=!1),r=r.next,f+=1;n.allBuffers=v,Nu(t,e,!0,e.length,n,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new gv(e),e.bufferedRequestCount=0}else{for(;r;){var m=r.chunk,E=r.encoding,A=r.callback,q=e.objectMode?1:m.length;if(Nu(t,e,!1,q,m,E,A),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Ye.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))};Ye.prototype._writev=null;Ye.prototype.end=function(t,e,r){var i=this._writableState;typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||S4(this,i,r)};function xv(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function M4(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),ga(t,e)})}function E4(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,xi.nextTick(M4,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function ga(t,e){var r=xv(e);return r&&(E4(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),r}function S4(t,e,r){e.ending=!0,ga(t,e),r&&(e.finished?xi.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function B4(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(Ye.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});Ye.prototype.destroy=wv.destroy;Ye.prototype._undestroy=wv.undestroy;Ye.prototype._destroy=function(t,e){this.end(),e(t)}});var Mi=R((ER,Av)=>{"use strict";b();var Ev=va(),A4=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Av.exports=vr;var Sv=Object.create(hn());Sv.inherits=He();var Bv=Hu(),ju=Lu();Sv.inherits(vr,Bv);for(Fu=A4(ju.prototype),ff=0;ff<Fu.length;ff++)sf=Fu[ff],vr.prototype[sf]||(vr.prototype[sf]=ju.prototype[sf]);var Fu,sf,ff;function vr(t){if(!(this instanceof vr))return new vr(t);Bv.call(this,t),ju.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",R4)}Object.defineProperty(vr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function R4(){this.allowHalfOpen||this._writableState.ended||Ev.nextTick(q4,this)}function q4(t){t.end()}Object.defineProperty(vr.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}});vr.prototype._destroy=function(t,e){this.push(null),this.end(),Ev.nextTick(e,t)}});var Hu=R((AR,Lv)=>{"use strict";b();var dn=va();Lv.exports=ze;var I4=uv(),ba;ze.ReadableState=Ov;var BR=Gi().EventEmitter,kv=function(t,e){return t.listeners(e).length},Vu=Ou(),wa=ef().Buffer,k4=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function T4(t){return wa.from(t)}function C4(t){return wa.isBuffer(t)||t instanceof k4}var Tv=Object.create(hn());Tv.inherits=He();var Ku=oa(),Ne=void 0;Ku&&Ku.debuglog?Ne=Ku.debuglog("stream"):Ne=function(){};var O4=pv(),Cv=Uu(),cn;Tv.inherits(ze,Vu);var Wu=["error","close","destroy","pause","resume"];function P4(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):I4(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Ov(t,e){ba=ba||Mi(),t=t||{};var r=e instanceof ba;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,n=t.readableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new O4,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(cn||(cn=on().StringDecoder),this.decoder=new cn(t.encoding),this.encoding=t.encoding)}function ze(t){if(ba=ba||Mi(),!(this instanceof ze))return new ze(t);this._readableState=new Ov(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Vu.call(this)}Object.defineProperty(ze.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});ze.prototype.destroy=Cv.destroy;ze.prototype._undestroy=Cv.undestroy;ze.prototype._destroy=function(t,e){this.push(null),e(t)};ze.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=wa.from(t,e),e=""),i=!0),Pv(this,t,e,!1,i)};ze.prototype.unshift=function(t){return Pv(this,t,null,!0,!1)};function Pv(t,e,r,i,n){var a=t._readableState;if(e===null)a.reading=!1,L4(t,a);else{var f;n||(f=D4(a,e)),f?t.emit("error",f):a.objectMode||e&&e.length>0?(typeof e!="string"&&!a.objectMode&&Object.getPrototypeOf(e)!==wa.prototype&&(e=T4(e)),i?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):zu(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||e.length!==0?zu(t,a,e,!1):Dv(t,a)):zu(t,a,e,!1))):i||(a.reading=!1)}return U4(a)}function zu(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&uf(t)),Dv(t,e)}function D4(t,e){var r;return!C4(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function U4(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}ze.prototype.isPaused=function(){return this._readableState.flowing===!1};ze.prototype.setEncoding=function(t){return cn||(cn=on().StringDecoder),this._readableState.decoder=new cn(t),this._readableState.encoding=t,this};var Rv=8388608;function N4(t){return t>=Rv?t=Rv:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function qv(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=N4(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}ze.prototype.read=function(t){Ne("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return Ne("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Gu(this):uf(this),null;if(t=qv(t,e),t===0&&e.ended)return e.length===0&&Gu(this),null;var i=e.needReadable;Ne("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,Ne("length less than watermark",i)),e.ended||e.reading?(i=!1,Ne("reading or ended",i)):i&&(Ne("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=qv(r,e)));var n;return t>0?n=Uv(t,e):n=null,n===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Gu(this)),n!==null&&this.emit("data",n),n};function L4(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,uf(t)}}function uf(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(Ne("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?dn.nextTick(Iv,t):Iv(t))}function Iv(t){Ne("emit readable"),t.emit("readable"),$u(t)}function Dv(t,e){e.readingMore||(e.readingMore=!0,dn.nextTick(F4,t,e))}function F4(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(Ne("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}ze.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};ze.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,Ne("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==S.default.stdout&&t!==S.default.stderr,a=n?v:X;i.endEmitted?dn.nextTick(a):r.once("end",a),t.on("unpipe",f);function f(z,$){Ne("onunpipe"),z===r&&$&&$.hasUnpiped===!1&&($.hasUnpiped=!0,A())}function v(){Ne("onend"),t.end()}var m=j4(r);t.on("drain",m);var E=!1;function A(){Ne("cleanup"),t.removeListener("close",j),t.removeListener("finish",V),t.removeListener("drain",m),t.removeListener("error",C),t.removeListener("unpipe",f),r.removeListener("end",v),r.removeListener("end",X),r.removeListener("data",I),E=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&m()}var q=!1;r.on("data",I);function I(z){Ne("ondata"),q=!1;var $=t.write(z);$===!1&&!q&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Nv(i.pipes,t)!==-1)&&!E&&(Ne("false write response, pause",i.awaitDrain),i.awaitDrain++,q=!0),r.pause())}function C(z){Ne("onerror",z),X(),t.removeListener("error",C),kv(t,"error")===0&&t.emit("error",z)}P4(t,"error",C);function j(){t.removeListener("finish",V),X()}t.once("close",j);function V(){Ne("onfinish"),t.removeListener("close",j),X()}t.once("finish",V);function X(){Ne("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(Ne("pipe resume"),r.resume()),t};function j4(t){return function(){var e=t._readableState;Ne("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&kv(t,"data")&&(e.flowing=!0,$u(t))}}ze.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<n;a++)i[a].emit("unpipe",this,{hasUnpiped:!1});return this}var f=Nv(e.pipes,t);return f===-1?this:(e.pipes.splice(f,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};ze.prototype.on=function(t,e){var r=Vu.prototype.on.call(this,t,e);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&uf(this):dn.nextTick(H4,this))}return r};ze.prototype.addListener=ze.prototype.on;function H4(t){Ne("readable nexttick read 0"),t.read(0)}ze.prototype.resume=function(){var t=this._readableState;return t.flowing||(Ne("resume"),t.flowing=!0,K4(this,t)),this};function K4(t,e){e.resumeScheduled||(e.resumeScheduled=!0,dn.nextTick(W4,t,e))}function W4(t,e){e.reading||(Ne("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),$u(t),e.flowing&&!e.reading&&t.read(0)}ze.prototype.pause=function(){return Ne("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ne("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function $u(t){var e=t._readableState;for(Ne("flow",e.flowing);e.flowing&&t.read()!==null;);}ze.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(Ne("wrapped end"),r.decoder&&!r.ended){var f=r.decoder.end();f&&f.length&&e.push(f)}e.push(null)}),t.on("data",function(f){if(Ne("wrapped data"),r.decoder&&(f=r.decoder.write(f)),!(r.objectMode&&f==null)&&!(!r.objectMode&&(!f||!f.length))){var v=e.push(f);v||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=(function(f){return function(){return t[f].apply(t,arguments)}})(n));for(var a=0;a<Wu.length;a++)t.on(Wu[a],this.emit.bind(this,Wu[a]));return this._read=function(f){Ne("wrapped _read",f),i&&(i=!1,t.resume())},this};Object.defineProperty(ze.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});ze._fromList=Uv;function Uv(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.head.data:r=e.buffer.concat(e.length),e.buffer.clear()):r=z4(t,e.buffer,e.decoder),r}function z4(t,e,r){var i;return t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):t===e.head.data.length?i=e.shift():i=r?G4(t,e):V4(t,e),i}function G4(t,e){var r=e.head,i=1,n=r.data;for(t-=n.length;r=r.next;){var a=r.data,f=t>a.length?a.length:t;if(f===a.length?n+=a:n+=a.slice(0,t),t-=f,t===0){f===a.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=a.slice(f));break}++i}return e.length-=i,n}function V4(t,e){var r=wa.allocUnsafe(t),i=e.head,n=1;for(i.data.copy(r),t-=i.data.length;i=i.next;){var a=i.data,f=t>a.length?a.length:t;if(a.copy(r,r.length-t,0,f),t-=f,t===0){f===a.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=a.slice(f));break}++n}return e.length-=n,r}function Gu(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,dn.nextTick($4,e,t))}function $4(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function Nv(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Zu=R((qR,Hv)=>{"use strict";b();Hv.exports=yr;var hf=Mi(),jv=Object.create(hn());jv.inherits=He();jv.inherits(yr,hf);function Z4(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function yr(t){if(!(this instanceof yr))return new yr(t);hf.call(this,t),this._transformState={afterTransform:Z4.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",Y4)}function Y4(){var t=this;typeof this._flush=="function"?this._flush(function(e,r){Fv(t,e,r)}):Fv(this,null,null)}yr.prototype.push=function(t,e){return this._transformState.needTransform=!1,hf.prototype.push.call(this,t,e)};yr.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")};yr.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};yr.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};yr.prototype._destroy=function(t,e){var r=this;hf.prototype._destroy.call(this,t,function(i){e(i),r.emit("close")})};function Fv(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}});var Gv=R((kR,zv)=>{"use strict";b();zv.exports=_a;var Kv=Zu(),Wv=Object.create(hn());Wv.inherits=He();Wv.inherits(_a,Kv);function _a(t){if(!(this instanceof _a))return new _a(t);Kv.call(this,t)}_a.prototype._transform=function(t,e,r){r(null,t)}});var $v=R((Jt,Vv)=>{b();Jt=Vv.exports=Hu();Jt.Stream=Jt;Jt.Readable=Jt;Jt.Writable=Lu();Jt.Duplex=Mi();Jt.Transform=Zu();Jt.PassThrough=Gv()});var Xv=R((OR,Yv)=>{"use strict";b();var X4=Ie().Buffer,J4=fv(),Zv=$v().Transform,Q4=Tu();function Ur(t){Zv.call(this),this._block=X4.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Q4(Ur,Zv);Ur.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(n){i=n}r(i)};Ur.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};Ur.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");for(var r=J4(t,e),i=this._block,n=0;this._blockOffset+r.length-n>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)i[a]=r[n],a+=1,n+=1;this._update(),this._blockOffset=0}for(;n<r.length;)i[this._blockOffset]=r[n],this._blockOffset+=1,n+=1;for(var f=0,v=r.length*8;v>0;++f)this._length[f]+=v,v=this._length[f]/4294967296|0,v>0&&(this._length[f]-=4294967296*v);return this};Ur.prototype._update=function(){throw new Error("_update is not implemented")};Ur.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();t!==void 0&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e};Ur.prototype._digest=function(){throw new Error("_digest is not implemented")};Yv.exports=Ur});var cf=R((DR,n1)=>{"use strict";b();var Yu=ft().Buffer,e8=Tu(),i1=Xv(),t8=new Array(16),xa=[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],Ma=[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],Ea=[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],Sa=[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],Ba=[0,1518500249,1859775393,2400959708,2840853838],Aa=[1352829926,1548603684,1836072691,2053994217,0];function Ei(t,e){return t<<e|t>>>32-e}function Jv(t,e,r,i,n,a,f,v){return Ei(t+(e^r^i)+a+f|0,v)+n|0}function Qv(t,e,r,i,n,a,f,v){return Ei(t+(e&r|~e&i)+a+f|0,v)+n|0}function e1(t,e,r,i,n,a,f,v){return Ei(t+((e|~r)^i)+a+f|0,v)+n|0}function t1(t,e,r,i,n,a,f,v){return Ei(t+(e&i|r&~i)+a+f|0,v)+n|0}function r1(t,e,r,i,n,a,f,v){return Ei(t+(e^(r|~i))+a+f|0,v)+n|0}function lf(){i1.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}e8(lf,i1);lf.prototype._update=function(){for(var t=t8,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);for(var r=this._a|0,i=this._b|0,n=this._c|0,a=this._d|0,f=this._e|0,v=this._a|0,m=this._b|0,E=this._c|0,A=this._d|0,q=this._e|0,I=0;I<80;I+=1){var C,j;I<16?(C=Jv(r,i,n,a,f,t[xa[I]],Ba[0],Ea[I]),j=r1(v,m,E,A,q,t[Ma[I]],Aa[0],Sa[I])):I<32?(C=Qv(r,i,n,a,f,t[xa[I]],Ba[1],Ea[I]),j=t1(v,m,E,A,q,t[Ma[I]],Aa[1],Sa[I])):I<48?(C=e1(r,i,n,a,f,t[xa[I]],Ba[2],Ea[I]),j=e1(v,m,E,A,q,t[Ma[I]],Aa[2],Sa[I])):I<64?(C=t1(r,i,n,a,f,t[xa[I]],Ba[3],Ea[I]),j=Qv(v,m,E,A,q,t[Ma[I]],Aa[3],Sa[I])):(C=r1(r,i,n,a,f,t[xa[I]],Ba[4],Ea[I]),j=Jv(v,m,E,A,q,t[Ma[I]],Aa[4],Sa[I])),r=f,f=a,a=Ei(n,10),n=i,i=C,v=q,q=A,A=Ei(E,10),E=m,m=j}var V=this._b+n+A|0;this._b=this._c+a+q|0,this._c=this._d+f+v|0,this._d=this._e+r+m|0,this._e=this._a+i+E|0,this._a=V};lf.prototype._digest=function(){this._block[this._blockOffset]=128,this._blockOffset+=1,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=Yu.alloc?Yu.alloc(20):new Yu(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t};n1.exports=lf});var Si=R((NR,Xu)=>{b();typeof Object.create=="function"?Xu.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Xu.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var Bi=R((FR,a1)=>{"use strict";b();var r8=Ie().Buffer,i8=pa();function df(t,e){this._block=r8.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}df.prototype.update=function(t,e){t=i8(t,e||"utf8");for(var r=this._block,i=this._blockSize,n=t.length,a=this._len,f=0;f<n;){for(var v=a%i,m=Math.min(n-f,i-v),E=0;E<m;E++)r[v+E]=t[f+E];a+=m,f+=m,a%i===0&&this._update(r)}return this._len+=n,this};df.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(r&4294967295)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var a=this._hash();return t?a.toString(t):a};df.prototype._update=function(){throw new Error("_update must be implemented by subclass")};a1.exports=df});var s1=R((HR,f1)=>{"use strict";b();var n8=Si(),o1=Bi(),a8=Ie().Buffer,o8=[1518500249,1859775393,-1894007588,-899497514],f8=new Array(80);function Ra(){this.init(),this._w=f8,o1.call(this,64,56)}n8(Ra,o1);Ra.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function s8(t){return t<<5|t>>>27}function u8(t){return t<<30|t>>>2}function h8(t,e,r,i){return t===0?e&r|~e&i:t===2?e&r|e&i|r&i:e^r^i}Ra.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,n=this._c|0,a=this._d|0,f=this._e|0,v=0;v<16;++v)e[v]=t.readInt32BE(v*4);for(;v<80;++v)e[v]=e[v-3]^e[v-8]^e[v-14]^e[v-16];for(var m=0;m<80;++m){var E=~~(m/20),A=s8(r)+h8(E,i,n,a)+f+e[m]+o8[E]|0;f=a,a=n,n=u8(i),i=r,r=A}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0};Ra.prototype._hash=function(){var t=a8.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};f1.exports=Ra});var l1=R((WR,h1)=>{"use strict";b();var l8=Si(),u1=Bi(),c8=Ie().Buffer,d8=[1518500249,1859775393,-1894007588,-899497514],p8=new Array(80);function qa(){this.init(),this._w=p8,u1.call(this,64,56)}l8(qa,u1);qa.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function v8(t){return t<<1|t>>>31}function y8(t){return t<<5|t>>>27}function g8(t){return t<<30|t>>>2}function m8(t,e,r,i){return t===0?e&r|~e&i:t===2?e&r|e&i|r&i:e^r^i}qa.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,n=this._c|0,a=this._d|0,f=this._e|0,v=0;v<16;++v)e[v]=t.readInt32BE(v*4);for(;v<80;++v)e[v]=v8(e[v-3]^e[v-8]^e[v-14]^e[v-16]);for(var m=0;m<80;++m){var E=~~(m/20),A=y8(r)+m8(E,i,n,a)+f+e[m]+d8[E]|0;f=a,a=n,n=g8(i),i=r,r=A}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0};qa.prototype._hash=function(){var t=c8.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};h1.exports=qa});var Ju=R((GR,d1)=>{"use strict";b();var b8=Si(),c1=Bi(),w8=Ie().Buffer,_8=[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],x8=new Array(64);function Ia(){this.init(),this._w=x8,c1.call(this,64,56)}b8(Ia,c1);Ia.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 M8(t,e,r){return r^t&(e^r)}function E8(t,e,r){return t&e|r&(t|e)}function S8(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function B8(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function A8(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function R8(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}Ia.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,n=this._c|0,a=this._d|0,f=this._e|0,v=this._f|0,m=this._g|0,E=this._h|0,A=0;A<16;++A)e[A]=t.readInt32BE(A*4);for(;A<64;++A)e[A]=R8(e[A-2])+e[A-7]+A8(e[A-15])+e[A-16]|0;for(var q=0;q<64;++q){var I=E+B8(f)+M8(f,v,m)+_8[q]+e[q]|0,C=S8(r)+E8(r,i,n)|0;E=m,m=v,v=f,f=a+I|0,a=n,n=i,i=r,r=I+C|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0,this._f=v+this._f|0,this._g=m+this._g|0,this._h=E+this._h|0};Ia.prototype._hash=function(){var t=w8.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};d1.exports=Ia});var v1=R(($R,p1)=>{"use strict";b();var q8=Si(),I8=Ju(),k8=Bi(),T8=Ie().Buffer,C8=new Array(64);function pf(){this.init(),this._w=C8,k8.call(this,64,56)}q8(pf,I8);pf.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};pf.prototype._hash=function(){var t=T8.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};p1.exports=pf});var Qu=R((YR,x1)=>{"use strict";b();var O8=Si(),_1=Bi(),P8=Ie().Buffer,y1=[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],D8=new Array(160);function ka(){this.init(),this._w=D8,_1.call(this,128,112)}O8(ka,_1);ka.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 g1(t,e,r){return r^t&(e^r)}function m1(t,e,r){return t&e|r&(t|e)}function b1(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function w1(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function U8(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function N8(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function L8(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function F8(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function nt(t,e){return t>>>0<e>>>0?1:0}ka.prototype._update=function(t){for(var e=this._w,r=this._ah|0,i=this._bh|0,n=this._ch|0,a=this._dh|0,f=this._eh|0,v=this._fh|0,m=this._gh|0,E=this._hh|0,A=this._al|0,q=this._bl|0,I=this._cl|0,C=this._dl|0,j=this._el|0,V=this._fl|0,X=this._gl|0,z=this._hl|0,$=0;$<32;$+=2)e[$]=t.readInt32BE($*4),e[$+1]=t.readInt32BE($*4+4);for(;$<160;$+=2){var Le=e[$-30],k=e[$-30+1],O=U8(Le,k),D=N8(k,Le);Le=e[$-4],k=e[$-4+1];var L=L8(Le,k),F=F8(k,Le),H=e[$-14],M=e[$-14+1],h=e[$-32],y=e[$-32+1],l=D+M|0,o=O+H+nt(l,D)|0;l=l+F|0,o=o+L+nt(l,F)|0,l=l+y|0,o=o+h+nt(l,y)|0,e[$]=o,e[$+1]=l}for(var s=0;s<160;s+=2){o=e[s],l=e[s+1];var d=m1(r,i,n),g=m1(A,q,I),p=b1(r,A),u=b1(A,r),w=w1(f,j),_=w1(j,f),c=y1[s],x=y1[s+1],P=g1(f,v,m),N=g1(j,V,X),U=z+_|0,W=E+w+nt(U,z)|0;U=U+N|0,W=W+P+nt(U,N)|0,U=U+x|0,W=W+c+nt(U,x)|0,U=U+l|0,W=W+o+nt(U,l)|0;var K=u+g|0,G=p+d+nt(K,u)|0;E=m,z=X,m=v,X=V,v=f,V=j,j=C+U|0,f=a+W+nt(j,C)|0,a=n,C=I,n=i,I=q,i=r,q=A,A=U+K|0,r=W+G+nt(A,U)|0}this._al=this._al+A|0,this._bl=this._bl+q|0,this._cl=this._cl+I|0,this._dl=this._dl+C|0,this._el=this._el+j|0,this._fl=this._fl+V|0,this._gl=this._gl+X|0,this._hl=this._hl+z|0,this._ah=this._ah+r+nt(this._al,A)|0,this._bh=this._bh+i+nt(this._bl,q)|0,this._ch=this._ch+n+nt(this._cl,I)|0,this._dh=this._dh+a+nt(this._dl,C)|0,this._eh=this._eh+f+nt(this._el,j)|0,this._fh=this._fh+v+nt(this._fl,V)|0,this._gh=this._gh+m+nt(this._gl,X)|0,this._hh=this._hh+E+nt(this._hl,z)|0};ka.prototype._hash=function(){var t=P8.allocUnsafe(64);function e(r,i,n){t.writeInt32BE(r,n),t.writeInt32BE(i,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};x1.exports=ka});var E1=R((JR,M1)=>{"use strict";b();var j8=Si(),H8=Qu(),K8=Bi(),W8=Ie().Buffer,z8=new Array(160);function vf(){this.init(),this._w=z8,K8.call(this,128,112)}j8(vf,H8);vf.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};vf.prototype._hash=function(){var t=W8.allocUnsafe(48);function e(r,i,n){t.writeInt32BE(r,n),t.writeInt32BE(i,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};M1.exports=vf});var yf=R((eq,gr)=>{"use strict";b();gr.exports=function(e){var r=e.toLowerCase(),i=gr.exports[r];if(!i)throw new Error(r+" is not supported (we accept pull requests)");return new i};gr.exports.sha=s1();gr.exports.sha1=l1();gr.exports.sha224=v1();gr.exports.sha256=Ju();gr.exports.sha384=E1();gr.exports.sha512=Qu()});var S1=R((rq,eh)=>{b();typeof Object.create=="function"?eh.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:eh.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var mr=R((nq,A1)=>{"use strict";b();var G8=Ie().Buffer,B1=qu().Transform,V8=on().StringDecoder,$8=S1(),Z8=pa();function Ct(t){B1.call(this),this.hashMode=typeof t=="string",this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}$8(Ct,B1);Ct.prototype.update=function(t,e,r){var i=Z8(t,e),n=this._update(i);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)};Ct.prototype.setAutoPadding=function(){};Ct.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};Ct.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};Ct.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};Ct.prototype._transform=function(t,e,r){var i;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(n){i=n}finally{r(i)}};Ct.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(r){e=r}t(e)};Ct.prototype._finalOrDigest=function(t){var e=this.__final()||G8.alloc(0);return t&&(e=this._toString(e,t,!0)),e};Ct.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new V8(e),this._encoding=e),this._encoding!==e)throw new Error("can\u2019t switch encodings");var i=this._decoder.write(t);return r&&(i+=this._decoder.end()),i};A1.exports=Ct});var Ta=R((oq,q1)=>{"use strict";b();var Y8=He(),X8=Jo(),J8=cf(),Q8=yf(),R1=mr();function gf(t){R1.call(this,"digest"),this._hash=t}Y8(gf,R1);gf.prototype._update=function(t){this._hash.update(t)};gf.prototype._final=function(){return this._hash.digest()};q1.exports=function(e){return e=e.toLowerCase(),e==="md5"?new X8:e==="rmd160"||e==="ripemd160"?new J8:new gf(Q8(e))}});var T1=R((sq,k1)=>{"use strict";b();var e5=He(),Ai=Ie().Buffer,I1=mr(),t5=Ai.alloc(128),pn=64;function mf(t,e){I1.call(this,"digest"),typeof e=="string"&&(e=Ai.from(e)),this._alg=t,this._key=e,e.length>pn?e=t(e):e.length<pn&&(e=Ai.concat([e,t5],pn));for(var r=this._ipad=Ai.allocUnsafe(pn),i=this._opad=Ai.allocUnsafe(pn),n=0;n<pn;n++)r[n]=e[n]^54,i[n]=e[n]^92;this._hash=[r]}e5(mf,I1);mf.prototype._update=function(t){this._hash.push(t)};mf.prototype._final=function(){var t=this._alg(Ai.concat(this._hash));return this._alg(Ai.concat([this._opad,t]))};k1.exports=mf});var th=R((hq,C1)=>{b();var r5=Jo();C1.exports=function(t){return new r5().update(t).digest()}});var D1=R((cq,P1)=>{"use strict";b();var i5=He(),n5=T1(),O1=mr(),Ca=Ie().Buffer,a5=th(),rh=cf(),ih=yf(),o5=Ca.alloc(128);function Oa(t,e){O1.call(this,"digest"),typeof e=="string"&&(e=Ca.from(e));var r=t==="sha512"||t==="sha384"?128:64;if(this._alg=t,this._key=e,e.length>r){var i=t==="rmd160"?new rh:ih(t);e=i.update(e).digest()}else e.length<r&&(e=Ca.concat([e,o5],r));for(var n=this._ipad=Ca.allocUnsafe(r),a=this._opad=Ca.allocUnsafe(r),f=0;f<r;f++)n[f]=e[f]^54,a[f]=e[f]^92;this._hash=t==="rmd160"?new rh:ih(t),this._hash.update(n)}i5(Oa,O1);Oa.prototype._update=function(t){this._hash.update(t)};Oa.prototype._final=function(){var t=this._hash.digest(),e=this._alg==="rmd160"?new rh:ih(this._alg);return e.update(this._opad).update(t).digest()};P1.exports=function(e,r){return e=e.toLowerCase(),e==="rmd160"||e==="ripemd160"?new Oa("rmd160",r):e==="md5"?new n5(a5,r):new Oa(e,r)}});var bf=R((pq,U1)=>{"use strict";b();U1.exports={}});var nh=R((yq,N1)=>{"use strict";b();var f5=isFinite,s5=Math.pow(2,30)-1;N1.exports=function(t,e){if(typeof t!="number")throw new TypeError("Iterations not a number");if(t<0||!f5(t))throw new TypeError("Bad iterations");if(typeof e!="number")throw new TypeError("Key length not a number");if(e<0||e>s5||e!==e)throw new TypeError("Bad key length")}});var ah=R((mq,F1)=>{"use strict";b();var wf;globalThis.process&&globalThis.process.browser?wf="utf-8":globalThis.process&&globalThis.process.version?(L1=parseInt(S.default.version.split(".")[0].slice(1),10),wf=L1>=6?"utf-8":"binary"):wf="utf-8";var L1;F1.exports=wf});var oh=R((wq,K1)=>{"use strict";b();var u5=Ie().Buffer,h5=pa(),H1=typeof Uint8Array<"u",l5=H1&&typeof ArrayBuffer<"u",j1=l5&&ArrayBuffer.isView;K1.exports=function(t,e,r){if(typeof t=="string"||u5.isBuffer(t)||H1&&t instanceof Uint8Array||j1&&j1(t))return h5(t,e);throw new TypeError(r+" must be a string, a Buffer, a Uint8Array, or a DataView")}});var fh=R((xq,V1)=>{"use strict";b();var c5=th(),d5=cf(),p5=yf(),Ri=Ie().Buffer,v5=nh(),W1=ah(),z1=oh(),y5=Ri.alloc(128),_f={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},g5={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function m5(t){return new d5().update(t).digest()}function b5(t){function e(r){return p5(t).update(r).digest()}return t==="rmd160"||t==="ripemd160"?m5:t==="md5"?c5:e}function G1(t,e,r){var i=b5(t),n=t==="sha512"||t==="sha384"?128:64;e.length>n?e=i(e):e.length<n&&(e=Ri.concat([e,y5],n));for(var a=Ri.allocUnsafe(n+_f[t]),f=Ri.allocUnsafe(n+_f[t]),v=0;v<n;v++)a[v]=e[v]^54,f[v]=e[v]^92;var m=Ri.allocUnsafe(n+r+4);a.copy(m,0,0,n),this.ipad1=m,this.ipad2=a,this.opad=f,this.alg=t,this.blocksize=n,this.hash=i,this.size=_f[t]}G1.prototype.run=function(t,e){t.copy(e,this.blocksize);var r=this.hash(e);return r.copy(this.opad,this.blocksize),this.hash(this.opad)};function w5(t,e,r,i,n){v5(r,i),t=z1(t,W1,"Password"),e=z1(e,W1,"Salt");var a=(n||"sha1").toLowerCase(),f=g5[a]||a,v=_f[f];if(typeof v!="number"||!v)throw new TypeError("Digest algorithm not supported: "+n);var m=new G1(f,t,e.length),E=Ri.allocUnsafe(i),A=Ri.allocUnsafe(e.length+4);e.copy(A,0,0,e.length);for(var q=0,I=v,C=Math.ceil(i/I),j=1;j<=C;j++){A.writeUInt32BE(j,e.length);for(var V=m.run(A,m.ipad1),X=V,z=1;z<r;z++){X=m.run(X,m.ipad2);for(var $=0;$<I;$++)V[$]^=X[$]}V.copy(E,q),q+=I}return E}V1.exports=w5});var ey=R((Eq,Q1)=>{"use strict";b();var X1=Ie().Buffer,_5=nh(),$1=ah(),Z1=fh(),Y1=oh(),xf,Pa=globalThis.crypto&&globalThis.crypto.subtle,x5={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"},sh=[],qi;function uh(){return qi||(globalThis.process&&globalThis.process.nextTick?qi=globalThis.process.nextTick:globalThis.queueMicrotask?qi=globalThis.queueMicrotask:globalThis.setImmediate?qi=globalThis.setImmediate:qi=globalThis.setTimeout,qi)}function J1(t,e,r,i,n){return Pa.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then(function(a){return Pa.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:n}},a,i<<3)}).then(function(a){return X1.from(a)})}function M5(t){if(globalThis.process&&!globalThis.process.browser||!Pa||!Pa.importKey||!Pa.deriveBits)return Promise.resolve(!1);if(sh[t]!==void 0)return sh[t];xf=xf||X1.alloc(8);var e=J1(xf,xf,10,128,t).then(function(){return!0},function(){return!1});return sh[t]=e,e}function E5(t,e){t.then(function(r){uh()(function(){e(null,r)})},function(r){uh()(function(){e(r)})})}Q1.exports=function(t,e,r,i,n,a){if(typeof n=="function"&&(a=n,n=void 0),_5(r,i),t=Y1(t,$1,"Password"),e=Y1(e,$1,"Salt"),typeof a!="function")throw new Error("No callback provided to pbkdf2");n=n||"sha1";var f=x5[n.toLowerCase()];if(!f||typeof globalThis.Promise!="function"){uh()(function(){var v;try{v=Z1(t,e,r,i,n)}catch(m){a(m);return}a(null,v)});return}E5(M5(f).then(function(v){return v?J1(t,e,r,i,f):Z1(t,e,r,i,n)}),a)}});var lh=R(hh=>{"use strict";b();hh.pbkdf2=ey();hh.pbkdf2Sync=fh()});var ch=R(Et=>{"use strict";b();Et.readUInt32BE=function(e,r){var i=e[0+r]<<24|e[1+r]<<16|e[2+r]<<8|e[3+r];return i>>>0};Et.writeUInt32BE=function(e,r,i){e[0+i]=r>>>24,e[1+i]=r>>>16&255,e[2+i]=r>>>8&255,e[3+i]=r&255};Et.ip=function(e,r,i,n){for(var a=0,f=0,v=6;v>=0;v-=2){for(var m=0;m<=24;m+=8)a<<=1,a|=r>>>m+v&1;for(var m=0;m<=24;m+=8)a<<=1,a|=e>>>m+v&1}for(var v=6;v>=0;v-=2){for(var m=1;m<=25;m+=8)f<<=1,f|=r>>>m+v&1;for(var m=1;m<=25;m+=8)f<<=1,f|=e>>>m+v&1}i[n+0]=a>>>0,i[n+1]=f>>>0};Et.rip=function(e,r,i,n){for(var a=0,f=0,v=0;v<4;v++)for(var m=24;m>=0;m-=8)a<<=1,a|=r>>>m+v&1,a<<=1,a|=e>>>m+v&1;for(var v=4;v<8;v++)for(var m=24;m>=0;m-=8)f<<=1,f|=r>>>m+v&1,f<<=1,f|=e>>>m+v&1;i[n+0]=a>>>0,i[n+1]=f>>>0};Et.pc1=function(e,r,i,n){for(var a=0,f=0,v=7;v>=5;v--){for(var m=0;m<=24;m+=8)a<<=1,a|=r>>m+v&1;for(var m=0;m<=24;m+=8)a<<=1,a|=e>>m+v&1}for(var m=0;m<=24;m+=8)a<<=1,a|=r>>m+v&1;for(var v=1;v<=3;v++){for(var m=0;m<=24;m+=8)f<<=1,f|=r>>m+v&1;for(var m=0;m<=24;m+=8)f<<=1,f|=e>>m+v&1}for(var m=0;m<=24;m+=8)f<<=1,f|=e>>m+v&1;i[n+0]=a>>>0,i[n+1]=f>>>0};Et.r28shl=function(e,r){return e<<r&268435455|e>>>28-r};var Mf=[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];Et.pc2=function(e,r,i,n){for(var a=0,f=0,v=Mf.length>>>1,m=0;m<v;m++)a<<=1,a|=e>>>Mf[m]&1;for(var m=v;m<Mf.length;m++)f<<=1,f|=r>>>Mf[m]&1;i[n+0]=a>>>0,i[n+1]=f>>>0};Et.expand=function(e,r,i){var n=0,a=0;n=(e&1)<<5|e>>>27;for(var f=23;f>=15;f-=4)n<<=6,n|=e>>>f&63;for(var f=11;f>=3;f-=4)a|=e>>>f&63,a<<=6;a|=(e&31)<<1|e>>>31,r[i+0]=n>>>0,r[i+1]=a>>>0};var ty=[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];Et.substitute=function(e,r){for(var i=0,n=0;n<4;n++){var a=e>>>18-n*6&63,f=ty[n*64+a];i<<=4,i|=f}for(var n=0;n<4;n++){var a=r>>>18-n*6&63,f=ty[256+n*64+a];i<<=4,i|=f}return i>>>0};var ry=[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];Et.permute=function(e){for(var r=0,i=0;i<ry.length;i++)r<<=1,r|=e>>>ry[i]&1;return r>>>0};Et.padSplit=function(e,r,i){for(var n=e.toString(2);n.length<r;)n="0"+n;for(var a=[],f=0;f<r;f+=i)a.push(n.slice(f,f+i));return a.join(" ")}});var Ot=R((Iq,ny)=>{b();ny.exports=iy;function iy(t,e){if(!t)throw new Error(e||"Assertion failed")}iy.equal=function(e,r,i){if(e!=r)throw new Error(i||"Assertion failed: "+e+" != "+r)}});var Ef=R((Tq,ay)=>{"use strict";b();var S5=Ot();function St(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=t.padding!==!1}ay.exports=St;St.prototype._init=function(){};St.prototype.update=function(e){return e.length===0?[]:this.type==="decrypt"?this._updateDecrypt(e):this._updateEncrypt(e)};St.prototype._buffer=function(e,r){for(var i=Math.min(this.buffer.length-this.bufferOff,e.length-r),n=0;n<i;n++)this.buffer[this.bufferOff+n]=e[r+n];return this.bufferOff+=i,i};St.prototype._flushBuffer=function(e,r){return this._update(this.buffer,0,e,r),this.bufferOff=0,this.blockSize};St.prototype._updateEncrypt=function(e){var r=0,i=0,n=(this.bufferOff+e.length)/this.blockSize|0,a=new Array(n*this.blockSize);this.bufferOff!==0&&(r+=this._buffer(e,r),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(a,i)));for(var f=e.length-(e.length-r)%this.blockSize;r<f;r+=this.blockSize)this._update(e,r,a,i),i+=this.blockSize;for(;r<e.length;r++,this.bufferOff++)this.buffer[this.bufferOff]=e[r];return a};St.prototype._updateDecrypt=function(e){for(var r=0,i=0,n=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,a=new Array(n*this.blockSize);n>0;n--)r+=this._buffer(e,r),i+=this._flushBuffer(a,i);return r+=this._buffer(e,r),a};St.prototype.final=function(e){var r;e&&(r=this.update(e));var i;return this.type==="encrypt"?i=this._finalEncrypt():i=this._finalDecrypt(),r?r.concat(i):i};St.prototype._pad=function(e,r){if(r===0)return!1;for(;r<e.length;)e[r++]=0;return!0};St.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e};St.prototype._unpad=function(e){return e};St.prototype._finalDecrypt=function(){S5.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}});var dh=R((Oq,sy)=>{"use strict";b();var oy=Ot(),B5=He(),tt=ch(),fy=Ef();function A5(){this.tmp=new Array(2),this.keys=null}function Qt(t){fy.call(this,t);var e=new A5;this._desState=e,this.deriveKeys(e,t.key)}B5(Qt,fy);sy.exports=Qt;Qt.create=function(e){return new Qt(e)};var R5=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];Qt.prototype.deriveKeys=function(e,r){e.keys=new Array(32),oy.equal(r.length,this.blockSize,"Invalid key length");var i=tt.readUInt32BE(r,0),n=tt.readUInt32BE(r,4);tt.pc1(i,n,e.tmp,0),i=e.tmp[0],n=e.tmp[1];for(var a=0;a<e.keys.length;a+=2){var f=R5[a>>>1];i=tt.r28shl(i,f),n=tt.r28shl(n,f),tt.pc2(i,n,e.keys,a)}};Qt.prototype._update=function(e,r,i,n){var a=this._desState,f=tt.readUInt32BE(e,r),v=tt.readUInt32BE(e,r+4);tt.ip(f,v,a.tmp,0),f=a.tmp[0],v=a.tmp[1],this.type==="encrypt"?this._encrypt(a,f,v,a.tmp,0):this._decrypt(a,f,v,a.tmp,0),f=a.tmp[0],v=a.tmp[1],tt.writeUInt32BE(i,f,n),tt.writeUInt32BE(i,v,n+4)};Qt.prototype._pad=function(e,r){if(this.padding===!1)return!1;for(var i=e.length-r,n=r;n<e.length;n++)e[n]=i;return!0};Qt.prototype._unpad=function(e){if(this.padding===!1)return e;for(var r=e[e.length-1],i=e.length-r;i<e.length;i++)oy.equal(e[i],r);return e.slice(0,e.length-r)};Qt.prototype._encrypt=function(e,r,i,n,a){for(var f=r,v=i,m=0;m<e.keys.length;m+=2){var E=e.keys[m],A=e.keys[m+1];tt.expand(v,e.tmp,0),E^=e.tmp[0],A^=e.tmp[1];var q=tt.substitute(E,A),I=tt.permute(q),C=v;v=(f^I)>>>0,f=C}tt.rip(v,f,n,a)};Qt.prototype._decrypt=function(e,r,i,n,a){for(var f=i,v=r,m=e.keys.length-2;m>=0;m-=2){var E=e.keys[m],A=e.keys[m+1];tt.expand(f,e.tmp,0),E^=e.tmp[0],A^=e.tmp[1];var q=tt.substitute(E,A),I=tt.permute(q),C=f;f=(v^I)>>>0,v=C}tt.rip(f,v,n,a)}});var hy=R(uy=>{"use strict";b();var q5=Ot(),I5=He(),Sf={};function k5(t){q5.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}function T5(t){function e(a){t.call(this,a),this._cbcInit()}I5(e,t);for(var r=Object.keys(Sf),i=0;i<r.length;i++){var n=r[i];e.prototype[n]=Sf[n]}return e.create=function(f){return new e(f)},e}uy.instantiate=T5;Sf._cbcInit=function(){var e=new k5(this.options.iv);this._cbcState=e};Sf._update=function(e,r,i,n){var a=this._cbcState,f=this.constructor.super_.prototype,v=a.iv;if(this.type==="encrypt"){for(var m=0;m<this.blockSize;m++)v[m]^=e[r+m];f._update.call(this,v,0,i,n);for(var m=0;m<this.blockSize;m++)v[m]=i[n+m]}else{f._update.call(this,e,r,i,n);for(var m=0;m<this.blockSize;m++)i[n+m]^=v[m];for(var m=0;m<this.blockSize;m++)v[m]=e[r+m]}}});var dy=R((Nq,cy)=>{"use strict";b();var C5=Ot(),O5=He(),ly=Ef(),Nr=dh();function P5(t,e){C5.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),i=e.slice(8,16),n=e.slice(16,24);t==="encrypt"?this.ciphers=[Nr.create({type:"encrypt",key:r}),Nr.create({type:"decrypt",key:i}),Nr.create({type:"encrypt",key:n})]:this.ciphers=[Nr.create({type:"decrypt",key:n}),Nr.create({type:"encrypt",key:i}),Nr.create({type:"decrypt",key:r})]}function Ii(t){ly.call(this,t);var e=new P5(this.type,this.options.key);this._edeState=e}O5(Ii,ly);cy.exports=Ii;Ii.create=function(e){return new Ii(e)};Ii.prototype._update=function(e,r,i,n){var a=this._edeState;a.ciphers[0]._update(e,r,i,n),a.ciphers[1]._update(i,n,i,n),a.ciphers[2]._update(i,n,i,n)};Ii.prototype._pad=Nr.prototype._pad;Ii.prototype._unpad=Nr.prototype._unpad});var py=R(vn=>{"use strict";b();vn.utils=ch();vn.Cipher=Ef();vn.DES=dh();vn.CBC=hy();vn.EDE=dy()});var gy=R((Hq,yy)=>{b();var vy=mr(),br=py(),D5=He(),ki=Ie().Buffer,Da={"des-ede3-cbc":br.CBC.instantiate(br.EDE),"des-ede3":br.EDE,"des-ede-cbc":br.CBC.instantiate(br.EDE),"des-ede":br.EDE,"des-cbc":br.CBC.instantiate(br.DES),"des-ecb":br.DES};Da.des=Da["des-cbc"];Da.des3=Da["des-ede3-cbc"];yy.exports=Bf;D5(Bf,vy);function Bf(t){vy.call(this);var e=t.mode.toLowerCase(),r=Da[e],i;t.decrypt?i="decrypt":i="encrypt";var n=t.key;ki.isBuffer(n)||(n=ki.from(n)),(e==="des-ede"||e==="des-ede-cbc")&&(n=ki.concat([n,n.slice(0,8)]));var a=t.iv;ki.isBuffer(a)||(a=ki.from(a)),this._des=r.create({key:n,iv:a,type:i})}Bf.prototype._update=function(t){return ki.from(this._des.update(t))};Bf.prototype._final=function(){return ki.from(this._des.final())}});var my=R(ph=>{b();ph.encrypt=function(t,e){return t._cipher.encryptBlock(e)};ph.decrypt=function(t,e){return t._cipher.decryptBlock(e)}});var yn=R((Gq,by)=>{b();by.exports=function(e,r){for(var i=Math.min(e.length,r.length),n=new B.Buffer(i),a=0;a<i;++a)n[a]=e[a]^r[a];return n}});var _y=R(vh=>{b();var wy=yn();vh.encrypt=function(t,e){var r=wy(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev};vh.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return wy(i,r)}});var Ey=R(My=>{b();var Ua=Ie().Buffer,U5=yn();function xy(t,e,r){var i=e.length,n=U5(e,t._cache);return t._cache=t._cache.slice(i),t._prev=Ua.concat([t._prev,r?e:n]),n}My.encrypt=function(t,e,r){for(var i=Ua.allocUnsafe(0),n;e.length;)if(t._cache.length===0&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=Ua.allocUnsafe(0)),t._cache.length<=e.length)n=t._cache.length,i=Ua.concat([i,xy(t,e.slice(0,n),r)]),e=e.slice(n);else{i=Ua.concat([i,xy(t,e,r)]);break}return i}});var By=R(Sy=>{b();var yh=Ie().Buffer;function N5(t,e,r){var i=t._cipher.encryptBlock(t._prev),n=i[0]^e;return t._prev=yh.concat([t._prev.slice(1),yh.from([r?e:n])]),n}Sy.encrypt=function(t,e,r){for(var i=e.length,n=yh.allocUnsafe(i),a=-1;++a<i;)n[a]=N5(t,e[a],r);return n}});var Ry=R(Ay=>{b();var Af=Ie().Buffer;function L5(t,e,r){for(var i,n=-1,a=8,f=0,v,m;++n<a;)i=t._cipher.encryptBlock(t._prev),v=e&1<<7-n?128:0,m=i[0]^v,f+=(m&128)>>n%8,t._prev=F5(t._prev,r?v:m);return f}function F5(t,e){var r=t.length,i=-1,n=Af.allocUnsafe(t.length);for(t=Af.concat([t,Af.from([e])]);++i<r;)n[i]=t[i]<<1|t[i+1]>>7;return n}Ay.encrypt=function(t,e,r){for(var i=e.length,n=Af.allocUnsafe(i),a=-1;++a<i;)n[a]=L5(t,e[a],r);return n}});var Iy=R(qy=>{b();var j5=yn();function H5(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}qy.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=B.Buffer.concat([t._cache,H5(t)]);var r=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),j5(e,r)}});var gh=R((nI,ky)=>{b();function K5(t){for(var e=t.length,r;e--;)if(r=t.readUInt8(e),r===255)t.writeUInt8(0,e);else{r++,t.writeUInt8(r,e);break}}ky.exports=K5});var bh=R(Cy=>{b();var W5=yn(),Ty=Ie().Buffer,z5=gh();function G5(t){var e=t._cipher.encryptBlockRaw(t._prev);return z5(t._prev),e}var mh=16;Cy.encrypt=function(t,e){var r=Math.ceil(e.length/mh),i=t._cache.length;t._cache=Ty.concat([t._cache,Ty.allocUnsafe(r*mh)]);for(var n=0;n<r;n++){var a=G5(t),f=i+n*mh;t._cache.writeUInt32BE(a[0],f+0),t._cache.writeUInt32BE(a[1],f+4),t._cache.writeUInt32BE(a[2],f+8),t._cache.writeUInt32BE(a[3],f+12)}var v=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),W5(e,v)}});var wh=R((sI,V5)=>{V5.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"}}});var qf=R((uI,Oy)=>{b();var $5={ECB:my(),CBC:_y(),CFB:Ey(),CFB8:By(),CFB1:Ry(),OFB:Iy(),CTR:bh(),GCM:bh()},Rf=wh();for(_h in Rf)Rf[_h].module=$5[Rf[_h].mode];var _h;Oy.exports=Rf});var Na=R((lI,Dy)=>{b();var If=Ie().Buffer;function Mh(t){If.isBuffer(t)||(t=If.from(t));for(var e=t.length/4|0,r=new Array(e),i=0;i<e;i++)r[i]=t.readUInt32BE(i*4);return r}function xh(t){for(var e=0;e<t.length;t++)t[e]=0}function Py(t,e,r,i,n){for(var a=r[0],f=r[1],v=r[2],m=r[3],E=t[0]^e[0],A=t[1]^e[1],q=t[2]^e[2],I=t[3]^e[3],C,j,V,X,z=4,$=1;$<n;$++)C=a[E>>>24]^f[A>>>16&255]^v[q>>>8&255]^m[I&255]^e[z++],j=a[A>>>24]^f[q>>>16&255]^v[I>>>8&255]^m[E&255]^e[z++],V=a[q>>>24]^f[I>>>16&255]^v[E>>>8&255]^m[A&255]^e[z++],X=a[I>>>24]^f[E>>>16&255]^v[A>>>8&255]^m[q&255]^e[z++],E=C,A=j,q=V,I=X;return C=(i[E>>>24]<<24|i[A>>>16&255]<<16|i[q>>>8&255]<<8|i[I&255])^e[z++],j=(i[A>>>24]<<24|i[q>>>16&255]<<16|i[I>>>8&255]<<8|i[E&255])^e[z++],V=(i[q>>>24]<<24|i[I>>>16&255]<<16|i[E>>>8&255]<<8|i[A&255])^e[z++],X=(i[I>>>24]<<24|i[E>>>16&255]<<16|i[A>>>8&255]<<8|i[q&255])^e[z++],C=C>>>0,j=j>>>0,V=V>>>0,X=X>>>0,[C,j,V,X]}var Z5=[0,1,2,4,8,16,32,64,128,27,54],Xe=(function(){for(var t=new Array(256),e=0;e<256;e++)e<128?t[e]=e<<1:t[e]=e<<1^283;for(var r=[],i=[],n=[[],[],[],[]],a=[[],[],[],[]],f=0,v=0,m=0;m<256;++m){var E=v^v<<1^v<<2^v<<3^v<<4;E=E>>>8^E&255^99,r[f]=E,i[E]=f;var A=t[f],q=t[A],I=t[q],C=t[E]*257^E*16843008;n[0][f]=C<<24|C>>>8,n[1][f]=C<<16|C>>>16,n[2][f]=C<<8|C>>>24,n[3][f]=C,C=I*16843009^q*65537^A*257^f*16843008,a[0][E]=C<<24|C>>>8,a[1][E]=C<<16|C>>>16,a[2][E]=C<<8|C>>>24,a[3][E]=C,f===0?f=v=1:(f=A^t[t[t[I^A]]],v^=t[t[v]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:a}})();function Bt(t){this._key=Mh(t),this._reset()}Bt.blockSize=16;Bt.keySize=256/8;Bt.prototype.blockSize=Bt.blockSize;Bt.prototype.keySize=Bt.keySize;Bt.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,i=(r+1)*4,n=[],a=0;a<e;a++)n[a]=t[a];for(a=e;a<i;a++){var f=n[a-1];a%e===0?(f=f<<8|f>>>24,f=Xe.SBOX[f>>>24]<<24|Xe.SBOX[f>>>16&255]<<16|Xe.SBOX[f>>>8&255]<<8|Xe.SBOX[f&255],f^=Z5[a/e|0]<<24):e>6&&a%e===4&&(f=Xe.SBOX[f>>>24]<<24|Xe.SBOX[f>>>16&255]<<16|Xe.SBOX[f>>>8&255]<<8|Xe.SBOX[f&255]),n[a]=n[a-e]^f}for(var v=[],m=0;m<i;m++){var E=i-m,A=n[E-(m%4?0:4)];m<4||E<=4?v[m]=A:v[m]=Xe.INV_SUB_MIX[0][Xe.SBOX[A>>>24]]^Xe.INV_SUB_MIX[1][Xe.SBOX[A>>>16&255]]^Xe.INV_SUB_MIX[2][Xe.SBOX[A>>>8&255]]^Xe.INV_SUB_MIX[3][Xe.SBOX[A&255]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=v};Bt.prototype.encryptBlockRaw=function(t){return t=Mh(t),Py(t,this._keySchedule,Xe.SUB_MIX,Xe.SBOX,this._nRounds)};Bt.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=If.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r};Bt.prototype.decryptBlock=function(t){t=Mh(t);var e=t[1];t[1]=t[3],t[3]=e;var r=Py(t,this._invKeySchedule,Xe.INV_SUB_MIX,Xe.INV_SBOX,this._nRounds),i=If.allocUnsafe(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i};Bt.prototype.scrub=function(){xh(this._keySchedule),xh(this._invKeySchedule),xh(this._key)};Dy.exports.AES=Bt});var Ly=R((dI,Ny)=>{b();var gn=Ie().Buffer,Y5=gn.alloc(16,0);function X5(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}function Uy(t){var e=gn.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function La(t){this.h=t,this.state=gn.alloc(16,0),this.cache=gn.allocUnsafe(0)}La.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()};La.prototype._multiply=function(){for(var t=X5(this.h),e=[0,0,0,0],r,i,n,a=-1;++a<128;){for(i=(this.state[~~(a/8)]&1<<7-a%8)!==0,i&&(e[0]^=t[0],e[1]^=t[1],e[2]^=t[2],e[3]^=t[3]),n=(t[3]&1)!==0,r=3;r>0;r--)t[r]=t[r]>>>1|(t[r-1]&1)<<31;t[0]=t[0]>>>1,n&&(t[0]=t[0]^225<<24)}this.state=Uy(e)};La.prototype.update=function(t){this.cache=gn.concat([this.cache,t]);for(var e;this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)};La.prototype.final=function(t,e){return this.cache.length&&this.ghash(gn.concat([this.cache,Y5],16)),this.ghash(Uy([0,t,0,e])),this.state};Ny.exports=La});var Eh=R((vI,Hy)=>{b();var J5=Na(),yt=Ie().Buffer,Fy=mr(),Q5=He(),jy=Ly(),eM=yn(),tM=gh();function rM(t,e){var r=0;t.length!==e.length&&r++;for(var i=Math.min(t.length,e.length),n=0;n<i;++n)r+=t[n]^e[n];return r}function iM(t,e,r){if(e.length===12)return t._finID=yt.concat([e,yt.from([0,0,0,1])]),yt.concat([e,yt.from([0,0,0,2])]);var i=new jy(r),n=e.length,a=n%16;i.update(e),a&&(a=16-a,i.update(yt.alloc(a,0))),i.update(yt.alloc(8,0));var f=n*8,v=yt.alloc(8);v.writeUIntBE(f,0,8),i.update(v),t._finID=i.state;var m=yt.from(t._finID);return tM(m),m}function Ti(t,e,r,i){Fy.call(this);var n=yt.alloc(4,0);this._cipher=new J5.AES(e);var a=this._cipher.encryptBlock(n);this._ghash=new jy(a),r=iM(this,r,a),this._prev=yt.from(r),this._cache=yt.allocUnsafe(0),this._secCache=yt.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}Q5(Ti,Fy);Ti.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=yt.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r};Ti.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=eM(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&rM(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()};Ti.prototype.getAuthTag=function(){if(this._decrypt||!yt.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag};Ti.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e};Ti.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length};Hy.exports=Ti});var Bh=R((gI,Wy)=>{b();var nM=Na(),Sh=Ie().Buffer,Ky=mr(),aM=He();function kf(t,e,r,i){Ky.call(this),this._cipher=new nM.AES(e),this._prev=Sh.from(r),this._cache=Sh.allocUnsafe(0),this._secCache=Sh.allocUnsafe(0),this._decrypt=i,this._mode=t}aM(kf,Ky);kf.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)};kf.prototype._final=function(){this._cipher.scrub()};Wy.exports=kf});var Fa=R((bI,zy)=>{b();var Ci=Ie().Buffer,oM=Jo();function fM(t,e,r,i){if(Ci.isBuffer(t)||(t=Ci.from(t,"binary")),e&&(Ci.isBuffer(e)||(e=Ci.from(e,"binary")),e.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var n=r/8,a=Ci.alloc(n),f=Ci.alloc(i||0),v=Ci.alloc(0);n>0||i>0;){var m=new oM;m.update(v),m.update(t),e&&m.update(e),v=m.digest();var E=0;if(n>0){var A=a.length-n;E=Math.min(n,v.length),v.copy(a,A,0,E),n-=E}if(E<v.length&&i>0){var q=f.length-i,I=Math.min(i,v.length-E);v.copy(f,q,E,E+I),i-=I}}return v.fill(0),{key:a,iv:f}}zy.exports=fM});var Zy=R(Ah=>{b();var Gy=qf(),sM=Eh(),wr=Ie().Buffer,uM=Bh(),Vy=mr(),hM=Na(),lM=Fa(),cM=He();function ja(t,e,r){Vy.call(this),this._cache=new Tf,this._cipher=new hM.AES(e),this._prev=wr.from(r),this._mode=t,this._autopadding=!0}cM(ja,Vy);ja.prototype._update=function(t){this._cache.add(t);for(var e,r,i=[];e=this._cache.get();)r=this._mode.encrypt(this,e),i.push(r);return wr.concat(i)};var dM=wr.alloc(16,16);ja.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(dM))throw this._cipher.scrub(),new Error("data not multiple of block length")};ja.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function Tf(){this.cache=wr.allocUnsafe(0)}Tf.prototype.add=function(t){this.cache=wr.concat([this.cache,t])};Tf.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null};Tf.prototype.flush=function(){for(var t=16-this.cache.length,e=wr.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return wr.concat([this.cache,e])};function $y(t,e,r){var i=Gy[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof e=="string"&&(e=wr.from(e)),e.length!==i.key/8)throw new TypeError("invalid key length "+e.length);if(typeof r=="string"&&(r=wr.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);return i.type==="stream"?new uM(i.module,e,r):i.type==="auth"?new sM(i.module,e,r):new ja(i.module,e,r)}function pM(t,e){var r=Gy[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=lM(e,!1,r.key,r.iv);return $y(t,i.key,i.iv)}Ah.createCipheriv=$y;Ah.createCipher=pM});var Qy=R(Rh=>{b();var vM=Eh(),mn=Ie().Buffer,Yy=qf(),yM=Bh(),Xy=mr(),gM=Na(),mM=Fa(),bM=He();function Ha(t,e,r){Xy.call(this),this._cache=new Cf,this._last=void 0,this._cipher=new gM.AES(e),this._prev=mn.from(r),this._mode=t,this._autopadding=!0}bM(Ha,Xy);Ha.prototype._update=function(t){this._cache.add(t);for(var e,r,i=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),i.push(r);return mn.concat(i)};Ha.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return wM(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")};Ha.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function Cf(){this.cache=mn.allocUnsafe(0)}Cf.prototype.add=function(t){this.cache=mn.concat([this.cache,t])};Cf.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null};Cf.prototype.flush=function(){if(this.cache.length)return this.cache};function wM(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");for(var r=-1;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(e!==16)return t.slice(0,16-e)}function Jy(t,e,r){var i=Yy[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof r=="string"&&(r=mn.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);if(typeof e=="string"&&(e=mn.from(e)),e.length!==i.key/8)throw new TypeError("invalid key length "+e.length);return i.type==="stream"?new yM(i.module,e,r,!0):i.type==="auth"?new vM(i.module,e,r,!0):new Ha(i.module,e,r)}function _M(t,e){var r=Yy[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=mM(e,!1,r.key,r.iv);return Jy(t,i.key,i.iv)}Rh.createDecipher=_M;Rh.createDecipheriv=Jy});var Of=R(Pt=>{b();var eg=Zy(),tg=Qy(),xM=wh();function MM(){return Object.keys(xM)}Pt.createCipher=Pt.Cipher=eg.createCipher;Pt.createCipheriv=Pt.Cipheriv=eg.createCipheriv;Pt.createDecipher=Pt.Decipher=tg.createDecipher;Pt.createDecipheriv=Pt.Decipheriv=tg.createDecipheriv;Pt.listCiphers=Pt.getCiphers=MM});var rg=R(_r=>{b();_r["des-ecb"]={key:8,iv:0};_r["des-cbc"]=_r.des={key:8,iv:8};_r["des-ede3-cbc"]=_r.des3={key:24,iv:8};_r["des-ede3"]={key:24,iv:0};_r["des-ede-cbc"]={key:16,iv:8};_r["des-ede"]={key:16,iv:0}});var fg=R(Dt=>{b();var ig=gy(),qh=Of(),Lr=qf(),xr=rg(),ng=Fa();function EM(t,e){t=t.toLowerCase();var r,i;if(Lr[t])r=Lr[t].key,i=Lr[t].iv;else if(xr[t])r=xr[t].key*8,i=xr[t].iv;else throw new TypeError("invalid suite type");var n=ng(e,!1,r,i);return ag(t,n.key,n.iv)}function SM(t,e){t=t.toLowerCase();var r,i;if(Lr[t])r=Lr[t].key,i=Lr[t].iv;else if(xr[t])r=xr[t].key*8,i=xr[t].iv;else throw new TypeError("invalid suite type");var n=ng(e,!1,r,i);return og(t,n.key,n.iv)}function ag(t,e,r){if(t=t.toLowerCase(),Lr[t])return qh.createCipheriv(t,e,r);if(xr[t])return new ig({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function og(t,e,r){if(t=t.toLowerCase(),Lr[t])return qh.createDecipheriv(t,e,r);if(xr[t])return new ig({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}function BM(){return Object.keys(xr).concat(qh.getCiphers())}Dt.createCipher=Dt.Cipher=EM;Dt.createCipheriv=Dt.Cipheriv=ag;Dt.createDecipher=Dt.Decipher=SM;Dt.createDecipheriv=Dt.Decipheriv=og;Dt.listCiphers=Dt.getCiphers=BM});var sg=R((kI,Th)=>{b();var Ih;Th.exports=function(e){return Ih||(Ih=new Fr(null)),Ih.generate(e)};function Fr(t){this.rand=t}Th.exports.Rand=Fr;Fr.prototype.generate=function(e){return this._rand(e)};Fr.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var r=new Uint8Array(e),i=0;i<r.length;i++)r[i]=this.rand.getByte();return r};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?Fr.prototype._rand=function(e){var r=new Uint8Array(e);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?Fr.prototype._rand=function(e){var r=new Uint8Array(e);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(Fr.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(kh=Ka(),typeof kh.randomBytes!="function")throw new Error("Not supported");Fr.prototype._rand=function(e){return kh.randomBytes(e)}}catch{}var kh});var Ch=R((CI,ug)=>{b();var Oi=lr(),AM=sg();function Pi(t){this.rand=t||new AM.Rand}ug.exports=Pi;Pi.create=function(e){return new Pi(e)};Pi.prototype._randbelow=function(e){var r=e.bitLength(),i=Math.ceil(r/8);do var n=new Oi(this.rand.generate(i));while(n.cmp(e)>=0);return n};Pi.prototype._randrange=function(e,r){var i=r.sub(e);return e.add(this._randbelow(i))};Pi.prototype.test=function(e,r,i){var n=e.bitLength(),a=Oi.mont(e),f=new Oi(1).toRed(a);r||(r=Math.max(1,n/48|0));for(var v=e.subn(1),m=0;!v.testn(m);m++);for(var E=e.shrn(m),A=v.toRed(a),q=!0;r>0;r--){var I=this._randrange(new Oi(2),v);i&&i(I);var C=I.toRed(a).redPow(E);if(!(C.cmp(f)===0||C.cmp(A)===0)){for(var j=1;j<m;j++){if(C=C.redSqr(),C.cmp(f)===0)return!1;if(C.cmp(A)===0)break}if(j===m)return!1}}return q};Pi.prototype.getDivisor=function(e,r){var i=e.bitLength(),n=Oi.mont(e),a=new Oi(1).toRed(n);r||(r=Math.max(1,i/48|0));for(var f=e.subn(1),v=0;!f.testn(v);v++);for(var m=e.shrn(v),E=f.toRed(n);r>0;r--){var A=this._randrange(new Oi(2),f),q=e.gcd(A);if(q.cmpn(1)!==0)return q;var I=A.toRed(n).redPow(m);if(!(I.cmp(a)===0||I.cmp(E)===0)){for(var C=1;C<v;C++){if(I=I.redSqr(),I.cmp(a)===0)return I.fromRed().subn(1).gcd(e);if(I.cmp(E)===0)break}if(C===v)return I=I.redSqr(),I.fromRed().subn(1).gcd(e)}}return!1}});var Lh=R((LI,cg)=>{b();var RM=ui();cg.exports=Nh;Nh.simpleSieve=Dh;Nh.fermatTest=Uh;var at=lr(),qM=new at(24),IM=Ch(),hg=new IM,kM=new at(1),Ph=new at(2),TM=new at(5),PI=new at(16),DI=new at(8),CM=new at(10),OM=new at(3),UI=new at(7),PM=new at(11),lg=new at(4),NI=new at(12),Oh=null;function DM(){if(Oh!==null)return Oh;var t=1048576,e=[];e[0]=2;for(var r=1,i=3;i<t;i+=2){for(var n=Math.ceil(Math.sqrt(i)),a=0;a<r&&e[a]<=n&&i%e[a]!==0;a++);r!==a&&e[a]<=n||(e[r++]=i)}return Oh=e,e}function Dh(t){for(var e=DM(),r=0;r<e.length;r++)if(t.modn(e[r])===0)return t.cmpn(e[r])===0;return!0}function Uh(t){var e=at.mont(t);return Ph.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)===0}function Nh(t,e){if(t<16)return e===2||e===5?new at([140,123]):new at([140,39]);e=new at(e);for(var r,i;;){for(r=new at(RM(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(kM),r.testn(1)||r.iadd(Ph),e.cmp(Ph)){if(!e.cmp(TM))for(;r.mod(CM).cmp(OM);)r.iadd(lg)}else for(;r.mod(qM).cmp(PM);)r.iadd(lg);if(i=r.shrn(1),Dh(i)&&Dh(r)&&Uh(i)&&Uh(r)&&hg.test(i)&&hg.test(r))return r}}});var dg=R((jI,UM)=>{UM.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"}}});var gg=R((HI,yg)=>{b();var At=lr(),NM=Ch(),pg=new NM,LM=new At(24),FM=new At(11),jM=new At(10),HM=new At(3),KM=new At(7),vg=Lh(),WM=ui();yg.exports=Mr;function zM(t,e){return e=e||"utf8",B.Buffer.isBuffer(t)||(t=new B.Buffer(t,e)),this._pub=new At(t),this}function GM(t,e){return e=e||"utf8",B.Buffer.isBuffer(t)||(t=new B.Buffer(t,e)),this._priv=new At(t),this}var Pf={};function VM(t,e){var r=e.toString("hex"),i=[r,t.toString(16)].join("_");if(i in Pf)return Pf[i];var n=0;if(t.isEven()||!vg.simpleSieve||!vg.fermatTest(t)||!pg.test(t))return n+=1,r==="02"||r==="05"?n+=8:n+=4,Pf[i]=n,n;pg.test(t.shrn(1))||(n+=2);var a;switch(r){case"02":t.mod(LM).cmp(FM)&&(n+=8);break;case"05":a=t.mod(jM),a.cmp(HM)&&a.cmp(KM)&&(n+=8);break;default:n+=4}return Pf[i]=n,n}function Mr(t,e,r){this.setGenerator(e),this.__prime=new At(t),this._prime=At.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=zM,this.setPrivateKey=GM):this._primeCode=8}Object.defineProperty(Mr.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=VM(this.__prime,this.__gen)),this._primeCode}});Mr.prototype.generateKeys=function(){return this._priv||(this._priv=new At(WM(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()};Mr.prototype.computeSecret=function(t){t=new At(t),t=t.toRed(this._prime);var e=t.redPow(this._priv).fromRed(),r=new B.Buffer(e.toArray()),i=this.getPrime();if(r.length<i.length){var n=new B.Buffer(i.length-r.length);n.fill(0),r=B.Buffer.concat([n,r])}return r};Mr.prototype.getPublicKey=function(e){return Df(this._pub,e)};Mr.prototype.getPrivateKey=function(e){return Df(this._priv,e)};Mr.prototype.getPrime=function(t){return Df(this.__prime,t)};Mr.prototype.getGenerator=function(t){return Df(this._gen,t)};Mr.prototype.setGenerator=function(t,e){return e=e||"utf8",B.Buffer.isBuffer(t)||(t=new B.Buffer(t,e)),this.__gen=t,this._gen=new At(t),this};function Df(t,e){var r=new B.Buffer(t.toArray());return e?r.toString(e):r}});var wg=R(bn=>{b();var $M=Lh(),mg=dg(),Fh=gg();function ZM(t){var e=new B.Buffer(mg[t].prime,"hex"),r=new B.Buffer(mg[t].gen,"hex");return new Fh(e,r)}var YM={binary:!0,hex:!0,base64:!0};function bg(t,e,r,i){return B.Buffer.isBuffer(e)||YM[e]===void 0?bg(t,"binary",e,r):(e=e||"binary",i=i||"binary",r=r||new B.Buffer([2]),B.Buffer.isBuffer(r)||(r=new B.Buffer(r,i)),typeof t=="number"?new Fh($M(t,r),r,!0):(B.Buffer.isBuffer(t)||(t=new B.Buffer(t,e)),new Fh(t,r,!0)))}bn.DiffieHellmanGroup=bn.createDiffieHellmanGroup=bn.getDiffieHellman=ZM;bn.createDiffieHellman=bn.DiffieHellman=bg});var _g=R((exports,module)=>{b();var indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0;r<t.length;r++)if(t[r]===e)return r;return-1},Object_keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var r in t)e.push(r);return e},forEach=function(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e(t[r],r,t)},defineProp=(function(){try{return Object.defineProperty({},"_",{}),function(t,e,r){Object.defineProperty(t,e,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch{return function(e,r,i){e[r]=i}}})(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(t){if(!(t instanceof Context))throw new TypeError("needs a 'context' argument.");var e=document.createElement("iframe");e.style||(e.style={}),e.style.display="none",document.body.appendChild(e);var r=e.contentWindow,i=r.eval,n=r.execScript;!i&&n&&(n.call(r,"null"),i=r.eval),forEach(Object_keys(t),function(v){r[v]=t[v]}),forEach(globals,function(v){t[v]&&(r[v]=t[v])});var a=Object_keys(r),f=i.call(r,this.code);return forEach(Object_keys(r),function(v){(v in t||indexOf(a,v)===-1)&&(t[v]=r[v])}),forEach(globals,function(v){v in t||defineProp(t,v,r[v])}),document.body.removeChild(e),f};Script.prototype.runInThisContext=function(){return eval(this.code)};Script.prototype.runInNewContext=function(t){var e=Script.createContext(t),r=this.runInContext(e);return t&&forEach(Object_keys(e),function(i){t[i]=e[i]}),r};forEach(Object_keys(Script.prototype),function(t){exports[t]=Script[t]=function(e){var r=Script(e);return r[t].apply(r,[].slice.call(arguments,1))}});exports.isContext=function(t){return t instanceof Context};exports.createScript=function(t){return exports.Script(t)};exports.createContext=Script.createContext=function(t){var e=new Context;return typeof t=="object"&&forEach(Object_keys(t),function(r){e[r]=t[r]}),e}});var Eg=R(Mg=>{b();var xg=_n(),XM=He(),JM=Mg;JM.define=function(e,r){return new wn(e,r)};function wn(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}wn.prototype._createNamed=function(e){var r;try{r=_g().runInThisContext("(function "+this.name+`(entity) {
|
|
11
|
+
`)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}De.types=Id();function Pd(t){return Array.isArray(t)}De.isArray=Pd;function Ys(t){return typeof t=="boolean"}De.isBoolean=Ys;function ko(t){return t===null}De.isNull=ko;function ax(t){return t==null}De.isNullOrUndefined=ax;function Dd(t){return typeof t=="number"}De.isNumber=Dd;function To(t){return typeof t=="string"}De.isString=To;function ox(t){return typeof t=="symbol"}De.isSymbol=ox;function vi(t){return t===void 0}De.isUndefined=vi;function ra(t){return Qi(t)&&Xs(t)==="[object RegExp]"}De.isRegExp=ra;De.types.isRegExp=ra;function Qi(t){return typeof t=="object"&&t!==null}De.isObject=Qi;function Io(t){return Qi(t)&&Xs(t)==="[object Date]"}De.isDate=Io;De.types.isDate=Io;function ia(t){return Qi(t)&&(Xs(t)==="[object Error]"||t instanceof Error)}De.isError=ia;De.types.isNativeError=ia;function Ro(t){return typeof t=="function"}De.isFunction=Ro;function fx(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}De.isPrimitive=fx;De.isBuffer=Td();function Xs(t){return Object.prototype.toString.call(t)}function $s(t){return t<10?"0"+t.toString(10):t.toString(10)}var sx=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ux(){var t=new Date,e=[$s(t.getHours()),$s(t.getMinutes()),$s(t.getSeconds())].join(":");return[t.getDate(),sx[t.getMonth()],e].join(" ")}De.log=function(){console.log("%s - %s",ux(),De.format.apply(De,arguments))};De.inherits=J();De._extend=function(t,e){if(!e||!Qi(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};function Ud(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var pi=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;De.promisify=function(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');if(pi&&e[pi]){var r=e[pi];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,pi,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,i,a=new Promise(function(m,E){n=m,i=E}),f=[],v=0;v<arguments.length;v++)f.push(arguments[v]);f.push(function(m,E){m?i(m):n(E)});try{e.apply(this,f)}catch(m){i(m)}return a}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),pi&&Object.defineProperty(r,pi,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,Cd(e))};De.promisify.custom=pi;function hx(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}function lx(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');function e(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var i=r.pop();if(typeof i!="function")throw new TypeError("The last argument must be of type Function");var a=this,f=function(){return i.apply(a,arguments)};t.apply(this,r).then(function(v){S.default.nextTick(f.bind(null,null,v))},function(v){S.default.nextTick(hx.bind(null,v,f))})}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,Cd(t)),e}De.callbackify=lx});var Kd=R((t9,Hd)=>{"use strict";w();function Nd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ld(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Nd(Object(r),!0).forEach(function(n){cx(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function cx(t,e,r){return e=jd(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function dx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fd(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,jd(n.key),n)}}function px(t,e,r){return e&&Fd(t.prototype,e),r&&Fd(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function jd(t){var e=vx(t,"string");return typeof e=="symbol"?e:String(e)}function vx(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var yx=ft(),Co=yx.Buffer,gx=na(),Js=gx.inspect,mx=Js&&Js.custom||"inspect";function bx(t,e,r){Co.prototype.copy.call(t,e,r)}Hd.exports=(function(){function t(){dx(this,t),this.head=null,this.tail=null,this.length=0}return px(t,[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return Co.alloc(0);for(var n=Co.allocUnsafe(r>>>0),i=this.head,a=0;i;)bx(i.data,n,a),a+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,a=n.data;for(r-=a.length;n=n.next;){var f=n.data,v=r>f.length?f.length:r;if(v===f.length?a+=f:a+=f.slice(0,r),r-=v,r===0){v===f.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=f.slice(v));break}++i}return this.length-=i,a}},{key:"_getBuffer",value:function(r){var n=Co.allocUnsafe(r),i=this.head,a=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var f=i.data,v=r>f.length?f.length:r;if(f.copy(n,n.length-r,0,v),r-=v,r===0){v===f.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=f.slice(v));break}++a}return this.length-=a,n}},{key:mx,value:function(r,n){return Js(this,Ld(Ld({},n),{},{depth:0,customInspect:!1}))}}]),t})()});var eu=R((i9,zd)=>{"use strict";w();function wx(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,S.default.nextTick(Qs,this,t)):S.default.nextTick(Qs,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(a){!e&&a?r._writableState?r._writableState.errorEmitted?S.default.nextTick(Oo,r):(r._writableState.errorEmitted=!0,S.default.nextTick(Wd,r,a)):S.default.nextTick(Wd,r,a):e?(S.default.nextTick(Oo,r),e(a)):S.default.nextTick(Oo,r)}),this)}function Wd(t,e){Qs(t,e),Oo(t)}function Oo(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function _x(){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 Qs(t,e){t.emit("error",e)}function xx(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}zd.exports={destroy:wx,undestroy:_x,errorOrDestroy:xx}});var yi=R((a9,$d)=>{"use strict";w();function Mx(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var Vd={};function xt(t,e,r){r||(r=Error);function n(a,f,v){return typeof e=="string"?e:e(a,f,v)}var i=(function(a){Mx(f,a);function f(v,m,E){return a.call(this,n(v,m,E))||this}return f})(r);i.prototype.name=r.name,i.prototype.code=t,Vd[t]=i}function Gd(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(n){return String(n)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:r===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}else return"of ".concat(e," ").concat(String(t))}function Ex(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Sx(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Bx(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}xt("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);xt("ERR_INVALID_ARG_TYPE",function(t,e,r){var n;typeof e=="string"&&Ex(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var i;if(Sx(t," argument"))i="The ".concat(t," ").concat(n," ").concat(Gd(e,"type"));else{var a=Bx(t,".")?"property":"argument";i='The "'.concat(t,'" ').concat(a," ").concat(n," ").concat(Gd(e,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);xt("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");xt("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});xt("ERR_STREAM_PREMATURE_CLOSE","Premature close");xt("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});xt("ERR_MULTIPLE_CALLBACK","Callback called multiple times");xt("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");xt("ERR_STREAM_WRITE_AFTER_END","write after end");xt("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);xt("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);xt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");$d.exports.codes=Vd});var tu=R((f9,Zd)=>{"use strict";w();var Ax=yi().codes.ERR_INVALID_OPT_VALUE;function Rx(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function qx(t,e,r,n){var i=Rx(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?r:"highWaterMark";throw new Ax(a,i)}return Math.floor(i)}return t.objectMode?16:16*1024}Zd.exports={getHighWaterMark:qx}});var iu=R((u9,Yd)=>{w();Yd.exports=Ix;function Ix(t,e){if(ru("noDeprecation"))return t;var r=!1;function n(){if(!r){if(ru("throwDeprecation"))throw new Error(e);ru("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return n}function ru(t){try{if(!globalThis.localStorage)return!1}catch{return!1}var e=globalThis.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}});var ou=R((l9,rp)=>{"use strict";w();rp.exports=$e;function Jd(t){var e=this;this.next=null,this.entry=null,this.finish=function(){i6(e,t)}}var en;$e.WritableState=oa;var kx={deprecate:iu()},Qd=ms(),Do=ft().Buffer,Tx=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Cx(t){return Do.from(t)}function Ox(t){return Do.isBuffer(t)||t instanceof Tx}var au=eu(),Px=tu(),Dx=Px.getHighWaterMark,Tr=yi().codes,Ux=Tr.ERR_INVALID_ARG_TYPE,Nx=Tr.ERR_METHOD_NOT_IMPLEMENTED,Lx=Tr.ERR_MULTIPLE_CALLBACK,Fx=Tr.ERR_STREAM_CANNOT_PIPE,jx=Tr.ERR_STREAM_DESTROYED,Hx=Tr.ERR_STREAM_NULL_VALUES,Kx=Tr.ERR_STREAM_WRITE_AFTER_END,Wx=Tr.ERR_UNKNOWN_ENCODING,tn=au.errorOrDestroy;J()($e,Qd);function zx(){}function oa(t,e,r){en=en||gi(),t=t||{},typeof r!="boolean"&&(r=e instanceof en),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Dx(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=t.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){Jx(e,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Jd(this)}oa.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(oa.prototype,"buffer",{get:kx.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Po;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Po=Function.prototype[Symbol.hasInstance],Object.defineProperty($e,Symbol.hasInstance,{value:function(e){return Po.call(this,e)?!0:this!==$e?!1:e&&e._writableState instanceof oa}})):Po=function(e){return e instanceof this};function $e(t){en=en||gi();var e=this instanceof en;if(!e&&!Po.call($e,this))return new $e(t);this._writableState=new oa(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),Qd.call(this)}$e.prototype.pipe=function(){tn(this,new Fx)};function Gx(t,e){var r=new Kx;tn(t,r),S.default.nextTick(e,r)}function Vx(t,e,r,n){var i;return r===null?i=new Hx:typeof r!="string"&&!e.objectMode&&(i=new Ux("chunk",["string","Buffer"],r)),i?(tn(t,i),S.default.nextTick(n,i),!1):!0}$e.prototype.write=function(t,e,r){var n=this._writableState,i=!1,a=!n.objectMode&&Ox(t);return a&&!Do.isBuffer(t)&&(t=Cx(t)),typeof e=="function"&&(r=e,e=null),a?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=zx),n.ending?Gx(this,r):(a||Vx(this,n,t,r))&&(n.pendingcb++,i=Zx(this,n,a,t,e,r)),i};$e.prototype.cork=function(){this._writableState.corked++};$e.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&ep(this,t))};$e.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new Wx(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty($e.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function $x(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Do.from(e,r)),e}Object.defineProperty($e.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Zx(t,e,r,n,i,a){if(!r){var f=$x(e,n,i);n!==f&&(r=!0,i="buffer",n=f)}var v=e.objectMode?1:n.length;e.length+=v;var m=e.length<e.highWaterMark;if(m||(e.needDrain=!0),e.writing||e.corked){var E=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},E?E.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else nu(t,e,!1,v,n,i,a);return m}function nu(t,e,r,n,i,a,f){e.writelen=n,e.writecb=f,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new jx("write")):r?t._writev(i,e.onwrite):t._write(i,a,e.onwrite),e.sync=!1}function Yx(t,e,r,n,i){--e.pendingcb,r?(S.default.nextTick(i,n),S.default.nextTick(aa,t,e),t._writableState.errorEmitted=!0,tn(t,n)):(i(n),t._writableState.errorEmitted=!0,tn(t,n),aa(t,e))}function Xx(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function Jx(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new Lx;if(Xx(r),e)Yx(t,r,n,e,i);else{var a=tp(r)||t.destroyed;!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&ep(t,r),n?S.default.nextTick(Xd,t,r,a,i):Xd(t,r,a,i)}}function Xd(t,e,r,n){r||Qx(t,e),e.pendingcb--,n(),aa(t,e)}function Qx(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function ep(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),a=e.corkedRequestsFree;a.entry=r;for(var f=0,v=!0;r;)i[f]=r,r.isBuf||(v=!1),r=r.next,f+=1;i.allBuffers=v,nu(t,e,!0,e.length,i,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new Jd(e),e.bufferedRequestCount=0}else{for(;r;){var m=r.chunk,E=r.encoding,A=r.callback,q=e.objectMode?1:m.length;if(nu(t,e,!1,q,m,E,A),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}$e.prototype._write=function(t,e,r){r(new Nx("_write()"))};$e.prototype._writev=null;$e.prototype.end=function(t,e,r){var n=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||r6(this,n,r),this};Object.defineProperty($e.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function tp(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function e6(t,e){t._final(function(r){e.pendingcb--,r&&tn(t,r),e.prefinished=!0,t.emit("prefinish"),aa(t,e)})}function t6(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,S.default.nextTick(e6,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function aa(t,e){var r=tp(e);if(r&&(t6(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}function r6(t,e,r){e.ending=!0,aa(t,e),r&&(e.finished?S.default.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function i6(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}Object.defineProperty($e.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});$e.prototype.destroy=au.destroy;$e.prototype._undestroy=au.undestroy;$e.prototype._destroy=function(t,e){e(t)}});var gi=R((d9,np)=>{"use strict";w();var n6=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};np.exports=Yt;var ip=uu(),su=ou();J()(Yt,ip);for(fu=n6(su.prototype),Uo=0;Uo<fu.length;Uo++)No=fu[Uo],Yt.prototype[No]||(Yt.prototype[No]=su.prototype[No]);var fu,No,Uo;function Yt(t){if(!(this instanceof Yt))return new Yt(t);ip.call(this,t),su.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",a6)))}Object.defineProperty(Yt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Yt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Yt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function a6(){this._writableState.ended||S.default.nextTick(o6,this)}function o6(t){t.end()}Object.defineProperty(Yt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var fp=R((hu,op)=>{w();var Lo=ft(),cr=Lo.Buffer;function ap(t,e){for(var r in t)e[r]=t[r]}cr.from&&cr.alloc&&cr.allocUnsafe&&cr.allocUnsafeSlow?op.exports=Lo:(ap(Lo,hu),hu.Buffer=rn);function rn(t,e,r){return cr(t,e,r)}ap(cr,rn);rn.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return cr(t,e,r)};rn.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=cr(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};rn.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return cr(t)};rn.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Lo.SlowBuffer(t)}});var nn=R(up=>{"use strict";w();var cu=fp().Buffer,sp=cu.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function f6(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function s6(t){var e=f6(t);if(typeof e!="string"&&(cu.isEncoding===sp||!sp(t)))throw new Error("Unknown encoding: "+t);return e||t}up.StringDecoder=fa;function fa(t){this.encoding=s6(t);var e;switch(this.encoding){case"utf16le":this.text=p6,this.end=v6,e=4;break;case"utf8":this.fillLast=l6,e=4;break;case"base64":this.text=y6,this.end=g6,e=3;break;default:this.write=m6,this.end=b6;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=cu.allocUnsafe(e)}fa.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};fa.prototype.end=d6;fa.prototype.text=c6;fa.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function lu(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function u6(t,e,r){var n=e.length-1;if(n<r)return 0;var i=lu(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=lu(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=lu(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function h6(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function l6(t){var e=this.lastTotal-this.lastNeed,r=h6(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function c6(t,e){var r=u6(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function d6(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function p6(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function v6(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function y6(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function g6(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function m6(t){return t.toString(this.encoding)}function b6(t){return t&&t.length?this.write(t):""}});var Fo=R((m9,cp)=>{"use strict";w();var hp=yi().codes.ERR_STREAM_PREMATURE_CLOSE;function w6(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}function _6(){}function x6(t){return t.setHeader&&typeof t.abort=="function"}function lp(t,e,r){if(typeof e=="function")return lp(t,null,e);e||(e={}),r=w6(r||_6);var n=e.readable||e.readable!==!1&&t.readable,i=e.writable||e.writable!==!1&&t.writable,a=function(){t.writable||v()},f=t._writableState&&t._writableState.finished,v=function(){i=!1,f=!0,n||r.call(t)},m=t._readableState&&t._readableState.endEmitted,E=function(){n=!1,m=!0,i||r.call(t)},A=function(j){r.call(t,j)},q=function(){var j;if(n&&!m)return(!t._readableState||!t._readableState.ended)&&(j=new hp),r.call(t,j);if(i&&!f)return(!t._writableState||!t._writableState.ended)&&(j=new hp),r.call(t,j)},I=function(){t.req.on("finish",v)};return x6(t)?(t.on("complete",v),t.on("abort",q),t.req?I():t.on("request",I)):i&&!t._writableState&&(t.on("end",a),t.on("close",a)),t.on("end",E),t.on("finish",v),e.error!==!1&&t.on("error",A),t.on("close",q),function(){t.removeListener("complete",v),t.removeListener("abort",q),t.removeListener("request",I),t.req&&t.req.removeListener("finish",v),t.removeListener("end",a),t.removeListener("close",a),t.removeListener("finish",v),t.removeListener("end",E),t.removeListener("error",A),t.removeListener("close",q)}}cp.exports=lp});var pp=R((w9,dp)=>{"use strict";w();var jo;function Cr(t,e,r){return e=M6(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function M6(t){var e=E6(t,"string");return typeof e=="symbol"?e:String(e)}function E6(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var S6=Fo(),Or=Symbol("lastResolve"),mi=Symbol("lastReject"),sa=Symbol("error"),Ho=Symbol("ended"),bi=Symbol("lastPromise"),du=Symbol("handlePromise"),wi=Symbol("stream");function Pr(t,e){return{value:t,done:e}}function B6(t){var e=t[Or];if(e!==null){var r=t[wi].read();r!==null&&(t[bi]=null,t[Or]=null,t[mi]=null,e(Pr(r,!1)))}}function A6(t){S.default.nextTick(B6,t)}function R6(t,e){return function(r,n){t.then(function(){if(e[Ho]){r(Pr(void 0,!0));return}e[du](r,n)},n)}}var q6=Object.getPrototypeOf(function(){}),I6=Object.setPrototypeOf((jo={get stream(){return this[wi]},next:function(){var e=this,r=this[sa];if(r!==null)return Promise.reject(r);if(this[Ho])return Promise.resolve(Pr(void 0,!0));if(this[wi].destroyed)return new Promise(function(f,v){S.default.nextTick(function(){e[sa]?v(e[sa]):f(Pr(void 0,!0))})});var n=this[bi],i;if(n)i=new Promise(R6(n,this));else{var a=this[wi].read();if(a!==null)return Promise.resolve(Pr(a,!1));i=new Promise(this[du])}return this[bi]=i,i}},Cr(jo,Symbol.asyncIterator,function(){return this}),Cr(jo,"return",function(){var e=this;return new Promise(function(r,n){e[wi].destroy(null,function(i){if(i){n(i);return}r(Pr(void 0,!0))})})}),jo),q6),k6=function(e){var r,n=Object.create(I6,(r={},Cr(r,wi,{value:e,writable:!0}),Cr(r,Or,{value:null,writable:!0}),Cr(r,mi,{value:null,writable:!0}),Cr(r,sa,{value:null,writable:!0}),Cr(r,Ho,{value:e._readableState.endEmitted,writable:!0}),Cr(r,du,{value:function(a,f){var v=n[wi].read();v?(n[bi]=null,n[Or]=null,n[mi]=null,a(Pr(v,!1))):(n[Or]=a,n[mi]=f)},writable:!0}),r));return n[bi]=null,S6(e,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[mi];a!==null&&(n[bi]=null,n[Or]=null,n[mi]=null,a(i)),n[sa]=i;return}var f=n[Or];f!==null&&(n[bi]=null,n[Or]=null,n[mi]=null,f(Pr(void 0,!0))),n[Ho]=!0}),e.on("readable",A6.bind(null,n)),n};dp.exports=k6});var yp=R((x9,vp)=>{w();vp.exports=function(){throw new Error("Readable.from is not available in the browser")}});var uu=R((S9,Bp)=>{"use strict";w();Bp.exports=Ue;var an;Ue.ReadableState=wp;var E9=Wi().EventEmitter,bp=function(e,r){return e.listeners(r).length},ha=ms(),Ko=ft().Buffer,T6=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function C6(t){return Ko.from(t)}function O6(t){return Ko.isBuffer(t)||t instanceof T6}var pu=na(),Ce;pu&&pu.debuglog?Ce=pu.debuglog("stream"):Ce=function(){};var P6=Kd(),_u=eu(),D6=tu(),U6=D6.getHighWaterMark,Wo=yi().codes,N6=Wo.ERR_INVALID_ARG_TYPE,L6=Wo.ERR_STREAM_PUSH_AFTER_EOF,F6=Wo.ERR_METHOD_NOT_IMPLEMENTED,j6=Wo.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,on,vu,yu;J()(Ue,ha);var ua=_u.errorOrDestroy,gu=["error","close","destroy","pause","resume"];function H6(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function wp(t,e,r){an=an||gi(),t=t||{},typeof r!="boolean"&&(r=e instanceof an),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=U6(this,t,"readableHighWaterMark",r),this.buffer=new P6,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=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(on||(on=nn().StringDecoder),this.decoder=new on(t.encoding),this.encoding=t.encoding)}function Ue(t){if(an=an||gi(),!(this instanceof Ue))return new Ue(t);var e=this instanceof an;this._readableState=new wp(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),ha.call(this)}Object.defineProperty(Ue.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Ue.prototype.destroy=_u.destroy;Ue.prototype._undestroy=_u.undestroy;Ue.prototype._destroy=function(t,e){e(t)};Ue.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Ko.from(t,e),e=""),n=!0),_p(this,t,e,!1,n)};Ue.prototype.unshift=function(t){return _p(this,t,null,!0,!1)};function _p(t,e,r,n,i){Ce("readableAddChunk",e);var a=t._readableState;if(e===null)a.reading=!1,z6(t,a);else{var f;if(i||(f=K6(a,e)),f)ua(t,f);else if(a.objectMode||e&&e.length>0)if(typeof e!="string"&&!a.objectMode&&Object.getPrototypeOf(e)!==Ko.prototype&&(e=C6(e)),n)a.endEmitted?ua(t,new j6):mu(t,a,e,!0);else if(a.ended)ua(t,new L6);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||e.length!==0?mu(t,a,e,!1):wu(t,a)):mu(t,a,e,!1)}else n||(a.reading=!1,wu(t,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function mu(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&zo(t)),wu(t,e)}function K6(t,e){var r;return!O6(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new N6("chunk",["string","Buffer","Uint8Array"],e)),r}Ue.prototype.isPaused=function(){return this._readableState.flowing===!1};Ue.prototype.setEncoding=function(t){on||(on=nn().StringDecoder);var e=new on(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var gp=1073741824;function W6(t){return t>=gp?t=gp:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function mp(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=W6(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Ue.prototype.read=function(t){Ce("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return Ce("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?bu(this):zo(this),null;if(t=mp(t,e),t===0&&e.ended)return e.length===0&&bu(this),null;var n=e.needReadable;Ce("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,Ce("length less than watermark",n)),e.ended||e.reading?(n=!1,Ce("reading or ended",n)):n&&(Ce("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=mp(r,e)));var i;return t>0?i=Ep(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&bu(this)),i!==null&&this.emit("data",i),i};function z6(t,e){if(Ce("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?zo(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,xp(t)))}}function zo(t){var e=t._readableState;Ce("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(Ce("emitReadable",e.flowing),e.emittedReadable=!0,S.default.nextTick(xp,t))}function xp(t){var e=t._readableState;Ce("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,xu(t)}function wu(t,e){e.readingMore||(e.readingMore=!0,S.default.nextTick(G6,t,e))}function G6(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(Ce("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}Ue.prototype._read=function(t){ua(this,new F6("_read()"))};Ue.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,Ce("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==S.default.stdout&&t!==S.default.stderr,a=i?v:V;n.endEmitted?S.default.nextTick(a):r.once("end",a),t.on("unpipe",f);function f(X,z){Ce("onunpipe"),X===r&&z&&z.hasUnpiped===!1&&(z.hasUnpiped=!0,A())}function v(){Ce("onend"),t.end()}var m=V6(r);t.on("drain",m);var E=!1;function A(){Ce("cleanup"),t.removeListener("close",C),t.removeListener("finish",j),t.removeListener("drain",m),t.removeListener("error",I),t.removeListener("unpipe",f),r.removeListener("end",v),r.removeListener("end",V),r.removeListener("data",q),E=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&m()}r.on("data",q);function q(X){Ce("ondata");var z=t.write(X);Ce("dest.write",z),z===!1&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&Sp(n.pipes,t)!==-1)&&!E&&(Ce("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function I(X){Ce("onerror",X),V(),t.removeListener("error",I),bp(t,"error")===0&&ua(t,X)}H6(t,"error",I);function C(){t.removeListener("finish",j),V()}t.once("close",C);function j(){Ce("onfinish"),t.removeListener("close",C),V()}t.once("finish",j);function V(){Ce("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(Ce("pipe resume"),r.resume()),t};function V6(t){return function(){var r=t._readableState;Ce("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&bp(t,"data")&&(r.flowing=!0,xu(t))}}Ue.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var f=Sp(e.pipes,t);return f===-1?this:(e.pipes.splice(f,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};Ue.prototype.on=function(t,e){var r=ha.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,Ce("on readable",n.length,n.reading),n.length?zo(this):n.reading||S.default.nextTick($6,this)),r};Ue.prototype.addListener=Ue.prototype.on;Ue.prototype.removeListener=function(t,e){var r=ha.prototype.removeListener.call(this,t,e);return t==="readable"&&S.default.nextTick(Mp,this),r};Ue.prototype.removeAllListeners=function(t){var e=ha.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&S.default.nextTick(Mp,this),e};function Mp(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function $6(t){Ce("readable nexttick read 0"),t.read(0)}Ue.prototype.resume=function(){var t=this._readableState;return t.flowing||(Ce("resume"),t.flowing=!t.readableListening,Z6(this,t)),t.paused=!1,this};function Z6(t,e){e.resumeScheduled||(e.resumeScheduled=!0,S.default.nextTick(Y6,t,e))}function Y6(t,e){Ce("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),xu(t),e.flowing&&!e.reading&&t.read(0)}Ue.prototype.pause=function(){return Ce("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ce("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function xu(t){var e=t._readableState;for(Ce("flow",e.flowing);e.flowing&&t.read()!==null;);}Ue.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(Ce("wrapped end"),r.decoder&&!r.ended){var f=r.decoder.end();f&&f.length&&e.push(f)}e.push(null)}),t.on("data",function(f){if(Ce("wrapped data"),r.decoder&&(f=r.decoder.write(f)),!(r.objectMode&&f==null)&&!(!r.objectMode&&(!f||!f.length))){var v=e.push(f);v||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=(function(v){return function(){return t[v].apply(t,arguments)}})(i));for(var a=0;a<gu.length;a++)t.on(gu[a],this.emit.bind(this,gu[a]));return this._read=function(f){Ce("wrapped _read",f),n&&(n=!1,t.resume())},this};typeof Symbol=="function"&&(Ue.prototype[Symbol.asyncIterator]=function(){return vu===void 0&&(vu=pp()),vu(this)});Object.defineProperty(Ue.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Ue.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Ue.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});Ue._fromList=Ep;Object.defineProperty(Ue.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Ep(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function bu(t){var e=t._readableState;Ce("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,S.default.nextTick(X6,e,t))}function X6(t,e){if(Ce("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(Ue.from=function(t,e){return yu===void 0&&(yu=yp()),yu(Ue,t,e)});function Sp(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}});var Mu=R((A9,Rp)=>{"use strict";w();Rp.exports=dr;var Go=yi().codes,J6=Go.ERR_METHOD_NOT_IMPLEMENTED,Q6=Go.ERR_MULTIPLE_CALLBACK,e3=Go.ERR_TRANSFORM_ALREADY_TRANSFORMING,t3=Go.ERR_TRANSFORM_WITH_LENGTH_0,Vo=gi();J()(dr,Vo);function r3(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new Q6);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function dr(t){if(!(this instanceof dr))return new dr(t);Vo.call(this,t),this._transformState={afterTransform:r3.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",i3)}function i3(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Ap(t,e,r)}):Ap(this,null,null)}dr.prototype.push=function(t,e){return this._transformState.needTransform=!1,Vo.prototype.push.call(this,t,e)};dr.prototype._transform=function(t,e,r){r(new J6("_transform()"))};dr.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};dr.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};dr.prototype._destroy=function(t,e){Vo.prototype._destroy.call(this,t,function(r){e(r)})};function Ap(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new t3;if(t._transformState.transforming)throw new e3;return t.push(null)}});var kp=R((q9,Ip)=>{"use strict";w();Ip.exports=la;var qp=Mu();J()(la,qp);function la(t){if(!(this instanceof la))return new la(t);qp.call(this,t)}la.prototype._transform=function(t,e,r){r(null,t)}});var Dp=R((k9,Pp)=>{"use strict";w();var Eu;function n3(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Op=yi().codes,a3=Op.ERR_MISSING_ARGS,o3=Op.ERR_STREAM_DESTROYED;function Tp(t){if(t)throw t}function f3(t){return t.setHeader&&typeof t.abort=="function"}function s3(t,e,r,n){n=n3(n);var i=!1;t.on("close",function(){i=!0}),Eu===void 0&&(Eu=Fo()),Eu(t,{readable:e,writable:r},function(f){if(f)return n(f);i=!0,n()});var a=!1;return function(f){if(!i&&!a){if(a=!0,f3(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();n(f||new o3("pipe"))}}}function Cp(t){t()}function u3(t,e){return t.pipe(e)}function h3(t){return!t.length||typeof t[t.length-1]!="function"?Tp:t.pop()}function l3(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=h3(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new a3("streams");var i,a=e.map(function(f,v){var m=v<e.length-1,E=v>0;return s3(f,m,E,function(A){i||(i=A),A&&a.forEach(Cp),!m&&(a.forEach(Cp),n(i))})});return e.reduce(u3)}Pp.exports=l3});var Bu=R((C9,Up)=>{w();Up.exports=Mt;var Su=Wi().EventEmitter,c3=J();c3(Mt,Su);Mt.Readable=uu();Mt.Writable=ou();Mt.Duplex=gi();Mt.Transform=Mu();Mt.PassThrough=kp();Mt.finished=Fo();Mt.pipeline=Dp();Mt.Stream=Mt;function Mt(){Su.call(this)}Mt.prototype.pipe=function(t,e){var r=this;function n(A){t.writable&&t.write(A)===!1&&r.pause&&r.pause()}r.on("data",n);function i(){r.readable&&r.resume&&r.resume()}t.on("drain",i),!t._isStdio&&(!e||e.end!==!1)&&(r.on("end",f),r.on("close",v));var a=!1;function f(){a||(a=!0,t.end())}function v(){a||(a=!0,typeof t.destroy=="function"&&t.destroy())}function m(A){if(E(),Su.listenerCount(this,"error")===0)throw A}r.on("error",m),t.on("error",m);function E(){r.removeListener("data",n),t.removeListener("drain",i),r.removeListener("end",f),r.removeListener("close",v),r.removeListener("error",m),t.removeListener("error",m),r.removeListener("end",E),r.removeListener("close",E),t.removeListener("close",E)}return r.on("end",E),r.on("close",E),t.on("close",E),t.emit("pipe",r),t}});var Fp=R((P9,Lp)=>{"use strict";w();var Xt=ke().Buffer,Np=Bu().Transform,d3=J();function Dr(t){Np.call(this),this._block=Xt.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}d3(Dr,Np);Dr.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(i){n=i}r(n)};Dr.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};var p3=typeof Uint8Array<"u",v3=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(Xt.prototype instanceof Uint8Array||Xt.TYPED_ARRAY_SUPPORT);function y3(t,e){if(t instanceof Xt)return t;if(typeof t=="string")return Xt.from(t,e);if(v3&&ArrayBuffer.isView(t)){if(t.byteLength===0)return Xt.alloc(0);var r=Xt.from(t.buffer,t.byteOffset,t.byteLength);if(r.byteLength===t.byteLength)return r}if(p3&&t instanceof Uint8Array||Xt.isBuffer(t)&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t))return Xt.from(t);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}Dr.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");t=y3(t,e);for(var r=this._block,n=0;this._blockOffset+t.length-n>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)r[i++]=t[n++];this._update(),this._blockOffset=0}for(;n<t.length;)r[this._blockOffset++]=t[n++];for(var a=0,f=t.length*8;f>0;++a)this._length[a]+=f,f=this._length[a]/4294967296|0,f>0&&(this._length[a]-=4294967296*f);return this};Dr.prototype._update=function(){throw new Error("_update is not implemented")};Dr.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();t!==void 0&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e};Dr.prototype._digest=function(){throw new Error("_digest is not implemented")};Lp.exports=Dr});var Yo=R((U9,Hp)=>{"use strict";w();var g3=J(),jp=Fp(),m3=ke().Buffer,b3=new Array(16);function $o(){jp.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}g3($o,jp);$o.prototype._update=function(){for(var t=b3,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);var r=this._a,n=this._b,i=this._c,a=this._d;r=st(r,n,i,a,t[0],3614090360,7),a=st(a,r,n,i,t[1],3905402710,12),i=st(i,a,r,n,t[2],606105819,17),n=st(n,i,a,r,t[3],3250441966,22),r=st(r,n,i,a,t[4],4118548399,7),a=st(a,r,n,i,t[5],1200080426,12),i=st(i,a,r,n,t[6],2821735955,17),n=st(n,i,a,r,t[7],4249261313,22),r=st(r,n,i,a,t[8],1770035416,7),a=st(a,r,n,i,t[9],2336552879,12),i=st(i,a,r,n,t[10],4294925233,17),n=st(n,i,a,r,t[11],2304563134,22),r=st(r,n,i,a,t[12],1804603682,7),a=st(a,r,n,i,t[13],4254626195,12),i=st(i,a,r,n,t[14],2792965006,17),n=st(n,i,a,r,t[15],1236535329,22),r=ut(r,n,i,a,t[1],4129170786,5),a=ut(a,r,n,i,t[6],3225465664,9),i=ut(i,a,r,n,t[11],643717713,14),n=ut(n,i,a,r,t[0],3921069994,20),r=ut(r,n,i,a,t[5],3593408605,5),a=ut(a,r,n,i,t[10],38016083,9),i=ut(i,a,r,n,t[15],3634488961,14),n=ut(n,i,a,r,t[4],3889429448,20),r=ut(r,n,i,a,t[9],568446438,5),a=ut(a,r,n,i,t[14],3275163606,9),i=ut(i,a,r,n,t[3],4107603335,14),n=ut(n,i,a,r,t[8],1163531501,20),r=ut(r,n,i,a,t[13],2850285829,5),a=ut(a,r,n,i,t[2],4243563512,9),i=ut(i,a,r,n,t[7],1735328473,14),n=ut(n,i,a,r,t[12],2368359562,20),r=ht(r,n,i,a,t[5],4294588738,4),a=ht(a,r,n,i,t[8],2272392833,11),i=ht(i,a,r,n,t[11],1839030562,16),n=ht(n,i,a,r,t[14],4259657740,23),r=ht(r,n,i,a,t[1],2763975236,4),a=ht(a,r,n,i,t[4],1272893353,11),i=ht(i,a,r,n,t[7],4139469664,16),n=ht(n,i,a,r,t[10],3200236656,23),r=ht(r,n,i,a,t[13],681279174,4),a=ht(a,r,n,i,t[0],3936430074,11),i=ht(i,a,r,n,t[3],3572445317,16),n=ht(n,i,a,r,t[6],76029189,23),r=ht(r,n,i,a,t[9],3654602809,4),a=ht(a,r,n,i,t[12],3873151461,11),i=ht(i,a,r,n,t[15],530742520,16),n=ht(n,i,a,r,t[2],3299628645,23),r=lt(r,n,i,a,t[0],4096336452,6),a=lt(a,r,n,i,t[7],1126891415,10),i=lt(i,a,r,n,t[14],2878612391,15),n=lt(n,i,a,r,t[5],4237533241,21),r=lt(r,n,i,a,t[12],1700485571,6),a=lt(a,r,n,i,t[3],2399980690,10),i=lt(i,a,r,n,t[10],4293915773,15),n=lt(n,i,a,r,t[1],2240044497,21),r=lt(r,n,i,a,t[8],1873313359,6),a=lt(a,r,n,i,t[15],4264355552,10),i=lt(i,a,r,n,t[6],2734768916,15),n=lt(n,i,a,r,t[13],1309151649,21),r=lt(r,n,i,a,t[4],4149444226,6),a=lt(a,r,n,i,t[11],3174756917,10),i=lt(i,a,r,n,t[2],718787259,15),n=lt(n,i,a,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+a|0};$o.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=m3.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};function Zo(t,e){return t<<e|t>>>32-e}function st(t,e,r,n,i,a,f){return Zo(t+(e&r|~e&n)+i+a|0,f)+e|0}function ut(t,e,r,n,i,a,f){return Zo(t+(e&n|r&~n)+i+a|0,f)+e|0}function ht(t,e,r,n,i,a,f){return Zo(t+(e^r^n)+i+a|0,f)+e|0}function lt(t,e,r,n,i,a,f){return Zo(t+(r^(e|~n))+i+a|0,f)+e|0}Hp.exports=$o});var Wp=R((L9,Kp)=>{w();var w3={}.toString;Kp.exports=Array.isArray||function(t){return w3.call(t)=="[object Array]"}});var Gp=R((j9,zp)=>{"use strict";w();var _3=hi(),x3=di(),M3=x3("TypedArray.prototype.buffer",!0),E3=Ws();zp.exports=M3||function(e){if(!E3(e))throw new _3("Not a Typed Array");return e.buffer}});var ca=R((K9,$p)=>{"use strict";w();var Tt=ke().Buffer,S3=Wp(),B3=Gp(),A3=ArrayBuffer.isView||function(e){try{return B3(e),!0}catch{return!1}},R3=typeof Uint8Array<"u",Vp=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",q3=Vp&&(Tt.prototype instanceof Uint8Array||Tt.TYPED_ARRAY_SUPPORT);$p.exports=function(e,r){if(Tt.isBuffer(e))return e.constructor&&!("isBuffer"in e)?Tt.from(e):e;if(typeof e=="string")return Tt.from(e,r);if(Vp&&A3(e)){if(e.byteLength===0)return Tt.alloc(0);if(q3){var n=Tt.from(e.buffer,e.byteOffset,e.byteLength);if(n.byteLength===e.byteLength)return n}var i=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),a=Tt.from(i);if(a.length===e.byteLength)return a}if(R3&&e instanceof Uint8Array)return Tt.from(e);var f=S3(e);if(f)for(var v=0;v<e.length;v+=1){var m=e[v];if(typeof m!="number"||m<0||m>255||~~m!==m)throw new RangeError("Array items must be numbers in the range 0-255.")}if(f||Tt.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e))return Tt.from(e);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}});var Jp=R((z9,Xp)=>{"use strict";w();var I3=ke().Buffer,k3=ca(),Yp=typeof Uint8Array<"u",T3=Yp&&typeof ArrayBuffer<"u",Zp=T3&&ArrayBuffer.isView;Xp.exports=function(t,e){if(typeof t=="string"||I3.isBuffer(t)||Yp&&t instanceof Uint8Array||Zp&&Zp(t))return k3(t,e);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')}});var da=R((V9,Au)=>{"use strict";w();typeof S.default>"u"||!S.default.version||S.default.version.indexOf("v0.")===0||S.default.version.indexOf("v1.")===0&&S.default.version.indexOf("v1.8.")!==0?Au.exports={nextTick:C3}:Au.exports=S.default;function C3(t,e,r,n){if(typeof t!="function")throw new TypeError('"callback" argument must be a function');var i=arguments.length,a,f;switch(i){case 0:case 1:return S.default.nextTick(t);case 2:return S.default.nextTick(function(){t.call(null,e)});case 3:return S.default.nextTick(function(){t.call(null,e,r)});case 4:return S.default.nextTick(function(){t.call(null,e,r,n)});default:for(a=new Array(i-1),f=0;f<a.length;)a[f++]=arguments[f];return S.default.nextTick(function(){t.apply(null,a)})}}});var ev=R((Z9,Qp)=>{w();var O3={}.toString;Qp.exports=Array.isArray||function(t){return O3.call(t)=="[object Array]"}});var Ru=R((X9,tv)=>{w();tv.exports=Wi().EventEmitter});var Jo=R((qu,iv)=>{w();var Xo=ft(),pr=Xo.Buffer;function rv(t,e){for(var r in t)e[r]=t[r]}pr.from&&pr.alloc&&pr.allocUnsafe&&pr.allocUnsafeSlow?iv.exports=Xo:(rv(Xo,qu),qu.Buffer=fn);function fn(t,e,r){return pr(t,e,r)}rv(pr,fn);fn.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return pr(t,e,r)};fn.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=pr(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};fn.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return pr(t)};fn.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Xo.SlowBuffer(t)}});var sn=R(ct=>{w();function P3(t){return Array.isArray?Array.isArray(t):Qo(t)==="[object Array]"}ct.isArray=P3;function D3(t){return typeof t=="boolean"}ct.isBoolean=D3;function U3(t){return t===null}ct.isNull=U3;function N3(t){return t==null}ct.isNullOrUndefined=N3;function L3(t){return typeof t=="number"}ct.isNumber=L3;function F3(t){return typeof t=="string"}ct.isString=F3;function j3(t){return typeof t=="symbol"}ct.isSymbol=j3;function H3(t){return t===void 0}ct.isUndefined=H3;function K3(t){return Qo(t)==="[object RegExp]"}ct.isRegExp=K3;function W3(t){return typeof t=="object"&&t!==null}ct.isObject=W3;function z3(t){return Qo(t)==="[object Date]"}ct.isDate=z3;function G3(t){return Qo(t)==="[object Error]"||t instanceof Error}ct.isError=G3;function V3(t){return typeof t=="function"}ct.isFunction=V3;function $3(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}ct.isPrimitive=$3;ct.isBuffer=ft().Buffer.isBuffer;function Qo(t){return Object.prototype.toString.call(t)}});var av=R((rR,Iu)=>{"use strict";w();function Z3(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var nv=Jo().Buffer,pa=na();function Y3(t,e,r){t.copy(e,r)}Iu.exports=(function(){function t(){Z3(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},t.prototype.unshift=function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},t.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i},t.prototype.concat=function(r){if(this.length===0)return nv.alloc(0);for(var n=nv.allocUnsafe(r>>>0),i=this.head,a=0;i;)Y3(i.data,n,a),a+=i.data.length,i=i.next;return n},t})();pa&&pa.inspect&&pa.inspect.custom&&(Iu.exports.prototype[pa.inspect.custom]=function(){var t=pa.inspect({length:this.length});return this.constructor.name+" "+t})});var ku=R((nR,ov)=>{"use strict";w();var ef=da();function X3(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,ef.nextTick(tf,this,t)):ef.nextTick(tf,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(a){!e&&a?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,ef.nextTick(tf,r,a)):ef.nextTick(tf,r,a):e&&e(a)}),this)}function J3(){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 tf(t,e){t.emit("error",e)}ov.exports={destroy:X3,undestroy:J3}});var Cu=R((oR,pv)=>{"use strict";w();var _i=da();pv.exports=Ye;function sv(t){var e=this;this.next=null,this.entry=null,this.finish=function(){y4(e,t)}}var Q3=!S.default.browser&&["v0.10","v0.9."].indexOf(S.default.version.slice(0,5))>-1?setImmediate:_i.nextTick,un;Ye.WritableState=ya;var uv=Object.create(sn());uv.inherits=J();var e4={deprecate:iu()},hv=Ru(),nf=Jo().Buffer,t4=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function r4(t){return nf.from(t)}function i4(t){return nf.isBuffer(t)||t instanceof t4}var lv=ku();uv.inherits(Ye,hv);function n4(){}function ya(t,e){un=un||xi(),t=t||{};var r=e instanceof un;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,i=t.writableHighWaterMark,a=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:r&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=t.decodeStrings===!1;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(v){l4(e,v)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new sv(this)}ya.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(ya.prototype,"buffer",{get:e4.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var rf;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(rf=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ye,Symbol.hasInstance,{value:function(t){return rf.call(this,t)?!0:this!==Ye?!1:t&&t._writableState instanceof ya}})):rf=function(t){return t instanceof this};function Ye(t){if(un=un||xi(),!rf.call(Ye,this)&&!(this instanceof un))return new Ye(t);this._writableState=new ya(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),hv.call(this)}Ye.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function a4(t,e){var r=new Error("write after end");t.emit("error",r),_i.nextTick(e,r)}function o4(t,e,r,n){var i=!0,a=!1;return r===null?a=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!e.objectMode&&(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),_i.nextTick(n,a),i=!1),i}Ye.prototype.write=function(t,e,r){var n=this._writableState,i=!1,a=!n.objectMode&&i4(t);return a&&!nf.isBuffer(t)&&(t=r4(t)),typeof e=="function"&&(r=e,e=null),a?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=n4),n.ended?a4(this,r):(a||o4(this,n,t,r))&&(n.pendingcb++,i=s4(this,n,a,t,e,r)),i};Ye.prototype.cork=function(){var t=this._writableState;t.corked++};Ye.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&cv(this,t))};Ye.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this};function f4(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=nf.from(e,r)),e}Object.defineProperty(Ye.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function s4(t,e,r,n,i,a){if(!r){var f=f4(e,n,i);n!==f&&(r=!0,i="buffer",n=f)}var v=e.objectMode?1:n.length;e.length+=v;var m=e.length<e.highWaterMark;if(m||(e.needDrain=!0),e.writing||e.corked){var E=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},E?E.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Tu(t,e,!1,v,n,i,a);return m}function Tu(t,e,r,n,i,a,f){e.writelen=n,e.writecb=f,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,a,e.onwrite),e.sync=!1}function u4(t,e,r,n,i){--e.pendingcb,r?(_i.nextTick(i,n),_i.nextTick(va,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),va(t,e))}function h4(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function l4(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(h4(r),e)u4(t,r,n,e,i);else{var a=dv(r);!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&cv(t,r),n?Q3(fv,t,r,a,i):fv(t,r,a,i)}}function fv(t,e,r,n){r||c4(t,e),e.pendingcb--,n(),va(t,e)}function c4(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function cv(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),a=e.corkedRequestsFree;a.entry=r;for(var f=0,v=!0;r;)i[f]=r,r.isBuf||(v=!1),r=r.next,f+=1;i.allBuffers=v,Tu(t,e,!0,e.length,i,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new sv(e),e.bufferedRequestCount=0}else{for(;r;){var m=r.chunk,E=r.encoding,A=r.callback,q=e.objectMode?1:m.length;if(Tu(t,e,!1,q,m,E,A),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Ye.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))};Ye.prototype._writev=null;Ye.prototype.end=function(t,e,r){var n=this._writableState;typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||v4(this,n,r)};function dv(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function d4(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),va(t,e)})}function p4(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,_i.nextTick(d4,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function va(t,e){var r=dv(e);return r&&(p4(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),r}function v4(t,e,r){e.ending=!0,va(t,e),r&&(e.finished?_i.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function y4(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}Object.defineProperty(Ye.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});Ye.prototype.destroy=lv.destroy;Ye.prototype._undestroy=lv.undestroy;Ye.prototype._destroy=function(t,e){this.end(),e(t)}});var xi=R((sR,mv)=>{"use strict";w();var vv=da(),g4=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};mv.exports=vr;var yv=Object.create(sn());yv.inherits=J();var gv=Du(),Pu=Cu();yv.inherits(vr,gv);for(Ou=g4(Pu.prototype),af=0;af<Ou.length;af++)of=Ou[af],vr.prototype[of]||(vr.prototype[of]=Pu.prototype[of]);var Ou,of,af;function vr(t){if(!(this instanceof vr))return new vr(t);gv.call(this,t),Pu.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",m4)}Object.defineProperty(vr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function m4(){this.allowHalfOpen||this._writableState.ended||vv.nextTick(b4,this)}function b4(t){t.end()}Object.defineProperty(vr.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}});vr.prototype._destroy=function(t,e){this.push(null),this.end(),vv.nextTick(e,t)}});var Du=R((lR,Iv)=>{"use strict";w();var ln=da();Iv.exports=ze;var w4=ev(),ga;ze.ReadableState=Sv;var hR=Wi().EventEmitter,xv=function(t,e){return t.listeners(e).length},ju=Ru(),ma=Jo().Buffer,_4=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function x4(t){return ma.from(t)}function M4(t){return ma.isBuffer(t)||t instanceof _4}var Mv=Object.create(sn());Mv.inherits=J();var Uu=na(),Le=void 0;Uu&&Uu.debuglog?Le=Uu.debuglog("stream"):Le=function(){};var E4=av(),Ev=ku(),hn;Mv.inherits(ze,ju);var Nu=["error","close","destroy","pause","resume"];function S4(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):w4(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Sv(t,e){ga=ga||xi(),t=t||{};var r=e instanceof ga;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,i=t.readableHighWaterMark,a=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:r&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new E4,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(hn||(hn=nn().StringDecoder),this.decoder=new hn(t.encoding),this.encoding=t.encoding)}function ze(t){if(ga=ga||xi(),!(this instanceof ze))return new ze(t);this._readableState=new Sv(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),ju.call(this)}Object.defineProperty(ze.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});ze.prototype.destroy=Ev.destroy;ze.prototype._undestroy=Ev.undestroy;ze.prototype._destroy=function(t,e){this.push(null),e(t)};ze.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=ma.from(t,e),e=""),n=!0),Bv(this,t,e,!1,n)};ze.prototype.unshift=function(t){return Bv(this,t,null,!0,!1)};function Bv(t,e,r,n,i){var a=t._readableState;if(e===null)a.reading=!1,q4(t,a);else{var f;i||(f=B4(a,e)),f?t.emit("error",f):a.objectMode||e&&e.length>0?(typeof e!="string"&&!a.objectMode&&Object.getPrototypeOf(e)!==ma.prototype&&(e=x4(e)),n?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):Lu(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||e.length!==0?Lu(t,a,e,!1):Av(t,a)):Lu(t,a,e,!1))):n||(a.reading=!1)}return A4(a)}function Lu(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&ff(t)),Av(t,e)}function B4(t,e){var r;return!M4(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function A4(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}ze.prototype.isPaused=function(){return this._readableState.flowing===!1};ze.prototype.setEncoding=function(t){return hn||(hn=nn().StringDecoder),this._readableState.decoder=new hn(t),this._readableState.encoding=t,this};var bv=8388608;function R4(t){return t>=bv?t=bv:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function wv(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=R4(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}ze.prototype.read=function(t){Le("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return Le("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Fu(this):ff(this),null;if(t=wv(t,e),t===0&&e.ended)return e.length===0&&Fu(this),null;var n=e.needReadable;Le("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,Le("length less than watermark",n)),e.ended||e.reading?(n=!1,Le("reading or ended",n)):n&&(Le("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=wv(r,e)));var i;return t>0?i=Rv(t,e):i=null,i===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Fu(this)),i!==null&&this.emit("data",i),i};function q4(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,ff(t)}}function ff(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(Le("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?ln.nextTick(_v,t):_v(t))}function _v(t){Le("emit readable"),t.emit("readable"),Hu(t)}function Av(t,e){e.readingMore||(e.readingMore=!0,ln.nextTick(I4,t,e))}function I4(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(Le("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}ze.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};ze.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,Le("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==S.default.stdout&&t!==S.default.stderr,a=i?v:X;n.endEmitted?ln.nextTick(a):r.once("end",a),t.on("unpipe",f);function f(z,$){Le("onunpipe"),z===r&&$&&$.hasUnpiped===!1&&($.hasUnpiped=!0,A())}function v(){Le("onend"),t.end()}var m=k4(r);t.on("drain",m);var E=!1;function A(){Le("cleanup"),t.removeListener("close",j),t.removeListener("finish",V),t.removeListener("drain",m),t.removeListener("error",C),t.removeListener("unpipe",f),r.removeListener("end",v),r.removeListener("end",X),r.removeListener("data",I),E=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&m()}var q=!1;r.on("data",I);function I(z){Le("ondata"),q=!1;var $=t.write(z);$===!1&&!q&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&qv(n.pipes,t)!==-1)&&!E&&(Le("false write response, pause",n.awaitDrain),n.awaitDrain++,q=!0),r.pause())}function C(z){Le("onerror",z),X(),t.removeListener("error",C),xv(t,"error")===0&&t.emit("error",z)}S4(t,"error",C);function j(){t.removeListener("finish",V),X()}t.once("close",j);function V(){Le("onfinish"),t.removeListener("close",j),X()}t.once("finish",V);function X(){Le("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(Le("pipe resume"),r.resume()),t};function k4(t){return function(){var e=t._readableState;Le("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&xv(t,"data")&&(e.flowing=!0,Hu(t))}}ze.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var f=qv(e.pipes,t);return f===-1?this:(e.pipes.splice(f,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};ze.prototype.on=function(t,e){var r=ju.prototype.on.call(this,t,e);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var n=this._readableState;!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&ff(this):ln.nextTick(T4,this))}return r};ze.prototype.addListener=ze.prototype.on;function T4(t){Le("readable nexttick read 0"),t.read(0)}ze.prototype.resume=function(){var t=this._readableState;return t.flowing||(Le("resume"),t.flowing=!0,C4(this,t)),this};function C4(t,e){e.resumeScheduled||(e.resumeScheduled=!0,ln.nextTick(O4,t,e))}function O4(t,e){e.reading||(Le("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),Hu(t),e.flowing&&!e.reading&&t.read(0)}ze.prototype.pause=function(){return Le("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Le("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Hu(t){var e=t._readableState;for(Le("flow",e.flowing);e.flowing&&t.read()!==null;);}ze.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(Le("wrapped end"),r.decoder&&!r.ended){var f=r.decoder.end();f&&f.length&&e.push(f)}e.push(null)}),t.on("data",function(f){if(Le("wrapped data"),r.decoder&&(f=r.decoder.write(f)),!(r.objectMode&&f==null)&&!(!r.objectMode&&(!f||!f.length))){var v=e.push(f);v||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=(function(f){return function(){return t[f].apply(t,arguments)}})(i));for(var a=0;a<Nu.length;a++)t.on(Nu[a],this.emit.bind(this,Nu[a]));return this._read=function(f){Le("wrapped _read",f),n&&(n=!1,t.resume())},this};Object.defineProperty(ze.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});ze._fromList=Rv;function Rv(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.head.data:r=e.buffer.concat(e.length),e.buffer.clear()):r=P4(t,e.buffer,e.decoder),r}function P4(t,e,r){var n;return t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):t===e.head.data.length?n=e.shift():n=r?D4(t,e):U4(t,e),n}function D4(t,e){var r=e.head,n=1,i=r.data;for(t-=i.length;r=r.next;){var a=r.data,f=t>a.length?a.length:t;if(f===a.length?i+=a:i+=a.slice(0,t),t-=f,t===0){f===a.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=a.slice(f));break}++n}return e.length-=n,i}function U4(t,e){var r=ma.allocUnsafe(t),n=e.head,i=1;for(n.data.copy(r),t-=n.data.length;n=n.next;){var a=n.data,f=t>a.length?a.length:t;if(a.copy(r,r.length-t,0,f),t-=f,t===0){f===a.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=a.slice(f));break}++i}return e.length-=i,r}function Fu(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,ln.nextTick(N4,e,t))}function N4(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function qv(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}});var Ku=R((dR,Cv)=>{"use strict";w();Cv.exports=yr;var sf=xi(),Tv=Object.create(sn());Tv.inherits=J();Tv.inherits(yr,sf);function L4(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function yr(t){if(!(this instanceof yr))return new yr(t);sf.call(this,t),this._transformState={afterTransform:L4.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",F4)}function F4(){var t=this;typeof this._flush=="function"?this._flush(function(e,r){kv(t,e,r)}):kv(this,null,null)}yr.prototype.push=function(t,e){return this._transformState.needTransform=!1,sf.prototype.push.call(this,t,e)};yr.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")};yr.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};yr.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};yr.prototype._destroy=function(t,e){var r=this;sf.prototype._destroy.call(this,t,function(n){e(n),r.emit("close")})};function kv(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}});var Uv=R((vR,Dv)=>{"use strict";w();Dv.exports=ba;var Ov=Ku(),Pv=Object.create(sn());Pv.inherits=J();Pv.inherits(ba,Ov);function ba(t){if(!(this instanceof ba))return new ba(t);Ov.call(this,t)}ba.prototype._transform=function(t,e,r){r(null,t)}});var Lv=R((Jt,Nv)=>{w();Jt=Nv.exports=Du();Jt.Stream=Jt;Jt.Readable=Jt;Jt.Writable=Cu();Jt.Duplex=xi();Jt.Transform=Ku();Jt.PassThrough=Uv()});var Hv=R((mR,jv)=>{"use strict";w();var j4=ke().Buffer,H4=Jp(),Fv=Lv().Transform,K4=J();function Ur(t){Fv.call(this),this._block=j4.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}K4(Ur,Fv);Ur.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(i){n=i}r(n)};Ur.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};Ur.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");for(var r=H4(t,e),n=this._block,i=0;this._blockOffset+r.length-i>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)n[a]=r[i],a+=1,i+=1;this._update(),this._blockOffset=0}for(;i<r.length;)n[this._blockOffset]=r[i],this._blockOffset+=1,i+=1;for(var f=0,v=r.length*8;v>0;++f)this._length[f]+=v,v=this._length[f]/4294967296|0,v>0&&(this._length[f]-=4294967296*v);return this};Ur.prototype._update=function(){throw new Error("_update is not implemented")};Ur.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();t!==void 0&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e};Ur.prototype._digest=function(){throw new Error("_digest is not implemented")};jv.exports=Ur});var hf=R((wR,Zv)=>{"use strict";w();var Wu=ft().Buffer,W4=J(),$v=Hv(),z4=new Array(16),wa=[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],_a=[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],xa=[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],Ma=[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],Ea=[0,1518500249,1859775393,2400959708,2840853838],Sa=[1352829926,1548603684,1836072691,2053994217,0];function Mi(t,e){return t<<e|t>>>32-e}function Kv(t,e,r,n,i,a,f,v){return Mi(t+(e^r^n)+a+f|0,v)+i|0}function Wv(t,e,r,n,i,a,f,v){return Mi(t+(e&r|~e&n)+a+f|0,v)+i|0}function zv(t,e,r,n,i,a,f,v){return Mi(t+((e|~r)^n)+a+f|0,v)+i|0}function Gv(t,e,r,n,i,a,f,v){return Mi(t+(e&n|r&~n)+a+f|0,v)+i|0}function Vv(t,e,r,n,i,a,f,v){return Mi(t+(e^(r|~n))+a+f|0,v)+i|0}function uf(){$v.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}W4(uf,$v);uf.prototype._update=function(){for(var t=z4,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);for(var r=this._a|0,n=this._b|0,i=this._c|0,a=this._d|0,f=this._e|0,v=this._a|0,m=this._b|0,E=this._c|0,A=this._d|0,q=this._e|0,I=0;I<80;I+=1){var C,j;I<16?(C=Kv(r,n,i,a,f,t[wa[I]],Ea[0],xa[I]),j=Vv(v,m,E,A,q,t[_a[I]],Sa[0],Ma[I])):I<32?(C=Wv(r,n,i,a,f,t[wa[I]],Ea[1],xa[I]),j=Gv(v,m,E,A,q,t[_a[I]],Sa[1],Ma[I])):I<48?(C=zv(r,n,i,a,f,t[wa[I]],Ea[2],xa[I]),j=zv(v,m,E,A,q,t[_a[I]],Sa[2],Ma[I])):I<64?(C=Gv(r,n,i,a,f,t[wa[I]],Ea[3],xa[I]),j=Wv(v,m,E,A,q,t[_a[I]],Sa[3],Ma[I])):(C=Vv(r,n,i,a,f,t[wa[I]],Ea[4],xa[I]),j=Kv(v,m,E,A,q,t[_a[I]],Sa[4],Ma[I])),r=f,f=a,a=Mi(i,10),i=n,n=C,v=q,q=A,A=Mi(E,10),E=m,m=j}var V=this._b+i+A|0;this._b=this._c+a+q|0,this._c=this._d+f+v|0,this._d=this._e+r+m|0,this._e=this._a+n+E|0,this._a=V};uf.prototype._digest=function(){this._block[this._blockOffset]=128,this._blockOffset+=1,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=Wu.alloc?Wu.alloc(20):new Wu(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t};Zv.exports=uf});var Ei=R((xR,Yv)=>{"use strict";w();var G4=ke().Buffer,V4=ca();function lf(t,e){this._block=G4.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}lf.prototype.update=function(t,e){t=V4(t,e||"utf8");for(var r=this._block,n=this._blockSize,i=t.length,a=this._len,f=0;f<i;){for(var v=a%n,m=Math.min(i-f,n-v),E=0;E<m;E++)r[v+E]=t[f+E];a+=m,f+=m,a%n===0&&this._update(r)}return this._len+=i,this};lf.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var a=this._hash();return t?a.toString(t):a};lf.prototype._update=function(){throw new Error("_update must be implemented by subclass")};Yv.exports=lf});var Qv=R((ER,Jv)=>{"use strict";w();var $4=J(),Xv=Ei(),Z4=ke().Buffer,Y4=[1518500249,1859775393,-1894007588,-899497514],X4=new Array(80);function Ba(){this.init(),this._w=X4,Xv.call(this,64,56)}$4(Ba,Xv);Ba.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function J4(t){return t<<5|t>>>27}function Q4(t){return t<<30|t>>>2}function e8(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}Ba.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,a=this._d|0,f=this._e|0,v=0;v<16;++v)e[v]=t.readInt32BE(v*4);for(;v<80;++v)e[v]=e[v-3]^e[v-8]^e[v-14]^e[v-16];for(var m=0;m<80;++m){var E=~~(m/20),A=J4(r)+e8(E,n,i,a)+f+e[m]+Y4[E]|0;f=a,a=i,i=Q4(n),n=r,r=A}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0};Ba.prototype._hash=function(){var t=Z4.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};Jv.exports=Ba});var r1=R((BR,t1)=>{"use strict";w();var t8=J(),e1=Ei(),r8=ke().Buffer,i8=[1518500249,1859775393,-1894007588,-899497514],n8=new Array(80);function Aa(){this.init(),this._w=n8,e1.call(this,64,56)}t8(Aa,e1);Aa.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function a8(t){return t<<1|t>>>31}function o8(t){return t<<5|t>>>27}function f8(t){return t<<30|t>>>2}function s8(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}Aa.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,a=this._d|0,f=this._e|0,v=0;v<16;++v)e[v]=t.readInt32BE(v*4);for(;v<80;++v)e[v]=a8(e[v-3]^e[v-8]^e[v-14]^e[v-16]);for(var m=0;m<80;++m){var E=~~(m/20),A=o8(r)+s8(E,n,i,a)+f+e[m]+i8[E]|0;f=a,a=i,i=f8(n),n=r,r=A}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0};Aa.prototype._hash=function(){var t=r8.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};t1.exports=Aa});var zu=R((RR,n1)=>{"use strict";w();var u8=J(),i1=Ei(),h8=ke().Buffer,l8=[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],c8=new Array(64);function Ra(){this.init(),this._w=c8,i1.call(this,64,56)}u8(Ra,i1);Ra.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 d8(t,e,r){return r^t&(e^r)}function p8(t,e,r){return t&e|r&(t|e)}function v8(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function y8(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function g8(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function m8(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}Ra.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,a=this._d|0,f=this._e|0,v=this._f|0,m=this._g|0,E=this._h|0,A=0;A<16;++A)e[A]=t.readInt32BE(A*4);for(;A<64;++A)e[A]=m8(e[A-2])+e[A-7]+g8(e[A-15])+e[A-16]|0;for(var q=0;q<64;++q){var I=E+y8(f)+d8(f,v,m)+l8[q]+e[q]|0,C=v8(r)+p8(r,n,i)|0;E=m,m=v,v=f,f=a+I|0,a=i,i=n,n=r,r=I+C|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0,this._f=v+this._f|0,this._g=m+this._g|0,this._h=E+this._h|0};Ra.prototype._hash=function(){var t=h8.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};n1.exports=Ra});var o1=R((IR,a1)=>{"use strict";w();var b8=J(),w8=zu(),_8=Ei(),x8=ke().Buffer,M8=new Array(64);function cf(){this.init(),this._w=M8,_8.call(this,64,56)}b8(cf,w8);cf.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};cf.prototype._hash=function(){var t=x8.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};a1.exports=cf});var Gu=R((TR,d1)=>{"use strict";w();var E8=J(),c1=Ei(),S8=ke().Buffer,f1=[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],B8=new Array(160);function qa(){this.init(),this._w=B8,c1.call(this,128,112)}E8(qa,c1);qa.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 s1(t,e,r){return r^t&(e^r)}function u1(t,e,r){return t&e|r&(t|e)}function h1(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function l1(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function A8(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function R8(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function q8(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function I8(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function nt(t,e){return t>>>0<e>>>0?1:0}qa.prototype._update=function(t){for(var e=this._w,r=this._ah|0,n=this._bh|0,i=this._ch|0,a=this._dh|0,f=this._eh|0,v=this._fh|0,m=this._gh|0,E=this._hh|0,A=this._al|0,q=this._bl|0,I=this._cl|0,C=this._dl|0,j=this._el|0,V=this._fl|0,X=this._gl|0,z=this._hl|0,$=0;$<32;$+=2)e[$]=t.readInt32BE($*4),e[$+1]=t.readInt32BE($*4+4);for(;$<160;$+=2){var Fe=e[$-30],k=e[$-30+1],O=A8(Fe,k),D=R8(k,Fe);Fe=e[$-4],k=e[$-4+1];var L=q8(Fe,k),F=I8(k,Fe),H=e[$-14],M=e[$-14+1],h=e[$-32],y=e[$-32+1],l=D+M|0,o=O+H+nt(l,D)|0;l=l+F|0,o=o+L+nt(l,F)|0,l=l+y|0,o=o+h+nt(l,y)|0,e[$]=o,e[$+1]=l}for(var s=0;s<160;s+=2){o=e[s],l=e[s+1];var d=u1(r,n,i),g=u1(A,q,I),p=h1(r,A),u=h1(A,r),b=l1(f,j),_=l1(j,f),c=f1[s],x=f1[s+1],P=s1(f,v,m),N=s1(j,V,X),U=z+_|0,W=E+b+nt(U,z)|0;U=U+N|0,W=W+P+nt(U,N)|0,U=U+x|0,W=W+c+nt(U,x)|0,U=U+l|0,W=W+o+nt(U,l)|0;var K=u+g|0,G=p+d+nt(K,u)|0;E=m,z=X,m=v,X=V,v=f,V=j,j=C+U|0,f=a+W+nt(j,C)|0,a=i,C=I,i=n,I=q,n=r,q=A,A=U+K|0,r=W+G+nt(A,U)|0}this._al=this._al+A|0,this._bl=this._bl+q|0,this._cl=this._cl+I|0,this._dl=this._dl+C|0,this._el=this._el+j|0,this._fl=this._fl+V|0,this._gl=this._gl+X|0,this._hl=this._hl+z|0,this._ah=this._ah+r+nt(this._al,A)|0,this._bh=this._bh+n+nt(this._bl,q)|0,this._ch=this._ch+i+nt(this._cl,I)|0,this._dh=this._dh+a+nt(this._dl,C)|0,this._eh=this._eh+f+nt(this._el,j)|0,this._fh=this._fh+v+nt(this._fl,V)|0,this._gh=this._gh+m+nt(this._gl,X)|0,this._hh=this._hh+E+nt(this._hl,z)|0};qa.prototype._hash=function(){var t=S8.allocUnsafe(64);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};d1.exports=qa});var v1=R((OR,p1)=>{"use strict";w();var k8=J(),T8=Gu(),C8=Ei(),O8=ke().Buffer,P8=new Array(160);function df(){this.init(),this._w=P8,C8.call(this,128,112)}k8(df,T8);df.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};df.prototype._hash=function(){var t=O8.allocUnsafe(48);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};p1.exports=df});var pf=R((DR,gr)=>{"use strict";w();gr.exports=function(e){var r=e.toLowerCase(),n=gr.exports[r];if(!n)throw new Error(r+" is not supported (we accept pull requests)");return new n};gr.exports.sha=Qv();gr.exports.sha1=r1();gr.exports.sha224=o1();gr.exports.sha256=zu();gr.exports.sha384=v1();gr.exports.sha512=Gu()});var mr=R((NR,g1)=>{"use strict";w();var D8=ke().Buffer,y1=Bu().Transform,U8=nn().StringDecoder,N8=J(),L8=ca();function Ct(t){y1.call(this),this.hashMode=typeof t=="string",this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}N8(Ct,y1);Ct.prototype.update=function(t,e,r){var n=L8(t,e),i=this._update(n);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)};Ct.prototype.setAutoPadding=function(){};Ct.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};Ct.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};Ct.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};Ct.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(i){n=i}finally{r(n)}};Ct.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(r){e=r}t(e)};Ct.prototype._finalOrDigest=function(t){var e=this.__final()||D8.alloc(0);return t&&(e=this._toString(e,t,!0)),e};Ct.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new U8(e),this._encoding=e),this._encoding!==e)throw new Error("can\u2019t switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n};g1.exports=Ct});var Ia=R((FR,b1)=>{"use strict";w();var F8=J(),j8=Yo(),H8=hf(),K8=pf(),m1=mr();function vf(t){m1.call(this,"digest"),this._hash=t}F8(vf,m1);vf.prototype._update=function(t){this._hash.update(t)};vf.prototype._final=function(){return this._hash.digest()};b1.exports=function(e){return e=e.toLowerCase(),e==="md5"?new j8:e==="rmd160"||e==="ripemd160"?new H8:new vf(K8(e))}});var x1=R((HR,_1)=>{"use strict";w();var W8=J(),Si=ke().Buffer,w1=mr(),z8=Si.alloc(128),cn=64;function yf(t,e){w1.call(this,"digest"),typeof e=="string"&&(e=Si.from(e)),this._alg=t,this._key=e,e.length>cn?e=t(e):e.length<cn&&(e=Si.concat([e,z8],cn));for(var r=this._ipad=Si.allocUnsafe(cn),n=this._opad=Si.allocUnsafe(cn),i=0;i<cn;i++)r[i]=e[i]^54,n[i]=e[i]^92;this._hash=[r]}W8(yf,w1);yf.prototype._update=function(t){this._hash.push(t)};yf.prototype._final=function(){var t=this._alg(Si.concat(this._hash));return this._alg(Si.concat([this._opad,t]))};_1.exports=yf});var Vu=R((WR,M1)=>{w();var G8=Yo();M1.exports=function(t){return new G8().update(t).digest()}});var B1=R((GR,S1)=>{"use strict";w();var V8=J(),$8=x1(),E1=mr(),ka=ke().Buffer,Z8=Vu(),$u=hf(),Zu=pf(),Y8=ka.alloc(128);function Ta(t,e){E1.call(this,"digest"),typeof e=="string"&&(e=ka.from(e));var r=t==="sha512"||t==="sha384"?128:64;if(this._alg=t,this._key=e,e.length>r){var n=t==="rmd160"?new $u:Zu(t);e=n.update(e).digest()}else e.length<r&&(e=ka.concat([e,Y8],r));for(var i=this._ipad=ka.allocUnsafe(r),a=this._opad=ka.allocUnsafe(r),f=0;f<r;f++)i[f]=e[f]^54,a[f]=e[f]^92;this._hash=t==="rmd160"?new $u:Zu(t),this._hash.update(i)}V8(Ta,E1);Ta.prototype._update=function(t){this._hash.update(t)};Ta.prototype._final=function(){var t=this._hash.digest(),e=this._alg==="rmd160"?new $u:Zu(this._alg);return e.update(this._opad).update(t).digest()};S1.exports=function(e,r){return e=e.toLowerCase(),e==="rmd160"||e==="ripemd160"?new Ta("rmd160",r):e==="md5"?new $8(Z8,r):new Ta(e,r)}});var gf=R(($R,A1)=>{"use strict";w();A1.exports={}});var Yu=R((YR,R1)=>{"use strict";w();var X8=isFinite,J8=Math.pow(2,30)-1;R1.exports=function(t,e){if(typeof t!="number")throw new TypeError("Iterations not a number");if(t<0||!X8(t))throw new TypeError("Bad iterations");if(typeof e!="number")throw new TypeError("Key length not a number");if(e<0||e>J8||e!==e)throw new TypeError("Bad key length")}});var Xu=R((JR,I1)=>{"use strict";w();var mf;globalThis.process&&globalThis.process.browser?mf="utf-8":globalThis.process&&globalThis.process.version?(q1=parseInt(S.default.version.split(".")[0].slice(1),10),mf=q1>=6?"utf-8":"binary"):mf="utf-8";var q1;I1.exports=mf});var Ju=R((eq,C1)=>{"use strict";w();var Q8=ke().Buffer,e5=ca(),T1=typeof Uint8Array<"u",t5=T1&&typeof ArrayBuffer<"u",k1=t5&&ArrayBuffer.isView;C1.exports=function(t,e,r){if(typeof t=="string"||Q8.isBuffer(t)||T1&&t instanceof Uint8Array||k1&&k1(t))return e5(t,e);throw new TypeError(r+" must be a string, a Buffer, a Uint8Array, or a DataView")}});var Qu=R((rq,U1)=>{"use strict";w();var r5=Vu(),i5=hf(),n5=pf(),Bi=ke().Buffer,a5=Yu(),O1=Xu(),P1=Ju(),o5=Bi.alloc(128),bf={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},f5={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function s5(t){return new i5().update(t).digest()}function u5(t){function e(r){return n5(t).update(r).digest()}return t==="rmd160"||t==="ripemd160"?s5:t==="md5"?r5:e}function D1(t,e,r){var n=u5(t),i=t==="sha512"||t==="sha384"?128:64;e.length>i?e=n(e):e.length<i&&(e=Bi.concat([e,o5],i));for(var a=Bi.allocUnsafe(i+bf[t]),f=Bi.allocUnsafe(i+bf[t]),v=0;v<i;v++)a[v]=e[v]^54,f[v]=e[v]^92;var m=Bi.allocUnsafe(i+r+4);a.copy(m,0,0,i),this.ipad1=m,this.ipad2=a,this.opad=f,this.alg=t,this.blocksize=i,this.hash=n,this.size=bf[t]}D1.prototype.run=function(t,e){t.copy(e,this.blocksize);var r=this.hash(e);return r.copy(this.opad,this.blocksize),this.hash(this.opad)};function h5(t,e,r,n,i){a5(r,n),t=P1(t,O1,"Password"),e=P1(e,O1,"Salt");var a=(i||"sha1").toLowerCase(),f=f5[a]||a,v=bf[f];if(typeof v!="number"||!v)throw new TypeError("Digest algorithm not supported: "+i);var m=new D1(f,t,e.length),E=Bi.allocUnsafe(n),A=Bi.allocUnsafe(e.length+4);e.copy(A,0,0,e.length);for(var q=0,I=v,C=Math.ceil(n/I),j=1;j<=C;j++){A.writeUInt32BE(j,e.length);for(var V=m.run(A,m.ipad1),X=V,z=1;z<r;z++){X=m.run(X,m.ipad2);for(var $=0;$<I;$++)V[$]^=X[$]}V.copy(E,q),q+=I}return E}U1.exports=h5});var W1=R((nq,K1)=>{"use strict";w();var j1=ke().Buffer,l5=Yu(),N1=Xu(),L1=Qu(),F1=Ju(),wf,Ca=globalThis.crypto&&globalThis.crypto.subtle,c5={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"},eh=[],Ai;function th(){return Ai||(globalThis.process&&globalThis.process.nextTick?Ai=globalThis.process.nextTick:globalThis.queueMicrotask?Ai=globalThis.queueMicrotask:globalThis.setImmediate?Ai=globalThis.setImmediate:Ai=globalThis.setTimeout,Ai)}function H1(t,e,r,n,i){return Ca.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then(function(a){return Ca.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:i}},a,n<<3)}).then(function(a){return j1.from(a)})}function d5(t){if(globalThis.process&&!globalThis.process.browser||!Ca||!Ca.importKey||!Ca.deriveBits)return Promise.resolve(!1);if(eh[t]!==void 0)return eh[t];wf=wf||j1.alloc(8);var e=H1(wf,wf,10,128,t).then(function(){return!0},function(){return!1});return eh[t]=e,e}function p5(t,e){t.then(function(r){th()(function(){e(null,r)})},function(r){th()(function(){e(r)})})}K1.exports=function(t,e,r,n,i,a){if(typeof i=="function"&&(a=i,i=void 0),l5(r,n),t=F1(t,N1,"Password"),e=F1(e,N1,"Salt"),typeof a!="function")throw new Error("No callback provided to pbkdf2");i=i||"sha1";var f=c5[i.toLowerCase()];if(!f||typeof globalThis.Promise!="function"){th()(function(){var v;try{v=L1(t,e,r,n,i)}catch(m){a(m);return}a(null,v)});return}p5(d5(f).then(function(v){return v?H1(t,e,r,n,f):L1(t,e,r,n,i)}),a)}});var ih=R(rh=>{"use strict";w();rh.pbkdf2=W1();rh.pbkdf2Sync=Qu()});var nh=R(Et=>{"use strict";w();Et.readUInt32BE=function(e,r){var n=e[0+r]<<24|e[1+r]<<16|e[2+r]<<8|e[3+r];return n>>>0};Et.writeUInt32BE=function(e,r,n){e[0+n]=r>>>24,e[1+n]=r>>>16&255,e[2+n]=r>>>8&255,e[3+n]=r&255};Et.ip=function(e,r,n,i){for(var a=0,f=0,v=6;v>=0;v-=2){for(var m=0;m<=24;m+=8)a<<=1,a|=r>>>m+v&1;for(var m=0;m<=24;m+=8)a<<=1,a|=e>>>m+v&1}for(var v=6;v>=0;v-=2){for(var m=1;m<=25;m+=8)f<<=1,f|=r>>>m+v&1;for(var m=1;m<=25;m+=8)f<<=1,f|=e>>>m+v&1}n[i+0]=a>>>0,n[i+1]=f>>>0};Et.rip=function(e,r,n,i){for(var a=0,f=0,v=0;v<4;v++)for(var m=24;m>=0;m-=8)a<<=1,a|=r>>>m+v&1,a<<=1,a|=e>>>m+v&1;for(var v=4;v<8;v++)for(var m=24;m>=0;m-=8)f<<=1,f|=r>>>m+v&1,f<<=1,f|=e>>>m+v&1;n[i+0]=a>>>0,n[i+1]=f>>>0};Et.pc1=function(e,r,n,i){for(var a=0,f=0,v=7;v>=5;v--){for(var m=0;m<=24;m+=8)a<<=1,a|=r>>m+v&1;for(var m=0;m<=24;m+=8)a<<=1,a|=e>>m+v&1}for(var m=0;m<=24;m+=8)a<<=1,a|=r>>m+v&1;for(var v=1;v<=3;v++){for(var m=0;m<=24;m+=8)f<<=1,f|=r>>m+v&1;for(var m=0;m<=24;m+=8)f<<=1,f|=e>>m+v&1}for(var m=0;m<=24;m+=8)f<<=1,f|=e>>m+v&1;n[i+0]=a>>>0,n[i+1]=f>>>0};Et.r28shl=function(e,r){return e<<r&268435455|e>>>28-r};var _f=[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];Et.pc2=function(e,r,n,i){for(var a=0,f=0,v=_f.length>>>1,m=0;m<v;m++)a<<=1,a|=e>>>_f[m]&1;for(var m=v;m<_f.length;m++)f<<=1,f|=r>>>_f[m]&1;n[i+0]=a>>>0,n[i+1]=f>>>0};Et.expand=function(e,r,n){var i=0,a=0;i=(e&1)<<5|e>>>27;for(var f=23;f>=15;f-=4)i<<=6,i|=e>>>f&63;for(var f=11;f>=3;f-=4)a|=e>>>f&63,a<<=6;a|=(e&31)<<1|e>>>31,r[n+0]=i>>>0,r[n+1]=a>>>0};var z1=[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];Et.substitute=function(e,r){for(var n=0,i=0;i<4;i++){var a=e>>>18-i*6&63,f=z1[i*64+a];n<<=4,n|=f}for(var i=0;i<4;i++){var a=r>>>18-i*6&63,f=z1[256+i*64+a];n<<=4,n|=f}return n>>>0};var G1=[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];Et.permute=function(e){for(var r=0,n=0;n<G1.length;n++)r<<=1,r|=e>>>G1[n]&1;return r>>>0};Et.padSplit=function(e,r,n){for(var i=e.toString(2);i.length<r;)i="0"+i;for(var a=[],f=0;f<r;f+=n)a.push(i.slice(f,f+n));return a.join(" ")}});var Ot=R((hq,$1)=>{w();$1.exports=V1;function V1(t,e){if(!t)throw new Error(e||"Assertion failed")}V1.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)}});var xf=R((cq,Z1)=>{"use strict";w();var v5=Ot();function St(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=t.padding!==!1}Z1.exports=St;St.prototype._init=function(){};St.prototype.update=function(e){return e.length===0?[]:this.type==="decrypt"?this._updateDecrypt(e):this._updateEncrypt(e)};St.prototype._buffer=function(e,r){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-r),i=0;i<n;i++)this.buffer[this.bufferOff+i]=e[r+i];return this.bufferOff+=n,n};St.prototype._flushBuffer=function(e,r){return this._update(this.buffer,0,e,r),this.bufferOff=0,this.blockSize};St.prototype._updateEncrypt=function(e){var r=0,n=0,i=(this.bufferOff+e.length)/this.blockSize|0,a=new Array(i*this.blockSize);this.bufferOff!==0&&(r+=this._buffer(e,r),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(a,n)));for(var f=e.length-(e.length-r)%this.blockSize;r<f;r+=this.blockSize)this._update(e,r,a,n),n+=this.blockSize;for(;r<e.length;r++,this.bufferOff++)this.buffer[this.bufferOff]=e[r];return a};St.prototype._updateDecrypt=function(e){for(var r=0,n=0,i=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,a=new Array(i*this.blockSize);i>0;i--)r+=this._buffer(e,r),n+=this._flushBuffer(a,n);return r+=this._buffer(e,r),a};St.prototype.final=function(e){var r;e&&(r=this.update(e));var n;return this.type==="encrypt"?n=this._finalEncrypt():n=this._finalDecrypt(),r?r.concat(n):n};St.prototype._pad=function(e,r){if(r===0)return!1;for(;r<e.length;)e[r++]=0;return!0};St.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e};St.prototype._unpad=function(e){return e};St.prototype._finalDecrypt=function(){v5.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}});var ah=R((pq,J1)=>{"use strict";w();var Y1=Ot(),y5=J(),tt=nh(),X1=xf();function g5(){this.tmp=new Array(2),this.keys=null}function Qt(t){X1.call(this,t);var e=new g5;this._desState=e,this.deriveKeys(e,t.key)}y5(Qt,X1);J1.exports=Qt;Qt.create=function(e){return new Qt(e)};var m5=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];Qt.prototype.deriveKeys=function(e,r){e.keys=new Array(32),Y1.equal(r.length,this.blockSize,"Invalid key length");var n=tt.readUInt32BE(r,0),i=tt.readUInt32BE(r,4);tt.pc1(n,i,e.tmp,0),n=e.tmp[0],i=e.tmp[1];for(var a=0;a<e.keys.length;a+=2){var f=m5[a>>>1];n=tt.r28shl(n,f),i=tt.r28shl(i,f),tt.pc2(n,i,e.keys,a)}};Qt.prototype._update=function(e,r,n,i){var a=this._desState,f=tt.readUInt32BE(e,r),v=tt.readUInt32BE(e,r+4);tt.ip(f,v,a.tmp,0),f=a.tmp[0],v=a.tmp[1],this.type==="encrypt"?this._encrypt(a,f,v,a.tmp,0):this._decrypt(a,f,v,a.tmp,0),f=a.tmp[0],v=a.tmp[1],tt.writeUInt32BE(n,f,i),tt.writeUInt32BE(n,v,i+4)};Qt.prototype._pad=function(e,r){if(this.padding===!1)return!1;for(var n=e.length-r,i=r;i<e.length;i++)e[i]=n;return!0};Qt.prototype._unpad=function(e){if(this.padding===!1)return e;for(var r=e[e.length-1],n=e.length-r;n<e.length;n++)Y1.equal(e[n],r);return e.slice(0,e.length-r)};Qt.prototype._encrypt=function(e,r,n,i,a){for(var f=r,v=n,m=0;m<e.keys.length;m+=2){var E=e.keys[m],A=e.keys[m+1];tt.expand(v,e.tmp,0),E^=e.tmp[0],A^=e.tmp[1];var q=tt.substitute(E,A),I=tt.permute(q),C=v;v=(f^I)>>>0,f=C}tt.rip(v,f,i,a)};Qt.prototype._decrypt=function(e,r,n,i,a){for(var f=n,v=r,m=e.keys.length-2;m>=0;m-=2){var E=e.keys[m],A=e.keys[m+1];tt.expand(f,e.tmp,0),E^=e.tmp[0],A^=e.tmp[1];var q=tt.substitute(E,A),I=tt.permute(q),C=f;f=(v^I)>>>0,v=C}tt.rip(f,v,i,a)}});var ey=R(Q1=>{"use strict";w();var b5=Ot(),w5=J(),Mf={};function _5(t){b5.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}function x5(t){function e(a){t.call(this,a),this._cbcInit()}w5(e,t);for(var r=Object.keys(Mf),n=0;n<r.length;n++){var i=r[n];e.prototype[i]=Mf[i]}return e.create=function(f){return new e(f)},e}Q1.instantiate=x5;Mf._cbcInit=function(){var e=new _5(this.options.iv);this._cbcState=e};Mf._update=function(e,r,n,i){var a=this._cbcState,f=this.constructor.super_.prototype,v=a.iv;if(this.type==="encrypt"){for(var m=0;m<this.blockSize;m++)v[m]^=e[r+m];f._update.call(this,v,0,n,i);for(var m=0;m<this.blockSize;m++)v[m]=n[i+m]}else{f._update.call(this,e,r,n,i);for(var m=0;m<this.blockSize;m++)n[i+m]^=v[m];for(var m=0;m<this.blockSize;m++)v[m]=e[r+m]}}});var iy=R((mq,ry)=>{"use strict";w();var M5=Ot(),E5=J(),ty=xf(),Nr=ah();function S5(t,e){M5.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),n=e.slice(8,16),i=e.slice(16,24);t==="encrypt"?this.ciphers=[Nr.create({type:"encrypt",key:r}),Nr.create({type:"decrypt",key:n}),Nr.create({type:"encrypt",key:i})]:this.ciphers=[Nr.create({type:"decrypt",key:i}),Nr.create({type:"encrypt",key:n}),Nr.create({type:"decrypt",key:r})]}function Ri(t){ty.call(this,t);var e=new S5(this.type,this.options.key);this._edeState=e}E5(Ri,ty);ry.exports=Ri;Ri.create=function(e){return new Ri(e)};Ri.prototype._update=function(e,r,n,i){var a=this._edeState;a.ciphers[0]._update(e,r,n,i),a.ciphers[1]._update(n,i,n,i),a.ciphers[2]._update(n,i,n,i)};Ri.prototype._pad=Nr.prototype._pad;Ri.prototype._unpad=Nr.prototype._unpad});var ny=R(dn=>{"use strict";w();dn.utils=nh();dn.Cipher=xf();dn.DES=ah();dn.CBC=ey();dn.EDE=iy()});var fy=R((xq,oy)=>{w();var ay=mr(),br=ny(),B5=J(),qi=ke().Buffer,Oa={"des-ede3-cbc":br.CBC.instantiate(br.EDE),"des-ede3":br.EDE,"des-ede-cbc":br.CBC.instantiate(br.EDE),"des-ede":br.EDE,"des-cbc":br.CBC.instantiate(br.DES),"des-ecb":br.DES};Oa.des=Oa["des-cbc"];Oa.des3=Oa["des-ede3-cbc"];oy.exports=Ef;B5(Ef,ay);function Ef(t){ay.call(this);var e=t.mode.toLowerCase(),r=Oa[e],n;t.decrypt?n="decrypt":n="encrypt";var i=t.key;qi.isBuffer(i)||(i=qi.from(i)),(e==="des-ede"||e==="des-ede-cbc")&&(i=qi.concat([i,i.slice(0,8)]));var a=t.iv;qi.isBuffer(a)||(a=qi.from(a)),this._des=r.create({key:i,iv:a,type:n})}Ef.prototype._update=function(t){return qi.from(this._des.update(t))};Ef.prototype._final=function(){return qi.from(this._des.final())}});var sy=R(oh=>{w();oh.encrypt=function(t,e){return t._cipher.encryptBlock(e)};oh.decrypt=function(t,e){return t._cipher.decryptBlock(e)}});var pn=R((Bq,uy)=>{w();uy.exports=function(e,r){for(var n=Math.min(e.length,r.length),i=new B.Buffer(n),a=0;a<n;++a)i[a]=e[a]^r[a];return i}});var ly=R(fh=>{w();var hy=pn();fh.encrypt=function(t,e){var r=hy(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev};fh.decrypt=function(t,e){var r=t._prev;t._prev=e;var n=t._cipher.decryptBlock(e);return hy(n,r)}});var py=R(dy=>{w();var Pa=ke().Buffer,A5=pn();function cy(t,e,r){var n=e.length,i=A5(e,t._cache);return t._cache=t._cache.slice(n),t._prev=Pa.concat([t._prev,r?e:i]),i}dy.encrypt=function(t,e,r){for(var n=Pa.allocUnsafe(0),i;e.length;)if(t._cache.length===0&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=Pa.allocUnsafe(0)),t._cache.length<=e.length)i=t._cache.length,n=Pa.concat([n,cy(t,e.slice(0,i),r)]),e=e.slice(i);else{n=Pa.concat([n,cy(t,e,r)]);break}return n}});var yy=R(vy=>{w();var sh=ke().Buffer;function R5(t,e,r){var n=t._cipher.encryptBlock(t._prev),i=n[0]^e;return t._prev=sh.concat([t._prev.slice(1),sh.from([r?e:i])]),i}vy.encrypt=function(t,e,r){for(var n=e.length,i=sh.allocUnsafe(n),a=-1;++a<n;)i[a]=R5(t,e[a],r);return i}});var my=R(gy=>{w();var Sf=ke().Buffer;function q5(t,e,r){for(var n,i=-1,a=8,f=0,v,m;++i<a;)n=t._cipher.encryptBlock(t._prev),v=e&1<<7-i?128:0,m=n[0]^v,f+=(m&128)>>i%8,t._prev=I5(t._prev,r?v:m);return f}function I5(t,e){var r=t.length,n=-1,i=Sf.allocUnsafe(t.length);for(t=Sf.concat([t,Sf.from([e])]);++n<r;)i[n]=t[n]<<1|t[n+1]>>7;return i}gy.encrypt=function(t,e,r){for(var n=e.length,i=Sf.allocUnsafe(n),a=-1;++a<n;)i[a]=q5(t,e[a],r);return i}});var wy=R(by=>{w();var k5=pn();function T5(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}by.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=B.Buffer.concat([t._cache,T5(t)]);var r=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),k5(e,r)}});var uh=R((Nq,_y)=>{w();function C5(t){for(var e=t.length,r;e--;)if(r=t.readUInt8(e),r===255)t.writeUInt8(0,e);else{r++,t.writeUInt8(r,e);break}}_y.exports=C5});var lh=R(My=>{w();var O5=pn(),xy=ke().Buffer,P5=uh();function D5(t){var e=t._cipher.encryptBlockRaw(t._prev);return P5(t._prev),e}var hh=16;My.encrypt=function(t,e){var r=Math.ceil(e.length/hh),n=t._cache.length;t._cache=xy.concat([t._cache,xy.allocUnsafe(r*hh)]);for(var i=0;i<r;i++){var a=D5(t),f=n+i*hh;t._cache.writeUInt32BE(a[0],f+0),t._cache.writeUInt32BE(a[1],f+4),t._cache.writeUInt32BE(a[2],f+8),t._cache.writeUInt32BE(a[3],f+12)}var v=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),O5(e,v)}});var ch=R((Hq,U5)=>{U5.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"}}});var Af=R((Kq,Ey)=>{w();var N5={ECB:sy(),CBC:ly(),CFB:py(),CFB8:yy(),CFB1:my(),OFB:wy(),CTR:lh(),GCM:lh()},Bf=ch();for(dh in Bf)Bf[dh].module=N5[Bf[dh].mode];var dh;Ey.exports=Bf});var Da=R((zq,By)=>{w();var Rf=ke().Buffer;function vh(t){Rf.isBuffer(t)||(t=Rf.from(t));for(var e=t.length/4|0,r=new Array(e),n=0;n<e;n++)r[n]=t.readUInt32BE(n*4);return r}function ph(t){for(var e=0;e<t.length;t++)t[e]=0}function Sy(t,e,r,n,i){for(var a=r[0],f=r[1],v=r[2],m=r[3],E=t[0]^e[0],A=t[1]^e[1],q=t[2]^e[2],I=t[3]^e[3],C,j,V,X,z=4,$=1;$<i;$++)C=a[E>>>24]^f[A>>>16&255]^v[q>>>8&255]^m[I&255]^e[z++],j=a[A>>>24]^f[q>>>16&255]^v[I>>>8&255]^m[E&255]^e[z++],V=a[q>>>24]^f[I>>>16&255]^v[E>>>8&255]^m[A&255]^e[z++],X=a[I>>>24]^f[E>>>16&255]^v[A>>>8&255]^m[q&255]^e[z++],E=C,A=j,q=V,I=X;return C=(n[E>>>24]<<24|n[A>>>16&255]<<16|n[q>>>8&255]<<8|n[I&255])^e[z++],j=(n[A>>>24]<<24|n[q>>>16&255]<<16|n[I>>>8&255]<<8|n[E&255])^e[z++],V=(n[q>>>24]<<24|n[I>>>16&255]<<16|n[E>>>8&255]<<8|n[A&255])^e[z++],X=(n[I>>>24]<<24|n[E>>>16&255]<<16|n[A>>>8&255]<<8|n[q&255])^e[z++],C=C>>>0,j=j>>>0,V=V>>>0,X=X>>>0,[C,j,V,X]}var L5=[0,1,2,4,8,16,32,64,128,27,54],Xe=(function(){for(var t=new Array(256),e=0;e<256;e++)e<128?t[e]=e<<1:t[e]=e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],a=[[],[],[],[]],f=0,v=0,m=0;m<256;++m){var E=v^v<<1^v<<2^v<<3^v<<4;E=E>>>8^E&255^99,r[f]=E,n[E]=f;var A=t[f],q=t[A],I=t[q],C=t[E]*257^E*16843008;i[0][f]=C<<24|C>>>8,i[1][f]=C<<16|C>>>16,i[2][f]=C<<8|C>>>24,i[3][f]=C,C=I*16843009^q*65537^A*257^f*16843008,a[0][E]=C<<24|C>>>8,a[1][E]=C<<16|C>>>16,a[2][E]=C<<8|C>>>24,a[3][E]=C,f===0?f=v=1:(f=A^t[t[t[I^A]]],v^=t[t[v]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:a}})();function Bt(t){this._key=vh(t),this._reset()}Bt.blockSize=16;Bt.keySize=256/8;Bt.prototype.blockSize=Bt.blockSize;Bt.prototype.keySize=Bt.keySize;Bt.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=(r+1)*4,i=[],a=0;a<e;a++)i[a]=t[a];for(a=e;a<n;a++){var f=i[a-1];a%e===0?(f=f<<8|f>>>24,f=Xe.SBOX[f>>>24]<<24|Xe.SBOX[f>>>16&255]<<16|Xe.SBOX[f>>>8&255]<<8|Xe.SBOX[f&255],f^=L5[a/e|0]<<24):e>6&&a%e===4&&(f=Xe.SBOX[f>>>24]<<24|Xe.SBOX[f>>>16&255]<<16|Xe.SBOX[f>>>8&255]<<8|Xe.SBOX[f&255]),i[a]=i[a-e]^f}for(var v=[],m=0;m<n;m++){var E=n-m,A=i[E-(m%4?0:4)];m<4||E<=4?v[m]=A:v[m]=Xe.INV_SUB_MIX[0][Xe.SBOX[A>>>24]]^Xe.INV_SUB_MIX[1][Xe.SBOX[A>>>16&255]]^Xe.INV_SUB_MIX[2][Xe.SBOX[A>>>8&255]]^Xe.INV_SUB_MIX[3][Xe.SBOX[A&255]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=v};Bt.prototype.encryptBlockRaw=function(t){return t=vh(t),Sy(t,this._keySchedule,Xe.SUB_MIX,Xe.SBOX,this._nRounds)};Bt.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=Rf.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r};Bt.prototype.decryptBlock=function(t){t=vh(t);var e=t[1];t[1]=t[3],t[3]=e;var r=Sy(t,this._invKeySchedule,Xe.INV_SUB_MIX,Xe.INV_SBOX,this._nRounds),n=Rf.allocUnsafe(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[3],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[1],12),n};Bt.prototype.scrub=function(){ph(this._keySchedule),ph(this._invKeySchedule),ph(this._key)};By.exports.AES=Bt});var qy=R((Vq,Ry)=>{w();var vn=ke().Buffer,F5=vn.alloc(16,0);function j5(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}function Ay(t){var e=vn.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function Ua(t){this.h=t,this.state=vn.alloc(16,0),this.cache=vn.allocUnsafe(0)}Ua.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()};Ua.prototype._multiply=function(){for(var t=j5(this.h),e=[0,0,0,0],r,n,i,a=-1;++a<128;){for(n=(this.state[~~(a/8)]&1<<7-a%8)!==0,n&&(e[0]^=t[0],e[1]^=t[1],e[2]^=t[2],e[3]^=t[3]),i=(t[3]&1)!==0,r=3;r>0;r--)t[r]=t[r]>>>1|(t[r-1]&1)<<31;t[0]=t[0]>>>1,i&&(t[0]=t[0]^225<<24)}this.state=Ay(e)};Ua.prototype.update=function(t){this.cache=vn.concat([this.cache,t]);for(var e;this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)};Ua.prototype.final=function(t,e){return this.cache.length&&this.ghash(vn.concat([this.cache,F5],16)),this.ghash(Ay([0,t,0,e])),this.state};Ry.exports=Ua});var yh=R((Zq,Ty)=>{w();var H5=Da(),yt=ke().Buffer,Iy=mr(),K5=J(),ky=qy(),W5=pn(),z5=uh();function G5(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i<n;++i)r+=t[i]^e[i];return r}function V5(t,e,r){if(e.length===12)return t._finID=yt.concat([e,yt.from([0,0,0,1])]),yt.concat([e,yt.from([0,0,0,2])]);var n=new ky(r),i=e.length,a=i%16;n.update(e),a&&(a=16-a,n.update(yt.alloc(a,0))),n.update(yt.alloc(8,0));var f=i*8,v=yt.alloc(8);v.writeUIntBE(f,0,8),n.update(v),t._finID=n.state;var m=yt.from(t._finID);return z5(m),m}function Ii(t,e,r,n){Iy.call(this);var i=yt.alloc(4,0);this._cipher=new H5.AES(e);var a=this._cipher.encryptBlock(i);this._ghash=new ky(a),r=V5(this,r,a),this._prev=yt.from(r),this._cache=yt.allocUnsafe(0),this._secCache=yt.allocUnsafe(0),this._decrypt=n,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}K5(Ii,Iy);Ii.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=yt.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r};Ii.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=W5(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&G5(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()};Ii.prototype.getAuthTag=function(){if(this._decrypt||!yt.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag};Ii.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e};Ii.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length};Ty.exports=Ii});var mh=R((Xq,Oy)=>{w();var $5=Da(),gh=ke().Buffer,Cy=mr(),Z5=J();function qf(t,e,r,n){Cy.call(this),this._cipher=new $5.AES(e),this._prev=gh.from(r),this._cache=gh.allocUnsafe(0),this._secCache=gh.allocUnsafe(0),this._decrypt=n,this._mode=t}Z5(qf,Cy);qf.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)};qf.prototype._final=function(){this._cipher.scrub()};Oy.exports=qf});var Na=R((Qq,Py)=>{w();var ki=ke().Buffer,Y5=Yo();function X5(t,e,r,n){if(ki.isBuffer(t)||(t=ki.from(t,"binary")),e&&(ki.isBuffer(e)||(e=ki.from(e,"binary")),e.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var i=r/8,a=ki.alloc(i),f=ki.alloc(n||0),v=ki.alloc(0);i>0||n>0;){var m=new Y5;m.update(v),m.update(t),e&&m.update(e),v=m.digest();var E=0;if(i>0){var A=a.length-i;E=Math.min(i,v.length),v.copy(a,A,0,E),i-=E}if(E<v.length&&n>0){var q=f.length-n,I=Math.min(n,v.length-E);v.copy(f,q,E,E+I),n-=I}}return v.fill(0),{key:a,iv:f}}Py.exports=X5});var Ly=R(bh=>{w();var Dy=Af(),J5=yh(),wr=ke().Buffer,Q5=mh(),Uy=mr(),eM=Da(),tM=Na(),rM=J();function La(t,e,r){Uy.call(this),this._cache=new If,this._cipher=new eM.AES(e),this._prev=wr.from(r),this._mode=t,this._autopadding=!0}rM(La,Uy);La.prototype._update=function(t){this._cache.add(t);for(var e,r,n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return wr.concat(n)};var iM=wr.alloc(16,16);La.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(iM))throw this._cipher.scrub(),new Error("data not multiple of block length")};La.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function If(){this.cache=wr.allocUnsafe(0)}If.prototype.add=function(t){this.cache=wr.concat([this.cache,t])};If.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null};If.prototype.flush=function(){for(var t=16-this.cache.length,e=wr.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return wr.concat([this.cache,e])};function Ny(t,e,r){var n=Dy[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if(typeof e=="string"&&(e=wr.from(e)),e.length!==n.key/8)throw new TypeError("invalid key length "+e.length);if(typeof r=="string"&&(r=wr.from(r)),n.mode!=="GCM"&&r.length!==n.iv)throw new TypeError("invalid iv length "+r.length);return n.type==="stream"?new Q5(n.module,e,r):n.type==="auth"?new J5(n.module,e,r):new La(n.module,e,r)}function nM(t,e){var r=Dy[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=tM(e,!1,r.key,r.iv);return Ny(t,n.key,n.iv)}bh.createCipheriv=Ny;bh.createCipher=nM});var Ky=R(wh=>{w();var aM=yh(),yn=ke().Buffer,Fy=Af(),oM=mh(),jy=mr(),fM=Da(),sM=Na(),uM=J();function Fa(t,e,r){jy.call(this),this._cache=new kf,this._last=void 0,this._cipher=new fM.AES(e),this._prev=yn.from(r),this._mode=t,this._autopadding=!0}uM(Fa,jy);Fa.prototype._update=function(t){this._cache.add(t);for(var e,r,n=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),n.push(r);return yn.concat(n)};Fa.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return hM(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")};Fa.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function kf(){this.cache=yn.allocUnsafe(0)}kf.prototype.add=function(t){this.cache=yn.concat([this.cache,t])};kf.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null};kf.prototype.flush=function(){if(this.cache.length)return this.cache};function hM(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");for(var r=-1;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(e!==16)return t.slice(0,16-e)}function Hy(t,e,r){var n=Fy[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if(typeof r=="string"&&(r=yn.from(r)),n.mode!=="GCM"&&r.length!==n.iv)throw new TypeError("invalid iv length "+r.length);if(typeof e=="string"&&(e=yn.from(e)),e.length!==n.key/8)throw new TypeError("invalid key length "+e.length);return n.type==="stream"?new oM(n.module,e,r,!0):n.type==="auth"?new aM(n.module,e,r,!0):new Fa(n.module,e,r)}function lM(t,e){var r=Fy[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=sM(e,!1,r.key,r.iv);return Hy(t,n.key,n.iv)}wh.createDecipher=lM;wh.createDecipheriv=Hy});var Tf=R(Pt=>{w();var Wy=Ly(),zy=Ky(),cM=ch();function dM(){return Object.keys(cM)}Pt.createCipher=Pt.Cipher=Wy.createCipher;Pt.createCipheriv=Pt.Cipheriv=Wy.createCipheriv;Pt.createDecipher=Pt.Decipher=zy.createDecipher;Pt.createDecipheriv=Pt.Decipheriv=zy.createDecipheriv;Pt.listCiphers=Pt.getCiphers=dM});var Gy=R(_r=>{w();_r["des-ecb"]={key:8,iv:0};_r["des-cbc"]=_r.des={key:8,iv:8};_r["des-ede3-cbc"]=_r.des3={key:24,iv:8};_r["des-ede3"]={key:24,iv:0};_r["des-ede-cbc"]={key:16,iv:8};_r["des-ede"]={key:16,iv:0}});var Xy=R(Dt=>{w();var Vy=fy(),_h=Tf(),Lr=Af(),xr=Gy(),$y=Na();function pM(t,e){t=t.toLowerCase();var r,n;if(Lr[t])r=Lr[t].key,n=Lr[t].iv;else if(xr[t])r=xr[t].key*8,n=xr[t].iv;else throw new TypeError("invalid suite type");var i=$y(e,!1,r,n);return Zy(t,i.key,i.iv)}function vM(t,e){t=t.toLowerCase();var r,n;if(Lr[t])r=Lr[t].key,n=Lr[t].iv;else if(xr[t])r=xr[t].key*8,n=xr[t].iv;else throw new TypeError("invalid suite type");var i=$y(e,!1,r,n);return Yy(t,i.key,i.iv)}function Zy(t,e,r){if(t=t.toLowerCase(),Lr[t])return _h.createCipheriv(t,e,r);if(xr[t])return new Vy({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function Yy(t,e,r){if(t=t.toLowerCase(),Lr[t])return _h.createDecipheriv(t,e,r);if(xr[t])return new Vy({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}function yM(){return Object.keys(xr).concat(_h.getCiphers())}Dt.createCipher=Dt.Cipher=pM;Dt.createCipheriv=Dt.Cipheriv=Zy;Dt.createDecipher=Dt.Decipher=vM;Dt.createDecipheriv=Dt.Decipheriv=Yy;Dt.listCiphers=Dt.getCiphers=yM});var Jy=R((lI,Eh)=>{w();var xh;Eh.exports=function(e){return xh||(xh=new Fr(null)),xh.generate(e)};function Fr(t){this.rand=t}Eh.exports.Rand=Fr;Fr.prototype.generate=function(e){return this._rand(e)};Fr.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var r=new Uint8Array(e),n=0;n<r.length;n++)r[n]=this.rand.getByte();return r};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?Fr.prototype._rand=function(e){var r=new Uint8Array(e);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?Fr.prototype._rand=function(e){var r=new Uint8Array(e);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(Fr.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(Mh=ja(),typeof Mh.randomBytes!="function")throw new Error("Not supported");Fr.prototype._rand=function(e){return Mh.randomBytes(e)}}catch{}var Mh});var Sh=R((dI,Qy)=>{w();var Ti=lr(),gM=Jy();function Ci(t){this.rand=t||new gM.Rand}Qy.exports=Ci;Ci.create=function(e){return new Ci(e)};Ci.prototype._randbelow=function(e){var r=e.bitLength(),n=Math.ceil(r/8);do var i=new Ti(this.rand.generate(n));while(i.cmp(e)>=0);return i};Ci.prototype._randrange=function(e,r){var n=r.sub(e);return e.add(this._randbelow(n))};Ci.prototype.test=function(e,r,n){var i=e.bitLength(),a=Ti.mont(e),f=new Ti(1).toRed(a);r||(r=Math.max(1,i/48|0));for(var v=e.subn(1),m=0;!v.testn(m);m++);for(var E=e.shrn(m),A=v.toRed(a),q=!0;r>0;r--){var I=this._randrange(new Ti(2),v);n&&n(I);var C=I.toRed(a).redPow(E);if(!(C.cmp(f)===0||C.cmp(A)===0)){for(var j=1;j<m;j++){if(C=C.redSqr(),C.cmp(f)===0)return!1;if(C.cmp(A)===0)break}if(j===m)return!1}}return q};Ci.prototype.getDivisor=function(e,r){var n=e.bitLength(),i=Ti.mont(e),a=new Ti(1).toRed(i);r||(r=Math.max(1,n/48|0));for(var f=e.subn(1),v=0;!f.testn(v);v++);for(var m=e.shrn(v),E=f.toRed(i);r>0;r--){var A=this._randrange(new Ti(2),f),q=e.gcd(A);if(q.cmpn(1)!==0)return q;var I=A.toRed(i).redPow(m);if(!(I.cmp(a)===0||I.cmp(E)===0)){for(var C=1;C<v;C++){if(I=I.redSqr(),I.cmp(a)===0)return I.fromRed().subn(1).gcd(e);if(I.cmp(E)===0)break}if(C===v)return I=I.redSqr(),I.fromRed().subn(1).gcd(e)}}return!1}});var kh=R((bI,rg)=>{w();var mM=ui();rg.exports=Ih;Ih.simpleSieve=Rh;Ih.fermatTest=qh;var at=lr(),bM=new at(24),wM=Sh(),eg=new wM,_M=new at(1),Ah=new at(2),xM=new at(5),vI=new at(16),yI=new at(8),MM=new at(10),EM=new at(3),gI=new at(7),SM=new at(11),tg=new at(4),mI=new at(12),Bh=null;function BM(){if(Bh!==null)return Bh;var t=1048576,e=[];e[0]=2;for(var r=1,n=3;n<t;n+=2){for(var i=Math.ceil(Math.sqrt(n)),a=0;a<r&&e[a]<=i&&n%e[a]!==0;a++);r!==a&&e[a]<=i||(e[r++]=n)}return Bh=e,e}function Rh(t){for(var e=BM(),r=0;r<e.length;r++)if(t.modn(e[r])===0)return t.cmpn(e[r])===0;return!0}function qh(t){var e=at.mont(t);return Ah.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)===0}function Ih(t,e){if(t<16)return e===2||e===5?new at([140,123]):new at([140,39]);e=new at(e);for(var r,n;;){for(r=new at(mM(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(_M),r.testn(1)||r.iadd(Ah),e.cmp(Ah)){if(!e.cmp(xM))for(;r.mod(MM).cmp(EM);)r.iadd(tg)}else for(;r.mod(bM).cmp(SM);)r.iadd(tg);if(n=r.shrn(1),Rh(n)&&Rh(r)&&qh(n)&&qh(r)&&eg.test(n)&&eg.test(r))return r}}});var ig=R((_I,AM)=>{AM.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"}}});var fg=R((xI,og)=>{w();var At=lr(),RM=Sh(),ng=new RM,qM=new At(24),IM=new At(11),kM=new At(10),TM=new At(3),CM=new At(7),ag=kh(),OM=ui();og.exports=Mr;function PM(t,e){return e=e||"utf8",B.Buffer.isBuffer(t)||(t=new B.Buffer(t,e)),this._pub=new At(t),this}function DM(t,e){return e=e||"utf8",B.Buffer.isBuffer(t)||(t=new B.Buffer(t,e)),this._priv=new At(t),this}var Cf={};function UM(t,e){var r=e.toString("hex"),n=[r,t.toString(16)].join("_");if(n in Cf)return Cf[n];var i=0;if(t.isEven()||!ag.simpleSieve||!ag.fermatTest(t)||!ng.test(t))return i+=1,r==="02"||r==="05"?i+=8:i+=4,Cf[n]=i,i;ng.test(t.shrn(1))||(i+=2);var a;switch(r){case"02":t.mod(qM).cmp(IM)&&(i+=8);break;case"05":a=t.mod(kM),a.cmp(TM)&&a.cmp(CM)&&(i+=8);break;default:i+=4}return Cf[n]=i,i}function Mr(t,e,r){this.setGenerator(e),this.__prime=new At(t),this._prime=At.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=PM,this.setPrivateKey=DM):this._primeCode=8}Object.defineProperty(Mr.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=UM(this.__prime,this.__gen)),this._primeCode}});Mr.prototype.generateKeys=function(){return this._priv||(this._priv=new At(OM(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()};Mr.prototype.computeSecret=function(t){t=new At(t),t=t.toRed(this._prime);var e=t.redPow(this._priv).fromRed(),r=new B.Buffer(e.toArray()),n=this.getPrime();if(r.length<n.length){var i=new B.Buffer(n.length-r.length);i.fill(0),r=B.Buffer.concat([i,r])}return r};Mr.prototype.getPublicKey=function(e){return Of(this._pub,e)};Mr.prototype.getPrivateKey=function(e){return Of(this._priv,e)};Mr.prototype.getPrime=function(t){return Of(this.__prime,t)};Mr.prototype.getGenerator=function(t){return Of(this._gen,t)};Mr.prototype.setGenerator=function(t,e){return e=e||"utf8",B.Buffer.isBuffer(t)||(t=new B.Buffer(t,e)),this.__gen=t,this._gen=new At(t),this};function Of(t,e){var r=new B.Buffer(t.toArray());return e?r.toString(e):r}});var hg=R(gn=>{w();var NM=kh(),sg=ig(),Th=fg();function LM(t){var e=new B.Buffer(sg[t].prime,"hex"),r=new B.Buffer(sg[t].gen,"hex");return new Th(e,r)}var FM={binary:!0,hex:!0,base64:!0};function ug(t,e,r,n){return B.Buffer.isBuffer(e)||FM[e]===void 0?ug(t,"binary",e,r):(e=e||"binary",n=n||"binary",r=r||new B.Buffer([2]),B.Buffer.isBuffer(r)||(r=new B.Buffer(r,n)),typeof t=="number"?new Th(NM(t,r),r,!0):(B.Buffer.isBuffer(t)||(t=new B.Buffer(t,e)),new Th(t,r,!0)))}gn.DiffieHellmanGroup=gn.createDiffieHellmanGroup=gn.getDiffieHellman=LM;gn.createDiffieHellman=gn.DiffieHellman=ug});var lg=R((exports,module)=>{w();var indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0;r<t.length;r++)if(t[r]===e)return r;return-1},Object_keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var r in t)e.push(r);return e},forEach=function(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e(t[r],r,t)},defineProp=(function(){try{return Object.defineProperty({},"_",{}),function(t,e,r){Object.defineProperty(t,e,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch{return function(e,r,n){e[r]=n}}})(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(t){if(!(t instanceof Context))throw new TypeError("needs a 'context' argument.");var e=document.createElement("iframe");e.style||(e.style={}),e.style.display="none",document.body.appendChild(e);var r=e.contentWindow,n=r.eval,i=r.execScript;!n&&i&&(i.call(r,"null"),n=r.eval),forEach(Object_keys(t),function(v){r[v]=t[v]}),forEach(globals,function(v){t[v]&&(r[v]=t[v])});var a=Object_keys(r),f=n.call(r,this.code);return forEach(Object_keys(r),function(v){(v in t||indexOf(a,v)===-1)&&(t[v]=r[v])}),forEach(globals,function(v){v in t||defineProp(t,v,r[v])}),document.body.removeChild(e),f};Script.prototype.runInThisContext=function(){return eval(this.code)};Script.prototype.runInNewContext=function(t){var e=Script.createContext(t),r=this.runInContext(e);return t&&forEach(Object_keys(e),function(n){t[n]=e[n]}),r};forEach(Object_keys(Script.prototype),function(t){exports[t]=Script[t]=function(e){var r=Script(e);return r[t].apply(r,[].slice.call(arguments,1))}});exports.isContext=function(t){return t instanceof Context};exports.createScript=function(t){return exports.Script(t)};exports.createContext=Script.createContext=function(t){var e=new Context;return typeof t=="object"&&forEach(Object_keys(t),function(r){e[r]=t[r]}),e}});var pg=R(dg=>{w();var cg=bn(),jM=J(),HM=dg;HM.define=function(e,r){return new mn(e,r)};function mn(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}mn.prototype._createNamed=function(e){var r;try{r=lg().runInThisContext("(function "+this.name+`(entity) {
|
|
12
12
|
this._initNamed(entity);
|
|
13
|
-
})`)}catch{r=function(n){this._initNamed(n)}}return XM(r,e),r.prototype._initNamed=function(n){e.call(this,n)},new r(this)};wn.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(xg.decoders[e])),this.decoders[e]};wn.prototype.decode=function(e,r,i){return this._getDecoder(r).decode(e,i)};wn.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(xg.encoders[e])),this.encoders[e]};wn.prototype.encode=function(e,r,i){return this._getEncoder(r).encode(e,i)}});var Bg=R(Sg=>{b();var QM=He();function Rt(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}Sg.Reporter=Rt;Rt.prototype.isError=function(e){return e instanceof xn};Rt.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}};Rt.prototype.restore=function(e){var r=this._reporterState;r.obj=e.obj,r.path=r.path.slice(0,e.pathLen)};Rt.prototype.enterKey=function(e){return this._reporterState.path.push(e)};Rt.prototype.exitKey=function(e){var r=this._reporterState;r.path=r.path.slice(0,e-1)};Rt.prototype.leaveKey=function(e,r,i){var n=this._reporterState;this.exitKey(e),n.obj!==null&&(n.obj[r]=i)};Rt.prototype.path=function(){return this._reporterState.path.join("/")};Rt.prototype.enterObject=function(){var e=this._reporterState,r=e.obj;return e.obj={},r};Rt.prototype.leaveObject=function(e){var r=this._reporterState,i=r.obj;return r.obj=e,i};Rt.prototype.error=function(e){var r,i=this._reporterState,n=e instanceof xn;if(n?r=e:r=new xn(i.path.map(function(a){return"["+JSON.stringify(a)+"]"}).join(""),e.message||e,e.stack),!i.options.partial)throw r;return n||i.errors.push(r),r};Rt.prototype.wrapResult=function(e){var r=this._reporterState;return r.options.partial?{result:this.isError(e)?null:e,errors:r.errors}:e};function xn(t,e){this.path=t,this.rethrow(e)}QM(xn,Error);xn.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,xn),!this.stack)try{throw new Error(this.message)}catch(r){this.stack=r.stack}return this}});var Hh=R(jh=>{b();var eE=He(),Nf=Mn().Reporter,Wa=ft().Buffer;function er(t,e){if(Nf.call(this,e),!Wa.isBuffer(t)){this.error("Input not Buffer");return}this.base=t,this.offset=0,this.length=t.length}eE(er,Nf);jh.DecoderBuffer=er;er.prototype.save=function(){return{offset:this.offset,reporter:Nf.prototype.save.call(this)}};er.prototype.restore=function(e){var r=new er(this.base);return r.offset=e.offset,r.length=this.offset,this.offset=e.offset,Nf.prototype.restore.call(this,e.reporter),r};er.prototype.isEmpty=function(){return this.offset===this.length};er.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")};er.prototype.skip=function(e,r){if(!(this.offset+e<=this.length))return this.error(r||"DecoderBuffer overrun");var i=new er(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+e,this.offset+=e,i};er.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)};function Uf(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(r){return r instanceof Uf||(r=new Uf(r,e)),this.length+=r.length,r},this);else if(typeof t=="number"){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if(typeof t=="string")this.value=t,this.length=Wa.byteLength(t);else if(Wa.isBuffer(t))this.value=t,this.length=t.length;else return e.error("Unsupported type: "+typeof t)}jh.EncoderBuffer=Uf;Uf.prototype.join=function(e,r){return e||(e=new Wa(this.length)),r||(r=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(i){i.join(e,r),r+=i.length}):(typeof this.value=="number"?e[r]=this.value:typeof this.value=="string"?e.write(this.value,r):Wa.isBuffer(this.value)&&this.value.copy(e,r),r+=this.length)),e}});var qg=R((QI,Rg)=>{b();var tE=Mn().Reporter,rE=Mn().EncoderBuffer,iE=Mn().DecoderBuffer,pt=Ot(),Ag=["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"],nE=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(Ag),aE=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function je(t,e){var r={};this._baseState=r,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}Rg.exports=je;var oE=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];je.prototype.clone=function(){var e=this._baseState,r={};oE.forEach(function(n){r[n]=e[n]});var i=new this.constructor(r.parent);return i._baseState=r,i};je.prototype._wrap=function(){var e=this._baseState;nE.forEach(function(r){this[r]=function(){var n=new this.constructor(this);return e.children.push(n),n[r].apply(n,arguments)}},this)};je.prototype._init=function(e){var r=this._baseState;pt(r.parent===null),e.call(this),r.children=r.children.filter(function(i){return i._baseState.parent===this},this),pt.equal(r.children.length,1,"Root node can have only one child")};je.prototype._useArgs=function(e){var r=this._baseState,i=e.filter(function(n){return n instanceof this.constructor},this);e=e.filter(function(n){return!(n instanceof this.constructor)},this),i.length!==0&&(pt(r.children===null),r.children=i,i.forEach(function(n){n._baseState.parent=this},this)),e.length!==0&&(pt(r.args===null),r.args=e,r.reverseArgs=e.map(function(n){if(typeof n!="object"||n.constructor!==Object)return n;var a={};return Object.keys(n).forEach(function(f){f==(f|0)&&(f|=0);var v=n[f];a[v]=f}),a}))};aE.forEach(function(t){je.prototype[t]=function(){var r=this._baseState;throw new Error(t+" not implemented for encoding: "+r.enc)}});Ag.forEach(function(t){je.prototype[t]=function(){var r=this._baseState,i=Array.prototype.slice.call(arguments);return pt(r.tag===null),r.tag=t,this._useArgs(i),this}});je.prototype.use=function(e){pt(e);var r=this._baseState;return pt(r.use===null),r.use=e,this};je.prototype.optional=function(){var e=this._baseState;return e.optional=!0,this};je.prototype.def=function(e){var r=this._baseState;return pt(r.default===null),r.default=e,r.optional=!0,this};je.prototype.explicit=function(e){var r=this._baseState;return pt(r.explicit===null&&r.implicit===null),r.explicit=e,this};je.prototype.implicit=function(e){var r=this._baseState;return pt(r.explicit===null&&r.implicit===null),r.implicit=e,this};je.prototype.obj=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return e.obj=!0,r.length!==0&&this._useArgs(r),this};je.prototype.key=function(e){var r=this._baseState;return pt(r.key===null),r.key=e,this};je.prototype.any=function(){var e=this._baseState;return e.any=!0,this};je.prototype.choice=function(e){var r=this._baseState;return pt(r.choice===null),r.choice=e,this._useArgs(Object.keys(e).map(function(i){return e[i]})),this};je.prototype.contains=function(e){var r=this._baseState;return pt(r.use===null),r.contains=e,this};je.prototype._decode=function(e,r){var i=this._baseState;if(i.parent===null)return e.wrapResult(i.children[0]._decode(e,r));var n=i.default,a=!0,f=null;if(i.key!==null&&(f=e.enterKey(i.key)),i.optional){var v=null;if(i.explicit!==null?v=i.explicit:i.implicit!==null?v=i.implicit:i.tag!==null&&(v=i.tag),v===null&&!i.any){var m=e.save();try{i.choice===null?this._decodeGeneric(i.tag,e,r):this._decodeChoice(e,r),a=!0}catch{a=!1}e.restore(m)}else if(a=this._peekTag(e,v,i.any),e.isError(a))return a}var E;if(i.obj&&a&&(E=e.enterObject()),a){if(i.explicit!==null){var A=this._decodeTag(e,i.explicit);if(e.isError(A))return A;e=A}var q=e.offset;if(i.use===null&&i.choice===null){if(i.any)var m=e.save();var I=this._decodeTag(e,i.implicit!==null?i.implicit:i.tag,i.any);if(e.isError(I))return I;i.any?n=e.raw(m):e=I}if(r&&r.track&&i.tag!==null&&r.track(e.path(),q,e.length,"tagged"),r&&r.track&&i.tag!==null&&r.track(e.path(),e.offset,e.length,"content"),i.any?n=n:i.choice===null?n=this._decodeGeneric(i.tag,e,r):n=this._decodeChoice(e,r),e.isError(n))return n;if(!i.any&&i.choice===null&&i.children!==null&&i.children.forEach(function(V){V._decode(e,r)}),i.contains&&(i.tag==="octstr"||i.tag==="bitstr")){var C=new iE(n);n=this._getUse(i.contains,e._reporterState.obj)._decode(C,r)}}return i.obj&&a&&(n=e.leaveObject(E)),i.key!==null&&(n!==null||a===!0)?e.leaveKey(f,i.key,n):f!==null&&e.exitKey(f),n};je.prototype._decodeGeneric=function(e,r,i){var n=this._baseState;return e==="seq"||e==="set"?null:e==="seqof"||e==="setof"?this._decodeList(r,e,n.args[0],i):/str$/.test(e)?this._decodeStr(r,e,i):e==="objid"&&n.args?this._decodeObjid(r,n.args[0],n.args[1],i):e==="objid"?this._decodeObjid(r,null,null,i):e==="gentime"||e==="utctime"?this._decodeTime(r,e,i):e==="null_"?this._decodeNull(r,i):e==="bool"?this._decodeBool(r,i):e==="objDesc"?this._decodeStr(r,e,i):e==="int"||e==="enum"?this._decodeInt(r,n.args&&n.args[0],i):n.use!==null?this._getUse(n.use,r._reporterState.obj)._decode(r,i):r.error("unknown tag: "+e)};je.prototype._getUse=function(e,r){var i=this._baseState;return i.useDecoder=this._use(e,r),pt(i.useDecoder._baseState.parent===null),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder};je.prototype._decodeChoice=function(e,r){var i=this._baseState,n=null,a=!1;return Object.keys(i.choice).some(function(f){var v=e.save(),m=i.choice[f];try{var E=m._decode(e,r);if(e.isError(E))return!1;n={type:f,value:E},a=!0}catch{return e.restore(v),!1}return!0},this),a?n:e.error("Choice not matched")};je.prototype._createEncoderBuffer=function(e){return new rE(e,this.reporter)};je.prototype._encode=function(e,r,i){var n=this._baseState;if(!(n.default!==null&&n.default===e)){var a=this._encodeValue(e,r,i);if(a!==void 0&&!this._skipDefault(a,r,i))return a}};je.prototype._encodeValue=function(e,r,i){var n=this._baseState;if(n.parent===null)return n.children[0]._encode(e,r||new tE);var m=null;if(this.reporter=r,n.optional&&e===void 0)if(n.default!==null)e=n.default;else return;var a=null,f=!1;if(n.any)m=this._createEncoderBuffer(e);else if(n.choice)m=this._encodeChoice(e,r);else if(n.contains)a=this._getUse(n.contains,i)._encode(e,r),f=!0;else if(n.children)a=n.children.map(function(q){if(q._baseState.tag==="null_")return q._encode(null,r,e);if(q._baseState.key===null)return r.error("Child should have a key");var I=r.enterKey(q._baseState.key);if(typeof e!="object")return r.error("Child expected, but input is not object");var C=q._encode(e[q._baseState.key],r,e);return r.leaveKey(I),C},this).filter(function(q){return q}),a=this._createEncoderBuffer(a);else if(n.tag==="seqof"||n.tag==="setof"){if(!(n.args&&n.args.length===1))return r.error("Too many args for : "+n.tag);if(!Array.isArray(e))return r.error("seqof/setof, but data is not Array");var v=this.clone();v._baseState.implicit=null,a=this._createEncoderBuffer(e.map(function(q){var I=this._baseState;return this._getUse(I.args[0],e)._encode(q,r)},v))}else n.use!==null?m=this._getUse(n.use,i)._encode(e,r):(a=this._encodePrimitive(n.tag,e),f=!0);var m;if(!n.any&&n.choice===null){var E=n.implicit!==null?n.implicit:n.tag,A=n.implicit===null?"universal":"context";E===null?n.use===null&&r.error("Tag could be omitted only for .use()"):n.use===null&&(m=this._encodeComposite(E,f,A,a))}return n.explicit!==null&&(m=this._encodeComposite(n.explicit,!1,"context",m)),m};je.prototype._encodeChoice=function(e,r){var i=this._baseState,n=i.choice[e.type];return n||pt(!1,e.type+" not found in "+JSON.stringify(Object.keys(i.choice))),n._encode(e.value,r)};je.prototype._encodePrimitive=function(e,r){var i=this._baseState;if(/str$/.test(e))return this._encodeStr(r,e);if(e==="objid"&&i.args)return this._encodeObjid(r,i.reverseArgs[0],i.args[1]);if(e==="objid")return this._encodeObjid(r,null,null);if(e==="gentime"||e==="utctime")return this._encodeTime(r,e);if(e==="null_")return this._encodeNull();if(e==="int"||e==="enum")return this._encodeInt(r,i.args&&i.reverseArgs[0]);if(e==="bool")return this._encodeBool(r);if(e==="objDesc")return this._encodeStr(r,e);throw new Error("Unsupported tag: "+e)};je.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)};je.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}});var Mn=R(Ig=>{b();var Lf=Ig;Lf.Reporter=Bg().Reporter;Lf.DecoderBuffer=Hh().DecoderBuffer;Lf.EncoderBuffer=Hh().EncoderBuffer;Lf.Node=qg()});var Tg=R(Di=>{b();var kg=Kh();Di.tagClass={0:"universal",1:"application",2:"context",3:"private"};Di.tagClassByName=kg._reverse(Di.tagClass);Di.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"};Di.tagByName=kg._reverse(Di.tag)});var Kh=R(Og=>{b();var Cg=Og;Cg._reverse=function(e){var r={};return Object.keys(e).forEach(function(i){(i|0)==i&&(i=i|0);var n=e[i];r[n]=i}),r};Cg.der=Tg()});var Gh=R((fk,Ng)=>{b();var fE=He(),Wh=_n(),Ff=Wh.base,sE=Wh.bignum,Pg=Wh.constants.der;function Dg(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new bt,this.tree._init(t.body)}Ng.exports=Dg;Dg.prototype.decode=function(e,r){return e instanceof Ff.DecoderBuffer||(e=new Ff.DecoderBuffer(e,r)),this.tree._decode(e,r)};function bt(t){Ff.Node.call(this,"der",t)}fE(bt,Ff.Node);bt.prototype._peekTag=function(e,r,i){if(e.isEmpty())return!1;var n=e.save(),a=zh(e,'Failed to peek tag: "'+r+'"');return e.isError(a)?a:(e.restore(n),a.tag===r||a.tagStr===r||a.tagStr+"of"===r||i)};bt.prototype._decodeTag=function(e,r,i){var n=zh(e,'Failed to decode tag of "'+r+'"');if(e.isError(n))return n;var a=Ug(e,n.primitive,'Failed to get length of "'+r+'"');if(e.isError(a))return a;if(!i&&n.tag!==r&&n.tagStr!==r&&n.tagStr+"of"!==r)return e.error('Failed to match tag: "'+r+'"');if(n.primitive||a!==null)return e.skip(a,'Failed to match body of: "'+r+'"');var f=e.save(),v=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(v)?v:(a=e.offset-f.offset,e.restore(f),e.skip(a,'Failed to match body of: "'+r+'"'))};bt.prototype._skipUntilEnd=function(e,r){for(;;){var i=zh(e,r);if(e.isError(i))return i;var n=Ug(e,i.primitive,r);if(e.isError(n))return n;var a;if(i.primitive||n!==null?a=e.skip(n):a=this._skipUntilEnd(e,r),e.isError(a))return a;if(i.tagStr==="end")break}};bt.prototype._decodeList=function(e,r,i,n){for(var a=[];!e.isEmpty();){var f=this._peekTag(e,"end");if(e.isError(f))return f;var v=i.decode(e,"der",n);if(e.isError(v)&&f)break;a.push(v)}return a};bt.prototype._decodeStr=function(e,r){if(r==="bitstr"){var i=e.readUInt8();return e.isError(i)?i:{unused:i,data:e.raw()}}else if(r==="bmpstr"){var n=e.raw();if(n.length%2===1)return e.error("Decoding of string type: bmpstr length mismatch");for(var a="",f=0;f<n.length/2;f++)a+=String.fromCharCode(n.readUInt16BE(f*2));return a}else if(r==="numstr"){var v=e.raw().toString("ascii");return this._isNumstr(v)?v:e.error("Decoding of string type: numstr unsupported characters")}else{if(r==="octstr")return e.raw();if(r==="objDesc")return e.raw();if(r==="printstr"){var m=e.raw().toString("ascii");return this._isPrintstr(m)?m:e.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(r)?e.raw().toString():e.error("Decoding of string type: "+r+" unsupported")}};bt.prototype._decodeObjid=function(e,r,i){for(var n,a=[],f=0;!e.isEmpty();){var v=e.readUInt8();f<<=7,f|=v&127,(v&128)===0&&(a.push(f),f=0)}v&128&&a.push(f);var m=a[0]/40|0,E=a[0]%40;if(i?n=a:n=[m,E].concat(a.slice(1)),r){var A=r[n.join(" ")];A===void 0&&(A=r[n.join(".")]),A!==void 0&&(n=A)}return n};bt.prototype._decodeTime=function(e,r){var i=e.raw().toString();if(r==="gentime")var n=i.slice(0,4)|0,a=i.slice(4,6)|0,f=i.slice(6,8)|0,v=i.slice(8,10)|0,m=i.slice(10,12)|0,E=i.slice(12,14)|0;else if(r==="utctime"){var n=i.slice(0,2)|0,a=i.slice(2,4)|0,f=i.slice(4,6)|0,v=i.slice(6,8)|0,m=i.slice(8,10)|0,E=i.slice(10,12)|0;n<70?n=2e3+n:n=1900+n}else return e.error("Decoding "+r+" time is not supported yet");return Date.UTC(n,a-1,f,v,m,E,0)};bt.prototype._decodeNull=function(e){return null};bt.prototype._decodeBool=function(e){var r=e.readUInt8();return e.isError(r)?r:r!==0};bt.prototype._decodeInt=function(e,r){var i=e.raw(),n=new sE(i);return r&&(n=r[n.toString(10)]||n),n};bt.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getDecoder("der").tree};function zh(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var i=Pg.tagClass[r>>6],n=(r&32)===0;if((r&31)===31){var a=r;for(r=0;(a&128)===128;){if(a=t.readUInt8(e),t.isError(a))return a;r<<=7,r|=a&127}}else r&=31;var f=Pg.tag[r];return{cls:i,primitive:n,tag:r,tagStr:f}}function Ug(t,e,r){var i=t.readUInt8(r);if(t.isError(i))return i;if(!e&&i===128)return null;if((i&128)===0)return i;var n=i&127;if(n>4)return t.error("length octect is too long");i=0;for(var a=0;a<n;a++){i<<=8;var f=t.readUInt8(r);if(t.isError(f))return f;i|=f}return i}});var Fg=R((uk,Lg)=>{b();var uE=He(),hE=ft().Buffer,Vh=Gh();function $h(t){Vh.call(this,t),this.enc="pem"}uE($h,Vh);Lg.exports=$h;$h.prototype.decode=function(e,r){for(var i=e.toString().split(/[\r\n]+/g),n=r.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,f=-1,v=-1,m=0;m<i.length;m++){var E=i[m].match(a);if(E!==null&&E[2]===n)if(f===-1){if(E[1]!=="BEGIN")break;f=m}else{if(E[1]!=="END")break;v=m;break}}if(f===-1||v===-1)throw new Error("PEM section not found for: "+n);var A=i.slice(f+1,v).join("");A.replace(/[^a-z0-9\+\/=]+/gi,"");var q=new hE(A,"base64");return Vh.prototype.decode.call(this,q,r)}});var Kg=R(Hg=>{b();var jg=Hg;jg.der=Gh();jg.pem=Fg()});var Yh=R((dk,Vg)=>{b();var lE=He(),Er=ft().Buffer,Wg=_n(),zg=Wg.base,Zh=Wg.constants.der;function Gg(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new Ut,this.tree._init(t.body)}Vg.exports=Gg;Gg.prototype.encode=function(e,r){return this.tree._encode(e,r).join()};function Ut(t){zg.Node.call(this,"der",t)}lE(Ut,zg.Node);Ut.prototype._encodeComposite=function(e,r,i,n){var a=cE(e,r,i,this.reporter);if(n.length<128){var m=new Er(2);return m[0]=a,m[1]=n.length,this._createEncoderBuffer([m,n])}for(var f=1,v=n.length;v>=256;v>>=8)f++;var m=new Er(2+f);m[0]=a,m[1]=128|f;for(var v=1+f,E=n.length;E>0;v--,E>>=8)m[v]=E&255;return this._createEncoderBuffer([m,n])};Ut.prototype._encodeStr=function(e,r){if(r==="bitstr")return this._createEncoderBuffer([e.unused|0,e.data]);if(r==="bmpstr"){for(var i=new Er(e.length*2),n=0;n<e.length;n++)i.writeUInt16BE(e.charCodeAt(n),n*2);return this._createEncoderBuffer(i)}else return r==="numstr"?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):r==="printstr"?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(r)?this._createEncoderBuffer(e):r==="objDesc"?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+r+" unsupported")};Ut.prototype._encodeObjid=function(e,r,i){if(typeof e=="string"){if(!r)return this.reporter.error("string objid given, but no values map found");if(!r.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=r[e].split(/[\s\.]+/g);for(var n=0;n<e.length;n++)e[n]|=0}else if(Array.isArray(e)){e=e.slice();for(var n=0;n<e.length;n++)e[n]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!i){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,e[0]*40+e[1])}for(var a=0,n=0;n<e.length;n++){var f=e[n];for(a++;f>=128;f>>=7)a++}for(var v=new Er(a),m=v.length-1,n=e.length-1;n>=0;n--){var f=e[n];for(v[m--]=f&127;(f>>=7)>0;)v[m--]=128|f&127}return this._createEncoderBuffer(v)};function qt(t){return t<10?"0"+t:t}Ut.prototype._encodeTime=function(e,r){var i,n=new Date(e);return r==="gentime"?i=[qt(n.getFullYear()),qt(n.getUTCMonth()+1),qt(n.getUTCDate()),qt(n.getUTCHours()),qt(n.getUTCMinutes()),qt(n.getUTCSeconds()),"Z"].join(""):r==="utctime"?i=[qt(n.getFullYear()%100),qt(n.getUTCMonth()+1),qt(n.getUTCDate()),qt(n.getUTCHours()),qt(n.getUTCMinutes()),qt(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+r+" time is not supported yet"),this._encodeStr(i,"octstr")};Ut.prototype._encodeNull=function(){return this._createEncoderBuffer("")};Ut.prototype._encodeInt=function(e,r){if(typeof e=="string"){if(!r)return this.reporter.error("String int or enum given, but no values map");if(!r.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=r[e]}if(typeof e!="number"&&!Er.isBuffer(e)){var i=e.toArray();!e.sign&&i[0]&128&&i.unshift(0),e=new Er(i)}if(Er.isBuffer(e)){var n=e.length;e.length===0&&n++;var f=new Er(n);return e.copy(f),e.length===0&&(f[0]=0),this._createEncoderBuffer(f)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var n=1,a=e;a>=256;a>>=8)n++;for(var f=new Array(n),a=f.length-1;a>=0;a--)f[a]=e&255,e>>=8;return f[0]&128&&f.unshift(0),this._createEncoderBuffer(new Er(f))};Ut.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)};Ut.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getEncoder("der").tree};Ut.prototype._skipDefault=function(e,r,i){var n=this._baseState,a;if(n.default===null)return!1;var f=e.join();if(n.defaultBuffer===void 0&&(n.defaultBuffer=this._encodeValue(n.default,r,i).join()),f.length!==n.defaultBuffer.length)return!1;for(a=0;a<f.length;a++)if(f[a]!==n.defaultBuffer[a])return!1;return!0};function cE(t,e,r,i){var n;if(t==="seqof"?t="seq":t==="setof"&&(t="set"),Zh.tagByName.hasOwnProperty(t))n=Zh.tagByName[t];else if(typeof t=="number"&&(t|0)===t)n=t;else return i.error("Unknown tag: "+t);return n>=31?i.error("Multi-octet tag encoding unsupported"):(e||(n|=32),n|=Zh.tagClassByName[r||"universal"]<<6,n)}});var Zg=R((vk,$g)=>{b();var dE=He(),Xh=Yh();function Jh(t){Xh.call(this,t),this.enc="pem"}dE(Jh,Xh);$g.exports=Jh;Jh.prototype.encode=function(e,r){for(var i=Xh.prototype.encode.call(this,e),n=i.toString("base64"),a=["-----BEGIN "+r.label+"-----"],f=0;f<n.length;f+=64)a.push(n.slice(f,f+64));return a.push("-----END "+r.label+"-----"),a.join(`
|
|
14
|
-
`)}});var Jg=R(Xg=>{b();var Yg=Xg;Yg.der=Yh();Yg.pem=Zg()});var _n=R(Qg=>{b();var En=Qg;En.bignum=lr();En.define=Eg().define;En.base=Mn();En.constants=Kh();En.decoders=Kg();En.encoders=Jg()});var im=R((_k,rm)=>{"use strict";b();var Nt=_n(),em=Nt.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),pE=Nt.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),Qh=Nt.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),vE=Nt.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(Qh),this.key("subjectPublicKey").bitstr())}),yE=Nt.define("RelativeDistinguishedName",function(){this.setof(pE)}),gE=Nt.define("RDNSequence",function(){this.seqof(yE)}),tm=Nt.define("Name",function(){this.choice({rdnSequence:this.use(gE)})}),mE=Nt.define("Validity",function(){this.seq().obj(this.key("notBefore").use(em),this.key("notAfter").use(em))}),bE=Nt.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),wE=Nt.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(Qh),this.key("issuer").use(tm),this.key("validity").use(mE),this.key("subject").use(tm),this.key("subjectPublicKeyInfo").use(vE),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(bE).optional())}),_E=Nt.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(wE),this.key("signatureAlgorithm").use(Qh),this.key("signatureValue").bitstr())});rm.exports=_E});var am=R(Ft=>{"use strict";b();var Lt=_n();Ft.certificate=im();var xE=Lt.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())});Ft.RSAPrivateKey=xE;var ME=Lt.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});Ft.RSAPublicKey=ME;var nm=Lt.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())}),EE=Lt.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(nm),this.key("subjectPublicKey").bitstr())});Ft.PublicKey=EE;var SE=Lt.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(nm),this.key("subjectPrivateKey").octstr())});Ft.PrivateKey=SE;var BE=Lt.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())});Ft.EncryptedPrivateKey=BE;var AE=Lt.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())});Ft.DSAPrivateKey=AE;Ft.DSAparam=Lt.define("DSAparam",function(){this.int()});var RE=Lt.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),qE=Lt.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(RE),this.key("publicKey").optional().explicit(1).bitstr())});Ft.ECPrivateKey=qE;Ft.signature=Lt.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})});var om=R((Sk,IE)=>{IE.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"}});var sm=R((Bk,fm)=>{"use strict";b();var kE=/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,TE=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,CE=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,OE=Fa(),PE=Of(),jf=Ie().Buffer;fm.exports=function(t,e){var r=t.toString(),i=r.match(kE),n;if(i){var f="aes"+i[1],v=jf.from(i[2],"hex"),m=jf.from(i[3].replace(/[\r\n]/g,""),"base64"),E=OE(e,v.slice(0,8),parseInt(i[1],10)).key,A=[],q=PE.createDecipheriv(f,E,v);A.push(q.update(m)),A.push(q.final()),n=jf.concat(A)}else{var a=r.match(CE);n=jf.from(a[2].replace(/[\r\n]/g,""),"base64")}var I=r.match(TE)[1];return{tag:I,data:n}}});var tl=R((Rk,hm)=>{"use strict";b();var gt=am(),DE=om(),UE=sm(),NE=Of(),LE=lh().pbkdf2Sync,el=Ie().Buffer;function FE(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),n=DE[t.algorithm.decrypt.cipher.algo.join(".")],a=t.algorithm.decrypt.cipher.iv,f=t.subjectPrivateKey,v=parseInt(n.split("-")[1],10)/8,m=LE(e,r,i,v,"sha1"),E=NE.createDecipheriv(n,m,a),A=[];return A.push(E.update(f)),A.push(E.final()),el.concat(A)}function um(t){var e;typeof t=="object"&&!el.isBuffer(t)&&(e=t.passphrase,t=t.key),typeof t=="string"&&(t=el.from(t));var r=UE(t,e),i=r.tag,n=r.data,a,f;switch(i){case"CERTIFICATE":f=gt.certificate.decode(n,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(f||(f=gt.PublicKey.decode(n,"der")),a=f.algorithm.algorithm.join("."),a){case"1.2.840.113549.1.1.1":return gt.RSAPublicKey.decode(f.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return f.subjectPrivateKey=f.subjectPublicKey,{type:"ec",data:f};case"1.2.840.10040.4.1":return f.algorithm.params.pub_key=gt.DSAparam.decode(f.subjectPublicKey.data,"der"),{type:"dsa",data:f.algorithm.params};default:throw new Error("unknown key id "+a)}case"ENCRYPTED PRIVATE KEY":n=gt.EncryptedPrivateKey.decode(n,"der"),n=FE(n,e);case"PRIVATE KEY":switch(f=gt.PrivateKey.decode(n,"der"),a=f.algorithm.algorithm.join("."),a){case"1.2.840.113549.1.1.1":return gt.RSAPrivateKey.decode(f.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:f.algorithm.curve,privateKey:gt.ECPrivateKey.decode(f.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return f.algorithm.params.priv_key=gt.DSAparam.decode(f.subjectPrivateKey,"der"),{type:"dsa",params:f.algorithm.params};default:throw new Error("unknown key id "+a)}case"RSA PUBLIC KEY":return gt.RSAPublicKey.decode(n,"der");case"RSA PRIVATE KEY":return gt.RSAPrivateKey.decode(n,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:gt.DSAPrivateKey.decode(n,"der")};case"EC PRIVATE KEY":return n=gt.ECPrivateKey.decode(n,"der"),{curve:n.parameters.value,privateKey:n.privateKey};default:throw new Error("unknown key type "+i)}}um.signature=gt.signature;hm.exports=um});var il=R((Ik,lm)=>{b();var jE=Ta(),rl=Ie().Buffer;lm.exports=function(t,e){for(var r=rl.alloc(0),i=0,n;r.length<e;)n=HE(i++),r=rl.concat([r,jE("sha1").update(t).update(n).digest()]);return r.slice(0,e)};function HE(t){var e=rl.allocUnsafe(4);return e.writeUInt32BE(t,0),e}});var nl=R((Tk,cm)=>{b();cm.exports=function(e,r){for(var i=e.length,n=-1;++n<i;)e[n]^=r[n];return e}});var al=R((Ok,pm)=>{b();var dm=lr(),KE=Ie().Buffer;function WE(t,e){return KE.from(t.toRed(dm.mont(e.modulus)).redPow(new dm(e.publicExponent)).fromRed().toArray())}pm.exports=WE});var ym=R((vm,ol)=>{b();(function(t,e){"use strict";function r(l,o){if(!l)throw new Error(o||"Assertion failed")}function i(l,o){l.super_=o;var s=function(){};s.prototype=o.prototype,l.prototype=new s,l.prototype.constructor=l}function n(l,o,s){if(n.isBN(l))return l;this.negative=0,this.words=null,this.length=0,this.red=null,l!==null&&((o==="le"||o==="be")&&(s=o,o=10),this._init(l||0,o||10,s||"be"))}typeof t=="object"?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=ft().Buffer}catch{}n.isBN=function(o){return o instanceof n?!0:o!==null&&typeof o=="object"&&o.constructor.wordSize===n.wordSize&&Array.isArray(o.words)},n.max=function(o,s){return o.cmp(s)>0?o:s},n.min=function(o,s){return o.cmp(s)<0?o:s},n.prototype._init=function(o,s,d){if(typeof o=="number")return this._initNumber(o,s,d);if(typeof o=="object")return this._initArray(o,s,d);s==="hex"&&(s=16),r(s===(s|0)&&s>=2&&s<=36),o=o.toString().replace(/\s+/g,"");var g=0;o[0]==="-"&&(g++,this.negative=1),g<o.length&&(s===16?this._parseHex(o,g,d):(this._parseBase(o,s,g),d==="le"&&this._initArray(this.toArray(),s,d)))},n.prototype._initNumber=function(o,s,d){o<0&&(this.negative=1,o=-o),o<67108864?(this.words=[o&67108863],this.length=1):o<4503599627370496?(this.words=[o&67108863,o/67108864&67108863],this.length=2):(r(o<9007199254740992),this.words=[o&67108863,o/67108864&67108863,1],this.length=3),d==="le"&&this._initArray(this.toArray(),s,d)},n.prototype._initArray=function(o,s,d){if(r(typeof o.length=="number"),o.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(o.length/3),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var p,u,w=0;if(d==="be")for(g=o.length-1,p=0;g>=0;g-=3)u=o[g]|o[g-1]<<8|o[g-2]<<16,this.words[p]|=u<<w&67108863,this.words[p+1]=u>>>26-w&67108863,w+=24,w>=26&&(w-=26,p++);else if(d==="le")for(g=0,p=0;g<o.length;g+=3)u=o[g]|o[g+1]<<8|o[g+2]<<16,this.words[p]|=u<<w&67108863,this.words[p+1]=u>>>26-w&67108863,w+=24,w>=26&&(w-=26,p++);return this._strip()};function f(l,o){var s=l.charCodeAt(o);if(s>=48&&s<=57)return s-48;if(s>=65&&s<=70)return s-55;if(s>=97&&s<=102)return s-87;r(!1,"Invalid character in "+l)}function v(l,o,s){var d=f(l,s);return s-1>=o&&(d|=f(l,s-1)<<4),d}n.prototype._parseHex=function(o,s,d){this.length=Math.ceil((o.length-s)/6),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var p=0,u=0,w;if(d==="be")for(g=o.length-1;g>=s;g-=2)w=v(o,s,g)<<p,this.words[u]|=w&67108863,p>=18?(p-=18,u+=1,this.words[u]|=w>>>26):p+=8;else{var _=o.length-s;for(g=_%2===0?s+1:s;g<o.length;g+=2)w=v(o,s,g)<<p,this.words[u]|=w&67108863,p>=18?(p-=18,u+=1,this.words[u]|=w>>>26):p+=8}this._strip()};function m(l,o,s,d){for(var g=0,p=0,u=Math.min(l.length,s),w=o;w<u;w++){var _=l.charCodeAt(w)-48;g*=d,_>=49?p=_-49+10:_>=17?p=_-17+10:p=_,r(_>=0&&p<d,"Invalid character"),g+=p}return g}n.prototype._parseBase=function(o,s,d){this.words=[0],this.length=1;for(var g=0,p=1;p<=67108863;p*=s)g++;g--,p=p/s|0;for(var u=o.length-d,w=u%g,_=Math.min(u,u-w)+d,c=0,x=d;x<_;x+=g)c=m(o,x,x+g,s),this.imuln(p),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(w!==0){var P=1;for(c=m(o,x,o.length,s),x=0;x<w;x++)P*=s;this.imuln(P),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},n.prototype.copy=function(o){o.words=new Array(this.length);for(var s=0;s<this.length;s++)o.words[s]=this.words[s];o.length=this.length,o.negative=this.negative,o.red=this.red};function E(l,o){l.words=o.words,l.length=o.length,l.negative=o.negative,l.red=o.red}if(n.prototype._move=function(o){E(o,this)},n.prototype.clone=function(){var o=new n(null);return this.copy(o),o},n.prototype._expand=function(o){for(;this.length<o;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=A}catch{n.prototype.inspect=A}else n.prototype.inspect=A;function A(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var q=["","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"],I=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],C=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(o,s){o=o||10,s=s|0||1;var d;if(o===16||o==="hex"){d="";for(var g=0,p=0,u=0;u<this.length;u++){var w=this.words[u],_=((w<<g|p)&16777215).toString(16);p=w>>>24-g&16777215,g+=2,g>=26&&(g-=26,u--),p!==0||u!==this.length-1?d=q[6-_.length]+_+d:d=_+d}for(p!==0&&(d=p.toString(16)+d);d.length%s!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}if(o===(o|0)&&o>=2&&o<=36){var c=I[o],x=C[o];d="";var P=this.clone();for(P.negative=0;!P.isZero();){var N=P.modrn(x).toString(o);P=P.idivn(x),P.isZero()?d=N+d:d=q[c-N.length]+N+d}for(this.isZero()&&(d="0"+d);d.length%s!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var o=this.words[0];return this.length===2?o+=this.words[1]*67108864:this.length===3&&this.words[2]===1?o+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-o:o},n.prototype.toJSON=function(){return this.toString(16,2)},a&&(n.prototype.toBuffer=function(o,s){return this.toArrayLike(a,o,s)}),n.prototype.toArray=function(o,s){return this.toArrayLike(Array,o,s)};var j=function(o,s){return o.allocUnsafe?o.allocUnsafe(s):new o(s)};n.prototype.toArrayLike=function(o,s,d){this._strip();var g=this.byteLength(),p=d||Math.max(1,g);r(g<=p,"byte array longer than desired length"),r(p>0,"Requested array length <= 0");var u=j(o,p),w=s==="le"?"LE":"BE";return this["_toArrayLike"+w](u,g),u},n.prototype._toArrayLikeLE=function(o,s){for(var d=0,g=0,p=0,u=0;p<this.length;p++){var w=this.words[p]<<u|g;o[d++]=w&255,d<o.length&&(o[d++]=w>>8&255),d<o.length&&(o[d++]=w>>16&255),u===6?(d<o.length&&(o[d++]=w>>24&255),g=0,u=0):(g=w>>>24,u+=2)}if(d<o.length)for(o[d++]=g;d<o.length;)o[d++]=0},n.prototype._toArrayLikeBE=function(o,s){for(var d=o.length-1,g=0,p=0,u=0;p<this.length;p++){var w=this.words[p]<<u|g;o[d--]=w&255,d>=0&&(o[d--]=w>>8&255),d>=0&&(o[d--]=w>>16&255),u===6?(d>=0&&(o[d--]=w>>24&255),g=0,u=0):(g=w>>>24,u+=2)}if(d>=0)for(o[d--]=g;d>=0;)o[d--]=0},Math.clz32?n.prototype._countBits=function(o){return 32-Math.clz32(o)}:n.prototype._countBits=function(o){var s=o,d=0;return s>=4096&&(d+=13,s>>>=13),s>=64&&(d+=7,s>>>=7),s>=8&&(d+=4,s>>>=4),s>=2&&(d+=2,s>>>=2),d+s},n.prototype._zeroBits=function(o){if(o===0)return 26;var s=o,d=0;return(s&8191)===0&&(d+=13,s>>>=13),(s&127)===0&&(d+=7,s>>>=7),(s&15)===0&&(d+=4,s>>>=4),(s&3)===0&&(d+=2,s>>>=2),(s&1)===0&&d++,d},n.prototype.bitLength=function(){var o=this.words[this.length-1],s=this._countBits(o);return(this.length-1)*26+s};function V(l){for(var o=new Array(l.bitLength()),s=0;s<o.length;s++){var d=s/26|0,g=s%26;o[s]=l.words[d]>>>g&1}return o}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,s=0;s<this.length;s++){var d=this._zeroBits(this.words[s]);if(o+=d,d!==26)break}return o},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(o){return this.negative!==0?this.abs().inotn(o).iaddn(1):this.clone()},n.prototype.fromTwos=function(o){return this.testn(o-1)?this.notn(o).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(o){for(;this.length<o.length;)this.words[this.length++]=0;for(var s=0;s<o.length;s++)this.words[s]=this.words[s]|o.words[s];return this._strip()},n.prototype.ior=function(o){return r((this.negative|o.negative)===0),this.iuor(o)},n.prototype.or=function(o){return this.length>o.length?this.clone().ior(o):o.clone().ior(this)},n.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},n.prototype.iuand=function(o){var s;this.length>o.length?s=o:s=this;for(var d=0;d<s.length;d++)this.words[d]=this.words[d]&o.words[d];return this.length=s.length,this._strip()},n.prototype.iand=function(o){return r((this.negative|o.negative)===0),this.iuand(o)},n.prototype.and=function(o){return this.length>o.length?this.clone().iand(o):o.clone().iand(this)},n.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},n.prototype.iuxor=function(o){var s,d;this.length>o.length?(s=this,d=o):(s=o,d=this);for(var g=0;g<d.length;g++)this.words[g]=s.words[g]^d.words[g];if(this!==s)for(;g<s.length;g++)this.words[g]=s.words[g];return this.length=s.length,this._strip()},n.prototype.ixor=function(o){return r((this.negative|o.negative)===0),this.iuxor(o)},n.prototype.xor=function(o){return this.length>o.length?this.clone().ixor(o):o.clone().ixor(this)},n.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},n.prototype.inotn=function(o){r(typeof o=="number"&&o>=0);var s=Math.ceil(o/26)|0,d=o%26;this._expand(s),d>0&&s--;for(var g=0;g<s;g++)this.words[g]=~this.words[g]&67108863;return d>0&&(this.words[g]=~this.words[g]&67108863>>26-d),this._strip()},n.prototype.notn=function(o){return this.clone().inotn(o)},n.prototype.setn=function(o,s){r(typeof o=="number"&&o>=0);var d=o/26|0,g=o%26;return this._expand(d+1),s?this.words[d]=this.words[d]|1<<g:this.words[d]=this.words[d]&~(1<<g),this._strip()},n.prototype.iadd=function(o){var s;if(this.negative!==0&&o.negative===0)return this.negative=0,s=this.isub(o),this.negative^=1,this._normSign();if(this.negative===0&&o.negative!==0)return o.negative=0,s=this.isub(o),o.negative=1,s._normSign();var d,g;this.length>o.length?(d=this,g=o):(d=o,g=this);for(var p=0,u=0;u<g.length;u++)s=(d.words[u]|0)+(g.words[u]|0)+p,this.words[u]=s&67108863,p=s>>>26;for(;p!==0&&u<d.length;u++)s=(d.words[u]|0)+p,this.words[u]=s&67108863,p=s>>>26;if(this.length=d.length,p!==0)this.words[this.length]=p,this.length++;else if(d!==this)for(;u<d.length;u++)this.words[u]=d.words[u];return this},n.prototype.add=function(o){var s;return o.negative!==0&&this.negative===0?(o.negative=0,s=this.sub(o),o.negative^=1,s):o.negative===0&&this.negative!==0?(this.negative=0,s=o.sub(this),this.negative=1,s):this.length>o.length?this.clone().iadd(o):o.clone().iadd(this)},n.prototype.isub=function(o){if(o.negative!==0){o.negative=0;var s=this.iadd(o);return o.negative=1,s._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var d=this.cmp(o);if(d===0)return this.negative=0,this.length=1,this.words[0]=0,this;var g,p;d>0?(g=this,p=o):(g=o,p=this);for(var u=0,w=0;w<p.length;w++)s=(g.words[w]|0)-(p.words[w]|0)+u,u=s>>26,this.words[w]=s&67108863;for(;u!==0&&w<g.length;w++)s=(g.words[w]|0)+u,u=s>>26,this.words[w]=s&67108863;if(u===0&&w<g.length&&g!==this)for(;w<g.length;w++)this.words[w]=g.words[w];return this.length=Math.max(this.length,w),g!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(o){return this.clone().isub(o)};function X(l,o,s){s.negative=o.negative^l.negative;var d=l.length+o.length|0;s.length=d,d=d-1|0;var g=l.words[0]|0,p=o.words[0]|0,u=g*p,w=u&67108863,_=u/67108864|0;s.words[0]=w;for(var c=1;c<d;c++){for(var x=_>>>26,P=_&67108863,N=Math.min(c,o.length-1),U=Math.max(0,c-l.length+1);U<=N;U++){var W=c-U|0;g=l.words[W]|0,p=o.words[U]|0,u=g*p+P,x+=u/67108864|0,P=u&67108863}s.words[c]=P|0,_=x|0}return _!==0?s.words[c]=_|0:s.length--,s._strip()}var z=function(o,s,d){var g=o.words,p=s.words,u=d.words,w=0,_,c,x,P=g[0]|0,N=P&8191,U=P>>>13,W=g[1]|0,K=W&8191,G=W>>>13,It=g[2]|0,Z=It&8191,Y=It>>>13,On=g[3]|0,J=On&8191,Q=On>>>13,Pn=g[4]|0,ee=Pn&8191,te=Pn>>>13,Dn=g[5]|0,re=Dn&8191,ie=Dn>>>13,Un=g[6]|0,ne=Un&8191,ae=Un>>>13,Nn=g[7]|0,oe=Nn&8191,fe=Nn>>>13,Ln=g[8]|0,se=Ln&8191,ue=Ln>>>13,Fn=g[9]|0,he=Fn&8191,le=Fn>>>13,jn=p[0]|0,ce=jn&8191,de=jn>>>13,Hn=p[1]|0,pe=Hn&8191,ve=Hn>>>13,Kn=p[2]|0,ye=Kn&8191,ge=Kn>>>13,Wn=p[3]|0,me=Wn&8191,be=Wn>>>13,zn=p[4]|0,we=zn&8191,_e=zn>>>13,Gn=p[5]|0,xe=Gn&8191,Me=Gn>>>13,Vn=p[6]|0,Ee=Vn&8191,Se=Vn>>>13,$n=p[7]|0,Be=$n&8191,Ae=$n>>>13,Zn=p[8]|0,Re=Zn&8191,qe=Zn>>>13,Li=p[9]|0,Ge=Li&8191,Ve=Li>>>13;d.negative=o.negative^s.negative,d.length=19,_=Math.imul(N,ce),c=Math.imul(N,de),c=c+Math.imul(U,ce)|0,x=Math.imul(U,de);var Kr=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(Kr>>>26)|0,Kr&=67108863,_=Math.imul(K,ce),c=Math.imul(K,de),c=c+Math.imul(G,ce)|0,x=Math.imul(G,de),_=_+Math.imul(N,pe)|0,c=c+Math.imul(N,ve)|0,c=c+Math.imul(U,pe)|0,x=x+Math.imul(U,ve)|0;var Wr=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,_=Math.imul(Z,ce),c=Math.imul(Z,de),c=c+Math.imul(Y,ce)|0,x=Math.imul(Y,de),_=_+Math.imul(K,pe)|0,c=c+Math.imul(K,ve)|0,c=c+Math.imul(G,pe)|0,x=x+Math.imul(G,ve)|0,_=_+Math.imul(N,ye)|0,c=c+Math.imul(N,ge)|0,c=c+Math.imul(U,ye)|0,x=x+Math.imul(U,ge)|0;var zr=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(zr>>>26)|0,zr&=67108863,_=Math.imul(J,ce),c=Math.imul(J,de),c=c+Math.imul(Q,ce)|0,x=Math.imul(Q,de),_=_+Math.imul(Z,pe)|0,c=c+Math.imul(Z,ve)|0,c=c+Math.imul(Y,pe)|0,x=x+Math.imul(Y,ve)|0,_=_+Math.imul(K,ye)|0,c=c+Math.imul(K,ge)|0,c=c+Math.imul(G,ye)|0,x=x+Math.imul(G,ge)|0,_=_+Math.imul(N,me)|0,c=c+Math.imul(N,be)|0,c=c+Math.imul(U,me)|0,x=x+Math.imul(U,be)|0;var Gr=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,_=Math.imul(ee,ce),c=Math.imul(ee,de),c=c+Math.imul(te,ce)|0,x=Math.imul(te,de),_=_+Math.imul(J,pe)|0,c=c+Math.imul(J,ve)|0,c=c+Math.imul(Q,pe)|0,x=x+Math.imul(Q,ve)|0,_=_+Math.imul(Z,ye)|0,c=c+Math.imul(Z,ge)|0,c=c+Math.imul(Y,ye)|0,x=x+Math.imul(Y,ge)|0,_=_+Math.imul(K,me)|0,c=c+Math.imul(K,be)|0,c=c+Math.imul(G,me)|0,x=x+Math.imul(G,be)|0,_=_+Math.imul(N,we)|0,c=c+Math.imul(N,_e)|0,c=c+Math.imul(U,we)|0,x=x+Math.imul(U,_e)|0;var Vr=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,_=Math.imul(re,ce),c=Math.imul(re,de),c=c+Math.imul(ie,ce)|0,x=Math.imul(ie,de),_=_+Math.imul(ee,pe)|0,c=c+Math.imul(ee,ve)|0,c=c+Math.imul(te,pe)|0,x=x+Math.imul(te,ve)|0,_=_+Math.imul(J,ye)|0,c=c+Math.imul(J,ge)|0,c=c+Math.imul(Q,ye)|0,x=x+Math.imul(Q,ge)|0,_=_+Math.imul(Z,me)|0,c=c+Math.imul(Z,be)|0,c=c+Math.imul(Y,me)|0,x=x+Math.imul(Y,be)|0,_=_+Math.imul(K,we)|0,c=c+Math.imul(K,_e)|0,c=c+Math.imul(G,we)|0,x=x+Math.imul(G,_e)|0,_=_+Math.imul(N,xe)|0,c=c+Math.imul(N,Me)|0,c=c+Math.imul(U,xe)|0,x=x+Math.imul(U,Me)|0;var $r=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+($r>>>26)|0,$r&=67108863,_=Math.imul(ne,ce),c=Math.imul(ne,de),c=c+Math.imul(ae,ce)|0,x=Math.imul(ae,de),_=_+Math.imul(re,pe)|0,c=c+Math.imul(re,ve)|0,c=c+Math.imul(ie,pe)|0,x=x+Math.imul(ie,ve)|0,_=_+Math.imul(ee,ye)|0,c=c+Math.imul(ee,ge)|0,c=c+Math.imul(te,ye)|0,x=x+Math.imul(te,ge)|0,_=_+Math.imul(J,me)|0,c=c+Math.imul(J,be)|0,c=c+Math.imul(Q,me)|0,x=x+Math.imul(Q,be)|0,_=_+Math.imul(Z,we)|0,c=c+Math.imul(Z,_e)|0,c=c+Math.imul(Y,we)|0,x=x+Math.imul(Y,_e)|0,_=_+Math.imul(K,xe)|0,c=c+Math.imul(K,Me)|0,c=c+Math.imul(G,xe)|0,x=x+Math.imul(G,Me)|0,_=_+Math.imul(N,Ee)|0,c=c+Math.imul(N,Se)|0,c=c+Math.imul(U,Ee)|0,x=x+Math.imul(U,Se)|0;var Zr=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,_=Math.imul(oe,ce),c=Math.imul(oe,de),c=c+Math.imul(fe,ce)|0,x=Math.imul(fe,de),_=_+Math.imul(ne,pe)|0,c=c+Math.imul(ne,ve)|0,c=c+Math.imul(ae,pe)|0,x=x+Math.imul(ae,ve)|0,_=_+Math.imul(re,ye)|0,c=c+Math.imul(re,ge)|0,c=c+Math.imul(ie,ye)|0,x=x+Math.imul(ie,ge)|0,_=_+Math.imul(ee,me)|0,c=c+Math.imul(ee,be)|0,c=c+Math.imul(te,me)|0,x=x+Math.imul(te,be)|0,_=_+Math.imul(J,we)|0,c=c+Math.imul(J,_e)|0,c=c+Math.imul(Q,we)|0,x=x+Math.imul(Q,_e)|0,_=_+Math.imul(Z,xe)|0,c=c+Math.imul(Z,Me)|0,c=c+Math.imul(Y,xe)|0,x=x+Math.imul(Y,Me)|0,_=_+Math.imul(K,Ee)|0,c=c+Math.imul(K,Se)|0,c=c+Math.imul(G,Ee)|0,x=x+Math.imul(G,Se)|0,_=_+Math.imul(N,Be)|0,c=c+Math.imul(N,Ae)|0,c=c+Math.imul(U,Be)|0,x=x+Math.imul(U,Ae)|0;var Yr=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(Yr>>>26)|0,Yr&=67108863,_=Math.imul(se,ce),c=Math.imul(se,de),c=c+Math.imul(ue,ce)|0,x=Math.imul(ue,de),_=_+Math.imul(oe,pe)|0,c=c+Math.imul(oe,ve)|0,c=c+Math.imul(fe,pe)|0,x=x+Math.imul(fe,ve)|0,_=_+Math.imul(ne,ye)|0,c=c+Math.imul(ne,ge)|0,c=c+Math.imul(ae,ye)|0,x=x+Math.imul(ae,ge)|0,_=_+Math.imul(re,me)|0,c=c+Math.imul(re,be)|0,c=c+Math.imul(ie,me)|0,x=x+Math.imul(ie,be)|0,_=_+Math.imul(ee,we)|0,c=c+Math.imul(ee,_e)|0,c=c+Math.imul(te,we)|0,x=x+Math.imul(te,_e)|0,_=_+Math.imul(J,xe)|0,c=c+Math.imul(J,Me)|0,c=c+Math.imul(Q,xe)|0,x=x+Math.imul(Q,Me)|0,_=_+Math.imul(Z,Ee)|0,c=c+Math.imul(Z,Se)|0,c=c+Math.imul(Y,Ee)|0,x=x+Math.imul(Y,Se)|0,_=_+Math.imul(K,Be)|0,c=c+Math.imul(K,Ae)|0,c=c+Math.imul(G,Be)|0,x=x+Math.imul(G,Ae)|0,_=_+Math.imul(N,Re)|0,c=c+Math.imul(N,qe)|0,c=c+Math.imul(U,Re)|0,x=x+Math.imul(U,qe)|0;var Xr=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,_=Math.imul(he,ce),c=Math.imul(he,de),c=c+Math.imul(le,ce)|0,x=Math.imul(le,de),_=_+Math.imul(se,pe)|0,c=c+Math.imul(se,ve)|0,c=c+Math.imul(ue,pe)|0,x=x+Math.imul(ue,ve)|0,_=_+Math.imul(oe,ye)|0,c=c+Math.imul(oe,ge)|0,c=c+Math.imul(fe,ye)|0,x=x+Math.imul(fe,ge)|0,_=_+Math.imul(ne,me)|0,c=c+Math.imul(ne,be)|0,c=c+Math.imul(ae,me)|0,x=x+Math.imul(ae,be)|0,_=_+Math.imul(re,we)|0,c=c+Math.imul(re,_e)|0,c=c+Math.imul(ie,we)|0,x=x+Math.imul(ie,_e)|0,_=_+Math.imul(ee,xe)|0,c=c+Math.imul(ee,Me)|0,c=c+Math.imul(te,xe)|0,x=x+Math.imul(te,Me)|0,_=_+Math.imul(J,Ee)|0,c=c+Math.imul(J,Se)|0,c=c+Math.imul(Q,Ee)|0,x=x+Math.imul(Q,Se)|0,_=_+Math.imul(Z,Be)|0,c=c+Math.imul(Z,Ae)|0,c=c+Math.imul(Y,Be)|0,x=x+Math.imul(Y,Ae)|0,_=_+Math.imul(K,Re)|0,c=c+Math.imul(K,qe)|0,c=c+Math.imul(G,Re)|0,x=x+Math.imul(G,qe)|0,_=_+Math.imul(N,Ge)|0,c=c+Math.imul(N,Ve)|0,c=c+Math.imul(U,Ge)|0,x=x+Math.imul(U,Ve)|0;var Jr=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,_=Math.imul(he,pe),c=Math.imul(he,ve),c=c+Math.imul(le,pe)|0,x=Math.imul(le,ve),_=_+Math.imul(se,ye)|0,c=c+Math.imul(se,ge)|0,c=c+Math.imul(ue,ye)|0,x=x+Math.imul(ue,ge)|0,_=_+Math.imul(oe,me)|0,c=c+Math.imul(oe,be)|0,c=c+Math.imul(fe,me)|0,x=x+Math.imul(fe,be)|0,_=_+Math.imul(ne,we)|0,c=c+Math.imul(ne,_e)|0,c=c+Math.imul(ae,we)|0,x=x+Math.imul(ae,_e)|0,_=_+Math.imul(re,xe)|0,c=c+Math.imul(re,Me)|0,c=c+Math.imul(ie,xe)|0,x=x+Math.imul(ie,Me)|0,_=_+Math.imul(ee,Ee)|0,c=c+Math.imul(ee,Se)|0,c=c+Math.imul(te,Ee)|0,x=x+Math.imul(te,Se)|0,_=_+Math.imul(J,Be)|0,c=c+Math.imul(J,Ae)|0,c=c+Math.imul(Q,Be)|0,x=x+Math.imul(Q,Ae)|0,_=_+Math.imul(Z,Re)|0,c=c+Math.imul(Z,qe)|0,c=c+Math.imul(Y,Re)|0,x=x+Math.imul(Y,qe)|0,_=_+Math.imul(K,Ge)|0,c=c+Math.imul(K,Ve)|0,c=c+Math.imul(G,Ge)|0,x=x+Math.imul(G,Ve)|0;var Qr=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,_=Math.imul(he,ye),c=Math.imul(he,ge),c=c+Math.imul(le,ye)|0,x=Math.imul(le,ge),_=_+Math.imul(se,me)|0,c=c+Math.imul(se,be)|0,c=c+Math.imul(ue,me)|0,x=x+Math.imul(ue,be)|0,_=_+Math.imul(oe,we)|0,c=c+Math.imul(oe,_e)|0,c=c+Math.imul(fe,we)|0,x=x+Math.imul(fe,_e)|0,_=_+Math.imul(ne,xe)|0,c=c+Math.imul(ne,Me)|0,c=c+Math.imul(ae,xe)|0,x=x+Math.imul(ae,Me)|0,_=_+Math.imul(re,Ee)|0,c=c+Math.imul(re,Se)|0,c=c+Math.imul(ie,Ee)|0,x=x+Math.imul(ie,Se)|0,_=_+Math.imul(ee,Be)|0,c=c+Math.imul(ee,Ae)|0,c=c+Math.imul(te,Be)|0,x=x+Math.imul(te,Ae)|0,_=_+Math.imul(J,Re)|0,c=c+Math.imul(J,qe)|0,c=c+Math.imul(Q,Re)|0,x=x+Math.imul(Q,qe)|0,_=_+Math.imul(Z,Ge)|0,c=c+Math.imul(Z,Ve)|0,c=c+Math.imul(Y,Ge)|0,x=x+Math.imul(Y,Ve)|0;var ei=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(ei>>>26)|0,ei&=67108863,_=Math.imul(he,me),c=Math.imul(he,be),c=c+Math.imul(le,me)|0,x=Math.imul(le,be),_=_+Math.imul(se,we)|0,c=c+Math.imul(se,_e)|0,c=c+Math.imul(ue,we)|0,x=x+Math.imul(ue,_e)|0,_=_+Math.imul(oe,xe)|0,c=c+Math.imul(oe,Me)|0,c=c+Math.imul(fe,xe)|0,x=x+Math.imul(fe,Me)|0,_=_+Math.imul(ne,Ee)|0,c=c+Math.imul(ne,Se)|0,c=c+Math.imul(ae,Ee)|0,x=x+Math.imul(ae,Se)|0,_=_+Math.imul(re,Be)|0,c=c+Math.imul(re,Ae)|0,c=c+Math.imul(ie,Be)|0,x=x+Math.imul(ie,Ae)|0,_=_+Math.imul(ee,Re)|0,c=c+Math.imul(ee,qe)|0,c=c+Math.imul(te,Re)|0,x=x+Math.imul(te,qe)|0,_=_+Math.imul(J,Ge)|0,c=c+Math.imul(J,Ve)|0,c=c+Math.imul(Q,Ge)|0,x=x+Math.imul(Q,Ve)|0;var ti=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(ti>>>26)|0,ti&=67108863,_=Math.imul(he,we),c=Math.imul(he,_e),c=c+Math.imul(le,we)|0,x=Math.imul(le,_e),_=_+Math.imul(se,xe)|0,c=c+Math.imul(se,Me)|0,c=c+Math.imul(ue,xe)|0,x=x+Math.imul(ue,Me)|0,_=_+Math.imul(oe,Ee)|0,c=c+Math.imul(oe,Se)|0,c=c+Math.imul(fe,Ee)|0,x=x+Math.imul(fe,Se)|0,_=_+Math.imul(ne,Be)|0,c=c+Math.imul(ne,Ae)|0,c=c+Math.imul(ae,Be)|0,x=x+Math.imul(ae,Ae)|0,_=_+Math.imul(re,Re)|0,c=c+Math.imul(re,qe)|0,c=c+Math.imul(ie,Re)|0,x=x+Math.imul(ie,qe)|0,_=_+Math.imul(ee,Ge)|0,c=c+Math.imul(ee,Ve)|0,c=c+Math.imul(te,Ge)|0,x=x+Math.imul(te,Ve)|0;var ri=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(ri>>>26)|0,ri&=67108863,_=Math.imul(he,xe),c=Math.imul(he,Me),c=c+Math.imul(le,xe)|0,x=Math.imul(le,Me),_=_+Math.imul(se,Ee)|0,c=c+Math.imul(se,Se)|0,c=c+Math.imul(ue,Ee)|0,x=x+Math.imul(ue,Se)|0,_=_+Math.imul(oe,Be)|0,c=c+Math.imul(oe,Ae)|0,c=c+Math.imul(fe,Be)|0,x=x+Math.imul(fe,Ae)|0,_=_+Math.imul(ne,Re)|0,c=c+Math.imul(ne,qe)|0,c=c+Math.imul(ae,Re)|0,x=x+Math.imul(ae,qe)|0,_=_+Math.imul(re,Ge)|0,c=c+Math.imul(re,Ve)|0,c=c+Math.imul(ie,Ge)|0,x=x+Math.imul(ie,Ve)|0;var ii=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(ii>>>26)|0,ii&=67108863,_=Math.imul(he,Ee),c=Math.imul(he,Se),c=c+Math.imul(le,Ee)|0,x=Math.imul(le,Se),_=_+Math.imul(se,Be)|0,c=c+Math.imul(se,Ae)|0,c=c+Math.imul(ue,Be)|0,x=x+Math.imul(ue,Ae)|0,_=_+Math.imul(oe,Re)|0,c=c+Math.imul(oe,qe)|0,c=c+Math.imul(fe,Re)|0,x=x+Math.imul(fe,qe)|0,_=_+Math.imul(ne,Ge)|0,c=c+Math.imul(ne,Ve)|0,c=c+Math.imul(ae,Ge)|0,x=x+Math.imul(ae,Ve)|0;var ni=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(ni>>>26)|0,ni&=67108863,_=Math.imul(he,Be),c=Math.imul(he,Ae),c=c+Math.imul(le,Be)|0,x=Math.imul(le,Ae),_=_+Math.imul(se,Re)|0,c=c+Math.imul(se,qe)|0,c=c+Math.imul(ue,Re)|0,x=x+Math.imul(ue,qe)|0,_=_+Math.imul(oe,Ge)|0,c=c+Math.imul(oe,Ve)|0,c=c+Math.imul(fe,Ge)|0,x=x+Math.imul(fe,Ve)|0;var Qf=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(Qf>>>26)|0,Qf&=67108863,_=Math.imul(he,Re),c=Math.imul(he,qe),c=c+Math.imul(le,Re)|0,x=Math.imul(le,qe),_=_+Math.imul(se,Ge)|0,c=c+Math.imul(se,Ve)|0,c=c+Math.imul(ue,Ge)|0,x=x+Math.imul(ue,Ve)|0;var es=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(es>>>26)|0,es&=67108863,_=Math.imul(he,Ge),c=Math.imul(he,Ve),c=c+Math.imul(le,Ge)|0,x=Math.imul(le,Ve);var ts=(w+_|0)+((c&8191)<<13)|0;return w=(x+(c>>>13)|0)+(ts>>>26)|0,ts&=67108863,u[0]=Kr,u[1]=Wr,u[2]=zr,u[3]=Gr,u[4]=Vr,u[5]=$r,u[6]=Zr,u[7]=Yr,u[8]=Xr,u[9]=Jr,u[10]=Qr,u[11]=ei,u[12]=ti,u[13]=ri,u[14]=ii,u[15]=ni,u[16]=Qf,u[17]=es,u[18]=ts,w!==0&&(u[19]=w,d.length++),d};Math.imul||(z=X);function $(l,o,s){s.negative=o.negative^l.negative,s.length=l.length+o.length;for(var d=0,g=0,p=0;p<s.length-1;p++){var u=g;g=0;for(var w=d&67108863,_=Math.min(p,o.length-1),c=Math.max(0,p-l.length+1);c<=_;c++){var x=p-c,P=l.words[x]|0,N=o.words[c]|0,U=P*N,W=U&67108863;u=u+(U/67108864|0)|0,W=W+w|0,w=W&67108863,u=u+(W>>>26)|0,g+=u>>>26,u&=67108863}s.words[p]=w,d=u,u=g}return d!==0?s.words[p]=d:s.length--,s._strip()}function Le(l,o,s){return $(l,o,s)}n.prototype.mulTo=function(o,s){var d,g=this.length+o.length;return this.length===10&&o.length===10?d=z(this,o,s):g<63?d=X(this,o,s):g<1024?d=$(this,o,s):d=Le(this,o,s),d};function k(l,o){this.x=l,this.y=o}k.prototype.makeRBT=function(o){for(var s=new Array(o),d=n.prototype._countBits(o)-1,g=0;g<o;g++)s[g]=this.revBin(g,d,o);return s},k.prototype.revBin=function(o,s,d){if(o===0||o===d-1)return o;for(var g=0,p=0;p<s;p++)g|=(o&1)<<s-p-1,o>>=1;return g},k.prototype.permute=function(o,s,d,g,p,u){for(var w=0;w<u;w++)g[w]=s[o[w]],p[w]=d[o[w]]},k.prototype.transform=function(o,s,d,g,p,u){this.permute(u,o,s,d,g,p);for(var w=1;w<p;w<<=1)for(var _=w<<1,c=Math.cos(2*Math.PI/_),x=Math.sin(2*Math.PI/_),P=0;P<p;P+=_)for(var N=c,U=x,W=0;W<w;W++){var K=d[P+W],G=g[P+W],It=d[P+W+w],Z=g[P+W+w],Y=N*It-U*Z;Z=N*Z+U*It,It=Y,d[P+W]=K+It,g[P+W]=G+Z,d[P+W+w]=K-It,g[P+W+w]=G-Z,W!==_&&(Y=c*N-x*U,U=c*U+x*N,N=Y)}},k.prototype.guessLen13b=function(o,s){var d=Math.max(s,o)|1,g=d&1,p=0;for(d=d/2|0;d;d=d>>>1)p++;return 1<<p+1+g},k.prototype.conjugate=function(o,s,d){if(!(d<=1))for(var g=0;g<d/2;g++){var p=o[g];o[g]=o[d-g-1],o[d-g-1]=p,p=s[g],s[g]=-s[d-g-1],s[d-g-1]=-p}},k.prototype.normalize13b=function(o,s){for(var d=0,g=0;g<s/2;g++){var p=Math.round(o[2*g+1]/s)*8192+Math.round(o[2*g]/s)+d;o[g]=p&67108863,p<67108864?d=0:d=p/67108864|0}return o},k.prototype.convert13b=function(o,s,d,g){for(var p=0,u=0;u<s;u++)p=p+(o[u]|0),d[2*u]=p&8191,p=p>>>13,d[2*u+1]=p&8191,p=p>>>13;for(u=2*s;u<g;++u)d[u]=0;r(p===0),r((p&-8192)===0)},k.prototype.stub=function(o){for(var s=new Array(o),d=0;d<o;d++)s[d]=0;return s},k.prototype.mulp=function(o,s,d){var g=2*this.guessLen13b(o.length,s.length),p=this.makeRBT(g),u=this.stub(g),w=new Array(g),_=new Array(g),c=new Array(g),x=new Array(g),P=new Array(g),N=new Array(g),U=d.words;U.length=g,this.convert13b(o.words,o.length,w,g),this.convert13b(s.words,s.length,x,g),this.transform(w,u,_,c,g,p),this.transform(x,u,P,N,g,p);for(var W=0;W<g;W++){var K=_[W]*P[W]-c[W]*N[W];c[W]=_[W]*N[W]+c[W]*P[W],_[W]=K}return this.conjugate(_,c,g),this.transform(_,c,U,u,g,p),this.conjugate(U,u,g),this.normalize13b(U,g),d.negative=o.negative^s.negative,d.length=o.length+s.length,d._strip()},n.prototype.mul=function(o){var s=new n(null);return s.words=new Array(this.length+o.length),this.mulTo(o,s)},n.prototype.mulf=function(o){var s=new n(null);return s.words=new Array(this.length+o.length),Le(this,o,s)},n.prototype.imul=function(o){return this.clone().mulTo(o,this)},n.prototype.imuln=function(o){var s=o<0;s&&(o=-o),r(typeof o=="number"),r(o<67108864);for(var d=0,g=0;g<this.length;g++){var p=(this.words[g]|0)*o,u=(p&67108863)+(d&67108863);d>>=26,d+=p/67108864|0,d+=u>>>26,this.words[g]=u&67108863}return d!==0&&(this.words[g]=d,this.length++),this.length=o===0?1:this.length,s?this.ineg():this},n.prototype.muln=function(o){return this.clone().imuln(o)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(o){var s=V(o);if(s.length===0)return new n(1);for(var d=this,g=0;g<s.length&&s[g]===0;g++,d=d.sqr());if(++g<s.length)for(var p=d.sqr();g<s.length;g++,p=p.sqr())s[g]!==0&&(d=d.mul(p));return d},n.prototype.iushln=function(o){r(typeof o=="number"&&o>=0);var s=o%26,d=(o-s)/26,g=67108863>>>26-s<<26-s,p;if(s!==0){var u=0;for(p=0;p<this.length;p++){var w=this.words[p]&g,_=(this.words[p]|0)-w<<s;this.words[p]=_|u,u=w>>>26-s}u&&(this.words[p]=u,this.length++)}if(d!==0){for(p=this.length-1;p>=0;p--)this.words[p+d]=this.words[p];for(p=0;p<d;p++)this.words[p]=0;this.length+=d}return this._strip()},n.prototype.ishln=function(o){return r(this.negative===0),this.iushln(o)},n.prototype.iushrn=function(o,s,d){r(typeof o=="number"&&o>=0);var g;s?g=(s-s%26)/26:g=0;var p=o%26,u=Math.min((o-p)/26,this.length),w=67108863^67108863>>>p<<p,_=d;if(g-=u,g=Math.max(0,g),_){for(var c=0;c<u;c++)_.words[c]=this.words[c];_.length=u}if(u!==0)if(this.length>u)for(this.length-=u,c=0;c<this.length;c++)this.words[c]=this.words[c+u];else this.words[0]=0,this.length=1;var x=0;for(c=this.length-1;c>=0&&(x!==0||c>=g);c--){var P=this.words[c]|0;this.words[c]=x<<26-p|P>>>p,x=P&w}return _&&x!==0&&(_.words[_.length++]=x),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(o,s,d){return r(this.negative===0),this.iushrn(o,s,d)},n.prototype.shln=function(o){return this.clone().ishln(o)},n.prototype.ushln=function(o){return this.clone().iushln(o)},n.prototype.shrn=function(o){return this.clone().ishrn(o)},n.prototype.ushrn=function(o){return this.clone().iushrn(o)},n.prototype.testn=function(o){r(typeof o=="number"&&o>=0);var s=o%26,d=(o-s)/26,g=1<<s;if(this.length<=d)return!1;var p=this.words[d];return!!(p&g)},n.prototype.imaskn=function(o){r(typeof o=="number"&&o>=0);var s=o%26,d=(o-s)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=d)return this;if(s!==0&&d++,this.length=Math.min(d,this.length),s!==0){var g=67108863^67108863>>>s<<s;this.words[this.length-1]&=g}return this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.maskn=function(o){return this.clone().imaskn(o)},n.prototype.iaddn=function(o){return r(typeof o=="number"),r(o<67108864),o<0?this.isubn(-o):this.negative!==0?this.length===1&&(this.words[0]|0)<=o?(this.words[0]=o-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(o),this.negative=1,this):this._iaddn(o)},n.prototype._iaddn=function(o){this.words[0]+=o;for(var s=0;s<this.length&&this.words[s]>=67108864;s++)this.words[s]-=67108864,s===this.length-1?this.words[s+1]=1:this.words[s+1]++;return this.length=Math.max(this.length,s+1),this},n.prototype.isubn=function(o){if(r(typeof o=="number"),r(o<67108864),o<0)return this.iaddn(-o);if(this.negative!==0)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var s=0;s<this.length&&this.words[s]<0;s++)this.words[s]+=67108864,this.words[s+1]-=1;return this._strip()},n.prototype.addn=function(o){return this.clone().iaddn(o)},n.prototype.subn=function(o){return this.clone().isubn(o)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(o,s,d){var g=o.length+d,p;this._expand(g);var u,w=0;for(p=0;p<o.length;p++){u=(this.words[p+d]|0)+w;var _=(o.words[p]|0)*s;u-=_&67108863,w=(u>>26)-(_/67108864|0),this.words[p+d]=u&67108863}for(;p<this.length-d;p++)u=(this.words[p+d]|0)+w,w=u>>26,this.words[p+d]=u&67108863;if(w===0)return this._strip();for(r(w===-1),w=0,p=0;p<this.length;p++)u=-(this.words[p]|0)+w,w=u>>26,this.words[p]=u&67108863;return this.negative=1,this._strip()},n.prototype._wordDiv=function(o,s){var d=this.length-o.length,g=this.clone(),p=o,u=p.words[p.length-1]|0,w=this._countBits(u);d=26-w,d!==0&&(p=p.ushln(d),g.iushln(d),u=p.words[p.length-1]|0);var _=g.length-p.length,c;if(s!=="mod"){c=new n(null),c.length=_+1,c.words=new Array(c.length);for(var x=0;x<c.length;x++)c.words[x]=0}var P=g.clone()._ishlnsubmul(p,1,_);P.negative===0&&(g=P,c&&(c.words[_]=1));for(var N=_-1;N>=0;N--){var U=(g.words[p.length+N]|0)*67108864+(g.words[p.length+N-1]|0);for(U=Math.min(U/u|0,67108863),g._ishlnsubmul(p,U,N);g.negative!==0;)U--,g.negative=0,g._ishlnsubmul(p,1,N),g.isZero()||(g.negative^=1);c&&(c.words[N]=U)}return c&&c._strip(),g._strip(),s!=="div"&&d!==0&&g.iushrn(d),{div:c||null,mod:g}},n.prototype.divmod=function(o,s,d){if(r(!o.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var g,p,u;return this.negative!==0&&o.negative===0?(u=this.neg().divmod(o,s),s!=="mod"&&(g=u.div.neg()),s!=="div"&&(p=u.mod.neg(),d&&p.negative!==0&&p.iadd(o)),{div:g,mod:p}):this.negative===0&&o.negative!==0?(u=this.divmod(o.neg(),s),s!=="mod"&&(g=u.div.neg()),{div:g,mod:u.mod}):(this.negative&o.negative)!==0?(u=this.neg().divmod(o.neg(),s),s!=="div"&&(p=u.mod.neg(),d&&p.negative!==0&&p.isub(o)),{div:u.div,mod:p}):o.length>this.length||this.cmp(o)<0?{div:new n(0),mod:this}:o.length===1?s==="div"?{div:this.divn(o.words[0]),mod:null}:s==="mod"?{div:null,mod:new n(this.modrn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new n(this.modrn(o.words[0]))}:this._wordDiv(o,s)},n.prototype.div=function(o){return this.divmod(o,"div",!1).div},n.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},n.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},n.prototype.divRound=function(o){var s=this.divmod(o);if(s.mod.isZero())return s.div;var d=s.div.negative!==0?s.mod.isub(o):s.mod,g=o.ushrn(1),p=o.andln(1),u=d.cmp(g);return u<0||p===1&&u===0?s.div:s.div.negative!==0?s.div.isubn(1):s.div.iaddn(1)},n.prototype.modrn=function(o){var s=o<0;s&&(o=-o),r(o<=67108863);for(var d=(1<<26)%o,g=0,p=this.length-1;p>=0;p--)g=(d*g+(this.words[p]|0))%o;return s?-g:g},n.prototype.modn=function(o){return this.modrn(o)},n.prototype.idivn=function(o){var s=o<0;s&&(o=-o),r(o<=67108863);for(var d=0,g=this.length-1;g>=0;g--){var p=(this.words[g]|0)+d*67108864;this.words[g]=p/o|0,d=p%o}return this._strip(),s?this.ineg():this},n.prototype.divn=function(o){return this.clone().idivn(o)},n.prototype.egcd=function(o){r(o.negative===0),r(!o.isZero());var s=this,d=o.clone();s.negative!==0?s=s.umod(o):s=s.clone();for(var g=new n(1),p=new n(0),u=new n(0),w=new n(1),_=0;s.isEven()&&d.isEven();)s.iushrn(1),d.iushrn(1),++_;for(var c=d.clone(),x=s.clone();!s.isZero();){for(var P=0,N=1;(s.words[0]&N)===0&&P<26;++P,N<<=1);if(P>0)for(s.iushrn(P);P-- >0;)(g.isOdd()||p.isOdd())&&(g.iadd(c),p.isub(x)),g.iushrn(1),p.iushrn(1);for(var U=0,W=1;(d.words[0]&W)===0&&U<26;++U,W<<=1);if(U>0)for(d.iushrn(U);U-- >0;)(u.isOdd()||w.isOdd())&&(u.iadd(c),w.isub(x)),u.iushrn(1),w.iushrn(1);s.cmp(d)>=0?(s.isub(d),g.isub(u),p.isub(w)):(d.isub(s),u.isub(g),w.isub(p))}return{a:u,b:w,gcd:d.iushln(_)}},n.prototype._invmp=function(o){r(o.negative===0),r(!o.isZero());var s=this,d=o.clone();s.negative!==0?s=s.umod(o):s=s.clone();for(var g=new n(1),p=new n(0),u=d.clone();s.cmpn(1)>0&&d.cmpn(1)>0;){for(var w=0,_=1;(s.words[0]&_)===0&&w<26;++w,_<<=1);if(w>0)for(s.iushrn(w);w-- >0;)g.isOdd()&&g.iadd(u),g.iushrn(1);for(var c=0,x=1;(d.words[0]&x)===0&&c<26;++c,x<<=1);if(c>0)for(d.iushrn(c);c-- >0;)p.isOdd()&&p.iadd(u),p.iushrn(1);s.cmp(d)>=0?(s.isub(d),g.isub(p)):(d.isub(s),p.isub(g))}var P;return s.cmpn(1)===0?P=g:P=p,P.cmpn(0)<0&&P.iadd(o),P},n.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var s=this.clone(),d=o.clone();s.negative=0,d.negative=0;for(var g=0;s.isEven()&&d.isEven();g++)s.iushrn(1),d.iushrn(1);do{for(;s.isEven();)s.iushrn(1);for(;d.isEven();)d.iushrn(1);var p=s.cmp(d);if(p<0){var u=s;s=d,d=u}else if(p===0||d.cmpn(1)===0)break;s.isub(d)}while(!0);return d.iushln(g)},n.prototype.invm=function(o){return this.egcd(o).a.umod(o)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(o){return this.words[0]&o},n.prototype.bincn=function(o){r(typeof o=="number");var s=o%26,d=(o-s)/26,g=1<<s;if(this.length<=d)return this._expand(d+1),this.words[d]|=g,this;for(var p=g,u=d;p!==0&&u<this.length;u++){var w=this.words[u]|0;w+=p,p=w>>>26,w&=67108863,this.words[u]=w}return p!==0&&(this.words[u]=p,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(o){var s=o<0;if(this.negative!==0&&!s)return-1;if(this.negative===0&&s)return 1;this._strip();var d;if(this.length>1)d=1;else{s&&(o=-o),r(o<=67108863,"Number is too big");var g=this.words[0]|0;d=g===o?0:g<o?-1:1}return this.negative!==0?-d|0:d},n.prototype.cmp=function(o){if(this.negative!==0&&o.negative===0)return-1;if(this.negative===0&&o.negative!==0)return 1;var s=this.ucmp(o);return this.negative!==0?-s|0:s},n.prototype.ucmp=function(o){if(this.length>o.length)return 1;if(this.length<o.length)return-1;for(var s=0,d=this.length-1;d>=0;d--){var g=this.words[d]|0,p=o.words[d]|0;if(g!==p){g<p?s=-1:g>p&&(s=1);break}}return s},n.prototype.gtn=function(o){return this.cmpn(o)===1},n.prototype.gt=function(o){return this.cmp(o)===1},n.prototype.gten=function(o){return this.cmpn(o)>=0},n.prototype.gte=function(o){return this.cmp(o)>=0},n.prototype.ltn=function(o){return this.cmpn(o)===-1},n.prototype.lt=function(o){return this.cmp(o)===-1},n.prototype.lten=function(o){return this.cmpn(o)<=0},n.prototype.lte=function(o){return this.cmp(o)<=0},n.prototype.eqn=function(o){return this.cmpn(o)===0},n.prototype.eq=function(o){return this.cmp(o)===0},n.red=function(o){return new h(o)},n.prototype.toRed=function(o){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),o.convertTo(this)._forceRed(o)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(o){return this.red=o,this},n.prototype.forceRed=function(o){return r(!this.red,"Already a number in reduction context"),this._forceRed(o)},n.prototype.redAdd=function(o){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},n.prototype.redIAdd=function(o){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},n.prototype.redSub=function(o){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},n.prototype.redISub=function(o){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},n.prototype.redShl=function(o){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},n.prototype.redMul=function(o){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},n.prototype.redIMul=function(o){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(o){return r(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var O={k256:null,p224:null,p192:null,p25519:null};function D(l,o){this.name=l,this.p=new n(o,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var o=new n(null);return o.words=new Array(Math.ceil(this.n/13)),o},D.prototype.ireduce=function(o){var s=o,d;do this.split(s,this.tmp),s=this.imulK(s),s=s.iadd(this.tmp),d=s.bitLength();while(d>this.n);var g=d<this.n?-1:s.ucmp(this.p);return g===0?(s.words[0]=0,s.length=1):g>0?s.isub(this.p):s.strip!==void 0?s.strip():s._strip(),s},D.prototype.split=function(o,s){o.iushrn(this.n,0,s)},D.prototype.imulK=function(o){return o.imul(this.k)};function L(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(L,D),L.prototype.split=function(o,s){for(var d=4194303,g=Math.min(o.length,9),p=0;p<g;p++)s.words[p]=o.words[p];if(s.length=g,o.length<=9){o.words[0]=0,o.length=1;return}var u=o.words[9];for(s.words[s.length++]=u&d,p=10;p<o.length;p++){var w=o.words[p]|0;o.words[p-10]=(w&d)<<4|u>>>22,u=w}u>>>=22,o.words[p-10]=u,u===0&&o.length>10?o.length-=10:o.length-=9},L.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var s=0,d=0;d<o.length;d++){var g=o.words[d]|0;s+=g*977,o.words[d]=s&67108863,s=g*64+(s/67108864|0)}return o.words[o.length-1]===0&&(o.length--,o.words[o.length-1]===0&&o.length--),o};function F(){D.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(F,D);function H(){D.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(H,D);function M(){D.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(M,D),M.prototype.imulK=function(o){for(var s=0,d=0;d<o.length;d++){var g=(o.words[d]|0)*19+s,p=g&67108863;g>>>=26,o.words[d]=p,s=g}return s!==0&&(o.words[o.length++]=s),o},n._prime=function(o){if(O[o])return O[o];var s;if(o==="k256")s=new L;else if(o==="p224")s=new F;else if(o==="p192")s=new H;else if(o==="p25519")s=new M;else throw new Error("Unknown prime "+o);return O[o]=s,s};function h(l){if(typeof l=="string"){var o=n._prime(l);this.m=o.p,this.prime=o}else r(l.gtn(1),"modulus must be greater than 1"),this.m=l,this.prime=null}h.prototype._verify1=function(o){r(o.negative===0,"red works only with positives"),r(o.red,"red works only with red numbers")},h.prototype._verify2=function(o,s){r((o.negative|s.negative)===0,"red works only with positives"),r(o.red&&o.red===s.red,"red works only with red numbers")},h.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):(E(o,o.umod(this.m)._forceRed(this)),o)},h.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},h.prototype.add=function(o,s){this._verify2(o,s);var d=o.add(s);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},h.prototype.iadd=function(o,s){this._verify2(o,s);var d=o.iadd(s);return d.cmp(this.m)>=0&&d.isub(this.m),d},h.prototype.sub=function(o,s){this._verify2(o,s);var d=o.sub(s);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},h.prototype.isub=function(o,s){this._verify2(o,s);var d=o.isub(s);return d.cmpn(0)<0&&d.iadd(this.m),d},h.prototype.shl=function(o,s){return this._verify1(o),this.imod(o.ushln(s))},h.prototype.imul=function(o,s){return this._verify2(o,s),this.imod(o.imul(s))},h.prototype.mul=function(o,s){return this._verify2(o,s),this.imod(o.mul(s))},h.prototype.isqr=function(o){return this.imul(o,o.clone())},h.prototype.sqr=function(o){return this.mul(o,o)},h.prototype.sqrt=function(o){if(o.isZero())return o.clone();var s=this.m.andln(3);if(r(s%2===1),s===3){var d=this.m.add(new n(1)).iushrn(2);return this.pow(o,d)}for(var g=this.m.subn(1),p=0;!g.isZero()&&g.andln(1)===0;)p++,g.iushrn(1);r(!g.isZero());var u=new n(1).toRed(this),w=u.redNeg(),_=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new n(2*c*c).toRed(this);this.pow(c,_).cmp(w)!==0;)c.redIAdd(w);for(var x=this.pow(c,g),P=this.pow(o,g.addn(1).iushrn(1)),N=this.pow(o,g),U=p;N.cmp(u)!==0;){for(var W=N,K=0;W.cmp(u)!==0;K++)W=W.redSqr();r(K<U);var G=this.pow(x,new n(1).iushln(U-K-1));P=P.redMul(G),x=G.redSqr(),N=N.redMul(x),U=K}return P},h.prototype.invm=function(o){var s=o._invmp(this.m);return s.negative!==0?(s.negative=0,this.imod(s).redNeg()):this.imod(s)},h.prototype.pow=function(o,s){if(s.isZero())return new n(1).toRed(this);if(s.cmpn(1)===0)return o.clone();var d=4,g=new Array(1<<d);g[0]=new n(1).toRed(this),g[1]=o;for(var p=2;p<g.length;p++)g[p]=this.mul(g[p-1],o);var u=g[0],w=0,_=0,c=s.bitLength()%26;for(c===0&&(c=26),p=s.length-1;p>=0;p--){for(var x=s.words[p],P=c-1;P>=0;P--){var N=x>>P&1;if(u!==g[0]&&(u=this.sqr(u)),N===0&&w===0){_=0;continue}w<<=1,w|=N,_++,!(_!==d&&(p!==0||P!==0))&&(u=this.mul(u,g[w]),_=0,w=0)}c=26}return u},h.prototype.convertTo=function(o){var s=o.umod(this.m);return s===o?s.clone():s},h.prototype.convertFrom=function(o){var s=o.clone();return s.red=null,s},n.mont=function(o){return new y(o)};function y(l){h.call(this,l),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(y,h),y.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},y.prototype.convertFrom=function(o){var s=this.imod(o.mul(this.rinv));return s.red=null,s},y.prototype.imul=function(o,s){if(o.isZero()||s.isZero())return o.words[0]=0,o.length=1,o;var d=o.imul(s),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=d.isub(g).iushrn(this.shift),u=p;return p.cmp(this.m)>=0?u=p.isub(this.m):p.cmpn(0)<0&&(u=p.iadd(this.m)),u._forceRed(this)},y.prototype.mul=function(o,s){if(o.isZero()||s.isZero())return new n(0)._forceRed(this);var d=o.mul(s),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=d.isub(g).iushrn(this.shift),u=p;return p.cmp(this.m)>=0?u=p.isub(this.m):p.cmpn(0)<0&&(u=p.iadd(this.m)),u._forceRed(this)},y.prototype.invm=function(o){var s=this.imod(o._invmp(this.m).mul(this.r2));return s._forceRed(this)}})(typeof ol>"u"||ol,vm)});var fl=R((Uk,bm)=>{"use strict";b();var Sn=ym(),zE=ui(),GE=Ie().Buffer;function gm(t){var e=t.modulus.byteLength(),r;do r=new Sn(zE(e));while(r.cmp(t.modulus)>=0||!r.umod(t.prime1)||!r.umod(t.prime2));return r}function VE(t){var e=gm(t),r=e.toRed(Sn.mont(t.modulus)).redPow(new Sn(t.publicExponent)).fromRed();return{blinder:r,unblinder:e.invm(t.modulus)}}function mm(t,e){var r=VE(e),i=e.modulus.byteLength(),n=new Sn(t).mul(r.blinder).umod(e.modulus),a=n.toRed(Sn.mont(e.prime1)),f=n.toRed(Sn.mont(e.prime2)),v=e.coefficient,m=e.prime1,E=e.prime2,A=a.redPow(e.exponent1).fromRed(),q=f.redPow(e.exponent2).fromRed(),I=A.isub(q).imul(v).umod(m).imul(E);return q.iadd(I).imul(r.unblinder).umod(e.modulus).toArrayLike(GE,"be",i)}mm.getr=gm;bm.exports=mm});var Mm=R((Lk,xm)=>{b();var $E=tl(),sl=ui(),ZE=Ta(),wm=il(),_m=nl(),ul=lr(),YE=al(),XE=fl(),jt=Ie().Buffer;xm.exports=function(e,r,i){var n;e.padding?n=e.padding:i?n=1:n=4;var a=$E(e),f;if(n===4)f=JE(a,r);else if(n===1)f=QE(a,r,i);else if(n===3){if(f=new ul(r),f.cmp(a.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return i?XE(f,a):YE(f,a)};function JE(t,e){var r=t.modulus.byteLength(),i=e.length,n=ZE("sha1").update(jt.alloc(0)).digest(),a=n.length,f=2*a;if(i>r-f-2)throw new Error("message too long");var v=jt.alloc(r-i-f-2),m=r-a-1,E=sl(a),A=_m(jt.concat([n,v,jt.alloc(1,1),e],m),wm(E,m)),q=_m(E,wm(A,a));return new ul(jt.concat([jt.alloc(1),q,A],r))}function QE(t,e,r){var i=e.length,n=t.modulus.byteLength();if(i>n-11)throw new Error("message too long");var a;return r?a=jt.alloc(n-i-3,255):a=eS(n-i-3),new ul(jt.concat([jt.from([0,r?1:2]),a,jt.alloc(1),e],n))}function eS(t){for(var e=jt.allocUnsafe(t),r=0,i=sl(t*2),n=0,a;r<t;)n===i.length&&(i=sl(t*2),n=0),a=i[n++],a&&(e[r++]=a);return e}});var Rm=R((jk,Am)=>{b();var tS=tl(),Em=il(),Sm=nl(),Bm=lr(),rS=fl(),iS=Ta(),nS=al(),za=Ie().Buffer;Am.exports=function(e,r,i){var n;e.padding?n=e.padding:i?n=1:n=4;var a=tS(e),f=a.modulus.byteLength();if(r.length>f||new Bm(r).cmp(a.modulus)>=0)throw new Error("decryption error");var v;i?v=nS(new Bm(r),a):v=rS(r,a);var m=za.alloc(f-v.length);if(v=za.concat([m,v],f),n===4)return aS(a,v);if(n===1)return oS(a,v,i);if(n===3)return v;throw new Error("unknown padding")};function aS(t,e){var r=t.modulus.byteLength(),i=iS("sha1").update(za.alloc(0)).digest(),n=i.length;if(e[0]!==0)throw new Error("decryption error");var a=e.slice(1,n+1),f=e.slice(n+1),v=Sm(a,Em(f,n)),m=Sm(f,Em(v,r-n-1));if(fS(i,m.slice(0,n)))throw new Error("decryption error");for(var E=n;m[E]===0;)E++;if(m[E++]!==1)throw new Error("decryption error");return m.slice(E)}function oS(t,e,r){for(var i=e.slice(0,2),n=2,a=0;e[n++]!==0;)if(n>=e.length){a++;break}var f=e.slice(2,n-1);if((i.toString("hex")!=="0002"&&!r||i.toString("hex")!=="0001"&&r)&&a++,f.length<8&&a++,a)throw new Error("decryption error");return e.slice(n)}function fS(t,e){t=za.from(t),e=za.from(e);var r=0,i=t.length;t.length!==e.length&&(r++,i=Math.min(t.length,e.length));for(var n=-1;++n<i;)r+=t[n]^e[n];return r}});var qm=R(Ui=>{b();Ui.publicEncrypt=Mm();Ui.privateDecrypt=Rm();Ui.privateEncrypt=function(e,r){return Ui.publicEncrypt(e,r,!0)};Ui.publicDecrypt=function(e,r){return Ui.privateDecrypt(e,r,!0)}});var Lm=R(Ga=>{"use strict";b();function Im(){throw new Error(`secure random number generation not supported by this browser
|
|
15
|
-
use chrome, FireFox or Internet Explorer 11`)}var
|
|
13
|
+
})`)}catch{r=function(i){this._initNamed(i)}}return jM(r,e),r.prototype._initNamed=function(i){e.call(this,i)},new r(this)};mn.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(cg.decoders[e])),this.decoders[e]};mn.prototype.decode=function(e,r,n){return this._getDecoder(r).decode(e,n)};mn.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(cg.encoders[e])),this.encoders[e]};mn.prototype.encode=function(e,r,n){return this._getEncoder(r).encode(e,n)}});var yg=R(vg=>{w();var KM=J();function Rt(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}vg.Reporter=Rt;Rt.prototype.isError=function(e){return e instanceof wn};Rt.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}};Rt.prototype.restore=function(e){var r=this._reporterState;r.obj=e.obj,r.path=r.path.slice(0,e.pathLen)};Rt.prototype.enterKey=function(e){return this._reporterState.path.push(e)};Rt.prototype.exitKey=function(e){var r=this._reporterState;r.path=r.path.slice(0,e-1)};Rt.prototype.leaveKey=function(e,r,n){var i=this._reporterState;this.exitKey(e),i.obj!==null&&(i.obj[r]=n)};Rt.prototype.path=function(){return this._reporterState.path.join("/")};Rt.prototype.enterObject=function(){var e=this._reporterState,r=e.obj;return e.obj={},r};Rt.prototype.leaveObject=function(e){var r=this._reporterState,n=r.obj;return r.obj=e,n};Rt.prototype.error=function(e){var r,n=this._reporterState,i=e instanceof wn;if(i?r=e:r=new wn(n.path.map(function(a){return"["+JSON.stringify(a)+"]"}).join(""),e.message||e,e.stack),!n.options.partial)throw r;return i||n.errors.push(r),r};Rt.prototype.wrapResult=function(e){var r=this._reporterState;return r.options.partial?{result:this.isError(e)?null:e,errors:r.errors}:e};function wn(t,e){this.path=t,this.rethrow(e)}KM(wn,Error);wn.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,wn),!this.stack)try{throw new Error(this.message)}catch(r){this.stack=r.stack}return this}});var Oh=R(Ch=>{w();var WM=J(),Df=_n().Reporter,Ha=ft().Buffer;function er(t,e){if(Df.call(this,e),!Ha.isBuffer(t)){this.error("Input not Buffer");return}this.base=t,this.offset=0,this.length=t.length}WM(er,Df);Ch.DecoderBuffer=er;er.prototype.save=function(){return{offset:this.offset,reporter:Df.prototype.save.call(this)}};er.prototype.restore=function(e){var r=new er(this.base);return r.offset=e.offset,r.length=this.offset,this.offset=e.offset,Df.prototype.restore.call(this,e.reporter),r};er.prototype.isEmpty=function(){return this.offset===this.length};er.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")};er.prototype.skip=function(e,r){if(!(this.offset+e<=this.length))return this.error(r||"DecoderBuffer overrun");var n=new er(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n};er.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)};function Pf(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(r){return r instanceof Pf||(r=new Pf(r,e)),this.length+=r.length,r},this);else if(typeof t=="number"){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if(typeof t=="string")this.value=t,this.length=Ha.byteLength(t);else if(Ha.isBuffer(t))this.value=t,this.length=t.length;else return e.error("Unsupported type: "+typeof t)}Ch.EncoderBuffer=Pf;Pf.prototype.join=function(e,r){return e||(e=new Ha(this.length)),r||(r=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(n){n.join(e,r),r+=n.length}):(typeof this.value=="number"?e[r]=this.value:typeof this.value=="string"?e.write(this.value,r):Ha.isBuffer(this.value)&&this.value.copy(e,r),r+=this.length)),e}});var bg=R((CI,mg)=>{w();var zM=_n().Reporter,GM=_n().EncoderBuffer,VM=_n().DecoderBuffer,pt=Ot(),gg=["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"],$M=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(gg),ZM=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function He(t,e){var r={};this._baseState=r,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}mg.exports=He;var YM=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];He.prototype.clone=function(){var e=this._baseState,r={};YM.forEach(function(i){r[i]=e[i]});var n=new this.constructor(r.parent);return n._baseState=r,n};He.prototype._wrap=function(){var e=this._baseState;$M.forEach(function(r){this[r]=function(){var i=new this.constructor(this);return e.children.push(i),i[r].apply(i,arguments)}},this)};He.prototype._init=function(e){var r=this._baseState;pt(r.parent===null),e.call(this),r.children=r.children.filter(function(n){return n._baseState.parent===this},this),pt.equal(r.children.length,1,"Root node can have only one child")};He.prototype._useArgs=function(e){var r=this._baseState,n=e.filter(function(i){return i instanceof this.constructor},this);e=e.filter(function(i){return!(i instanceof this.constructor)},this),n.length!==0&&(pt(r.children===null),r.children=n,n.forEach(function(i){i._baseState.parent=this},this)),e.length!==0&&(pt(r.args===null),r.args=e,r.reverseArgs=e.map(function(i){if(typeof i!="object"||i.constructor!==Object)return i;var a={};return Object.keys(i).forEach(function(f){f==(f|0)&&(f|=0);var v=i[f];a[v]=f}),a}))};ZM.forEach(function(t){He.prototype[t]=function(){var r=this._baseState;throw new Error(t+" not implemented for encoding: "+r.enc)}});gg.forEach(function(t){He.prototype[t]=function(){var r=this._baseState,n=Array.prototype.slice.call(arguments);return pt(r.tag===null),r.tag=t,this._useArgs(n),this}});He.prototype.use=function(e){pt(e);var r=this._baseState;return pt(r.use===null),r.use=e,this};He.prototype.optional=function(){var e=this._baseState;return e.optional=!0,this};He.prototype.def=function(e){var r=this._baseState;return pt(r.default===null),r.default=e,r.optional=!0,this};He.prototype.explicit=function(e){var r=this._baseState;return pt(r.explicit===null&&r.implicit===null),r.explicit=e,this};He.prototype.implicit=function(e){var r=this._baseState;return pt(r.explicit===null&&r.implicit===null),r.implicit=e,this};He.prototype.obj=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return e.obj=!0,r.length!==0&&this._useArgs(r),this};He.prototype.key=function(e){var r=this._baseState;return pt(r.key===null),r.key=e,this};He.prototype.any=function(){var e=this._baseState;return e.any=!0,this};He.prototype.choice=function(e){var r=this._baseState;return pt(r.choice===null),r.choice=e,this._useArgs(Object.keys(e).map(function(n){return e[n]})),this};He.prototype.contains=function(e){var r=this._baseState;return pt(r.use===null),r.contains=e,this};He.prototype._decode=function(e,r){var n=this._baseState;if(n.parent===null)return e.wrapResult(n.children[0]._decode(e,r));var i=n.default,a=!0,f=null;if(n.key!==null&&(f=e.enterKey(n.key)),n.optional){var v=null;if(n.explicit!==null?v=n.explicit:n.implicit!==null?v=n.implicit:n.tag!==null&&(v=n.tag),v===null&&!n.any){var m=e.save();try{n.choice===null?this._decodeGeneric(n.tag,e,r):this._decodeChoice(e,r),a=!0}catch{a=!1}e.restore(m)}else if(a=this._peekTag(e,v,n.any),e.isError(a))return a}var E;if(n.obj&&a&&(E=e.enterObject()),a){if(n.explicit!==null){var A=this._decodeTag(e,n.explicit);if(e.isError(A))return A;e=A}var q=e.offset;if(n.use===null&&n.choice===null){if(n.any)var m=e.save();var I=this._decodeTag(e,n.implicit!==null?n.implicit:n.tag,n.any);if(e.isError(I))return I;n.any?i=e.raw(m):e=I}if(r&&r.track&&n.tag!==null&&r.track(e.path(),q,e.length,"tagged"),r&&r.track&&n.tag!==null&&r.track(e.path(),e.offset,e.length,"content"),n.any?i=i:n.choice===null?i=this._decodeGeneric(n.tag,e,r):i=this._decodeChoice(e,r),e.isError(i))return i;if(!n.any&&n.choice===null&&n.children!==null&&n.children.forEach(function(V){V._decode(e,r)}),n.contains&&(n.tag==="octstr"||n.tag==="bitstr")){var C=new VM(i);i=this._getUse(n.contains,e._reporterState.obj)._decode(C,r)}}return n.obj&&a&&(i=e.leaveObject(E)),n.key!==null&&(i!==null||a===!0)?e.leaveKey(f,n.key,i):f!==null&&e.exitKey(f),i};He.prototype._decodeGeneric=function(e,r,n){var i=this._baseState;return e==="seq"||e==="set"?null:e==="seqof"||e==="setof"?this._decodeList(r,e,i.args[0],n):/str$/.test(e)?this._decodeStr(r,e,n):e==="objid"&&i.args?this._decodeObjid(r,i.args[0],i.args[1],n):e==="objid"?this._decodeObjid(r,null,null,n):e==="gentime"||e==="utctime"?this._decodeTime(r,e,n):e==="null_"?this._decodeNull(r,n):e==="bool"?this._decodeBool(r,n):e==="objDesc"?this._decodeStr(r,e,n):e==="int"||e==="enum"?this._decodeInt(r,i.args&&i.args[0],n):i.use!==null?this._getUse(i.use,r._reporterState.obj)._decode(r,n):r.error("unknown tag: "+e)};He.prototype._getUse=function(e,r){var n=this._baseState;return n.useDecoder=this._use(e,r),pt(n.useDecoder._baseState.parent===null),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder};He.prototype._decodeChoice=function(e,r){var n=this._baseState,i=null,a=!1;return Object.keys(n.choice).some(function(f){var v=e.save(),m=n.choice[f];try{var E=m._decode(e,r);if(e.isError(E))return!1;i={type:f,value:E},a=!0}catch{return e.restore(v),!1}return!0},this),a?i:e.error("Choice not matched")};He.prototype._createEncoderBuffer=function(e){return new GM(e,this.reporter)};He.prototype._encode=function(e,r,n){var i=this._baseState;if(!(i.default!==null&&i.default===e)){var a=this._encodeValue(e,r,n);if(a!==void 0&&!this._skipDefault(a,r,n))return a}};He.prototype._encodeValue=function(e,r,n){var i=this._baseState;if(i.parent===null)return i.children[0]._encode(e,r||new zM);var m=null;if(this.reporter=r,i.optional&&e===void 0)if(i.default!==null)e=i.default;else return;var a=null,f=!1;if(i.any)m=this._createEncoderBuffer(e);else if(i.choice)m=this._encodeChoice(e,r);else if(i.contains)a=this._getUse(i.contains,n)._encode(e,r),f=!0;else if(i.children)a=i.children.map(function(q){if(q._baseState.tag==="null_")return q._encode(null,r,e);if(q._baseState.key===null)return r.error("Child should have a key");var I=r.enterKey(q._baseState.key);if(typeof e!="object")return r.error("Child expected, but input is not object");var C=q._encode(e[q._baseState.key],r,e);return r.leaveKey(I),C},this).filter(function(q){return q}),a=this._createEncoderBuffer(a);else if(i.tag==="seqof"||i.tag==="setof"){if(!(i.args&&i.args.length===1))return r.error("Too many args for : "+i.tag);if(!Array.isArray(e))return r.error("seqof/setof, but data is not Array");var v=this.clone();v._baseState.implicit=null,a=this._createEncoderBuffer(e.map(function(q){var I=this._baseState;return this._getUse(I.args[0],e)._encode(q,r)},v))}else i.use!==null?m=this._getUse(i.use,n)._encode(e,r):(a=this._encodePrimitive(i.tag,e),f=!0);var m;if(!i.any&&i.choice===null){var E=i.implicit!==null?i.implicit:i.tag,A=i.implicit===null?"universal":"context";E===null?i.use===null&&r.error("Tag could be omitted only for .use()"):i.use===null&&(m=this._encodeComposite(E,f,A,a))}return i.explicit!==null&&(m=this._encodeComposite(i.explicit,!1,"context",m)),m};He.prototype._encodeChoice=function(e,r){var n=this._baseState,i=n.choice[e.type];return i||pt(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),i._encode(e.value,r)};He.prototype._encodePrimitive=function(e,r){var n=this._baseState;if(/str$/.test(e))return this._encodeStr(r,e);if(e==="objid"&&n.args)return this._encodeObjid(r,n.reverseArgs[0],n.args[1]);if(e==="objid")return this._encodeObjid(r,null,null);if(e==="gentime"||e==="utctime")return this._encodeTime(r,e);if(e==="null_")return this._encodeNull();if(e==="int"||e==="enum")return this._encodeInt(r,n.args&&n.reverseArgs[0]);if(e==="bool")return this._encodeBool(r);if(e==="objDesc")return this._encodeStr(r,e);throw new Error("Unsupported tag: "+e)};He.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)};He.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}});var _n=R(wg=>{w();var Uf=wg;Uf.Reporter=yg().Reporter;Uf.DecoderBuffer=Oh().DecoderBuffer;Uf.EncoderBuffer=Oh().EncoderBuffer;Uf.Node=bg()});var xg=R(Oi=>{w();var _g=Ph();Oi.tagClass={0:"universal",1:"application",2:"context",3:"private"};Oi.tagClassByName=_g._reverse(Oi.tagClass);Oi.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"};Oi.tagByName=_g._reverse(Oi.tag)});var Ph=R(Eg=>{w();var Mg=Eg;Mg._reverse=function(e){var r={};return Object.keys(e).forEach(function(n){(n|0)==n&&(n=n|0);var i=e[n];r[i]=n}),r};Mg.der=xg()});var Nh=R((jI,Rg)=>{w();var XM=J(),Dh=bn(),Nf=Dh.base,JM=Dh.bignum,Sg=Dh.constants.der;function Bg(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new bt,this.tree._init(t.body)}Rg.exports=Bg;Bg.prototype.decode=function(e,r){return e instanceof Nf.DecoderBuffer||(e=new Nf.DecoderBuffer(e,r)),this.tree._decode(e,r)};function bt(t){Nf.Node.call(this,"der",t)}XM(bt,Nf.Node);bt.prototype._peekTag=function(e,r,n){if(e.isEmpty())return!1;var i=e.save(),a=Uh(e,'Failed to peek tag: "'+r+'"');return e.isError(a)?a:(e.restore(i),a.tag===r||a.tagStr===r||a.tagStr+"of"===r||n)};bt.prototype._decodeTag=function(e,r,n){var i=Uh(e,'Failed to decode tag of "'+r+'"');if(e.isError(i))return i;var a=Ag(e,i.primitive,'Failed to get length of "'+r+'"');if(e.isError(a))return a;if(!n&&i.tag!==r&&i.tagStr!==r&&i.tagStr+"of"!==r)return e.error('Failed to match tag: "'+r+'"');if(i.primitive||a!==null)return e.skip(a,'Failed to match body of: "'+r+'"');var f=e.save(),v=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(v)?v:(a=e.offset-f.offset,e.restore(f),e.skip(a,'Failed to match body of: "'+r+'"'))};bt.prototype._skipUntilEnd=function(e,r){for(;;){var n=Uh(e,r);if(e.isError(n))return n;var i=Ag(e,n.primitive,r);if(e.isError(i))return i;var a;if(n.primitive||i!==null?a=e.skip(i):a=this._skipUntilEnd(e,r),e.isError(a))return a;if(n.tagStr==="end")break}};bt.prototype._decodeList=function(e,r,n,i){for(var a=[];!e.isEmpty();){var f=this._peekTag(e,"end");if(e.isError(f))return f;var v=n.decode(e,"der",i);if(e.isError(v)&&f)break;a.push(v)}return a};bt.prototype._decodeStr=function(e,r){if(r==="bitstr"){var n=e.readUInt8();return e.isError(n)?n:{unused:n,data:e.raw()}}else if(r==="bmpstr"){var i=e.raw();if(i.length%2===1)return e.error("Decoding of string type: bmpstr length mismatch");for(var a="",f=0;f<i.length/2;f++)a+=String.fromCharCode(i.readUInt16BE(f*2));return a}else if(r==="numstr"){var v=e.raw().toString("ascii");return this._isNumstr(v)?v:e.error("Decoding of string type: numstr unsupported characters")}else{if(r==="octstr")return e.raw();if(r==="objDesc")return e.raw();if(r==="printstr"){var m=e.raw().toString("ascii");return this._isPrintstr(m)?m:e.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(r)?e.raw().toString():e.error("Decoding of string type: "+r+" unsupported")}};bt.prototype._decodeObjid=function(e,r,n){for(var i,a=[],f=0;!e.isEmpty();){var v=e.readUInt8();f<<=7,f|=v&127,(v&128)===0&&(a.push(f),f=0)}v&128&&a.push(f);var m=a[0]/40|0,E=a[0]%40;if(n?i=a:i=[m,E].concat(a.slice(1)),r){var A=r[i.join(" ")];A===void 0&&(A=r[i.join(".")]),A!==void 0&&(i=A)}return i};bt.prototype._decodeTime=function(e,r){var n=e.raw().toString();if(r==="gentime")var i=n.slice(0,4)|0,a=n.slice(4,6)|0,f=n.slice(6,8)|0,v=n.slice(8,10)|0,m=n.slice(10,12)|0,E=n.slice(12,14)|0;else if(r==="utctime"){var i=n.slice(0,2)|0,a=n.slice(2,4)|0,f=n.slice(4,6)|0,v=n.slice(6,8)|0,m=n.slice(8,10)|0,E=n.slice(10,12)|0;i<70?i=2e3+i:i=1900+i}else return e.error("Decoding "+r+" time is not supported yet");return Date.UTC(i,a-1,f,v,m,E,0)};bt.prototype._decodeNull=function(e){return null};bt.prototype._decodeBool=function(e){var r=e.readUInt8();return e.isError(r)?r:r!==0};bt.prototype._decodeInt=function(e,r){var n=e.raw(),i=new JM(n);return r&&(i=r[i.toString(10)]||i),i};bt.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getDecoder("der").tree};function Uh(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var n=Sg.tagClass[r>>6],i=(r&32)===0;if((r&31)===31){var a=r;for(r=0;(a&128)===128;){if(a=t.readUInt8(e),t.isError(a))return a;r<<=7,r|=a&127}}else r&=31;var f=Sg.tag[r];return{cls:n,primitive:i,tag:r,tagStr:f}}function Ag(t,e,r){var n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&n===128)return null;if((n&128)===0)return n;var i=n&127;if(i>4)return t.error("length octect is too long");n=0;for(var a=0;a<i;a++){n<<=8;var f=t.readUInt8(r);if(t.isError(f))return f;n|=f}return n}});var Ig=R((KI,qg)=>{w();var QM=J(),eE=ft().Buffer,Lh=Nh();function Fh(t){Lh.call(this,t),this.enc="pem"}QM(Fh,Lh);qg.exports=Fh;Fh.prototype.decode=function(e,r){for(var n=e.toString().split(/[\r\n]+/g),i=r.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,f=-1,v=-1,m=0;m<n.length;m++){var E=n[m].match(a);if(E!==null&&E[2]===i)if(f===-1){if(E[1]!=="BEGIN")break;f=m}else{if(E[1]!=="END")break;v=m;break}}if(f===-1||v===-1)throw new Error("PEM section not found for: "+i);var A=n.slice(f+1,v).join("");A.replace(/[^a-z0-9\+\/=]+/gi,"");var q=new eE(A,"base64");return Lh.prototype.decode.call(this,q,r)}});var Cg=R(Tg=>{w();var kg=Tg;kg.der=Nh();kg.pem=Ig()});var Hh=R((VI,Ug)=>{w();var tE=J(),Er=ft().Buffer,Og=bn(),Pg=Og.base,jh=Og.constants.der;function Dg(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new Ut,this.tree._init(t.body)}Ug.exports=Dg;Dg.prototype.encode=function(e,r){return this.tree._encode(e,r).join()};function Ut(t){Pg.Node.call(this,"der",t)}tE(Ut,Pg.Node);Ut.prototype._encodeComposite=function(e,r,n,i){var a=rE(e,r,n,this.reporter);if(i.length<128){var m=new Er(2);return m[0]=a,m[1]=i.length,this._createEncoderBuffer([m,i])}for(var f=1,v=i.length;v>=256;v>>=8)f++;var m=new Er(2+f);m[0]=a,m[1]=128|f;for(var v=1+f,E=i.length;E>0;v--,E>>=8)m[v]=E&255;return this._createEncoderBuffer([m,i])};Ut.prototype._encodeStr=function(e,r){if(r==="bitstr")return this._createEncoderBuffer([e.unused|0,e.data]);if(r==="bmpstr"){for(var n=new Er(e.length*2),i=0;i<e.length;i++)n.writeUInt16BE(e.charCodeAt(i),i*2);return this._createEncoderBuffer(n)}else return r==="numstr"?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):r==="printstr"?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(r)?this._createEncoderBuffer(e):r==="objDesc"?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+r+" unsupported")};Ut.prototype._encodeObjid=function(e,r,n){if(typeof e=="string"){if(!r)return this.reporter.error("string objid given, but no values map found");if(!r.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=r[e].split(/[\s\.]+/g);for(var i=0;i<e.length;i++)e[i]|=0}else if(Array.isArray(e)){e=e.slice();for(var i=0;i<e.length;i++)e[i]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!n){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,e[0]*40+e[1])}for(var a=0,i=0;i<e.length;i++){var f=e[i];for(a++;f>=128;f>>=7)a++}for(var v=new Er(a),m=v.length-1,i=e.length-1;i>=0;i--){var f=e[i];for(v[m--]=f&127;(f>>=7)>0;)v[m--]=128|f&127}return this._createEncoderBuffer(v)};function qt(t){return t<10?"0"+t:t}Ut.prototype._encodeTime=function(e,r){var n,i=new Date(e);return r==="gentime"?n=[qt(i.getFullYear()),qt(i.getUTCMonth()+1),qt(i.getUTCDate()),qt(i.getUTCHours()),qt(i.getUTCMinutes()),qt(i.getUTCSeconds()),"Z"].join(""):r==="utctime"?n=[qt(i.getFullYear()%100),qt(i.getUTCMonth()+1),qt(i.getUTCDate()),qt(i.getUTCHours()),qt(i.getUTCMinutes()),qt(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+r+" time is not supported yet"),this._encodeStr(n,"octstr")};Ut.prototype._encodeNull=function(){return this._createEncoderBuffer("")};Ut.prototype._encodeInt=function(e,r){if(typeof e=="string"){if(!r)return this.reporter.error("String int or enum given, but no values map");if(!r.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=r[e]}if(typeof e!="number"&&!Er.isBuffer(e)){var n=e.toArray();!e.sign&&n[0]&128&&n.unshift(0),e=new Er(n)}if(Er.isBuffer(e)){var i=e.length;e.length===0&&i++;var f=new Er(i);return e.copy(f),e.length===0&&(f[0]=0),this._createEncoderBuffer(f)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var i=1,a=e;a>=256;a>>=8)i++;for(var f=new Array(i),a=f.length-1;a>=0;a--)f[a]=e&255,e>>=8;return f[0]&128&&f.unshift(0),this._createEncoderBuffer(new Er(f))};Ut.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)};Ut.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getEncoder("der").tree};Ut.prototype._skipDefault=function(e,r,n){var i=this._baseState,a;if(i.default===null)return!1;var f=e.join();if(i.defaultBuffer===void 0&&(i.defaultBuffer=this._encodeValue(i.default,r,n).join()),f.length!==i.defaultBuffer.length)return!1;for(a=0;a<f.length;a++)if(f[a]!==i.defaultBuffer[a])return!1;return!0};function rE(t,e,r,n){var i;if(t==="seqof"?t="seq":t==="setof"&&(t="set"),jh.tagByName.hasOwnProperty(t))i=jh.tagByName[t];else if(typeof t=="number"&&(t|0)===t)i=t;else return n.error("Unknown tag: "+t);return i>=31?n.error("Multi-octet tag encoding unsupported"):(e||(i|=32),i|=jh.tagClassByName[r||"universal"]<<6,i)}});var Lg=R((ZI,Ng)=>{w();var iE=J(),Kh=Hh();function Wh(t){Kh.call(this,t),this.enc="pem"}iE(Wh,Kh);Ng.exports=Wh;Wh.prototype.encode=function(e,r){for(var n=Kh.prototype.encode.call(this,e),i=n.toString("base64"),a=["-----BEGIN "+r.label+"-----"],f=0;f<i.length;f+=64)a.push(i.slice(f,f+64));return a.push("-----END "+r.label+"-----"),a.join(`
|
|
14
|
+
`)}});var Hg=R(jg=>{w();var Fg=jg;Fg.der=Hh();Fg.pem=Lg()});var bn=R(Kg=>{w();var xn=Kg;xn.bignum=lr();xn.define=pg().define;xn.base=_n();xn.constants=Ph();xn.decoders=Cg();xn.encoders=Hg()});var Vg=R((tk,Gg)=>{"use strict";w();var Nt=bn(),Wg=Nt.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),nE=Nt.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),zh=Nt.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),aE=Nt.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(zh),this.key("subjectPublicKey").bitstr())}),oE=Nt.define("RelativeDistinguishedName",function(){this.setof(nE)}),fE=Nt.define("RDNSequence",function(){this.seqof(oE)}),zg=Nt.define("Name",function(){this.choice({rdnSequence:this.use(fE)})}),sE=Nt.define("Validity",function(){this.seq().obj(this.key("notBefore").use(Wg),this.key("notAfter").use(Wg))}),uE=Nt.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),hE=Nt.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(zh),this.key("issuer").use(zg),this.key("validity").use(sE),this.key("subject").use(zg),this.key("subjectPublicKeyInfo").use(aE),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(uE).optional())}),lE=Nt.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(hE),this.key("signatureAlgorithm").use(zh),this.key("signatureValue").bitstr())});Gg.exports=lE});var Zg=R(Ft=>{"use strict";w();var Lt=bn();Ft.certificate=Vg();var cE=Lt.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())});Ft.RSAPrivateKey=cE;var dE=Lt.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});Ft.RSAPublicKey=dE;var $g=Lt.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())}),pE=Lt.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use($g),this.key("subjectPublicKey").bitstr())});Ft.PublicKey=pE;var vE=Lt.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use($g),this.key("subjectPrivateKey").octstr())});Ft.PrivateKey=vE;var yE=Lt.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())});Ft.EncryptedPrivateKey=yE;var gE=Lt.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())});Ft.DSAPrivateKey=gE;Ft.DSAparam=Lt.define("DSAparam",function(){this.int()});var mE=Lt.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),bE=Lt.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(mE),this.key("publicKey").optional().explicit(1).bitstr())});Ft.ECPrivateKey=bE;Ft.signature=Lt.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})});var Yg=R((ak,wE)=>{wE.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"}});var Jg=R((ok,Xg)=>{"use strict";w();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,xE=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,ME=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,EE=Na(),SE=Tf(),Lf=ke().Buffer;Xg.exports=function(t,e){var r=t.toString(),n=r.match(_E),i;if(n){var f="aes"+n[1],v=Lf.from(n[2],"hex"),m=Lf.from(n[3].replace(/[\r\n]/g,""),"base64"),E=EE(e,v.slice(0,8),parseInt(n[1],10)).key,A=[],q=SE.createDecipheriv(f,E,v);A.push(q.update(m)),A.push(q.final()),i=Lf.concat(A)}else{var a=r.match(ME);i=Lf.from(a[2].replace(/[\r\n]/g,""),"base64")}var I=r.match(xE)[1];return{tag:I,data:i}}});var Vh=R((sk,em)=>{"use strict";w();var gt=Zg(),BE=Yg(),AE=Jg(),RE=Tf(),qE=ih().pbkdf2Sync,Gh=ke().Buffer;function IE(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),i=BE[t.algorithm.decrypt.cipher.algo.join(".")],a=t.algorithm.decrypt.cipher.iv,f=t.subjectPrivateKey,v=parseInt(i.split("-")[1],10)/8,m=qE(e,r,n,v,"sha1"),E=RE.createDecipheriv(i,m,a),A=[];return A.push(E.update(f)),A.push(E.final()),Gh.concat(A)}function Qg(t){var e;typeof t=="object"&&!Gh.isBuffer(t)&&(e=t.passphrase,t=t.key),typeof t=="string"&&(t=Gh.from(t));var r=AE(t,e),n=r.tag,i=r.data,a,f;switch(n){case"CERTIFICATE":f=gt.certificate.decode(i,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(f||(f=gt.PublicKey.decode(i,"der")),a=f.algorithm.algorithm.join("."),a){case"1.2.840.113549.1.1.1":return gt.RSAPublicKey.decode(f.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return f.subjectPrivateKey=f.subjectPublicKey,{type:"ec",data:f};case"1.2.840.10040.4.1":return f.algorithm.params.pub_key=gt.DSAparam.decode(f.subjectPublicKey.data,"der"),{type:"dsa",data:f.algorithm.params};default:throw new Error("unknown key id "+a)}case"ENCRYPTED PRIVATE KEY":i=gt.EncryptedPrivateKey.decode(i,"der"),i=IE(i,e);case"PRIVATE KEY":switch(f=gt.PrivateKey.decode(i,"der"),a=f.algorithm.algorithm.join("."),a){case"1.2.840.113549.1.1.1":return gt.RSAPrivateKey.decode(f.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:f.algorithm.curve,privateKey:gt.ECPrivateKey.decode(f.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return f.algorithm.params.priv_key=gt.DSAparam.decode(f.subjectPrivateKey,"der"),{type:"dsa",params:f.algorithm.params};default:throw new Error("unknown key id "+a)}case"RSA PUBLIC KEY":return gt.RSAPublicKey.decode(i,"der");case"RSA PRIVATE KEY":return gt.RSAPrivateKey.decode(i,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:gt.DSAPrivateKey.decode(i,"der")};case"EC PRIVATE KEY":return i=gt.ECPrivateKey.decode(i,"der"),{curve:i.parameters.value,privateKey:i.privateKey};default:throw new Error("unknown key type "+n)}}Qg.signature=gt.signature;em.exports=Qg});var Zh=R((hk,tm)=>{w();var kE=Ia(),$h=ke().Buffer;tm.exports=function(t,e){for(var r=$h.alloc(0),n=0,i;r.length<e;)i=TE(n++),r=$h.concat([r,kE("sha1").update(t).update(i).digest()]);return r.slice(0,e)};function TE(t){var e=$h.allocUnsafe(4);return e.writeUInt32BE(t,0),e}});var Yh=R((ck,rm)=>{w();rm.exports=function(e,r){for(var n=e.length,i=-1;++i<n;)e[i]^=r[i];return e}});var Xh=R((pk,nm)=>{w();var im=lr(),CE=ke().Buffer;function OE(t,e){return CE.from(t.toRed(im.mont(e.modulus)).redPow(new im(e.publicExponent)).fromRed().toArray())}nm.exports=OE});var om=R((am,Jh)=>{w();(function(t,e){"use strict";function r(l,o){if(!l)throw new Error(o||"Assertion failed")}function n(l,o){l.super_=o;var s=function(){};s.prototype=o.prototype,l.prototype=new s,l.prototype.constructor=l}function i(l,o,s){if(i.isBN(l))return l;this.negative=0,this.words=null,this.length=0,this.red=null,l!==null&&((o==="le"||o==="be")&&(s=o,o=10),this._init(l||0,o||10,s||"be"))}typeof t=="object"?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=ft().Buffer}catch{}i.isBN=function(o){return o instanceof i?!0:o!==null&&typeof o=="object"&&o.constructor.wordSize===i.wordSize&&Array.isArray(o.words)},i.max=function(o,s){return o.cmp(s)>0?o:s},i.min=function(o,s){return o.cmp(s)<0?o:s},i.prototype._init=function(o,s,d){if(typeof o=="number")return this._initNumber(o,s,d);if(typeof o=="object")return this._initArray(o,s,d);s==="hex"&&(s=16),r(s===(s|0)&&s>=2&&s<=36),o=o.toString().replace(/\s+/g,"");var g=0;o[0]==="-"&&(g++,this.negative=1),g<o.length&&(s===16?this._parseHex(o,g,d):(this._parseBase(o,s,g),d==="le"&&this._initArray(this.toArray(),s,d)))},i.prototype._initNumber=function(o,s,d){o<0&&(this.negative=1,o=-o),o<67108864?(this.words=[o&67108863],this.length=1):o<4503599627370496?(this.words=[o&67108863,o/67108864&67108863],this.length=2):(r(o<9007199254740992),this.words=[o&67108863,o/67108864&67108863,1],this.length=3),d==="le"&&this._initArray(this.toArray(),s,d)},i.prototype._initArray=function(o,s,d){if(r(typeof o.length=="number"),o.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(o.length/3),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var p,u,b=0;if(d==="be")for(g=o.length-1,p=0;g>=0;g-=3)u=o[g]|o[g-1]<<8|o[g-2]<<16,this.words[p]|=u<<b&67108863,this.words[p+1]=u>>>26-b&67108863,b+=24,b>=26&&(b-=26,p++);else if(d==="le")for(g=0,p=0;g<o.length;g+=3)u=o[g]|o[g+1]<<8|o[g+2]<<16,this.words[p]|=u<<b&67108863,this.words[p+1]=u>>>26-b&67108863,b+=24,b>=26&&(b-=26,p++);return this._strip()};function f(l,o){var s=l.charCodeAt(o);if(s>=48&&s<=57)return s-48;if(s>=65&&s<=70)return s-55;if(s>=97&&s<=102)return s-87;r(!1,"Invalid character in "+l)}function v(l,o,s){var d=f(l,s);return s-1>=o&&(d|=f(l,s-1)<<4),d}i.prototype._parseHex=function(o,s,d){this.length=Math.ceil((o.length-s)/6),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var p=0,u=0,b;if(d==="be")for(g=o.length-1;g>=s;g-=2)b=v(o,s,g)<<p,this.words[u]|=b&67108863,p>=18?(p-=18,u+=1,this.words[u]|=b>>>26):p+=8;else{var _=o.length-s;for(g=_%2===0?s+1:s;g<o.length;g+=2)b=v(o,s,g)<<p,this.words[u]|=b&67108863,p>=18?(p-=18,u+=1,this.words[u]|=b>>>26):p+=8}this._strip()};function m(l,o,s,d){for(var g=0,p=0,u=Math.min(l.length,s),b=o;b<u;b++){var _=l.charCodeAt(b)-48;g*=d,_>=49?p=_-49+10:_>=17?p=_-17+10:p=_,r(_>=0&&p<d,"Invalid character"),g+=p}return g}i.prototype._parseBase=function(o,s,d){this.words=[0],this.length=1;for(var g=0,p=1;p<=67108863;p*=s)g++;g--,p=p/s|0;for(var u=o.length-d,b=u%g,_=Math.min(u,u-b)+d,c=0,x=d;x<_;x+=g)c=m(o,x,x+g,s),this.imuln(p),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(b!==0){var P=1;for(c=m(o,x,o.length,s),x=0;x<b;x++)P*=s;this.imuln(P),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},i.prototype.copy=function(o){o.words=new Array(this.length);for(var s=0;s<this.length;s++)o.words[s]=this.words[s];o.length=this.length,o.negative=this.negative,o.red=this.red};function E(l,o){l.words=o.words,l.length=o.length,l.negative=o.negative,l.red=o.red}if(i.prototype._move=function(o){E(o,this)},i.prototype.clone=function(){var o=new i(null);return this.copy(o),o},i.prototype._expand=function(o){for(;this.length<o;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=A}catch{i.prototype.inspect=A}else i.prototype.inspect=A;function A(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var q=["","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"],I=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],C=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(o,s){o=o||10,s=s|0||1;var d;if(o===16||o==="hex"){d="";for(var g=0,p=0,u=0;u<this.length;u++){var b=this.words[u],_=((b<<g|p)&16777215).toString(16);p=b>>>24-g&16777215,g+=2,g>=26&&(g-=26,u--),p!==0||u!==this.length-1?d=q[6-_.length]+_+d:d=_+d}for(p!==0&&(d=p.toString(16)+d);d.length%s!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}if(o===(o|0)&&o>=2&&o<=36){var c=I[o],x=C[o];d="";var P=this.clone();for(P.negative=0;!P.isZero();){var N=P.modrn(x).toString(o);P=P.idivn(x),P.isZero()?d=N+d:d=q[c-N.length]+N+d}for(this.isZero()&&(d="0"+d);d.length%s!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var o=this.words[0];return this.length===2?o+=this.words[1]*67108864:this.length===3&&this.words[2]===1?o+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-o:o},i.prototype.toJSON=function(){return this.toString(16,2)},a&&(i.prototype.toBuffer=function(o,s){return this.toArrayLike(a,o,s)}),i.prototype.toArray=function(o,s){return this.toArrayLike(Array,o,s)};var j=function(o,s){return o.allocUnsafe?o.allocUnsafe(s):new o(s)};i.prototype.toArrayLike=function(o,s,d){this._strip();var g=this.byteLength(),p=d||Math.max(1,g);r(g<=p,"byte array longer than desired length"),r(p>0,"Requested array length <= 0");var u=j(o,p),b=s==="le"?"LE":"BE";return this["_toArrayLike"+b](u,g),u},i.prototype._toArrayLikeLE=function(o,s){for(var d=0,g=0,p=0,u=0;p<this.length;p++){var b=this.words[p]<<u|g;o[d++]=b&255,d<o.length&&(o[d++]=b>>8&255),d<o.length&&(o[d++]=b>>16&255),u===6?(d<o.length&&(o[d++]=b>>24&255),g=0,u=0):(g=b>>>24,u+=2)}if(d<o.length)for(o[d++]=g;d<o.length;)o[d++]=0},i.prototype._toArrayLikeBE=function(o,s){for(var d=o.length-1,g=0,p=0,u=0;p<this.length;p++){var b=this.words[p]<<u|g;o[d--]=b&255,d>=0&&(o[d--]=b>>8&255),d>=0&&(o[d--]=b>>16&255),u===6?(d>=0&&(o[d--]=b>>24&255),g=0,u=0):(g=b>>>24,u+=2)}if(d>=0)for(o[d--]=g;d>=0;)o[d--]=0},Math.clz32?i.prototype._countBits=function(o){return 32-Math.clz32(o)}:i.prototype._countBits=function(o){var s=o,d=0;return s>=4096&&(d+=13,s>>>=13),s>=64&&(d+=7,s>>>=7),s>=8&&(d+=4,s>>>=4),s>=2&&(d+=2,s>>>=2),d+s},i.prototype._zeroBits=function(o){if(o===0)return 26;var s=o,d=0;return(s&8191)===0&&(d+=13,s>>>=13),(s&127)===0&&(d+=7,s>>>=7),(s&15)===0&&(d+=4,s>>>=4),(s&3)===0&&(d+=2,s>>>=2),(s&1)===0&&d++,d},i.prototype.bitLength=function(){var o=this.words[this.length-1],s=this._countBits(o);return(this.length-1)*26+s};function V(l){for(var o=new Array(l.bitLength()),s=0;s<o.length;s++){var d=s/26|0,g=s%26;o[s]=l.words[d]>>>g&1}return o}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,s=0;s<this.length;s++){var d=this._zeroBits(this.words[s]);if(o+=d,d!==26)break}return o},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(o){return this.negative!==0?this.abs().inotn(o).iaddn(1):this.clone()},i.prototype.fromTwos=function(o){return this.testn(o-1)?this.notn(o).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(o){for(;this.length<o.length;)this.words[this.length++]=0;for(var s=0;s<o.length;s++)this.words[s]=this.words[s]|o.words[s];return this._strip()},i.prototype.ior=function(o){return r((this.negative|o.negative)===0),this.iuor(o)},i.prototype.or=function(o){return this.length>o.length?this.clone().ior(o):o.clone().ior(this)},i.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},i.prototype.iuand=function(o){var s;this.length>o.length?s=o:s=this;for(var d=0;d<s.length;d++)this.words[d]=this.words[d]&o.words[d];return this.length=s.length,this._strip()},i.prototype.iand=function(o){return r((this.negative|o.negative)===0),this.iuand(o)},i.prototype.and=function(o){return this.length>o.length?this.clone().iand(o):o.clone().iand(this)},i.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},i.prototype.iuxor=function(o){var s,d;this.length>o.length?(s=this,d=o):(s=o,d=this);for(var g=0;g<d.length;g++)this.words[g]=s.words[g]^d.words[g];if(this!==s)for(;g<s.length;g++)this.words[g]=s.words[g];return this.length=s.length,this._strip()},i.prototype.ixor=function(o){return r((this.negative|o.negative)===0),this.iuxor(o)},i.prototype.xor=function(o){return this.length>o.length?this.clone().ixor(o):o.clone().ixor(this)},i.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},i.prototype.inotn=function(o){r(typeof o=="number"&&o>=0);var s=Math.ceil(o/26)|0,d=o%26;this._expand(s),d>0&&s--;for(var g=0;g<s;g++)this.words[g]=~this.words[g]&67108863;return d>0&&(this.words[g]=~this.words[g]&67108863>>26-d),this._strip()},i.prototype.notn=function(o){return this.clone().inotn(o)},i.prototype.setn=function(o,s){r(typeof o=="number"&&o>=0);var d=o/26|0,g=o%26;return this._expand(d+1),s?this.words[d]=this.words[d]|1<<g:this.words[d]=this.words[d]&~(1<<g),this._strip()},i.prototype.iadd=function(o){var s;if(this.negative!==0&&o.negative===0)return this.negative=0,s=this.isub(o),this.negative^=1,this._normSign();if(this.negative===0&&o.negative!==0)return o.negative=0,s=this.isub(o),o.negative=1,s._normSign();var d,g;this.length>o.length?(d=this,g=o):(d=o,g=this);for(var p=0,u=0;u<g.length;u++)s=(d.words[u]|0)+(g.words[u]|0)+p,this.words[u]=s&67108863,p=s>>>26;for(;p!==0&&u<d.length;u++)s=(d.words[u]|0)+p,this.words[u]=s&67108863,p=s>>>26;if(this.length=d.length,p!==0)this.words[this.length]=p,this.length++;else if(d!==this)for(;u<d.length;u++)this.words[u]=d.words[u];return this},i.prototype.add=function(o){var s;return o.negative!==0&&this.negative===0?(o.negative=0,s=this.sub(o),o.negative^=1,s):o.negative===0&&this.negative!==0?(this.negative=0,s=o.sub(this),this.negative=1,s):this.length>o.length?this.clone().iadd(o):o.clone().iadd(this)},i.prototype.isub=function(o){if(o.negative!==0){o.negative=0;var s=this.iadd(o);return o.negative=1,s._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var d=this.cmp(o);if(d===0)return this.negative=0,this.length=1,this.words[0]=0,this;var g,p;d>0?(g=this,p=o):(g=o,p=this);for(var u=0,b=0;b<p.length;b++)s=(g.words[b]|0)-(p.words[b]|0)+u,u=s>>26,this.words[b]=s&67108863;for(;u!==0&&b<g.length;b++)s=(g.words[b]|0)+u,u=s>>26,this.words[b]=s&67108863;if(u===0&&b<g.length&&g!==this)for(;b<g.length;b++)this.words[b]=g.words[b];return this.length=Math.max(this.length,b),g!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(o){return this.clone().isub(o)};function X(l,o,s){s.negative=o.negative^l.negative;var d=l.length+o.length|0;s.length=d,d=d-1|0;var g=l.words[0]|0,p=o.words[0]|0,u=g*p,b=u&67108863,_=u/67108864|0;s.words[0]=b;for(var c=1;c<d;c++){for(var x=_>>>26,P=_&67108863,N=Math.min(c,o.length-1),U=Math.max(0,c-l.length+1);U<=N;U++){var W=c-U|0;g=l.words[W]|0,p=o.words[U]|0,u=g*p+P,x+=u/67108864|0,P=u&67108863}s.words[c]=P|0,_=x|0}return _!==0?s.words[c]=_|0:s.length--,s._strip()}var z=function(o,s,d){var g=o.words,p=s.words,u=d.words,b=0,_,c,x,P=g[0]|0,N=P&8191,U=P>>>13,W=g[1]|0,K=W&8191,G=W>>>13,It=g[2]|0,Z=It&8191,Y=It>>>13,Tn=g[3]|0,Q=Tn&8191,ee=Tn>>>13,Cn=g[4]|0,te=Cn&8191,re=Cn>>>13,On=g[5]|0,ie=On&8191,ne=On>>>13,Pn=g[6]|0,ae=Pn&8191,oe=Pn>>>13,Dn=g[7]|0,fe=Dn&8191,se=Dn>>>13,Un=g[8]|0,ue=Un&8191,he=Un>>>13,Nn=g[9]|0,le=Nn&8191,ce=Nn>>>13,Ln=p[0]|0,de=Ln&8191,pe=Ln>>>13,Fn=p[1]|0,ve=Fn&8191,ye=Fn>>>13,jn=p[2]|0,ge=jn&8191,me=jn>>>13,Hn=p[3]|0,be=Hn&8191,we=Hn>>>13,Kn=p[4]|0,_e=Kn&8191,xe=Kn>>>13,Wn=p[5]|0,Me=Wn&8191,Ee=Wn>>>13,zn=p[6]|0,Se=zn&8191,Be=zn>>>13,Gn=p[7]|0,Ae=Gn&8191,Re=Gn>>>13,Vn=p[8]|0,qe=Vn&8191,Ie=Vn>>>13,Ui=p[9]|0,Ge=Ui&8191,Ve=Ui>>>13;d.negative=o.negative^s.negative,d.length=19,_=Math.imul(N,de),c=Math.imul(N,pe),c=c+Math.imul(U,de)|0,x=Math.imul(U,pe);var Kr=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Kr>>>26)|0,Kr&=67108863,_=Math.imul(K,de),c=Math.imul(K,pe),c=c+Math.imul(G,de)|0,x=Math.imul(G,pe),_=_+Math.imul(N,ve)|0,c=c+Math.imul(N,ye)|0,c=c+Math.imul(U,ve)|0,x=x+Math.imul(U,ye)|0;var Wr=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,_=Math.imul(Z,de),c=Math.imul(Z,pe),c=c+Math.imul(Y,de)|0,x=Math.imul(Y,pe),_=_+Math.imul(K,ve)|0,c=c+Math.imul(K,ye)|0,c=c+Math.imul(G,ve)|0,x=x+Math.imul(G,ye)|0,_=_+Math.imul(N,ge)|0,c=c+Math.imul(N,me)|0,c=c+Math.imul(U,ge)|0,x=x+Math.imul(U,me)|0;var zr=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(zr>>>26)|0,zr&=67108863,_=Math.imul(Q,de),c=Math.imul(Q,pe),c=c+Math.imul(ee,de)|0,x=Math.imul(ee,pe),_=_+Math.imul(Z,ve)|0,c=c+Math.imul(Z,ye)|0,c=c+Math.imul(Y,ve)|0,x=x+Math.imul(Y,ye)|0,_=_+Math.imul(K,ge)|0,c=c+Math.imul(K,me)|0,c=c+Math.imul(G,ge)|0,x=x+Math.imul(G,me)|0,_=_+Math.imul(N,be)|0,c=c+Math.imul(N,we)|0,c=c+Math.imul(U,be)|0,x=x+Math.imul(U,we)|0;var Gr=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,_=Math.imul(te,de),c=Math.imul(te,pe),c=c+Math.imul(re,de)|0,x=Math.imul(re,pe),_=_+Math.imul(Q,ve)|0,c=c+Math.imul(Q,ye)|0,c=c+Math.imul(ee,ve)|0,x=x+Math.imul(ee,ye)|0,_=_+Math.imul(Z,ge)|0,c=c+Math.imul(Z,me)|0,c=c+Math.imul(Y,ge)|0,x=x+Math.imul(Y,me)|0,_=_+Math.imul(K,be)|0,c=c+Math.imul(K,we)|0,c=c+Math.imul(G,be)|0,x=x+Math.imul(G,we)|0,_=_+Math.imul(N,_e)|0,c=c+Math.imul(N,xe)|0,c=c+Math.imul(U,_e)|0,x=x+Math.imul(U,xe)|0;var Vr=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,_=Math.imul(ie,de),c=Math.imul(ie,pe),c=c+Math.imul(ne,de)|0,x=Math.imul(ne,pe),_=_+Math.imul(te,ve)|0,c=c+Math.imul(te,ye)|0,c=c+Math.imul(re,ve)|0,x=x+Math.imul(re,ye)|0,_=_+Math.imul(Q,ge)|0,c=c+Math.imul(Q,me)|0,c=c+Math.imul(ee,ge)|0,x=x+Math.imul(ee,me)|0,_=_+Math.imul(Z,be)|0,c=c+Math.imul(Z,we)|0,c=c+Math.imul(Y,be)|0,x=x+Math.imul(Y,we)|0,_=_+Math.imul(K,_e)|0,c=c+Math.imul(K,xe)|0,c=c+Math.imul(G,_e)|0,x=x+Math.imul(G,xe)|0,_=_+Math.imul(N,Me)|0,c=c+Math.imul(N,Ee)|0,c=c+Math.imul(U,Me)|0,x=x+Math.imul(U,Ee)|0;var $r=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+($r>>>26)|0,$r&=67108863,_=Math.imul(ae,de),c=Math.imul(ae,pe),c=c+Math.imul(oe,de)|0,x=Math.imul(oe,pe),_=_+Math.imul(ie,ve)|0,c=c+Math.imul(ie,ye)|0,c=c+Math.imul(ne,ve)|0,x=x+Math.imul(ne,ye)|0,_=_+Math.imul(te,ge)|0,c=c+Math.imul(te,me)|0,c=c+Math.imul(re,ge)|0,x=x+Math.imul(re,me)|0,_=_+Math.imul(Q,be)|0,c=c+Math.imul(Q,we)|0,c=c+Math.imul(ee,be)|0,x=x+Math.imul(ee,we)|0,_=_+Math.imul(Z,_e)|0,c=c+Math.imul(Z,xe)|0,c=c+Math.imul(Y,_e)|0,x=x+Math.imul(Y,xe)|0,_=_+Math.imul(K,Me)|0,c=c+Math.imul(K,Ee)|0,c=c+Math.imul(G,Me)|0,x=x+Math.imul(G,Ee)|0,_=_+Math.imul(N,Se)|0,c=c+Math.imul(N,Be)|0,c=c+Math.imul(U,Se)|0,x=x+Math.imul(U,Be)|0;var Zr=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,_=Math.imul(fe,de),c=Math.imul(fe,pe),c=c+Math.imul(se,de)|0,x=Math.imul(se,pe),_=_+Math.imul(ae,ve)|0,c=c+Math.imul(ae,ye)|0,c=c+Math.imul(oe,ve)|0,x=x+Math.imul(oe,ye)|0,_=_+Math.imul(ie,ge)|0,c=c+Math.imul(ie,me)|0,c=c+Math.imul(ne,ge)|0,x=x+Math.imul(ne,me)|0,_=_+Math.imul(te,be)|0,c=c+Math.imul(te,we)|0,c=c+Math.imul(re,be)|0,x=x+Math.imul(re,we)|0,_=_+Math.imul(Q,_e)|0,c=c+Math.imul(Q,xe)|0,c=c+Math.imul(ee,_e)|0,x=x+Math.imul(ee,xe)|0,_=_+Math.imul(Z,Me)|0,c=c+Math.imul(Z,Ee)|0,c=c+Math.imul(Y,Me)|0,x=x+Math.imul(Y,Ee)|0,_=_+Math.imul(K,Se)|0,c=c+Math.imul(K,Be)|0,c=c+Math.imul(G,Se)|0,x=x+Math.imul(G,Be)|0,_=_+Math.imul(N,Ae)|0,c=c+Math.imul(N,Re)|0,c=c+Math.imul(U,Ae)|0,x=x+Math.imul(U,Re)|0;var Yr=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Yr>>>26)|0,Yr&=67108863,_=Math.imul(ue,de),c=Math.imul(ue,pe),c=c+Math.imul(he,de)|0,x=Math.imul(he,pe),_=_+Math.imul(fe,ve)|0,c=c+Math.imul(fe,ye)|0,c=c+Math.imul(se,ve)|0,x=x+Math.imul(se,ye)|0,_=_+Math.imul(ae,ge)|0,c=c+Math.imul(ae,me)|0,c=c+Math.imul(oe,ge)|0,x=x+Math.imul(oe,me)|0,_=_+Math.imul(ie,be)|0,c=c+Math.imul(ie,we)|0,c=c+Math.imul(ne,be)|0,x=x+Math.imul(ne,we)|0,_=_+Math.imul(te,_e)|0,c=c+Math.imul(te,xe)|0,c=c+Math.imul(re,_e)|0,x=x+Math.imul(re,xe)|0,_=_+Math.imul(Q,Me)|0,c=c+Math.imul(Q,Ee)|0,c=c+Math.imul(ee,Me)|0,x=x+Math.imul(ee,Ee)|0,_=_+Math.imul(Z,Se)|0,c=c+Math.imul(Z,Be)|0,c=c+Math.imul(Y,Se)|0,x=x+Math.imul(Y,Be)|0,_=_+Math.imul(K,Ae)|0,c=c+Math.imul(K,Re)|0,c=c+Math.imul(G,Ae)|0,x=x+Math.imul(G,Re)|0,_=_+Math.imul(N,qe)|0,c=c+Math.imul(N,Ie)|0,c=c+Math.imul(U,qe)|0,x=x+Math.imul(U,Ie)|0;var Xr=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,_=Math.imul(le,de),c=Math.imul(le,pe),c=c+Math.imul(ce,de)|0,x=Math.imul(ce,pe),_=_+Math.imul(ue,ve)|0,c=c+Math.imul(ue,ye)|0,c=c+Math.imul(he,ve)|0,x=x+Math.imul(he,ye)|0,_=_+Math.imul(fe,ge)|0,c=c+Math.imul(fe,me)|0,c=c+Math.imul(se,ge)|0,x=x+Math.imul(se,me)|0,_=_+Math.imul(ae,be)|0,c=c+Math.imul(ae,we)|0,c=c+Math.imul(oe,be)|0,x=x+Math.imul(oe,we)|0,_=_+Math.imul(ie,_e)|0,c=c+Math.imul(ie,xe)|0,c=c+Math.imul(ne,_e)|0,x=x+Math.imul(ne,xe)|0,_=_+Math.imul(te,Me)|0,c=c+Math.imul(te,Ee)|0,c=c+Math.imul(re,Me)|0,x=x+Math.imul(re,Ee)|0,_=_+Math.imul(Q,Se)|0,c=c+Math.imul(Q,Be)|0,c=c+Math.imul(ee,Se)|0,x=x+Math.imul(ee,Be)|0,_=_+Math.imul(Z,Ae)|0,c=c+Math.imul(Z,Re)|0,c=c+Math.imul(Y,Ae)|0,x=x+Math.imul(Y,Re)|0,_=_+Math.imul(K,qe)|0,c=c+Math.imul(K,Ie)|0,c=c+Math.imul(G,qe)|0,x=x+Math.imul(G,Ie)|0,_=_+Math.imul(N,Ge)|0,c=c+Math.imul(N,Ve)|0,c=c+Math.imul(U,Ge)|0,x=x+Math.imul(U,Ve)|0;var Jr=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,_=Math.imul(le,ve),c=Math.imul(le,ye),c=c+Math.imul(ce,ve)|0,x=Math.imul(ce,ye),_=_+Math.imul(ue,ge)|0,c=c+Math.imul(ue,me)|0,c=c+Math.imul(he,ge)|0,x=x+Math.imul(he,me)|0,_=_+Math.imul(fe,be)|0,c=c+Math.imul(fe,we)|0,c=c+Math.imul(se,be)|0,x=x+Math.imul(se,we)|0,_=_+Math.imul(ae,_e)|0,c=c+Math.imul(ae,xe)|0,c=c+Math.imul(oe,_e)|0,x=x+Math.imul(oe,xe)|0,_=_+Math.imul(ie,Me)|0,c=c+Math.imul(ie,Ee)|0,c=c+Math.imul(ne,Me)|0,x=x+Math.imul(ne,Ee)|0,_=_+Math.imul(te,Se)|0,c=c+Math.imul(te,Be)|0,c=c+Math.imul(re,Se)|0,x=x+Math.imul(re,Be)|0,_=_+Math.imul(Q,Ae)|0,c=c+Math.imul(Q,Re)|0,c=c+Math.imul(ee,Ae)|0,x=x+Math.imul(ee,Re)|0,_=_+Math.imul(Z,qe)|0,c=c+Math.imul(Z,Ie)|0,c=c+Math.imul(Y,qe)|0,x=x+Math.imul(Y,Ie)|0,_=_+Math.imul(K,Ge)|0,c=c+Math.imul(K,Ve)|0,c=c+Math.imul(G,Ge)|0,x=x+Math.imul(G,Ve)|0;var Qr=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,_=Math.imul(le,ge),c=Math.imul(le,me),c=c+Math.imul(ce,ge)|0,x=Math.imul(ce,me),_=_+Math.imul(ue,be)|0,c=c+Math.imul(ue,we)|0,c=c+Math.imul(he,be)|0,x=x+Math.imul(he,we)|0,_=_+Math.imul(fe,_e)|0,c=c+Math.imul(fe,xe)|0,c=c+Math.imul(se,_e)|0,x=x+Math.imul(se,xe)|0,_=_+Math.imul(ae,Me)|0,c=c+Math.imul(ae,Ee)|0,c=c+Math.imul(oe,Me)|0,x=x+Math.imul(oe,Ee)|0,_=_+Math.imul(ie,Se)|0,c=c+Math.imul(ie,Be)|0,c=c+Math.imul(ne,Se)|0,x=x+Math.imul(ne,Be)|0,_=_+Math.imul(te,Ae)|0,c=c+Math.imul(te,Re)|0,c=c+Math.imul(re,Ae)|0,x=x+Math.imul(re,Re)|0,_=_+Math.imul(Q,qe)|0,c=c+Math.imul(Q,Ie)|0,c=c+Math.imul(ee,qe)|0,x=x+Math.imul(ee,Ie)|0,_=_+Math.imul(Z,Ge)|0,c=c+Math.imul(Z,Ve)|0,c=c+Math.imul(Y,Ge)|0,x=x+Math.imul(Y,Ve)|0;var ei=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(ei>>>26)|0,ei&=67108863,_=Math.imul(le,be),c=Math.imul(le,we),c=c+Math.imul(ce,be)|0,x=Math.imul(ce,we),_=_+Math.imul(ue,_e)|0,c=c+Math.imul(ue,xe)|0,c=c+Math.imul(he,_e)|0,x=x+Math.imul(he,xe)|0,_=_+Math.imul(fe,Me)|0,c=c+Math.imul(fe,Ee)|0,c=c+Math.imul(se,Me)|0,x=x+Math.imul(se,Ee)|0,_=_+Math.imul(ae,Se)|0,c=c+Math.imul(ae,Be)|0,c=c+Math.imul(oe,Se)|0,x=x+Math.imul(oe,Be)|0,_=_+Math.imul(ie,Ae)|0,c=c+Math.imul(ie,Re)|0,c=c+Math.imul(ne,Ae)|0,x=x+Math.imul(ne,Re)|0,_=_+Math.imul(te,qe)|0,c=c+Math.imul(te,Ie)|0,c=c+Math.imul(re,qe)|0,x=x+Math.imul(re,Ie)|0,_=_+Math.imul(Q,Ge)|0,c=c+Math.imul(Q,Ve)|0,c=c+Math.imul(ee,Ge)|0,x=x+Math.imul(ee,Ve)|0;var ti=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(ti>>>26)|0,ti&=67108863,_=Math.imul(le,_e),c=Math.imul(le,xe),c=c+Math.imul(ce,_e)|0,x=Math.imul(ce,xe),_=_+Math.imul(ue,Me)|0,c=c+Math.imul(ue,Ee)|0,c=c+Math.imul(he,Me)|0,x=x+Math.imul(he,Ee)|0,_=_+Math.imul(fe,Se)|0,c=c+Math.imul(fe,Be)|0,c=c+Math.imul(se,Se)|0,x=x+Math.imul(se,Be)|0,_=_+Math.imul(ae,Ae)|0,c=c+Math.imul(ae,Re)|0,c=c+Math.imul(oe,Ae)|0,x=x+Math.imul(oe,Re)|0,_=_+Math.imul(ie,qe)|0,c=c+Math.imul(ie,Ie)|0,c=c+Math.imul(ne,qe)|0,x=x+Math.imul(ne,Ie)|0,_=_+Math.imul(te,Ge)|0,c=c+Math.imul(te,Ve)|0,c=c+Math.imul(re,Ge)|0,x=x+Math.imul(re,Ve)|0;var ri=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(ri>>>26)|0,ri&=67108863,_=Math.imul(le,Me),c=Math.imul(le,Ee),c=c+Math.imul(ce,Me)|0,x=Math.imul(ce,Ee),_=_+Math.imul(ue,Se)|0,c=c+Math.imul(ue,Be)|0,c=c+Math.imul(he,Se)|0,x=x+Math.imul(he,Be)|0,_=_+Math.imul(fe,Ae)|0,c=c+Math.imul(fe,Re)|0,c=c+Math.imul(se,Ae)|0,x=x+Math.imul(se,Re)|0,_=_+Math.imul(ae,qe)|0,c=c+Math.imul(ae,Ie)|0,c=c+Math.imul(oe,qe)|0,x=x+Math.imul(oe,Ie)|0,_=_+Math.imul(ie,Ge)|0,c=c+Math.imul(ie,Ve)|0,c=c+Math.imul(ne,Ge)|0,x=x+Math.imul(ne,Ve)|0;var ii=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(ii>>>26)|0,ii&=67108863,_=Math.imul(le,Se),c=Math.imul(le,Be),c=c+Math.imul(ce,Se)|0,x=Math.imul(ce,Be),_=_+Math.imul(ue,Ae)|0,c=c+Math.imul(ue,Re)|0,c=c+Math.imul(he,Ae)|0,x=x+Math.imul(he,Re)|0,_=_+Math.imul(fe,qe)|0,c=c+Math.imul(fe,Ie)|0,c=c+Math.imul(se,qe)|0,x=x+Math.imul(se,Ie)|0,_=_+Math.imul(ae,Ge)|0,c=c+Math.imul(ae,Ve)|0,c=c+Math.imul(oe,Ge)|0,x=x+Math.imul(oe,Ve)|0;var ni=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(ni>>>26)|0,ni&=67108863,_=Math.imul(le,Ae),c=Math.imul(le,Re),c=c+Math.imul(ce,Ae)|0,x=Math.imul(ce,Re),_=_+Math.imul(ue,qe)|0,c=c+Math.imul(ue,Ie)|0,c=c+Math.imul(he,qe)|0,x=x+Math.imul(he,Ie)|0,_=_+Math.imul(fe,Ge)|0,c=c+Math.imul(fe,Ve)|0,c=c+Math.imul(se,Ge)|0,x=x+Math.imul(se,Ve)|0;var Xf=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Xf>>>26)|0,Xf&=67108863,_=Math.imul(le,qe),c=Math.imul(le,Ie),c=c+Math.imul(ce,qe)|0,x=Math.imul(ce,Ie),_=_+Math.imul(ue,Ge)|0,c=c+Math.imul(ue,Ve)|0,c=c+Math.imul(he,Ge)|0,x=x+Math.imul(he,Ve)|0;var Jf=(b+_|0)+((c&8191)<<13)|0;b=(x+(c>>>13)|0)+(Jf>>>26)|0,Jf&=67108863,_=Math.imul(le,Ge),c=Math.imul(le,Ve),c=c+Math.imul(ce,Ge)|0,x=Math.imul(ce,Ve);var Qf=(b+_|0)+((c&8191)<<13)|0;return b=(x+(c>>>13)|0)+(Qf>>>26)|0,Qf&=67108863,u[0]=Kr,u[1]=Wr,u[2]=zr,u[3]=Gr,u[4]=Vr,u[5]=$r,u[6]=Zr,u[7]=Yr,u[8]=Xr,u[9]=Jr,u[10]=Qr,u[11]=ei,u[12]=ti,u[13]=ri,u[14]=ii,u[15]=ni,u[16]=Xf,u[17]=Jf,u[18]=Qf,b!==0&&(u[19]=b,d.length++),d};Math.imul||(z=X);function $(l,o,s){s.negative=o.negative^l.negative,s.length=l.length+o.length;for(var d=0,g=0,p=0;p<s.length-1;p++){var u=g;g=0;for(var b=d&67108863,_=Math.min(p,o.length-1),c=Math.max(0,p-l.length+1);c<=_;c++){var x=p-c,P=l.words[x]|0,N=o.words[c]|0,U=P*N,W=U&67108863;u=u+(U/67108864|0)|0,W=W+b|0,b=W&67108863,u=u+(W>>>26)|0,g+=u>>>26,u&=67108863}s.words[p]=b,d=u,u=g}return d!==0?s.words[p]=d:s.length--,s._strip()}function Fe(l,o,s){return $(l,o,s)}i.prototype.mulTo=function(o,s){var d,g=this.length+o.length;return this.length===10&&o.length===10?d=z(this,o,s):g<63?d=X(this,o,s):g<1024?d=$(this,o,s):d=Fe(this,o,s),d};function k(l,o){this.x=l,this.y=o}k.prototype.makeRBT=function(o){for(var s=new Array(o),d=i.prototype._countBits(o)-1,g=0;g<o;g++)s[g]=this.revBin(g,d,o);return s},k.prototype.revBin=function(o,s,d){if(o===0||o===d-1)return o;for(var g=0,p=0;p<s;p++)g|=(o&1)<<s-p-1,o>>=1;return g},k.prototype.permute=function(o,s,d,g,p,u){for(var b=0;b<u;b++)g[b]=s[o[b]],p[b]=d[o[b]]},k.prototype.transform=function(o,s,d,g,p,u){this.permute(u,o,s,d,g,p);for(var b=1;b<p;b<<=1)for(var _=b<<1,c=Math.cos(2*Math.PI/_),x=Math.sin(2*Math.PI/_),P=0;P<p;P+=_)for(var N=c,U=x,W=0;W<b;W++){var K=d[P+W],G=g[P+W],It=d[P+W+b],Z=g[P+W+b],Y=N*It-U*Z;Z=N*Z+U*It,It=Y,d[P+W]=K+It,g[P+W]=G+Z,d[P+W+b]=K-It,g[P+W+b]=G-Z,W!==_&&(Y=c*N-x*U,U=c*U+x*N,N=Y)}},k.prototype.guessLen13b=function(o,s){var d=Math.max(s,o)|1,g=d&1,p=0;for(d=d/2|0;d;d=d>>>1)p++;return 1<<p+1+g},k.prototype.conjugate=function(o,s,d){if(!(d<=1))for(var g=0;g<d/2;g++){var p=o[g];o[g]=o[d-g-1],o[d-g-1]=p,p=s[g],s[g]=-s[d-g-1],s[d-g-1]=-p}},k.prototype.normalize13b=function(o,s){for(var d=0,g=0;g<s/2;g++){var p=Math.round(o[2*g+1]/s)*8192+Math.round(o[2*g]/s)+d;o[g]=p&67108863,p<67108864?d=0:d=p/67108864|0}return o},k.prototype.convert13b=function(o,s,d,g){for(var p=0,u=0;u<s;u++)p=p+(o[u]|0),d[2*u]=p&8191,p=p>>>13,d[2*u+1]=p&8191,p=p>>>13;for(u=2*s;u<g;++u)d[u]=0;r(p===0),r((p&-8192)===0)},k.prototype.stub=function(o){for(var s=new Array(o),d=0;d<o;d++)s[d]=0;return s},k.prototype.mulp=function(o,s,d){var g=2*this.guessLen13b(o.length,s.length),p=this.makeRBT(g),u=this.stub(g),b=new Array(g),_=new Array(g),c=new Array(g),x=new Array(g),P=new Array(g),N=new Array(g),U=d.words;U.length=g,this.convert13b(o.words,o.length,b,g),this.convert13b(s.words,s.length,x,g),this.transform(b,u,_,c,g,p),this.transform(x,u,P,N,g,p);for(var W=0;W<g;W++){var K=_[W]*P[W]-c[W]*N[W];c[W]=_[W]*N[W]+c[W]*P[W],_[W]=K}return this.conjugate(_,c,g),this.transform(_,c,U,u,g,p),this.conjugate(U,u,g),this.normalize13b(U,g),d.negative=o.negative^s.negative,d.length=o.length+s.length,d._strip()},i.prototype.mul=function(o){var s=new i(null);return s.words=new Array(this.length+o.length),this.mulTo(o,s)},i.prototype.mulf=function(o){var s=new i(null);return s.words=new Array(this.length+o.length),Fe(this,o,s)},i.prototype.imul=function(o){return this.clone().mulTo(o,this)},i.prototype.imuln=function(o){var s=o<0;s&&(o=-o),r(typeof o=="number"),r(o<67108864);for(var d=0,g=0;g<this.length;g++){var p=(this.words[g]|0)*o,u=(p&67108863)+(d&67108863);d>>=26,d+=p/67108864|0,d+=u>>>26,this.words[g]=u&67108863}return d!==0&&(this.words[g]=d,this.length++),this.length=o===0?1:this.length,s?this.ineg():this},i.prototype.muln=function(o){return this.clone().imuln(o)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(o){var s=V(o);if(s.length===0)return new i(1);for(var d=this,g=0;g<s.length&&s[g]===0;g++,d=d.sqr());if(++g<s.length)for(var p=d.sqr();g<s.length;g++,p=p.sqr())s[g]!==0&&(d=d.mul(p));return d},i.prototype.iushln=function(o){r(typeof o=="number"&&o>=0);var s=o%26,d=(o-s)/26,g=67108863>>>26-s<<26-s,p;if(s!==0){var u=0;for(p=0;p<this.length;p++){var b=this.words[p]&g,_=(this.words[p]|0)-b<<s;this.words[p]=_|u,u=b>>>26-s}u&&(this.words[p]=u,this.length++)}if(d!==0){for(p=this.length-1;p>=0;p--)this.words[p+d]=this.words[p];for(p=0;p<d;p++)this.words[p]=0;this.length+=d}return this._strip()},i.prototype.ishln=function(o){return r(this.negative===0),this.iushln(o)},i.prototype.iushrn=function(o,s,d){r(typeof o=="number"&&o>=0);var g;s?g=(s-s%26)/26:g=0;var p=o%26,u=Math.min((o-p)/26,this.length),b=67108863^67108863>>>p<<p,_=d;if(g-=u,g=Math.max(0,g),_){for(var c=0;c<u;c++)_.words[c]=this.words[c];_.length=u}if(u!==0)if(this.length>u)for(this.length-=u,c=0;c<this.length;c++)this.words[c]=this.words[c+u];else this.words[0]=0,this.length=1;var x=0;for(c=this.length-1;c>=0&&(x!==0||c>=g);c--){var P=this.words[c]|0;this.words[c]=x<<26-p|P>>>p,x=P&b}return _&&x!==0&&(_.words[_.length++]=x),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(o,s,d){return r(this.negative===0),this.iushrn(o,s,d)},i.prototype.shln=function(o){return this.clone().ishln(o)},i.prototype.ushln=function(o){return this.clone().iushln(o)},i.prototype.shrn=function(o){return this.clone().ishrn(o)},i.prototype.ushrn=function(o){return this.clone().iushrn(o)},i.prototype.testn=function(o){r(typeof o=="number"&&o>=0);var s=o%26,d=(o-s)/26,g=1<<s;if(this.length<=d)return!1;var p=this.words[d];return!!(p&g)},i.prototype.imaskn=function(o){r(typeof o=="number"&&o>=0);var s=o%26,d=(o-s)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=d)return this;if(s!==0&&d++,this.length=Math.min(d,this.length),s!==0){var g=67108863^67108863>>>s<<s;this.words[this.length-1]&=g}return this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.maskn=function(o){return this.clone().imaskn(o)},i.prototype.iaddn=function(o){return r(typeof o=="number"),r(o<67108864),o<0?this.isubn(-o):this.negative!==0?this.length===1&&(this.words[0]|0)<=o?(this.words[0]=o-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(o),this.negative=1,this):this._iaddn(o)},i.prototype._iaddn=function(o){this.words[0]+=o;for(var s=0;s<this.length&&this.words[s]>=67108864;s++)this.words[s]-=67108864,s===this.length-1?this.words[s+1]=1:this.words[s+1]++;return this.length=Math.max(this.length,s+1),this},i.prototype.isubn=function(o){if(r(typeof o=="number"),r(o<67108864),o<0)return this.iaddn(-o);if(this.negative!==0)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var s=0;s<this.length&&this.words[s]<0;s++)this.words[s]+=67108864,this.words[s+1]-=1;return this._strip()},i.prototype.addn=function(o){return this.clone().iaddn(o)},i.prototype.subn=function(o){return this.clone().isubn(o)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(o,s,d){var g=o.length+d,p;this._expand(g);var u,b=0;for(p=0;p<o.length;p++){u=(this.words[p+d]|0)+b;var _=(o.words[p]|0)*s;u-=_&67108863,b=(u>>26)-(_/67108864|0),this.words[p+d]=u&67108863}for(;p<this.length-d;p++)u=(this.words[p+d]|0)+b,b=u>>26,this.words[p+d]=u&67108863;if(b===0)return this._strip();for(r(b===-1),b=0,p=0;p<this.length;p++)u=-(this.words[p]|0)+b,b=u>>26,this.words[p]=u&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(o,s){var d=this.length-o.length,g=this.clone(),p=o,u=p.words[p.length-1]|0,b=this._countBits(u);d=26-b,d!==0&&(p=p.ushln(d),g.iushln(d),u=p.words[p.length-1]|0);var _=g.length-p.length,c;if(s!=="mod"){c=new i(null),c.length=_+1,c.words=new Array(c.length);for(var x=0;x<c.length;x++)c.words[x]=0}var P=g.clone()._ishlnsubmul(p,1,_);P.negative===0&&(g=P,c&&(c.words[_]=1));for(var N=_-1;N>=0;N--){var U=(g.words[p.length+N]|0)*67108864+(g.words[p.length+N-1]|0);for(U=Math.min(U/u|0,67108863),g._ishlnsubmul(p,U,N);g.negative!==0;)U--,g.negative=0,g._ishlnsubmul(p,1,N),g.isZero()||(g.negative^=1);c&&(c.words[N]=U)}return c&&c._strip(),g._strip(),s!=="div"&&d!==0&&g.iushrn(d),{div:c||null,mod:g}},i.prototype.divmod=function(o,s,d){if(r(!o.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var g,p,u;return this.negative!==0&&o.negative===0?(u=this.neg().divmod(o,s),s!=="mod"&&(g=u.div.neg()),s!=="div"&&(p=u.mod.neg(),d&&p.negative!==0&&p.iadd(o)),{div:g,mod:p}):this.negative===0&&o.negative!==0?(u=this.divmod(o.neg(),s),s!=="mod"&&(g=u.div.neg()),{div:g,mod:u.mod}):(this.negative&o.negative)!==0?(u=this.neg().divmod(o.neg(),s),s!=="div"&&(p=u.mod.neg(),d&&p.negative!==0&&p.isub(o)),{div:u.div,mod:p}):o.length>this.length||this.cmp(o)<0?{div:new i(0),mod:this}:o.length===1?s==="div"?{div:this.divn(o.words[0]),mod:null}:s==="mod"?{div:null,mod:new i(this.modrn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new i(this.modrn(o.words[0]))}:this._wordDiv(o,s)},i.prototype.div=function(o){return this.divmod(o,"div",!1).div},i.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},i.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},i.prototype.divRound=function(o){var s=this.divmod(o);if(s.mod.isZero())return s.div;var d=s.div.negative!==0?s.mod.isub(o):s.mod,g=o.ushrn(1),p=o.andln(1),u=d.cmp(g);return u<0||p===1&&u===0?s.div:s.div.negative!==0?s.div.isubn(1):s.div.iaddn(1)},i.prototype.modrn=function(o){var s=o<0;s&&(o=-o),r(o<=67108863);for(var d=(1<<26)%o,g=0,p=this.length-1;p>=0;p--)g=(d*g+(this.words[p]|0))%o;return s?-g:g},i.prototype.modn=function(o){return this.modrn(o)},i.prototype.idivn=function(o){var s=o<0;s&&(o=-o),r(o<=67108863);for(var d=0,g=this.length-1;g>=0;g--){var p=(this.words[g]|0)+d*67108864;this.words[g]=p/o|0,d=p%o}return this._strip(),s?this.ineg():this},i.prototype.divn=function(o){return this.clone().idivn(o)},i.prototype.egcd=function(o){r(o.negative===0),r(!o.isZero());var s=this,d=o.clone();s.negative!==0?s=s.umod(o):s=s.clone();for(var g=new i(1),p=new i(0),u=new i(0),b=new i(1),_=0;s.isEven()&&d.isEven();)s.iushrn(1),d.iushrn(1),++_;for(var c=d.clone(),x=s.clone();!s.isZero();){for(var P=0,N=1;(s.words[0]&N)===0&&P<26;++P,N<<=1);if(P>0)for(s.iushrn(P);P-- >0;)(g.isOdd()||p.isOdd())&&(g.iadd(c),p.isub(x)),g.iushrn(1),p.iushrn(1);for(var U=0,W=1;(d.words[0]&W)===0&&U<26;++U,W<<=1);if(U>0)for(d.iushrn(U);U-- >0;)(u.isOdd()||b.isOdd())&&(u.iadd(c),b.isub(x)),u.iushrn(1),b.iushrn(1);s.cmp(d)>=0?(s.isub(d),g.isub(u),p.isub(b)):(d.isub(s),u.isub(g),b.isub(p))}return{a:u,b,gcd:d.iushln(_)}},i.prototype._invmp=function(o){r(o.negative===0),r(!o.isZero());var s=this,d=o.clone();s.negative!==0?s=s.umod(o):s=s.clone();for(var g=new i(1),p=new i(0),u=d.clone();s.cmpn(1)>0&&d.cmpn(1)>0;){for(var b=0,_=1;(s.words[0]&_)===0&&b<26;++b,_<<=1);if(b>0)for(s.iushrn(b);b-- >0;)g.isOdd()&&g.iadd(u),g.iushrn(1);for(var c=0,x=1;(d.words[0]&x)===0&&c<26;++c,x<<=1);if(c>0)for(d.iushrn(c);c-- >0;)p.isOdd()&&p.iadd(u),p.iushrn(1);s.cmp(d)>=0?(s.isub(d),g.isub(p)):(d.isub(s),p.isub(g))}var P;return s.cmpn(1)===0?P=g:P=p,P.cmpn(0)<0&&P.iadd(o),P},i.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var s=this.clone(),d=o.clone();s.negative=0,d.negative=0;for(var g=0;s.isEven()&&d.isEven();g++)s.iushrn(1),d.iushrn(1);do{for(;s.isEven();)s.iushrn(1);for(;d.isEven();)d.iushrn(1);var p=s.cmp(d);if(p<0){var u=s;s=d,d=u}else if(p===0||d.cmpn(1)===0)break;s.isub(d)}while(!0);return d.iushln(g)},i.prototype.invm=function(o){return this.egcd(o).a.umod(o)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(o){return this.words[0]&o},i.prototype.bincn=function(o){r(typeof o=="number");var s=o%26,d=(o-s)/26,g=1<<s;if(this.length<=d)return this._expand(d+1),this.words[d]|=g,this;for(var p=g,u=d;p!==0&&u<this.length;u++){var b=this.words[u]|0;b+=p,p=b>>>26,b&=67108863,this.words[u]=b}return p!==0&&(this.words[u]=p,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(o){var s=o<0;if(this.negative!==0&&!s)return-1;if(this.negative===0&&s)return 1;this._strip();var d;if(this.length>1)d=1;else{s&&(o=-o),r(o<=67108863,"Number is too big");var g=this.words[0]|0;d=g===o?0:g<o?-1:1}return this.negative!==0?-d|0:d},i.prototype.cmp=function(o){if(this.negative!==0&&o.negative===0)return-1;if(this.negative===0&&o.negative!==0)return 1;var s=this.ucmp(o);return this.negative!==0?-s|0:s},i.prototype.ucmp=function(o){if(this.length>o.length)return 1;if(this.length<o.length)return-1;for(var s=0,d=this.length-1;d>=0;d--){var g=this.words[d]|0,p=o.words[d]|0;if(g!==p){g<p?s=-1:g>p&&(s=1);break}}return s},i.prototype.gtn=function(o){return this.cmpn(o)===1},i.prototype.gt=function(o){return this.cmp(o)===1},i.prototype.gten=function(o){return this.cmpn(o)>=0},i.prototype.gte=function(o){return this.cmp(o)>=0},i.prototype.ltn=function(o){return this.cmpn(o)===-1},i.prototype.lt=function(o){return this.cmp(o)===-1},i.prototype.lten=function(o){return this.cmpn(o)<=0},i.prototype.lte=function(o){return this.cmp(o)<=0},i.prototype.eqn=function(o){return this.cmpn(o)===0},i.prototype.eq=function(o){return this.cmp(o)===0},i.red=function(o){return new h(o)},i.prototype.toRed=function(o){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),o.convertTo(this)._forceRed(o)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(o){return this.red=o,this},i.prototype.forceRed=function(o){return r(!this.red,"Already a number in reduction context"),this._forceRed(o)},i.prototype.redAdd=function(o){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},i.prototype.redIAdd=function(o){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},i.prototype.redSub=function(o){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},i.prototype.redISub=function(o){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},i.prototype.redShl=function(o){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},i.prototype.redMul=function(o){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},i.prototype.redIMul=function(o){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(o){return r(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var O={k256:null,p224:null,p192:null,p25519:null};function D(l,o){this.name=l,this.p=new i(o,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var o=new i(null);return o.words=new Array(Math.ceil(this.n/13)),o},D.prototype.ireduce=function(o){var s=o,d;do this.split(s,this.tmp),s=this.imulK(s),s=s.iadd(this.tmp),d=s.bitLength();while(d>this.n);var g=d<this.n?-1:s.ucmp(this.p);return g===0?(s.words[0]=0,s.length=1):g>0?s.isub(this.p):s.strip!==void 0?s.strip():s._strip(),s},D.prototype.split=function(o,s){o.iushrn(this.n,0,s)},D.prototype.imulK=function(o){return o.imul(this.k)};function L(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(L,D),L.prototype.split=function(o,s){for(var d=4194303,g=Math.min(o.length,9),p=0;p<g;p++)s.words[p]=o.words[p];if(s.length=g,o.length<=9){o.words[0]=0,o.length=1;return}var u=o.words[9];for(s.words[s.length++]=u&d,p=10;p<o.length;p++){var b=o.words[p]|0;o.words[p-10]=(b&d)<<4|u>>>22,u=b}u>>>=22,o.words[p-10]=u,u===0&&o.length>10?o.length-=10:o.length-=9},L.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var s=0,d=0;d<o.length;d++){var g=o.words[d]|0;s+=g*977,o.words[d]=s&67108863,s=g*64+(s/67108864|0)}return o.words[o.length-1]===0&&(o.length--,o.words[o.length-1]===0&&o.length--),o};function F(){D.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}n(F,D);function H(){D.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}n(H,D);function M(){D.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}n(M,D),M.prototype.imulK=function(o){for(var s=0,d=0;d<o.length;d++){var g=(o.words[d]|0)*19+s,p=g&67108863;g>>>=26,o.words[d]=p,s=g}return s!==0&&(o.words[o.length++]=s),o},i._prime=function(o){if(O[o])return O[o];var s;if(o==="k256")s=new L;else if(o==="p224")s=new F;else if(o==="p192")s=new H;else if(o==="p25519")s=new M;else throw new Error("Unknown prime "+o);return O[o]=s,s};function h(l){if(typeof l=="string"){var o=i._prime(l);this.m=o.p,this.prime=o}else r(l.gtn(1),"modulus must be greater than 1"),this.m=l,this.prime=null}h.prototype._verify1=function(o){r(o.negative===0,"red works only with positives"),r(o.red,"red works only with red numbers")},h.prototype._verify2=function(o,s){r((o.negative|s.negative)===0,"red works only with positives"),r(o.red&&o.red===s.red,"red works only with red numbers")},h.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):(E(o,o.umod(this.m)._forceRed(this)),o)},h.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},h.prototype.add=function(o,s){this._verify2(o,s);var d=o.add(s);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},h.prototype.iadd=function(o,s){this._verify2(o,s);var d=o.iadd(s);return d.cmp(this.m)>=0&&d.isub(this.m),d},h.prototype.sub=function(o,s){this._verify2(o,s);var d=o.sub(s);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},h.prototype.isub=function(o,s){this._verify2(o,s);var d=o.isub(s);return d.cmpn(0)<0&&d.iadd(this.m),d},h.prototype.shl=function(o,s){return this._verify1(o),this.imod(o.ushln(s))},h.prototype.imul=function(o,s){return this._verify2(o,s),this.imod(o.imul(s))},h.prototype.mul=function(o,s){return this._verify2(o,s),this.imod(o.mul(s))},h.prototype.isqr=function(o){return this.imul(o,o.clone())},h.prototype.sqr=function(o){return this.mul(o,o)},h.prototype.sqrt=function(o){if(o.isZero())return o.clone();var s=this.m.andln(3);if(r(s%2===1),s===3){var d=this.m.add(new i(1)).iushrn(2);return this.pow(o,d)}for(var g=this.m.subn(1),p=0;!g.isZero()&&g.andln(1)===0;)p++,g.iushrn(1);r(!g.isZero());var u=new i(1).toRed(this),b=u.redNeg(),_=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);this.pow(c,_).cmp(b)!==0;)c.redIAdd(b);for(var x=this.pow(c,g),P=this.pow(o,g.addn(1).iushrn(1)),N=this.pow(o,g),U=p;N.cmp(u)!==0;){for(var W=N,K=0;W.cmp(u)!==0;K++)W=W.redSqr();r(K<U);var G=this.pow(x,new i(1).iushln(U-K-1));P=P.redMul(G),x=G.redSqr(),N=N.redMul(x),U=K}return P},h.prototype.invm=function(o){var s=o._invmp(this.m);return s.negative!==0?(s.negative=0,this.imod(s).redNeg()):this.imod(s)},h.prototype.pow=function(o,s){if(s.isZero())return new i(1).toRed(this);if(s.cmpn(1)===0)return o.clone();var d=4,g=new Array(1<<d);g[0]=new i(1).toRed(this),g[1]=o;for(var p=2;p<g.length;p++)g[p]=this.mul(g[p-1],o);var u=g[0],b=0,_=0,c=s.bitLength()%26;for(c===0&&(c=26),p=s.length-1;p>=0;p--){for(var x=s.words[p],P=c-1;P>=0;P--){var N=x>>P&1;if(u!==g[0]&&(u=this.sqr(u)),N===0&&b===0){_=0;continue}b<<=1,b|=N,_++,!(_!==d&&(p!==0||P!==0))&&(u=this.mul(u,g[b]),_=0,b=0)}c=26}return u},h.prototype.convertTo=function(o){var s=o.umod(this.m);return s===o?s.clone():s},h.prototype.convertFrom=function(o){var s=o.clone();return s.red=null,s},i.mont=function(o){return new y(o)};function y(l){h.call(this,l),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(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)}n(y,h),y.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},y.prototype.convertFrom=function(o){var s=this.imod(o.mul(this.rinv));return s.red=null,s},y.prototype.imul=function(o,s){if(o.isZero()||s.isZero())return o.words[0]=0,o.length=1,o;var d=o.imul(s),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=d.isub(g).iushrn(this.shift),u=p;return p.cmp(this.m)>=0?u=p.isub(this.m):p.cmpn(0)<0&&(u=p.iadd(this.m)),u._forceRed(this)},y.prototype.mul=function(o,s){if(o.isZero()||s.isZero())return new i(0)._forceRed(this);var d=o.mul(s),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=d.isub(g).iushrn(this.shift),u=p;return p.cmp(this.m)>=0?u=p.isub(this.m):p.cmpn(0)<0&&(u=p.iadd(this.m)),u._forceRed(this)},y.prototype.invm=function(o){var s=this.imod(o._invmp(this.m).mul(this.r2));return s._forceRed(this)}})(typeof Jh>"u"||Jh,am)});var Qh=R((gk,um)=>{"use strict";w();var Mn=om(),PE=ui(),DE=ke().Buffer;function fm(t){var e=t.modulus.byteLength(),r;do r=new Mn(PE(e));while(r.cmp(t.modulus)>=0||!r.umod(t.prime1)||!r.umod(t.prime2));return r}function UE(t){var e=fm(t),r=e.toRed(Mn.mont(t.modulus)).redPow(new Mn(t.publicExponent)).fromRed();return{blinder:r,unblinder:e.invm(t.modulus)}}function sm(t,e){var r=UE(e),n=e.modulus.byteLength(),i=new Mn(t).mul(r.blinder).umod(e.modulus),a=i.toRed(Mn.mont(e.prime1)),f=i.toRed(Mn.mont(e.prime2)),v=e.coefficient,m=e.prime1,E=e.prime2,A=a.redPow(e.exponent1).fromRed(),q=f.redPow(e.exponent2).fromRed(),I=A.isub(q).imul(v).umod(m).imul(E);return q.iadd(I).imul(r.unblinder).umod(e.modulus).toArrayLike(DE,"be",n)}sm.getr=fm;um.exports=sm});var dm=R((bk,cm)=>{w();var NE=Vh(),el=ui(),LE=Ia(),hm=Zh(),lm=Yh(),tl=lr(),FE=Xh(),jE=Qh(),jt=ke().Buffer;cm.exports=function(e,r,n){var i;e.padding?i=e.padding:n?i=1:i=4;var a=NE(e),f;if(i===4)f=HE(a,r);else if(i===1)f=KE(a,r,n);else if(i===3){if(f=new tl(r),f.cmp(a.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return n?jE(f,a):FE(f,a)};function HE(t,e){var r=t.modulus.byteLength(),n=e.length,i=LE("sha1").update(jt.alloc(0)).digest(),a=i.length,f=2*a;if(n>r-f-2)throw new Error("message too long");var v=jt.alloc(r-n-f-2),m=r-a-1,E=el(a),A=lm(jt.concat([i,v,jt.alloc(1,1),e],m),hm(E,m)),q=lm(E,hm(A,a));return new tl(jt.concat([jt.alloc(1),q,A],r))}function KE(t,e,r){var n=e.length,i=t.modulus.byteLength();if(n>i-11)throw new Error("message too long");var a;return r?a=jt.alloc(i-n-3,255):a=WE(i-n-3),new tl(jt.concat([jt.from([0,r?1:2]),a,jt.alloc(1),e],i))}function WE(t){for(var e=jt.allocUnsafe(t),r=0,n=el(t*2),i=0,a;r<t;)i===n.length&&(n=el(t*2),i=0),a=n[i++],a&&(e[r++]=a);return e}});var mm=R((_k,gm)=>{w();var zE=Vh(),pm=Zh(),vm=Yh(),ym=lr(),GE=Qh(),VE=Ia(),$E=Xh(),Ka=ke().Buffer;gm.exports=function(e,r,n){var i;e.padding?i=e.padding:n?i=1:i=4;var a=zE(e),f=a.modulus.byteLength();if(r.length>f||new ym(r).cmp(a.modulus)>=0)throw new Error("decryption error");var v;n?v=$E(new ym(r),a):v=GE(r,a);var m=Ka.alloc(f-v.length);if(v=Ka.concat([m,v],f),i===4)return ZE(a,v);if(i===1)return YE(a,v,n);if(i===3)return v;throw new Error("unknown padding")};function ZE(t,e){var r=t.modulus.byteLength(),n=VE("sha1").update(Ka.alloc(0)).digest(),i=n.length;if(e[0]!==0)throw new Error("decryption error");var a=e.slice(1,i+1),f=e.slice(i+1),v=vm(a,pm(f,i)),m=vm(f,pm(v,r-i-1));if(XE(n,m.slice(0,i)))throw new Error("decryption error");for(var E=i;m[E]===0;)E++;if(m[E++]!==1)throw new Error("decryption error");return m.slice(E)}function YE(t,e,r){for(var n=e.slice(0,2),i=2,a=0;e[i++]!==0;)if(i>=e.length){a++;break}var f=e.slice(2,i-1);if((n.toString("hex")!=="0002"&&!r||n.toString("hex")!=="0001"&&r)&&a++,f.length<8&&a++,a)throw new Error("decryption error");return e.slice(i)}function XE(t,e){t=Ka.from(t),e=Ka.from(e);var r=0,n=t.length;t.length!==e.length&&(r++,n=Math.min(t.length,e.length));for(var i=-1;++i<n;)r+=t[i]^e[i];return r}});var bm=R(Pi=>{w();Pi.publicEncrypt=dm();Pi.privateDecrypt=mm();Pi.privateEncrypt=function(e,r){return Pi.publicEncrypt(e,r,!0)};Pi.publicDecrypt=function(e,r){return Pi.privateDecrypt(e,r,!0)}});var qm=R(Wa=>{"use strict";w();function wm(){throw new Error(`secure random number generation not supported by this browser
|
|
15
|
+
use chrome, FireFox or Internet Explorer 11`)}var xm=ke(),_m=ui(),Mm=xm.Buffer,Em=xm.kMaxLength,rl=globalThis.crypto||globalThis.msCrypto,Sm=Math.pow(2,32)-1;function Bm(t,e){if(typeof t!="number"||t!==t)throw new TypeError("offset must be a number");if(t>Sm||t<0)throw new TypeError("offset must be a uint32");if(t>Em||t>e)throw new RangeError("offset out of range")}function Am(t,e,r){if(typeof t!="number"||t!==t)throw new TypeError("size must be a number");if(t>Sm||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>Em)throw new RangeError("buffer too small")}rl&&rl.getRandomValues||!S.default.browser?(Wa.randomFill=JE,Wa.randomFillSync=QE):(Wa.randomFill=wm,Wa.randomFillSync=wm);function JE(t,e,r,n){if(!Mm.isBuffer(t)&&!(t instanceof globalThis.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof e=="function")n=e,e=0,r=t.length;else if(typeof r=="function")n=r,r=t.length-e;else if(typeof n!="function")throw new TypeError('"cb" argument must be a function');return Bm(e,t.length),Am(r,e,t.length),Rm(t,e,r,n)}function Rm(t,e,r,n){if(S.default.browser){var i=t.buffer,a=new Uint8Array(i,e,r);if(rl.getRandomValues(a),n){S.default.nextTick(function(){n(null,t)});return}return t}if(n){_m(r,function(v,m){if(v)return n(v);m.copy(t,e),n(null,t)});return}var f=_m(r);return f.copy(t,e),t}function QE(t,e,r){if(typeof e>"u"&&(e=0),!Mm.isBuffer(t)&&!(t instanceof globalThis.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return Bm(e,t.length),r===void 0&&(r=t.length-e),Am(r,e,t.length),Rm(t,e,r)}});var ja=R(Te=>{"use strict";w();Te.randomBytes=Te.rng=Te.pseudoRandomBytes=Te.prng=ui();Te.createHash=Te.Hash=Ia();Te.createHmac=Te.Hmac=B1();var eS=gf(),tS=Object.keys(eS),rS=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(tS);Te.getHashes=function(){return rS};var Im=ih();Te.pbkdf2=Im.pbkdf2;Te.pbkdf2Sync=Im.pbkdf2Sync;var tr=Xy();Te.Cipher=tr.Cipher;Te.createCipher=tr.createCipher;Te.Cipheriv=tr.Cipheriv;Te.createCipheriv=tr.createCipheriv;Te.Decipher=tr.Decipher;Te.createDecipher=tr.createDecipher;Te.Decipheriv=tr.Decipheriv;Te.createDecipheriv=tr.createDecipheriv;Te.getCiphers=tr.getCiphers;Te.listCiphers=tr.listCiphers;var za=hg();Te.DiffieHellmanGroup=za.DiffieHellmanGroup;Te.createDiffieHellmanGroup=za.createDiffieHellmanGroup;Te.getDiffieHellman=za.getDiffieHellman;Te.createDiffieHellman=za.createDiffieHellman;Te.DiffieHellman=za.DiffieHellman;var Ff=gf();Te.createSign=Ff.createSign;Te.Sign=Ff.Sign;Te.createVerify=Ff.createVerify;Te.Verify=Ff.Verify;Te.createECDH=gf();var jf=bm();Te.publicEncrypt=jf.publicEncrypt;Te.privateEncrypt=jf.privateEncrypt;Te.publicDecrypt=jf.publicDecrypt;Te.privateDecrypt=jf.privateDecrypt;var km=qm();Te.randomFill=km.randomFill;Te.randomFillSync=km.randomFillSync;Te.createCredentials=function(){throw new Error(`sorry, createCredentials is not implemented yet
|
|
16
16
|
we accept pull requests
|
|
17
|
-
https://github.com/browserify/crypto-browserify`)};
|
|
18
|
-
`+new Error().stack};return r.prototype=Object.create(t.prototype),r.prototype.name=t.prototype.name+e.name,t[e.name]=r,e.errors&&
|
|
19
|
-
`+new Error().stack};An.Error.prototype=Object.create(Error.prototype);An.Error.prototype.name="bsv.Error";var gS=zm();yS(An.Error,gS);dl.exports=An.Error;dl.exports.extend=function(t){return Gm(An.Error,t)}});var zf=R((iT,Zm)=>{"use strict";b();var $a=$m(),mS=Wf();Zm.exports={checkState:function(t,e){if(!t)throw new $a.InvalidState(e)},checkArgument:function(t,e,r,i){if(!t)throw new $a.InvalidArgument(e,r,i)},checkArgumentType:function(t,e,r){if(r=r||"(unknown name)",mS.isString(e)){if(e==="Buffer"){var i=ft();if(!i.Buffer.isBuffer(t))throw new $a.InvalidArgumentType(t,e,r)}else if(typeof t!==e)throw new $a.InvalidArgumentType(t,e,r)}else if(!(t instanceof e))throw new $a.InvalidArgumentType(t,e.name,r)}}});var Jm=R((aT,Xm)=>{"use strict";b();var Ue=lr(),pl=zf(),Ym=Wf(),Gf=function(t){for(var e=B.Buffer.alloc(t.length),r=0;r<t.length;r++)e[r]=t[t.length-1-r];return e};Ue.Zero=new Ue(0);Ue.One=new Ue(1);Ue.Minus1=new Ue(-1);Ue.fromNumber=function(t){return pl.checkArgument(Ym.isNumber(t)),new Ue(t)};Ue.fromString=function(t,e){return pl.checkArgument(Ym.isString(t)),new Ue(t,e)};Ue.fromBuffer=function(t,e){typeof e<"u"&&e.endian==="little"&&(t=Gf(t));var r=t.toString("hex"),i=new Ue(r,16);return i};Ue.fromSM=function(t,e){var r;if(t.length===0)return Ue.fromBuffer(B.Buffer.from([0]));var i="big";return e&&(i=e.endian),i==="little"&&(t=Gf(t)),t[0]&128?(t[0]=t[0]&127,r=Ue.fromBuffer(t),r.neg().copy(r)):r=Ue.fromBuffer(t),r};Ue.prototype.toNumber=function(){return parseInt(this.toString(10),10)};Ue.prototype.toBuffer=function(t){var e,r;if(t&&t.size){r=this.toString(16,2);var i=r.length/2;e=B.Buffer.from(r,"hex"),i===t.size||(i>t.size?e=Ue.trim(e,i):i<t.size&&(e=Ue.pad(e,i,t.size)))}else r=this.toString(16,2),e=B.Buffer.from(r,"hex");return typeof t<"u"&&t.endian==="little"&&(e=Gf(e)),e};Ue.prototype.toSMBigEndian=function(){var t;return this.cmp(Ue.Zero)===-1?(t=this.neg().toBuffer(),t[0]&128?t=B.Buffer.concat([B.Buffer.from([128]),t]):t[0]=t[0]|128):(t=this.toBuffer(),t[0]&128&&(t=B.Buffer.concat([B.Buffer.from([0]),t]))),t.length===1&t[0]===0&&(t=B.Buffer.from([])),t};Ue.prototype.toSM=function(t){var e=t?t.endian:"big",r=this.toSMBigEndian();return e==="little"&&(r=Gf(r)),r};Ue.fromScriptNumBuffer=function(t,e,r){var i=r||4;if(pl.checkArgument(t.length<=i,new Error("script number overflow")),e&&t.length>0&&(t[t.length-1]&127)===0&&(t.length<=1||(t[t.length-2]&128)===0))throw new Error("non-minimally encoded script number");return Ue.fromSM(t,{endian:"little"})};Ue.prototype.toScriptNumBuffer=function(){return this.toSM({endian:"little"})};Ue.trim=function(t,e){return t.slice(e-t.length,t.length)};Ue.pad=function(t,e,r){for(var i=B.Buffer.alloc(r),n=0;n<t.length;n++)i[i.length-1-n]=t[t.length-1-n];for(n=0;n<r-e;n++)i[n]=0;return i};Ue.prototype.toHex=function(...t){return this.toBuffer(...t).toString("hex")};Ue.fromHex=function(t,...e){return Ue.fromBuffer(B.Buffer.from(t,"hex"),...e)};Xm.exports=Ue});var Ht=R(Ke=>{"use strict";b();var bS=Ot(),wS=He();Ke.inherits=wS;function _S(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function xS(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(var i=0,n=0;n<t.length;n++){var a=t.charCodeAt(n);a<128?r[i++]=a:a<2048?(r[i++]=a>>6|192,r[i++]=a&63|128):_S(t,n)?(a=65536+((a&1023)<<10)+(t.charCodeAt(++n)&1023),r[i++]=a>>18|240,r[i++]=a>>12&63|128,r[i++]=a>>6&63|128,r[i++]=a&63|128):(r[i++]=a>>12|224,r[i++]=a>>6&63|128,r[i++]=a&63|128)}else for(n=0;n<t.length;n++)r[n]=t[n]|0;return r}Ke.toArray=xS;function MS(t){for(var e="",r=0;r<t.length;r++)e+=eb(t[r].toString(16));return e}Ke.toHex=MS;function Qm(t){var e=t>>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}Ke.htonl=Qm;function ES(t,e){for(var r="",i=0;i<t.length;i++){var n=t[i];e==="little"&&(n=Qm(n)),r+=tb(n.toString(16))}return r}Ke.toHex32=ES;function eb(t){return t.length===1?"0"+t:t}Ke.zero2=eb;function tb(t){return t.length===7?"0"+t:t.length===6?"00"+t:t.length===5?"000"+t:t.length===4?"0000"+t:t.length===3?"00000"+t:t.length===2?"000000"+t:t.length===1?"0000000"+t:t}Ke.zero8=tb;function SS(t,e,r,i){var n=r-e;bS(n%4===0);for(var a=new Array(n/4),f=0,v=e;f<a.length;f++,v+=4){var m;i==="big"?m=t[v]<<24|t[v+1]<<16|t[v+2]<<8|t[v+3]:m=t[v+3]<<24|t[v+2]<<16|t[v+1]<<8|t[v],a[f]=m>>>0}return a}Ke.join32=SS;function BS(t,e){for(var r=new Array(t.length*4),i=0,n=0;i<t.length;i++,n+=4){var a=t[i];e==="big"?(r[n]=a>>>24,r[n+1]=a>>>16&255,r[n+2]=a>>>8&255,r[n+3]=a&255):(r[n+3]=a>>>24,r[n+2]=a>>>16&255,r[n+1]=a>>>8&255,r[n]=a&255)}return r}Ke.split32=BS;function AS(t,e){return t>>>e|t<<32-e}Ke.rotr32=AS;function RS(t,e){return t<<e|t>>>32-e}Ke.rotl32=RS;function qS(t,e){return t+e>>>0}Ke.sum32=qS;function IS(t,e,r){return t+e+r>>>0}Ke.sum32_3=IS;function kS(t,e,r,i){return t+e+r+i>>>0}Ke.sum32_4=kS;function TS(t,e,r,i,n){return t+e+r+i+n>>>0}Ke.sum32_5=TS;function CS(t,e,r,i){var n=t[e],a=t[e+1],f=i+a>>>0,v=(f<i?1:0)+r+n;t[e]=v>>>0,t[e+1]=f}Ke.sum64=CS;function OS(t,e,r,i){var n=e+i>>>0,a=(n<e?1:0)+t+r;return a>>>0}Ke.sum64_hi=OS;function PS(t,e,r,i){var n=e+i;return n>>>0}Ke.sum64_lo=PS;function DS(t,e,r,i,n,a,f,v){var m=0,E=e;E=E+i>>>0,m+=E<e?1:0,E=E+a>>>0,m+=E<a?1:0,E=E+v>>>0,m+=E<v?1:0;var A=t+r+n+f+m;return A>>>0}Ke.sum64_4_hi=DS;function US(t,e,r,i,n,a,f,v){var m=e+i+a+v;return m>>>0}Ke.sum64_4_lo=US;function NS(t,e,r,i,n,a,f,v,m,E){var A=0,q=e;q=q+i>>>0,A+=q<e?1:0,q=q+a>>>0,A+=q<a?1:0,q=q+v>>>0,A+=q<v?1:0,q=q+E>>>0,A+=q<E?1:0;var I=t+r+n+f+m+A;return I>>>0}Ke.sum64_5_hi=NS;function LS(t,e,r,i,n,a,f,v,m,E){var A=e+i+a+v+E;return A>>>0}Ke.sum64_5_lo=LS;function FS(t,e,r){var i=e<<32-r|t>>>r;return i>>>0}Ke.rotr64_hi=FS;function jS(t,e,r){var i=t<<32-r|e>>>r;return i>>>0}Ke.rotr64_lo=jS;function HS(t,e,r){return t>>>r}Ke.shr64_hi=HS;function KS(t,e,r){var i=t<<32-r|e>>>r;return i>>>0}Ke.shr64_lo=KS});var Rn=R(ib=>{"use strict";b();var rb=Ht(),WS=Ot();function Vf(){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}ib.BlockHash=Vf;Vf.prototype.update=function(e,r){if(e=rb.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var i=e.length%this._delta8;this.pending=e.slice(e.length-i,e.length),this.pending.length===0&&(this.pending=null),e=rb.join32(e,0,e.length-i,this.endian);for(var n=0;n<e.length;n+=this._delta32)this._update(e,n,n+this._delta32)}return this};Vf.prototype.digest=function(e){return this.update(this._pad()),WS(this.pending===null),this._digest(e)};Vf.prototype._pad=function(){var e=this.pendingTotal,r=this._delta8,i=r-(e+this.padLength)%r,n=new Array(i+this.padLength);n[0]=128;for(var a=1;a<i;a++)n[a]=0;if(e<<=3,this.endian==="big"){for(var f=8;f<this.padLength;f++)n[a++]=0;n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=e>>>24&255,n[a++]=e>>>16&255,n[a++]=e>>>8&255,n[a++]=e&255}else for(n[a++]=e&255,n[a++]=e>>>8&255,n[a++]=e>>>16&255,n[a++]=e>>>24&255,n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=0,f=8;f<this.padLength;f++)n[a++]=0;return n}});var vl=R(Sr=>{"use strict";b();var zS=Ht(),rr=zS.rotr32;function GS(t,e,r,i){if(t===0)return nb(e,r,i);if(t===1||t===3)return ob(e,r,i);if(t===2)return ab(e,r,i)}Sr.ft_1=GS;function nb(t,e,r){return t&e^~t&r}Sr.ch32=nb;function ab(t,e,r){return t&e^t&r^e&r}Sr.maj32=ab;function ob(t,e,r){return t^e^r}Sr.p32=ob;function VS(t){return rr(t,2)^rr(t,13)^rr(t,22)}Sr.s0_256=VS;function $S(t){return rr(t,6)^rr(t,11)^rr(t,25)}Sr.s1_256=$S;function ZS(t){return rr(t,7)^rr(t,18)^t>>>3}Sr.g0_256=ZS;function YS(t){return rr(t,17)^rr(t,19)^t>>>10}Sr.g1_256=YS});var ub=R((dT,sb)=>{"use strict";b();var qn=Ht(),XS=Rn(),JS=vl(),yl=qn.rotl32,Za=qn.sum32,QS=qn.sum32_5,eB=JS.ft_1,fb=XS.BlockHash,tB=[1518500249,1859775393,2400959708,3395469782];function ir(){if(!(this instanceof ir))return new ir;fb.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}qn.inherits(ir,fb);sb.exports=ir;ir.blockSize=512;ir.outSize=160;ir.hmacStrength=80;ir.padLength=64;ir.prototype._update=function(e,r){for(var i=this.W,n=0;n<16;n++)i[n]=e[r+n];for(;n<i.length;n++)i[n]=yl(i[n-3]^i[n-8]^i[n-14]^i[n-16],1);var a=this.h[0],f=this.h[1],v=this.h[2],m=this.h[3],E=this.h[4];for(n=0;n<i.length;n++){var A=~~(n/20),q=QS(yl(a,5),eB(A,f,v,m),E,i[n],tB[A]);E=m,m=v,v=yl(f,30),f=a,a=q}this.h[0]=Za(this.h[0],a),this.h[1]=Za(this.h[1],f),this.h[2]=Za(this.h[2],v),this.h[3]=Za(this.h[3],m),this.h[4]=Za(this.h[4],E)};ir.prototype._digest=function(e){return e==="hex"?qn.toHex32(this.h,"big"):qn.split32(this.h,"big")}});var gl=R((vT,lb)=>{"use strict";b();var In=Ht(),rB=Rn(),kn=vl(),iB=Ot(),Kt=In.sum32,nB=In.sum32_4,aB=In.sum32_5,oB=kn.ch32,fB=kn.maj32,sB=kn.s0_256,uB=kn.s1_256,hB=kn.g0_256,lB=kn.g1_256,hb=rB.BlockHash,cB=[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 nr(){if(!(this instanceof nr))return new nr;hb.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=cB,this.W=new Array(64)}In.inherits(nr,hb);lb.exports=nr;nr.blockSize=512;nr.outSize=256;nr.hmacStrength=192;nr.padLength=64;nr.prototype._update=function(e,r){for(var i=this.W,n=0;n<16;n++)i[n]=e[r+n];for(;n<i.length;n++)i[n]=nB(lB(i[n-2]),i[n-7],hB(i[n-15]),i[n-16]);var a=this.h[0],f=this.h[1],v=this.h[2],m=this.h[3],E=this.h[4],A=this.h[5],q=this.h[6],I=this.h[7];for(iB(this.k.length===i.length),n=0;n<i.length;n++){var C=aB(I,uB(E),oB(E,A,q),this.k[n],i[n]),j=Kt(sB(a),fB(a,f,v));I=q,q=A,A=E,E=Kt(m,C),m=v,v=f,f=a,a=Kt(C,j)}this.h[0]=Kt(this.h[0],a),this.h[1]=Kt(this.h[1],f),this.h[2]=Kt(this.h[2],v),this.h[3]=Kt(this.h[3],m),this.h[4]=Kt(this.h[4],E),this.h[5]=Kt(this.h[5],A),this.h[6]=Kt(this.h[6],q),this.h[7]=Kt(this.h[7],I)};nr.prototype._digest=function(e){return e==="hex"?In.toHex32(this.h,"big"):In.split32(this.h,"big")}});var pb=R((gT,db)=>{"use strict";b();var ml=Ht(),cb=gl();function Br(){if(!(this instanceof Br))return new Br;cb.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}ml.inherits(Br,cb);db.exports=Br;Br.blockSize=512;Br.outSize=224;Br.hmacStrength=192;Br.padLength=64;Br.prototype._digest=function(e){return e==="hex"?ml.toHex32(this.h.slice(0,7),"big"):ml.split32(this.h.slice(0,7),"big")}});var _l=R((bT,mb)=>{"use strict";b();var mt=Ht(),dB=Rn(),pB=Ot(),ar=mt.rotr64_hi,or=mt.rotr64_lo,vb=mt.shr64_hi,yb=mt.shr64_lo,jr=mt.sum64,bl=mt.sum64_hi,wl=mt.sum64_lo,vB=mt.sum64_4_hi,yB=mt.sum64_4_lo,gB=mt.sum64_5_hi,mB=mt.sum64_5_lo,gb=dB.BlockHash,bB=[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 Wt(){if(!(this instanceof Wt))return new Wt;gb.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=bB,this.W=new Array(160)}mt.inherits(Wt,gb);mb.exports=Wt;Wt.blockSize=1024;Wt.outSize=512;Wt.hmacStrength=192;Wt.padLength=128;Wt.prototype._prepareBlock=function(e,r){for(var i=this.W,n=0;n<32;n++)i[n]=e[r+n];for(;n<i.length;n+=2){var a=IB(i[n-4],i[n-3]),f=kB(i[n-4],i[n-3]),v=i[n-14],m=i[n-13],E=RB(i[n-30],i[n-29]),A=qB(i[n-30],i[n-29]),q=i[n-32],I=i[n-31];i[n]=vB(a,f,v,m,E,A,q,I),i[n+1]=yB(a,f,v,m,E,A,q,I)}};Wt.prototype._update=function(e,r){this._prepareBlock(e,r);var i=this.W,n=this.h[0],a=this.h[1],f=this.h[2],v=this.h[3],m=this.h[4],E=this.h[5],A=this.h[6],q=this.h[7],I=this.h[8],C=this.h[9],j=this.h[10],V=this.h[11],X=this.h[12],z=this.h[13],$=this.h[14],Le=this.h[15];pB(this.k.length===i.length);for(var k=0;k<i.length;k+=2){var O=$,D=Le,L=BB(I,C),F=AB(I,C),H=wB(I,C,j,V,X,z),M=_B(I,C,j,V,X,z),h=this.k[k],y=this.k[k+1],l=i[k],o=i[k+1],s=gB(O,D,L,F,H,M,h,y,l,o),d=mB(O,D,L,F,H,M,h,y,l,o);O=EB(n,a),D=SB(n,a),L=xB(n,a,f,v,m,E),F=MB(n,a,f,v,m,E);var g=bl(O,D,L,F),p=wl(O,D,L,F);$=X,Le=z,X=j,z=V,j=I,V=C,I=bl(A,q,s,d),C=wl(q,q,s,d),A=m,q=E,m=f,E=v,f=n,v=a,n=bl(s,d,g,p),a=wl(s,d,g,p)}jr(this.h,0,n,a),jr(this.h,2,f,v),jr(this.h,4,m,E),jr(this.h,6,A,q),jr(this.h,8,I,C),jr(this.h,10,j,V),jr(this.h,12,X,z),jr(this.h,14,$,Le)};Wt.prototype._digest=function(e){return e==="hex"?mt.toHex32(this.h,"big"):mt.split32(this.h,"big")};function wB(t,e,r,i,n){var a=t&r^~t&n;return a<0&&(a+=4294967296),a}function _B(t,e,r,i,n,a){var f=e&i^~e&a;return f<0&&(f+=4294967296),f}function xB(t,e,r,i,n){var a=t&r^t&n^r&n;return a<0&&(a+=4294967296),a}function MB(t,e,r,i,n,a){var f=e&i^e&a^i&a;return f<0&&(f+=4294967296),f}function EB(t,e){var r=ar(t,e,28),i=ar(e,t,2),n=ar(e,t,7),a=r^i^n;return a<0&&(a+=4294967296),a}function SB(t,e){var r=or(t,e,28),i=or(e,t,2),n=or(e,t,7),a=r^i^n;return a<0&&(a+=4294967296),a}function BB(t,e){var r=ar(t,e,14),i=ar(t,e,18),n=ar(e,t,9),a=r^i^n;return a<0&&(a+=4294967296),a}function AB(t,e){var r=or(t,e,14),i=or(t,e,18),n=or(e,t,9),a=r^i^n;return a<0&&(a+=4294967296),a}function RB(t,e){var r=ar(t,e,1),i=ar(t,e,8),n=vb(t,e,7),a=r^i^n;return a<0&&(a+=4294967296),a}function qB(t,e){var r=or(t,e,1),i=or(t,e,8),n=yb(t,e,7),a=r^i^n;return a<0&&(a+=4294967296),a}function IB(t,e){var r=ar(t,e,19),i=ar(e,t,29),n=vb(t,e,6),a=r^i^n;return a<0&&(a+=4294967296),a}function kB(t,e){var r=or(t,e,19),i=or(e,t,29),n=yb(t,e,6),a=r^i^n;return a<0&&(a+=4294967296),a}});var _b=R((_T,wb)=>{"use strict";b();var xl=Ht(),bb=_l();function Ar(){if(!(this instanceof Ar))return new Ar;bb.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}xl.inherits(Ar,bb);wb.exports=Ar;Ar.blockSize=1024;Ar.outSize=384;Ar.hmacStrength=192;Ar.padLength=128;Ar.prototype._digest=function(e){return e==="hex"?xl.toHex32(this.h.slice(0,12),"big"):xl.split32(this.h.slice(0,12),"big")}});var xb=R(Tn=>{"use strict";b();Tn.sha1=ub();Tn.sha224=pb();Tn.sha256=gl();Tn.sha384=_b();Tn.sha512=_l()});var Rb=R(Ab=>{"use strict";b();var Ni=Ht(),TB=Rn(),$f=Ni.rotl32,Mb=Ni.sum32,Ya=Ni.sum32_3,Eb=Ni.sum32_4,Bb=TB.BlockHash;function fr(){if(!(this instanceof fr))return new fr;Bb.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}Ni.inherits(fr,Bb);Ab.ripemd160=fr;fr.blockSize=512;fr.outSize=160;fr.hmacStrength=192;fr.padLength=64;fr.prototype._update=function(e,r){for(var i=this.h[0],n=this.h[1],a=this.h[2],f=this.h[3],v=this.h[4],m=i,E=n,A=a,q=f,I=v,C=0;C<80;C++){var j=Mb($f(Eb(i,Sb(C,n,a,f),e[PB[C]+r],CB(C)),UB[C]),v);i=v,v=f,f=$f(a,10),a=n,n=j,j=Mb($f(Eb(m,Sb(79-C,E,A,q),e[DB[C]+r],OB(C)),NB[C]),I),m=I,I=q,q=$f(A,10),A=E,E=j}j=Ya(this.h[1],a,q),this.h[1]=Ya(this.h[2],f,I),this.h[2]=Ya(this.h[3],v,m),this.h[3]=Ya(this.h[4],i,E),this.h[4]=Ya(this.h[0],n,A),this.h[0]=j};fr.prototype._digest=function(e){return e==="hex"?Ni.toHex32(this.h,"little"):Ni.split32(this.h,"little")};function Sb(t,e,r,i){return t<=15?e^r^i:t<=31?e&r|~e&i:t<=47?(e|~r)^i:t<=63?e&i|r&~i:e^(r|~i)}function CB(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function OB(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}var PB=[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],DB=[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],UB=[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],NB=[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]});var Ib=R((AT,qb)=>{"use strict";b();var LB=Ht(),FB=Ot();function Cn(t,e,r){if(!(this instanceof Cn))return new Cn(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(LB.toArray(e,r))}qb.exports=Cn;Cn.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),FB(e.length<=this.blockSize);for(var r=e.length;r<this.blockSize;r++)e.push(0);for(r=0;r<e.length;r++)e[r]^=54;for(this.inner=new this.Hash().update(e),r=0;r<e.length;r++)e[r]^=106;this.outer=new this.Hash().update(e)};Cn.prototype.update=function(e,r){return this.inner.update(e,r),this};Cn.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}});var Tb=R(kb=>{b();var ot=kb;ot.utils=Ht();ot.common=Rn();ot.sha=xb();ot.ripemd=Rb();ot.hmac=Ib();ot.sha1=ot.sha.sha1;ot.sha256=ot.sha.sha256;ot.sha224=ot.sha.sha224;ot.sha384=ot.sha.sha384;ot.sha512=ot.sha.sha512;ot.ripemd160=ot.ripemd.ripemd160});var Ob=R((kT,Cb)=>{"use strict";b();var Zf=Tb(),Rr=zf(),Je=Cb.exports;Je.sha1=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),B.Buffer.from(Zf.sha1().update(t).digest("hex"),"hex")};Je.sha1.blocksize=512;Je.sha256=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),B.Buffer.from(Zf.sha256().update(t).digest("hex"),"hex")};Je.sha256.blocksize=512;Je.sha256sha256=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),Je.sha256(Je.sha256(t))};Je.ripemd160=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),B.Buffer.from(Zf.ripemd160().update(t).digest("hex"),"hex")};Je.sha256ripemd160=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),Je.ripemd160(Je.sha256(t))};Je.sha512=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),B.Buffer.from(Zf.sha512().update(t).digest("hex"),"hex")};Je.sha512.blocksize=1024;Je.hmac=function(t,e,r){Rr.checkArgument(B.Buffer.isBuffer(e)),Rr.checkArgument(B.Buffer.isBuffer(r)),Rr.checkArgument(t.blocksize);var i=t.blocksize/8;if(r.length>i)r=t(r);else if(r<i){var n=B.Buffer.alloc(i);n.fill(0),r.copy(n),r=n}var a=B.Buffer.alloc(i);a.fill(92);var f=B.Buffer.alloc(i);f.fill(54);for(var v=B.Buffer.alloc(i),m=B.Buffer.alloc(i),E=0;E<i;E++)v[E]=a[E]^r[E],m[E]=f[E]^r[E];return t(B.Buffer.concat([v,t(B.Buffer.concat([m,e]))]))};Je.sha256hmac=function(t,e){return Je.hmac(Je.sha256,t,e)};Je.sha512hmac=function(t,e){return Je.hmac(Je.sha512,t,e)}});var Db=R((CT,Pb)=>{"use strict";b();var Yf=Ka(),qr=zf(),Qe=Pb.exports;Qe.sha1=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),Yf.createHash("sha1").update(t).digest()};Qe.sha1.blocksize=512;Qe.sha256=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),Yf.createHash("sha256").update(t).digest()};Qe.sha256.blocksize=512;Qe.sha256sha256=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),Qe.sha256(Qe.sha256(t))};Qe.ripemd160=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),Yf.createHash("ripemd160").update(t).digest()};Qe.sha256ripemd160=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),Qe.ripemd160(Qe.sha256(t))};Qe.sha512=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),Yf.createHash("sha512").update(t).digest()};Qe.sha512.blocksize=1024;Qe.hmac=function(t,e,r){qr.checkArgument(B.Buffer.isBuffer(e)),qr.checkArgument(B.Buffer.isBuffer(r)),qr.checkArgument(t.blocksize);var i=t.blocksize/8;if(r.length>i)r=t(r);else if(r<i){var n=B.Buffer.alloc(i);n.fill(0),r.copy(n),r=n}var a=B.Buffer.alloc(i);a.fill(92);var f=B.Buffer.alloc(i);f.fill(54);for(var v=B.Buffer.alloc(i),m=B.Buffer.alloc(i),E=0;E<i;E++)v[E]=a[E]^r[E],m[E]=f[E]^r[E];return t(B.Buffer.concat([v,t(B.Buffer.concat([m,e]))]))};Qe.sha256hmac=function(t,e){return Qe.hmac(Qe.sha256,t,e)};Qe.sha512hmac=function(t,e){return Qe.hmac(Qe.sha512,t,e)}});var Ub=R((PT,Ml)=>{b();S.default.browser?Ml.exports=Ob():Ml.exports=Db()});var Lb=R((El,Nb)=>{b();(function(t,e){"use strict";typeof define=="function"&&define.amd?define([],function(){return t.secrets=e()}):typeof El=="object"?Nb.exports=e(Ka()):t.secrets=e(t.crypto)})(El,function(t){"use strict";var e,r,i,n,a;function f(){e={bits:8,radix:16,minBits:3,maxBits:20,bytesPerChar:2,maxBytesPerChar:6,primitivePolynomials:[null,null,1,3,3,5,3,3,29,17,9,5,83,27,43,3,45,9,39,39,9,5,3,33,27,9,71,39,9,5,83]},r={},i=new Array(1024).join("0"),n=!0,a=["nodeCryptoRandomBytes","browserCryptoGetRandomValues","testRandom"]}function v(){return!!(r&&r.rng&&typeof r.rng=="function")}function m(k,O){var D;if(O===0||O===1)return k;if(O&&O>1024)throw new Error("Padding must be multiples of no larger than 1024 bits.");return O=O||r.bits,k&&(D=k.length%O),D?(i+k).slice(-(O-D+k.length)):k}function E(k){var O="",D,L;for(L=k.length-1;L>=0;L--){if(D=parseInt(k[L],16),isNaN(D))throw new Error("Invalid hex character.");O=m(D.toString(2),4)+O}return O}function A(k){var O="",D,L;for(k=m(k,4),L=k.length;L>=4;L-=4){if(D=parseInt(k.slice(L-4,L),2),isNaN(D))throw new Error("Invalid binary character.");O=D.toString(16)+O}return O}function q(){return!!(t&&typeof t=="object"&&(typeof t.getRandomValues=="function"||typeof t.getRandomValues=="object")&&(typeof Uint32Array=="function"||typeof Uint32Array=="object"))}function I(){return typeof t=="object"&&typeof t.randomBytes=="function"}function C(k){function O(H,M,h,y){var l=0,o,s="",d;for(M&&(o=M.length-1);l<o||s.length<H;)d=Math.abs(parseInt(M[l],h)),s=s+m(d.toString(2),y),l++;return s=s.substr(-H),(s.match(/0/g)||[]).length===s.length?null:s}function D(H){var M,h,y,l,o=null;for(y=16,l=4,h=Math.ceil(H/8);o===null;)M=t.randomBytes(h),o=O(H,M.toString("hex"),y,l);return o}function L(H){var M,h,y,l=null;for(h=10,y=32,M=Math.ceil(H/32);l===null;)l=O(H,t.getRandomValues(new Uint32Array(M)),h,y);return l}function F(H){var M,h,y,l,o,s=null;l=10,o=32,h=Math.ceil(H/32),y=123456789,M=new Uint32Array(h);for(var d=0;d<M.length;d++)M[d]=y;for(;s===null;)s=O(H,M,l,o);return s}if(k&&k==="testRandom")return r.typeCSPRNG=k,F;if(k&&k==="nodeCryptoRandomBytes")return r.typeCSPRNG=k,D;if(k&&k==="browserCryptoGetRandomValues")return r.typeCSPRNG=k,L;if(I())return r.typeCSPRNG="nodeCryptoRandomBytes",D;if(q())return r.typeCSPRNG="browserCryptoGetRandomValues",L}function j(k,O){var D=[],L;for(O&&(k=m(k,O)),L=k.length;L>r.bits;L-=r.bits)D.push(parseInt(k.slice(L-r.bits,L),2));return D.push(parseInt(k.slice(0,L),2)),D}function V(k,O){var D=r.logs[k],L=0,F;for(F=O.length-1;F>=0;F--)L!==0?L=r.exps[(D+r.logs[L])%r.maxShares]^O[F]:L=O[F];return L}function X(k,O,D){var L=0,F,H,M,h;for(M=0,F=O.length;M<F;M++)if(D[M]){for(H=r.logs[D[M]],h=0;h<F;h++)if(M!==h){if(k===O[h]){H=-1;break}H=(H+r.logs[k^O[h]]-r.logs[O[M]^O[h]]+r.maxShares)%r.maxShares}L=H===-1?L:L^r.exps[H]}return L}function z(k,O,D){var L=[],F=[k],H,M;for(H=1;H<D;H++)F[H]=parseInt(r.rng(r.bits),2);for(H=1,M=O+1;H<M;H++)L[H-1]={x:H,y:V(H,F)};return L}function $(k,O,D){var L,F,H,M,h;if(O=parseInt(O,r.radix),k=parseInt(k,10)||r.bits,L=k.toString(36).toUpperCase(),H=Math.pow(2,k)-1,M=H.toString(r.radix).length,F=m(O.toString(r.radix),M),typeof O!="number"||O%1!==0||O<1||O>H)throw new Error("Share id must be an integer between 1 and "+H+", inclusive.");return h=L+F+D,h}var Le={init:function(k,O){var D=[],L=[],F=1,H,M;if(f(),k&&(typeof k!="number"||k%1!==0||k<e.minBits||k>e.maxBits))throw new Error("Number of bits must be an integer between "+e.minBits+" and "+e.maxBits+", inclusive.");if(O&&a.indexOf(O)===-1)throw new Error("Invalid RNG type argument : '"+O+"'");for(r.radix=e.radix,r.bits=k||e.bits,r.size=Math.pow(2,r.bits),r.maxShares=r.size-1,H=e.primitivePolynomials[r.bits],M=0;M<r.size;M++)L[M]=F,D[F]=M,F=F<<1,F>=r.size&&(F=F^H,F=F&r.maxShares);if(r.logs=D,r.exps=L,O&&this.setRNG(O),v()||this.setRNG(),!v()||!r.bits||!r.size||!r.maxShares||!r.logs||!r.exps||r.logs.length!==r.size||r.exps.length!==r.size)throw new Error("Initialization failed.")},combine:function(k,O){var D,L,F,H,M="",h,y,l,o=[],s=[];for(O=O||0,D=0,F=k.length;D<F;D++){if(y=this.extractShareComponents(k[D]),h===void 0)h=y.bits;else if(y.bits!==h)throw new Error("Mismatched shares: Different bit settings.");if(r.bits!==h&&this.init(h),o.indexOf(y.id)===-1)for(o.push(y.id),l=j(E(y.data)),L=0,H=l.length;L<H;L++)s[L]=s[L]||[],s[L][o.length-1]=l[L]}for(D=0,F=s.length;D<F;D++)M=m(X(O,o,s[D]).toString(2))+M;return A(O>=1?M:M.slice(M.indexOf("1")+1))},getConfig:function(){var k={};return k.radix=r.radix,k.bits=r.bits,k.maxShares=r.maxShares,k.hasCSPRNG=v(),k.typeCSPRNG=r.typeCSPRNG,k},extractShareComponents:function(k){var O,D,L,F,H={},M,h;if(O=parseInt(k.substr(0,1),36),O&&(typeof O!="number"||O%1!==0||O<e.minBits||O>e.maxBits))throw new Error("Invalid share : Number of bits must be an integer between "+e.minBits+" and "+e.maxBits+", inclusive.");if(F=Math.pow(2,O)-1,L=(Math.pow(2,O)-1).toString(r.radix).length,M="^([a-kA-K3-9]{1})([a-fA-F0-9]{"+L+"})([a-fA-F0-9]+)$",h=new RegExp(M).exec(k),h&&(D=parseInt(h[2],r.radix)),typeof D!="number"||D%1!==0||D<1||D>F)throw new Error("Invalid share : Share id must be an integer between 1 and "+r.maxShares+", inclusive.");if(h&&h[3])return H.bits=O,H.id=D,H.data=h[3],H;throw new Error("The share data provided is invalid : "+k)},setRNG:function(k){var O="Random number generator is invalid ",D=" Supply an CSPRNG of the form function(bits){} that returns a string containing 'bits' number of random 1's and 0's.";if(k&&typeof k=="string"&&a.indexOf(k)===-1)throw new Error("Invalid RNG type argument : '"+k+"'");if(k||(k=C()),k&&typeof k=="string"&&(k=C(k)),n){if(k&&typeof k!="function")throw new Error(O+"(Not a function)."+D);if(k&&typeof k(r.bits)!="string")throw new Error(O+"(Output is not a string)."+D);if(k&&!parseInt(k(r.bits),2))throw new Error(O+"(Binary string output not parseable to an Integer)."+D);if(k&&k(r.bits).length>r.bits)throw new Error(O+"(Output length is greater than config.bits)."+D);if(k&&k(r.bits).length<r.bits)throw new Error(O+"(Output length is less than config.bits)."+D)}return r.rng=k,!0},str2hex:function(k,O){var D,L,F="",H,M,h,y;if(typeof k!="string")throw new Error("Input must be a character string.");if(O||(O=e.bytesPerChar),typeof O!="number"||O<1||O>e.maxBytesPerChar||O%1!==0)throw new Error("Bytes per character must be an integer between 1 and "+e.maxBytesPerChar+", inclusive.");for(D=2*O,L=Math.pow(16,D)-1,h=0,y=k.length;h<y;h++){if(M=k[h].charCodeAt(),isNaN(M))throw new Error("Invalid character: "+k[h]);if(M>L)throw H=Math.ceil(Math.log(M+1)/Math.log(256)),new Error("Invalid character code ("+M+"). Maximum allowable is 256^bytes-1 ("+L+"). To convert this character, use at least "+H+" bytes.");F=m(M.toString(16),D)+F}return F},hex2str:function(k,O){var D,L="",F,H;if(typeof k!="string")throw new Error("Input must be a hexadecimal string.");if(O=O||e.bytesPerChar,typeof O!="number"||O%1!==0||O<1||O>e.maxBytesPerChar)throw new Error("Bytes per character must be an integer between 1 and "+e.maxBytesPerChar+", inclusive.");for(D=2*O,k=m(k,D),F=0,H=k.length;F<H;F+=D)L=String.fromCharCode(parseInt(k.slice(F,F+D),16))+L;return L},random:function(k){if(typeof k!="number"||k%1!==0||k<2||k>65536)throw new Error("Number of bits must be an Integer between 1 and 65536.");return A(r.rng(k))},share:function(k,O,D,L){var F,H,M=new Array(O),h=new Array(O),y,l,o;if(L=L||128,typeof k!="string")throw new Error("Secret must be a string.");if(typeof O!="number"||O%1!==0||O<2)throw new Error("Number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive.");if(O>r.maxShares)throw F=Math.ceil(Math.log(O+1)/Math.LN2),new Error("Number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive. To create "+O+" shares, use at least "+F+" bits.");if(typeof D!="number"||D%1!==0||D<2)throw new Error("Threshold number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive.");if(D>r.maxShares)throw F=Math.ceil(Math.log(D+1)/Math.LN2),new Error("Threshold number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive. To use a threshold of "+D+", use at least "+F+" bits.");if(D>O)throw new Error("Threshold number of shares was "+D+" but must be less than or equal to the "+O+" shares specified as the total to generate.");if(typeof L!="number"||L%1!==0||L<0||L>1024)throw new Error("Zero-pad length must be an integer between 0 and 1024 inclusive.");for(k="1"+E(k),k=j(k,L),y=0,o=k.length;y<o;y++)for(H=z(k[y],O,D),l=0;l<O;l++)M[l]=M[l]||H[l].x.toString(r.radix),h[l]=m(H[l].y.toString(2))+(h[l]||"");for(y=0;y<O;y++)M[y]=$(r.bits,M[y],A(h[y]));return M},newShare:function(k,O){var D,L;if(k&&typeof k=="string"&&(k=parseInt(k,r.radix)),L=k.toString(r.radix),k&&L&&O&&O[0])return D=this.extractShareComponents(O[0]),$(D.bits,L,this.combine(O,k));throw new Error("Invalid 'id' or 'shares' Array argument to newShare().")},_reset:f,_padLeft:m,_hex2bin:E,_bin2hex:A,_hasCryptoGetRandomValues:q,_hasCryptoRandomBytes:I,_getRNG:C,_isSetRNG:v,_splitNumStringToIntArray:j,_horner:V,_lagrange:X,_getShares:z,_constructPublicShareString:$};return Le.init(),Le})});var Wb=R((NT,Kb)=>{"use strict";b();var dt=Jm(),Fb=ll(),jb=Ub(),Xf=null;function Sl(){if(Xf)return Xf;var t=Lb();return t.setRNG(function(e){for(var r=64,i=0;i<r;i++){for(var n=Fb.getRandomBuffer(Math.ceil(e/8)),a="",f=0;f<n.length;f++)a+=("00000000"+n[f].toString(2)).slice(-8);if(a=a.slice(0,e),/1/.test(a))return a}throw new Error("shamir: CSPRNG returned all-zero draws "+r+" times in a row \u2014 refusing to hang on a degenerate/stubbed random source")}),Xf=t,Xf}var Jf="ff",Hb=2;function et(t){return this instanceof et?(this.options=t||{},this):new et(t)}et.split=function(t,e,r,i){if(i=i||{},t==null)throw new Error("Secret is required");if(e<2)throw new Error("Threshold must be at least 2");if(r<e)throw new Error("Number of shares must be at least threshold");if(e>255||r>255)throw new Error("Threshold and shares must be <= 255");for(var n=B.Buffer.isBuffer(t)?t:B.Buffer.from(t,"utf8"),a=Jf+n.toString("hex"),f=Sl().share(a,r,e),v=Fb.getRandomBuffer(8).toString("hex"),m=i.checksum===!0,E=m?jb.sha256(n).slice(0,4).toString("hex"):null,A=[],q=0;q<f.length;q++)A.push({v:Hb,id:q+1,threshold:e,shares:r,length:n.length,splitId:v,share:f[q],checksum:E});return A};et.combine=function(t){if(!t||t.length===0)throw new Error("Shares array is required");if(t[0]&&Array.isArray(t[0].bytes)&&t[0].share===void 0)return et._combineLegacy(t);var e=t[0].threshold,r=t[0].splitId;if(t.length<e)throw new Error("Insufficient shares: need "+e+", got "+t.length);for(var i=[],n=0;n<t.length;n++){var a=t[n];if(!a||typeof a.share!="string")throw new Error("Invalid share at index "+n);if(r!==void 0&&a.splitId!==r)throw new Error("Shares are from different splits (splitId mismatch)");if(a.threshold!==e)throw new Error("Shares have inconsistent threshold");i.push(a.share)}var f=Sl().combine(i);if(f.slice(0,Jf.length)!==Jf)throw new Error("Reconstruction failed: invalid or insufficient shares");var v=B.Buffer.from(f.slice(Jf.length),"hex"),m=t[0].checksum;if(m){var E=jb.sha256(v).slice(0,4).toString("hex");if(E!==m)throw new Error("Integrity check failed: shares are inconsistent or tampered")}return v};et.verifyShare=function(t){try{return!t||typeof t!="object"?!1:Array.isArray(t.bytes)&&t.share===void 0?et._verifyLegacyShare(t):t.v!==Hb||typeof t.share!="string"||!/^[0-9a-fA-F]+$/.test(t.share)||typeof t.threshold!="number"||typeof t.shares!="number"||t.threshold<2||t.shares<t.threshold||t.shares>255||t.id<1||t.id>t.shares||t.checksum!==null&&t.checksum!==void 0&&!/^[0-9a-fA-F]{8}$/.test(t.checksum)?!1:(Sl().extractShareComponents(t.share),!0)}catch{return!1}};et.generateTestVectors=function(){var t="Hello, Bitcoin SV!",e=3,r=5,i=et.split(t,e,r),n=et.combine(i.slice(0,e));return{secret:t,threshold:e,totalShares:r,shares:i,reconstructed:n.toString("utf8"),valid:n.toString("utf8")===t}};var Hr=new dt(2147483647);et._combineLegacy=function(t){var e=t[0].threshold,r=t[0].shares,i=t[0].length;if(t.length<e)throw new Error("Insufficient shares: need "+e+", got "+t.length);for(var n=0;n<t.length;n++){if(t[n].threshold!==e||t[n].shares!==r)throw new Error("Shares have inconsistent parameters");if(t[n].length!==i)throw new Error("Shares have different secret lengths")}for(var a=[],f=0;f<i;f++){for(var v=[],m=0;m<Math.min(t.length,e);m++)v.push(t[m].bytes[f]);a.push(et._combineByteLegacy(v))}return B.Buffer.from(a)};et._combineByteLegacy=function(t){for(var e=new dt(0),r=0;r<t.length;r++){for(var i=new dt(t[r].x),n=new dt(t[r].y,16),a=new dt(1),f=new dt(1),v=0;v<t.length;v++)if(r!==v){var m=new dt(t[v].x),E=new dt(0).sub(m);E.lt(new dt(0))&&(E=E.add(Hr)),a=a.mul(E).mod(Hr);var A=i.sub(m);A.lt(new dt(0))&&(A=A.add(Hr)),f=f.mul(A).mod(Hr)}var q=et._modInverseLegacy(f,Hr),I=a.mul(q).mod(Hr);e=e.add(n.mul(I)).mod(Hr)}return e.mod(Hr).mod(new dt(256)).toNumber()};et._modInverseLegacy=function(t,e){t.lt(new dt(0))&&(t=t.mod(e).add(e));var r=et._extendedGCDLegacy(t,e);if(!r.gcd.eq(new dt(1)))throw new Error("Modular inverse does not exist");return r.x.mod(e).add(e).mod(e)};et._extendedGCDLegacy=function(t,e){if(t.eq(new dt(0)))return{gcd:e,x:new dt(0),y:new dt(1)};var r=et._extendedGCDLegacy(e.mod(t),t);return{gcd:r.gcd,x:r.y.sub(e.div(t).mul(r.x)),y:r.x}};et._verifyLegacyShare=function(t){if(!t.id||!t.threshold||!t.shares||!t.bytes||typeof t.length!="number"||t.threshold<2||t.shares<t.threshold||!Array.isArray(t.bytes)||t.bytes.length!==t.length)return!1;for(var e=0;e<t.bytes.length;e++){var r=t.bytes[e];if(!r||!r.x||!r.y||r.x<1||r.x>t.shares||!/^[0-9a-fA-F]+$/.test(r.y))return!1}return!0};Kb.exports=et});var jB=R((FT,zb)=>{b();zb.exports=Wb()});return jB();})();
|
|
17
|
+
https://github.com/browserify/crypto-browserify`)};Te.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}});var il=R((qk,Tm)=>{"use strict";w();function En(){}En.getRandomBuffer=function(t){return S.default.browser?En.getRandomBufferBrowser(t):En.getRandomBufferNode(t)};En.getRandomBufferNode=function(t){var e=ja();return e.randomBytes(t)};En.getRandomBufferBrowser=function(t){if(!window.crypto&&!window.msCrypto)throw new Error("window.crypto not available");var e;if(window.crypto&&window.crypto.getRandomValues)e=window.crypto;else if(window.msCrypto&&window.msCrypto.getRandomValues)e=window.msCrypto;else throw new Error("window.crypto.getRandomValues not available");var r=new Uint8Array(t);e.getRandomValues(r);var n=B.Buffer.from(r);return n};Tm.exports=En});var Hf=R((kk,Cm)=>{"use strict";w();var iS=il(),We={};We.isArray=t=>Array.isArray(t);We.isNumber=t=>typeof t=="number";We.isObject=t=>t&&typeof t=="object";We.isString=t=>typeof t=="string";We.isUndefined=t=>typeof t>"u";We.isFunction=t=>typeof t=="function";We.isNull=t=>t===null;We.isDate=t=>t instanceof Date;We.extend=(t,e)=>Object.assign(t,e);We.noop=()=>{};We.every=(t,e)=>t.every(e||(r=>r));We.map=(t,e)=>Array.from(t).map(e||(r=>r));We.includes=(t,e)=>t.includes(e);We.each=(t,e)=>t.forEach(e);We.clone=t=>Object.assign({},t);We.pick=(t,e)=>{let r={};return e.forEach(n=>{typeof t[n]<"u"&&(r[n]=t[n])}),r};We.values=t=>Object.values(t);We.filter=(t,e)=>t.filter(e);We.reduce=(t,e,r)=>t.reduce(e,r);We.without=(t,e)=>t.filter(r=>r!==e);We.shuffle=t=>{let e=t.slice(0);for(let r=e.length-1;r>0;r--){let i=iS.getRandomBuffer(4).readUInt32BE(0)/4294967296,a=Math.floor(i*(r+1));[e[r],e[a]]=[e[a],e[r]]}return e};We.difference=(t,e)=>t.filter(r=>!e.includes(r));We.findIndex=(t,e)=>t.findIndex(e);We.some=(t,e)=>t.some(e);We.range=t=>[...Array(t).keys()];Cm.exports=We});var Pm=R((Ck,Om)=>{"use strict";w();var nS="https://docs.moneybutton.com/";Om.exports=[{name:"InvalidB58Char",message:"Invalid Base58 character: {0} in {1}"},{name:"InvalidB58Checksum",message:"Invalid Base58 checksum for {0}"},{name:"InvalidNetwork",message:"Invalid version for network: got {0}"},{name:"InvalidState",message:"Invalid state: {0}"},{name:"NotImplemented",message:"Function {0} was not implemented yet"},{name:"InvalidNetworkArgument",message:'Invalid network: must be "livenet" or "testnet", got {0}'},{name:"InvalidArgument",message:function(){return"Invalid Argument"+(arguments[0]?": "+arguments[0]:"")+(arguments[1]?" Documentation: "+nS+arguments[1]:"")}},{name:"AbstractMethodInvoked",message:"Abstract Method Invocation: {0}"},{name:"InvalidArgumentType",message:function(){return"Invalid Argument for "+arguments[2]+", expected "+arguments[1]+" but got "+typeof arguments[0]}},{name:"Unit",message:"Internal Error on Unit {0}",errors:[{name:"UnknownCode",message:"Unrecognized unit code: {0}"},{name:"InvalidRate",message:"Invalid exchange rate: {0}"}]},{name:"MerkleBlock",message:"Internal Error on MerkleBlock {0}",errors:[{name:"InvalidMerkleTree",message:"This MerkleBlock contain an invalid Merkle Tree"}]},{name:"Transaction",message:"Internal Error on Transaction {0}",errors:[{name:"Input",message:"Internal Error on Input {0}",errors:[{name:"MissingScript",message:"Need a script to create an input"},{name:"UnsupportedScript",message:"Unsupported input script type: {0}"},{name:"MissingPreviousOutput",message:"No previous output information."}]},{name:"NeedMoreInfo",message:"{0}"},{name:"InvalidSorting",message:"The sorting function provided did not return the change output as one of the array elements"},{name:"InvalidOutputAmountSum",message:"{0}"},{name:"MissingSignatures",message:"Some inputs have not been fully signed"},{name:"InvalidIndex",message:"Invalid index: {0} is not between 0, {1}"},{name:"UnableToVerifySignature",message:"Unable to verify signature: {0}"},{name:"DustOutputs",message:"Dust amount detected in one output"},{name:"InvalidSatoshis",message:"Output satoshis are invalid"},{name:"FeeError",message:"Internal Error on Fee {0}",errors:[{name:"TooSmall",message:"Fee is too small: {0}"},{name:"TooLarge",message:"Fee is too large: {0}"},{name:"Different",message:"Unspent value is different from specified fee: {0}"}]},{name:"ChangeAddressMissing",message:"Change address is missing"},{name:"BlockHeightTooHigh",message:"Block Height can be at most 2^32 -1"},{name:"NLockTimeOutOfRange",message:"Block Height can only be between 0 and 499 999 999"},{name:"LockTimeTooEarly",message:"Lock Time can't be earlier than UNIX date 500 000 000"}]},{name:"Script",message:"Internal Error on Script {0}",errors:[{name:"UnrecognizedAddress",message:"Expected argument {0} to be an address"},{name:"CantDeriveAddress",message:"Can't derive address associated with script {0}, needs to be p2pkh in, p2pkh out, p2sh in, or p2sh out."},{name:"InvalidBuffer",message:"Invalid script buffer: can't parse valid script from given buffer {0}"}]},{name:"HDPrivateKey",message:"Internal Error on HDPrivateKey {0}",errors:[{name:"InvalidDerivationArgument",message:"Invalid derivation argument {0}, expected string, or number and boolean"},{name:"InvalidEntropyArgument",message:"Invalid entropy: must be an hexa string or binary buffer, got {0}",errors:[{name:"TooMuchEntropy",message:'Invalid entropy: more than 512 bits is non standard, got "{0}"'},{name:"NotEnoughEntropy",message:'Invalid entropy: at least 128 bits needed, got "{0}"'}]},{name:"InvalidLength",message:"Invalid length for xprivkey string in {0}"},{name:"InvalidPath",message:"Invalid derivation path: {0}"},{name:"UnrecognizedArgument",message:'Invalid argument: creating a HDPrivateKey requires a string, buffer, json or object, got "{0}"'}]},{name:"HDPublicKey",message:"Internal Error on HDPublicKey {0}",errors:[{name:"ArgumentIsPrivateExtended",message:"Argument is an extended private key: {0}"},{name:"InvalidDerivationArgument",message:"Invalid derivation argument: got {0}"},{name:"InvalidLength",message:'Invalid length for xpubkey: got "{0}"'},{name:"InvalidPath",message:'Invalid derivation path, it should look like: "m/1/100", got "{0}"'},{name:"InvalidIndexCantDeriveHardened",message:"Invalid argument: creating a hardened path requires an HDPrivateKey"},{name:"MustSupplyArgument",message:"Must supply an argument to create a HDPublicKey"},{name:"UnrecognizedArgument",message:"Invalid argument for creation, must be string, json, buffer, or object"}]}]});var Nm=R((Pk,al)=>{"use strict";w();var nl=Hf();function aS(t,e){return t.replace("{0}",e[0]).replace("{1}",e[1]).replace("{2}",e[2])}var Dm=function(t,e){var r=function(){if(nl.isString(e.message))this.message=aS(e.message,arguments);else if(nl.isFunction(e.message))this.message=e.message.apply(null,arguments);else throw new Error("Invalid error definition for "+e.name);this.stack=this.message+`
|
|
18
|
+
`+new Error().stack};return r.prototype=Object.create(t.prototype),r.prototype.name=t.prototype.name+e.name,t[e.name]=r,e.errors&&Um(r,e.errors),r},Um=function(t,e){nl.each(e,function(r){Dm(t,r)})},oS=function(t,e){return Um(t,e),t},Sn={};Sn.Error=function(){this.message="Internal error",this.stack=this.message+`
|
|
19
|
+
`+new Error().stack};Sn.Error.prototype=Object.create(Error.prototype);Sn.Error.prototype.name="bsv.Error";var fS=Pm();oS(Sn.Error,fS);al.exports=Sn.Error;al.exports.extend=function(t){return Dm(Sn.Error,t)}});var Kf=R((Uk,Lm)=>{"use strict";w();var Ga=Nm(),sS=Hf();Lm.exports={checkState:function(t,e){if(!t)throw new Ga.InvalidState(e)},checkArgument:function(t,e,r,n){if(!t)throw new Ga.InvalidArgument(e,r,n)},checkArgumentType:function(t,e,r){if(r=r||"(unknown name)",sS.isString(e)){if(e==="Buffer"){var n=ft();if(!n.Buffer.isBuffer(t))throw new Ga.InvalidArgumentType(t,e,r)}else if(typeof t!==e)throw new Ga.InvalidArgumentType(t,e,r)}else if(!(t instanceof e))throw new Ga.InvalidArgumentType(t,e.name,r)}}});var Hm=R((Lk,jm)=>{"use strict";w();var Ne=lr(),ol=Kf(),Fm=Hf(),Wf=function(t){for(var e=B.Buffer.alloc(t.length),r=0;r<t.length;r++)e[r]=t[t.length-1-r];return e};Ne.Zero=new Ne(0);Ne.One=new Ne(1);Ne.Minus1=new Ne(-1);Ne.fromNumber=function(t){return ol.checkArgument(Fm.isNumber(t)),new Ne(t)};Ne.fromString=function(t,e){return ol.checkArgument(Fm.isString(t)),new Ne(t,e)};Ne.fromBuffer=function(t,e){typeof e<"u"&&e.endian==="little"&&(t=Wf(t));var r=t.toString("hex"),n=new Ne(r,16);return n};Ne.fromSM=function(t,e){var r;if(t.length===0)return Ne.fromBuffer(B.Buffer.from([0]));var n="big";return e&&(n=e.endian),n==="little"&&(t=Wf(t)),t[0]&128?(t[0]=t[0]&127,r=Ne.fromBuffer(t),r.neg().copy(r)):r=Ne.fromBuffer(t),r};Ne.prototype.toNumber=function(){return parseInt(this.toString(10),10)};Ne.prototype.toBuffer=function(t){var e,r;if(t&&t.size){r=this.toString(16,2);var n=r.length/2;e=B.Buffer.from(r,"hex"),n===t.size||(n>t.size?e=Ne.trim(e,n):n<t.size&&(e=Ne.pad(e,n,t.size)))}else r=this.toString(16,2),e=B.Buffer.from(r,"hex");return typeof t<"u"&&t.endian==="little"&&(e=Wf(e)),e};Ne.prototype.toSMBigEndian=function(){var t;return this.cmp(Ne.Zero)===-1?(t=this.neg().toBuffer(),t[0]&128?t=B.Buffer.concat([B.Buffer.from([128]),t]):t[0]=t[0]|128):(t=this.toBuffer(),t[0]&128&&(t=B.Buffer.concat([B.Buffer.from([0]),t]))),t.length===1&t[0]===0&&(t=B.Buffer.from([])),t};Ne.prototype.toSM=function(t){var e=t?t.endian:"big",r=this.toSMBigEndian();return e==="little"&&(r=Wf(r)),r};Ne.fromScriptNumBuffer=function(t,e,r){var n=r||4;if(ol.checkArgument(t.length<=n,new Error("script number overflow")),e&&t.length>0&&(t[t.length-1]&127)===0&&(t.length<=1||(t[t.length-2]&128)===0))throw new Error("non-minimally encoded script number");return Ne.fromSM(t,{endian:"little"})};Ne.prototype.toScriptNumBuffer=function(){return this.toSM({endian:"little"})};Ne.trim=function(t,e){return t.slice(e-t.length,t.length)};Ne.pad=function(t,e,r){for(var n=B.Buffer.alloc(r),i=0;i<t.length;i++)n[n.length-1-i]=t[t.length-1-i];for(i=0;i<r-e;i++)n[i]=0;return n};Ne.prototype.toHex=function(...t){return this.toBuffer(...t).toString("hex")};Ne.fromHex=function(t,...e){return Ne.fromBuffer(B.Buffer.from(t,"hex"),...e)};jm.exports=Ne});var Ht=R(Ke=>{"use strict";w();var uS=Ot(),hS=J();Ke.inherits=hS;function lS(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function cS(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var a=t.charCodeAt(i);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=a&63|128):lS(t,i)?(a=65536+((a&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=a&63|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=a&63|128)}else for(i=0;i<t.length;i++)r[i]=t[i]|0;return r}Ke.toArray=cS;function dS(t){for(var e="",r=0;r<t.length;r++)e+=Wm(t[r].toString(16));return e}Ke.toHex=dS;function Km(t){var e=t>>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}Ke.htonl=Km;function pS(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];e==="little"&&(i=Km(i)),r+=zm(i.toString(16))}return r}Ke.toHex32=pS;function Wm(t){return t.length===1?"0"+t:t}Ke.zero2=Wm;function zm(t){return t.length===7?"0"+t:t.length===6?"00"+t:t.length===5?"000"+t:t.length===4?"0000"+t:t.length===3?"00000"+t:t.length===2?"000000"+t:t.length===1?"0000000"+t:t}Ke.zero8=zm;function vS(t,e,r,n){var i=r-e;uS(i%4===0);for(var a=new Array(i/4),f=0,v=e;f<a.length;f++,v+=4){var m;n==="big"?m=t[v]<<24|t[v+1]<<16|t[v+2]<<8|t[v+3]:m=t[v+3]<<24|t[v+2]<<16|t[v+1]<<8|t[v],a[f]=m>>>0}return a}Ke.join32=vS;function yS(t,e){for(var r=new Array(t.length*4),n=0,i=0;n<t.length;n++,i+=4){var a=t[n];e==="big"?(r[i]=a>>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=a&255):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=a&255)}return r}Ke.split32=yS;function gS(t,e){return t>>>e|t<<32-e}Ke.rotr32=gS;function mS(t,e){return t<<e|t>>>32-e}Ke.rotl32=mS;function bS(t,e){return t+e>>>0}Ke.sum32=bS;function wS(t,e,r){return t+e+r>>>0}Ke.sum32_3=wS;function _S(t,e,r,n){return t+e+r+n>>>0}Ke.sum32_4=_S;function xS(t,e,r,n,i){return t+e+r+n+i>>>0}Ke.sum32_5=xS;function MS(t,e,r,n){var i=t[e],a=t[e+1],f=n+a>>>0,v=(f<n?1:0)+r+i;t[e]=v>>>0,t[e+1]=f}Ke.sum64=MS;function ES(t,e,r,n){var i=e+n>>>0,a=(i<e?1:0)+t+r;return a>>>0}Ke.sum64_hi=ES;function SS(t,e,r,n){var i=e+n;return i>>>0}Ke.sum64_lo=SS;function BS(t,e,r,n,i,a,f,v){var m=0,E=e;E=E+n>>>0,m+=E<e?1:0,E=E+a>>>0,m+=E<a?1:0,E=E+v>>>0,m+=E<v?1:0;var A=t+r+i+f+m;return A>>>0}Ke.sum64_4_hi=BS;function AS(t,e,r,n,i,a,f,v){var m=e+n+a+v;return m>>>0}Ke.sum64_4_lo=AS;function RS(t,e,r,n,i,a,f,v,m,E){var A=0,q=e;q=q+n>>>0,A+=q<e?1:0,q=q+a>>>0,A+=q<a?1:0,q=q+v>>>0,A+=q<v?1:0,q=q+E>>>0,A+=q<E?1:0;var I=t+r+i+f+m+A;return I>>>0}Ke.sum64_5_hi=RS;function qS(t,e,r,n,i,a,f,v,m,E){var A=e+n+a+v+E;return A>>>0}Ke.sum64_5_lo=qS;function IS(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}Ke.rotr64_hi=IS;function kS(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Ke.rotr64_lo=kS;function TS(t,e,r){return t>>>r}Ke.shr64_hi=TS;function CS(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Ke.shr64_lo=CS});var Bn=R(Vm=>{"use strict";w();var Gm=Ht(),OS=Ot();function zf(){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}Vm.BlockHash=zf;zf.prototype.update=function(e,r){if(e=Gm.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=Gm.join32(e,0,e.length-n,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this};zf.prototype.digest=function(e){return this.update(this._pad()),OS(this.pending===null),this._digest(e)};zf.prototype._pad=function(){var e=this.pendingTotal,r=this._delta8,n=r-(e+this.padLength)%r,i=new Array(n+this.padLength);i[0]=128;for(var a=1;a<n;a++)i[a]=0;if(e<<=3,this.endian==="big"){for(var f=8;f<this.padLength;f++)i[a++]=0;i[a++]=0,i[a++]=0,i[a++]=0,i[a++]=0,i[a++]=e>>>24&255,i[a++]=e>>>16&255,i[a++]=e>>>8&255,i[a++]=e&255}else for(i[a++]=e&255,i[a++]=e>>>8&255,i[a++]=e>>>16&255,i[a++]=e>>>24&255,i[a++]=0,i[a++]=0,i[a++]=0,i[a++]=0,f=8;f<this.padLength;f++)i[a++]=0;return i}});var fl=R(Sr=>{"use strict";w();var PS=Ht(),rr=PS.rotr32;function DS(t,e,r,n){if(t===0)return $m(e,r,n);if(t===1||t===3)return Ym(e,r,n);if(t===2)return Zm(e,r,n)}Sr.ft_1=DS;function $m(t,e,r){return t&e^~t&r}Sr.ch32=$m;function Zm(t,e,r){return t&e^t&r^e&r}Sr.maj32=Zm;function Ym(t,e,r){return t^e^r}Sr.p32=Ym;function US(t){return rr(t,2)^rr(t,13)^rr(t,22)}Sr.s0_256=US;function NS(t){return rr(t,6)^rr(t,11)^rr(t,25)}Sr.s1_256=NS;function LS(t){return rr(t,7)^rr(t,18)^t>>>3}Sr.g0_256=LS;function FS(t){return rr(t,17)^rr(t,19)^t>>>10}Sr.g1_256=FS});var Qm=R((Vk,Jm)=>{"use strict";w();var An=Ht(),jS=Bn(),HS=fl(),sl=An.rotl32,Va=An.sum32,KS=An.sum32_5,WS=HS.ft_1,Xm=jS.BlockHash,zS=[1518500249,1859775393,2400959708,3395469782];function ir(){if(!(this instanceof ir))return new ir;Xm.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}An.inherits(ir,Xm);Jm.exports=ir;ir.blockSize=512;ir.outSize=160;ir.hmacStrength=80;ir.padLength=64;ir.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;i<n.length;i++)n[i]=sl(n[i-3]^n[i-8]^n[i-14]^n[i-16],1);var a=this.h[0],f=this.h[1],v=this.h[2],m=this.h[3],E=this.h[4];for(i=0;i<n.length;i++){var A=~~(i/20),q=KS(sl(a,5),WS(A,f,v,m),E,n[i],zS[A]);E=m,m=v,v=sl(f,30),f=a,a=q}this.h[0]=Va(this.h[0],a),this.h[1]=Va(this.h[1],f),this.h[2]=Va(this.h[2],v),this.h[3]=Va(this.h[3],m),this.h[4]=Va(this.h[4],E)};ir.prototype._digest=function(e){return e==="hex"?An.toHex32(this.h,"big"):An.split32(this.h,"big")}});var ul=R((Zk,tb)=>{"use strict";w();var Rn=Ht(),GS=Bn(),qn=fl(),VS=Ot(),Kt=Rn.sum32,$S=Rn.sum32_4,ZS=Rn.sum32_5,YS=qn.ch32,XS=qn.maj32,JS=qn.s0_256,QS=qn.s1_256,eB=qn.g0_256,tB=qn.g1_256,eb=GS.BlockHash,rB=[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 nr(){if(!(this instanceof nr))return new nr;eb.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=rB,this.W=new Array(64)}Rn.inherits(nr,eb);tb.exports=nr;nr.blockSize=512;nr.outSize=256;nr.hmacStrength=192;nr.padLength=64;nr.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;i<n.length;i++)n[i]=$S(tB(n[i-2]),n[i-7],eB(n[i-15]),n[i-16]);var a=this.h[0],f=this.h[1],v=this.h[2],m=this.h[3],E=this.h[4],A=this.h[5],q=this.h[6],I=this.h[7];for(VS(this.k.length===n.length),i=0;i<n.length;i++){var C=ZS(I,QS(E),YS(E,A,q),this.k[i],n[i]),j=Kt(JS(a),XS(a,f,v));I=q,q=A,A=E,E=Kt(m,C),m=v,v=f,f=a,a=Kt(C,j)}this.h[0]=Kt(this.h[0],a),this.h[1]=Kt(this.h[1],f),this.h[2]=Kt(this.h[2],v),this.h[3]=Kt(this.h[3],m),this.h[4]=Kt(this.h[4],E),this.h[5]=Kt(this.h[5],A),this.h[6]=Kt(this.h[6],q),this.h[7]=Kt(this.h[7],I)};nr.prototype._digest=function(e){return e==="hex"?Rn.toHex32(this.h,"big"):Rn.split32(this.h,"big")}});var nb=R((Xk,ib)=>{"use strict";w();var hl=Ht(),rb=ul();function Br(){if(!(this instanceof Br))return new Br;rb.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}hl.inherits(Br,rb);ib.exports=Br;Br.blockSize=512;Br.outSize=224;Br.hmacStrength=192;Br.padLength=64;Br.prototype._digest=function(e){return e==="hex"?hl.toHex32(this.h.slice(0,7),"big"):hl.split32(this.h.slice(0,7),"big")}});var dl=R((Qk,sb)=>{"use strict";w();var mt=Ht(),iB=Bn(),nB=Ot(),ar=mt.rotr64_hi,or=mt.rotr64_lo,ab=mt.shr64_hi,ob=mt.shr64_lo,jr=mt.sum64,ll=mt.sum64_hi,cl=mt.sum64_lo,aB=mt.sum64_4_hi,oB=mt.sum64_4_lo,fB=mt.sum64_5_hi,sB=mt.sum64_5_lo,fb=iB.BlockHash,uB=[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 Wt(){if(!(this instanceof Wt))return new Wt;fb.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=uB,this.W=new Array(160)}mt.inherits(Wt,fb);sb.exports=Wt;Wt.blockSize=1024;Wt.outSize=512;Wt.hmacStrength=192;Wt.padLength=128;Wt.prototype._prepareBlock=function(e,r){for(var n=this.W,i=0;i<32;i++)n[i]=e[r+i];for(;i<n.length;i+=2){var a=wB(n[i-4],n[i-3]),f=_B(n[i-4],n[i-3]),v=n[i-14],m=n[i-13],E=mB(n[i-30],n[i-29]),A=bB(n[i-30],n[i-29]),q=n[i-32],I=n[i-31];n[i]=aB(a,f,v,m,E,A,q,I),n[i+1]=oB(a,f,v,m,E,A,q,I)}};Wt.prototype._update=function(e,r){this._prepareBlock(e,r);var n=this.W,i=this.h[0],a=this.h[1],f=this.h[2],v=this.h[3],m=this.h[4],E=this.h[5],A=this.h[6],q=this.h[7],I=this.h[8],C=this.h[9],j=this.h[10],V=this.h[11],X=this.h[12],z=this.h[13],$=this.h[14],Fe=this.h[15];nB(this.k.length===n.length);for(var k=0;k<n.length;k+=2){var O=$,D=Fe,L=yB(I,C),F=gB(I,C),H=hB(I,C,j,V,X,z),M=lB(I,C,j,V,X,z),h=this.k[k],y=this.k[k+1],l=n[k],o=n[k+1],s=fB(O,D,L,F,H,M,h,y,l,o),d=sB(O,D,L,F,H,M,h,y,l,o);O=pB(i,a),D=vB(i,a),L=cB(i,a,f,v,m,E),F=dB(i,a,f,v,m,E);var g=ll(O,D,L,F),p=cl(O,D,L,F);$=X,Fe=z,X=j,z=V,j=I,V=C,I=ll(A,q,s,d),C=cl(q,q,s,d),A=m,q=E,m=f,E=v,f=i,v=a,i=ll(s,d,g,p),a=cl(s,d,g,p)}jr(this.h,0,i,a),jr(this.h,2,f,v),jr(this.h,4,m,E),jr(this.h,6,A,q),jr(this.h,8,I,C),jr(this.h,10,j,V),jr(this.h,12,X,z),jr(this.h,14,$,Fe)};Wt.prototype._digest=function(e){return e==="hex"?mt.toHex32(this.h,"big"):mt.split32(this.h,"big")};function hB(t,e,r,n,i){var a=t&r^~t&i;return a<0&&(a+=4294967296),a}function lB(t,e,r,n,i,a){var f=e&n^~e&a;return f<0&&(f+=4294967296),f}function cB(t,e,r,n,i){var a=t&r^t&i^r&i;return a<0&&(a+=4294967296),a}function dB(t,e,r,n,i,a){var f=e&n^e&a^n&a;return f<0&&(f+=4294967296),f}function pB(t,e){var r=ar(t,e,28),n=ar(e,t,2),i=ar(e,t,7),a=r^n^i;return a<0&&(a+=4294967296),a}function vB(t,e){var r=or(t,e,28),n=or(e,t,2),i=or(e,t,7),a=r^n^i;return a<0&&(a+=4294967296),a}function yB(t,e){var r=ar(t,e,14),n=ar(t,e,18),i=ar(e,t,9),a=r^n^i;return a<0&&(a+=4294967296),a}function gB(t,e){var r=or(t,e,14),n=or(t,e,18),i=or(e,t,9),a=r^n^i;return a<0&&(a+=4294967296),a}function mB(t,e){var r=ar(t,e,1),n=ar(t,e,8),i=ab(t,e,7),a=r^n^i;return a<0&&(a+=4294967296),a}function bB(t,e){var r=or(t,e,1),n=or(t,e,8),i=ob(t,e,7),a=r^n^i;return a<0&&(a+=4294967296),a}function wB(t,e){var r=ar(t,e,19),n=ar(e,t,29),i=ab(t,e,6),a=r^n^i;return a<0&&(a+=4294967296),a}function _B(t,e){var r=or(t,e,19),n=or(e,t,29),i=ob(t,e,6),a=r^n^i;return a<0&&(a+=4294967296),a}});var lb=R((tT,hb)=>{"use strict";w();var pl=Ht(),ub=dl();function Ar(){if(!(this instanceof Ar))return new Ar;ub.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}pl.inherits(Ar,ub);hb.exports=Ar;Ar.blockSize=1024;Ar.outSize=384;Ar.hmacStrength=192;Ar.padLength=128;Ar.prototype._digest=function(e){return e==="hex"?pl.toHex32(this.h.slice(0,12),"big"):pl.split32(this.h.slice(0,12),"big")}});var cb=R(In=>{"use strict";w();In.sha1=Qm();In.sha224=nb();In.sha256=ul();In.sha384=lb();In.sha512=dl()});var mb=R(gb=>{"use strict";w();var Di=Ht(),xB=Bn(),Gf=Di.rotl32,db=Di.sum32,$a=Di.sum32_3,pb=Di.sum32_4,yb=xB.BlockHash;function fr(){if(!(this instanceof fr))return new fr;yb.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}Di.inherits(fr,yb);gb.ripemd160=fr;fr.blockSize=512;fr.outSize=160;fr.hmacStrength=192;fr.padLength=64;fr.prototype._update=function(e,r){for(var n=this.h[0],i=this.h[1],a=this.h[2],f=this.h[3],v=this.h[4],m=n,E=i,A=a,q=f,I=v,C=0;C<80;C++){var j=db(Gf(pb(n,vb(C,i,a,f),e[SB[C]+r],MB(C)),AB[C]),v);n=v,v=f,f=Gf(a,10),a=i,i=j,j=db(Gf(pb(m,vb(79-C,E,A,q),e[BB[C]+r],EB(C)),RB[C]),I),m=I,I=q,q=Gf(A,10),A=E,E=j}j=$a(this.h[1],a,q),this.h[1]=$a(this.h[2],f,I),this.h[2]=$a(this.h[3],v,m),this.h[3]=$a(this.h[4],n,E),this.h[4]=$a(this.h[0],i,A),this.h[0]=j};fr.prototype._digest=function(e){return e==="hex"?Di.toHex32(this.h,"little"):Di.split32(this.h,"little")};function vb(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function MB(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function EB(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}var SB=[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],BB=[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],AB=[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],RB=[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]});var wb=R((fT,bb)=>{"use strict";w();var qB=Ht(),IB=Ot();function kn(t,e,r){if(!(this instanceof kn))return new kn(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(qB.toArray(e,r))}bb.exports=kn;kn.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),IB(e.length<=this.blockSize);for(var r=e.length;r<this.blockSize;r++)e.push(0);for(r=0;r<e.length;r++)e[r]^=54;for(this.inner=new this.Hash().update(e),r=0;r<e.length;r++)e[r]^=106;this.outer=new this.Hash().update(e)};kn.prototype.update=function(e,r){return this.inner.update(e,r),this};kn.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}});var xb=R(_b=>{w();var ot=_b;ot.utils=Ht();ot.common=Bn();ot.sha=cb();ot.ripemd=mb();ot.hmac=wb();ot.sha1=ot.sha.sha1;ot.sha256=ot.sha.sha256;ot.sha224=ot.sha.sha224;ot.sha384=ot.sha.sha384;ot.sha512=ot.sha.sha512;ot.ripemd160=ot.ripemd.ripemd160});var Eb=R((lT,Mb)=>{"use strict";w();var Vf=xb(),Rr=Kf(),Je=Mb.exports;Je.sha1=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),B.Buffer.from(Vf.sha1().update(t).digest("hex"),"hex")};Je.sha1.blocksize=512;Je.sha256=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),B.Buffer.from(Vf.sha256().update(t).digest("hex"),"hex")};Je.sha256.blocksize=512;Je.sha256sha256=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),Je.sha256(Je.sha256(t))};Je.ripemd160=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),B.Buffer.from(Vf.ripemd160().update(t).digest("hex"),"hex")};Je.sha256ripemd160=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),Je.ripemd160(Je.sha256(t))};Je.sha512=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),B.Buffer.from(Vf.sha512().update(t).digest("hex"),"hex")};Je.sha512.blocksize=1024;Je.hmac=function(t,e,r){Rr.checkArgument(B.Buffer.isBuffer(e)),Rr.checkArgument(B.Buffer.isBuffer(r)),Rr.checkArgument(t.blocksize);var n=t.blocksize/8;if(r.length>n)r=t(r);else if(r<n){var i=B.Buffer.alloc(n);i.fill(0),r.copy(i),r=i}var a=B.Buffer.alloc(n);a.fill(92);var f=B.Buffer.alloc(n);f.fill(54);for(var v=B.Buffer.alloc(n),m=B.Buffer.alloc(n),E=0;E<n;E++)v[E]=a[E]^r[E],m[E]=f[E]^r[E];return t(B.Buffer.concat([v,t(B.Buffer.concat([m,e]))]))};Je.sha256hmac=function(t,e){return Je.hmac(Je.sha256,t,e)};Je.sha512hmac=function(t,e){return Je.hmac(Je.sha512,t,e)}});var Bb=R((dT,Sb)=>{"use strict";w();var $f=ja(),qr=Kf(),Qe=Sb.exports;Qe.sha1=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),$f.createHash("sha1").update(t).digest()};Qe.sha1.blocksize=512;Qe.sha256=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),$f.createHash("sha256").update(t).digest()};Qe.sha256.blocksize=512;Qe.sha256sha256=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),Qe.sha256(Qe.sha256(t))};Qe.ripemd160=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),$f.createHash("ripemd160").update(t).digest()};Qe.sha256ripemd160=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),Qe.ripemd160(Qe.sha256(t))};Qe.sha512=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),$f.createHash("sha512").update(t).digest()};Qe.sha512.blocksize=1024;Qe.hmac=function(t,e,r){qr.checkArgument(B.Buffer.isBuffer(e)),qr.checkArgument(B.Buffer.isBuffer(r)),qr.checkArgument(t.blocksize);var n=t.blocksize/8;if(r.length>n)r=t(r);else if(r<n){var i=B.Buffer.alloc(n);i.fill(0),r.copy(i),r=i}var a=B.Buffer.alloc(n);a.fill(92);var f=B.Buffer.alloc(n);f.fill(54);for(var v=B.Buffer.alloc(n),m=B.Buffer.alloc(n),E=0;E<n;E++)v[E]=a[E]^r[E],m[E]=f[E]^r[E];return t(B.Buffer.concat([v,t(B.Buffer.concat([m,e]))]))};Qe.sha256hmac=function(t,e){return Qe.hmac(Qe.sha256,t,e)};Qe.sha512hmac=function(t,e){return Qe.hmac(Qe.sha512,t,e)}});var Ab=R((vT,vl)=>{w();S.default.browser?vl.exports=Eb():vl.exports=Bb()});var qb=R((yl,Rb)=>{w();(function(t,e){"use strict";typeof define=="function"&&define.amd?define([],function(){return t.secrets=e()}):typeof yl=="object"?Rb.exports=e(ja()):t.secrets=e(t.crypto)})(yl,function(t){"use strict";var e,r,n,i,a;function f(){e={bits:8,radix:16,minBits:3,maxBits:20,bytesPerChar:2,maxBytesPerChar:6,primitivePolynomials:[null,null,1,3,3,5,3,3,29,17,9,5,83,27,43,3,45,9,39,39,9,5,3,33,27,9,71,39,9,5,83]},r={},n=new Array(1024).join("0"),i=!0,a=["nodeCryptoRandomBytes","browserCryptoGetRandomValues","testRandom"]}function v(){return!!(r&&r.rng&&typeof r.rng=="function")}function m(k,O){var D;if(O===0||O===1)return k;if(O&&O>1024)throw new Error("Padding must be multiples of no larger than 1024 bits.");return O=O||r.bits,k&&(D=k.length%O),D?(n+k).slice(-(O-D+k.length)):k}function E(k){var O="",D,L;for(L=k.length-1;L>=0;L--){if(D=parseInt(k[L],16),isNaN(D))throw new Error("Invalid hex character.");O=m(D.toString(2),4)+O}return O}function A(k){var O="",D,L;for(k=m(k,4),L=k.length;L>=4;L-=4){if(D=parseInt(k.slice(L-4,L),2),isNaN(D))throw new Error("Invalid binary character.");O=D.toString(16)+O}return O}function q(){return!!(t&&typeof t=="object"&&(typeof t.getRandomValues=="function"||typeof t.getRandomValues=="object")&&(typeof Uint32Array=="function"||typeof Uint32Array=="object"))}function I(){return typeof t=="object"&&typeof t.randomBytes=="function"}function C(k){function O(H,M,h,y){var l=0,o,s="",d;for(M&&(o=M.length-1);l<o||s.length<H;)d=Math.abs(parseInt(M[l],h)),s=s+m(d.toString(2),y),l++;return s=s.substr(-H),(s.match(/0/g)||[]).length===s.length?null:s}function D(H){var M,h,y,l,o=null;for(y=16,l=4,h=Math.ceil(H/8);o===null;)M=t.randomBytes(h),o=O(H,M.toString("hex"),y,l);return o}function L(H){var M,h,y,l=null;for(h=10,y=32,M=Math.ceil(H/32);l===null;)l=O(H,t.getRandomValues(new Uint32Array(M)),h,y);return l}function F(H){var M,h,y,l,o,s=null;l=10,o=32,h=Math.ceil(H/32),y=123456789,M=new Uint32Array(h);for(var d=0;d<M.length;d++)M[d]=y;for(;s===null;)s=O(H,M,l,o);return s}if(k&&k==="testRandom")return r.typeCSPRNG=k,F;if(k&&k==="nodeCryptoRandomBytes")return r.typeCSPRNG=k,D;if(k&&k==="browserCryptoGetRandomValues")return r.typeCSPRNG=k,L;if(I())return r.typeCSPRNG="nodeCryptoRandomBytes",D;if(q())return r.typeCSPRNG="browserCryptoGetRandomValues",L}function j(k,O){var D=[],L;for(O&&(k=m(k,O)),L=k.length;L>r.bits;L-=r.bits)D.push(parseInt(k.slice(L-r.bits,L),2));return D.push(parseInt(k.slice(0,L),2)),D}function V(k,O){var D=r.logs[k],L=0,F;for(F=O.length-1;F>=0;F--)L!==0?L=r.exps[(D+r.logs[L])%r.maxShares]^O[F]:L=O[F];return L}function X(k,O,D){var L=0,F,H,M,h;for(M=0,F=O.length;M<F;M++)if(D[M]){for(H=r.logs[D[M]],h=0;h<F;h++)if(M!==h){if(k===O[h]){H=-1;break}H=(H+r.logs[k^O[h]]-r.logs[O[M]^O[h]]+r.maxShares)%r.maxShares}L=H===-1?L:L^r.exps[H]}return L}function z(k,O,D){var L=[],F=[k],H,M;for(H=1;H<D;H++)F[H]=parseInt(r.rng(r.bits),2);for(H=1,M=O+1;H<M;H++)L[H-1]={x:H,y:V(H,F)};return L}function $(k,O,D){var L,F,H,M,h;if(O=parseInt(O,r.radix),k=parseInt(k,10)||r.bits,L=k.toString(36).toUpperCase(),H=Math.pow(2,k)-1,M=H.toString(r.radix).length,F=m(O.toString(r.radix),M),typeof O!="number"||O%1!==0||O<1||O>H)throw new Error("Share id must be an integer between 1 and "+H+", inclusive.");return h=L+F+D,h}var Fe={init:function(k,O){var D=[],L=[],F=1,H,M;if(f(),k&&(typeof k!="number"||k%1!==0||k<e.minBits||k>e.maxBits))throw new Error("Number of bits must be an integer between "+e.minBits+" and "+e.maxBits+", inclusive.");if(O&&a.indexOf(O)===-1)throw new Error("Invalid RNG type argument : '"+O+"'");for(r.radix=e.radix,r.bits=k||e.bits,r.size=Math.pow(2,r.bits),r.maxShares=r.size-1,H=e.primitivePolynomials[r.bits],M=0;M<r.size;M++)L[M]=F,D[F]=M,F=F<<1,F>=r.size&&(F=F^H,F=F&r.maxShares);if(r.logs=D,r.exps=L,O&&this.setRNG(O),v()||this.setRNG(),!v()||!r.bits||!r.size||!r.maxShares||!r.logs||!r.exps||r.logs.length!==r.size||r.exps.length!==r.size)throw new Error("Initialization failed.")},combine:function(k,O){var D,L,F,H,M="",h,y,l,o=[],s=[];for(O=O||0,D=0,F=k.length;D<F;D++){if(y=this.extractShareComponents(k[D]),h===void 0)h=y.bits;else if(y.bits!==h)throw new Error("Mismatched shares: Different bit settings.");if(r.bits!==h&&this.init(h),o.indexOf(y.id)===-1)for(o.push(y.id),l=j(E(y.data)),L=0,H=l.length;L<H;L++)s[L]=s[L]||[],s[L][o.length-1]=l[L]}for(D=0,F=s.length;D<F;D++)M=m(X(O,o,s[D]).toString(2))+M;return A(O>=1?M:M.slice(M.indexOf("1")+1))},getConfig:function(){var k={};return k.radix=r.radix,k.bits=r.bits,k.maxShares=r.maxShares,k.hasCSPRNG=v(),k.typeCSPRNG=r.typeCSPRNG,k},extractShareComponents:function(k){var O,D,L,F,H={},M,h;if(O=parseInt(k.substr(0,1),36),O&&(typeof O!="number"||O%1!==0||O<e.minBits||O>e.maxBits))throw new Error("Invalid share : Number of bits must be an integer between "+e.minBits+" and "+e.maxBits+", inclusive.");if(F=Math.pow(2,O)-1,L=(Math.pow(2,O)-1).toString(r.radix).length,M="^([a-kA-K3-9]{1})([a-fA-F0-9]{"+L+"})([a-fA-F0-9]+)$",h=new RegExp(M).exec(k),h&&(D=parseInt(h[2],r.radix)),typeof D!="number"||D%1!==0||D<1||D>F)throw new Error("Invalid share : Share id must be an integer between 1 and "+r.maxShares+", inclusive.");if(h&&h[3])return H.bits=O,H.id=D,H.data=h[3],H;throw new Error("The share data provided is invalid : "+k)},setRNG:function(k){var O="Random number generator is invalid ",D=" Supply an CSPRNG of the form function(bits){} that returns a string containing 'bits' number of random 1's and 0's.";if(k&&typeof k=="string"&&a.indexOf(k)===-1)throw new Error("Invalid RNG type argument : '"+k+"'");if(k||(k=C()),k&&typeof k=="string"&&(k=C(k)),i){if(k&&typeof k!="function")throw new Error(O+"(Not a function)."+D);if(k&&typeof k(r.bits)!="string")throw new Error(O+"(Output is not a string)."+D);if(k&&!parseInt(k(r.bits),2))throw new Error(O+"(Binary string output not parseable to an Integer)."+D);if(k&&k(r.bits).length>r.bits)throw new Error(O+"(Output length is greater than config.bits)."+D);if(k&&k(r.bits).length<r.bits)throw new Error(O+"(Output length is less than config.bits)."+D)}return r.rng=k,!0},str2hex:function(k,O){var D,L,F="",H,M,h,y;if(typeof k!="string")throw new Error("Input must be a character string.");if(O||(O=e.bytesPerChar),typeof O!="number"||O<1||O>e.maxBytesPerChar||O%1!==0)throw new Error("Bytes per character must be an integer between 1 and "+e.maxBytesPerChar+", inclusive.");for(D=2*O,L=Math.pow(16,D)-1,h=0,y=k.length;h<y;h++){if(M=k[h].charCodeAt(),isNaN(M))throw new Error("Invalid character: "+k[h]);if(M>L)throw H=Math.ceil(Math.log(M+1)/Math.log(256)),new Error("Invalid character code ("+M+"). Maximum allowable is 256^bytes-1 ("+L+"). To convert this character, use at least "+H+" bytes.");F=m(M.toString(16),D)+F}return F},hex2str:function(k,O){var D,L="",F,H;if(typeof k!="string")throw new Error("Input must be a hexadecimal string.");if(O=O||e.bytesPerChar,typeof O!="number"||O%1!==0||O<1||O>e.maxBytesPerChar)throw new Error("Bytes per character must be an integer between 1 and "+e.maxBytesPerChar+", inclusive.");for(D=2*O,k=m(k,D),F=0,H=k.length;F<H;F+=D)L=String.fromCharCode(parseInt(k.slice(F,F+D),16))+L;return L},random:function(k){if(typeof k!="number"||k%1!==0||k<2||k>65536)throw new Error("Number of bits must be an Integer between 1 and 65536.");return A(r.rng(k))},share:function(k,O,D,L){var F,H,M=new Array(O),h=new Array(O),y,l,o;if(L=L||128,typeof k!="string")throw new Error("Secret must be a string.");if(typeof O!="number"||O%1!==0||O<2)throw new Error("Number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive.");if(O>r.maxShares)throw F=Math.ceil(Math.log(O+1)/Math.LN2),new Error("Number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive. To create "+O+" shares, use at least "+F+" bits.");if(typeof D!="number"||D%1!==0||D<2)throw new Error("Threshold number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive.");if(D>r.maxShares)throw F=Math.ceil(Math.log(D+1)/Math.LN2),new Error("Threshold number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive. To use a threshold of "+D+", use at least "+F+" bits.");if(D>O)throw new Error("Threshold number of shares was "+D+" but must be less than or equal to the "+O+" shares specified as the total to generate.");if(typeof L!="number"||L%1!==0||L<0||L>1024)throw new Error("Zero-pad length must be an integer between 0 and 1024 inclusive.");for(k="1"+E(k),k=j(k,L),y=0,o=k.length;y<o;y++)for(H=z(k[y],O,D),l=0;l<O;l++)M[l]=M[l]||H[l].x.toString(r.radix),h[l]=m(H[l].y.toString(2))+(h[l]||"");for(y=0;y<O;y++)M[y]=$(r.bits,M[y],A(h[y]));return M},newShare:function(k,O){var D,L;if(k&&typeof k=="string"&&(k=parseInt(k,r.radix)),L=k.toString(r.radix),k&&L&&O&&O[0])return D=this.extractShareComponents(O[0]),$(D.bits,L,this.combine(O,k));throw new Error("Invalid 'id' or 'shares' Array argument to newShare().")},_reset:f,_padLeft:m,_hex2bin:E,_bin2hex:A,_hasCryptoGetRandomValues:q,_hasCryptoRandomBytes:I,_getRNG:C,_isSetRNG:v,_splitNumStringToIntArray:j,_horner:V,_lagrange:X,_getShares:z,_constructPublicShareString:$};return Fe.init(),Fe})});var Ob=R((mT,Cb)=>{"use strict";w();var dt=Hm(),Ib=il(),kb=Ab(),Zf=null;function gl(){if(Zf)return Zf;var t=qb();return t.setRNG(function(e){for(var r=64,n=0;n<r;n++){for(var i=Ib.getRandomBuffer(Math.ceil(e/8)),a="",f=0;f<i.length;f++)a+=("00000000"+i[f].toString(2)).slice(-8);if(a=a.slice(0,e),/1/.test(a))return a}throw new Error("shamir: CSPRNG returned all-zero draws "+r+" times in a row \u2014 refusing to hang on a degenerate/stubbed random source")}),Zf=t,Zf}var Yf="ff",Tb=2;function et(t){return this instanceof et?(this.options=t||{},this):new et(t)}et.split=function(t,e,r,n){if(n=n||{},t==null)throw new Error("Secret is required");if(e<2)throw new Error("Threshold must be at least 2");if(r<e)throw new Error("Number of shares must be at least threshold");if(e>255||r>255)throw new Error("Threshold and shares must be <= 255");for(var i=B.Buffer.isBuffer(t)?t:B.Buffer.from(t,"utf8"),a=Yf+i.toString("hex"),f=gl().share(a,r,e),v=Ib.getRandomBuffer(8).toString("hex"),m=n.checksum===!0,E=m?kb.sha256(i).slice(0,4).toString("hex"):null,A=[],q=0;q<f.length;q++)A.push({v:Tb,id:q+1,threshold:e,shares:r,length:i.length,splitId:v,share:f[q],checksum:E});return A};et.combine=function(t){if(!t||t.length===0)throw new Error("Shares array is required");if(t[0]&&Array.isArray(t[0].bytes)&&t[0].share===void 0)return et._combineLegacy(t);var e=t[0].threshold,r=t[0].splitId;if(t.length<e)throw new Error("Insufficient shares: need "+e+", got "+t.length);for(var n=[],i=0;i<t.length;i++){var a=t[i];if(!a||typeof a.share!="string")throw new Error("Invalid share at index "+i);if(r!==void 0&&a.splitId!==r)throw new Error("Shares are from different splits (splitId mismatch)");if(a.threshold!==e)throw new Error("Shares have inconsistent threshold");n.push(a.share)}var f=gl().combine(n);if(f.slice(0,Yf.length)!==Yf)throw new Error("Reconstruction failed: invalid or insufficient shares");var v=B.Buffer.from(f.slice(Yf.length),"hex"),m=t[0].checksum;if(m){var E=kb.sha256(v).slice(0,4).toString("hex");if(E!==m)throw new Error("Integrity check failed: shares are inconsistent or tampered")}return v};et.verifyShare=function(t){try{return!t||typeof t!="object"?!1:Array.isArray(t.bytes)&&t.share===void 0?et._verifyLegacyShare(t):t.v!==Tb||typeof t.share!="string"||!/^[0-9a-fA-F]+$/.test(t.share)||typeof t.threshold!="number"||typeof t.shares!="number"||t.threshold<2||t.shares<t.threshold||t.shares>255||t.id<1||t.id>t.shares||t.checksum!==null&&t.checksum!==void 0&&!/^[0-9a-fA-F]{8}$/.test(t.checksum)?!1:(gl().extractShareComponents(t.share),!0)}catch{return!1}};et.generateTestVectors=function(){var t="Hello, Bitcoin SV!",e=3,r=5,n=et.split(t,e,r),i=et.combine(n.slice(0,e));return{secret:t,threshold:e,totalShares:r,shares:n,reconstructed:i.toString("utf8"),valid:i.toString("utf8")===t}};var Hr=new dt(2147483647);et._combineLegacy=function(t){var e=t[0].threshold,r=t[0].shares,n=t[0].length;if(t.length<e)throw new Error("Insufficient shares: need "+e+", got "+t.length);for(var i=0;i<t.length;i++){if(t[i].threshold!==e||t[i].shares!==r)throw new Error("Shares have inconsistent parameters");if(t[i].length!==n)throw new Error("Shares have different secret lengths")}for(var a=[],f=0;f<n;f++){for(var v=[],m=0;m<Math.min(t.length,e);m++)v.push(t[m].bytes[f]);a.push(et._combineByteLegacy(v))}return B.Buffer.from(a)};et._combineByteLegacy=function(t){for(var e=new dt(0),r=0;r<t.length;r++){for(var n=new dt(t[r].x),i=new dt(t[r].y,16),a=new dt(1),f=new dt(1),v=0;v<t.length;v++)if(r!==v){var m=new dt(t[v].x),E=new dt(0).sub(m);E.lt(new dt(0))&&(E=E.add(Hr)),a=a.mul(E).mod(Hr);var A=n.sub(m);A.lt(new dt(0))&&(A=A.add(Hr)),f=f.mul(A).mod(Hr)}var q=et._modInverseLegacy(f,Hr),I=a.mul(q).mod(Hr);e=e.add(i.mul(I)).mod(Hr)}return e.mod(Hr).mod(new dt(256)).toNumber()};et._modInverseLegacy=function(t,e){t.lt(new dt(0))&&(t=t.mod(e).add(e));var r=et._extendedGCDLegacy(t,e);if(!r.gcd.eq(new dt(1)))throw new Error("Modular inverse does not exist");return r.x.mod(e).add(e).mod(e)};et._extendedGCDLegacy=function(t,e){if(t.eq(new dt(0)))return{gcd:e,x:new dt(0),y:new dt(1)};var r=et._extendedGCDLegacy(e.mod(t),t);return{gcd:r.gcd,x:r.y.sub(e.div(t).mul(r.x)),y:r.x}};et._verifyLegacyShare=function(t){if(!t.id||!t.threshold||!t.shares||!t.bytes||typeof t.length!="number"||t.threshold<2||t.shares<t.threshold||!Array.isArray(t.bytes)||t.bytes.length!==t.length)return!1;for(var e=0;e<t.bytes.length;e++){var r=t.bytes[e];if(!r||!r.x||!r.y||r.x<1||r.x>t.shares||!/^[0-9a-fA-F]+$/.test(r.y))return!1}return!0};Cb.exports=et});var kB=R((wT,Pb)=>{w();Pb.exports=Ob()});return kB();})();
|
|
20
20
|
if(typeof module!=="undefined"&&module.exports){module.exports=bsvShamir}else if(typeof define==="function"&&define.amd){define([],function(){return bsvShamir})}
|