function G(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function w(e,...t){if(!G(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function E(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function D(e,t){w(e);let n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function y(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function H(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function a(e,t){return e<<32-t|e>>>t}function V(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function U(e){return typeof e=="string"&&(e=V(e)),w(e),e}var A=class{};function S(e){let t=s=>e().update(U(s)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function T(e,t,n,s){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,s);let o=BigInt(32),f=BigInt(4294967295),r=Number(n>>o&f),i=Number(n&f),h=s?4:0,x=s?0:4;e.setUint32(t+h,r,s),e.setUint32(t+x,i,s)}function F(e,t,n){return e&t^~e&n}function I(e,t,n){return e&t^e&n^t&n}var B=class extends A{constructor(t,n,s,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=s,this.isLE=o,this.buffer=new Uint8Array(t),this.view=H(this.buffer)}update(t){E(this),t=U(t),w(t);let{view:n,buffer:s,blockLen:o}=this,f=t.length;for(let r=0;r<f;){let i=Math.min(o-this.pos,f-r);if(i===o){let h=H(t);for(;o<=f-r;r+=o)this.process(h,r);continue}s.set(t.subarray(r,r+i),this.pos),this.pos+=i,r+=i,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){E(this),D(t,this),this.finished=!0;let{buffer:n,view:s,blockLen:o,isLE:f}=this,{pos:r}=this;n[r++]=128,y(this.buffer.subarray(r)),this.padOffset>o-r&&(this.process(s,0),r=0);for(let c=r;c<o;c++)n[c]=0;T(s,o-8,BigInt(this.length*8),f),this.process(s,0);let i=H(t),h=this.outputLen;if(h%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let x=h/4,u=this.get();if(x>u.length)throw new Error("_sha2: outputLen bigger than state");for(let c=0;c<x;c++)i.setUint32(4*c,u[c],f)}digest(){let{buffer:t,outputLen:n}=this;this.digestInto(t);let s=t.slice(0,n);return this.destroy(),s}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:n,buffer:s,length:o,finished:f,destroyed:r,pos:i}=this;return t.destroyed=r,t.finished=f,t.length=o,t.pos=i,o%n&&t.buffer.set(s),t}clone(){return this._cloneInto()}},d=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),b=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]);var k=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]),l=new Uint32Array(64),m=class extends B{constructor(t=32){super(64,t,8,!1),this.A=d[0]|0,this.B=d[1]|0,this.C=d[2]|0,this.D=d[3]|0,this.E=d[4]|0,this.F=d[5]|0,this.G=d[6]|0,this.H=d[7]|0}get(){let{A:t,B:n,C:s,D:o,E:f,F:r,G:i,H:h}=this;return[t,n,s,o,f,r,i,h]}set(t,n,s,o,f,r,i,h){this.A=t|0,this.B=n|0,this.C=s|0,this.D=o|0,this.E=f|0,this.F=r|0,this.G=i|0,this.H=h|0}process(t,n){for(let c=0;c<16;c++,n+=4)l[c]=t.getUint32(n,!1);for(let c=16;c<64;c++){let g=l[c-15],p=l[c-2],_=a(g,7)^a(g,18)^g>>>3,L=a(p,17)^a(p,19)^p>>>10;l[c]=L+l[c-7]+_+l[c-16]|0}let{A:s,B:o,C:f,D:r,E:i,F:h,G:x,H:u}=this;for(let c=0;c<64;c++){let g=a(i,6)^a(i,11)^a(i,25),p=u+g+F(i,h,x)+k[c]+l[c]|0,L=(a(s,2)^a(s,13)^a(s,22))+I(s,o,f)|0;u=x,x=h,h=i,i=r+p|0,r=f,f=o,o=s,s=p+L|0}s=s+this.A|0,o=o+this.B|0,f=f+this.C|0,r=r+this.D|0,i=i+this.E|0,h=h+this.F|0,x=x+this.G|0,u=u+this.H|0,this.set(s,o,f,r,i,h,x,u)}roundClean(){y(l)}destroy(){this.set(0,0,0,0,0,0,0,0),y(this.buffer)}},C=class extends m{constructor(){super(28),this.A=b[0]|0,this.B=b[1]|0,this.C=b[2]|0,this.D=b[3]|0,this.E=b[4]|0,this.F=b[5]|0,this.G=b[6]|0,this.H=b[7]|0}};var J=S(()=>new m),X=S(()=>new C);export{J as a,X as b};
/*! Bundled license information:

@noble/hashes/esm/utils.js:
  (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
*/
//# sourceMappingURL=chunk-W4OHPIZF.js.map
