"use strict";(()=>{var ge=Object.defineProperty;var we=(t,e,n)=>e in t?ge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var u=(t,e,n)=>we(t,typeof e!="symbol"?e+"":e,n);var Dt=Object.freeze({p:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:BigInt(8),a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")}),{p:tt,n:Q,Gx:Rt,Gy:Ot,a:ht,d:xt,h:Ae}=Dt,O=32,me=(...t)=>{"captureStackTrace"in Error&&typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(...t)},m=(t="")=>{let e=new Error(t);throw me(e,m),e},Ee=t=>typeof t=="bigint",Be=t=>typeof t=="string",He=t=>t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in t&&t.BYTES_PER_ELEMENT===1,B=(t,e,n="")=>{let s=He(t),o=t==null?void 0:t.length,r=e!==void 0;if(!s||r&&o!==e){let c=n&&`"${n}" `,i=r?` of length ${e}`:"",f=s?`length=${o}`:`type=${typeof t}`,d=c+"expected Uint8Array"+i+", got "+f;throw s?new RangeError(d):new TypeError(d)}return t},ot=t=>new Uint8Array(t),pt=t=>Uint8Array.from(t),Mt=(t,e)=>t.toString(16).padStart(e,"0"),jt=t=>Array.from(B(t)).map(e=>Mt(e,2)).join(""),R={_0:48,_9:57,A:65,F:70,a:97,f:102},Zt=t=>{if(t>=R._0&&t<=R._9)return t-R._0;if(t>=R.A&&t<=R.F)return t-(R.A-10);if(t>=R.a&&t<=R.f)return t-(R.a-10)},Nt=t=>{let e="hex invalid";if(!Be(t))return m(e);let n=t.length,s=n/2;if(n%2)return m(e);let o=ot(s);for(let r=0,c=0;r<s;r++,c+=2){let i=Zt(t.charCodeAt(c)),f=Zt(t.charCodeAt(c+1));if(i===void 0||f===void 0)return m(e);o[r]=i*16+f}return o},$t=()=>globalThis==null?void 0:globalThis.crypto,Le=()=>{var t,e;return(e=(t=$t())==null?void 0:t.subtle)!=null?e:m("crypto.subtle must be defined, consider polyfill")},v=(...t)=>{let e=0;for(let o of t)e+=B(o).length;let n=ot(e),s=0;return t.forEach(o=>{n.set(o,s),s+=o.length}),n},Se=(t=O)=>$t().getRandomValues(ot(t)),et=BigInt,j=(t,e,n,s="bad number: out of range")=>{if(!Ee(t))throw new TypeError(s);if(e<=t&&t<n)return t;throw new RangeError(s)},g=(t,e=tt)=>{let n=t%e;return n>=BigInt(0)?n:e+n},kt=(BigInt(1)<<BigInt(255))-BigInt(1),a=t=>{t<BigInt(0)&&m("negative coordinate");let e=(t>>BigInt(255))*BigInt(19)+(t&kt);return e=(e>>BigInt(255))*BigInt(19)+(e&kt),e%tt},Kt=t=>g(t,Q),Te=(t,e)=>{(t===BigInt(0)||e<=BigInt(0))&&m("no inverse n="+t+" mod="+e);let n=g(t,e),s=e,o=BigInt(0),r=BigInt(1),c=BigInt(1),i=BigInt(0);for(;n!==BigInt(0);){let f=s/n,d=s%n,x=o-c*f,l=r-i*f;s=n,n=d,o=c,r=i,c=x,i=l}return s===BigInt(1)?g(o,e):m("no inverse")},Ue=t=>{let e=rt[t];return typeof e!="function"&&m("hashes."+t+" not set"),e},_e=t=>B(t,64,"digest");var ut=t=>t instanceof Z?t:m("Point expected"),lt=BigInt(2)**BigInt(256),U=class U{constructor(e,n,s,o){u(this,"X");u(this,"Y");u(this,"Z");u(this,"T");let r=lt;this.X=j(e,BigInt(0),r),this.Y=j(n,BigInt(0),r),this.Z=j(s,BigInt(1),r),this.T=j(o,BigInt(0),r),Object.freeze(this)}static CURVE(){return Dt}static fromAffine(e){return new U(e.x,e.y,BigInt(1),a(e.x*e.y))}static fromBytes(e,n=!1){let s=xt,o=pt(B(e,O)),r=e[31];o[31]=r&-129;let c=yt(o);j(c,BigInt(0),n?lt:tt);let f=a(c*c),d=g(f-BigInt(1)),x=a(s*f+BigInt(1)),{isValid:l,value:h}=Fe(d,x);l||m("bad point: y not sqrt");let b=(h&BigInt(1))===BigInt(1),p=(r&128)!==0;return!n&&h===BigInt(0)&&p&&m("bad point: x==0, isLastByteOdd"),p!==b&&(h=g(-h)),new U(h,c,BigInt(1),a(h*c))}static fromHex(e,n){return U.fromBytes(Nt(e),n)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}assertValidity(){let e=ht,n=xt,s=this;if(s.is0())return m("bad point: ZERO");let{X:o,Y:r,Z:c,T:i}=s,f=a(o*o),d=a(r*r),x=a(c*c),l=a(x*x),h=a(f*e),b=a(x*(h+d)),p=g(l+a(n*a(f*d)));if(b!==p)return m("bad point: equation left != right (1)");let w=a(o*r),A=a(c*i);return w!==A?m("bad point: equation left != right (2)"):this}equals(e){let{X:n,Y:s,Z:o}=this,{X:r,Y:c,Z:i}=ut(e),f=a(n*i),d=a(r*o),x=a(s*i),l=a(c*o);return f===d&&x===l}is0(){return this.equals(N)}negate(){return new U(g(-this.X),this.Y,this.Z,g(-this.T))}double(){let{X:e,Y:n,Z:s}=this,o=ht,r=a(e*e),c=a(n*n),i=a(BigInt(2)*s*s),f=a(o*r),d=g(e+n),x=g(a(d*d)-r-c),l=g(f+c),h=g(l-i),b=g(f-c),p=a(x*h),w=a(l*b),A=a(x*b),E=a(h*l);return new U(p,w,E,A)}add(e){let{X:n,Y:s,Z:o,T:r}=this,{X:c,Y:i,Z:f,T:d}=ut(e),x=ht,l=xt,h=a(n*c),b=a(s*i),p=a(a(r*l)*d),w=a(o*f),A=g(a(g(n+s)*g(c+i))-h-b),E=g(w-p),k=g(w+p),G=g(b-a(x*h)),y=a(A*E),L=a(k*G),S=a(A*G),P=a(E*k);return new U(y,L,P,S)}subtract(e){return this.add(ut(e).negate())}multiply(e,n=!0){if(!n&&e===BigInt(0)||(j(e,BigInt(1),Q),!n&&this.is0()))return N;if(e===BigInt(1))return this;if(this.equals(X))return De(e).p;let s=N,o=X;for(let r=this;e>BigInt(0);r=r.double(),e>>=BigInt(1))e&BigInt(1)?s=s.add(r):n&&(o=o.add(r));return s}multiplyUnsafe(e){return this.multiply(e,!1)}toAffine(){let{X:e,Y:n,Z:s}=this;if(this.equals(N))return{x:BigInt(0),y:BigInt(1)};let o=Te(s,tt);a(s*o)!==BigInt(1)&&m("invalid inverse");let r=a(e*o),c=a(n*o);return{x:r,y:c}}toBytes(){let{x:e,y:n}=this.toAffine(),s=Pt(n);return s[31]|=e&BigInt(1)?128:0,s}toHex(){return jt(this.toBytes())}clearCofactor(){return this.multiply(et(Ae),!1)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){let e=this.multiply(Q/BigInt(2),!1).double();return Q%BigInt(2)&&(e=e.add(this)),e.is0()}};u(U,"BASE"),u(U,"ZERO");var Z=U,X=new Z(Rt,Ot,BigInt(1),g(Rt*Ot)),N=new Z(BigInt(0),BigInt(1),BigInt(1),BigInt(0));Z.BASE=X;Z.ZERO=N;var Pt=t=>Nt(Mt(j(t,BigInt(0),lt),64)).reverse(),yt=t=>et("0x"+jt(pt(B(t)).reverse())),T=(t,e)=>{let n=t;for(;e-- >BigInt(0);)n=a(n*n);return n},Ce=t=>{let e=a(t*t),n=a(e*t),s=a(T(n,BigInt(2))*n),o=a(T(s,BigInt(1))*t),r=a(T(o,BigInt(5))*o),c=a(T(r,BigInt(10))*r),i=a(T(c,BigInt(20))*c),f=a(T(i,BigInt(40))*i),d=a(T(f,BigInt(80))*f),x=a(T(d,BigInt(80))*f),l=a(T(x,BigInt(10))*r);return{pow_p_5_8:a(T(l,BigInt(2))*t),b2:n}},Gt=BigInt("0x2b8324804fc1df0b2b4d00993dfbd7a72f431806ad2fe478c4ee1b274a0ea0b0"),Fe=(t,e)=>{let n=a(e*a(e*e)),s=a(a(n*n)*e),o=Ce(a(t*s)).pow_p_5_8,r=a(t*a(n*o)),c=a(e*a(r*r)),i=r,f=a(r*Gt),d=c===t,x=c===g(-t),l=c===g(-t*Gt);return d&&(r=i),(x||l)&&(r=f),(g(r)&BigInt(1))===BigInt(1)&&(r=g(-r)),{isValid:d||x,value:r}},nt=t=>Kt(yt(t)),gt=(...t)=>Promise.resolve(Ue("sha512Async")(v(...t))).then(_e);var Re=t=>{let e=pt(t),n=e.slice(0,32);n[0]&=248,n[31]&=127,n[31]|=64;let s=e.slice(32,64),o=nt(n),r=X.multiply(o),c=r.toBytes();return{head:n,prefix:s,scalar:o,point:r,pointBytes:c}},vt=t=>gt(B(t,O)).then(Re);var Oe=t=>vt(t).then(e=>e.pointBytes);var Wt=t=>gt(t.hashable).then(t.finish);var Ze=(t,e,n)=>{let{pointBytes:s,scalar:o}=t,r=nt(e),c=X.multiply(r).toBytes();return{hashable:v(c,s,n),finish:d=>{let x=Kt(r+nt(d)*o);return B(v(c,Pt(x)),64)}}},It=async(t,e)=>{let n=B(t),s=await vt(e),o=await gt(s.prefix,n);return Wt(Ze(s,o,n))};var qt={zip215:!0},ke=(t,e,n,s=qt)=>{t=B(t,64),e=B(e),n=B(n,O);let{zip215:o=!0}=s,r=t.subarray(0,O),c=yt(t.subarray(O,O*2)),i,f,d,x=Uint8Array.of(),l=!1;try{i=Z.fromBytes(n,o),f=Z.fromBytes(r,o),d=X.multiply(c,!1),x=v(r,n,e),l=!0}catch{}return{hashable:x,finish:b=>{if(!l||!o&&i.isSmallOrder())return!1;let p=nt(b);return f.add(i.multiply(p,!1)).subtract(d).clearCofactor().is0()}}},zt=async(t,e,n,s=qt)=>Wt(ke(t,e,n,s));var rt={sha512Async:async t=>{let e=Le(),n=v(t);return ot(await e.digest("SHA-512",n.buffer))},sha512:void 0},Ge=t=>(t=t===void 0?Se(O):t,B(t,O));var Vt=async t=>{let e=Ge(t),n=await Oe(e);return{secretKey:e,publicKey:n}};var st=8,Xe=256,Jt=Math.ceil(Xe/st)+1,bt=2**(st-1),Ye=()=>{let t=[],e=X,n=e;for(let s=0;s<Jt;s++){n=e,t.push(n);for(let o=1;o<bt;o++)n=n.add(e),t.push(n);e=n.double()}return t},Xt,Yt=(t,e)=>{let n=e.negate();return t?n:e},De=t=>{let e=Xt||(Xt=Ye()),n=N,s=X,o=2**st,r=o,c=et(o-1),i=et(st);for(let f=0;f<Jt;f++){let d=Number(t&c);t>>=i,d>bt&&(d-=r,t+=BigInt(1));let x=f*bt,l=x,h=x+Math.abs(d)-1,b=f%2!==0,p=d<0;d===0?s=s.add(Yt(b,e[l])):n=n.add(Yt(p,e[h]))}return t!==BigInt(0)&&m("invalid wnaf"),{p:n,f:s}};var ct=BigInt(4294967295),Qt=BigInt(32);function je(t,e=!1){return e?{h:Number(t&ct),l:Number(t>>Qt&ct)}:{h:Number(t>>Qt&ct)|0,l:Number(t&ct)|0}}function te(t,e=!1){let n=t.length,s=new Uint32Array(n),o=new Uint32Array(n);for(let r=0;r<n;r++){let{h:c,l:i}=je(t[r],e);[s[r],o[r]]=[c,i]}return[s,o]}var Ne=t=>t/2**32|0,$e=t=>t>>>0;function ee(t,e,n,s){let o=Ne(n),r=$e(n);t.setUint32(e,s?r:o,s),t.setUint32(e+4,s?o:r,s)}var wt=(t,e,n)=>t>>>n,At=(t,e,n)=>t<<32-n|e>>>n,$=(t,e,n)=>t>>>n|e<<32-n,K=(t,e,n)=>t<<32-n|e>>>n,W=(t,e,n)=>t<<64-n|e>>>n-32,I=(t,e,n)=>t>>>n-32|e<<64-n;function _(t,e,n,s){let o=(e>>>0)+(s>>>0);return{h:t+n+(o/2**32|0)|0,l:o|0}}var ne=(t,e,n)=>(t>>>0)+(e>>>0)+(n>>>0),se=(t,e,n,s)=>e+n+s+(t/2**32|0)|0,oe=(t,e,n,s)=>(t>>>0)+(e>>>0)+(n>>>0)+(s>>>0),re=(t,e,n,s,o)=>e+n+s+o+(t/2**32|0)|0,ce=(t,e,n,s,o)=>(t>>>0)+(e>>>0)+(n>>>0)+(s>>>0)+(o>>>0),fe=(t,e,n,s,o,r)=>e+n+s+o+r+(t/2**32|0)|0;function ie(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in t&&t.BYTES_PER_ELEMENT===1}var mt=t=>t?`"${t}" `:"";function Pe(t,e=""){if(typeof t!="number")throw new TypeError(mt(e)+"expected number, got "+typeof t);if(!Number.isSafeInteger(t)||t<0)throw new RangeError(mt(e)+"expected integer >= 0, got "+t);return t}function Et(t,e,n=""){if(ie(t)&&(e===void 0||t.length===e))return t;e!==void 0&&Pe(e,"length");let s=ie(t),o=e!==void 0?` of length ${e}`:"",r=s?`length=${t.length}`:`type=${typeof t}`,c=mt(n)+"expected Uint8Array"+o+", got "+r;throw s?new RangeError(c):new TypeError(c)}var ae=(t,e)=>{if(t===null||typeof t!="object"||Array.isArray(t))throw new TypeError((e==="object"?"":`"${e}" `)+"expected object, got type="+typeof t)};function Bt(t,e=!0){if(t.destroyed)throw new Error("hash was destroyed");if(e&&t.finished)throw new Error("digest() was already called")}function de(t,e){Et(t,void 0,"output");let n=e.outputLen;if(!(t.length>=n))throw new RangeError('"output" expected length >= '+n)}function q(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function ft(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function H(t,e){return t<<32-e|t>>>e}function ve(t,e,n="opts"){return ae(t,"defaults"),e!==void 0&&ae(e,n),Object.assign(t,e)}function Ht(t,e={}){if(typeof t!="function")throw new TypeError('"hashCons" expected function, got type='+typeof t);e=ve({},e,"info");let n=(o,r)=>t(r).update(o).digest(),s=t(void 0);return n.outputLen=s.outputLen,n.blockLen=s.blockLen,n.canXOF=s.canXOF,n.create=o=>t(o),Object.assign(n,e),Object.freeze(n)}var Lt=t=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,t])});function he(t,e,n){return t&e^~t&n}function xe(t,e,n){return t&e^t&n^e&n}var z=class{constructor(e,n,s,o){u(this,"blockLen");u(this,"outputLen");u(this,"canXOF",!1);u(this,"padOffset");u(this,"isLE");u(this,"buffer");u(this,"view");u(this,"finished",!1);u(this,"length",0);u(this,"pos",0);u(this,"destroyed",!1);this.blockLen=e,this.outputLen=n,this.padOffset=s,this.isLE=o,this.buffer=new Uint8Array(e),this.view=ft(this.buffer)}update(e){Bt(this),Et(e);let{view:n,buffer:s,blockLen:o}=this,r=e.length,c=!1;for(let i=0;i<r;){let f=Math.min(o-this.pos,r-i);if(f===o){let d=ft(e);for(;o<=r-i;i+=o)this.process(d,i);c=!0;continue}s.set(i===0&&f===r?e:e.subarray(i,i+f),this.pos),this.pos+=f,i+=f,this.pos===o&&(this.process(n,0),this.pos=0,c=!0)}return this.length+=e.length,c&&this.roundClean(),this}digestInto(e){Bt(this),de(e,this),this.finished=!0;let{buffer:n,view:s,blockLen:o,isLE:r}=this,{pos:c}=this;n[c++]=128,n.fill(0,c),this.padOffset>o-c&&(this.process(s,0),n.fill(0)),ee(s,o-8,this.length*8,r),this.process(s,0),this.roundClean();let i=e===n?s:ft(e),f=this.outputLen,d=f/4,x=this.get();if(f%4||d>x.length)throw new Error("invalid outputLen");for(let l=0;l<d;l++)i.setUint32(4*l,x[l],r)}digest(){let{buffer:e,outputLen:n}=this;this.digestInto(e);let s=e.slice(0,n);return this.destroy(),s}_cloneIntoMeta(e){let{buffer:n,length:s,finished:o,destroyed:r,pos:c}=this;return e.destroyed=r,e.finished=o,e.length=s,e.pos=c,c&&e.buffer.set(n),e}clone(){return this._cloneInto()}},ue=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);var le=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]);var We=Uint32Array.from([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]),Y=new Uint32Array(64),St=class extends z{constructor(n,s){super(64,n,8,!1);u(this,"A",0);u(this,"B",0);u(this,"C",0);u(this,"D",0);u(this,"E",0);u(this,"F",0);u(this,"G",0);u(this,"H",0);this.A=s[0]|0,this.B=s[1]|0,this.C=s[2]|0,this.D=s[3]|0,this.E=s[4]|0,this.F=s[5]|0,this.G=s[6]|0,this.H=s[7]|0}get(){let{A:n,B:s,C:o,D:r,E:c,F:i,G:f,H:d}=this;return[n,s,o,r,c,i,f,d]}set(n,s,o,r,c,i,f,d){this.A=n|0,this.B=s|0,this.C=o|0,this.D=r|0,this.E=c|0,this.F=i|0,this.G=f|0,this.H=d|0}_cloneInto(n){return(n||(n=new this.constructor)).set(...this.get()),this._cloneIntoMeta(n)}process(n,s){for(let h=0;h<16;h++,s+=4)Y[h]=n.getUint32(s,!1);for(let h=16;h<64;h++){let b=Y[h-15],p=Y[h-2],w=H(b,7)^H(b,18)^b>>>3,A=H(p,17)^H(p,19)^p>>>10;Y[h]=A+Y[h-7]+w+Y[h-16]|0}let{A:o,B:r,C:c,D:i,E:f,F:d,G:x,H:l}=this;for(let h=0;h<64;h++){let b=H(f,6)^H(f,11)^H(f,25),p=l+b+he(f,d,x)+We[h]+Y[h]|0,A=(H(o,2)^H(o,13)^H(o,22))+xe(o,r,c)|0;l=x,x=d,d=f,f=i+p|0,i=c,c=r,r=o,o=p+A|0}o=o+this.A|0,r=r+this.B|0,c=c+this.C|0,i=i+this.D|0,f=f+this.E|0,d=d+this.F|0,x=x+this.G|0,l=l+this.H|0,this.set(o,r,c,i,f,d,x,l)}roundClean(){q(Y)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),q(this.buffer)}},Tt=class extends St{constructor(){super(32,ue)}};var be=te(["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(t=>BigInt(t))),Ie=be[0],qe=be[1],D=new Uint32Array(80),M=new Uint32Array(80),Ut=class extends z{constructor(n,s){super(128,n,16,!1);u(this,"Ah",0);u(this,"Al",0);u(this,"Bh",0);u(this,"Bl",0);u(this,"Ch",0);u(this,"Cl",0);u(this,"Dh",0);u(this,"Dl",0);u(this,"Eh",0);u(this,"El",0);u(this,"Fh",0);u(this,"Fl",0);u(this,"Gh",0);u(this,"Gl",0);u(this,"Hh",0);u(this,"Hl",0);this.Ah=s[0]|0,this.Al=s[1]|0,this.Bh=s[2]|0,this.Bl=s[3]|0,this.Ch=s[4]|0,this.Cl=s[5]|0,this.Dh=s[6]|0,this.Dl=s[7]|0,this.Eh=s[8]|0,this.El=s[9]|0,this.Fh=s[10]|0,this.Fl=s[11]|0,this.Gh=s[12]|0,this.Gl=s[13]|0,this.Hh=s[14]|0,this.Hl=s[15]|0}get(){let{Ah:n,Al:s,Bh:o,Bl:r,Ch:c,Cl:i,Dh:f,Dl:d,Eh:x,El:l,Fh:h,Fl:b,Gh:p,Gl:w,Hh:A,Hl:E}=this;return[n,s,o,r,c,i,f,d,x,l,h,b,p,w,A,E]}set(n,s,o,r,c,i,f,d,x,l,h,b,p,w,A,E){this.Ah=n|0,this.Al=s|0,this.Bh=o|0,this.Bl=r|0,this.Ch=c|0,this.Cl=i|0,this.Dh=f|0,this.Dl=d|0,this.Eh=x|0,this.El=l|0,this.Fh=h|0,this.Fl=b|0,this.Gh=p|0,this.Gl=w|0,this.Hh=A|0,this.Hl=E|0}_cloneInto(n){return(n||(n=new this.constructor)).set(...this.get()),this._cloneIntoMeta(n)}process(n,s){for(let y=0;y<16;y++,s+=4)D[y]=n.getUint32(s),M[y]=n.getUint32(s+=4);for(let y=16;y<80;y++){let L=D[y-15]|0,S=M[y-15]|0,P=$(L,S,1)^$(L,S,8)^wt(L,S,7),it=K(L,S,1)^K(L,S,8)^At(L,S,7),C=D[y-2]|0,F=M[y-2]|0,V=$(C,F,19)^W(C,F,61)^wt(C,F,6),at=K(C,F,19)^I(C,F,61)^At(C,F,6),J=oe(it,at,M[y-7],M[y-16]),dt=re(J,P,V,D[y-7],D[y-16]);D[y]=dt|0,M[y]=J|0}let{Ah:o,Al:r,Bh:c,Bl:i,Ch:f,Cl:d,Dh:x,Dl:l,Eh:h,El:b,Fh:p,Fl:w,Gh:A,Gl:E,Hh:k,Hl:G}=this;for(let y=0;y<80;y++){let L=$(h,b,14)^$(h,b,18)^W(h,b,41),S=K(h,b,14)^K(h,b,18)^I(h,b,41),P=h&p^~h&A,it=b&w^~b&E,C=ce(G,S,it,qe[y],M[y]),F=fe(C,k,L,P,Ie[y],D[y]),V=C|0,at=$(o,r,28)^W(o,r,34)^W(o,r,39),J=K(o,r,28)^I(o,r,34)^I(o,r,39),dt=o&c^o&f^c&f,ye=r&i^r&d^i&d;k=A|0,G=E|0,A=p|0,E=w|0,p=h|0,w=b|0,{h,l:b}=_(x|0,l|0,F|0,V|0),x=f|0,l=d|0,f=c|0,d=i|0,c=o|0,i=r|0;let Ft=ne(V,J,ye);o=se(Ft,F,at,dt),r=Ft|0}({h:o,l:r}=_(this.Ah|0,this.Al|0,o|0,r|0)),{h:c,l:i}=_(this.Bh|0,this.Bl|0,c|0,i|0),{h:f,l:d}=_(this.Ch|0,this.Cl|0,f|0,d|0),{h:x,l}=_(this.Dh|0,this.Dl|0,x|0,l|0),{h,l:b}=_(this.Eh|0,this.El|0,h|0,b|0),{h:p,l:w}=_(this.Fh|0,this.Fl|0,p|0,w|0),{h:A,l:E}=_(this.Gh|0,this.Gl|0,A|0,E|0),{h:k,l:G}=_(this.Hh|0,this.Hl|0,k|0,G|0),this.set(o,r,c,i,f,d,x,l,h,b,p,w,A,E,k,G)}roundClean(){q(D,M)}destroy(){this.destroyed=!0,q(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},_t=class extends Ut{constructor(){super(64,le)}};var pe=Ht(()=>new Tt,Lt(1));var Ct=Ht(()=>new _t,Lt(3));rt.sha512=Ct;rt.sha512Async=async(...t)=>Ct(...t);var ze=t=>Array.from(t,e=>e.toString(16).padStart(2,"0")).join("");globalThis.EP={sha256:pe,keygenAsync:Vt,signAsync:It,verifyAsync:zt,hex:ze};})();