var ar=Object.create;var Ie=Object.defineProperty;var nr=Object.getOwnPropertyDescriptor;var ir=Object.getOwnPropertyNames;var fr=Object.getPrototypeOf,or=Object.prototype.hasOwnProperty;var R=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),sr=(e,t)=>{for(var a in t)Ie(e,a,{get:t[a],enumerable:!0})},et=(e,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ir(t))!or.call(e,n)&&n!==a&&Ie(e,n,{get:()=>t[n],enumerable:!(r=nr(t,n))||r.enumerable});return e};var fe=(e,t,a)=>(a=e!=null?ar(fr(e)):{},et(t||!e||!e.__esModule?Ie(a,"default",{value:e,enumerable:!0}):a,e)),cr=e=>et(Ie({},"__esModule",{value:!0}),e);var Y=R((Cr,tt)=>{tt.exports={options:{usePureJavaScript:!1}}});var nt=R((Ar,at)=>{var Oe={};at.exports=Oe;var rt={};Oe.encode=function(e,t,a){if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');if(a!==void 0&&typeof a!="number")throw new TypeError('"maxline" must be a number.');var r="";if(!(e instanceof Uint8Array))r=hr(e,t);else{var n=0,i=t.length,o=t.charAt(0),f=[0];for(n=0;n0;)f.push(s%i),s=s/i|0}for(n=0;e[n]===0&&n=0;--n)r+=t[f[n]]}if(a){var c=new RegExp(".{1,"+a+"}","g");r=r.match(c).join(`\r `)}return r};Oe.decode=function(e,t){if(typeof e!="string")throw new TypeError('"input" must be a string.');if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');var a=rt[t];if(!a){a=rt[t]=[];for(var r=0;r>=8;for(;s>0;)o.push(s&255),s>>=8}for(var c=0;e[c]===i&&c0;)i.push(f%r),f=f/r|0}var x="";for(a=0;e.at(a)===0&&a=0;--a)x+=t[i[a]];return x}});var K=R((Fr,st)=>{var it=Y(),ft=nt(),h=st.exports=it.util=it.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){h.nextTick=process.nextTick,typeof setImmediate=="function"?h.setImmediate=setImmediate:h.setImmediate=h.nextTick;return}if(typeof setImmediate=="function"){h.setImmediate=function(){return setImmediate.apply(void 0,arguments)},h.nextTick=function(f){return setImmediate(f)};return}if(h.setImmediate=function(f){setTimeout(f,0)},typeof window<"u"&&typeof window.postMessage=="function"){let f=function(x){if(x.source===window&&x.data===e){x.stopPropagation();var s=t.slice();t.length=0,s.forEach(function(c){c()})}};var o=f,e="forge.setImmediate",t=[];h.setImmediate=function(x){t.push(x),t.length===1&&window.postMessage(e,"*")},window.addEventListener("message",f,!0)}if(typeof MutationObserver<"u"){var a=Date.now(),r=!0,n=document.createElement("div"),t=[];new MutationObserver(function(){var x=t.slice();t.length=0,x.forEach(function(s){s()})}).observe(n,{attributes:!0});var i=h.setImmediate;h.setImmediate=function(x){Date.now()-a>15?(a=Date.now(),i(x)):(t.push(x),t.length===1&&n.setAttribute("a",r=!r))}}h.nextTick=h.setImmediate})();h.isNodejs=typeof process<"u"&&process.versions&&process.versions.node;h.globalScope=function(){return h.isNodejs?global:typeof self>"u"?window:self}();h.isArray=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};h.isArrayBuffer=function(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer};h.isArrayBufferView=function(e){return e&&h.isArrayBuffer(e.buffer)&&e.byteLength!==void 0};function ve(e){if(!(e===8||e===16||e===24||e===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}h.ByteBuffer=Me;function Me(e){if(this.data="",this.read=0,typeof e=="string")this.data=e;else if(h.isArrayBuffer(e)||h.isArrayBufferView(e))if(typeof Buffer<"u"&&e instanceof Buffer)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch{for(var a=0;axr&&(this.data.substr(0,1),this._constructedStringLength=0)};h.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};h.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0};h.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))};h.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var a=this.data;t>0;)t&1&&(a+=e),t>>>=1,t>0&&(e+=e);return this.data=a,this._optimizeConstructedString(t),this};h.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this};h.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(h.encodeUtf8(e))};h.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};h.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};h.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};h.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255))};h.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))};h.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))};h.ByteStringBuffer.prototype.putInt=function(e,t){ve(t);var a="";do t-=8,a+=String.fromCharCode(e>>t&255);while(t>0);return this.putBytes(a)};h.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<0);return t};h.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),a=2<=a&&(t-=a<<1),t};h.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t};h.ByteStringBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)};h.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)};h.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this};h.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};h.ByteStringBuffer.prototype.copy=function(){var e=h.createBuffer(this.data);return e.read=this.read,e};h.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this};h.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this};h.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this};h.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t=e)return this;t=Math.max(t||this.growSize,e);var a=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),r=new Uint8Array(this.length()+t);return r.set(a),this.data=new DataView(r.buffer),this};h.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this};h.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var a=0;a>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this};h.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this};h.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this};h.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this};h.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this};h.DataBuffer.prototype.putInt=function(e,t){ve(t),this.accommodate(t/8);do t-=8,this.data.setInt8(this.write++,e>>t&255);while(t>0);return this};h.DataBuffer.prototype.putSignedInt=function(e,t){return ve(t),this.accommodate(t/8),e<0&&(e+=2<0);return t};h.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),a=2<=a&&(t-=a<<1),t};h.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t};h.DataBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)};h.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)};h.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this};h.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};h.DataBuffer.prototype.copy=function(){return new h.DataBuffer(this)};h.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this};h.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this};h.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this};h.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t0;)t&1&&(a+=e),t>>>=1,t>0&&(e+=e);return a};h.xorBytes=function(e,t,a){for(var r="",n="",i="",o=0,f=0;a>0;--a,++o)n=e.charCodeAt(o)^t.charCodeAt(o),f>=10&&(r+=i,i="",f=0),i+=String.fromCharCode(n),++f;return r+=i,r};h.hexToBytes=function(e){var t="",a=0;for(e.length&!0&&(a=1,t+=String.fromCharCode(parseInt(e[0],16)));a>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255)};var oe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",se=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],ot="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";h.encode64=function(e,t){for(var a="",r="",n,i,o,f=0;f>2),a+=oe.charAt((n&3)<<4|i>>4),isNaN(i)?a+="==":(a+=oe.charAt((i&15)<<2|o>>6),a+=isNaN(o)?"=":oe.charAt(o&63)),t&&a.length>t&&(r+=a.substr(0,t)+`\r `,a=a.substr(t));return r+=a,r};h.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t="",a,r,n,i,o=0;o>4),n!==64&&(t+=String.fromCharCode((r&15)<<4|n>>2),i!==64&&(t+=String.fromCharCode((n&3)<<6|i)));return t};h.encodeUtf8=function(e){return unescape(encodeURIComponent(e))};h.decodeUtf8=function(e){return decodeURIComponent(escape(e))};h.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:ft.encode,decode:ft.decode}};h.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)};h.binary.raw.decode=function(e,t,a){var r=t;r||(r=new Uint8Array(e.length)),a=a||0;for(var n=a,i=0;i>2),a+=oe.charAt((n&3)<<4|i>>4),isNaN(i)?a+="==":(a+=oe.charAt((i&15)<<2|o>>6),a+=isNaN(o)?"=":oe.charAt(o&63)),t&&a.length>t&&(r+=a.substr(0,t)+`\r `,a=a.substr(t));return r+=a,r};h.binary.base64.decode=function(e,t,a){var r=t;r||(r=new Uint8Array(Math.ceil(e.length/4)*3)),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,""),a=a||0;for(var n,i,o,f,x=0,s=a;x>4,o!==64&&(r[s++]=(i&15)<<4|o>>2,f!==64&&(r[s++]=(o&3)<<6|f));return t?s-a:r.subarray(0,s)};h.binary.base58.encode=function(e,t){return h.binary.baseN.encode(e,ot,t)};h.binary.base58.decode=function(e,t){return h.binary.baseN.decode(e,ot,t)};h.text={utf8:{},utf16:{}};h.text.utf8.encode=function(e,t,a){e=h.encodeUtf8(e);var r=t;r||(r=new Uint8Array(e.length)),a=a||0;for(var n=a,i=0;i"u"&&(a=["web","flash"]);var n,i=!1,o=null;for(var f in a){n=a[f];try{if(n==="flash"||n==="both"){if(t[0]===null)throw new Error("Flash local storage not available.");r=e.apply(this,t),i=n==="flash"}(n==="web"||n==="both")&&(t[0]=localStorage,r=e.apply(this,t),i=!0)}catch(x){o=x}if(i)break}if(!i)throw o;return r};h.setItem=function(e,t,a,r,n){we(dr,arguments,n)};h.getItem=function(e,t,a,r){return we(lr,arguments,r)};h.removeItem=function(e,t,a,r){we(gr,arguments,r)};h.clearItems=function(e,t,a){we(br,arguments,a)};h.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0};h.format=function(e){for(var t=/%./g,a,r,n=0,i=[],o=0;a=t.exec(e);){r=e.substring(o,t.lastIndex-2),r.length>0&&i.push(r),o=t.lastIndex;var f=a[0][1];switch(f){case"s":case"o":n");break;case"%":i.push("%");break;default:i.push("<%"+f+"?>")}}return i.push(e.substring(o)),i.join("")};h.formatNumber=function(e,t,a,r){var n=e,i=isNaN(t=Math.abs(t))?2:t,o=a===void 0?",":a,f=r===void 0?".":r,x=n<0?"-":"",s=parseInt(n=Math.abs(+n||0).toFixed(i),10)+"",c=s.length>3?s.length%3:0;return x+(c?s.substr(0,c)+f:"")+s.substr(c).replace(/(\d{3})(?=\d)/g,"$1"+f)+(i?o+Math.abs(n-s).toFixed(i).slice(2):"")};h.formatSize=function(e){return e>=1073741824?e=h.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?e=h.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?e=h.formatNumber(e/1024,0)+" KiB":e=h.formatNumber(e,0)+" bytes",e};h.bytesFromIP=function(e){return e.indexOf(".")!==-1?h.bytesFromIPv4(e):e.indexOf(":")!==-1?h.bytesFromIPv6(e):null};h.bytesFromIPv4=function(e){if(e=e.split("."),e.length!==4)return null;for(var t=h.createBuffer(),a=0;aa[r].end-a[r].start&&(r=a.length-1))}t.push(i)}if(a.length>0){var x=a[r];x.end-x.start>0&&(t.splice(x.start,x.end-x.start+1,""),x.start===0&&t.unshift(""),x.end===7&&t.push(""))}return t.join(":")};h.estimateCores=function(e,t){if(typeof e=="function"&&(t=e,e={}),e=e||{},"cores"in h&&!e.update)return t(null,h.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return h.cores=navigator.hardwareConcurrency,t(null,h.cores);if(typeof Worker>"u")return h.cores=1,t(null,h.cores);if(typeof Blob>"u")return h.cores=2,t(null,h.cores);var a=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(o){for(var f=Date.now(),x=f+4;Date.now()m.st&&c.stc.st&&m.st{var N=Y();K();ct.exports=N.cipher=N.cipher||{};N.cipher.algorithms=N.cipher.algorithms||{};N.cipher.createCipher=function(e,t){var a=e;if(typeof a=="string"&&(a=N.cipher.getAlgorithm(a),a&&(a=a())),!a)throw new Error("Unsupported algorithm: "+e);return new N.cipher.BlockCipher({algorithm:a,key:t,decrypt:!1})};N.cipher.createDecipher=function(e,t){var a=e;if(typeof a=="string"&&(a=N.cipher.getAlgorithm(a),a&&(a=a())),!a)throw new Error("Unsupported algorithm: "+e);return new N.cipher.BlockCipher({algorithm:a,key:t,decrypt:!0})};N.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),N.cipher.algorithms[e]=t};N.cipher.getAlgorithm=function(e){return e=e.toUpperCase(),e in N.cipher.algorithms?N.cipher.algorithms[e]:null};var Re=N.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};Re.prototype.start=function(e){e=e||{};var t={};for(var a in e)t[a]=e[a];t.decrypt=this._decrypt,this._finish=!1,this._input=N.util.createBuffer(),this.output=e.output||N.util.createBuffer(),this.mode.start(t)};Re.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};Re.prototype.finish=function(e){e&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(a){return e(this.blockSize,a,!1)},this.mode.unpad=function(a){return e(this.blockSize,a,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,t))}});var ce=R((Lr,ht)=>{var Ce=Y();ht.exports=Ce.md=Ce.md||{};Ce.md.algorithms=Ce.md.algorithms||{}});var ut=R((Er,xt)=>{var ne=Y();ce();K();var pr=xt.exports=ne.hmac=ne.hmac||{};pr.create=function(){var e=null,t=null,a=null,r=null,n={};return n.start=function(i,o){if(i!==null)if(typeof i=="string")if(i=i.toLowerCase(),i in ne.md.algorithms)t=ne.md.algorithms[i].create();else throw new Error('Unknown hash algorithm "'+i+'"');else t=i;if(o===null)o=e;else{if(typeof o=="string")o=ne.util.createBuffer(o);else if(ne.util.isArray(o)){var f=o;o=ne.util.createBuffer();for(var x=0;xt.blockLength&&(t.start(),t.update(o.bytes()),o=t.digest()),a=ne.util.createBuffer(),r=ne.util.createBuffer(),s=o.length();for(var x=0;x{var V=Y();ut();ce();K();var yr=V.pkcs5=V.pkcs5||{},ie;V.util.isNodejs&&!V.options.usePureJavaScript&&(ie=require("crypto"));dt.exports=V.pbkdf2=yr.pbkdf2=function(e,t,a,r,n,i){if(typeof n=="function"&&(i=n,n=null),V.util.isNodejs&&!V.options.usePureJavaScript&&ie.pbkdf2&&(n===null||typeof n!="object")&&(ie.pbkdf2Sync.length>4||!n||n==="sha1"))return typeof n!="string"&&(n="sha1"),e=Buffer.from(e,"binary"),t=Buffer.from(t,"binary"),i?ie.pbkdf2Sync.length===4?ie.pbkdf2(e,t,a,r,function(U,M){if(U)return i(U);i(null,M.toString("binary"))}):ie.pbkdf2(e,t,a,r,n,function(U,M){if(U)return i(U);i(null,M.toString("binary"))}):ie.pbkdf2Sync.length===4?ie.pbkdf2Sync(e,t,a,r).toString("binary"):ie.pbkdf2Sync(e,t,a,r,n).toString("binary");if((typeof n>"u"||n===null)&&(n="sha1"),typeof n=="string"){if(!(n in V.md.algorithms))throw new Error("Unknown hash algorithm: "+n);n=V.md[n].create()}var o=n.digestLength;if(r>4294967295*o){var f=new Error("Derived key is too long.");if(i)return i(f);throw f}var x=Math.ceil(r/o),s=r-(x-1)*o,c=V.hmac.create();c.start(n,e);var l="",v,m,I;if(!i){for(var S=1;S<=x;++S){c.start(null,null),c.update(t),c.update(V.util.int32ToBytes(S)),v=I=c.digest().getBytes();for(var C=2;C<=a;++C)c.start(null,null),c.update(I),m=c.digest().getBytes(),v=V.util.xorBytes(v,m,o),I=m;l+=Sx)return i(null,l);c.start(null,null),c.update(t),c.update(V.util.int32ToBytes(S)),v=I=c.digest().getBytes(),C=2,E()}function E(){if(C<=a)return c.start(null,null),c.update(I),m=c.digest().getBytes(),v=V.util.xorBytes(v,m,o),I=m,++C,V.util.setImmediate(E);l+=S{var q=Y();K();q.cipher=q.cipher||{};var k=gt.exports=q.cipher.modes=q.cipher.modes||{};k.ecb=function(e){e=e||{},this.name="ECB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};k.ecb.prototype.start=function(e){};k.ecb.prototype.encrypt=function(e,t,a){if(e.length()0))return!0;for(var r=0;r0))return!0;for(var r=0;r0)return!1;var a=e.length(),r=e.at(a-1);return r>this.blockSize<<2?!1:(e.truncate(r),!0)};k.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};k.cbc.prototype.start=function(e){if(e.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in e)this._iv=Ae(e.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")};k.cbc.prototype.encrypt=function(e,t,a){if(e.length()0))return!0;for(var r=0;r0))return!0;for(var r=0;r0)return!1;var a=e.length(),r=e.at(a-1);return r>this.blockSize<<2?!1:(e.truncate(r),!0)};k.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=q.util.createBuffer(),this._partialBytes=0};k.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=Ae(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};k.cfb.prototype.encrypt=function(e,t,a){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var n=0;n0&&(i=this.blockSize-i),this._partialOutput.clear();for(var n=0;n0)e.read-=this.blockSize;else for(var n=0;n0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!a)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0};k.cfb.prototype.decrypt=function(e,t,a){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var n=0;n0&&(i=this.blockSize-i),this._partialOutput.clear();for(var n=0;n0)e.read-=this.blockSize;else for(var n=0;n0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!a)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0};k.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=q.util.createBuffer(),this._partialBytes=0};k.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=Ae(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};k.ofb.prototype.encrypt=function(e,t,a){var r=e.length();if(e.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var n=0;n0&&(i=this.blockSize-i),this._partialOutput.clear();for(var n=0;n0)e.read-=this.blockSize;else for(var n=0;n0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!a)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0};k.ofb.prototype.decrypt=k.ofb.prototype.encrypt;k.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=q.util.createBuffer(),this._partialBytes=0};k.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=Ae(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};k.ctr.prototype.encrypt=function(e,t,a){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize)for(var n=0;n0&&(i=this.blockSize-i),this._partialOutput.clear();for(var n=0;n0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!a)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}Fe(this._inBlock)};k.ctr.prototype.decrypt=k.ctr.prototype.encrypt;k.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=q.util.createBuffer(),this._partialBytes=0,this._R=3774873600};k.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t=q.util.createBuffer(e.iv);this._cipherLength=0;var a;if("additionalData"in e?a=q.util.createBuffer(e.additionalData):a=q.util.createBuffer(),"tagLength"in e?this._tagLength=e.tagLength:this._tagLength=128,this._tag=null,e.decrypt&&(this._tag=q.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var r=t.length();if(r===12)this._j0=[t.getInt32(),t.getInt32(),t.getInt32(),1];else{for(this._j0=[0,0,0,0];t.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(qe(r*8)))}this._inBlock=this._j0.slice(0),Fe(this._inBlock),this._partialBytes=0,a=q.util.createBuffer(a),this._aDataLength=qe(a.length()*8);var n=a.length()%this.blockSize;for(n&&a.fillWithByte(0,this.blockSize-n),this._s=[0,0,0,0];a.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[a.getInt32(),a.getInt32(),a.getInt32(),a.getInt32()])};k.gcm.prototype.encrypt=function(e,t,a){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var n=0;n0&&(i=this.blockSize-i),this._partialOutput.clear();for(var n=0;n0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!a)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),Fe(this._inBlock)};k.gcm.prototype.decrypt=function(e,t,a){var r=e.length();if(r0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),Fe(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var n=0;n0;--r)t[r]=e[r]>>>1|(e[r-1]&1)<<31;t[0]=e[0]>>>1,a&&(t[0]^=this._R)};k.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],a=0;a<32;++a){var r=a/8|0,n=e[r]>>>(7-a%8)*4&15,i=this._m[a][n];t[0]^=i[0],t[1]^=i[1],t[2]^=i[2],t[3]^=i[3]}return t};k.gcm.prototype.ghash=function(e,t,a){return t[0]^=a[0],t[1]^=a[1],t[2]^=a[2],t[3]^=a[3],this.tableMultiply(t)};k.gcm.prototype.generateHashTable=function(e,t){for(var a=8/t,r=4*a,n=16*a,i=new Array(n),o=0;o>>1,n=new Array(a);n[r]=e.slice(0);for(var i=r>>>1;i>0;)this.pow(n[2*i],n[i]=[]),i>>=1;for(i=2;i4){var a=e;e=q.util.createBuffer();for(var r=0;r{var T=Y();Ne();bt();K();Bt.exports=T.aes=T.aes||{};T.aes.startEncrypting=function(e,t,a,r){var n=ke({key:e,output:a,decrypt:!1,mode:r});return n.start(t),n};T.aes.createEncryptionCipher=function(e,t){return ke({key:e,output:null,decrypt:!1,mode:t})};T.aes.startDecrypting=function(e,t,a,r){var n=ke({key:e,output:a,decrypt:!0,mode:r});return n.start(t),n};T.aes.createDecryptionCipher=function(e,t){return ke({key:e,output:null,decrypt:!0,mode:t})};T.aes.Algorithm=function(e,t){Ve||yt();var a=this;a.name=e,a.mode=new t({blockSize:16,cipher:{encrypt:function(r,n){return je(a._w,r,n,!1)},decrypt:function(r,n){return je(a._w,r,n,!0)}}}),a._init=!1};T.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t=e.key,a;if(typeof t=="string"&&(t.length===16||t.length===24||t.length===32))t=T.util.createBuffer(t);else if(T.util.isArray(t)&&(t.length===16||t.length===24||t.length===32)){a=t,t=T.util.createBuffer();for(var r=0;r>>2;for(var r=0;r>8^f&255^99,P[a]=f,He[f]=a,x=e[f],n=e[a],i=e[n],o=e[i],s=x<<24^f<<16^f<<8^(f^x),c=(n^i^o)<<24^(a^o)<<16^(a^i^o)<<8^(a^n^o);for(var l=0;l<4;++l)ue[l][a]=s,X[l][f]=c,s=s<<24|s>>>8,c=c<<24|c>>>8;a===0?a=r=1:(a=n^e[e[e[n^o]]],r^=e[e[r]])}}function vt(e,t){for(var a=e.slice(0),r,n=1,i=a.length,o=i+6+1,f=ge*o,x=i;x>>16&255]<<24^P[r>>>8&255]<<16^P[r&255]<<8^P[r>>>24]^pt[n]<<24,n++):i>6&&x%i===4&&(r=P[r>>>24]<<24^P[r>>>16&255]<<16^P[r>>>8&255]<<8^P[r&255]),a[x]=a[x-i]^r;if(t){var s,c=X[0],l=X[1],v=X[2],m=X[3],I=a.slice(0);f=a.length;for(var x=0,S=f-ge;x>>24]]^l[P[s>>>16&255]]^v[P[s>>>8&255]]^m[P[s&255]];a=I}return a}function je(e,t,a,r){var n=e.length/4-1,i,o,f,x,s;r?(i=X[0],o=X[1],f=X[2],x=X[3],s=He):(i=ue[0],o=ue[1],f=ue[2],x=ue[3],s=P);var c,l,v,m,I,S,C;c=t[0]^e[0],l=t[r?3:1]^e[1],v=t[2]^e[2],m=t[r?1:3]^e[3];for(var A=3,E=1;E>>24]^o[l>>>16&255]^f[v>>>8&255]^x[m&255]^e[++A],S=i[l>>>24]^o[v>>>16&255]^f[m>>>8&255]^x[c&255]^e[++A],C=i[v>>>24]^o[m>>>16&255]^f[c>>>8&255]^x[l&255]^e[++A],m=i[m>>>24]^o[c>>>16&255]^f[l>>>8&255]^x[v&255]^e[++A],c=I,l=S,v=C;a[0]=s[c>>>24]<<24^s[l>>>16&255]<<16^s[v>>>8&255]<<8^s[m&255]^e[++A],a[r?3:1]=s[l>>>24]<<24^s[v>>>16&255]<<16^s[m>>>8&255]<<8^s[c&255]^e[++A],a[2]=s[v>>>24]<<24^s[m>>>16&255]<<16^s[c>>>8&255]<<8^s[l&255]^e[++A],a[r?1:3]=s[m>>>24]<<24^s[c>>>16&255]<<16^s[l>>>8&255]<<8^s[v&255]^e[++A]}function ke(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),a="AES-"+t,r;e.decrypt?r=T.cipher.createDecipher(a,e.key):r=T.cipher.createCipher(a,e.key);var n=r.start;return r.start=function(i,o){var f=null;o instanceof T.util.ByteBuffer&&(f=o,o={}),o=o||{},o.output=f,o.iv=i,n.call(r,o)},r}});var Ge=R((Mr,Ct)=>{var J=Y();ce();K();var St=Ct.exports=J.sha256=J.sha256||{};J.md.sha256=J.md.algorithms.sha256=St;St.create=function(){It||vr();var e=null,t=J.util.createBuffer(),a=new Array(64),r={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return r.start=function(){r.messageLength=0,r.fullMessageLength=r.messageLength64=[];for(var n=r.messageLengthSize/4,i=0;i>>0,o>>>0];for(var f=r.fullMessageLength.length-1;f>=0;--f)r.fullMessageLength[f]+=o[1],o[1]=o[0]+(r.fullMessageLength[f]/4294967296>>>0),r.fullMessageLength[f]=r.fullMessageLength[f]>>>0,o[0]=o[1]/4294967296>>>0;return t.putBytes(n),mt(e,a,t),(t.read>2048||t.length()===0)&&t.compact(),r},r.digest=function(){var n=J.util.createBuffer();n.putBytes(t.bytes());var i=r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize,o=i&r.blockLength-1;n.putBytes(Pe.substr(0,r.blockLength-o));for(var f,x,s=r.fullMessageLength[0]*8,c=0;c>>0,s+=x,n.putInt32(s>>>0),s=f>>>0;n.putInt32(s);var l={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};mt(l,a,n);var v=J.util.createBuffer();return v.putInt32(l.h0),v.putInt32(l.h1),v.putInt32(l.h2),v.putInt32(l.h3),v.putInt32(l.h4),v.putInt32(l.h5),v.putInt32(l.h6),v.putInt32(l.h7),v},r};var Pe=null,It=!1,wt=null;function vr(){Pe="\x80",Pe+=J.util.fillString("\0",64),wt=[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],It=!0}function mt(e,t,a){for(var r,n,i,o,f,x,s,c,l,v,m,I,S,C,A,E=a.length();E>=64;){for(s=0;s<16;++s)t[s]=a.getInt32();for(;s<64;++s)r=t[s-2],r=(r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10,n=t[s-15],n=(n>>>7|n<<25)^(n>>>18|n<<14)^n>>>3,t[s]=r+t[s-7]+n+t[s-16]|0;for(c=e.h0,l=e.h1,v=e.h2,m=e.h3,I=e.h4,S=e.h5,C=e.h6,A=e.h7,s=0;s<64;++s)o=(I>>>6|I<<26)^(I>>>11|I<<21)^(I>>>25|I<<7),f=C^I&(S^C),i=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),x=c&l|v&(c^l),r=A+o+f+wt[s]+t[s],n=i+x,A=C,C=S,S=I,I=m+r>>>0,m=v,v=l,l=c,c=r+n>>>0;e.h0=e.h0+c|0,e.h1=e.h1+l|0,e.h2=e.h2+v|0,e.h3=e.h3+m|0,e.h4=e.h4+I|0,e.h5=e.h5+S|0,e.h6=e.h6+C|0,e.h7=e.h7+A|0,E-=64}}});var Ft=R((Ur,At)=>{var Z=Y();K();var Le=null;Z.util.isNodejs&&!Z.options.usePureJavaScript&&!process.versions["node-webkit"]&&(Le=require("crypto"));var Br=At.exports=Z.prng=Z.prng||{};Br.create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},a=e.md,r=new Array(32),n=0;n<32;++n)r[n]=a.create();t.pools=r,t.pool=0,t.generate=function(s,c){if(!c)return t.generateSync(s);var l=t.plugin.cipher,v=t.plugin.increment,m=t.plugin.formatKey,I=t.plugin.formatSeed,S=Z.util.createBuffer();t.key=null,C();function C(A){if(A)return c(A);if(S.length()>=s)return c(null,S.getBytes(s));if(t.generated>1048575&&(t.key=null),t.key===null)return Z.util.nextTick(function(){i(C)});var E=l(t.key,t.seed);t.generated+=E.length,S.putBytes(E),t.key=m(l(t.key,v(t.seed))),t.seed=I(l(t.key,t.seed)),Z.util.setImmediate(C)}},t.generateSync=function(s){var c=t.plugin.cipher,l=t.plugin.increment,v=t.plugin.formatKey,m=t.plugin.formatSeed;t.key=null;for(var I=Z.util.createBuffer();I.length()1048575&&(t.key=null),t.key===null&&o();var S=c(t.key,t.seed);t.generated+=S.length,I.putBytes(S),t.key=v(c(t.key,l(t.seed))),t.seed=m(c(t.key,t.seed))}return I.getBytes(s)};function i(s){if(t.pools[0].messageLength>=32)return f(),s();var c=32-t.pools[0].messageLength<<5;t.seedFile(c,function(l,v){if(l)return s(l);t.collect(v),f(),s()})}function o(){if(t.pools[0].messageLength>=32)return f();var s=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(s)),f()}function f(){t.reseeds=t.reseeds===4294967295?0:t.reseeds+1;var s=t.plugin.md.create();s.update(t.keyBytes);for(var c=1,l=0;l<32;++l)t.reseeds%c===0&&(s.update(t.pools[l].digest().getBytes()),t.pools[l].start()),c=c<<1;t.keyBytes=s.digest().getBytes(),s.start(),s.update(t.keyBytes);var v=s.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(v),t.generated=0}function x(s){var c=null,l=Z.util.globalScope,v=l.crypto||l.msCrypto;v&&v.getRandomValues&&(c=function(j){return v.getRandomValues(j)});var m=Z.util.createBuffer();if(c)for(;m.length()>16),E+=(A&32767)<<16,E+=A>>15,E=(E&2147483647)+(E>>31),M=E&4294967295;for(var C=0;C<3;++C)U=M>>>(C<<3),U^=Math.floor(Math.random()*256),m.putByte(U&255)}return m.getBytes(s)}return Le?(t.seedFile=function(s,c){Le.randomBytes(s,function(l,v){if(l)return c(l);c(null,v.toString())})},t.seedFileSync=function(s){return Le.randomBytes(s).toString()}):(t.seedFile=function(s,c){try{c(null,x(s))}catch(l){c(l)}},t.seedFileSync=x),t.collect=function(s){for(var c=s.length,l=0;l>v&255);t.collect(l)},t.registerWorker=function(s){if(s===self)t.seedFile=function(l,v){function m(I){var S=I.data;S.forge&&S.forge.prng&&(self.removeEventListener("message",m),v(S.forge.prng.err,S.forge.prng.bytes))}self.addEventListener("message",m),self.postMessage({forge:{prng:{needed:l}}})};else{var c=function(l){var v=l.data;v.forge&&v.forge.prng&&t.seedFile(v.forge.prng.needed,function(m,I){s.postMessage({forge:{prng:{err:m,bytes:I}}})})};s.addEventListener("message",c)}},t}});var Ye=R((zr,$e)=>{var H=Y();_t();Ge();Ft();K();(function(){if(H.random&&H.random.getBytes){$e.exports=H.random;return}(function(e){var t={},a=new Array(4),r=H.util.createBuffer();t.formatKey=function(l){var v=H.util.createBuffer(l);return l=new Array(4),l[0]=v.getInt32(),l[1]=v.getInt32(),l[2]=v.getInt32(),l[3]=v.getInt32(),H.aes._expandKey(l,!1)},t.formatSeed=function(l){var v=H.util.createBuffer(l);return l=new Array(4),l[0]=v.getInt32(),l[1]=v.getInt32(),l[2]=v.getInt32(),l[3]=v.getInt32(),l},t.cipher=function(l,v){return H.aes._updateBlock(l,v,a,!1),r.putInt32(a[0]),r.putInt32(a[1]),r.putInt32(a[2]),r.putInt32(a[3]),r.getBytes()},t.increment=function(l){return++l[3],l},t.md=H.md.sha256;function n(){var l=H.prng.create(t);return l.getBytes=function(v,m){return l.generate(v,m)},l.getBytesSync=function(v){return l.generate(v)},l}var i=n(),o=null,f=H.util.globalScope,x=f.crypto||f.msCrypto;if(x&&x.getRandomValues&&(o=function(l){return x.getRandomValues(l)}),H.options.usePureJavaScript||!H.util.isNodejs&&!o){if(typeof window>"u"||window.document,i.collectInt(+new Date,32),typeof navigator<"u"){var s="";for(var c in navigator)try{typeof navigator[c]=="string"&&(s+=navigator[c])}catch{}i.collect(s),s=null}e&&(e().mousemove(function(l){i.collectInt(l.clientX,16),i.collectInt(l.clientY,16)}),e().keypress(function(l){i.collectInt(l.charCode,8)}))}if(!H.random)H.random=i;else for(var c in i)H.random[c]=i[c];H.random.createInstance=n,$e.exports=H.random})(typeof jQuery<"u"?jQuery:null)})()});var Et=R((Lt,he)=>{(function(e,t){typeof define=="function"&&define.amd?define([],t):typeof require=="function"&&typeof he=="object"&&he&&he.exports?he.exports=t():(e.dcodeIO=e.dcodeIO||{}).bcrypt=t()})(Lt,function(){"use strict";var e={},t=null;function a(y){if(typeof he<"u"&&he&&he.exports)try{return require("crypto").randomBytes(y)}catch{}try{var p;return(self.crypto||self.msCrypto).getRandomValues(p=new Uint32Array(y)),Array.prototype.slice.call(p)}catch{}if(!t)throw Error("Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative");return t(y)}var r=!1;try{a(1),r=!0}catch{}t=null,e.setRandomFallback=function(y){t=y},e.genSaltSync=function(y,p){if(y=y||I,typeof y!="number")throw Error("Illegal arguments: "+typeof y+", "+typeof p);y<4?y=4:y>31&&(y=31);var g=[];return g.push("$2a$"),y<10&&g.push("0"),g.push(y.toString()),g.push("$"),g.push(c(a(m),m)),g.join("")},e.genSalt=function(y,p,g){if(typeof p=="function"&&(g=p,p=void 0),typeof y=="function"&&(g=y,y=void 0),typeof y>"u")y=I;else if(typeof y!="number")throw Error("illegal arguments: "+typeof y);function d(u){i(function(){try{u(null,e.genSaltSync(y))}catch(b){u(b)}})}if(g){if(typeof g!="function")throw Error("Illegal callback: "+typeof g);d(g)}else return new Promise(function(u,b){d(function(B,_){if(B){b(B);return}u(_)})})},e.hashSync=function(y,p){if(typeof p>"u"&&(p=I),typeof p=="number"&&(p=e.genSaltSync(p)),typeof y!="string"||typeof p!="string")throw Error("Illegal arguments: "+typeof y+", "+typeof p);return ae(y,p)},e.hash=function(y,p,g,d){function u(b){typeof y=="string"&&typeof p=="number"?e.genSalt(p,function(B,_){ae(y,_,b,d)}):typeof y=="string"&&typeof p=="string"?ae(y,p,b,d):i(b.bind(this,Error("Illegal arguments: "+typeof y+", "+typeof p)))}if(g){if(typeof g!="function")throw Error("Illegal callback: "+typeof g);u(g)}else return new Promise(function(b,B){u(function(_,w){if(_){B(_);return}b(w)})})};function n(y,p){for(var g=0,d=0,u=0,b=y.length;u=y.length?null:y.charCodeAt(g++)},function(d){p.push(d)}),p}var f="./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),x=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,54,55,56,57,58,59,60,61,62,63,-1,-1,-1,-1,-1,-1,-1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,-1,-1,-1,-1,-1,-1,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,-1,-1,-1,-1,-1],s=String.fromCharCode;function c(y,p){var g=0,d=[],u,b;if(p<=0||p>y.length)throw Error("Illegal len: "+p);for(;g>2&63]),u=(u&3)<<4,g>=p){d.push(f[u&63]);break}if(b=y[g++]&255,u|=b>>4&15,d.push(f[u&63]),u=(b&15)<<2,g>=p){d.push(f[u&63]);break}b=y[g++]&255,u|=b>>6&3,d.push(f[u&63]),d.push(f[b&63])}return d.join("")}function l(y,p){var g=0,d=y.length,u=0,b=[],B,_,w,F,L,O;if(p<=0)throw Error("Illegal len: "+p);for(;g>>0,L|=(_&48)>>4,b.push(s(L)),++u>=p||g>=d)||(O=y.charCodeAt(g++),w=O>>0,L|=(w&60)>>2,b.push(s(L)),++u>=p||g>=d)));)O=y.charCodeAt(g++),F=O>>0,L|=F,b.push(s(L)),++u;var $=[];for(g=0;g>6&31|192),g(d&63|128)):d<65536?(g(d>>12&15|224),g(d>>6&63|128),g(d&63|128)):(g(d>>18&7|240),g(d>>12&63|128),g(d>>6&63|128),g(d&63|128)),d=null},y.decodeUTF8=function(p,g){for(var d,u,b,B,_=function(w){w=w.slice(0,w.indexOf(null));var F=Error(w.toString());throw F.name="TruncatedError",F.bytes=w,F};(d=p())!==null;)if(!(d&128))g(d);else if((d&224)===192)(u=p())===null&&_([d,u]),g((d&31)<<6|u&63);else if((d&240)===224)((u=p())===null||(b=p())===null)&&_([d,u,b]),g((d&15)<<12|(u&63)<<6|b&63);else if((d&248)===240)((u=p())===null||(b=p())===null||(B=p())===null)&&_([d,u,b,B]),g((d&7)<<18|(u&63)<<12|(b&63)<<6|B&63);else throw RangeError("Illegal starting byte: "+d)},y.UTF16toUTF8=function(p,g){for(var d,u=null;(d=u!==null?u:p())!==null;){if(d>=55296&&d<=57343&&(u=p())!==null&&u>=56320&&u<=57343){g((d-55296)*1024+u-56320+65536),u=null;continue}g(d)}u!==null&&g(u)},y.UTF8toUTF16=function(p,g){var d=null;for(typeof p=="number"&&(d=p,p=function(){return null});d!==null||(d=p())!==null;)d<=65535?g(d):(d-=65536,g((d>>10)+55296),g(d%1024+56320)),d=null},y.encodeUTF16toUTF8=function(p,g){y.UTF16toUTF8(p,function(d){y.encodeUTF8(d,g)})},y.decodeUTF8toUTF16=function(p,g){y.decodeUTF8(p,function(d){y.UTF8toUTF16(d,g)})},y.calculateCodePoint=function(p){return p<128?1:p<2048?2:p<65536?3:4},y.calculateUTF8=function(p){for(var g,d=0;(g=p())!==null;)d+=y.calculateCodePoint(g);return d},y.calculateUTF16asUTF8=function(p){var g=0,d=0;return y.UTF16toUTF8(p,function(u){++g,d+=y.calculateCodePoint(u)}),[g,d]},y}();Date.now=Date.now||function(){return+new Date};var m=16,I=10,S=16,C=100,A=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],E=[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946,1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055,3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504,976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462],U=[1332899944,1700884034,1701343084,1684370003,1668446532,1869963892];function M(y,p,g,d){var u,b=y[p],B=y[p+1];return b^=g[0],u=d[b>>>24],u+=d[256|b>>16&255],u^=d[512|b>>8&255],u+=d[768|b&255],B^=u^g[1],u=d[B>>>24],u+=d[256|B>>16&255],u^=d[512|B>>8&255],u+=d[768|B&255],b^=u^g[2],u=d[b>>>24],u+=d[256|b>>16&255],u^=d[512|b>>8&255],u+=d[768|b&255],B^=u^g[3],u=d[B>>>24],u+=d[256|B>>16&255],u^=d[512|B>>8&255],u+=d[768|B&255],b^=u^g[4],u=d[b>>>24],u+=d[256|b>>16&255],u^=d[512|b>>8&255],u+=d[768|b&255],B^=u^g[5],u=d[B>>>24],u+=d[256|B>>16&255],u^=d[512|B>>8&255],u+=d[768|B&255],b^=u^g[6],u=d[b>>>24],u+=d[256|b>>16&255],u^=d[512|b>>8&255],u+=d[768|b&255],B^=u^g[7],u=d[B>>>24],u+=d[256|B>>16&255],u^=d[512|B>>8&255],u+=d[768|B&255],b^=u^g[8],u=d[b>>>24],u+=d[256|b>>16&255],u^=d[512|b>>8&255],u+=d[768|b&255],B^=u^g[9],u=d[B>>>24],u+=d[256|B>>16&255],u^=d[512|B>>8&255],u+=d[768|B&255],b^=u^g[10],u=d[b>>>24],u+=d[256|b>>16&255],u^=d[512|b>>8&255],u+=d[768|b&255],B^=u^g[11],u=d[B>>>24],u+=d[256|B>>16&255],u^=d[512|B>>8&255],u+=d[768|B&255],b^=u^g[12],u=d[b>>>24],u+=d[256|b>>16&255],u^=d[512|b>>8&255],u+=d[768|b&255],B^=u^g[13],u=d[B>>>24],u+=d[256|B>>16&255],u^=d[512|B>>8&255],u+=d[768|B&255],b^=u^g[14],u=d[b>>>24],u+=d[256|b>>16&255],u^=d[512|b>>8&255],u+=d[768|b&255],B^=u^g[15],u=d[B>>>24],u+=d[256|B>>16&255],u^=d[512|B>>8&255],u+=d[768|B&255],b^=u^g[16],y[p]=B^g[S+1],y[p+1]=b,y}function j(y,p){for(var g=0,d=0;g<4;++g)d=d<<8|y[p]&255,p=(p+1)%y.length;return{key:d,offp:p}}function xe(y,p,g){for(var d=0,u=[0,0],b=p.length,B=g.length,_,w=0;w31)if(_=Error("Illegal number of rounds (4-31): "+g),d){i(d.bind(this,_));return}else throw _;if(p.length!==m)if(_=Error("Illegal salt length: "+p.length+" != "+m),d){i(d.bind(this,_));return}else throw _;g=1<>>0;var w,F,L=0,O;Int32Array?(w=new Int32Array(A),F=new Int32Array(E)):(w=A.slice(),F=E.slice()),W(p,y,w,F);function $(){if(u&&u(L/g),LC)););else{for(L=0;L<64;L++)for(O=0;O>1;O++)M(b,O<<1,w,F);var z=[];for(L=0;L>24&255)>>>0),z.push((b[L]>>16&255)>>>0),z.push((b[L]>>8&255)>>>0),z.push((b[L]&255)>>>0);if(d){d(null,z);return}else return z}d&&i($)}if(typeof d<"u")$();else for(var ye;;)if(typeof(ye=$())<"u")return ye||[]}function ae(y,p,g,d){var u;if(typeof y!="string"||typeof p!="string")if(u=Error("Invalid string / salt: Not a string"),g){i(g.bind(this,u));return}else throw u;var b,B;if(p.charAt(0)!=="$"||p.charAt(1)!=="2")if(u=Error("Invalid salt version: "+p.substring(0,2)),g){i(g.bind(this,u));return}else throw u;if(p.charAt(2)==="$")b="\0",B=3;else{if(b=p.charAt(2),b!=="a"&&b!=="b"&&b!=="y"||p.charAt(3)!=="$")if(u=Error("Invalid salt revision: "+p.substring(2,4)),g){i(g.bind(this,u));return}else throw u;B=4}if(p.charAt(B+2)>"$")if(u=Error("Missing salt rounds"),g){i(g.bind(this,u));return}else throw u;var _=parseInt(p.substring(B,B+1),10)*10,w=parseInt(p.substring(B+1,B+2),10),F=_+w,L=p.substring(B+3,B+25);y+=b>="a"?"\0":"";var O=o(y),$=l(L,m);function ye(le){var z=[];return z.push("$2"),b>="a"&&z.push(b),z.push("$"),F<10&&z.push("0"),z.push(F.toString()),z.push("$"),z.push(c($,$.length)),z.push(c(le,U.length*4-1)),z.join("")}if(typeof g>"u")return ye(G(O,$,F));G(O,$,F,function(le,z){le?g(le,null):g(null,ye(z))},d)}return e.encodeBase64=c,e.decodeBase64=l,e})});var Dt=R((Nr,Tt)=>{Tt.exports=Et()});var Nt=R((Hr,Rt)=>{var ee=Y();ce();K();var Ut=Rt.exports=ee.md5=ee.md5||{};ee.md.md5=ee.md.algorithms.md5=Ut;Ut.create=function(){zt||_r();var e=null,t=ee.util.createBuffer(),a=new Array(16),r={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return r.start=function(){r.messageLength=0,r.fullMessageLength=r.messageLength64=[];for(var n=r.messageLengthSize/4,i=0;i>>0,o>>>0];for(var f=r.fullMessageLength.length-1;f>=0;--f)r.fullMessageLength[f]+=o[1],o[1]=o[0]+(r.fullMessageLength[f]/4294967296>>>0),r.fullMessageLength[f]=r.fullMessageLength[f]>>>0,o[0]=o[1]/4294967296>>>0;return t.putBytes(n),Mt(e,a,t),(t.read>2048||t.length()===0)&&t.compact(),r},r.digest=function(){var n=ee.util.createBuffer();n.putBytes(t.bytes());var i=r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize,o=i&r.blockLength-1;n.putBytes(Xe.substr(0,r.blockLength-o));for(var f,x=0,s=r.fullMessageLength.length-1;s>=0;--s)f=r.fullMessageLength[s]*8+x,x=f/4294967296>>>0,n.putInt32Le(f>>>0);var c={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3};Mt(c,a,n);var l=ee.util.createBuffer();return l.putInt32Le(c.h0),l.putInt32Le(c.h1),l.putInt32Le(c.h2),l.putInt32Le(c.h3),l},r};var Xe=null,De=null,_e=null,pe=null,zt=!1;function _r(){Xe="\x80",Xe+=ee.util.fillString("\0",64),De=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],_e=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],pe=new Array(64);for(var e=0;e<64;++e)pe[e]=Math.floor(Math.abs(Math.sin(e+1))*4294967296);zt=!0}function Mt(e,t,a){for(var r,n,i,o,f,x,s,c,l=a.length();l>=64;){for(n=e.h0,i=e.h1,o=e.h2,f=e.h3,c=0;c<16;++c)t[c]=a.getInt32Le(),x=f^i&(o^f),r=n+x+pe[c]+t[c],s=_e[c],n=f,f=o,o=i,i+=r<>>32-s;for(;c<32;++c)x=o^f&(i^o),r=n+x+pe[c]+t[De[c]],s=_e[c],n=f,f=o,o=i,i+=r<>>32-s;for(;c<48;++c)x=i^o^f,r=n+x+pe[c]+t[De[c]],s=_e[c],n=f,f=o,o=i,i+=r<>>32-s;for(;c<64;++c)x=o^(i|~f),r=n+x+pe[c]+t[De[c]],s=_e[c],n=f,f=o,o=i,i+=r<>>32-s;e.h0=e.h0+n|0,e.h1=e.h1+i|0,e.h2=e.h2+o|0,e.h3=e.h3+f|0,l-=64}}});var Pt=R((jr,Vt)=>{var te=Y();ce();K();var Ht=Vt.exports=te.sha1=te.sha1||{};te.md.sha1=te.md.algorithms.sha1=Ht;Ht.create=function(){jt||mr();var e=null,t=te.util.createBuffer(),a=new Array(80),r={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return r.start=function(){r.messageLength=0,r.fullMessageLength=r.messageLength64=[];for(var n=r.messageLengthSize/4,i=0;i>>0,o>>>0];for(var f=r.fullMessageLength.length-1;f>=0;--f)r.fullMessageLength[f]+=o[1],o[1]=o[0]+(r.fullMessageLength[f]/4294967296>>>0),r.fullMessageLength[f]=r.fullMessageLength[f]>>>0,o[0]=o[1]/4294967296>>>0;return t.putBytes(n),qt(e,a,t),(t.read>2048||t.length()===0)&&t.compact(),r},r.digest=function(){var n=te.util.createBuffer();n.putBytes(t.bytes());var i=r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize,o=i&r.blockLength-1;n.putBytes(Je.substr(0,r.blockLength-o));for(var f,x,s=r.fullMessageLength[0]*8,c=0;c>>0,s+=x,n.putInt32(s>>>0),s=f>>>0;n.putInt32(s);var l={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};qt(l,a,n);var v=te.util.createBuffer();return v.putInt32(l.h0),v.putInt32(l.h1),v.putInt32(l.h2),v.putInt32(l.h3),v.putInt32(l.h4),v},r};var Je=null,jt=!1;function mr(){Je="\x80",Je+=te.util.fillString("\0",64),jt=!0}function qt(e,t,a){for(var r,n,i,o,f,x,s,c,l=a.length();l>=64;){for(n=e.h0,i=e.h1,o=e.h2,f=e.h3,x=e.h4,c=0;c<16;++c)r=a.getInt32(),t[c]=r,s=f^i&(o^f),r=(n<<5|n>>>27)+s+x+1518500249+r,x=f,f=o,o=(i<<30|i>>>2)>>>0,i=n,n=r;for(;c<20;++c)r=t[c-3]^t[c-8]^t[c-14]^t[c-16],r=r<<1|r>>>31,t[c]=r,s=f^i&(o^f),r=(n<<5|n>>>27)+s+x+1518500249+r,x=f,f=o,o=(i<<30|i>>>2)>>>0,i=n,n=r;for(;c<32;++c)r=t[c-3]^t[c-8]^t[c-14]^t[c-16],r=r<<1|r>>>31,t[c]=r,s=i^o^f,r=(n<<5|n>>>27)+s+x+1859775393+r,x=f,f=o,o=(i<<30|i>>>2)>>>0,i=n,n=r;for(;c<40;++c)r=t[c-6]^t[c-16]^t[c-28]^t[c-32],r=r<<2|r>>>30,t[c]=r,s=i^o^f,r=(n<<5|n>>>27)+s+x+1859775393+r,x=f,f=o,o=(i<<30|i>>>2)>>>0,i=n,n=r;for(;c<60;++c)r=t[c-6]^t[c-16]^t[c-28]^t[c-32],r=r<<2|r>>>30,t[c]=r,s=i&o|f&(i^o),r=(n<<5|n>>>27)+s+x+2400959708+r,x=f,f=o,o=(i<<30|i>>>2)>>>0,i=n,n=r;for(;c<80;++c)r=t[c-6]^t[c-16]^t[c-28]^t[c-32],r=r<<2|r>>>30,t[c]=r,s=i^o^f,r=(n<<5|n>>>27)+s+x+3395469782+r,x=f,f=o,o=(i<<30|i>>>2)>>>0,i=n,n=r;e.h0=e.h0+n|0,e.h1=e.h1+i|0,e.h2=e.h2+o|0,e.h3=e.h3+f|0,e.h4=e.h4+x|0,l-=64}}});var Wt=R((Vr,Kt)=>{var D=Y();ce();K();var me=Kt.exports=D.sha512=D.sha512||{};D.md.sha512=D.md.algorithms.sha512=me;var $t=D.sha384=D.sha512.sha384=D.sha512.sha384||{};$t.create=function(){return me.create("SHA-384")};D.md.sha384=D.md.algorithms.sha384=$t;D.sha512.sha256=D.sha512.sha256||{create:function(){return me.create("SHA-512/256")}};D.md["sha512/256"]=D.md.algorithms["sha512/256"]=D.sha512.sha256;D.sha512.sha224=D.sha512.sha224||{create:function(){return me.create("SHA-512/224")}};D.md["sha512/224"]=D.md.algorithms["sha512/224"]=D.sha512.sha224;me.create=function(e){if(Yt||Sr(),typeof e>"u"&&(e="SHA-512"),!(e in de))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=de[e],a=null,r=D.util.createBuffer(),n=new Array(80),i=0;i<80;++i)n[i]=new Array(2);var o=64;switch(e){case"SHA-384":o=48;break;case"SHA-512/256":o=32;break;case"SHA-512/224":o=28;break}var f={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:o,messageLength:0,fullMessageLength:null,messageLengthSize:16};return f.start=function(){f.messageLength=0,f.fullMessageLength=f.messageLength128=[];for(var x=f.messageLengthSize/4,s=0;s>>0,c>>>0];for(var l=f.fullMessageLength.length-1;l>=0;--l)f.fullMessageLength[l]+=c[1],c[1]=c[0]+(f.fullMessageLength[l]/4294967296>>>0),f.fullMessageLength[l]=f.fullMessageLength[l]>>>0,c[0]=c[1]/4294967296>>>0;return r.putBytes(x),Gt(a,n,r),(r.read>2048||r.length()===0)&&r.compact(),f},f.digest=function(){var x=D.util.createBuffer();x.putBytes(r.bytes());var s=f.fullMessageLength[f.fullMessageLength.length-1]+f.messageLengthSize,c=s&f.blockLength-1;x.putBytes(Ze.substr(0,f.blockLength-c));for(var l,v,m=f.fullMessageLength[0]*8,I=0;I>>0,m+=v,x.putInt32(m>>>0),m=l>>>0;x.putInt32(m);for(var S=new Array(a.length),I=0;I=128;){for(b=0;b<16;++b)t[b][0]=a.getInt32()>>>0,t[b][1]=a.getInt32()>>>0;for(;b<80;++b)w=t[b-2],B=w[0],_=w[1],r=((B>>>19|_<<13)^(_>>>29|B<<3)^B>>>6)>>>0,n=((B<<13|_>>>19)^(_<<3|B>>>29)^(B<<26|_>>>6))>>>0,L=t[b-15],B=L[0],_=L[1],i=((B>>>1|_<<31)^(B>>>8|_<<24)^B>>>7)>>>0,o=((B<<31|_>>>1)^(B<<24|_>>>8)^(B<<25|_>>>7))>>>0,F=t[b-7],O=t[b-16],_=n+F[1]+o+O[1],t[b][0]=r+F[0]+i+O[0]+(_/4294967296>>>0)>>>0,t[b][1]=_>>>0;for(S=e[0][0],C=e[0][1],A=e[1][0],E=e[1][1],U=e[2][0],M=e[2][1],j=e[3][0],xe=e[3][1],W=e[4][0],G=e[4][1],ae=e[5][0],y=e[5][1],p=e[6][0],g=e[6][1],d=e[7][0],u=e[7][1],b=0;b<80;++b)s=((W>>>14|G<<18)^(W>>>18|G<<14)^(G>>>9|W<<23))>>>0,c=((W<<18|G>>>14)^(W<<14|G>>>18)^(G<<23|W>>>9))>>>0,l=(p^W&(ae^p))>>>0,v=(g^G&(y^g))>>>0,f=((S>>>28|C<<4)^(C>>>2|S<<30)^(C>>>7|S<<25))>>>0,x=((S<<4|C>>>28)^(C<<30|S>>>2)^(C<<25|S>>>7))>>>0,m=(S&A|U&(S^A))>>>0,I=(C&E|M&(C^E))>>>0,_=u+c+v+Qe[b][1]+t[b][1],r=d+s+l+Qe[b][0]+t[b][0]+(_/4294967296>>>0)>>>0,n=_>>>0,_=x+I,i=f+m+(_/4294967296>>>0)>>>0,o=_>>>0,d=p,u=g,p=ae,g=y,ae=W,y=G,_=xe+n,W=j+r+(_/4294967296>>>0)>>>0,G=_>>>0,j=U,xe=M,U=A,M=E,A=S,E=C,_=n+o,S=r+i+(_/4294967296>>>0)>>>0,C=_>>>0;_=e[0][1]+C,e[0][0]=e[0][0]+S+(_/4294967296>>>0)>>>0,e[0][1]=_>>>0,_=e[1][1]+E,e[1][0]=e[1][0]+A+(_/4294967296>>>0)>>>0,e[1][1]=_>>>0,_=e[2][1]+M,e[2][0]=e[2][0]+U+(_/4294967296>>>0)>>>0,e[2][1]=_>>>0,_=e[3][1]+xe,e[3][0]=e[3][0]+j+(_/4294967296>>>0)>>>0,e[3][1]=_>>>0,_=e[4][1]+G,e[4][0]=e[4][0]+W+(_/4294967296>>>0)>>>0,e[4][1]=_>>>0,_=e[5][1]+y,e[5][0]=e[5][0]+ae+(_/4294967296>>>0)>>>0,e[5][1]=_>>>0,_=e[6][1]+g,e[6][0]=e[6][0]+p+(_/4294967296>>>0)>>>0,e[6][1]=_>>>0,_=e[7][1]+u,e[7][0]=e[7][0]+d+(_/4294967296>>>0)>>>0,e[7][1]=_>>>0,$-=128}}});var Jt=R((Pr,Xt)=>{Xt.exports=ce();Nt();Pt();Ge();Wt()});var Ir={};sr(Ir,{PolyAES:()=>Be,PolyBcrypt:()=>Ot,PolyDigest:()=>Qt,PolyRand:()=>rr});module.exports=cr(Ir);var Ke=fe(Ne(),1),kt=fe(lt(),1),Ee=fe(Ye(),1),Q=fe(K(),1),Be=class e{static KEY_FORMAT_ERROR="PolyAES: key must be 64-character hexadecimal string.";static SALT_SIZE_ERROR="PolyAES: salt must be 8+ characters.";static ENCODING_ERROR="PolyAES: encoding must be base64, hex, or bin.";static DEFAULT_ENCODING="base64";_key;_encoding;static withKey(t){if(!/^[A-F0-9]{64}$/i.test(t))throw new Error(e.KEY_FORMAT_ERROR);let a=Q.default.hexToBytes(t);return new e(a)}static withPassword(t,a,r=1e4){if(String(a).length<8)throw new Error(e.SALT_SIZE_ERROR);let i=(0,kt.default)(t,a,r,32);return new e(i)}constructor(t){this._key=t,this.setEncoding(e.DEFAULT_ENCODING)}setEncoding(t){if(["base64","hex","bin"].indexOf(t)===-1)throw new Error(e.ENCODING_ERROR);return this._encoding=t,this}getEncoding(){return this._encoding}_binToStr(t){if(this._encoding==="bin")return t;if(this._encoding==="base64")return Q.default.encode64(t);if(this._encoding==="hex")return Q.default.bytesToHex(t)}_strToBin(t){if(this._encoding==="bin")return t;if(this._encoding==="base64")return Q.default.decode64(t);if(this._encoding==="hex")return Q.default.hexToBytes(t)}encrypt(t){let a="AES-GCM",r=Ee.default.getBytesSync(16),n=Ke.default.createCipher(a,this._key);return n.start({iv:r,tagLength:128}),n.update(Q.default.createBuffer(this._utf8ToBin(t))),n.finish(),this._binToStr(r+n.mode.tag.data+n.output.data)}decrypt(t){let a="AES-GCM",r=this._strToBin(t),n=r.slice(0,16),i=r.slice(16,32),o=r.slice(32),f=Ke.default.createDecipher(a,this._key);return f.start({iv:n,tag:i}),f.update(Q.default.createBuffer(o)),f.finish()?this._binToUtf8(f.output.data):""}static generateKey(t=64){return Q.default.bytesToHex(Ee.default.getBytesSync(t/2))}static generateSalt(t=64){return Q.default.bytesToHex(Ee.default.getBytesSync(t/2))}_utf8ToBin(t){if(typeof Buffer<"u"&&!globalThis.POLY_CRYPTO_TEST_WITHOUT_BUFFER)return Buffer.from(t,"utf8").toString("binary");if(typeof TextEncoder<"u"&&!globalThis.POLY_CRYPTO_TEST_WITHOUT_TEXTENCODER){let r=new TextEncoder().encode(t),n="";return r.forEach(function(i){n+=String.fromCharCode(i)}),n}else return encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,function(n,i){return String.fromCharCode(parseInt(i,16))})}_binToUtf8(t){if(typeof Buffer<"u"&&!globalThis.POLY_CRYPTO_TEST_WITHOUT_BUFFER)return Buffer.from(t,"binary").toString("utf8");if(typeof TextDecoder<"u"&&typeof Uint8Array<"u"&&!globalThis.POLY_CRYPTO_TEST_WITHOUT_TEXTDECODER){let a=new TextDecoder("utf-8"),r=[];return t.split("").forEach(function(n){r.push(n.charCodeAt(0))}),a.decode(Uint8Array.from(r))}else{let a=t.replace(/./g,function(r){let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n});return decodeURIComponent(a)}}};var Te=fe(Dt(),1),We={LENGTH_ERROR:"PolyBcrypt: password must be 72 bytes or less",COST_ERROR:"PolyBcrypt: cost must be between 4 and 31",hash(e,t=13){if(e.length>72)throw Error(We.LENGTH_ERROR);if(t=Number(t),isNaN(t)||t<4||t>31)throw Error(We.COST_ERROR);let a=Te.default.genSaltSync(t);return Te.default.hashSync(e,a)},verify(e,t){return e.length>72?!1:Te.default.compareSync(e,t)},info(e){let t=String(e).match(/^(\$..?\$)(\d\d)\$(.{22})(.{31})$/);return t?{valid:!0,version:t[1],cost:parseInt(t[2],10),salt:t[3],hash:t[4]}:{valid:!1}}},Ot=We;var Zt=fe(Jt(),1),Se={md5(e){return Se._digest("md5",e)},sha1(e){return Se._digest("sha1",e)},sha256(e){return Se._digest("sha256",e)},sha512(e){return Se._digest("sha512",e)},_digest(e,t){let a=Zt.default[e].create();return a.update(t),a.digest().toHex()}},Qt=Se;var er=fe(Ye(),1),tr=fe(K(),1),re={SYMBOL_LIST_ERROR:"PolyRand: Symbol list must contain between 2 and 256 characters.",SLUG_SYMBOL_LIST:"0123456789bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ".split(""),FAX_SYMBOL_LIST:"3467bcdfhjkmnpqrtvwxy".split(""),bytes(e){return er.default.getBytesSync(e)},hex(e){return tr.default.bytesToHex(re.bytes(e/2))},slug(e){return re.string(e,re.SLUG_SYMBOL_LIST)},fax(e){return re.string(e,re.FAX_SYMBOL_LIST)},string(e,t){let a=re.bytes(e);if(!Array.isArray(t)||t.length<2||t.length>256)throw new Error(re.SYMBOL_LIST_ERROR);let r=t.length,n="";for(let i=0;i * Released under the Apache License, Version 2.0 * see: https://github.com/dcodeIO/bcrypt.js for details *) */