const w=Object.freeze({ignoreUnknown:!1,respectType:!1,respectFunctionNames:!1,respectFunctionProperties:!1,unorderedObjects:!0,unorderedArrays:!1,unorderedSets:!1,excludeKeys:void 0,excludeValues:void 0,replacer:void 0});function B(n,r){r?r={...w,...r}:r=w;const s=b(r);return s.dispatch(n),s.toString()}const H=Object.freeze(["prototype","__proto__","constructor"]);function b(n){let r="",s=new Map;const t=e=>{r+=e};return{toString(){return r},getContext(){return s},dispatch(e){return n.replacer&&(e=n.replacer(e)),this[e===null?"null":typeof e](e)},object(e){if(e&&typeof e.toJSON=="function")return this.object(e.toJSON());const i=Object.prototype.toString.call(e);let a="";const h=i.length;h<10?a="unknown:["+i+"]":a=i.slice(8,h-1),a=a.toLowerCase();let o=null;if((o=s.get(e))===void 0)s.set(e,s.size);else return this.dispatch("[CIRCULAR:"+o+"]");if(typeof Buffer<"u"&&Buffer.isBuffer&&Buffer.isBuffer(e))return t("buffer:"),t(e.toString("utf8"));if(a!=="object"&&a!=="function"&&a!=="asyncfunction")this[a]?this[a](e):n.ignoreUnknown||this.unkown(e,a);else{let l=Object.keys(e);n.unorderedObjects&&(l=l.sort());let u=[];n.respectType!==!1&&!_(e)&&(u=H),n.excludeKeys&&(l=l.filter(c=>!n.excludeKeys(c)),u=u.filter(c=>!n.excludeKeys(c))),t("object:"+(l.length+u.length)+":");const f=c=>{this.dispatch(c),t(":"),n.excludeValues||this.dispatch(e[c]),t(",")};for(const c of l)f(c);for(const c of u)f(c)}},array(e,i){if(i=i===void 0?n.unorderedArrays!==!1:i,t("array:"+e.length+":"),!i||e.length<=1){for(const o of e)this.dispatch(o);return}const a=new Map,h=e.map(o=>{const l=b(n);l.dispatch(o);for(const[u,f]of l.getContext())a.set(u,f);return l.toString()});return s=a,h.sort(),this.array(h,!1)},date(e){return t("date:"+e.toJSON())},symbol(e){return t("symbol:"+e.toString())},unkown(e,i){if(t(i),!!e&&(t(":"),e&&typeof e.entries=="function"))return this.array(Array.from(e.entries()),!0)},error(e){return t("error:"+e.toString())},boolean(e){return t("bool:"+e)},string(e){t("string:"+e.length+":"),t(e)},function(e){t("fn:"),_(e)?this.dispatch("[native]"):this.dispatch(e.toString()),n.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(e.name)),n.respectFunctionProperties&&this.object(e)},number(e){return t("number:"+e)},xml(e){return t("xml:"+e.toString())},null(){return t("Null")},undefined(){return t("Undefined")},regexp(e){return t("regex:"+e.toString())},uint8array(e){return t("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},uint8clampedarray(e){return t("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(e))},int8array(e){return t("int8array:"),this.dispatch(Array.prototype.slice.call(e))},uint16array(e){return t("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},int16array(e){return t("int16array:"),this.dispatch(Array.prototype.slice.call(e))},uint32array(e){return t("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},int32array(e){return t("int32array:"),this.dispatch(Array.prototype.slice.call(e))},float32array(e){return t("float32array:"),this.dispatch(Array.prototype.slice.call(e))},float64array(e){return t("float64array:"),this.dispatch(Array.prototype.slice.call(e))},arraybuffer(e){return t("arraybuffer:"),this.dispatch(new Uint8Array(e))},url(e){return t("url:"+e.toString())},map(e){t("map:");const i=[...e];return this.array(i,n.unorderedSets!==!1)},set(e){t("set:");const i=[...e];return this.array(i,n.unorderedSets!==!1)},file(e){return t("file:"),this.dispatch([e.name,e.size,e.type,e.lastModfied])},blob(){if(n.ignoreUnknown)return t("[blob]");throw new Error(`Hashing Blob objects is currently not supported Use "options.replacer" or "options.ignoreUnknown" `)},domwindow(){return t("domwindow")},bigint(e){return t("bigint:"+e.toString())},process(){return t("process")},timer(){return t("timer")},pipe(){return t("pipe")},tcp(){return t("tcp")},udp(){return t("udp")},tty(){return t("tty")},statwatcher(){return t("statwatcher")},securecontext(){return t("securecontext")},connection(){return t("connection")},zlib(){return t("zlib")},context(){return t("context")},nodescript(){return t("nodescript")},httpparser(){return t("httpparser")},dataview(){return t("dataview")},signal(){return t("signal")},fsevent(){return t("fsevent")},tlswrap(){return t("tlswrap")}}}const x="[native code] }",K=x.length;function _(n){return typeof n!="function"?!1:Function.prototype.toString.call(n).slice(-K)===x}class d{constructor(r,s){r=this.words=r||[],this.sigBytes=s===void 0?r.length*4:s}toString(r){return(r||M).stringify(this)}concat(r){if(this.clamp(),this.sigBytes%4)for(let s=0;s>>2]>>>24-s%4*8&255;this.words[this.sigBytes+s>>>2]|=t<<24-(this.sigBytes+s)%4*8}else for(let s=0;s>>2]=r.words[s>>>2];return this.sigBytes+=r.sigBytes,this}clamp(){this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4)}clone(){return new d([...this.words])}}const M={stringify(n){const r=[];for(let s=0;s>>2]>>>24-s%4*8&255;r.push((t>>>4).toString(16),(t&15).toString(16))}return r.join("")}},N={stringify(n){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",s=[];for(let t=0;t>>2]>>>24-t%4*8&255,i=n.words[t+1>>>2]>>>24-(t+1)%4*8&255,a=n.words[t+2>>>2]>>>24-(t+2)%4*8&255,h=e<<16|i<<8|a;for(let o=0;o<4&&t*8+o*6>>6*(3-o)&63))}return s.join("")}},O={parse(n){const r=n.length,s=[];for(let t=0;t>>2]|=(n.charCodeAt(t)&255)<<24-t%4*8;return new d(s,r)}},L={parse(n){return O.parse(unescape(encodeURIComponent(n)))}};class j{constructor(){this._data=new d,this._nDataBytes=0,this._minBufferSize=0,this.blockSize=512/32}reset(){this._data=new d,this._nDataBytes=0}_append(r){typeof r=="string"&&(r=L.parse(r)),this._data.concat(r),this._nDataBytes+=r.sigBytes}_doProcessBlock(r,s){}_process(r){let s,t=this._data.sigBytes/(this.blockSize*4);r?t=Math.ceil(t):t=Math.max((t|0)-this._minBufferSize,0);const e=t*this.blockSize,i=Math.min(e*4,this._data.sigBytes);if(e){for(let a=0;a>>7)^(p<<14|p>>>18)^p>>>3,g=y[c-2],U=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;y[c]=F+y[c-7]+U+y[c-16]}const k=o&l^~o&u,z=e&i^e&a^i&a,A=(e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22),v=(o<<26|o>>>6)^(o<<21|o>>>11)^(o<<7|o>>>25),m=f+v+k+R[c]+y[c],C=A+z;f=u,u=l,l=o,o=h+m|0,h=a,a=i,i=e,e=m+C|0}t[0]=t[0]+e|0,t[1]=t[1]+i|0,t[2]=t[2]+a|0,t[3]=t[3]+h|0,t[4]=t[4]+o|0,t[5]=t[5]+l|0,t[6]=t[6]+u|0,t[7]=t[7]+f|0}finalize(r){super.finalize(r);const s=this._nDataBytes*8,t=this._data.sigBytes*8;return this._data.words[t>>>5]|=128<<24-t%32,this._data.words[(t+64>>>9<<4)+14]=Math.floor(s/4294967296),this._data.words[(t+64>>>9<<4)+15]=s,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}}function T(n){return new D().finalize(n).toString(N)}function W(n,r={}){const s=typeof n=="string"?n:B(n,r);return T(s).slice(0,10)}function J(n,r,s={}){return n===r||B(n,s)===B(r,s)}export{W as h,J as i};