UNPKG

@signumjs/crypto

Version:

Cryptographic functions for building Signum Network apps.

26 lines 119 kB
"use strict";var sig$crypto=(()=>{var ia=Object.create;var mt=Object.defineProperty;var na=Object.getOwnPropertyDescriptor;var aa=Object.getOwnPropertyNames;var oa=Object.getPrototypeOf,la=Object.prototype.hasOwnProperty;var fa=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,t)=>(typeof require<"u"?require:r)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Z=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),sa=(e,r)=>{for(var t in r)mt(e,t,{get:r[t],enumerable:!0})},Zr=(e,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of aa(r))!la.call(e,n)&&n!==t&&mt(e,n,{get:()=>r[n],enumerable:!(i=na(r,n))||i.enumerable});return e};var vt=(e,r,t)=>(t=e!=null?ia(oa(e)):{},Zr(r||!e||!e.__esModule?mt(t,"default",{value:e,enumerable:!0}):t,e)),ha=e=>Zr(mt({},"__esModule",{value:!0}),e);var ve=Z($=>{"use strict";var ua=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function ca(e,r){return Object.prototype.hasOwnProperty.call(e,r)}$.assign=function(e){for(var r=Array.prototype.slice.call(arguments,1);r.length;){var t=r.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(var i in t)ca(t,i)&&(e[i]=t[i])}}return e};$.shrinkBuf=function(e,r){return e.length===r?e:e.subarray?e.subarray(0,r):(e.length=r,e)};var da={arraySet:function(e,r,t,i,n){if(r.subarray&&e.subarray){e.set(r.subarray(t,t+i),n);return}for(var a=0;a<i;a++)e[n+a]=r[t+a]},flattenChunks:function(e){var r,t,i,n,a,o;for(i=0,r=0,t=e.length;r<t;r++)i+=e[r].length;for(o=new Uint8Array(i),n=0,r=0,t=e.length;r<t;r++)a=e[r],o.set(a,n),n+=a.length;return o}},pa={arraySet:function(e,r,t,i,n){for(var a=0;a<i;a++)e[n+a]=r[t+a]},flattenChunks:function(e){return[].concat.apply([],e)}};$.setTyped=function(e){e?($.Buf8=Uint8Array,$.Buf16=Uint16Array,$.Buf32=Int32Array,$.assign($,da)):($.Buf8=Array,$.Buf16=Array,$.Buf32=Array,$.assign($,pa))};$.setTyped(ua)});var Yt=Z((Go,qr)=>{"use strict";function xa(e,r,t,i){for(var n=e&65535|0,a=e>>>16&65535|0,o=0;t!==0;){o=t>2e3?2e3:t,t-=o;do n=n+r[i++]|0,a=a+n|0;while(--o);n%=65521,a%=65521}return n|a<<16|0}qr.exports=xa});var $t=Z((Vo,Pr)=>{"use strict";function ga(){for(var e,r=[],t=0;t<256;t++){e=t;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;r[t]=e}return r}var ya=ga();function wa(e,r,t,i){var n=ya,a=i+t;e^=-1;for(var o=i;o<a;o++)e=e>>>8^n[(e^r[o])&255];return e^-1}Pr.exports=wa});var Kr=Z((Xo,Hr)=>{"use strict";var bt=30,_a=12;Hr.exports=function(r,t){var i,n,a,o,l,h,s,f,p,g,u,F,b,S,k,v,U,R,A,c,w,_,y,B,x;i=r.state,n=r.next_in,B=r.input,a=n+(r.avail_in-5),o=r.next_out,x=r.output,l=o-(t-r.avail_out),h=o+(r.avail_out-257),s=i.dmax,f=i.wsize,p=i.whave,g=i.wnext,u=i.window,F=i.hold,b=i.bits,S=i.lencode,k=i.distcode,v=(1<<i.lenbits)-1,U=(1<<i.distbits)-1;e:do{b<15&&(F+=B[n++]<<b,b+=8,F+=B[n++]<<b,b+=8),R=S[F&v];t:for(;;){if(A=R>>>24,F>>>=A,b-=A,A=R>>>16&255,A===0)x[o++]=R&65535;else if(A&16){c=R&65535,A&=15,A&&(b<A&&(F+=B[n++]<<b,b+=8),c+=F&(1<<A)-1,F>>>=A,b-=A),b<15&&(F+=B[n++]<<b,b+=8,F+=B[n++]<<b,b+=8),R=k[F&U];r:for(;;){if(A=R>>>24,F>>>=A,b-=A,A=R>>>16&255,A&16){if(w=R&65535,A&=15,b<A&&(F+=B[n++]<<b,b+=8,b<A&&(F+=B[n++]<<b,b+=8)),w+=F&(1<<A)-1,w>s){r.msg="invalid distance too far back",i.mode=bt;break e}if(F>>>=A,b-=A,A=o-l,w>A){if(A=w-A,A>p&&i.sane){r.msg="invalid distance too far back",i.mode=bt;break e}if(_=0,y=u,g===0){if(_+=f-A,A<c){c-=A;do x[o++]=u[_++];while(--A);_=o-w,y=x}}else if(g<A){if(_+=f+g-A,A-=g,A<c){c-=A;do x[o++]=u[_++];while(--A);if(_=0,g<c){A=g,c-=A;do x[o++]=u[_++];while(--A);_=o-w,y=x}}}else if(_+=g-A,A<c){c-=A;do x[o++]=u[_++];while(--A);_=o-w,y=x}for(;c>2;)x[o++]=y[_++],x[o++]=y[_++],x[o++]=y[_++],c-=3;c&&(x[o++]=y[_++],c>1&&(x[o++]=y[_++]))}else{_=o-w;do x[o++]=x[_++],x[o++]=x[_++],x[o++]=x[_++],c-=3;while(c>2);c&&(x[o++]=x[_++],c>1&&(x[o++]=x[_++]))}}else if(A&64){r.msg="invalid distance code",i.mode=bt;break e}else{R=k[(R&65535)+(F&(1<<A)-1)];continue r}break}}else if(A&64)if(A&32){i.mode=_a;break e}else{r.msg="invalid literal/length code",i.mode=bt;break e}else{R=S[(R&65535)+(F&(1<<A)-1)];continue t}break}}while(n<a&&o<h);c=b>>3,n-=c,b-=c<<3,F&=(1<<b)-1,r.next_in=n,r.next_out=o,r.avail_in=n<a?5+(a-n):5-(n-a),r.avail_out=o<h?257+(h-o):257-(o-h),i.hold=F,i.bits=b}});var Xr=Z((Jo,Vr)=>{"use strict";var jr=ve(),Ze=15,Yr=852,$r=592,Wr=0,Wt=1,Gr=2,ma=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],va=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],ba=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],Fa=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];Vr.exports=function(r,t,i,n,a,o,l,h){var s=h.bits,f=0,p=0,g=0,u=0,F=0,b=0,S=0,k=0,v=0,U=0,R,A,c,w,_,y=null,B=0,x,I=new jr.Buf16(Ze+1),m=new jr.Buf16(Ze+1),C=null,N=0,Y,H,J;for(f=0;f<=Ze;f++)I[f]=0;for(p=0;p<n;p++)I[t[i+p]]++;for(F=s,u=Ze;u>=1&&I[u]===0;u--);if(F>u&&(F=u),u===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,h.bits=1,0;for(g=1;g<u&&I[g]===0;g++);for(F<g&&(F=g),k=1,f=1;f<=Ze;f++)if(k<<=1,k-=I[f],k<0)return-1;if(k>0&&(r===Wr||u!==1))return-1;for(m[1]=0,f=1;f<Ze;f++)m[f+1]=m[f]+I[f];for(p=0;p<n;p++)t[i+p]!==0&&(l[m[t[i+p]]++]=p);if(r===Wr?(y=C=l,x=19):r===Wt?(y=ma,B-=257,C=va,N-=257,x=256):(y=ba,C=Fa,x=-1),U=0,p=0,f=g,_=o,b=F,S=0,c=-1,v=1<<F,w=v-1,r===Wt&&v>Yr||r===Gr&&v>$r)return 1;for(;;){Y=f-S,l[p]<x?(H=0,J=l[p]):l[p]>x?(H=C[N+l[p]],J=y[B+l[p]]):(H=96,J=0),R=1<<f-S,A=1<<b,g=A;do A-=R,a[_+(U>>S)+A]=Y<<24|H<<16|J|0;while(A!==0);for(R=1<<f-1;U&R;)R>>=1;if(R!==0?(U&=R-1,U+=R):U=0,p++,--I[f]===0){if(f===u)break;f=t[i+l[p]]}if(f>F&&(U&w)!==c){for(S===0&&(S=F),_+=g,b=f-S,k=1<<b;b+S<u&&(k-=I[b+S],!(k<=0));)b++,k<<=1;if(v+=1<<b,r===Wt&&v>Yr||r===Gr&&v>$r)return 1;c=U&w,a[c]=F<<24|b<<16|_-o|0}}return U!==0&&(a[_+U]=f-S<<24|64<<16|0),h.bits=F,0}});var Ci=Z(ae=>{"use strict";var Q=ve(),er=Yt(),fe=$t(),ka=Kr(),tt=Xr(),Ea=0,Fi=1,ki=2,Jr=4,Aa=5,Ft=6,Ie=0,Ba=1,Sa=2,ee=-2,Ei=-3,tr=-4,Ua=-5,Qr=8,Ai=1,ei=2,ti=3,ri=4,ii=5,ni=6,ai=7,oi=8,li=9,fi=10,At=11,xe=12,Gt=13,si=14,Vt=15,hi=16,ui=17,ci=18,di=19,kt=20,Et=21,pi=22,xi=23,gi=24,yi=25,wi=26,Xt=27,_i=28,mi=29,O=30,rr=31,Ia=32,Ra=852,Ca=592,Ta=15,za=Ta;function vi(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function Da(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Q.Buf16(320),this.work=new Q.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Bi(e){var r;return!e||!e.state?ee:(r=e.state,e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=Ai,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new Q.Buf32(Ra),r.distcode=r.distdyn=new Q.Buf32(Ca),r.sane=1,r.back=-1,Ie)}function Si(e){var r;return!e||!e.state?ee:(r=e.state,r.wsize=0,r.whave=0,r.wnext=0,Bi(e))}function Ui(e,r){var t,i;return!e||!e.state||(i=e.state,r<0?(t=0,r=-r):(t=(r>>4)+1,r<48&&(r&=15)),r&&(r<8||r>15))?ee:(i.window!==null&&i.wbits!==r&&(i.window=null),i.wrap=t,i.wbits=r,Si(e))}function Ii(e,r){var t,i;return e?(i=new Da,e.state=i,i.window=null,t=Ui(e,r),t!==Ie&&(e.state=null),t):ee}function Na(e){return Ii(e,za)}var bi=!0,Jt,Qt;function Oa(e){if(bi){var r;for(Jt=new Q.Buf32(512),Qt=new Q.Buf32(32),r=0;r<144;)e.lens[r++]=8;for(;r<256;)e.lens[r++]=9;for(;r<280;)e.lens[r++]=7;for(;r<288;)e.lens[r++]=8;for(tt(Fi,e.lens,0,288,Jt,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;tt(ki,e.lens,0,32,Qt,0,e.work,{bits:5}),bi=!1}e.lencode=Jt,e.lenbits=9,e.distcode=Qt,e.distbits=5}function Ri(e,r,t,i){var n,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Q.Buf8(a.wsize)),i>=a.wsize?(Q.arraySet(a.window,r,t-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(n=a.wsize-a.wnext,n>i&&(n=i),Q.arraySet(a.window,r,t-i,n,a.wnext),i-=n,i?(Q.arraySet(a.window,r,t-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=n))),0}function La(e,r){var t,i,n,a,o,l,h,s,f,p,g,u,F,b,S=0,k,v,U,R,A,c,w,_,y=new Q.Buf8(4),B,x,I=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return ee;t=e.state,t.mode===xe&&(t.mode=Gt),o=e.next_out,n=e.output,h=e.avail_out,a=e.next_in,i=e.input,l=e.avail_in,s=t.hold,f=t.bits,p=l,g=h,_=Ie;e:for(;;)switch(t.mode){case Ai:if(t.wrap===0){t.mode=Gt;break}for(;f<16;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}if(t.wrap&2&&s===35615){t.check=0,y[0]=s&255,y[1]=s>>>8&255,t.check=fe(t.check,y,2,0),s=0,f=0,t.mode=ei;break}if(t.flags=0,t.head&&(t.head.done=!1),!(t.wrap&1)||(((s&255)<<8)+(s>>8))%31){e.msg="incorrect header check",t.mode=O;break}if((s&15)!==Qr){e.msg="unknown compression method",t.mode=O;break}if(s>>>=4,f-=4,w=(s&15)+8,t.wbits===0)t.wbits=w;else if(w>t.wbits){e.msg="invalid window size",t.mode=O;break}t.dmax=1<<w,e.adler=t.check=1,t.mode=s&512?fi:xe,s=0,f=0;break;case ei:for(;f<16;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}if(t.flags=s,(t.flags&255)!==Qr){e.msg="unknown compression method",t.mode=O;break}if(t.flags&57344){e.msg="unknown header flags set",t.mode=O;break}t.head&&(t.head.text=s>>8&1),t.flags&512&&(y[0]=s&255,y[1]=s>>>8&255,t.check=fe(t.check,y,2,0)),s=0,f=0,t.mode=ti;case ti:for(;f<32;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}t.head&&(t.head.time=s),t.flags&512&&(y[0]=s&255,y[1]=s>>>8&255,y[2]=s>>>16&255,y[3]=s>>>24&255,t.check=fe(t.check,y,4,0)),s=0,f=0,t.mode=ri;case ri:for(;f<16;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}t.head&&(t.head.xflags=s&255,t.head.os=s>>8),t.flags&512&&(y[0]=s&255,y[1]=s>>>8&255,t.check=fe(t.check,y,2,0)),s=0,f=0,t.mode=ii;case ii:if(t.flags&1024){for(;f<16;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}t.length=s,t.head&&(t.head.extra_len=s),t.flags&512&&(y[0]=s&255,y[1]=s>>>8&255,t.check=fe(t.check,y,2,0)),s=0,f=0}else t.head&&(t.head.extra=null);t.mode=ni;case ni:if(t.flags&1024&&(u=t.length,u>l&&(u=l),u&&(t.head&&(w=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),Q.arraySet(t.head.extra,i,a,u,w)),t.flags&512&&(t.check=fe(t.check,i,u,a)),l-=u,a+=u,t.length-=u),t.length))break e;t.length=0,t.mode=ai;case ai:if(t.flags&2048){if(l===0)break e;u=0;do w=i[a+u++],t.head&&w&&t.length<65536&&(t.head.name+=String.fromCharCode(w));while(w&&u<l);if(t.flags&512&&(t.check=fe(t.check,i,u,a)),l-=u,a+=u,w)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=oi;case oi:if(t.flags&4096){if(l===0)break e;u=0;do w=i[a+u++],t.head&&w&&t.length<65536&&(t.head.comment+=String.fromCharCode(w));while(w&&u<l);if(t.flags&512&&(t.check=fe(t.check,i,u,a)),l-=u,a+=u,w)break e}else t.head&&(t.head.comment=null);t.mode=li;case li:if(t.flags&512){for(;f<16;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}if(s!==(t.check&65535)){e.msg="header crc mismatch",t.mode=O;break}s=0,f=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=xe;break;case fi:for(;f<32;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}e.adler=t.check=vi(s),s=0,f=0,t.mode=At;case At:if(t.havedict===0)return e.next_out=o,e.avail_out=h,e.next_in=a,e.avail_in=l,t.hold=s,t.bits=f,Sa;e.adler=t.check=1,t.mode=xe;case xe:if(r===Aa||r===Ft)break e;case Gt:if(t.last){s>>>=f&7,f-=f&7,t.mode=Xt;break}for(;f<3;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}switch(t.last=s&1,s>>>=1,f-=1,s&3){case 0:t.mode=si;break;case 1:if(Oa(t),t.mode=kt,r===Ft){s>>>=2,f-=2;break e}break;case 2:t.mode=ui;break;case 3:e.msg="invalid block type",t.mode=O}s>>>=2,f-=2;break;case si:for(s>>>=f&7,f-=f&7;f<32;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}if((s&65535)!==(s>>>16^65535)){e.msg="invalid stored block lengths",t.mode=O;break}if(t.length=s&65535,s=0,f=0,t.mode=Vt,r===Ft)break e;case Vt:t.mode=hi;case hi:if(u=t.length,u){if(u>l&&(u=l),u>h&&(u=h),u===0)break e;Q.arraySet(n,i,a,u,o),l-=u,a+=u,h-=u,o+=u,t.length-=u;break}t.mode=xe;break;case ui:for(;f<14;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}if(t.nlen=(s&31)+257,s>>>=5,f-=5,t.ndist=(s&31)+1,s>>>=5,f-=5,t.ncode=(s&15)+4,s>>>=4,f-=4,t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols",t.mode=O;break}t.have=0,t.mode=ci;case ci:for(;t.have<t.ncode;){for(;f<3;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}t.lens[I[t.have++]]=s&7,s>>>=3,f-=3}for(;t.have<19;)t.lens[I[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,B={bits:t.lenbits},_=tt(Ea,t.lens,0,19,t.lencode,0,t.work,B),t.lenbits=B.bits,_){e.msg="invalid code lengths set",t.mode=O;break}t.have=0,t.mode=di;case di:for(;t.have<t.nlen+t.ndist;){for(;S=t.lencode[s&(1<<t.lenbits)-1],k=S>>>24,v=S>>>16&255,U=S&65535,!(k<=f);){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}if(U<16)s>>>=k,f-=k,t.lens[t.have++]=U;else{if(U===16){for(x=k+2;f<x;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}if(s>>>=k,f-=k,t.have===0){e.msg="invalid bit length repeat",t.mode=O;break}w=t.lens[t.have-1],u=3+(s&3),s>>>=2,f-=2}else if(U===17){for(x=k+3;f<x;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}s>>>=k,f-=k,w=0,u=3+(s&7),s>>>=3,f-=3}else{for(x=k+7;f<x;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}s>>>=k,f-=k,w=0,u=11+(s&127),s>>>=7,f-=7}if(t.have+u>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=O;break}for(;u--;)t.lens[t.have++]=w}}if(t.mode===O)break;if(t.lens[256]===0){e.msg="invalid code -- missing end-of-block",t.mode=O;break}if(t.lenbits=9,B={bits:t.lenbits},_=tt(Fi,t.lens,0,t.nlen,t.lencode,0,t.work,B),t.lenbits=B.bits,_){e.msg="invalid literal/lengths set",t.mode=O;break}if(t.distbits=6,t.distcode=t.distdyn,B={bits:t.distbits},_=tt(ki,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,B),t.distbits=B.bits,_){e.msg="invalid distances set",t.mode=O;break}if(t.mode=kt,r===Ft)break e;case kt:t.mode=Et;case Et:if(l>=6&&h>=258){e.next_out=o,e.avail_out=h,e.next_in=a,e.avail_in=l,t.hold=s,t.bits=f,ka(e,g),o=e.next_out,n=e.output,h=e.avail_out,a=e.next_in,i=e.input,l=e.avail_in,s=t.hold,f=t.bits,t.mode===xe&&(t.back=-1);break}for(t.back=0;S=t.lencode[s&(1<<t.lenbits)-1],k=S>>>24,v=S>>>16&255,U=S&65535,!(k<=f);){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}if(v&&!(v&240)){for(R=k,A=v,c=U;S=t.lencode[c+((s&(1<<R+A)-1)>>R)],k=S>>>24,v=S>>>16&255,U=S&65535,!(R+k<=f);){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}s>>>=R,f-=R,t.back+=R}if(s>>>=k,f-=k,t.back+=k,t.length=U,v===0){t.mode=wi;break}if(v&32){t.back=-1,t.mode=xe;break}if(v&64){e.msg="invalid literal/length code",t.mode=O;break}t.extra=v&15,t.mode=pi;case pi:if(t.extra){for(x=t.extra;f<x;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}t.length+=s&(1<<t.extra)-1,s>>>=t.extra,f-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=xi;case xi:for(;S=t.distcode[s&(1<<t.distbits)-1],k=S>>>24,v=S>>>16&255,U=S&65535,!(k<=f);){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}if(!(v&240)){for(R=k,A=v,c=U;S=t.distcode[c+((s&(1<<R+A)-1)>>R)],k=S>>>24,v=S>>>16&255,U=S&65535,!(R+k<=f);){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}s>>>=R,f-=R,t.back+=R}if(s>>>=k,f-=k,t.back+=k,v&64){e.msg="invalid distance code",t.mode=O;break}t.offset=U,t.extra=v&15,t.mode=gi;case gi:if(t.extra){for(x=t.extra;f<x;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}t.offset+=s&(1<<t.extra)-1,s>>>=t.extra,f-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=O;break}t.mode=yi;case yi:if(h===0)break e;if(u=g-h,t.offset>u){if(u=t.offset-u,u>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=O;break}u>t.wnext?(u-=t.wnext,F=t.wsize-u):F=t.wnext-u,u>t.length&&(u=t.length),b=t.window}else b=n,F=o-t.offset,u=t.length;u>h&&(u=h),h-=u,t.length-=u;do n[o++]=b[F++];while(--u);t.length===0&&(t.mode=Et);break;case wi:if(h===0)break e;n[o++]=t.length,h--,t.mode=Et;break;case Xt:if(t.wrap){for(;f<32;){if(l===0)break e;l--,s|=i[a++]<<f,f+=8}if(g-=h,e.total_out+=g,t.total+=g,g&&(e.adler=t.check=t.flags?fe(t.check,n,g,o-g):er(t.check,n,g,o-g)),g=h,(t.flags?s:vi(s))!==t.check){e.msg="incorrect data check",t.mode=O;break}s=0,f=0}t.mode=_i;case _i:if(t.wrap&&t.flags){for(;f<32;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}if(s!==(t.total&4294967295)){e.msg="incorrect length check",t.mode=O;break}s=0,f=0}t.mode=mi;case mi:_=Ba;break e;case O:_=Ei;break e;case rr:return tr;case Ia:default:return ee}return e.next_out=o,e.avail_out=h,e.next_in=a,e.avail_in=l,t.hold=s,t.bits=f,(t.wsize||g!==e.avail_out&&t.mode<O&&(t.mode<Xt||r!==Jr))&&Ri(e,e.output,e.next_out,g-e.avail_out)?(t.mode=rr,tr):(p-=e.avail_in,g-=e.avail_out,e.total_in+=p,e.total_out+=g,t.total+=g,t.wrap&&g&&(e.adler=t.check=t.flags?fe(t.check,n,g,e.next_out-g):er(t.check,n,g,e.next_out-g)),e.data_type=t.bits+(t.last?64:0)+(t.mode===xe?128:0)+(t.mode===kt||t.mode===Vt?256:0),(p===0&&g===0||r===Jr)&&_===Ie&&(_=Ua),_)}function Ma(e){if(!e||!e.state)return ee;var r=e.state;return r.window&&(r.window=null),e.state=null,Ie}function Za(e,r){var t;return!e||!e.state||(t=e.state,!(t.wrap&2))?ee:(t.head=r,r.done=!1,Ie)}function qa(e,r){var t=r.length,i,n,a;return!e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==At)?ee:i.mode===At&&(n=1,n=er(n,r,t,0),n!==i.check)?Ei:(a=Ri(e,r,t,t),a?(i.mode=rr,tr):(i.havedict=1,Ie))}ae.inflateReset=Si;ae.inflateReset2=Ui;ae.inflateResetKeep=Bi;ae.inflateInit=Na;ae.inflateInit2=Ii;ae.inflate=La;ae.inflateEnd=Ma;ae.inflateGetHeader=Za;ae.inflateSetDictionary=qa;ae.inflateInfo="pako inflate (from Nodeca project)"});var ir=Z(qe=>{"use strict";var Bt=ve(),Ti=!0,zi=!0;try{String.fromCharCode.apply(null,[0])}catch{Ti=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{zi=!1}var rt=new Bt.Buf8(256);for(ge=0;ge<256;ge++)rt[ge]=ge>=252?6:ge>=248?5:ge>=240?4:ge>=224?3:ge>=192?2:1;var ge;rt[254]=rt[254]=1;qe.string2buf=function(e){var r,t,i,n,a,o=e.length,l=0;for(n=0;n<o;n++)t=e.charCodeAt(n),(t&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),n++)),l+=t<128?1:t<2048?2:t<65536?3:4;for(r=new Bt.Buf8(l),a=0,n=0;a<l;n++)t=e.charCodeAt(n),(t&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),n++)),t<128?r[a++]=t:t<2048?(r[a++]=192|t>>>6,r[a++]=128|t&63):t<65536?(r[a++]=224|t>>>12,r[a++]=128|t>>>6&63,r[a++]=128|t&63):(r[a++]=240|t>>>18,r[a++]=128|t>>>12&63,r[a++]=128|t>>>6&63,r[a++]=128|t&63);return r};function Di(e,r){if(r<65534&&(e.subarray&&zi||!e.subarray&&Ti))return String.fromCharCode.apply(null,Bt.shrinkBuf(e,r));for(var t="",i=0;i<r;i++)t+=String.fromCharCode(e[i]);return t}qe.buf2binstring=function(e){return Di(e,e.length)};qe.binstring2buf=function(e){for(var r=new Bt.Buf8(e.length),t=0,i=r.length;t<i;t++)r[t]=e.charCodeAt(t);return r};qe.buf2string=function(e,r){var t,i,n,a,o=r||e.length,l=new Array(o*2);for(i=0,t=0;t<o;){if(n=e[t++],n<128){l[i++]=n;continue}if(a=rt[n],a>4){l[i++]=65533,t+=a-1;continue}for(n&=a===2?31:a===3?15:7;a>1&&t<o;)n=n<<6|e[t++]&63,a--;if(a>1){l[i++]=65533;continue}n<65536?l[i++]=n:(n-=65536,l[i++]=55296|n>>10&1023,l[i++]=56320|n&1023)}return Di(l,i)};qe.utf8border=function(e,r){var t;for(r=r||e.length,r>e.length&&(r=e.length),t=r-1;t>=0&&(e[t]&192)===128;)t--;return t<0||t===0?r:t+rt[e[t]]>r?t:r}});var Oi=Z((tl,Ni)=>{"use strict";Ni.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var St=Z((rl,Li)=>{"use strict";Li.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var nr=Z((il,Mi)=>{"use strict";function Pa(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}Mi.exports=Pa});var qi=Z((nl,Zi)=>{"use strict";function Ha(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}Zi.exports=Ha});var Hi=Z(nt=>{"use strict";var Pe=Ci(),it=ve(),Ut=ir(),L=Oi(),ar=St(),Ka=nr(),ja=qi(),Pi=Object.prototype.toString;function Re(e){if(!(this instanceof Re))return new Re(e);this.options=it.assign({chunkSize:16384,windowBits:0,to:""},e||{});var r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(e&&e.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15||(r.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ka,this.strm.avail_out=0;var t=Pe.inflateInit2(this.strm,r.windowBits);if(t!==L.Z_OK)throw new Error(ar[t]);if(this.header=new ja,Pe.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=Ut.string2buf(r.dictionary):Pi.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(t=Pe.inflateSetDictionary(this.strm,r.dictionary),t!==L.Z_OK)))throw new Error(ar[t])}Re.prototype.push=function(e,r){var t=this.strm,i=this.options.chunkSize,n=this.options.dictionary,a,o,l,h,s,f=!1;if(this.ended)return!1;o=r===~~r?r:r===!0?L.Z_FINISH:L.Z_NO_FLUSH,typeof e=="string"?t.input=Ut.binstring2buf(e):Pi.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;do{if(t.avail_out===0&&(t.output=new it.Buf8(i),t.next_out=0,t.avail_out=i),a=Pe.inflate(t,L.Z_NO_FLUSH),a===L.Z_NEED_DICT&&n&&(a=Pe.inflateSetDictionary(this.strm,n)),a===L.Z_BUF_ERROR&&f===!0&&(a=L.Z_OK,f=!1),a!==L.Z_STREAM_END&&a!==L.Z_OK)return this.onEnd(a),this.ended=!0,!1;t.next_out&&(t.avail_out===0||a===L.Z_STREAM_END||t.avail_in===0&&(o===L.Z_FINISH||o===L.Z_SYNC_FLUSH))&&(this.options.to==="string"?(l=Ut.utf8border(t.output,t.next_out),h=t.next_out-l,s=Ut.buf2string(t.output,l),t.next_out=h,t.avail_out=i-h,h&&it.arraySet(t.output,t.output,l,h,0),this.onData(s)):this.onData(it.shrinkBuf(t.output,t.next_out))),t.avail_in===0&&t.avail_out===0&&(f=!0)}while((t.avail_in>0||t.avail_out===0)&&a!==L.Z_STREAM_END);return a===L.Z_STREAM_END&&(o=L.Z_FINISH),o===L.Z_FINISH?(a=Pe.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===L.Z_OK):(o===L.Z_SYNC_FLUSH&&(this.onEnd(L.Z_OK),t.avail_out=0),!0)};Re.prototype.onData=function(e){this.chunks.push(e)};Re.prototype.onEnd=function(e){e===L.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=it.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function or(e,r){var t=new Re(r);if(t.push(e,!0),t.err)throw t.msg||ar[t.err];return t.result}function Ya(e,r){return r=r||{},r.raw=!0,or(e,r)}nt.Inflate=Re;nt.inflate=or;nt.inflateRaw=Ya;nt.ungzip=or});var Yi=Z(It=>{"use strict";It.byteLength=Wa;It.toByteArray=Va;It.fromByteArray=Qa;var se=[],te=[],$a=typeof Uint8Array<"u"?Uint8Array:Array,lr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Ce=0,Ki=lr.length;Ce<Ki;++Ce)se[Ce]=lr[Ce],te[lr.charCodeAt(Ce)]=Ce;var Ce,Ki;te[45]=62;te[95]=63;function ji(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=r);var i=t===r?0:4-t%4;return[t,i]}function Wa(e){var r=ji(e),t=r[0],i=r[1];return(t+i)*3/4-i}function Ga(e,r,t){return(r+t)*3/4-t}function Va(e){var r,t=ji(e),i=t[0],n=t[1],a=new $a(Ga(e,i,n)),o=0,l=n>0?i-4:i,h;for(h=0;h<l;h+=4)r=te[e.charCodeAt(h)]<<18|te[e.charCodeAt(h+1)]<<12|te[e.charCodeAt(h+2)]<<6|te[e.charCodeAt(h+3)],a[o++]=r>>16&255,a[o++]=r>>8&255,a[o++]=r&255;return n===2&&(r=te[e.charCodeAt(h)]<<2|te[e.charCodeAt(h+1)]>>4,a[o++]=r&255),n===1&&(r=te[e.charCodeAt(h)]<<10|te[e.charCodeAt(h+1)]<<4|te[e.charCodeAt(h+2)]>>2,a[o++]=r>>8&255,a[o++]=r&255),a}function Xa(e){return se[e>>18&63]+se[e>>12&63]+se[e>>6&63]+se[e&63]}function Ja(e,r,t){for(var i,n=[],a=r;a<t;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),n.push(Xa(i));return n.join("")}function Qa(e){for(var r,t=e.length,i=t%3,n=[],a=16383,o=0,l=t-i;o<l;o+=a)n.push(Ja(e,o,o+a>l?l:o+a));return i===1?(r=e[t-1],n.push(se[r>>2]+se[r<<4&63]+"==")):i===2&&(r=(e[t-2]<<8)+e[t-1],n.push(se[r>>10]+se[r>>4&63]+se[r<<2&63]+"=")),n.join("")}});var $i=Z(fr=>{fr.read=function(e,r,t,i,n){var a,o,l=n*8-i-1,h=(1<<l)-1,s=h>>1,f=-7,p=t?n-1:0,g=t?-1:1,u=e[r+p];for(p+=g,a=u&(1<<-f)-1,u>>=-f,f+=l;f>0;a=a*256+e[r+p],p+=g,f-=8);for(o=a&(1<<-f)-1,a>>=-f,f+=i;f>0;o=o*256+e[r+p],p+=g,f-=8);if(a===0)a=1-s;else{if(a===h)return o?NaN:(u?-1:1)*(1/0);o=o+Math.pow(2,i),a=a-s}return(u?-1:1)*o*Math.pow(2,a-i)};fr.write=function(e,r,t,i,n,a){var o,l,h,s=a*8-n-1,f=(1<<s)-1,p=f>>1,g=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,u=i?0:a-1,F=i?1:-1,b=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,o=f):(o=Math.floor(Math.log(r)/Math.LN2),r*(h=Math.pow(2,-o))<1&&(o--,h*=2),o+p>=1?r+=g/h:r+=g*Math.pow(2,1-p),r*h>=2&&(o++,h/=2),o+p>=f?(l=0,o=f):o+p>=1?(l=(r*h-1)*Math.pow(2,n),o=o+p):(l=r*Math.pow(2,p-1)*Math.pow(2,n),o=0));n>=8;e[t+u]=l&255,u+=F,l/=256,n-=8);for(o=o<<n|l,s+=n;s>0;e[t+u]=o&255,u+=F,o/=256,s-=8);e[t+u-F]|=b*128}});var un=Z(Ye=>{"use strict";var sr=Yi(),Ke=$i(),Wi=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ye.Buffer=d;Ye.SlowBuffer=a0;Ye.INSPECT_MAX_BYTES=50;var Rt=2147483647;Ye.kMaxLength=Rt;d.TYPED_ARRAY_SUPPORT=e0();!d.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 e0(){try{let e=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch{return!1}}Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}});Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}});function ye(e){if(e>Rt)throw new RangeError('The value "'+e+'" is invalid for option "size"');let r=new Uint8Array(e);return Object.setPrototypeOf(r,d.prototype),r}function d(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return dr(e)}return Ji(e,r,t)}d.poolSize=8192;function Ji(e,r,t){if(typeof e=="string")return r0(e,r);if(ArrayBuffer.isView(e))return i0(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(he(e,ArrayBuffer)||e&&he(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(he(e,SharedArrayBuffer)||e&&he(e.buffer,SharedArrayBuffer)))return ur(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let i=e.valueOf&&e.valueOf();if(i!=null&&i!==e)return d.from(i,r,t);let n=n0(e);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return d.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}d.from=function(e,r,t){return Ji(e,r,t)};Object.setPrototypeOf(d.prototype,Uint8Array.prototype);Object.setPrototypeOf(d,Uint8Array);function Qi(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function t0(e,r,t){return Qi(e),e<=0?ye(e):r!==void 0?typeof t=="string"?ye(e).fill(r,t):ye(e).fill(r):ye(e)}d.alloc=function(e,r,t){return t0(e,r,t)};function dr(e){return Qi(e),ye(e<0?0:pr(e)|0)}d.allocUnsafe=function(e){return dr(e)};d.allocUnsafeSlow=function(e){return dr(e)};function r0(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!d.isEncoding(r))throw new TypeError("Unknown encoding: "+r);let t=en(e,r)|0,i=ye(t),n=i.write(e,r);return n!==t&&(i=i.slice(0,n)),i}function hr(e){let r=e.length<0?0:pr(e.length)|0,t=ye(r);for(let i=0;i<r;i+=1)t[i]=e[i]&255;return t}function i0(e){if(he(e,Uint8Array)){let r=new Uint8Array(e);return ur(r.buffer,r.byteOffset,r.byteLength)}return hr(e)}function ur(e,r,t){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');let i;return r===void 0&&t===void 0?i=new Uint8Array(e):t===void 0?i=new Uint8Array(e,r):i=new Uint8Array(e,r,t),Object.setPrototypeOf(i,d.prototype),i}function n0(e){if(d.isBuffer(e)){let r=pr(e.length)|0,t=ye(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||gr(e.length)?ye(0):hr(e);if(e.type==="Buffer"&&Array.isArray(e.data))return hr(e.data)}function pr(e){if(e>=Rt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Rt.toString(16)+" bytes");return e|0}function a0(e){return+e!=e&&(e=0),d.alloc(+e)}d.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==d.prototype};d.compare=function(r,t){if(he(r,Uint8Array)&&(r=d.from(r,r.offset,r.byteLength)),he(t,Uint8Array)&&(t=d.from(t,t.offset,t.byteLength)),!d.isBuffer(r)||!d.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;let i=r.length,n=t.length;for(let a=0,o=Math.min(i,n);a<o;++a)if(r[a]!==t[a]){i=r[a],n=t[a];break}return i<n?-1:n<i?1:0};d.isEncoding=function(r){switch(String(r).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}};d.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return d.alloc(0);let i;if(t===void 0)for(t=0,i=0;i<r.length;++i)t+=r[i].length;let n=d.allocUnsafe(t),a=0;for(i=0;i<r.length;++i){let o=r[i];if(he(o,Uint8Array))a+o.length>n.length?(d.isBuffer(o)||(o=d.from(o)),o.copy(n,a)):Uint8Array.prototype.set.call(n,o,a);else if(d.isBuffer(o))o.copy(n,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=o.length}return n};function en(e,r){if(d.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||he(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let t=e.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&t===0)return 0;let n=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return cr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return hn(e).length;default:if(n)return i?-1:cr(e).length;r=(""+r).toLowerCase(),n=!0}}d.byteLength=en;function o0(e,r,t){let i=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return g0(this,r,t);case"utf8":case"utf-8":return rn(this,r,t);case"ascii":return p0(this,r,t);case"latin1":case"binary":return x0(this,r,t);case"base64":return c0(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y0(this,r,t);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}d.prototype._isBuffer=!0;function Te(e,r,t){let i=e[r];e[r]=e[t],e[t]=i}d.prototype.swap16=function(){let r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<r;t+=2)Te(this,t,t+1);return this};d.prototype.swap32=function(){let r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<r;t+=4)Te(this,t,t+3),Te(this,t+1,t+2);return this};d.prototype.swap64=function(){let r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<r;t+=8)Te(this,t,t+7),Te(this,t+1,t+6),Te(this,t+2,t+5),Te(this,t+3,t+4);return this};d.prototype.toString=function(){let r=this.length;return r===0?"":arguments.length===0?rn(this,0,r):o0.apply(this,arguments)};d.prototype.toLocaleString=d.prototype.toString;d.prototype.equals=function(r){if(!d.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:d.compare(this,r)===0};d.prototype.inspect=function(){let r="",t=Ye.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"};Wi&&(d.prototype[Wi]=d.prototype.inspect);d.prototype.compare=function(r,t,i,n,a){if(he(r,Uint8Array)&&(r=d.from(r,r.offset,r.byteLength)),!d.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),i===void 0&&(i=r?r.length:0),n===void 0&&(n=0),a===void 0&&(a=this.length),t<0||i>r.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&t>=i)return 0;if(n>=a)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,n>>>=0,a>>>=0,this===r)return 0;let o=a-n,l=i-t,h=Math.min(o,l),s=this.slice(n,a),f=r.slice(t,i);for(let p=0;p<h;++p)if(s[p]!==f[p]){o=s[p],l=f[p];break}return o<l?-1:l<o?1:0};function tn(e,r,t,i,n){if(e.length===0)return-1;if(typeof t=="string"?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,gr(t)&&(t=n?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(n)return-1;t=e.length-1}else if(t<0)if(n)t=0;else return-1;if(typeof r=="string"&&(r=d.from(r,i)),d.isBuffer(r))return r.length===0?-1:Gi(e,r,t,i,n);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):Gi(e,[r],t,i,n);throw new TypeError("val must be string, number or Buffer")}function Gi(e,r,t,i,n){let a=1,o=e.length,l=r.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(e.length<2||r.length<2)return-1;a=2,o/=2,l/=2,t/=2}function h(f,p){return a===1?f[p]:f.readUInt16BE(p*a)}let s;if(n){let f=-1;for(s=t;s<o;s++)if(h(e,s)===h(r,f===-1?0:s-f)){if(f===-1&&(f=s),s-f+1===l)return f*a}else f!==-1&&(s-=s-f),f=-1}else for(t+l>o&&(t=o-l),s=t;s>=0;s--){let f=!0;for(let p=0;p<l;p++)if(h(e,s+p)!==h(r,p)){f=!1;break}if(f)return s}return-1}d.prototype.includes=function(r,t,i){return this.indexOf(r,t,i)!==-1};d.prototype.indexOf=function(r,t,i){return tn(this,r,t,i,!0)};d.prototype.lastIndexOf=function(r,t,i){return tn(this,r,t,i,!1)};function l0(e,r,t,i){t=Number(t)||0;let n=e.length-t;i?(i=Number(i),i>n&&(i=n)):i=n;let a=r.length;i>a/2&&(i=a/2);let o;for(o=0;o<i;++o){let l=parseInt(r.substr(o*2,2),16);if(gr(l))return o;e[t+o]=l}return o}function f0(e,r,t,i){return Ct(cr(r,e.length-t),e,t,i)}function s0(e,r,t,i){return Ct(v0(r),e,t,i)}function h0(e,r,t,i){return Ct(hn(r),e,t,i)}function u0(e,r,t,i){return Ct(b0(r,e.length-t),e,t,i)}d.prototype.write=function(r,t,i,n){if(t===void 0)n="utf8",i=this.length,t=0;else if(i===void 0&&typeof t=="string")n=t,i=this.length,t=0;else if(isFinite(t))t=t>>>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-t;if((i===void 0||i>a)&&(i=a),r.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return l0(this,r,t,i);case"utf8":case"utf-8":return f0(this,r,t,i);case"ascii":case"latin1":case"binary":return s0(this,r,t,i);case"base64":return h0(this,r,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u0(this,r,t,i);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function c0(e,r,t){return r===0&&t===e.length?sr.fromByteArray(e):sr.fromByteArray(e.slice(r,t))}function rn(e,r,t){t=Math.min(e.length,t);let i=[],n=r;for(;n<t;){let a=e[n],o=null,l=a>239?4:a>223?3:a>191?2:1;if(n+l<=t){let h,s,f,p;switch(l){case 1:a<128&&(o=a);break;case 2:h=e[n+1],(h&192)===128&&(p=(a&31)<<6|h&63,p>127&&(o=p));break;case 3:h=e[n+1],s=e[n+2],(h&192)===128&&(s&192)===128&&(p=(a&15)<<12|(h&63)<<6|s&63,p>2047&&(p<55296||p>57343)&&(o=p));break;case 4:h=e[n+1],s=e[n+2],f=e[n+3],(h&192)===128&&(s&192)===128&&(f&192)===128&&(p=(a&15)<<18|(h&63)<<12|(s&63)<<6|f&63,p>65535&&p<1114112&&(o=p))}}o===null?(o=65533,l=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|o&1023),i.push(o),n+=l}return d0(i)}var Vi=4096;function d0(e){let r=e.length;if(r<=Vi)return String.fromCharCode.apply(String,e);let t="",i=0;for(;i<r;)t+=String.fromCharCode.apply(String,e.slice(i,i+=Vi));return t}function p0(e,r,t){let i="";t=Math.min(e.length,t);for(let n=r;n<t;++n)i+=String.fromCharCode(e[n]&127);return i}function x0(e,r,t){let i="";t=Math.min(e.length,t);for(let n=r;n<t;++n)i+=String.fromCharCode(e[n]);return i}function g0(e,r,t){let i=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>i)&&(t=i);let n="";for(let a=r;a<t;++a)n+=F0[e[a]];return n}function y0(e,r,t){let i=e.slice(r,t),n="";for(let a=0;a<i.length-1;a+=2)n+=String.fromCharCode(i[a]+i[a+1]*256);return n}d.prototype.slice=function(r,t){let i=this.length;r=~~r,t=t===void 0?i:~~t,r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<r&&(t=r);let n=this.subarray(r,t);return Object.setPrototypeOf(n,d.prototype),n};function K(e,r,t){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}d.prototype.readUintLE=d.prototype.readUIntLE=function(r,t,i){r=r>>>0,t=t>>>0,i||K(r,t,this.length);let n=this[r],a=1,o=0;for(;++o<t&&(a*=256);)n+=this[r+o]*a;return n};d.prototype.readUintBE=d.prototype.readUIntBE=function(r,t,i){r=r>>>0,t=t>>>0,i||K(r,t,this.length);let n=this[r+--t],a=1;for(;t>0&&(a*=256);)n+=this[r+--t]*a;return n};d.prototype.readUint8=d.prototype.readUInt8=function(r,t){return r=r>>>0,t||K(r,1,this.length),this[r]};d.prototype.readUint16LE=d.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||K(r,2,this.length),this[r]|this[r+1]<<8};d.prototype.readUint16BE=d.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||K(r,2,this.length),this[r]<<8|this[r+1]};d.prototype.readUint32LE=d.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||K(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};d.prototype.readUint32BE=d.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||K(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};d.prototype.readBigUInt64LE=be(function(r){r=r>>>0,je(r,"offset");let t=this[r],i=this[r+7];(t===void 0||i===void 0)&&at(r,this.length-8);let n=t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,a=this[++r]+this[++r]*2**8+this[++r]*2**16+i*2**24;return BigInt(n)+(BigInt(a)<<BigInt(32))});d.prototype.readBigUInt64BE=be(function(r){r=r>>>0,je(r,"offset");let t=this[r],i=this[r+7];(t===void 0||i===void 0)&&at(r,this.length-8);let n=t*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],a=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+i;return(BigInt(n)<<BigInt(32))+BigInt(a)});d.prototype.readIntLE=function(r,t,i){r=r>>>0,t=t>>>0,i||K(r,t,this.length);let n=this[r],a=1,o=0;for(;++o<t&&(a*=256);)n+=this[r+o]*a;return a*=128,n>=a&&(n-=Math.pow(2,8*t)),n};d.prototype.readIntBE=function(r,t,i){r=r>>>0,t=t>>>0,i||K(r,t,this.length);let n=t,a=1,o=this[r+--n];for(;n>0&&(a*=256);)o+=this[r+--n]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*t)),o};d.prototype.readInt8=function(r,t){return r=r>>>0,t||K(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};d.prototype.readInt16LE=function(r,t){r=r>>>0,t||K(r,2,this.length);let i=this[r]|this[r+1]<<8;return i&32768?i|4294901760:i};d.prototype.readInt16BE=function(r,t){r=r>>>0,t||K(r,2,this.length);let i=this[r+1]|this[r]<<8;return i&32768?i|4294901760:i};d.prototype.readInt32LE=function(r,t){return r=r>>>0,t||K(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};d.prototype.readInt32BE=function(r,t){return r=r>>>0,t||K(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};d.prototype.readBigInt64LE=be(function(r){r=r>>>0,je(r,"offset");let t=this[r],i=this[r+7];(t===void 0||i===void 0)&&at(r,this.length-8);let n=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(i<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24)});d.prototype.readBigInt64BE=be(function(r){r=r>>>0,je(r,"offset");let t=this[r],i=this[r+7];(t===void 0||i===void 0)&&at(r,this.length-8);let n=(t<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(n)<<BigInt(32))+BigInt(this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+i)});d.prototype.readFloatLE=function(r,t){return r=r>>>0,t||K(r,4,this.length),Ke.read(this,r,!0,23,4)};d.prototype.readFloatBE=function(r,t){return r=r>>>0,t||K(r,4,this.length),Ke.read(this,r,!1,23,4)};d.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||K(r,8,this.length),Ke.read(this,r,!0,52,8)};d.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||K(r,8,this.length),Ke.read(this,r,!1,52,8)};function G(e,r,t,i,n,a){if(!d.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>n||r<a)throw new RangeError('"value" argument is out of bounds');if(t+i>e.length)throw new RangeError("Index out of range")}d.prototype.writeUintLE=d.prototype.writeUIntLE=function(r,t,i,n){if(r=+r,t=t>>>0,i=i>>>0,!n){let l=Math.pow(2,8*i)-1;G(this,r,t,i,l,0)}let a=1,o=0;for(this[t]=r&255;++o<i&&(a*=256);)this[t+o]=r/a&255;return t+i};d.prototype.writeUintBE=d.prototype.writeUIntBE=function(r,t,i,n){if(r=+r,t=t>>>0,i=i>>>0,!n){let l=Math.pow(2,8*i)-1;G(this,r,t,i,l,0)}let a=i-1,o=1;for(this[t+a]=r&255;--a>=0&&(o*=256);)this[t+a]=r/o&255;return t+i};d.prototype.writeUint8=d.prototype.writeUInt8=function(r,t,i){return r=+r,t=t>>>0,i||G(this,r,t,1,255,0),this[t]=r&255,t+1};d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(r,t,i){return r=+r,t=t>>>0,i||G(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2};d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(r,t,i){return r=+r,t=t>>>0,i||G(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2};d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(r,t,i){return r=+r,t=t>>>0,i||G(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4};d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(r,t,i){return r=+r,t=t>>>0,i||G(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function nn(e,r,t,i,n){sn(r,i,n,e,t,7);let a=Number(r&BigInt(4294967295));e[t++]=a,a=a>>8,e[t++]=a,a=a>>8,e[t++]=a,a=a>>8,e[t++]=a;let o=Number(r>>BigInt(32)&BigInt(4294967295));return e[t++]=o,o=o>>8,e[t++]=o,o=o>>8,e[t++]=o,o=o>>8,e[t++]=o,t}function an(e,r,t,i,n){sn(r,i,n,e,t,7);let a=Number(r&BigInt(4294967295));e[t+7]=a,a=a>>8,e[t+6]=a,a=a>>8,e[t+5]=a,a=a>>8,e[t+4]=a;let o=Number(r>>BigInt(32)&BigInt(4294967295));return e[t+3]=o,o=o>>8,e[t+2]=o,o=o>>8,e[t+1]=o,o=o>>8,e[t]=o,t+8}d.prototype.writeBigUInt64LE=be(function(r,t=0){return nn(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});d.prototype.writeBigUInt64BE=be(function(r,t=0){return an(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});d.prototype.writeIntLE=function(r,t,i,n){if(r=+r,t=t>>>0,!n){let h=Math.pow(2,8*i-1);G(this,r,t,i,h-1,-h)}let a=0,o=1,l=0;for(this[t]=r&255;++a<i&&(o*=256);)r<0&&l===0&&this[t+a-1]!==0&&(l=1),this[t+a]=(r/o>>0)-l&255;return t+i};d.prototype.writeIntBE=function(r,t,i,n){if(r=+r,t=t>>>0,!n){let h=Math.pow(2,8*i-1);G(this,r,t,i,h-1,-h)}let a=i-1,o=1,l=0;for(this[t+a]=r&255;--a>=0&&(o*=256);)r<0&&l===0&&this[t+a+1]!==0&&(l=1),this[t+a]=(r/o>>0)-l&255;return t+i};d.prototype.writeInt8=function(r,t,i){return r=+r,t=t>>>0,i||G(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1};d.prototype.writeInt16LE=function(r,t,i){return r=+r,t=t>>>0,i||G(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2};d.prototype.writeInt16BE=function(r,t,i){return r=+r,t=t>>>0,i||G(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2};d.prototype.writeInt32LE=function(r,t,i){return r=+r,t=t>>>0,i||G(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4};d.prototype.writeInt32BE=function(r,t,i){return r=+r,t=t>>>0,i||G(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};d.prototype.writeBigInt64LE=be(function(r,t=0){return nn(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});d.prototype.writeBigInt64BE=be(function(r,t=0){return an(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function on(e,r,t,i,n,a){if(t+i>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function ln(e,r,t,i,n){return r=+r,t=t>>>0,n||on(e,r,t,4,34028234663852886e22,-34028234663852886e22),Ke.write(e,r,t,i,23,4),t+4}d.prototype.writeFloatLE=function(r,t,i){return ln(this,r,t,!0,i)};d.prototype.writeFloatBE=function(r,t,i){return ln(this,r,t,!1,i)};function fn(e,r,t,i,n){return r=+r,t=t>>>0,n||on(e,r,t,8,17976931348623157e292,-17976931348623157e292),Ke.write(e,r,t,i,52,8),t+8}d.prototype.writeDoubleLE=function(r,t,i){return fn(this,r,t,!0,i)};d.prototype.writeDoubleBE=function(r,t,i){return fn(this,r,t,!1,i)};d.prototype.copy=function(r,t,i,n){if(!d.isBuffer(r))throw new TypeError("argument should be a Buffer");if(i||(i=0),!n&&n!==0&&(n=this.length),t>=r.length&&(t=r.length),t||(t=0),n>0&&n<i&&(n=i),n===i||r.length===0||this.length===0)return 0;if(t<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),r.length-t<n-i&&(n=r.length-t+i);let a=n-i;return this===r&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,i,n):Uint8Array.prototype.set.call(r,this.subarray(i,n),t),a};d.prototype.fill=function(r,t,i,n){if(typeof r=="string"){if(typeof t=="string"?(n=t,t=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"&&!d.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(r.length===1){let o=r.charCodeAt(0);(n==="utf8"&&o<128||n==="latin1")&&(r=o)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;t=t>>>0,i=i===void 0?this.length:i>>>0,r||(r=0);let a;if(typeof r=="number")for(a=t;a<i;++a)this[a]=r;else{let o=d.isBuffer(r)?r:d.from(r,n),l=o.length;if(l===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(a=0;a<i-t;++a)this[a+t]=o[a%l]}return this};var He={};function xr(e,r,t){He[e]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:r.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(n){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:n,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}xr("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);xr("ERR_INVALID_ARG_TYPE",function(e,r){return`The "${e}" argument must be of type number. Received type ${typeof r}`},TypeError);xr("ERR_OUT_OF_RANGE",function(e,r,t){let i=`The value of "${e}" is out of range.`,n=t;return Number.isInteger(t)&&Math.abs(t)>2**32?n=Xi(String(t)):typeof t=="bigint"&&(n=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(n=Xi(n)),n+="n"),i+=` It must be ${r}. Received ${n}`,i},RangeError);function Xi(e){let r="",t=e.length,i=e[0]==="-"?1:0;for(;t>=i+4;t-=3)r=`_${e.slice(t-3,t)}${r}`;return`${e.slice(0,t)}${r}`}function w0(e,r,t){je(r,"offset"),(e[r]===void 0||e[r+t]===void 0)&&at(r,e.length-(t+1))}function sn(e,r,t,i,n,a){if(e>t||e<r){let o=typeof r=="bigint"?"n":"",l;throw a>3?r===0||r===BigInt(0)?l=`>= 0${o} and < 2${o} ** ${(a+1)*8}${o}`:l=`>= -(2${o} ** ${(a+1)*8-1}${o}) and < 2 ** ${(a+1)*8-1}${o}`:l=`>= ${r}${o} and <= ${t}${o}`,new He.ERR_OUT_OF_RANGE("value",l,e)}w0(i,n,a)}function je(e,r){if(typeof e!="number")throw new He.ERR_INVALID_ARG_TYPE(r,"number",e)}function at(e,r,t){throw Math.floor(e)!==e?(je(e,t),new He.ERR_OUT_OF_RANGE(t||"offset","an integer",e)):r<0?new He.ERR_BUFFER_OUT_OF_BOUNDS:new He.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${r}`,e)}var _0=/[^+/0-9A-Za-z-_]/g;function m0(e){if(e=e.split("=")[0],e=e.trim().replace(_0,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function cr(e,r){r=r||1/0;let t,i=e.length,n=null,a=[];for(let o=0;o<i;++o){if(t=e.charCodeAt(o),t>55295&&t<57344){if(!n){if(t>56319){(r-=3)>-1&&a.push(239,191,189);continue}else if(o+1===i){(r-=3)>-1&&a.push(239,191,189);continue}n=t;continue}if(t<56320){(r-=3)>-1&&a.push(239,191,189),n=t;continue}t=(n-55296<<10|t-56320)+65536}else n&&(r-=3)>-1&&a.push(239,191,189);if(n=null,t<128){if((r-=1)<0)break;a.push(t)}else if(t<2048){if((r-=2)<0)break;a.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;a.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;a.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return a}function v0(e){let r=[];for(let t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function b0(e,r){let t,i,n,a=[];for(let o=0;o<e.length&&!((r-=2)<0);++o)t=e.charCodeAt(o),i=t>>8,n=t%256,a.push(n),a.push(i);return a}function hn(e){return sr.toByteArray(m0(e))}function Ct(e,r,t,i){let n;for(n=0;n<i&&!(n+t>=r.length||n>=e.length);++n)r[n+t]=e[n];return n}function he(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function gr(e){return e!==e}var F0=function(){let e="0123456789abcdef",r=new Array(256);for(let t=0;t<16;++t){let i=t*16;for(let n=0;n<16;++n)r[i+n]=e[t]+e[n]}return r}();function be(e){return typeof BigInt>"u"?k0:e}function k0(){throw new Error("BigInt not supported")}});var Nn=Z(Ge=>{"use strict";var B0=ve(),S0=4,pn=0,xn=1,U0=2;function We(e){for(var r=e.length;--r>=0;)e[r]=0}var I0=0,vn=1,R0=2,C0=3,T0=258,Fr=29,ut=256,lt=ut+1+Fr,$e=30,kr=19,bn=2*lt+1,ze=15,yr=16,z0=7,Er=256,Fn=16,kn=17,En=18,vr=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Tt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],D0=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],An=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],N0=512,we=new Array((lt+2)*2);We(we);var ot=new Array($e*2);We(ot);var ft=new Array(N0);We(ft);var st=new Array(T0-C0+1);We(st);var Ar=new Array(Fr);We(Ar);var zt=new Array($e);We(zt);function wr(e,r,t,i,n){this.static_tree=e,this.extra_bits=r,this.extra_base=t,this.elems=i,this.max_length=n,this.has_stree=e&&e.length}var Bn,Sn,Un;function _r(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}function In(e){return e<256?ft[e]:ft[256+(e>>>7)]}function ht(e,r){e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255}function X(e,r,t){e.bi_valid>yr-t?(e.bi_buf|=r<<e.bi_valid&65535,ht(e,e.bi_buf),e.bi_buf=r>>yr-e.bi_valid,e.bi_valid+=t-yr):(e.bi_buf|=r<<e.bi_valid&65535,e.bi_valid+=t)}function ue(e,r,t){X(e,t[r*2],t[r*2+1])}function Rn(e,r){var t=0;do t|=e&1,e>>>=1,t<<=1;while(--r>0);return t>>>1}function O0(e){e.bi_valid===16?(ht(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function L0(e,r){var t=r.dyn_tree,i=r.max_code,n=r.stat_desc.static_tree,a=r.stat_desc.has_stree,o=r.stat_desc.extra_bits,l=r.stat_desc.extra_base,h=r.stat_desc.max_length,s,f,p,g,u,F,b=0;for(g=0;g<=ze;g++)e.bl_count[g]=0;for(t[e.heap[e.heap_max]*2+1]=0,s=e.heap_max+1;s<bn;s++)f=e.heap[s],g=t[t[f*2+1]*2+1]+1,g>h&&(g=h,b++),t[f*2+1]=g,!(f>i)&&(e.bl_count[g]++,u=0,f>=l&&(u=o[f-l]),F=t[f*2],e.opt_len+=F*(g+u),a&&(e.static_len+=F*(n[f*2+1]+u)));if(b!==0){do{for(g=h-1;e.bl_count[g]===0;)g--;e.bl_count[g]--,e.bl_count[g+1]+=2,e.bl_count[h]--,b-=2}while(b>0);for(g=h;g!==0;g--)for(f=e.bl_count[g];f!==0;)p=e.heap[--s],!(p>i)&&(t[p*2+1]!==g&&(e.opt_len+=(g-t[p*2+1])*t[p*2],t[p*2+1]=g),f--)}}function Cn(e,r,t){var i=new Array(ze+1),n=0,a,o;for(a=1;a<=ze;a++)i[a]=n=n+t[a-1]<<1;for(o=0;o<=r;o++){var l=e[o*2+1];l!==0&&(e[o*2]=Rn(i[l]++,l))}}function M0(){var e,r,t,i,n,a=new Array(ze+1);for(t=0,i=0;i<Fr-1;i++)for(Ar[i]=t,e=0;e<1<<vr[i];e++)st[t++]=i;for(st[t-1]=i,n=0,i=0;i<16;i++)for(zt[i]=n,e=0;e<1<<Tt[i];e++)ft[n++]=i;for(n>>=7;i<$e;i++)for(zt[i]=n<<7,e=0;e<1<<Tt[i]-7;e++)ft[256+n++]=i;for(r=0;r<=ze;r++)a[r]=0;for(e=0;e<=143;)we[e*2+1]=8,e++,a[8]++;for(;e<=255;)we[e*2+1]=9,e++,a[9]++;for(;e<=279;)we[e*2+1]=7,e++,a[7]++;for(;e<=287;)we[e*2+1]=8,e++,a[8]++;for(Cn(we,lt+1,a),e=0;e<$e;e++)ot[e*2+1]=5,ot[e*2]=Rn(e,5);Bn=new wr(we,vr,ut+1,lt,ze),Sn=new wr(ot,Tt,0,$e,ze),Un=new wr(new Array(0),D0,0,kr,z0)}function Tn(e){var r;for(r=0;r<lt;r++)e.dyn_ltree[r*2]=0;for(r=0;r<$e;r++)e.dyn_dtree[r*2]=0;for(r=0;r<kr;r++)e.bl_tree[r*2]=0;e.dyn_ltree[Er*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function zn(e){e.bi_valid>8?ht(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Z0(e,r,t,i){zn(e),i&&(ht(e,t),ht(e,~t)),B0.arraySet(e.pending_buf,e.window,r,t,e.pending),e.pending+=t}function gn(e,r,t,i){var n=r*2,a=t*2;return e[n]<e[a]||e[n]===e[a]&&i[r]<=i[t]}function mr(e,r,t){for(var i=e.heap[t],n=t<<1;n<=e.heap_len&&(n<e.heap_len&&gn(r,e.heap[n+1],e.heap[n],e.depth)&&n++,!gn(r,i,e.heap[n],e.depth));)e.heap[t]=e.heap[n],t=n,n<<=1;e.heap[t]=i}function yn(e,r,t){var i,n,a=0,o,l;if(e.last_lit!==0)do i=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],n=e.pending_buf[e.l_buf+a],a++,i===0?ue(e,n,r):(o=st[n],ue(e,o+ut+1,r),l=vr[o],l!==0&&(n-=Ar[o],X(e,n,l)),i--,o=In(i),ue(e,o,t),l=Tt[o],l!==0&&(i-=zt[o],X(e,i,l)));while(a<e.last_lit);ue(e,Er,r)}function br(e,r){var t=r.dyn_tree,i=r.stat_desc.static_tree,n=r.stat_desc.has_stree,a=r.stat_desc.elems,o,l,h=-1,s;for(e.heap_len=0,e.heap_max=bn,o=0;o<a;o++)t[o*2]!==0?(e.heap[++e.heap_len]=h=o,e.depth[o]=0):t[o*2+1]=0;for(;e.heap_len<2;)s=e.heap[++e.heap_len]=h<2?++h:0,t[s*2]=1,e.depth[s]=0,e.opt_len--,n&&(e.static_len-=i[s*2+1]);for(r.max_code=h,o=e.heap_len>>1;o>=1;o--)mr(e,t,o);s=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],mr(e,t,1),l=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=l,t[s*2]=t[o*2]+t[l*2],e.depth[s]=(e.depth[o]>=e.depth[l]?e.depth[o]:e.depth[l])+1,t[o*2+1]=t[l*2+1]=s,e.heap[1]=s++,mr(e,t,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],L0(e,r),Cn(t,h,e.bl_count)}function wn(e,r,t){var i,n=-1,a,o=r[0*2+1],l=0,h=7,s=4;for(o===0&&(h=138,s=3),r[(t+1)*2+1]=65535,i=0;i<=t;i++)a=o,o=r[(i+1)*2+1],!(++l<h&&a===o)&&(l<s?e.bl_tree[a*2]+=l:a!==0?(a!==n&&e.bl_tree[a*2]++,e.bl_tree[Fn*2]++):l<=10?e.bl_tree[kn*2]++:e.bl_tree[En*2]++,l=0,n=a,o===0?(h=138,s=3):a===o?(h=6,s=3):(h=7,s=4))}function _n(e,r,t){var i,n=-1,a,o=r[0*2+1],l=0,h=7,s=4;for(o===0&&(h=138,s=3),i=0;i<=t;i++)if(a=o,o=r[(i+1)*2+1],!(++l<h&&a===o)){if(l<s)do ue(e,a,e.bl_tree);while(--l!==0);else a!==0?(a!==n&&(ue(e,a,e.bl_tree),l--),ue(e,Fn,e.bl_tree),X(e,l-3,2)):l<=10?(ue(e,kn,e.bl_tree),X(e,l-3,3)):(ue(e,En,e.bl_tree),X(e,l-11,7));l=0,n=a,o===0?(h=138,s=3):a===o?(h=6,s=3):(h=7,s=4)}}function q0(e){var r;for(wn(e,e.dyn_ltree,e.l_desc.max_code),wn(e,e.dyn_dtree,e.d_desc.max_code),br(e,e.bl_desc),r=kr-1;r>=3&&e.bl_tree[An[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r}function P0(e,r,t,i){var n;for(X(e,r-257,5),X(e,t-1,5),X(e,i-4,4),n=0;n<i;n++)X(e,e.bl_tree[An[n]*2+1],3);_n(e,e.dyn_ltree,r-1),_n(e,e.dyn_dtree,t-1)}function H0(e){var r=4093624447,t;for(t=0;t<=31;t++,r>>>=1)if(r&1&&e.dyn_ltree[t*2]!==0)return pn;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return xn;for(t=32;t<ut;t++)if(e.dyn_ltree[t*2]!==0)return xn;return pn}var mn=!1;function K0(e){mn||(M0(),mn=!0),e.l_desc=new _r(e.dyn_ltree,Bn),e.d_desc=new _r(e.dyn_dtree,Sn),e.bl_desc=new _r(e.bl_tree,Un),e.bi_buf=0,e.bi_valid=0,Tn(e)}function Dn(e,r,t,i){X(e,(I0<<1)+(i?1:0),3),Z0(e,r,t,!0)}function j0(e){X(e,vn<<1,3),ue(e,Er,we),O0(e)}function Y0(e,r,t,i){var n,a,o=0;e.level>0?(e.strm.data_type===U0&&(e.strm.data_type=H0(e)),br(e,e.l_desc),br(e,e.d_desc),o=q0(e),n=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=n&&(n=a)):n=a=t+5,t+4<=n&&r!==-1?Dn(e,r,t,i):e.strategy===S0||a===n?(X(e,(vn<<1)+(i?1:0),3),yn(e,we,ot)):(X(e,(R0<<1)+(i?1:0),3),P0(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),yn(e,e.dyn_ltree,e.dyn_dtree)),Tn(e),i&&zn(e)}function $0(e,r,t){return e.pending_buf[e.d_buf+e.last_lit*2]=r>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=r&255,e.pending_buf[e.l_buf+e.last_lit]=t&255,e.last_lit++,r===0?e.dyn_ltree[t*2]++:(e.matches++,r--,e.dyn_ltree[(st[t]+ut+1)*2]++,e.dyn_dtree[In(r)*2]++),e.last_lit===e.lit_bufsize-1}Ge._tr_init=K0;Ge._tr_stored_block=Dn;Ge._tr_flush_block=Y0;Ge._tr_tally=$0;Ge._tr_align=j0});var jn=Z(pe=>{"use strict";var W=ve(),ie=Nn(),Zn=Yt(),Fe=$t(),W0=St(),Le=0,G0=1,V0=3,Se=4,On=5,de=0,Ln=1,ne=-2,X0=-3,Br=-5,J0=-1,Q0=1,Dt=2,eo=3,to=4,ro=0,io=2,Mt=8,no=9,ao=15,oo=8,lo=29,fo=256,Ur=fo+1+lo,so=30,ho=19,uo=2*Ur+1,co=15,T=3,Ae=258,le=Ae+T+1,po=32,Zt=42,Ir=69,Nt=73,Ot=91,Lt=103,De=113,dt=666,P=1,pt=2,Ne=3,Je=4,xo=3;function Be(e,r){return e.msg=W0[r],r}function Mn(e){return(e<<1)-(e>4?9:0)}function Ee(e){for(var r=e.length;--r>=0;)e[r]=0}function ke(e){var r=e.state,t=r.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(W.arraySet(e.output,r.pending_buf,r.pending_out,t,e.next_out),e.next_out+=t,r.pending_out+=t,e.total_out+=t,e.avail_out-=t,r.pending-=t,r.pending===0&&(r.pending_out=0))}function j(e,r){ie._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,ke(e.strm)}function z(e,r){e.pending_buf[e.pending++]=r}function ct(e,r){e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255}function go(e,r,t,i){var n=e.avail_in;return n>i&&(n=i),n===0?0:(e.avail_in-=n,W.arraySet(r,e.input,e.next_in,n,t),e.state.wrap===1?e.adler=Zn(e.adler,r,n,t):e.state.wrap===2&&(e.adler=Fe(e.adler,r,n,t)),e.next_in+=n,e.total_in+=n,n)}function qn(e,r){var t=e.max_chain_length,i=e.strstart,n,a,o=e.prev_length,l=e.nice_match,h=e.strstart>e.w_size-le?e.strstart-(e.w_size-le):0,s=e.window,f=e.w_mask,p=e.prev,g=e.strstart+Ae,u=s[i+o-1],F=s[i+o];e.prev_length>=e.good_match&&(t>>=2),l>e.lookahead&&(l=e.lookahead);do if(n=r,!(s[n+o]!==F||s[n+o-1]!==u||s[n]!==s[i]||s[++n]!==s[i+1])){i+=2,n++;do;while(s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&i<g);if(a=Ae-(g-i),i=g-Ae,a>o){if(e.match_start=r,o=a,a>=l)break;u=s[i+o-1],F=s[i+o]}}while((r=p[r&f])>h&&--t!==0);return o<=e.lookahead?o:e.lookahead}function Oe(e){var r=e.w_size,t,i,n,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-le)){W.arraySet(e.window,e.window,r,r,0),e.match_start-=r,e.strstart-=r,e.block_start-=r,i=e.hash_size,t=i;do n=e.head[--t],e.head[t]=n>=r?n-r:0;while(--i);i=r,t=i;do n=e.prev[--t],e.prev[t]=n>=r?n-r:0;while(--i);a+=r}if(e.strm.avail_in===0)break;if(i=go(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=i,e.lookahead+e.insert>=T)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+T-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<T)););}while(e.lookahead<le&&e.strm.avail_in!==0)}function yo(e,r){var t=65535;for(t>e.pending_buf_size-5&&(t=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Oe(e),e.lookahead===0&&r===Le)return P;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+t;if((e.strstart===0||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,j(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-le&&(j(e,!1),e.strm.avail_out===0))return P}return e.insert=0,r===Se?(j(e,!0),e.strm.avail_out===0?Ne:Je):(e.strstart>e.block_start&&(j(e,!1),e.strm.avail_out===0),P)}function Sr(e,r){for(var t,i;;){if(e.lookahead<le){if(Oe(e),e.lookahead<le&&r===Le)return P;if(e.lookahead===0)break}if(t=0,e.lookahead>=T&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+T-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),t!==0&&e.strstart-t<=e.w_size-le&&(e.match_length=qn(e,t)),e.match_length>=T)if(i=ie._tr_tally(e,e.strstart-e.match_start,e.match_length-T),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=T){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+T-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=ie._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(j(e,!1),e.strm.avail_out===0))return P}return e.insert=e.strstart<T-1?e.strstart:T-1,r===Se?(j(e,!0),e.strm.avail_out===0?Ne:Je):e.last_lit&&(j(e,!1),e.strm.avail_out===0)?P:pt}function Ve(e,r){for(var t,i,n;;){if(e.lookahead<le){if(Oe(e),e.lookahead<le&&r===Le)return P;if(e.lookahead===0)break}if(t=0,e.lookahead>=T&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+T-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=T-1,t!==0&&e.prev_length<e.max_lazy_match&&e.strstart-t<=e.w_size-le&&(e.match_length=qn(e,t),e.match_length<=5&&(e.strategy===Q0||e.match_length===T&&e.strstart-e.match_start>4096)&&(e.match_length=T-1)),e.prev_length>=T&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-T,i=ie._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-T),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=n&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+T-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=T-1,e.strstart++,i&&(j(e,!1),e.strm.avail_out===0))return P}else if(e.match_available){if(i=ie._tr_tally(e,0,e.window[e.strstart-1]),i&&j(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return P}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=ie._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<T-1?e.strstart:T-1,r===Se?(j(e,!0),e.strm.avail_out===0?Ne:Je):e.last_lit&&(j(e,!1),e.strm.avail_out===0)?P:pt}function wo(e,r){for(var t,i,n,a,o=e.window;;){if(e.lookahead<=Ae){if(Oe(e),e.lookahead<=Ae&&r===Le)return P;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=T&&e.strstart>0&&(n=e.strstart-1,i=o[n],i===o[++n]&&i===o[++n]&&i===o[++n])){a=e.strstart+Ae;do;while(i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&n<a);e.match_length=Ae-(a-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=T?(t=ie._tr_tally(e,1,e.match_length-T),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(t=ie._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),t&&(j(e,!1),e.strm.avail_out===0))return P}return e.insert=0,r===Se?(j(e,!0),e.strm.avail_out===0?Ne:Je):e.last_lit&&(j(e,!1),e.strm.avail_out===0)?P:pt}function _o(e,r){for(var t;;){if(e.lookahead===0&&(Oe(e),e.lookahead===0)){if(r===Le)return P;break}if(e.match_length=0,t=ie._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,t&&(j(e,!1),e.strm.avail_out===0))return P}return e.insert=0,r===Se?(j(e,!0),e.strm.avail_out===0?Ne:Je):e.last_lit&&(j(e,!1),e.strm.avail_out===0)?P:pt}function ce(e,r,t,i,n){this.good_length=e,this.max_lazy=r,this.nice_length=t,this.max_chain=i,this.func=n}var Xe;Xe=[new ce(0,0,0,0,yo),new ce(4,4,8,4,Sr),new ce(4,5,16,8,Sr),new ce(4,6,32,32,Sr),new ce(4,4,16,16,Ve),new ce(8,16,32,32,Ve),new ce(8,16,128,128,Ve),new ce(8,32,128,256,Ve),new ce(32,128,258,1024,Ve),new ce(32,258,258,4096,Ve)];function mo(e){e.window_size=2*e.w_size,Ee(e.head),e.max_lazy_match=Xe[e.level].max_lazy,e.good_match=Xe[e.level].good_length,e.nice_match=Xe[e.level].nice_length,e.max_chain_length=Xe[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=T-1,e.match_available=0,e.ins_h=0}function vo(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Mt,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new W.Buf16(uo*2),this.dyn_dtree=new W.Buf16((2*so+1)*2),this.bl_tree=new W.Buf16((2*ho+1)*2),Ee(this.dyn_ltree),Ee(this.dyn_dtree),Ee(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new W.Buf16(co+1),this.heap=new W.Buf16(2*Ur+1),Ee(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new W.Buf16(2*Ur+1),Ee(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Pn(e){var r;return!e||!e.state?Be(e,ne):(e.total_in=e.total_out=0,e.data_type=io,r=e.state,r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?Zt:De,e.adler=r.wrap===2?0:1,r.last_flush=Le,ie._tr_init(r),de)}function Hn(e){var r=Pn(e);return r===de&&mo(e.state),r}function bo(e,r){return!e||!e.state||e.state.wrap!==2?ne:(e.state.gzhead=r,de)}function Kn(e,r,t,i,n,a){if(!e)return ne;var o=1;if(r===J0&&(r=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),n<1||n>no||t!==Mt||i<8||i>15||r<0||r>9||a<0||a>to)return Be(e,ne);i===8&&(i=9);var l=new vo;return e.state=l,l.strm=e,l.wrap=o,l.gzhead=null,l.w_bits=i,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=n+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+T-1)/T),l.window=new W.Buf8(l.w_size*2),l.head=new W.Buf16(l.hash_size),l.prev=new W.Buf16(l.w_size),l.lit_bufsize=1<<n+6,l.pending_buf_size=l.lit_bufsize*4,l.pending_buf=new W.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=r,l.strategy=a,l.method=t,Hn(e)}function Fo(e,r){return Kn(e,r,Mt,ao,oo,ro)}function ko(e,r){var t,i,n,a;if(!e||!e.state||r>On||r<0)return e?Be(e,ne):ne;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===dt&&r!==Se)return Be(e,e.avail_out===0?Br:ne);if(i.strm=e,t=i.last_flush,i.last_flush=r,i.status===Zt)if(i.wrap===2)e.adler=0,z(i,31),z(i,139),z(i,8),i.gzhead?(z(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),z(i,i.gzhead.time&255),z(i,i.gzhead.time>>8&255),z(i,i.gzhead.time>>16&255),z(i,i.gzhead.time>>24&255),z(i,i.level===9?2:i.strategy>=Dt||i.level<2?4:0),z(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(z(i,i.gzhead.extra.length&255),z(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=Fe(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=Ir):(z(i,0),z(i,0),z(i,0),z(i,0),z(i,0),z(i,i.level===9?2:i.strategy>=Dt||i.level<2?4:0),z(i,xo),i.status=De);else{var o=Mt+(i.w_bits-8<<4)<<8,l=-1;i.strategy>=Dt||i.level<2?l=0:i.level<6?l=1:i.level===6?l=2:l=3,o|=l<<6,i.strstart!==0&&(o|=po),o+=31-o%31,i.status=De,ct(i,o),i.strstart!==0&&(ct(i,e.adler>>>16),ct(i,e.adler&65535)),e.adler=1}if(i.status===Ir)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Fe(e.adler,i.pending_buf,i.pending-n,n)),ke(e),n=i.pending,i.pending===i.pending_buf_size));)z(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(e.adler=Fe(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=Nt)}else i.status=Nt;if(i.status===Nt)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Fe(e.adler,i.pending_buf,i.pending-n,n)),ke(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}i.gzindex<i.gzhead.name.length?a=i.gzhead.name.charCodeAt(i.gzindex++)&255:a=0,z(i,a)}while(a!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=Fe(e.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.gzindex=0,i.status=Ot)}else i.status=Ot;if(i.status===Ot)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Fe(e.adler,i.pending_buf,i.pending-n,n)),ke(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}i.gzindex<i.gzhead.comment.length?a=i.gzhead.comment.charCodeAt(i.gzindex++)&255:a=0,z(i,a)}while(a!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=Fe(e.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.status=Lt)}else i.status=Lt;if(i.status===Lt&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&ke(e),i.pending+2<=i.pending_buf_size&&(z(i,e.adler&255),z(i,e.adler>>8&255),e.adler=0,i.status=De)):i.status=De),i.pending!==0){if(ke(e),e.avail_out===0)return i.last_flush=-1,de}else if(e.avail_in===0&&Mn(r)<=Mn(t)&&r!==Se)return Be(e,Br);if(i.status===dt&&e.avail_in!==0)return Be(e,Br);if(e.avail_in!==0||i.lookahead!==0||r!==Le&&i.status!==dt){var h=i.strategy===Dt?_o(i,r):i.strategy===eo?wo(i,r):Xe[i.level].func(i,r);if((h===Ne||h===Je)&&(i.status=dt),h===P||h===Ne)return e.avail_out===0&&(i.last_flush=-1),de;if(h===pt&&(r===G0?ie._tr_align(i):r!==On&&(ie._tr_stored_block(i,0,0,!1),r===V0&&(Ee(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),ke(e),e.avail_out===0))return i.last_flush=-1,de}return r!==Se?de:i.wrap<=0?Ln:(i.wrap===2?(z(i,e.adler&255),z(i,e.adler>>8&255),z(i,e.adler>>16&255),z(i,e.adler>>24&255),z(i,e.total_in&255),z(i,e.total_in>>8&255),z(i,e.total_in>>16&255),z(i,e.total_in>>24&255)):(ct(i,e.adler>>>16),ct(i,e.adler&65535)),ke(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?de:Ln)}function Eo(e){var r;return!e||!e.state?ne:(r=e.state.status,r!==Zt&&r!==Ir&&r!==Nt&&r!==Ot&&r!==Lt&&r!==De&&r!==dt?Be(e,ne):(e.state=null,r===De?Be(e,X0):de))}function Ao(e,r){var t=r.length,i,n,a,o,l,h,s,f;if(!e||!e.state||(i=e.state,o=i.wrap,o===2||o===1&&i.status!==Zt||i.lookahead))return ne;for(o===1&&(e.adler=Zn(e.adler,r,t,0)),i.wrap=0,t>=i.w_size&&(o===0&&(Ee(i.head),i.strstart=0,i.block_start=0,i.insert=0),f=new W.Buf8(i.w_size),W.arraySet(f,r,t-i.w_size,i.w_size,0),r=f,t=i.w_size),l=e.avail_in,h=e.next_in,s=e.input,e.avail_in=t,e.next_in=0,e.input=r,Oe(i);i.lookahead>=T;){n=i.strstart,a=i.lookahead-(T-1);do i.ins_h=(i.ins_h<<i.hash_shift^i.window[n+T-1])&i.hash_mask,i.prev[n&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=n,n++;while(--a);i.strstart=n,i.lookahead=T-1,Oe(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=T-1,i.match_available=0,e.next_in=h,e.input=s,e.avail_in=l,i.wrap=o,de}pe.deflateInit=Fo;pe.deflateInit2=Kn;pe.deflateReset=Hn;pe.deflateResetKeep=Pn;pe.deflateSetHeader=bo;pe.deflate=ko;pe.deflateEnd=Eo;pe.deflateSetDictionary=Ao;pe.deflateInfo="pako deflate (from Nodeca project)"});var Gn=Z(yt=>{"use strict";var xt=jn(),gt=ve(),Cr=ir(),Tr=St(),Bo=nr(),Wn=Object.prototype.toString,So=0,Rr=4,Qe=0,Yn=1,$n=2,Uo=-1,Io=0,Ro=8;function Me(e){if(!(this instanceof Me))return new Me(e);this.options=gt.assign({level:Uo,method:Ro,chunkSize:16384,windowBits:15,memLevel:8,strategy:Io,to:""},e||{});var r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Bo,this.strm.avail_out=0;var t=xt.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(t!==Qe)throw new Error(Tr[t]);if(r.header&&xt.deflateSetHeader(this.strm,r.header),r.dictionary){var i;if(typeof r.dictionary=="string"?i=Cr.string2buf(r.dictionary):Wn.call(r.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(r.dictionary):i=r.dictionary,t=xt.deflateSetDictionary(this.strm,i),t!==Qe)throw new Error(Tr[t]);this._dict_set=!0}}Me.prototype.push=function(e,r){var t=this.strm,i=this.options.chunkSize,n,a;if(this.ended)return!1;a=r===~~r?r:r===!0?Rr:So,typeof e=="string"?t.input=Cr.string2buf(e):Wn.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;do{if(t.avail_out===0&&(t.output=new gt.Buf8(i),t.next_out=0,t.avail_out=i),n=xt.deflate(t,a),n!==Yn&&n!==Qe)return this.onEnd(n),this.ended=!0,!1;(t.avail_out===0||t.avail_in===0&&(a===Rr||a===$n))&&(this.options.to==="string"?this.onData(Cr.buf2binstring(gt.shrinkBuf(t.output,t.next_out))):this.onData(gt.shrinkBuf(t.output,t.next_out)))}while((t.avail_in>0||t.avail_out===0)&&n!==Yn);return a===Rr?(n=xt.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Qe):(a===$n&&(this.onEnd(Qe),t.avail_out=0),!0)};Me.prototype.onData=function(e){this.chunks.push(e)};Me.prototype.onEnd=function(e){e===Qe&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=gt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function zr(e,r){var t=new Me(r);if(t.push(e,!0),t.err)throw t.msg||Tr[t.err];return t.result}function Co(e,r){return r=r||{},r.raw=!0,zr(e,r)}function To(e,r){return r=r||{},r.gzip=!0,zr(e,r)}yt.Deflate=Me;yt.deflate=zr;yt.deflateRaw=Co;yt.gzip=To});var ea=Z(()=>{});var ta=Z((Gl,Ht)=>{(function(){"use strict";var e="input is invalid type",r=typeof window=="object",t=r?window:{};t.JS_SHA256_NO_WINDOW&&(r=!1);var i=!r&&typeof self=="object",n=!t.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;n?t=global:i&&(t=self);var a=!t.JS_SHA256_NO_COMMON_JS&&typeof Ht=="object"&&Ht.exports,o=typeof define=="function"&&define.amd,l=!t.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",h="0123456789abcdef".split(""),s=[-2147483648,8388608,32768,128],f=[24,16,8,0],p=[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],g=["hex","array","digest","arrayBuffer"],u=[];(t.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(t.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(c){return typeof c=="object"&&c.buffer&&c.buffer.constructor===ArrayBuffer});var F=function(c,w){return function(_){return new U(w,!0).update(_)[c]()}},b=function(c){var w=F("hex",c);n&&(w=S(w,c)),w.create=function(){return new U(c)},w.update=function(B){return w.create().update(B)};for(var _=0;_<g.length;++_){var y=g[_];w[y]=F(y,c)}return w},S=function(c,w){var _=fa("crypto"),y=ea().Buffer,B=w?"sha224":"sha256",x;y.from&&!t.JS_SHA256_NO_BUFFER_FROM?x=y.from:x=function(m){return new y(m)};var I=function(m){if(typeof m=="string")return _.createHash(B).update(m,"utf8").digest("hex");if(m==null)throw new Error(e);return m.constructor===ArrayBuffer&&(m=new Uint8Array(m)),Array.isArray(m)||ArrayBuffer.isView(m)||m.constructor===y?_.createHash(B).update(x(m)).digest("hex"):c(m)};return I},k=function(c,w){return function(_,y){return new R(_,w,!0).update(y)[c]()}},v=function(c){var w=k("hex",c);w.create=function(B){return new R(B,c)},w.update=function(B,x){return w.create(B).update(x)};for(var _=0;_<g.length;++_){var y=g[_];w[y]=k(y,c)}return w};function U(c,w){w?(u[0]=u[16]=u[1]=u[2]=u[3]=u[4]=u[5]=u[6]=u[7]=u[8]=u[9]=u[10]=u[11]=u[12]=u[13]=u[14]=u[15]=0,this.blocks=u):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=c}U.prototype.update=function(c){if(!this.finalized){var w,_=typeof c;if(_!=="string"){if(_==="object"){if(c===null)throw new Error(e);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(e)}else throw new Error(e);w=!0}for(var y,B=0,x,I=c.length,m=this.blocks;B<I;){if(this.hashed&&(this.hashed=!1,m[0]=this.block,this.block=m[16]=m[1]=m[2]=m[3]=m[4]=m[5]=m[6]=m[7]=m[8]=m[9]=m[10]=m[11]=m[12]=m[13]=m[14]=m[15]=0),w)for(x=this.start;B<I&&x<64;++B)m[x>>>2]|=c[B]<<f[x++&3];else for(x=this.start;B<I&&x<64;++B)y=c.charCodeAt(B),y<128?m[x>>>2]|=y<<f[x++&3]:y<2048?(m[x>>>2]|=(192|y>>>6)<<f[x++&3],m[x>>>2]|=(128|y&63)<<f[x++&3]):y<55296||y>=57344?(m[x>>>2]|=(224|y>>>12)<<f[x++&3],m[x>>>2]|=(128|y>>>6&63)<<f[x++&3],m[x>>>2]|=(128|y&63)<<f[x++&3]):(y=65536+((y&1023)<<10|c.charCodeAt(++B)&1023),m[x>>>2]|=(240|y>>>18)<<f[x++&3],m[x>>>2]|=(128|y>>>12&63)<<f[x++&3],m[x>>>2]|=(128|y>>>6&63)<<f[x++&3],m[x>>>2]|=(128|y&63)<<f[x++&3]);this.lastByteIndex=x,this.bytes+=x-this.start,x>=64?(this.block=m[16],this.start=x-64,this.hash(),this.hashed=!0):this.start=x}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},U.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var c=this.blocks,w=this.lastByteIndex;c[16]=this.block,c[w>>>2]|=s[w&3],this.block=c[16],w>=56&&(this.hashed||this.hash(),c[0]=this.block,c[16]=c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=c[11]=c[12]=c[13]=c[14]=c[15]=0),c[14]=this.hBytes<<3|this.bytes>>>29,c[15]=this.bytes<<3,this.hash()}},U.prototype.hash=function(){var c=this.h0,w=this.h1,_=this.h2,y=this.h3,B=this.h4,x=this.h5,I=this.h6,m=this.h7,C=this.blocks,N,Y,H,J,D,_e,me,et,Kt,jt,_t;for(N=16;N<64;++N)D=C[N-15],Y=(D>>>7|D<<25)^(D>>>18|D<<14)^D>>>3,D=C[N-2],H=(D>>>17|D<<15)^(D>>>19|D<<13)^D>>>10,C[N]=C[N-16]+Y+C[N-7]+H<<0;for(_t=w&_,N=0;N<64;N+=4)this.first?(this.is224?(et=300032,D=C[0]-1413257819,m=D-150054599<<0,y=D+24177077<<0):(et=704751109,D=C[0]-210244248,m=D-1521486534<<0,y=D+143694565<<0),this.first=!1):(Y=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),H=(B>>>6|B<<26)^(B>>>11|B<<21)^(B>>>25|B<<7),et=c&w,J=et^c&_^_t,me=B&x^~B&I,D=m+H+me+p[N]+C[N],_e=Y+J,m=y+D<<0,y=D+_e<<0),Y=(y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10),H=(m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7),Kt=y&c,J=Kt^y&w^et,me=m&B^~m&x,D=I+H+me+p[N+1]+C[N+1],_e=Y+J,I=_+D<<0,_=D+_e<<0,Y=(_>>>2|_<<30)^(_>>>13|_<<19)^(_>>>22|_<<10),H=(I>>>6|I<<26)^(I>>>11|I<<21)^(I>>>25|I<<7),jt=_&y,J=jt^_&c^Kt,me=I&m^~I&B,D=x+H+me+p[N+2]+C[N+2],_e=Y+J,x=w+D<<0,w=D+_e<<0,Y=(w>>>2|w<<30)^(w>>>13|w<<19)^(w>>>22|w<<10),H=(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7),_t=w&_,J=_t^w&y^jt,me=x&I^~x&m,D=B+H+me+p[N+3]+C[N+3],_e=Y+J,B=c+D<<0,c=D+_e<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+c<<0,this.h1=this.h1+w<<0,this.h2=this.h2+_<<0,this.h3=this.h3+y<<0,this.h4=this.h4+B<<0,this.h5=this.h5+x<<0,this.h6=this.h6+I<<0,this.h7=this.h7+m<<0},U.prototype.hex=function(){this.finalize();var c=this.h0,w=this.h1,_=this.h2,y=this.h3,B=this.h4,x=this.h5,I=this.h6,m=this.h7,C=h[c>>>28&15]+h[c>>>24&15]+h[c>>>20&15]+h[c>>>16&15]+h[c>>>12&15]+h[c>>>8&15]+h[c>>>4&15]+h[c&15]+h[w>>>28&15]+h[w>>>24&15]+h[w>>>20&15]+h[w>>>16&15]+h[w>>>12&15]+h[w>>>8&15]+h[w>>>4&15]+h[w&15]+h[_>>>28&15]+h[_>>>24&15]+h[_>>>20&15]+h[_>>>16&15]+h[_>>>12&15]+h[_>>>8&15]+h[_>>>4&15]+h[_&15]+h[y>>>28&15]+h[y>>>24&15]+h[y>>>20&15]+h[y>>>16&15]+h[y>>>12&15]+h[y>>>8&15]+h[y>>>4&15]+h[y&15]+h[B>>>28&15]+h[B>>>24&15]+h[B>>>20&15]+h[B>>>16&15]+h[B>>>12&15]+h[B>>>8&15]+h[B>>>4&15]+h[B&15]+h[x>>>28&15]+h[x>>>24&15]+h[x>>>20&15]+h[x>>>16&15]+h[x>>>12&15]+h[x>>>8&15]+h[x>>>4&15]+h[x&15]+h[I>>>28&15]+h[I>>>24&15]+h[I>>>20&15]+h[I>>>16&15]+h[I>>>12&15]+h[I>>>8&15]+h[I>>>4&15]+h[I&15];return this.is224||(C+=h[m>>>28&15]+h[m>>>24&15]+h[m>>>20&15]+h[m>>>16&15]+h[m>>>12&15]+h[m>>>8&15]+h[m>>>4&15]+h[m&15]),C},U.prototype.toString=U.prototype.hex,U.prototype.digest=function(){this.finalize();var c=this.h0,w=this.h1,_=this.h2,y=this.h3,B=this.h4,x=this.h5,I=this.h6,m=this.h7,C=[c>>>24&255,c>>>16&255,c>>>8&255,c&255,w>>>24&255,w>>>16&255,w>>>8&255,w&255,_>>>24&255,_>>>16&255,_>>>8&255,_&255,y>>>24&255,y>>>16&255,y>>>8&255,y&255,B>>>24&255,B>>>16&255,B>>>8&255,B&255,x>>>24&255,x>>>16&255,x>>>8&255,x&255,I>>>24&255,I>>>16&255,I>>>8&255,I&255];return this.is224||C.push(m>>>24&255,m>>>16&255,m>>>8&255,m&255),C},U.prototype.array=U.prototype.digest,U.prototype.arrayBuffer=function(){this.finalize();var c=new ArrayBuffer(this.is224?28:32),w=new DataView(c);return w.setUint32(0,this.h0),w.setUint32(4,this.h1),w.setUint32(8,this.h2),w.setUint32(12,this.h3),w.setUint32(16,this.h4),w.setUint32(20,this.h5),w.setUint32(24,this.h6),this.is224||w.setUint32(28,this.h7),c};function R(c,w,_){var y,B=typeof c;if(B==="string"){var x=[],I=c.length,m=0,C;for(y=0;y<I;++y)C=c.charCodeAt(y),C<128?x[m++]=C:C<2048?(x[m++]=192|C>>>6,x[m++]=128|C&63):C<55296||C>=57344?(x[m++]=224|C>>>12,x[m++]=128|C>>>6&63,x[m++]=128|C&63):(C=65536+((C&1023)<<10|c.charCodeAt(++y)&1023),x[m++]=240|C>>>18,x[m++]=128|C>>>12&63,x[m++]=128|C>>>6&63,x[m++]=128|C&63);c=x}else if(B==="object"){if(c===null)throw new Error(e);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(e)}else throw new Error(e);c.length>64&&(c=new U(w,!0).update(c).array());var N=[],Y=[];for(y=0;y<64;++y){var H=c[y]||0;N[y]=92^H,Y[y]=54^H}U.call(this,w,_),this.update(Y),this.oKeyPad=N,this.inner=!0,this.sharedMemory=_}R.prototype=new U,R.prototype.finalize=function(){if(U.prototype.finalize.call(this),this.inner){this.inner=!1;var c=this.array();U.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(c),U.prototype.finalize.call(this)}};var A=b();A.sha256=A,A.sha224=b(!0),A.sha256.hmac=v(),A.sha224.hmac=v(!0),a?Ht.exports=A:(t.sha256=A.sha256,t.sha224=A.sha224,o&&define(function(){return A}))})()});var Yo={};sa(Yo,{Buffer:()=>M.Buffer,Crypto:()=>q,CryptoError:()=>V,DefaultAlphabet:()=>Vn,Strength:()=>Qn,decryptData:()=>dn,decryptMessage:()=>A0,encryptData:()=>Jn,encryptMessage:()=>No,generateMnemonic:()=>Oo,generateSignKeys:()=>qo,generateSignature:()=>Ho,generateSignedTransactionBytes:()=>jo,getAccountIdFromPublicKey:()=>Po,getRandomBytes:()=>Dr,getRandomString:()=>zo,getRandomWords:()=>Nr,sha256AsBase64:()=>Mo,sha256AsBytes:()=>Lr,sha256AsHex:()=>Lo,sha256Binary:()=>Ue,sha256Raw:()=>qt,verifySignature:()=>Ko});var cn=vt(Hi());var M=vt(un());var V=class extends Error{};var q=class e{static cryptoAdapter;static get adapter(){if(!e.cryptoAdapter)throw new V("No Crypto Adapter provided - Use [Crypto.init()] first");return e.cryptoAdapter}static init(r){e.cryptoAdapter=r}};var E=class e{static KEY_SIZE=32;static UNPACKED_SIZE=16;static ORDER=[237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16];static ORDER_TIMES_8=[104,159,174,231,210,24,147,192,178,230,188,23,245,206,247,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128];static BASE_2Y=[22587,610,29883,44076,15515,9479,25859,56197,23910,4462,17831,16322,62102,36542,52412,16035];static BASE_R2Y=[5744,16384,61977,54121,8776,18501,26522,34893,23833,5823,55924,58749,24147,14085,13606,6080];static C1=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];static C9=[9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];static C486671=[27919,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0];static C39420360=[33224,601,0,0,0,0,0,0,0,0,0,0,0,0,0,0];static P25=33554431;static P26=67108863;static clamp(r){r[31]&=127,r[31]|=64,r[0]&=248}static cpy32(r,t){for(let i=0;i<32;i++)r[i]=t[i]}static mula_small(r,t,i,n,a,o){i=i|0,a=a|0,o=o|0;let l=0;for(let h=0;h<a;++h)l+=(t[h+i]&255)+o*(n[h]&255),r[h+i]=l&255,l>>=8;return l}static mula32(r,t,i,n,a){n=n|0,a=a|0;let o=31,l=0,h=0;for(;h<n;h++){let s=a*(i[h]&255);l+=e.mula_small(r,r,h,t,o,s)+(r[h+o]&255)+s*(t[o]&255),r[h+o]=l&255,l>>=8}return r[h+o]=l+(r[h+o]&255)&255,l>>8}static divmod(r,t,i,n,a){i=i|0,a=a|0;let o=0,l=(n[a-1]&255)<<8;for(a>1&&(l|=n[a-2]&255);i-->=a;){let h=o<<16|(t[i]&255)<<8;i>0&&(h|=t[i-1]&255);let s=i-a+1;h/=l,o+=e.mula_small(t,t,s,n,a,-h),r[s]=h+o&255,e.mula_small(t,t,s,n,a,-o),o=t[i]&255,t[i]=0}t[a-1]=o&255}static numsize(r,t){for(;t--!==0&&r[t]===0;);return t+1}static egcd32(r,t,i,n){let a,o=32,l,h;for(h=0;h<32;h++)r[h]=t[h]=0;if(r[0]=1,a=e.numsize(i,32),a===0)return t;let s=new Array(32);for(;;){if(l=o-a+1,e.divmod(s,n,o,i,a),o=e.numsize(n,o),o===0)return r;if(e.mula32(t,r,s,l,-1),l=a-o+1,e.divmod(s,i,a,n,o),a=e.numsize(i,a),a===0)return t;e.mula32(r,t,s,l,-1)}}static unpack(r,t){for(let i=0;i<e.KEY_SIZE;i+=2)r[i/2]=t[i]&255|(t[i+1]&255)<<8}static is_overflow(r){return r[0]>e.P26-19&&(r[1]&r[3]&r[5]&r[7]&r[9])===e.P25&&(r[2]&r[4]&r[6]&r[8])===e.P26||r[9]>e.P25}static pack(r,t){for(let i=0;i<e.UNPACKED_SIZE;++i)t[2*i]=r[i]&255,t[2*i+1]=(r[i]&65280)>>8}static createUnpackedArray(){return new Uint16Array(e.UNPACKED_SIZE)}static cpy(r,t){for(let i=0;i<e.UNPACKED_SIZE;++i)r[i]=t[i]}static set(r,t){r[0]=t;for(let i=1;i<e.UNPACKED_SIZE;++i)r[i]=0}static recip(r,t,i){let n=e.createUnpackedArray(),a=e.createUnpackedArray(),o=e.createUnpackedArray(),l=e.createUnpackedArray(),h=e.createUnpackedArray(),s;for(e.sqr(a,t),e.sqr(o,a),e.sqr(n,o),e.mul(o,n,t),e.mul(n,o,a),e.sqr(a,n),e.mul(l,a,o),e.sqr(a,l),e.sqr(o,a),e.sqr(a,o),e.sqr(o,a),e.sqr(a,o),e.mul(o,a,l),e.sqr(a,o),e.sqr(l,a),s=1;s<5;s++)e.sqr(a,l),e.sqr(l,a);for(e.mul(a,l,o),e.sqr(l,a),e.sqr(h,l),s=1;s<10;s++)e.sqr(l,h),e.sqr(h,l);for(e.mul(l,h,a),s=0;s<5;s++)e.sqr(a,l),e.sqr(l,a);for(e.mul(a,l,o),e.sqr(o,a),e.sqr(l,o),s=1;s<25;s++)e.sqr(o,l),e.sqr(l,o);for(e.mul(o,l,a),e.sqr(l,o),e.sqr(h,l),s=1;s<50;s++)e.sqr(l,h),e.sqr(h,l);for(e.mul(l,h,o),s=0;s<25;s++)e.sqr(h,l),e.sqr(l,h);e.mul(o,l,a),e.sqr(a,o),e.sqr(o,a),i!==0?e.mul(r,t,o):(e.sqr(a,o),e.sqr(o,a),e.sqr(a,o),e.mul(r,a,n))}static is_negative(r){let t=e.is_overflow(r)||r[9]<0,i=r[0]&1;return((t?1:0)^i)&4294967295}static sqrt(r,t){let i=e.createUnpackedArray(),n=e.createUnpackedArray(),a=e.createUnpackedArray();e.add(n,t,t),e.recip(i,n,1),e.sqr(r,i),e.mul(a,n,r),e.sub(a,a,e.C1),e.mul(n,i,a),e.mul(r,t,n)}static c255lsqr8h(r,t,i,n,a,o,l,h){let s=[],f;return f=h*h,s[0]=f&65535,f=(f/65536|0)+2*h*l,s[1]=f&65535,f=(f/65536|0)+2*h*o+l*l,s[2]=f&65535,f=(f/65536|0)+2*h*a+2*l*o,s[3]=f&65535,f=(f/65536|0)+2*h*n+2*l*a+o*o,s[4]=f&65535,f=(f/65536|0)+2*h*i+2*l*n+2*o*a,s[5]=f&65535,f=(f/65536|0)+2*h*t+2*l*i+2*o*n+a*a,s[6]=f&65535,f=(f/65536|0)+2*h*r+2*l*t+2*o*i+2*a*n,s[7]=f&65535,f=(f/65536|0)+2*l*r+2*o*t+2*a*i+n*n,s[8]=f&65535,f=(f/65536|0)+2*o*r+2*a*t+2*n*i,s[9]=f&65535,f=(f/65536|0)+2*a*r+2*n*t+i*i,s[10]=f&65535,f=(f/65536|0)+2*n*r+2*i*t,s[11]=f&65535,f=(f/65536|0)+2*i*r+t*t,s[12]=f&65535,f=(f/65536|0)+2*t*r,s[13]=f&65535,f=(f/65536|0)+r*r,s[14]=f&65535,s[15]=f/65536|0,s}static sqr(r,t){let i=e.c255lsqr8h(t[15],t[14],t[13],t[12],t[11],t[10],t[9],t[8]),n=e.c255lsqr8h(t[7],t[6],t[5],t[4],t[3],t[2],t[1],t[0]),a=e.c255lsqr8h(t[15]+t[7],t[14]+t[6],t[13]+t[5],t[12]+t[4],t[11]+t[3],t[10]+t[2],t[9]+t[1],t[8]+t[0]),o;o=8388608+n[0]+(a[8]-i[8]-n[8]+i[0]-128)*38,r[0]=o&65535,o=8388480+(o/65536|0)+n[1]+(a[9]-i[9]-n[9]+i[1])*38,r[1]=o&65535,o=8388480+(o/65536|0)+n[2]+(a[10]-i[10]-n[10]+i[2])*38,r[2]=o&65535,o=8388480+(o/65536|0)+n[3]+(a[11]-i[11]-n[11]+i[3])*38,r[3]=o&65535,o=8388480+(o/65536|0)+n[4]+(a[12]-i[12]-n[12]+i[4])*38,r[4]=o&65535,o=8388480+(o/65536|0)+n[5]+(a[13]-i[13]-n[13]+i[5])*38,r[5]=o&65535,o=8388480+(o/65536|0)+n[6]+(a[14]-i[14]-n[14]+i[6])*38,r[6]=o&65535,o=8388480+(o/65536|0)+n[7]+(a[15]-i[15]-n[15]+i[7])*38,r[7]=o&65535,o=8388480+(o/65536|0)+n[8]+a[0]-i[0]-n[0]+i[8]*38,r[8]=o&65535,o=8388480+(o/65536|0)+n[9]+a[1]-i[1]-n[1]+i[9]*38,r[9]=o&65535,o=8388480+(o/65536|0)+n[10]+a[2]-i[2]-n[2]+i[10]*38,r[10]=o&65535,o=8388480+(o/65536|0)+n[11]+a[3]-i[3]-n[3]+i[11]*38,r[11]=o&65535,o=8388480+(o/65536|0)+n[12]+a[4]-i[4]-n[4]+i[12]*38,r[12]=o&65535,o=8388480+(o/65536|0)+n[13]+a[5]-i[5]-n[5]+i[13]*38,r[13]=o&65535,o=8388480+(o/65536|0)+n[14]+a[6]-i[6]-n[6]+i[14]*38,r[14]=o&65535;let l=8388480+(o/65536|0)+n[15]+a[7]-i[7]-n[7]+i[15]*38;e.c255lreduce(r,l)}static c255lmul8h(r,t,i,n,a,o,l,h,s,f,p,g,u,F,b,S){let k=[],v;return v=h*S,k[0]=v&65535,v=(v/65536|0)+h*b+l*S,k[1]=v&65535,v=(v/65536|0)+h*F+l*b+o*S,k[2]=v&65535,v=(v/65536|0)+h*u+l*F+o*b+a*S,k[3]=v&65535,v=(v/65536|0)+h*g+l*u+o*F+a*b+n*S,k[4]=v&65535,v=(v/65536|0)+h*p+l*g+o*u+a*F+n*b+i*S,k[5]=v&65535,v=(v/65536|0)+h*f+l*p+o*g+a*u+n*F+i*b+t*S,k[6]=v&65535,v=(v/65536|0)+h*s+l*f+o*p+a*g+n*u+i*F+t*b+r*S,k[7]=v&65535,v=(v/65536|0)+l*s+o*f+a*p+n*g+i*u+t*F+r*b,k[8]=v&65535,v=(v/65536|0)+o*s+a*f+n*p+i*g+t*u+r*F,k[9]=v&65535,v=(v/65536|0)+a*s+n*f+i*p+t*g+r*u,k[10]=v&65535,v=(v/65536|0)+n*s+i*f+t*p+r*g,k[11]=v&65535,v=(v/65536|0)+i*s+t*f+r*p,k[12]=v&65535,v=(v/65536|0)+t*s+r*f,k[13]=v&65535,v=(v/65536|0)+r*s,k[14]=v&65535,k[15]=v/65536|0,k}static mul(r,t,i){let n=e.c255lmul8h(t[15],t[14],t[13],t[12],t[11],t[10],t[9],t[8],i[15],i[14],i[13],i[12],i[11],i[10],i[9],i[8]),a=e.c255lmul8h(t[7],t[6],t[5],t[4],t[3],t[2],t[1],t[0],i[7],i[6],i[5],i[4],i[3],i[2],i[1],i[0]),o=e.c255lmul8h(t[15]+t[7],t[14]+t[6],t[13]+t[5],t[12]+t[4],t[11]+t[3],t[10]+t[2],t[9]+t[1],t[8]+t[0],i[15]+i[7],i[14]+i[6],i[13]+i[5],i[12]+i[4],i[11]+i[3],i[10]+i[2],i[9]+i[1],i[8]+i[0]),l;l=8388608+a[0]+(o[8]-n[8]-a[8]+n[0]-128)*38,r[0]=l&65535,l=8388480+(l/65536|0)+a[1]+(o[9]-n[9]-a[9]+n[1])*38,r[1]=l&65535,l=8388480+(l/65536|0)+a[2]+(o[10]-n[10]-a[10]+n[2])*38,r[2]=l&65535,l=8388480+(l/65536|0)+a[3]+(o[11]-n[11]-a[11]+n[3])*38,r[3]=l&65535,l=8388480+(l/65536|0)+a[4]+(o[12]-n[12]-a[12]+n[4])*38,r[4]=l&65535,l=8388480+(l/65536|0)+a[5]+(o[13]-n[13]-a[13]+n[5])*38,r[5]=l&65535,l=8388480+(l/65536|0)+a[6]+(o[14]-n[14]-a[14]+n[6])*38,r[6]=l&65535,l=8388480+(l/65536|0)+a[7]+(o[15]-n[15]-a[15]+n[7])*38,r[7]=l&65535,l=8388480+(l/65536|0)+a[8]+o[0]-n[0]-a[0]+n[8]*38,r[8]=l&65535,l=8388480+(l/65536|0)+a[9]+o[1]-n[1]-a[1]+n[9]*38,r[9]=l&65535,l=8388480+(l/65536|0)+a[10]+o[2]-n[2]-a[2]+n[10]*38,r[10]=l&65535,l=8388480+(l/65536|0)+a[11]+o[3]-n[3]-a[3]+n[11]*38,r[11]=l&65535,l=8388480+(l/65536|0)+a[12]+o[4]-n[4]-a[4]+n[12]*38,r[12]=l&65535,l=8388480+(l/65536|0)+a[13]+o[5]-n[5]-a[5]+n[13]*38,r[13]=l&65535,l=8388480+(l/65536|0)+a[14]+o[6]-n[6]-a[6]+n[14]*38,r[14]=l&65535;let h=8388480+(l/65536|0)+a[15]+o[7]-n[7]-a[7]+n[15]*38;e.c255lreduce(r,h)}static c255lreduce(r,t){let i=t;r[15]=i&32767,i=(i/32768|0)*19;for(let n=0;n<=14;++n)i+=r[n],r[n]=i&65535,i=i/65536|0;r[15]+=i}static add(r,t,i){let n;n=((t[15]/32768|0)+(i[15]/32768|0))*19+t[0]+i[0],r[0]=n&65535;for(let a=1;a<=14;++a)n=(n/65536|0)+t[a]+i[a],r[a]=n&65535;r[15]=(n/65536|0)+(t[15]&32767)+(i[15]&32767)}static sub(r,t,i){let n;n=524288+((t[15]/32768|0)-(i[15]/32768|0)-1)*19+t[0]-i[0],r[0]=n&65535;for(let a=1;a<=14;++a)n=(n/65536|0)+524280+t[a]-i[a],r[a]=n&65535;r[15]=(n/65536|0)+32760+(t[15]&32767)-(i[15]&32767)}static mul_small(r,t,i){let n;n=t[0]*i,r[0]=n&65535;for(let o=1;o<=14;++o)n=(n/65536|0)+t[o]*i,r[o]=n&65535;let a=(n/65536|0)+t[15]*i;e.c255lreduce(r,a)}static mont_prep(r,t,i,n){e.add(r,i,n),e.sub(t,i,n)}static mont_add(r,t,i,n,a,o,l){e.mul(a,t,i),e.mul(o,r,n),e.add(r,a,o),e.sub(t,a,o),e.sqr(a,r),e.sqr(r,t),e.mul(o,r,l)}static mont_dbl(r,t,i,n,a,o){e.sqr(r,i),e.sqr(t,n),e.mul(a,r,t),e.sub(t,r,t),e.mul_small(o,t,121665),e.add(r,r,o),e.mul(o,r,t)}static x_to_y2(r,t,i){e.sqr(r,i),e.mul_small(t,i,486662),e.add(r,r,t),e.add(r,r,e.C1),e.mul(t,r,i)}static core(r,t,i,n){let a=e.createUnpackedArray(),o=e.createUnpackedArray(),l=e.createUnpackedArray(),h=e.createUnpackedArray(),s=e.createUnpackedArray(),f=[e.createUnpackedArray(),e.createUnpackedArray()],p=[e.createUnpackedArray(),e.createUnpackedArray()],g,u;for(n!==null?e.unpack(a,n):e.set(a,9),e.set(f[0],1),e.set(p[0],0),e.cpy(f[1],a),e.set(p[1],1),g=32;g--!==0;)for(u=8;u--!==0;){let F=(i[g]&255)>>u&1,b=~(i[g]&255)>>u&1,S=f[b],k=p[b],v=f[F],U=p[F];e.mont_prep(o,l,S,k),e.mont_prep(h,s,v,U),e.mont_add(o,l,h,s,S,k,a),e.mont_dbl(o,l,h,s,v,U)}if(e.recip(o,p[0],0),e.mul(a,f[0],o),e.pack(a,r),t!==null){e.x_to_y2(l,o,a),e.recip(h,p[1],0),e.mul(l,f[1],h),e.add(l,l,a),e.add(l,l,e.C486671),e.sub(a,a,e.C9),e.sqr(h,a),e.mul(a,l,h),e.sub(a,a,o),e.sub(a,a,e.C39420360),e.mul(o,a,e.BASE_R2Y),e.is_negative(o)!==0?e.cpy32(t,i):e.mula_small(t,e.ORDER_TIMES_8,0,i,32,-1);let F=new Array(32),b=new Array(64),S=new Array(64);e.cpy32(F,e.ORDER),e.cpy32(t,e.egcd32(b,S,t,F)),t[31]&128&&e.mula_small(t,t,0,e.ORDER,32,1)}}};var oe=class{static sign(r,t,i){let n,a,o=new Array(32),l=new Array(32),h=new Array(64),s=new Array(64);E.cpy32(o,r),E.cpy32(l,t);let f=new Array(32);E.divmod(f,o,32,E.ORDER,32),E.divmod(f,l,32,E.ORDER,32);let p=new Array(32);for(E.mula_small(p,l,0,o,32,-1),E.mula_small(p,p,0,E.ORDER,32,1),E.mula32(h,p,i,32,1),E.divmod(s,h,64,E.ORDER,32),n=0,a=0;a<32;a++)n|=p[a]=h[a];return n!==0?p:void 0}static verify(r,t,i){let n=new Array(32),a=[E.createUnpackedArray(),E.createUnpackedArray()],o=[E.createUnpackedArray(),E.createUnpackedArray()],l=[E.createUnpackedArray(),E.createUnpackedArray(),E.createUnpackedArray()],h=[E.createUnpackedArray(),E.createUnpackedArray(),E.createUnpackedArray()],s=[E.createUnpackedArray(),E.createUnpackedArray(),E.createUnpackedArray()],f=[E.createUnpackedArray(),E.createUnpackedArray(),E.createUnpackedArray()],p=0,g=0,u=0,F=0,b,S,k;for(E.set(a[0],9),E.unpack(a[1],i),E.x_to_y2(s[0],f[0],a[1]),E.sqrt(s[0],f[0]),S=E.is_negative(s[0]),E.add(f[0],f[0],E.C39420360),E.mul(f[1],E.BASE_2Y,s[0]),E.sub(s[S],f[0],f[1]),E.add(s[1-S],f[0],f[1]),E.cpy(f[0],a[1]),E.sub(f[0],f[0],E.C9),E.sqr(f[1],f[0]),E.recip(f[0],f[1],0),E.mul(o[0],s[0],f[0]),E.sub(o[0],o[0],a[1]),E.sub(o[0],o[0],E.C486671),E.mul(o[1],s[1],f[0]),E.sub(o[1],o[1],a[1]),E.sub(o[1],o[1],E.C486671),E.mul_small(o[0],o[0],1),E.mul_small(o[1],o[1],1),b=0;b<32;b++)p=p>>8^r[b]&255^(r[b]&255)<<1,g=g>>8^t[b]&255^(t[b]&255)<<1,F=~(p^g),u=F&(u&128)>>7^p,u^=F&(u&1)<<1,u^=F&(u&2)<<1,u^=F&(u&4)<<1,u^=F&(u&8)<<1,u^=F&(u&16)<<1,u^=F&(u&32)<<1,u^=F&(u&64)<<1,n[b]=u&255;for(u=(F&(u&128)<<1^p)>>8,E.set(l[0],1),E.cpy(l[1],a[u]),E.cpy(l[2],o[0]),E.set(h[0],0),E.set(h[1],1),E.set(h[2],1),p=0,g=0,b=32;b--!==0;)for(p=p<<8|r[b]&255,g=g<<8|t[b]&255,u=u<<8|n[b]&255,S=8;S--!==0;)E.mont_prep(s[0],f[0],l[0],h[0]),E.mont_prep(s[1],f[1],l[1],h[1]),E.mont_prep(s[2],f[2],l[2],h[2]),k=((p^p>>1)>>S&1)+((g^g>>1)>>S&1),E.mont_dbl(l[2],h[2],s[k],f[k],l[0],h[0]),k=u>>S&2^(u>>S&1)<<1,E.mont_add(s[1],f[1],s[k],f[k],l[1],h[1],a[u>>S&1]),E.mont_add(s[2],f[2],s[0],f[0],l[2],h[2],o[((p^g)>>S&2)>>1]);k=(p&1)+(g&1),E.recip(s[0],h[k],0),E.mul(s[1],l[k],s[0]);let v=[];return E.pack(s[1],v),v}static keygen(r){let t=[],i=[];return r=r||[],E.clamp(r),E.core(t,i,r,null),{p:t,s:i,k:r}}static clamp(r){return E.clamp(r),r}static sharedkey(r,t){let i=[];return E.core(i,null,r,t),i}};var re={IvLength:16,SharedKeyLength:32};globalThis.Buffer=M.Buffer;async function E0(e,r,t){if(e.length<re.IvLength||e.length%re.IvLength!==0)throw new V("Invalid Ciphertext");let i=new Uint8Array(t.slice(0));for(let n=0;n<re.SharedKeyLength;n++)i[n]^=r[n];try{let n=q.adapter,a=n.sha256(i);return await n.decryptAes256Cbc(e,a)}catch(n){throw new V(n.message)}}async function dn(e,r,t){try{let i=oe.sharedkey(M.Buffer.from(t,"hex"),M.Buffer.from(r,"hex")),n=await E0(e.data,e.nonce,i);return(0,cn.inflate)(n)}catch(i){throw new V(i.message)}}async function A0(e,r,t){if(!e.isText)throw new V("Encrypted message is marked as non-text. Use decryptData instead");let i={data:new Uint8Array(M.Buffer.from(e.data,"hex")),nonce:new Uint8Array(M.Buffer.from(e.nonce,"hex"))},n=await dn(i,r,t);return M.Buffer.from(n).toString("utf-8")}var Xn=vt(Gn());function Dr(e){return q.adapter.getRandomValues(new Uint8Array(e))}function Nr(e,r){if(e>r.length)throw new Error("Too few words in dictionary");if(r.length>2**32)throw new Error("Dictionary must have less than 65536 words");let t=new Set,i=2**32-2**32%r.length,n=new Uint8Array(4),a=q.adapter;for(;t.size<e;){a.getRandomValues(n);let o=(n[0]<<24|n[1]<<16|n[2]<<8|n[3])>>>0,l=o%r.length;o<i&&t.add(o%r.length)}return Array.from(t).map(o=>r[o])}var Vn="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";function zo(e,r=Vn){if(r.length===0)throw new Error("Alphabet must not be empty.");let t=65536;if(r.length>=t)throw new Error(`Alphabet is too large. Alphabet must be less than ${t} characters long.`);let i=Math.floor(t/r.length)*r.length,n=q.adapter.getRandomValues(new Uint8Array(e*2)),a=new Uint16Array(n.buffer),o="";for(let l=0;l<e;l++){let h=a[l];for(;h>=i;){let s=q.adapter.getRandomValues(new Uint8Array(2));h=new Uint16Array(s.buffer)[0]}o+=r[h%r.length]}return o}async function Do(e,r,t){try{let i=new Uint8Array(t.slice(0));for(let o=0;o<re.SharedKeyLength;o++)i[o]^=r[o];let n=q.adapter,a=n.sha256(i);return await n.encryptAes256Cbc(e,a)}catch(i){throw new V(i.message)}}async function Jn(e,r,t){try{let i=oe.sharedkey(M.Buffer.from(t,"hex"),M.Buffer.from(r,"hex")),n=(0,Xn.deflate)(e),a=Dr(re.SharedKeyLength),o=await Do(n,a,i);return{nonce:a,data:o}}catch(i){throw new V(i.message)}}async function No(e,r,t){let i=new Uint8Array(M.Buffer.from(e,"utf-8")),n=await Jn(i,r,t);return{data:M.Buffer.from(n.data).toString("hex"),nonce:M.Buffer.from(n.nonce).toString("hex"),isText:!0}}var Or=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"];var Qn=(a=>(a[a.Bits_128=12]="Bits_128",a[a.Bits_160=15]="Bits_160",a[a.Bits_192=18]="Bits_192",a[a.Bits_224=21]="Bits_224",a[a.Bits_256=24]="Bits_256",a))(Qn||{});function Oo(e={strength:18,dictionary:Or}){let{strength:r=18,dictionary:t=Or}=e;if(t.length<1024)throw new Error("Dictionary too weak");return Nr(r.valueOf(),t).join(" ")}function qt(e,r){return q.adapter.sha256(M.Buffer.from(e,r))}function Lr(e,r="utf8"){return new Uint8Array(qt(e,r))}function Lo(e,r="utf8"){return M.Buffer.from(qt(e,r)).toString("hex")}function Mo(e,r="utf8"){return M.Buffer.from(qt(e,r)).toString("base64")}function Ue(e){let r=typeof e=="string"?M.Buffer.from(e,"hex"):e;return q.adapter.sha256(r)}function Zo(e){let r=[0];for(let t=0;t<e.length;t+=1){let i=parseInt(e.charAt(t),16);for(let n=0;n<r.length;n+=1)r[n]=r[n]*16+i,i=r[n]/10|0,r[n]%=10;for(;i>0;)r.push(i%10),i=i/10|0}return r.reverse().join("")}function Mr(e){return new Uint8Array(Buffer.from(e,"hex"))}function Pt(e,r){let t=new Uint8Array(e.length+r.length);return t.set(e),t.set(r,e.length),t}function qo(e){let r=Lr(e),t=oe.keygen(r);return{publicKey:Buffer.from(t.p).toString("hex"),signPrivateKey:Buffer.from(t.s).toString("hex"),agreementPrivateKey:Buffer.from(t.k).toString("hex")}}function Po(e){let t=Ue(e).slice(0,8).reverse();return Zo(Buffer.from(t).toString("hex"))}function Ho(e,r){let t=Ue(e),i=Mr(r),n=Pt(t,i),a=Ue(n),o=Buffer.from(oe.keygen(a).p),l=Pt(t,o),h=Ue(l),s=Buffer.from(oe.sign(h,a,i));return Buffer.from(Pt(s,h)).toString("hex")}function Ko(e,r,t){let i=Mr(e),n=Mr(t),a=i.slice(0,32),o=i.slice(32),l=Buffer.from(oe.verify(a,o,n)),h=Ue(r),s=Pt(h,l),f=Ue(s);if(o.length!==f.length)return!1;for(let p=0;p<o.length;p++)if(o[p]!==f[p])return!1;return!0}var jo=(e,r)=>e.substr(0,192)+r+e.substr(320);var ra=vt(ta()),wt=class{crypto;constructor(){if(typeof window<"u")this.crypto=window.crypto;else throw new Error("WebCryptoAdapter: Looks like you are not in a web environment...")}getRandomValues(r){return this.crypto.getRandomValues(r)}async getKey(r){return this.crypto.subtle.importKey("raw",r,"AES-CBC",!0,["encrypt","decrypt"])}async decryptAes256Cbc(r,t){let i=await this.getKey(t),n=r.slice(0,re.IvLength),a=await this.crypto.subtle.decrypt({name:"AES-CBC",iv:n},i,r.slice(re.IvLength));return new Uint8Array(a)}async encryptAes256Cbc(r,t){let i=await this.getKey(t),n=this.getRandomValues(new Uint8Array(re.IvLength)),a=await this.crypto.subtle.encrypt({name:"AES-CBC",iv:n},i,r),o=new Uint8Array(a),l=new Uint8Array(n.length+o.length);return l.set(n),l.set(o,n.length),l}sha256(r){return Uint8Array.from(ra.sha256.digest(r))}};q.init(new wt);return ha(Yo);})();
/*! Bundled license information:

ieee754/index.js:
  (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)

buffer/index.js:
  (*!
   * The buffer module from node.js, for the browser.
   *
   * @author   Feross Aboukhadijeh <https://feross.org>
   * @license  MIT
   *)

js-sha256/src/sha256.js:
  (**
   * [js-sha256]{@link https://github.com/emn178/js-sha256}
   *
   * @version 0.11.0
   * @author Chen, Yi-Cyuan [emn178@gmail.com]
   * @copyright Chen, Yi-Cyuan 2014-2024
   * @license MIT
   *)
*/
//# sourceMappingURL=signumjs.crypto.min.js.map