supra-l1-sdk-core
Version:
Core of the Supra-L1-SDK
1 lines • 92.9 kB
JavaScript
"use strict";var supra_l1_sdk_core=(()=>{var as=Object.create;var Ur=Object.defineProperty;var bi=Object.getOwnPropertyDescriptor;var fs=Object.getOwnPropertyNames;var cs=Object.getPrototypeOf,ls=Object.prototype.hasOwnProperty;var gi=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var mi=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Fr=(n,e)=>{for(var t in e)Ur(n,t,{get:e[t],enumerable:!0})},wi=(n,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of fs(e))!ls.call(n,c)&&c!==t&&Ur(n,c,{get:()=>e[c],enumerable:!(s=bi(e,c))||s.enumerable});return n};var Ai=(n,e,t)=>(t=n!=null?as(cs(n)):{},wi(e||!n||!n.__esModule?Ur(t,"default",{value:n,enumerable:!0}):t,n)),us=n=>wi(Ur({},"__esModule",{value:!0}),n),Re=(n,e,t,s)=>{for(var c=s>1?void 0:s?bi(e,t):e,u=n.length-1,d;u>=0;u--)(d=n[u])&&(c=(s?d(e,t,c):d(c))||c);return s&&c&&Ur(e,t,c),c};var Si=mi(()=>{"use strict"});var zn=mi((Mo,kr)=>{"use strict";(function(n){"use strict";var e=function(i){var a,o=new Float64Array(16);if(i)for(a=0;a<i.length;a++)o[a]=i[a];return o},t=function(){throw new Error("no PRNG")},s=new Uint8Array(16),c=new Uint8Array(32);c[0]=9;var u=e(),d=e([1]),b=e([56129,1]),_=e([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),B=e([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),Y=e([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),H=e([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),C=e([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function ne(i,a,o,r){i[a]=o>>24&255,i[a+1]=o>>16&255,i[a+2]=o>>8&255,i[a+3]=o&255,i[a+4]=r>>24&255,i[a+5]=r>>16&255,i[a+6]=r>>8&255,i[a+7]=r&255}function fe(i,a,o,r,f){var x,h=0;for(x=0;x<f;x++)h|=i[a+x]^o[r+x];return(1&h-1>>>8)-1}function de(i,a,o,r){return fe(i,a,o,r,16)}function we(i,a,o,r){return fe(i,a,o,r,32)}function Be(i,a,o,r){for(var f=r[0]&255|(r[1]&255)<<8|(r[2]&255)<<16|(r[3]&255)<<24,x=o[0]&255|(o[1]&255)<<8|(o[2]&255)<<16|(o[3]&255)<<24,h=o[4]&255|(o[5]&255)<<8|(o[6]&255)<<16|(o[7]&255)<<24,m=o[8]&255|(o[9]&255)<<8|(o[10]&255)<<16|(o[11]&255)<<24,U=o[12]&255|(o[13]&255)<<8|(o[14]&255)<<16|(o[15]&255)<<24,P=r[4]&255|(r[5]&255)<<8|(r[6]&255)<<16|(r[7]&255)<<24,T=a[0]&255|(a[1]&255)<<8|(a[2]&255)<<16|(a[3]&255)<<24,ie=a[4]&255|(a[5]&255)<<8|(a[6]&255)<<16|(a[7]&255)<<24,E=a[8]&255|(a[9]&255)<<8|(a[10]&255)<<16|(a[11]&255)<<24,R=a[12]&255|(a[13]&255)<<8|(a[14]&255)<<16|(a[15]&255)<<24,O=r[8]&255|(r[9]&255)<<8|(r[10]&255)<<16|(r[11]&255)<<24,j=o[16]&255|(o[17]&255)<<8|(o[18]&255)<<16|(o[19]&255)<<24,G=o[20]&255|(o[21]&255)<<8|(o[22]&255)<<16|(o[23]&255)<<24,F=o[24]&255|(o[25]&255)<<8|(o[26]&255)<<16|(o[27]&255)<<24,K=o[28]&255|(o[29]&255)<<8|(o[30]&255)<<16|(o[31]&255)<<24,k=r[12]&255|(r[13]&255)<<8|(r[14]&255)<<16|(r[15]&255)<<24,I=f,L=x,v=h,M=m,D=U,z=P,p=T,y=ie,A=E,g=R,w=O,S=j,N=G,q=F,X=K,$=k,l,J=0;J<20;J+=2)l=I+N|0,D^=l<<7|l>>>25,l=D+I|0,A^=l<<9|l>>>23,l=A+D|0,N^=l<<13|l>>>19,l=N+A|0,I^=l<<18|l>>>14,l=z+L|0,g^=l<<7|l>>>25,l=g+z|0,q^=l<<9|l>>>23,l=q+g|0,L^=l<<13|l>>>19,l=L+q|0,z^=l<<18|l>>>14,l=w+p|0,X^=l<<7|l>>>25,l=X+w|0,v^=l<<9|l>>>23,l=v+X|0,p^=l<<13|l>>>19,l=p+v|0,w^=l<<18|l>>>14,l=$+S|0,M^=l<<7|l>>>25,l=M+$|0,y^=l<<9|l>>>23,l=y+M|0,S^=l<<13|l>>>19,l=S+y|0,$^=l<<18|l>>>14,l=I+M|0,L^=l<<7|l>>>25,l=L+I|0,v^=l<<9|l>>>23,l=v+L|0,M^=l<<13|l>>>19,l=M+v|0,I^=l<<18|l>>>14,l=z+D|0,p^=l<<7|l>>>25,l=p+z|0,y^=l<<9|l>>>23,l=y+p|0,D^=l<<13|l>>>19,l=D+y|0,z^=l<<18|l>>>14,l=w+g|0,S^=l<<7|l>>>25,l=S+w|0,A^=l<<9|l>>>23,l=A+S|0,g^=l<<13|l>>>19,l=g+A|0,w^=l<<18|l>>>14,l=$+X|0,N^=l<<7|l>>>25,l=N+$|0,q^=l<<9|l>>>23,l=q+N|0,X^=l<<13|l>>>19,l=X+q|0,$^=l<<18|l>>>14;I=I+f|0,L=L+x|0,v=v+h|0,M=M+m|0,D=D+U|0,z=z+P|0,p=p+T|0,y=y+ie|0,A=A+E|0,g=g+R|0,w=w+O|0,S=S+j|0,N=N+G|0,q=q+F|0,X=X+K|0,$=$+k|0,i[0]=I>>>0&255,i[1]=I>>>8&255,i[2]=I>>>16&255,i[3]=I>>>24&255,i[4]=L>>>0&255,i[5]=L>>>8&255,i[6]=L>>>16&255,i[7]=L>>>24&255,i[8]=v>>>0&255,i[9]=v>>>8&255,i[10]=v>>>16&255,i[11]=v>>>24&255,i[12]=M>>>0&255,i[13]=M>>>8&255,i[14]=M>>>16&255,i[15]=M>>>24&255,i[16]=D>>>0&255,i[17]=D>>>8&255,i[18]=D>>>16&255,i[19]=D>>>24&255,i[20]=z>>>0&255,i[21]=z>>>8&255,i[22]=z>>>16&255,i[23]=z>>>24&255,i[24]=p>>>0&255,i[25]=p>>>8&255,i[26]=p>>>16&255,i[27]=p>>>24&255,i[28]=y>>>0&255,i[29]=y>>>8&255,i[30]=y>>>16&255,i[31]=y>>>24&255,i[32]=A>>>0&255,i[33]=A>>>8&255,i[34]=A>>>16&255,i[35]=A>>>24&255,i[36]=g>>>0&255,i[37]=g>>>8&255,i[38]=g>>>16&255,i[39]=g>>>24&255,i[40]=w>>>0&255,i[41]=w>>>8&255,i[42]=w>>>16&255,i[43]=w>>>24&255,i[44]=S>>>0&255,i[45]=S>>>8&255,i[46]=S>>>16&255,i[47]=S>>>24&255,i[48]=N>>>0&255,i[49]=N>>>8&255,i[50]=N>>>16&255,i[51]=N>>>24&255,i[52]=q>>>0&255,i[53]=q>>>8&255,i[54]=q>>>16&255,i[55]=q>>>24&255,i[56]=X>>>0&255,i[57]=X>>>8&255,i[58]=X>>>16&255,i[59]=X>>>24&255,i[60]=$>>>0&255,i[61]=$>>>8&255,i[62]=$>>>16&255,i[63]=$>>>24&255}function $e(i,a,o,r){for(var f=r[0]&255|(r[1]&255)<<8|(r[2]&255)<<16|(r[3]&255)<<24,x=o[0]&255|(o[1]&255)<<8|(o[2]&255)<<16|(o[3]&255)<<24,h=o[4]&255|(o[5]&255)<<8|(o[6]&255)<<16|(o[7]&255)<<24,m=o[8]&255|(o[9]&255)<<8|(o[10]&255)<<16|(o[11]&255)<<24,U=o[12]&255|(o[13]&255)<<8|(o[14]&255)<<16|(o[15]&255)<<24,P=r[4]&255|(r[5]&255)<<8|(r[6]&255)<<16|(r[7]&255)<<24,T=a[0]&255|(a[1]&255)<<8|(a[2]&255)<<16|(a[3]&255)<<24,ie=a[4]&255|(a[5]&255)<<8|(a[6]&255)<<16|(a[7]&255)<<24,E=a[8]&255|(a[9]&255)<<8|(a[10]&255)<<16|(a[11]&255)<<24,R=a[12]&255|(a[13]&255)<<8|(a[14]&255)<<16|(a[15]&255)<<24,O=r[8]&255|(r[9]&255)<<8|(r[10]&255)<<16|(r[11]&255)<<24,j=o[16]&255|(o[17]&255)<<8|(o[18]&255)<<16|(o[19]&255)<<24,G=o[20]&255|(o[21]&255)<<8|(o[22]&255)<<16|(o[23]&255)<<24,F=o[24]&255|(o[25]&255)<<8|(o[26]&255)<<16|(o[27]&255)<<24,K=o[28]&255|(o[29]&255)<<8|(o[30]&255)<<16|(o[31]&255)<<24,k=r[12]&255|(r[13]&255)<<8|(r[14]&255)<<16|(r[15]&255)<<24,I=f,L=x,v=h,M=m,D=U,z=P,p=T,y=ie,A=E,g=R,w=O,S=j,N=G,q=F,X=K,$=k,l,J=0;J<20;J+=2)l=I+N|0,D^=l<<7|l>>>25,l=D+I|0,A^=l<<9|l>>>23,l=A+D|0,N^=l<<13|l>>>19,l=N+A|0,I^=l<<18|l>>>14,l=z+L|0,g^=l<<7|l>>>25,l=g+z|0,q^=l<<9|l>>>23,l=q+g|0,L^=l<<13|l>>>19,l=L+q|0,z^=l<<18|l>>>14,l=w+p|0,X^=l<<7|l>>>25,l=X+w|0,v^=l<<9|l>>>23,l=v+X|0,p^=l<<13|l>>>19,l=p+v|0,w^=l<<18|l>>>14,l=$+S|0,M^=l<<7|l>>>25,l=M+$|0,y^=l<<9|l>>>23,l=y+M|0,S^=l<<13|l>>>19,l=S+y|0,$^=l<<18|l>>>14,l=I+M|0,L^=l<<7|l>>>25,l=L+I|0,v^=l<<9|l>>>23,l=v+L|0,M^=l<<13|l>>>19,l=M+v|0,I^=l<<18|l>>>14,l=z+D|0,p^=l<<7|l>>>25,l=p+z|0,y^=l<<9|l>>>23,l=y+p|0,D^=l<<13|l>>>19,l=D+y|0,z^=l<<18|l>>>14,l=w+g|0,S^=l<<7|l>>>25,l=S+w|0,A^=l<<9|l>>>23,l=A+S|0,g^=l<<13|l>>>19,l=g+A|0,w^=l<<18|l>>>14,l=$+X|0,N^=l<<7|l>>>25,l=N+$|0,q^=l<<9|l>>>23,l=q+N|0,X^=l<<13|l>>>19,l=X+q|0,$^=l<<18|l>>>14;i[0]=I>>>0&255,i[1]=I>>>8&255,i[2]=I>>>16&255,i[3]=I>>>24&255,i[4]=z>>>0&255,i[5]=z>>>8&255,i[6]=z>>>16&255,i[7]=z>>>24&255,i[8]=w>>>0&255,i[9]=w>>>8&255,i[10]=w>>>16&255,i[11]=w>>>24&255,i[12]=$>>>0&255,i[13]=$>>>8&255,i[14]=$>>>16&255,i[15]=$>>>24&255,i[16]=p>>>0&255,i[17]=p>>>8&255,i[18]=p>>>16&255,i[19]=p>>>24&255,i[20]=y>>>0&255,i[21]=y>>>8&255,i[22]=y>>>16&255,i[23]=y>>>24&255,i[24]=A>>>0&255,i[25]=A>>>8&255,i[26]=A>>>16&255,i[27]=A>>>24&255,i[28]=g>>>0&255,i[29]=g>>>8&255,i[30]=g>>>16&255,i[31]=g>>>24&255}function ce(i,a,o,r){Be(i,a,o,r)}function ye(i,a,o,r){$e(i,a,o,r)}var W=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function Ot(i,a,o,r,f,x,h){var m=new Uint8Array(16),U=new Uint8Array(64),P,T;for(T=0;T<16;T++)m[T]=0;for(T=0;T<8;T++)m[T]=x[T];for(;f>=64;){for(ce(U,m,h,W),T=0;T<64;T++)i[a+T]=o[r+T]^U[T];for(P=1,T=8;T<16;T++)P=P+(m[T]&255)|0,m[T]=P&255,P>>>=8;f-=64,a+=64,r+=64}if(f>0)for(ce(U,m,h,W),T=0;T<f;T++)i[a+T]=o[r+T]^U[T];return 0}function Ft(i,a,o,r,f){var x=new Uint8Array(16),h=new Uint8Array(64),m,U;for(U=0;U<16;U++)x[U]=0;for(U=0;U<8;U++)x[U]=r[U];for(;o>=64;){for(ce(h,x,f,W),U=0;U<64;U++)i[a+U]=h[U];for(m=1,U=8;U<16;U++)m=m+(x[U]&255)|0,x[U]=m&255,m>>>=8;o-=64,a+=64}if(o>0)for(ce(h,x,f,W),U=0;U<o;U++)i[a+U]=h[U];return 0}function Pe(i,a,o,r,f){var x=new Uint8Array(32);ye(x,r,f,W);for(var h=new Uint8Array(8),m=0;m<8;m++)h[m]=r[m+16];return Ft(i,a,o,h,x)}function Ie(i,a,o,r,f,x,h){var m=new Uint8Array(32);ye(m,x,h,W);for(var U=new Uint8Array(8),P=0;P<8;P++)U[P]=x[P+16];return Ot(i,a,o,r,f,U,m)}var Ye=function(i){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var a,o,r,f,x,h,m,U;a=i[0]&255|(i[1]&255)<<8,this.r[0]=a&8191,o=i[2]&255|(i[3]&255)<<8,this.r[1]=(a>>>13|o<<3)&8191,r=i[4]&255|(i[5]&255)<<8,this.r[2]=(o>>>10|r<<6)&7939,f=i[6]&255|(i[7]&255)<<8,this.r[3]=(r>>>7|f<<9)&8191,x=i[8]&255|(i[9]&255)<<8,this.r[4]=(f>>>4|x<<12)&255,this.r[5]=x>>>1&8190,h=i[10]&255|(i[11]&255)<<8,this.r[6]=(x>>>14|h<<2)&8191,m=i[12]&255|(i[13]&255)<<8,this.r[7]=(h>>>11|m<<5)&8065,U=i[14]&255|(i[15]&255)<<8,this.r[8]=(m>>>8|U<<8)&8191,this.r[9]=U>>>5&127,this.pad[0]=i[16]&255|(i[17]&255)<<8,this.pad[1]=i[18]&255|(i[19]&255)<<8,this.pad[2]=i[20]&255|(i[21]&255)<<8,this.pad[3]=i[22]&255|(i[23]&255)<<8,this.pad[4]=i[24]&255|(i[25]&255)<<8,this.pad[5]=i[26]&255|(i[27]&255)<<8,this.pad[6]=i[28]&255|(i[29]&255)<<8,this.pad[7]=i[30]&255|(i[31]&255)<<8};Ye.prototype.blocks=function(i,a,o){for(var r=this.fin?0:2048,f,x,h,m,U,P,T,ie,E,R,O,j,G,F,K,k,I,L,v,M=this.h[0],D=this.h[1],z=this.h[2],p=this.h[3],y=this.h[4],A=this.h[5],g=this.h[6],w=this.h[7],S=this.h[8],N=this.h[9],q=this.r[0],X=this.r[1],$=this.r[2],l=this.r[3],J=this.r[4],se=this.r[5],oe=this.r[6],Z=this.r[7],te=this.r[8],re=this.r[9];o>=16;)f=i[a+0]&255|(i[a+1]&255)<<8,M+=f&8191,x=i[a+2]&255|(i[a+3]&255)<<8,D+=(f>>>13|x<<3)&8191,h=i[a+4]&255|(i[a+5]&255)<<8,z+=(x>>>10|h<<6)&8191,m=i[a+6]&255|(i[a+7]&255)<<8,p+=(h>>>7|m<<9)&8191,U=i[a+8]&255|(i[a+9]&255)<<8,y+=(m>>>4|U<<12)&8191,A+=U>>>1&8191,P=i[a+10]&255|(i[a+11]&255)<<8,g+=(U>>>14|P<<2)&8191,T=i[a+12]&255|(i[a+13]&255)<<8,w+=(P>>>11|T<<5)&8191,ie=i[a+14]&255|(i[a+15]&255)<<8,S+=(T>>>8|ie<<8)&8191,N+=ie>>>5|r,E=0,R=E,R+=M*q,R+=D*(5*re),R+=z*(5*te),R+=p*(5*Z),R+=y*(5*oe),E=R>>>13,R&=8191,R+=A*(5*se),R+=g*(5*J),R+=w*(5*l),R+=S*(5*$),R+=N*(5*X),E+=R>>>13,R&=8191,O=E,O+=M*X,O+=D*q,O+=z*(5*re),O+=p*(5*te),O+=y*(5*Z),E=O>>>13,O&=8191,O+=A*(5*oe),O+=g*(5*se),O+=w*(5*J),O+=S*(5*l),O+=N*(5*$),E+=O>>>13,O&=8191,j=E,j+=M*$,j+=D*X,j+=z*q,j+=p*(5*re),j+=y*(5*te),E=j>>>13,j&=8191,j+=A*(5*Z),j+=g*(5*oe),j+=w*(5*se),j+=S*(5*J),j+=N*(5*l),E+=j>>>13,j&=8191,G=E,G+=M*l,G+=D*$,G+=z*X,G+=p*q,G+=y*(5*re),E=G>>>13,G&=8191,G+=A*(5*te),G+=g*(5*Z),G+=w*(5*oe),G+=S*(5*se),G+=N*(5*J),E+=G>>>13,G&=8191,F=E,F+=M*J,F+=D*l,F+=z*$,F+=p*X,F+=y*q,E=F>>>13,F&=8191,F+=A*(5*re),F+=g*(5*te),F+=w*(5*Z),F+=S*(5*oe),F+=N*(5*se),E+=F>>>13,F&=8191,K=E,K+=M*se,K+=D*J,K+=z*l,K+=p*$,K+=y*X,E=K>>>13,K&=8191,K+=A*q,K+=g*(5*re),K+=w*(5*te),K+=S*(5*Z),K+=N*(5*oe),E+=K>>>13,K&=8191,k=E,k+=M*oe,k+=D*se,k+=z*J,k+=p*l,k+=y*$,E=k>>>13,k&=8191,k+=A*X,k+=g*q,k+=w*(5*re),k+=S*(5*te),k+=N*(5*Z),E+=k>>>13,k&=8191,I=E,I+=M*Z,I+=D*oe,I+=z*se,I+=p*J,I+=y*l,E=I>>>13,I&=8191,I+=A*$,I+=g*X,I+=w*q,I+=S*(5*re),I+=N*(5*te),E+=I>>>13,I&=8191,L=E,L+=M*te,L+=D*Z,L+=z*oe,L+=p*se,L+=y*J,E=L>>>13,L&=8191,L+=A*l,L+=g*$,L+=w*X,L+=S*q,L+=N*(5*re),E+=L>>>13,L&=8191,v=E,v+=M*re,v+=D*te,v+=z*Z,v+=p*oe,v+=y*se,E=v>>>13,v&=8191,v+=A*J,v+=g*l,v+=w*$,v+=S*X,v+=N*q,E+=v>>>13,v&=8191,E=(E<<2)+E|0,E=E+R|0,R=E&8191,E=E>>>13,O+=E,M=R,D=O,z=j,p=G,y=F,A=K,g=k,w=I,S=L,N=v,a+=16,o-=16;this.h[0]=M,this.h[1]=D,this.h[2]=z,this.h[3]=p,this.h[4]=y,this.h[5]=A,this.h[6]=g,this.h[7]=w,this.h[8]=S,this.h[9]=N},Ye.prototype.finish=function(i,a){var o=new Uint16Array(10),r,f,x,h;if(this.leftover){for(h=this.leftover,this.buffer[h++]=1;h<16;h++)this.buffer[h]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,h=2;h<10;h++)this.h[h]+=r,r=this.h[h]>>>13,this.h[h]&=8191;for(this.h[0]+=r*5,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,o[0]=this.h[0]+5,r=o[0]>>>13,o[0]&=8191,h=1;h<10;h++)o[h]=this.h[h]+r,r=o[h]>>>13,o[h]&=8191;for(o[9]-=8192,f=(r^1)-1,h=0;h<10;h++)o[h]&=f;for(f=~f,h=0;h<10;h++)this.h[h]=this.h[h]&f|o[h];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,x=this.h[0]+this.pad[0],this.h[0]=x&65535,h=1;h<8;h++)x=(this.h[h]+this.pad[h]|0)+(x>>>16)|0,this.h[h]=x&65535;i[a+0]=this.h[0]>>>0&255,i[a+1]=this.h[0]>>>8&255,i[a+2]=this.h[1]>>>0&255,i[a+3]=this.h[1]>>>8&255,i[a+4]=this.h[2]>>>0&255,i[a+5]=this.h[2]>>>8&255,i[a+6]=this.h[3]>>>0&255,i[a+7]=this.h[3]>>>8&255,i[a+8]=this.h[4]>>>0&255,i[a+9]=this.h[4]>>>8&255,i[a+10]=this.h[5]>>>0&255,i[a+11]=this.h[5]>>>8&255,i[a+12]=this.h[6]>>>0&255,i[a+13]=this.h[6]>>>8&255,i[a+14]=this.h[7]>>>0&255,i[a+15]=this.h[7]>>>8&255},Ye.prototype.update=function(i,a,o){var r,f;if(this.leftover){for(f=16-this.leftover,f>o&&(f=o),r=0;r<f;r++)this.buffer[this.leftover+r]=i[a+r];if(o-=f,a+=f,this.leftover+=f,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(o>=16&&(f=o-o%16,this.blocks(i,a,f),a+=f,o-=f),o){for(r=0;r<o;r++)this.buffer[this.leftover+r]=i[a+r];this.leftover+=o}};function Ut(i,a,o,r,f,x){var h=new Ye(x);return h.update(o,r,f),h.finish(i,a),0}function _t(i,a,o,r,f,x){var h=new Uint8Array(16);return Ut(h,0,o,r,f,x),de(i,a,h,0)}function zt(i,a,o,r,f){var x;if(o<32)return-1;for(Ie(i,0,a,0,o,r,f),Ut(i,16,i,32,o-32,i),x=0;x<16;x++)i[x]=0;return 0}function gr(i,a,o,r,f){var x,h=new Uint8Array(32);if(o<32||(Pe(h,0,32,r,f),_t(a,16,a,32,o-32,h)!==0))return-1;for(Ie(i,0,a,0,o,r,f),x=0;x<32;x++)i[x]=0;return 0}function Le(i,a){var o;for(o=0;o<16;o++)i[o]=a[o]|0}function xn(i){var a,o,r=1;for(a=0;a<16;a++)o=i[a]+r+65535,r=Math.floor(o/65536),i[a]=o-r*65536;i[0]+=r-1+37*(r-1)}function kt(i,a,o){for(var r,f=~(o-1),x=0;x<16;x++)r=f&(i[x]^a[x]),i[x]^=r,a[x]^=r}function Ct(i,a){var o,r,f,x=e(),h=e();for(o=0;o<16;o++)h[o]=a[o];for(xn(h),xn(h),xn(h),r=0;r<2;r++){for(x[0]=h[0]-65517,o=1;o<15;o++)x[o]=h[o]-65535-(x[o-1]>>16&1),x[o-1]&=65535;x[15]=h[15]-32767-(x[14]>>16&1),f=x[15]>>16&1,x[14]&=65535,kt(h,x,1-f)}for(o=0;o<16;o++)i[2*o]=h[o]&255,i[2*o+1]=h[o]>>8}function ii(i,a){var o=new Uint8Array(32),r=new Uint8Array(32);return Ct(o,i),Ct(r,a),we(o,0,r,0)}function si(i){var a=new Uint8Array(32);return Ct(a,i),a[0]&1}function hn(i,a){var o;for(o=0;o<16;o++)i[o]=a[2*o]+(a[2*o+1]<<8);i[15]&=32767}function Oe(i,a,o){for(var r=0;r<16;r++)i[r]=a[r]+o[r]}function Fe(i,a,o){for(var r=0;r<16;r++)i[r]=a[r]-o[r]}function Q(i,a,o){var r,f,x=0,h=0,m=0,U=0,P=0,T=0,ie=0,E=0,R=0,O=0,j=0,G=0,F=0,K=0,k=0,I=0,L=0,v=0,M=0,D=0,z=0,p=0,y=0,A=0,g=0,w=0,S=0,N=0,q=0,X=0,$=0,l=o[0],J=o[1],se=o[2],oe=o[3],Z=o[4],te=o[5],re=o[6],be=o[7],le=o[8],xe=o[9],he=o[10],pe=o[11],Ae=o[12],ze=o[13],Te=o[14],ve=o[15];r=a[0],x+=r*l,h+=r*J,m+=r*se,U+=r*oe,P+=r*Z,T+=r*te,ie+=r*re,E+=r*be,R+=r*le,O+=r*xe,j+=r*he,G+=r*pe,F+=r*Ae,K+=r*ze,k+=r*Te,I+=r*ve,r=a[1],h+=r*l,m+=r*J,U+=r*se,P+=r*oe,T+=r*Z,ie+=r*te,E+=r*re,R+=r*be,O+=r*le,j+=r*xe,G+=r*he,F+=r*pe,K+=r*Ae,k+=r*ze,I+=r*Te,L+=r*ve,r=a[2],m+=r*l,U+=r*J,P+=r*se,T+=r*oe,ie+=r*Z,E+=r*te,R+=r*re,O+=r*be,j+=r*le,G+=r*xe,F+=r*he,K+=r*pe,k+=r*Ae,I+=r*ze,L+=r*Te,v+=r*ve,r=a[3],U+=r*l,P+=r*J,T+=r*se,ie+=r*oe,E+=r*Z,R+=r*te,O+=r*re,j+=r*be,G+=r*le,F+=r*xe,K+=r*he,k+=r*pe,I+=r*Ae,L+=r*ze,v+=r*Te,M+=r*ve,r=a[4],P+=r*l,T+=r*J,ie+=r*se,E+=r*oe,R+=r*Z,O+=r*te,j+=r*re,G+=r*be,F+=r*le,K+=r*xe,k+=r*he,I+=r*pe,L+=r*Ae,v+=r*ze,M+=r*Te,D+=r*ve,r=a[5],T+=r*l,ie+=r*J,E+=r*se,R+=r*oe,O+=r*Z,j+=r*te,G+=r*re,F+=r*be,K+=r*le,k+=r*xe,I+=r*he,L+=r*pe,v+=r*Ae,M+=r*ze,D+=r*Te,z+=r*ve,r=a[6],ie+=r*l,E+=r*J,R+=r*se,O+=r*oe,j+=r*Z,G+=r*te,F+=r*re,K+=r*be,k+=r*le,I+=r*xe,L+=r*he,v+=r*pe,M+=r*Ae,D+=r*ze,z+=r*Te,p+=r*ve,r=a[7],E+=r*l,R+=r*J,O+=r*se,j+=r*oe,G+=r*Z,F+=r*te,K+=r*re,k+=r*be,I+=r*le,L+=r*xe,v+=r*he,M+=r*pe,D+=r*Ae,z+=r*ze,p+=r*Te,y+=r*ve,r=a[8],R+=r*l,O+=r*J,j+=r*se,G+=r*oe,F+=r*Z,K+=r*te,k+=r*re,I+=r*be,L+=r*le,v+=r*xe,M+=r*he,D+=r*pe,z+=r*Ae,p+=r*ze,y+=r*Te,A+=r*ve,r=a[9],O+=r*l,j+=r*J,G+=r*se,F+=r*oe,K+=r*Z,k+=r*te,I+=r*re,L+=r*be,v+=r*le,M+=r*xe,D+=r*he,z+=r*pe,p+=r*Ae,y+=r*ze,A+=r*Te,g+=r*ve,r=a[10],j+=r*l,G+=r*J,F+=r*se,K+=r*oe,k+=r*Z,I+=r*te,L+=r*re,v+=r*be,M+=r*le,D+=r*xe,z+=r*he,p+=r*pe,y+=r*Ae,A+=r*ze,g+=r*Te,w+=r*ve,r=a[11],G+=r*l,F+=r*J,K+=r*se,k+=r*oe,I+=r*Z,L+=r*te,v+=r*re,M+=r*be,D+=r*le,z+=r*xe,p+=r*he,y+=r*pe,A+=r*Ae,g+=r*ze,w+=r*Te,S+=r*ve,r=a[12],F+=r*l,K+=r*J,k+=r*se,I+=r*oe,L+=r*Z,v+=r*te,M+=r*re,D+=r*be,z+=r*le,p+=r*xe,y+=r*he,A+=r*pe,g+=r*Ae,w+=r*ze,S+=r*Te,N+=r*ve,r=a[13],K+=r*l,k+=r*J,I+=r*se,L+=r*oe,v+=r*Z,M+=r*te,D+=r*re,z+=r*be,p+=r*le,y+=r*xe,A+=r*he,g+=r*pe,w+=r*Ae,S+=r*ze,N+=r*Te,q+=r*ve,r=a[14],k+=r*l,I+=r*J,L+=r*se,v+=r*oe,M+=r*Z,D+=r*te,z+=r*re,p+=r*be,y+=r*le,A+=r*xe,g+=r*he,w+=r*pe,S+=r*Ae,N+=r*ze,q+=r*Te,X+=r*ve,r=a[15],I+=r*l,L+=r*J,v+=r*se,M+=r*oe,D+=r*Z,z+=r*te,p+=r*re,y+=r*be,A+=r*le,g+=r*xe,w+=r*he,S+=r*pe,N+=r*Ae,q+=r*ze,X+=r*Te,$+=r*ve,x+=38*L,h+=38*v,m+=38*M,U+=38*D,P+=38*z,T+=38*p,ie+=38*y,E+=38*A,R+=38*g,O+=38*w,j+=38*S,G+=38*N,F+=38*q,K+=38*X,k+=38*$,f=1,r=x+f+65535,f=Math.floor(r/65536),x=r-f*65536,r=h+f+65535,f=Math.floor(r/65536),h=r-f*65536,r=m+f+65535,f=Math.floor(r/65536),m=r-f*65536,r=U+f+65535,f=Math.floor(r/65536),U=r-f*65536,r=P+f+65535,f=Math.floor(r/65536),P=r-f*65536,r=T+f+65535,f=Math.floor(r/65536),T=r-f*65536,r=ie+f+65535,f=Math.floor(r/65536),ie=r-f*65536,r=E+f+65535,f=Math.floor(r/65536),E=r-f*65536,r=R+f+65535,f=Math.floor(r/65536),R=r-f*65536,r=O+f+65535,f=Math.floor(r/65536),O=r-f*65536,r=j+f+65535,f=Math.floor(r/65536),j=r-f*65536,r=G+f+65535,f=Math.floor(r/65536),G=r-f*65536,r=F+f+65535,f=Math.floor(r/65536),F=r-f*65536,r=K+f+65535,f=Math.floor(r/65536),K=r-f*65536,r=k+f+65535,f=Math.floor(r/65536),k=r-f*65536,r=I+f+65535,f=Math.floor(r/65536),I=r-f*65536,x+=f-1+37*(f-1),f=1,r=x+f+65535,f=Math.floor(r/65536),x=r-f*65536,r=h+f+65535,f=Math.floor(r/65536),h=r-f*65536,r=m+f+65535,f=Math.floor(r/65536),m=r-f*65536,r=U+f+65535,f=Math.floor(r/65536),U=r-f*65536,r=P+f+65535,f=Math.floor(r/65536),P=r-f*65536,r=T+f+65535,f=Math.floor(r/65536),T=r-f*65536,r=ie+f+65535,f=Math.floor(r/65536),ie=r-f*65536,r=E+f+65535,f=Math.floor(r/65536),E=r-f*65536,r=R+f+65535,f=Math.floor(r/65536),R=r-f*65536,r=O+f+65535,f=Math.floor(r/65536),O=r-f*65536,r=j+f+65535,f=Math.floor(r/65536),j=r-f*65536,r=G+f+65535,f=Math.floor(r/65536),G=r-f*65536,r=F+f+65535,f=Math.floor(r/65536),F=r-f*65536,r=K+f+65535,f=Math.floor(r/65536),K=r-f*65536,r=k+f+65535,f=Math.floor(r/65536),k=r-f*65536,r=I+f+65535,f=Math.floor(r/65536),I=r-f*65536,x+=f-1+37*(f-1),i[0]=x,i[1]=h,i[2]=m,i[3]=U,i[4]=P,i[5]=T,i[6]=ie,i[7]=E,i[8]=R,i[9]=O,i[10]=j,i[11]=G,i[12]=F,i[13]=K,i[14]=k,i[15]=I}function Ne(i,a){Q(i,a,a)}function oi(i,a){var o=e(),r;for(r=0;r<16;r++)o[r]=a[r];for(r=253;r>=0;r--)Ne(o,o),r!==2&&r!==4&&Q(o,o,a);for(r=0;r<16;r++)i[r]=o[r]}function ai(i,a){var o=e(),r;for(r=0;r<16;r++)o[r]=a[r];for(r=250;r>=0;r--)Ne(o,o),r!==1&&Q(o,o,a);for(r=0;r<16;r++)i[r]=o[r]}function Mr(i,a,o){var r=new Uint8Array(32),f=new Float64Array(80),x,h,m=e(),U=e(),P=e(),T=e(),ie=e(),E=e();for(h=0;h<31;h++)r[h]=a[h];for(r[31]=a[31]&127|64,r[0]&=248,hn(f,o),h=0;h<16;h++)U[h]=f[h],T[h]=m[h]=P[h]=0;for(m[0]=T[0]=1,h=254;h>=0;--h)x=r[h>>>3]>>>(h&7)&1,kt(m,U,x),kt(P,T,x),Oe(ie,m,P),Fe(m,m,P),Oe(P,U,T),Fe(U,U,T),Ne(T,ie),Ne(E,m),Q(m,P,m),Q(P,U,ie),Oe(ie,m,P),Fe(m,m,P),Ne(U,m),Fe(P,T,E),Q(m,P,b),Oe(m,m,T),Q(P,P,m),Q(m,T,E),Q(T,U,f),Ne(U,ie),kt(m,U,x),kt(P,T,x);for(h=0;h<16;h++)f[h+16]=m[h],f[h+32]=P[h],f[h+48]=U[h],f[h+64]=T[h];var R=f.subarray(32),O=f.subarray(16);return oi(R,R),Q(O,O,R),Ct(i,O),0}function Dr(i,a){return Mr(i,a,c)}function fi(i,a){return t(a,32),Dr(i,a)}function Hr(i,a,o){var r=new Uint8Array(32);return Mr(r,o,a),ye(i,s,r,W)}var ci=zt,es=gr;function ts(i,a,o,r,f,x){var h=new Uint8Array(32);return Hr(h,f,x),ci(i,a,o,r,h)}function rs(i,a,o,r,f,x){var h=new Uint8Array(32);return Hr(h,f,x),es(i,a,o,r,h)}var li=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function ui(i,a,o,r){for(var f=new Int32Array(16),x=new Int32Array(16),h,m,U,P,T,ie,E,R,O,j,G,F,K,k,I,L,v,M,D,z,p,y,A,g,w,S,N=i[0],q=i[1],X=i[2],$=i[3],l=i[4],J=i[5],se=i[6],oe=i[7],Z=a[0],te=a[1],re=a[2],be=a[3],le=a[4],xe=a[5],he=a[6],pe=a[7],Ae=0;r>=128;){for(D=0;D<16;D++)z=8*D+Ae,f[D]=o[z+0]<<24|o[z+1]<<16|o[z+2]<<8|o[z+3],x[D]=o[z+4]<<24|o[z+5]<<16|o[z+6]<<8|o[z+7];for(D=0;D<80;D++)if(h=N,m=q,U=X,P=$,T=l,ie=J,E=se,R=oe,O=Z,j=te,G=re,F=be,K=le,k=xe,I=he,L=pe,p=oe,y=pe,A=y&65535,g=y>>>16,w=p&65535,S=p>>>16,p=(l>>>14|le<<18)^(l>>>18|le<<14)^(le>>>9|l<<23),y=(le>>>14|l<<18)^(le>>>18|l<<14)^(l>>>9|le<<23),A+=y&65535,g+=y>>>16,w+=p&65535,S+=p>>>16,p=l&J^~l&se,y=le&xe^~le&he,A+=y&65535,g+=y>>>16,w+=p&65535,S+=p>>>16,p=li[D*2],y=li[D*2+1],A+=y&65535,g+=y>>>16,w+=p&65535,S+=p>>>16,p=f[D%16],y=x[D%16],A+=y&65535,g+=y>>>16,w+=p&65535,S+=p>>>16,g+=A>>>16,w+=g>>>16,S+=w>>>16,v=w&65535|S<<16,M=A&65535|g<<16,p=v,y=M,A=y&65535,g=y>>>16,w=p&65535,S=p>>>16,p=(N>>>28|Z<<4)^(Z>>>2|N<<30)^(Z>>>7|N<<25),y=(Z>>>28|N<<4)^(N>>>2|Z<<30)^(N>>>7|Z<<25),A+=y&65535,g+=y>>>16,w+=p&65535,S+=p>>>16,p=N&q^N&X^q&X,y=Z&te^Z&re^te&re,A+=y&65535,g+=y>>>16,w+=p&65535,S+=p>>>16,g+=A>>>16,w+=g>>>16,S+=w>>>16,R=w&65535|S<<16,L=A&65535|g<<16,p=P,y=F,A=y&65535,g=y>>>16,w=p&65535,S=p>>>16,p=v,y=M,A+=y&65535,g+=y>>>16,w+=p&65535,S+=p>>>16,g+=A>>>16,w+=g>>>16,S+=w>>>16,P=w&65535|S<<16,F=A&65535|g<<16,q=h,X=m,$=U,l=P,J=T,se=ie,oe=E,N=R,te=O,re=j,be=G,le=F,xe=K,he=k,pe=I,Z=L,D%16===15)for(z=0;z<16;z++)p=f[z],y=x[z],A=y&65535,g=y>>>16,w=p&65535,S=p>>>16,p=f[(z+9)%16],y=x[(z+9)%16],A+=y&65535,g+=y>>>16,w+=p&65535,S+=p>>>16,v=f[(z+1)%16],M=x[(z+1)%16],p=(v>>>1|M<<31)^(v>>>8|M<<24)^v>>>7,y=(M>>>1|v<<31)^(M>>>8|v<<24)^(M>>>7|v<<25),A+=y&65535,g+=y>>>16,w+=p&65535,S+=p>>>16,v=f[(z+14)%16],M=x[(z+14)%16],p=(v>>>19|M<<13)^(M>>>29|v<<3)^v>>>6,y=(M>>>19|v<<13)^(v>>>29|M<<3)^(M>>>6|v<<26),A+=y&65535,g+=y>>>16,w+=p&65535,S+=p>>>16,g+=A>>>16,w+=g>>>16,S+=w>>>16,f[z]=w&65535|S<<16,x[z]=A&65535|g<<16;p=N,y=Z,A=y&65535,g=y>>>16,w=p&65535,S=p>>>16,p=i[0],y=a[0],A+=y&65535,g+=y>>>16,w+=p&65535,S+=p>>>16,g+=A>>>16,w+=g>>>16,S+=w>>>16,i[0]=N=w&65535|S<<16,a[0]=Z=A&65535|g<<16,p=q,y=te,A=y&65535,g=y>>>16,w=p&65535,S=p>>>16,p=i[1],y=a[1],A+=y&65535,g+=y>>>16,w+=p&65535,S+=p>>>16,g+=A>>>16,w+=g>>>16,S+=w>>>16,i[1]=q=w&65535|S<<16,a[1]=te=A&65535|g<<16,p=X,y=re,A=y&65535,g=y>>>16,w=p&65535,S=p>>>16,p=i[2],y=a[2],A+=y&65535,g+=y>>>16,w+=p&65535,S+=p>>>16,g+=A>>>16,w+=g>>>16,S+=w>>>16,i[2]=X=w&65535|S<<16,a[2]=re=A&65535|g<<16,p=$,y=be,A=y&65535,g=y>>>16,w=p&65535,S=p>>>16,p=i[3],y=a[3],A+=y&65535,g+=y>>>16,w+=p&65535,S+=p>>>16,g+=A>>>16,w+=g>>>16,S+=w>>>16,i[3]=$=w&65535|S<<16,a[3]=be=A&65535|g<<16,p=l,y=le,A=y&65535,g=y>>>16,w=p&65535,S=p>>>16,p=i[4],y=a[4],A+=y&65535,g+=y>>>16,w+=p&65535,S+=p>>>16,g+=A>>>16,w+=g>>>16,S+=w>>>16,i[4]=l=w&65535|S<<16,a[4]=le=A&65535|g<<16,p=J,y=xe,A=y&65535,g=y>>>16,w=p&65535,S=p>>>16,p=i[5],y=a[5],A+=y&65535,g+=y>>>16,w+=p&65535,S+=p>>>16,g+=A>>>16,w+=g>>>16,S+=w>>>16,i[5]=J=w&65535|S<<16,a[5]=xe=A&65535|g<<16,p=se,y=he,A=y&65535,g=y>>>16,w=p&65535,S=p>>>16,p=i[6],y=a[6],A+=y&65535,g+=y>>>16,w+=p&65535,S+=p>>>16,g+=A>>>16,w+=g>>>16,S+=w>>>16,i[6]=se=w&65535|S<<16,a[6]=he=A&65535|g<<16,p=oe,y=pe,A=y&65535,g=y>>>16,w=p&65535,S=p>>>16,p=i[7],y=a[7],A+=y&65535,g+=y>>>16,w+=p&65535,S+=p>>>16,g+=A>>>16,w+=g>>>16,S+=w>>>16,i[7]=oe=w&65535|S<<16,a[7]=pe=A&65535|g<<16,Ae+=128,r-=128}return r}function Tt(i,a,o){var r=new Int32Array(8),f=new Int32Array(8),x=new Uint8Array(256),h,m=o;for(r[0]=1779033703,r[1]=3144134277,r[2]=1013904242,r[3]=2773480762,r[4]=1359893119,r[5]=2600822924,r[6]=528734635,r[7]=1541459225,f[0]=4089235720,f[1]=2227873595,f[2]=4271175723,f[3]=1595750129,f[4]=2917565137,f[5]=725511199,f[6]=4215389547,f[7]=327033209,ui(r,f,a,o),o%=128,h=0;h<o;h++)x[h]=a[m-o+h];for(x[o]=128,o=256-128*(o<112?1:0),x[o-9]=0,ne(x,o-8,m/536870912|0,m<<3),ui(r,f,x,o),h=0;h<8;h++)ne(i,8*h,r[h],f[h]);return 0}function Pr(i,a){var o=e(),r=e(),f=e(),x=e(),h=e(),m=e(),U=e(),P=e(),T=e();Fe(o,i[1],i[0]),Fe(T,a[1],a[0]),Q(o,o,T),Oe(r,i[0],i[1]),Oe(T,a[0],a[1]),Q(r,r,T),Q(f,i[3],a[3]),Q(f,f,B),Q(x,i[2],a[2]),Oe(x,x,x),Fe(h,r,o),Fe(m,x,f),Oe(U,x,f),Oe(P,r,o),Q(i[0],h,m),Q(i[1],P,U),Q(i[2],U,m),Q(i[3],h,P)}function di(i,a,o){var r;for(r=0;r<4;r++)kt(i[r],a[r],o)}function pn(i,a){var o=e(),r=e(),f=e();oi(f,a[2]),Q(o,a[0],f),Q(r,a[1],f),Ct(i,r),i[31]^=si(o)<<7}function yn(i,a,o){var r,f;for(Le(i[0],u),Le(i[1],d),Le(i[2],d),Le(i[3],u),f=255;f>=0;--f)r=o[f/8|0]>>(f&7)&1,di(i,a,r),Pr(a,i),Pr(i,i),di(i,a,r)}function Lr(i,a){var o=[e(),e(),e(),e()];Le(o[0],Y),Le(o[1],H),Le(o[2],d),Q(o[3],Y,H),yn(i,o,a)}function bn(i,a,o){var r=new Uint8Array(64),f=[e(),e(),e(),e()],x;for(o||t(a,32),Tt(r,a,32),r[0]&=248,r[31]&=127,r[31]|=64,Lr(f,r),pn(i,f),x=0;x<32;x++)a[x+32]=i[x];return 0}var Nr=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function gn(i,a){var o,r,f,x;for(r=63;r>=32;--r){for(o=0,f=r-32,x=r-12;f<x;++f)a[f]+=o-16*a[r]*Nr[f-(r-32)],o=Math.floor((a[f]+128)/256),a[f]-=o*256;a[f]+=o,a[r]=0}for(o=0,f=0;f<32;f++)a[f]+=o-(a[31]>>4)*Nr[f],o=a[f]>>8,a[f]&=255;for(f=0;f<32;f++)a[f]-=o*Nr[f];for(r=0;r<32;r++)a[r+1]+=a[r]>>8,i[r]=a[r]&255}function mn(i){var a=new Float64Array(64),o;for(o=0;o<64;o++)a[o]=i[o];for(o=0;o<64;o++)i[o]=0;gn(i,a)}function xi(i,a,o,r){var f=new Uint8Array(64),x=new Uint8Array(64),h=new Uint8Array(64),m,U,P=new Float64Array(64),T=[e(),e(),e(),e()];Tt(f,r,32),f[0]&=248,f[31]&=127,f[31]|=64;var ie=o+64;for(m=0;m<o;m++)i[64+m]=a[m];for(m=0;m<32;m++)i[32+m]=f[32+m];for(Tt(h,i.subarray(32),o+32),mn(h),Lr(T,h),pn(i,T),m=32;m<64;m++)i[m]=r[m];for(Tt(x,i,o+64),mn(x),m=0;m<64;m++)P[m]=0;for(m=0;m<32;m++)P[m]=h[m];for(m=0;m<32;m++)for(U=0;U<32;U++)P[m+U]+=x[m]*f[U];return gn(i.subarray(32),P),ie}function ns(i,a){var o=e(),r=e(),f=e(),x=e(),h=e(),m=e(),U=e();return Le(i[2],d),hn(i[1],a),Ne(f,i[1]),Q(x,f,_),Fe(f,f,i[2]),Oe(x,i[2],x),Ne(h,x),Ne(m,h),Q(U,m,h),Q(o,U,f),Q(o,o,x),ai(o,o),Q(o,o,f),Q(o,o,x),Q(o,o,x),Q(i[0],o,x),Ne(r,i[0]),Q(r,r,x),ii(r,f)&&Q(i[0],i[0],C),Ne(r,i[0]),Q(r,r,x),ii(r,f)?-1:(si(i[0])===a[31]>>7&&Fe(i[0],u,i[0]),Q(i[3],i[0],i[1]),0)}function wn(i,a,o,r){var f,x=new Uint8Array(32),h=new Uint8Array(64),m=[e(),e(),e(),e()],U=[e(),e(),e(),e()];if(o<64||ns(U,r))return-1;for(f=0;f<o;f++)i[f]=a[f];for(f=0;f<32;f++)i[f+32]=r[f];if(Tt(h,i,o),mn(h),yn(m,U,h),Lr(U,a.subarray(32)),Pr(m,U),pn(x,m),o-=64,we(a,0,x,0)){for(f=0;f<o;f++)i[f]=0;return-1}for(f=0;f<o;f++)i[f]=a[f+64];return o}var An=32,Rr=24,mr=32,Kt=16,wr=32,Or=32,Ar=32,Sr=32,Sn=32,hi=Rr,is=mr,ss=Kt,Xe=64,vt=32,Gt=64,Un=32,_n=64;n.lowlevel={crypto_core_hsalsa20:ye,crypto_stream_xor:Ie,crypto_stream:Pe,crypto_stream_salsa20_xor:Ot,crypto_stream_salsa20:Ft,crypto_onetimeauth:Ut,crypto_onetimeauth_verify:_t,crypto_verify_16:de,crypto_verify_32:we,crypto_secretbox:zt,crypto_secretbox_open:gr,crypto_scalarmult:Mr,crypto_scalarmult_base:Dr,crypto_box_beforenm:Hr,crypto_box_afternm:ci,crypto_box:ts,crypto_box_open:rs,crypto_box_keypair:fi,crypto_hash:Tt,crypto_sign:xi,crypto_sign_keypair:bn,crypto_sign_open:wn,crypto_secretbox_KEYBYTES:An,crypto_secretbox_NONCEBYTES:Rr,crypto_secretbox_ZEROBYTES:mr,crypto_secretbox_BOXZEROBYTES:Kt,crypto_scalarmult_BYTES:wr,crypto_scalarmult_SCALARBYTES:Or,crypto_box_PUBLICKEYBYTES:Ar,crypto_box_SECRETKEYBYTES:Sr,crypto_box_BEFORENMBYTES:Sn,crypto_box_NONCEBYTES:hi,crypto_box_ZEROBYTES:is,crypto_box_BOXZEROBYTES:ss,crypto_sign_BYTES:Xe,crypto_sign_PUBLICKEYBYTES:vt,crypto_sign_SECRETKEYBYTES:Gt,crypto_sign_SEEDBYTES:Un,crypto_hash_BYTES:_n,gf:e,D:_,L:Nr,pack25519:Ct,unpack25519:hn,M:Q,A:Oe,S:Ne,Z:Fe,pow2523:ai,add:Pr,set25519:Le,modL:gn,scalarmult:yn,scalarbase:Lr};function pi(i,a){if(i.length!==An)throw new Error("bad key size");if(a.length!==Rr)throw new Error("bad nonce size")}function os(i,a){if(i.length!==Ar)throw new Error("bad public key size");if(a.length!==Sr)throw new Error("bad secret key size")}function Me(){for(var i=0;i<arguments.length;i++)if(!(arguments[i]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function yi(i){for(var a=0;a<i.length;a++)i[a]=0}n.randomBytes=function(i){var a=new Uint8Array(i);return t(a,i),a},n.secretbox=function(i,a,o){Me(i,a,o),pi(o,a);for(var r=new Uint8Array(mr+i.length),f=new Uint8Array(r.length),x=0;x<i.length;x++)r[x+mr]=i[x];return zt(f,r,r.length,a,o),f.subarray(Kt)},n.secretbox.open=function(i,a,o){Me(i,a,o),pi(o,a);for(var r=new Uint8Array(Kt+i.length),f=new Uint8Array(r.length),x=0;x<i.length;x++)r[x+Kt]=i[x];return r.length<32||gr(f,r,r.length,a,o)!==0?null:f.subarray(mr)},n.secretbox.keyLength=An,n.secretbox.nonceLength=Rr,n.secretbox.overheadLength=Kt,n.scalarMult=function(i,a){if(Me(i,a),i.length!==Or)throw new Error("bad n size");if(a.length!==wr)throw new Error("bad p size");var o=new Uint8Array(wr);return Mr(o,i,a),o},n.scalarMult.base=function(i){if(Me(i),i.length!==Or)throw new Error("bad n size");var a=new Uint8Array(wr);return Dr(a,i),a},n.scalarMult.scalarLength=Or,n.scalarMult.groupElementLength=wr,n.box=function(i,a,o,r){var f=n.box.before(o,r);return n.secretbox(i,a,f)},n.box.before=function(i,a){Me(i,a),os(i,a);var o=new Uint8Array(Sn);return Hr(o,i,a),o},n.box.after=n.secretbox,n.box.open=function(i,a,o,r){var f=n.box.before(o,r);return n.secretbox.open(i,a,f)},n.box.open.after=n.secretbox.open,n.box.keyPair=function(){var i=new Uint8Array(Ar),a=new Uint8Array(Sr);return fi(i,a),{publicKey:i,secretKey:a}},n.box.keyPair.fromSecretKey=function(i){if(Me(i),i.length!==Sr)throw new Error("bad secret key size");var a=new Uint8Array(Ar);return Dr(a,i),{publicKey:a,secretKey:new Uint8Array(i)}},n.box.publicKeyLength=Ar,n.box.secretKeyLength=Sr,n.box.sharedKeyLength=Sn,n.box.nonceLength=hi,n.box.overheadLength=n.secretbox.overheadLength,n.sign=function(i,a){if(Me(i,a),a.length!==Gt)throw new Error("bad secret key size");var o=new Uint8Array(Xe+i.length);return xi(o,i,i.length,a),o},n.sign.open=function(i,a){if(Me(i,a),a.length!==vt)throw new Error("bad public key size");var o=new Uint8Array(i.length),r=wn(o,i,i.length,a);if(r<0)return null;for(var f=new Uint8Array(r),x=0;x<f.length;x++)f[x]=o[x];return f},n.sign.detached=function(i,a){for(var o=n.sign(i,a),r=new Uint8Array(Xe),f=0;f<r.length;f++)r[f]=o[f];return r},n.sign.detached.verify=function(i,a,o){if(Me(i,a,o),a.length!==Xe)throw new Error("bad signature size");if(o.length!==vt)throw new Error("bad public key size");var r=new Uint8Array(Xe+i.length),f=new Uint8Array(Xe+i.length),x;for(x=0;x<Xe;x++)r[x]=a[x];for(x=0;x<i.length;x++)r[x+Xe]=i[x];return wn(f,r,r.length,o)>=0},n.sign.keyPair=function(){var i=new Uint8Array(vt),a=new Uint8Array(Gt);return bn(i,a),{publicKey:i,secretKey:a}},n.sign.keyPair.fromSecretKey=function(i){if(Me(i),i.length!==Gt)throw new Error("bad secret key size");for(var a=new Uint8Array(vt),o=0;o<a.length;o++)a[o]=i[32+o];return{publicKey:a,secretKey:new Uint8Array(i)}},n.sign.keyPair.fromSeed=function(i){if(Me(i),i.length!==Un)throw new Error("bad seed size");for(var a=new Uint8Array(vt),o=new Uint8Array(Gt),r=0;r<32;r++)o[r]=i[r];return bn(a,o,!0),{publicKey:a,secretKey:o}},n.sign.publicKeyLength=vt,n.sign.secretKeyLength=Gt,n.sign.seedLength=Un,n.sign.signatureLength=Xe,n.hash=function(i){Me(i);var a=new Uint8Array(_n);return Tt(a,i,i.length),a},n.hash.hashLength=_n,n.verify=function(i,a){return Me(i,a),i.length===0||a.length===0||i.length!==a.length?!1:fe(i,0,a,0,i.length)===0},n.setPRNG=function(i){t=i},function(){var i=typeof self<"u"?self.crypto||self.msCrypto:null;if(i&&i.getRandomValues){var a=65536;n.setPRNG(function(o,r){var f,x=new Uint8Array(r);for(f=0;f<r;f+=a)i.getRandomValues(x.subarray(f,f+Math.min(r-f,a)));for(f=0;f<r;f++)o[f]=x[f];yi(x)})}else typeof gi<"u"&&(i=Si(),i&&i.randomBytes&&n.setPRNG(function(o,r){var f,x=i.randomBytes(r);for(f=0;f<r;f++)o[f]=x[f];yi(x)}))}()})(typeof kr<"u"&&kr.exports?kr.exports:self.nacl=self.nacl||{})});var vo={};Fr(vo,{BCS:()=>Cn,CKDPriv:()=>Ki,HexString:()=>ae,SupraAccount:()=>cn,TransactionBuilder:()=>Rt,TransactionBuilderABI:()=>dn,TransactionBuilderEd25519:()=>Jn,TransactionBuilderMultiEd25519:()=>Qn,TransactionBuilderRemoteABI:()=>un,TxnBuilderTypes:()=>$n,TypeTagParser:()=>tt,Types:()=>ni,argToTransactionArgument:()=>Zn,derivePath:()=>Pn,ensureBigInt:()=>Nt,ensureBoolean:()=>Yn,ensureNumber:()=>Lt,getAddressFromAccountOrAddress:()=>wo,getMasterKeyFromSeed:()=>Ci,getPublicKey:()=>ro,isValidPath:()=>Gi,serializeArg:()=>Xn});var Ir=Ai(zn());function Ve(n){if(!Number.isSafeInteger(n)||n<0)throw new Error(`Wrong positive integer: ${n}`)}function ds(n){return n instanceof Uint8Array||n!=null&&typeof n=="object"&&n.constructor.name==="Uint8Array"}function _r(n,...e){if(!ds(n))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(n.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${n.length}`)}function Cr(n){if(typeof n!="function"||typeof n.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Ve(n.outputLen),Ve(n.blockLen)}function Ze(n,e=!0){if(n.destroyed)throw new Error("Hash instance has been destroyed");if(e&&n.finished)throw new Error("Hash#digest() has already been called")}function Kr(n,e){_r(n);let t=e.outputLen;if(n.length<t)throw new Error(`digestInto() expects output buffer of length at least ${t}`)}var _i=n=>new Uint32Array(n.buffer,n.byteOffset,Math.floor(n.byteLength/4));function zi(n){return n instanceof Uint8Array||n!=null&&typeof n=="object"&&n.constructor.name==="Uint8Array"}var Wt=n=>new DataView(n.buffer,n.byteOffset,n.byteLength),ke=(n,e)=>n<<32-e|n>>>e,xs=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!xs)throw new Error("Non little-endian hardware is not supported");var hs=Array.from({length:256},(n,e)=>e.toString(16).padStart(2,"0"));function Gr(n){if(!zi(n))throw new Error("Uint8Array expected");let e="";for(let t=0;t<n.length;t++)e+=hs[n[t]];return e}var Je={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function Ui(n){if(n>=Je._0&&n<=Je._9)return n-Je._0;if(n>=Je._A&&n<=Je._F)return n-(Je._A-10);if(n>=Je._a&&n<=Je._f)return n-(Je._a-10)}function Wr(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);let e=n.length,t=e/2;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);let s=new Uint8Array(t);for(let c=0,u=0;c<t;c++,u+=2){let d=Ui(n.charCodeAt(u)),b=Ui(n.charCodeAt(u+1));if(d===void 0||b===void 0){let _=n[u]+n[u+1];throw new Error('hex string expected, got non-hex character "'+_+'" at index '+u)}s[c]=d*16+b}return s}function ps(n){if(typeof n!="string")throw new Error(`utf8ToBytes expected string, got ${typeof n}`);return new Uint8Array(new TextEncoder().encode(n))}function Ce(n){if(typeof n=="string"&&(n=ps(n)),!zi(n))throw new Error(`expected Uint8Array, got ${typeof n}`);return n}var it=class{clone(){return this._cloneInto()}},ys={}.toString;function Ti(n,e){if(e!==void 0&&ys.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(n,e)}function jt(n){let e=s=>n().update(Ce(s)).digest(),t=n();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>n(),e}function vi(n){let e=(s,c)=>n(c).update(Ce(s)).digest(),t=n({});return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=s=>n(s),e}var jr=class extends it{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,Cr(e);let s=Ce(t);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let c=this.blockLen,u=new Uint8Array(c);u.set(s.length>c?e.create().update(s).digest():s);for(let d=0;d<u.length;d++)u[d]^=54;this.iHash.update(u),this.oHash=e.create();for(let d=0;d<u.length;d++)u[d]^=106;this.oHash.update(u),u.fill(0)}update(e){return Ze(this),this.iHash.update(e),this}digestInto(e){Ze(this),_r(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:t,iHash:s,finished:c,destroyed:u,blockLen:d,outputLen:b}=this;return e=e,e.finished=c,e.destroyed=u,e.blockLen=d,e.outputLen=b,e.oHash=t._cloneInto(e.oHash),e.iHash=s._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},qt=(n,e,t)=>new jr(n,e).update(t).digest();qt.create=(n,e)=>new jr(n,e);function bs(n,e,t,s){Cr(n);let c=Ti({dkLen:32,asyncTick:10},s),{c:u,dkLen:d,asyncTick:b}=c;if(Ve(u),Ve(d),Ve(b),u<1)throw new Error("PBKDF2: iterations (c) should be >= 1");let _=Ce(e),B=Ce(t),Y=new Uint8Array(d),H=qt.create(n,_),C=H._cloneInto().update(B);return{c:u,dkLen:d,asyncTick:b,DK:Y,PRF:H,PRFSalt:C}}function gs(n,e,t,s,c){return n.destroy(),e.destroy(),s&&s.destroy(),c.fill(0),t}function Ei(n,e,t,s){let{c,dkLen:u,DK:d,PRF:b,PRFSalt:_}=bs(n,e,t,s),B,Y=new Uint8Array(4),H=Wt(Y),C=new Uint8Array(b.outputLen);for(let ne=1,fe=0;fe<u;ne++,fe+=b.outputLen){let de=d.subarray(fe,fe+b.outputLen);H.setInt32(0,ne,!1),(B=_._cloneInto(B)).update(Y).digestInto(C),de.set(C.subarray(0,de.length));for(let we=1;we<c;we++){b._cloneInto(B).update(C).digestInto(C);for(let Be=0;Be<de.length;Be++)de[Be]^=C[Be]}}return gs(b,_,d,B,C)}function ms(n,e,t,s){if(typeof n.setBigUint64=="function")return n.setBigUint64(e,t,s);let c=BigInt(32),u=BigInt(4294967295),d=Number(t>>c&u),b=Number(t&u),_=s?4:0,B=s?0:4;n.setUint32(e+_,d,s),n.setUint32(e+B,b,s)}var $t=class extends it{constructor(e,t,s,c){super(),this.blockLen=e,this.outputLen=t,this.padOffset=s,this.isLE=c,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Wt(this.buffer)}update(e){Ze(this);let{view:t,buffer:s,blockLen:c}=this;e=Ce(e);let u=e.length;for(let d=0;d<u;){let b=Math.min(c-this.pos,u-d);if(b===c){let _=Wt(e);for(;c<=u-d;d+=c)this.process(_,d);continue}s.set(e.subarray(d,d+b),this.pos),this.pos+=b,d+=b,this.pos===c&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Ze(this),Kr(e,this),this.finished=!0;let{buffer:t,view:s,blockLen:c,isLE:u}=this,{pos:d}=this;t[d++]=128,this.buffer.subarray(d).fill(0),this.padOffset>c-d&&(this.process(s,0),d=0);for(let H=d;H<c;H++)t[H]=0;ms(s,c-8,BigInt(this.length*8),u),this.process(s,0);let b=Wt(e),_=this.outputLen;if(_%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let B=_/4,Y=this.get();if(B>Y.length)throw new Error("_sha2: outputLen bigger than state");for(let H=0;H<B;H++)b.setUint32(4*H,Y[H],u)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let s=e.slice(0,t);return this.destroy(),s}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:s,length:c,finished:u,destroyed:d,pos:b}=this;return e.length=c,e.pos=b,e.finished=u,e.destroyed=d,c%t&&e.buffer.set(s),e}};var ws=(n,e,t)=>n&e^~n&t,As=(n,e,t)=>n&e^n&t^e&t,Ss=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),st=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ot=new Uint32Array(64),Tn=class extends $t{constructor(){super(64,32,8,!1),this.A=st[0]|0,this.B=st[1]|0,this.C=st[2]|0,this.D=st[3]|0,this.E=st[4]|0,this.F=st[5]|0,this.G=st[6]|0,this.H=st[7]|0}get(){let{A:e,B:t,C:s,D:c,E:u,F:d,G:b,H:_}=this;return[e,t,s,c,u,d,b,_]}set(e,t,s,c,u,d,b,_){this.A=e|0,this.B=t|0,this.C=s|0,this.D=c|0,this.E=u|0,this.F=d|0,this.G=b|0,this.H=_|0}process(e,t){for(let H=0;H<16;H++,t+=4)ot[H]=e.getUint32(t,!1);for(let H=16;H<64;H++){let C=ot[H-15],ne=ot[H-2],fe=ke(C,7)^ke(C,18)^C>>>3,de=ke(ne,17)^ke(ne,19)^ne>>>10;ot[H]=de+ot[H-7]+fe+ot[H-16]|0}let{A:s,B:c,C:u,D:d,E:b,F:_,G:B,H:Y}=this;for(let H=0;H<64;H++){let C=ke(b,6)^ke(b,11)^ke(b,25),ne=Y+C+ws(b,_,B)+Ss[H]+ot[H]|0,de=(ke(s,2)^ke(s,13)^ke(s,22))+As(s,c,u)|0;Y=B,B=_,_=b,b=d+ne|0,d=u,u=c,c=s,s=ne+de|0}s=s+this.A|0,c=c+this.B|0,u=u+this.C|0,d=d+this.D|0,b=b+this.E|0,_=_+this.F|0,B=B+this.G|0,Y=Y+this.H|0,this.set(s,c,u,d,b,_,B,Y)}roundClean(){ot.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};var Bi=jt(()=>new Tn);var qr=BigInt(4294967295),vn=BigInt(32);function Ii(n,e=!1){return e?{h:Number(n&qr),l:Number(n>>vn&qr)}:{h:Number(n>>vn&qr)|0,l:Number(n&qr)|0}}function En(n,e=!1){let t=new Uint32Array(n.length),s=new Uint32Array(n.length);for(let c=0;c<n.length;c++){let{h:u,l:d}=Ii(n[c],e);[t[c],s[c]]=[u,d]}return[t,s]}var Us=(n,e)=>BigInt(n>>>0)<<vn|BigInt(e>>>0),_s=(n,e,t)=>n>>>t,zs=(n,e,t)=>n<<32-t|e>>>t,Ts=(n,e,t)=>n>>>t|e<<32-t,vs=(n,e,t)=>n<<32-t|e>>>t,Es=(n,e,t)=>n<<64-t|e>>>t-32,Bs=(n,e,t)=>n>>>t-32|e<<64-t,Is=(n,e)=>e,Ms=(n,e)=>n,Bn=(n,e,t)=>n<<t|e>>>32-t,In=(n,e,t)=>e<<t|n>>>32-t,Mn=(n,e,t)=>e<<t-32|n>>>64-t,Dn=(n,e,t)=>n<<t-32|e>>>64-t;function Ds(n,e,t,s){let c=(e>>>0)+(s>>>0);return{h:n+t+(c/2**32|0)|0,l:c|0}}var Hs=(n,e,t)=>(n>>>0)+(e>>>0)+(t>>>0),Ps=(n,e,t,s)=>e+t+s+(n/2**32|0)|0,Ls=(n,e,t,s)=>(n>>>0)+(e>>>0)+(t>>>0)+(s>>>0),Ns=(n,e,t,s,c)=>e+t+s+c+(n/2**32|0)|0,Rs=(n,e,t,s,c)=>(n>>>0)+(e>>>0)+(t>>>0)+(s>>>0)+(c>>>0),Os=(n,e,t,s,c,u)=>e+t+s+c+u+(n/2**32|0)|0;var Fs={fromBig:Ii,split:En,toBig:Us,shrSH:_s,shrSL:zs,rotrSH:Ts,rotrSL:vs,rotrBH:Es,rotrBL:Bs,rotr32H:Is,rotr32L:Ms,rotlSH:Bn,rotlSL:In,rotlBH:Mn,rotlBL:Dn,add:Ds,add3L:Hs,add3H:Ps,add4L:Ls,add4H:Ns,add5H:Os,add5L:Rs},V=Fs;var[ks,Cs]=V.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(n=>BigInt(n))),at=new Uint32Array(80),ft=new Uint32Array(80),Hn=class extends $t{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){let{Ah:e,Al:t,Bh:s,Bl:c,Ch:u,Cl:d,Dh:b,Dl:_,Eh:B,El:Y,Fh:H,Fl:C,Gh:ne,Gl:fe,Hh:de,Hl:we}=this;return[e,t,s,c,u,d,b,_,B,Y,H,C,ne,fe,de,we]}set(e,t,s,c,u,d,b,_,B,Y,H,C,ne,fe,de,we){this.Ah=e|0,this.Al=t|0,this.Bh=s|0,this.Bl=c|0,this.Ch=u|0,this.Cl=d|0,this.Dh=b|0,this.Dl=_|0,this.Eh=B|0,this.El=Y|0,this.Fh=H|0,this.Fl=C|0,this.Gh=ne|0,this.Gl=fe|0,this.Hh=de|0,this.Hl=we|0}process(e,t){for(let ce=0;ce<16;ce++,t+=4)at[ce]=e.getUint32(t),ft[ce]=e.getUint32(t+=4);for(let ce=16;ce<80;ce++){let ye=at[ce-15]|0,W=ft[ce-15]|0,Ot=V.rotrSH(ye,W,1)^V.rotrSH(ye,W,8)^V.shrSH(ye,W,7),Ft=V.rotrSL(ye,W,1)^V.rotrSL(ye,W,8)^V.shrSL(ye,W,7),Pe=at[ce-2]|0,Ie=ft[ce-2]|0,Ye=V.rotrSH(Pe,Ie,19)^V.rotrBH(Pe,Ie,61)^V.shrSH(Pe,Ie,6),Ut=V.rotrSL(Pe,Ie,19)^V.rotrBL(Pe,Ie,61)^V.shrSL(Pe,Ie,6),_t=V.add4L(Ft,Ut,ft[ce-7],ft[ce-16]),zt=V.add4H(_t,Ot,Ye,at[ce-7],at[ce-16]);at[ce]=zt|0,ft[ce]=_t|0}let{Ah:s,Al:c,Bh:u,Bl:d,Ch:b,Cl:_,Dh:B,Dl:Y,Eh:H,El:C,Fh:ne,Fl:fe,Gh:de,Gl:we,Hh:Be,Hl:$e}=this;for(let ce=0;ce<80;ce++){let ye=V.rotrSH(H,C,14)^V.rotrSH(H,C,18)^V.rotrBH(H,C,41),W=V.rotrSL(H,C,14)^V.rotrSL(H,C,18)^V.rotrBL(H,C,41),Ot=H&ne^~H&de,Ft=C&fe^~C&we,Pe=V.add5L($e,W,Ft,Cs[ce],ft[ce]),Ie=V.add5H(Pe,Be,ye,Ot,ks[ce],at[ce]),Ye=Pe|0,Ut=V.rotrSH(s,c,28)^V.rotrBH(s,c,34)^V.rotrBH(s,c,39),_t=V.rotrSL(s,c,28)^V.rotrBL(s,c,34)^V.rotrBL(s,c,39),zt=s&u^s&b^u&b,gr=c&d^c&_^d&_;Be=de|0,$e=we|0,de=ne|0,we=fe|0,ne=H|0,fe=C|0,{h:H,l:C}=V.add(B|0,Y|0,Ie|0,Ye|0),B=b|0,Y=_|0,b=u|0,_=d|0,u=s|0,d=c|0;let Le=V.add3L(Ye,_t,gr);s=V.add3H(Le,Ie,Ut,zt),c=Le|0}({h:s,l:c}=V.add(this.Ah|0,this.Al|0,s|0,c|0)),{h:u,l:d}=V.add(this.Bh|0,this.Bl|0,u|0,d|0),{h:b,l:_}=V.add(this.Ch|0,this.Cl|0,b|0,_|0),{h:B,l:Y}=V.add(this.Dh|0,this.Dl|0,B|0,Y|0),{h:H,l:C}=V.add(this.Eh|0,this.El|0,H|0,C|0),{h:ne,l:fe}=V.add(this.Fh|0,this.Fl|0,ne|0,fe|0),{h:de,l:we}=V.add(this.Gh|0,this.Gl|0,de|0,we|0),{h:Be,l:$e}=V.add(this.Hh|0,this.Hl|0,Be|0,$e|0),this.set(s,c,u,d,b,_,B,Y,H,C,ne,fe,de,we,Be,$e)}roundClean(){at.fill(0),ft.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};var zr=jt(()=>new Hn);function Mi(n){if(typeof n!="string")throw new TypeError(`Invalid mnemonic type: ${typeof n}`);return n.normalize("NFKD")}function Ks(n){let e=Mi(n),t=e.split(" ");if(![12,15,18,21,24].includes(t.length))throw new Error("Invalid mnemonic");return{nfkd:e,words:t}}var Gs=n=>Mi(`mnemonic${n}`);function Di(n,e=""){return Ei(zr,Ks(n).nfkd,Gs(e),{c:2048,dkLen:64})}var[Li,Ni,Ri]=[[],[],[]],js=BigInt(0),Tr=BigInt(1),qs=BigInt(2),$s=BigInt(7),Ys=BigInt(256),Xs=BigInt(113);for(let n=0,e=Tr,t=1,s=0;n<24;n++){[t,s]=[s,(2*t+3*s)%5],Li.push(2*(5*s+t)),Ni.push((n+1)*(n+2)/2%64);let c=js;for(let u=0;u<7;u++)e=(e<<Tr^(e>>$s)*Xs)%Ys,e&qs&&(c^=Tr<<(Tr<<BigInt(u))-Tr);Ri.push(c)}var[Vs,Zs]=En(Ri,!0),Hi=(n,e,t)=>t>32?Mn(n,e,t):Bn(n,e,t),Pi=(n,e,t)=>t>32?Dn(n,e,t):In(n,e,t);function Js(n,e=24){let t=new Uint32Array(10);for(let s=24-e;s<24;s++){for(let d=0;d<10;d++)t[d]=n[d]^n[d+10]^n[d+20]^n[d+30]^n[d+40];for(let d=0;d<10;d+=2){let b=(d+8)%10,_=(d+2)%10,B=t[_],Y=t[_+1],H=Hi(B,Y,1)^t[b],C=Pi(B,Y,1)^t[b+1];for(let ne=0;ne<50;ne+=10)n[d+ne]^=H,n[d+ne+1]^=C}let c=n[2],u=n[3];for(let d=0;d<24;d++){let b=Ni[d],_=Hi(c,u,b),B=Pi(c,u,b),Y=Li[d];c=n[Y],u=n[Y+1],n[Y]=_,n[Y+1]=B}for(let d=0;d<50;d+=10){for(let b=0;b<10;b++)t[b]=n[d+b];for(let b=0;b<10;b++)n[d+b]^=~t[(b+2)%10]&t[(b+4)%10]}n[0]^=Vs[s],n[1]^=Zs[s]}t.fill(0)}var $r=class n extends it{constructor(e,t,s,c=!1,u=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=s,this.enableXOF=c,this.rounds=u,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Ve(s),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=_i(this.state)}