@signumjs/crypto
Version:
Cryptographic functions for building Signum Network apps.
26 lines • 119 kB
JavaScript
"use strict";var sig$crypto=(()=>{var ia=Object.create;var mt=Object.defineProperty;var na=Object.getOwnPropertyDescriptor;var aa=Object.getOwnPropertyNames;var oa=Object.getPrototypeOf,la=Object.prototype.hasOwnProperty;var fa=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,t)=>(typeof require<"u"?require:r)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Z=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),sa=(e,r)=>{for(var t in r)mt(e,t,{get:r[t],enumerable:!0})},Zr=(e,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of aa(r))!la.call(e,n)&&n!==t&&mt(e,n,{get:()=>r[n],enumerable:!(i=na(r,n))||i.enumerable});return e};var vt=(e,r,t)=>(t=e!=null?ia(oa(e)):{},Zr(r||!e||!e.__esModule?mt(t,"default",{value:e,enumerable:!0}):t,e)),ua=e=>Zr(mt({},"__esModule",{value:!0}),e);var Hr=Z(bt=>{"use strict";bt.byteLength=ca;bt.toByteArray=pa;bt.fromByteArray=wa;var fe=[],ee=[],ha=typeof Uint8Array<"u"?Uint8Array:Array,Yt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Ue=0,qr=Yt.length;Ue<qr;++Ue)fe[Ue]=Yt[Ue],ee[Yt.charCodeAt(Ue)]=Ue;var Ue,qr;ee[45]=62;ee[95]=63;function Pr(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=r);var i=t===r?0:4-t%4;return[t,i]}function ca(e){var r=Pr(e),t=r[0],i=r[1];return(t+i)*3/4-i}function da(e,r,t){return(r+t)*3/4-t}function pa(e){var r,t=Pr(e),i=t[0],n=t[1],a=new ha(da(e,i,n)),o=0,l=n>0?i-4:i,u;for(u=0;u<l;u+=4)r=ee[e.charCodeAt(u)]<<18|ee[e.charCodeAt(u+1)]<<12|ee[e.charCodeAt(u+2)]<<6|ee[e.charCodeAt(u+3)],a[o++]=r>>16&255,a[o++]=r>>8&255,a[o++]=r&255;return n===2&&(r=ee[e.charCodeAt(u)]<<2|ee[e.charCodeAt(u+1)]>>4,a[o++]=r&255),n===1&&(r=ee[e.charCodeAt(u)]<<10|ee[e.charCodeAt(u+1)]<<4|ee[e.charCodeAt(u+2)]>>2,a[o++]=r>>8&255,a[o++]=r&255),a}function xa(e){return fe[e>>18&63]+fe[e>>12&63]+fe[e>>6&63]+fe[e&63]}function ga(e,r,t){for(var i,n=[],a=r;a<t;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),n.push(xa(i));return n.join("")}function wa(e){for(var r,t=e.length,i=t%3,n=[],a=16383,o=0,l=t-i;o<l;o+=a)n.push(ga(e,o,o+a>l?l:o+a));return i===1?(r=e[t-1],n.push(fe[r>>2]+fe[r<<4&63]+"==")):i===2&&(r=(e[t-2]<<8)+e[t-1],n.push(fe[r>>10]+fe[r>>4&63]+fe[r<<2&63]+"=")),n.join("")}});var Kr=Z($t=>{$t.read=function(e,r,t,i,n){var a,o,l=n*8-i-1,u=(1<<l)-1,s=u>>1,f=-7,p=t?n-1:0,g=t?-1:1,h=e[r+p];for(p+=g,a=h&(1<<-f)-1,h>>=-f,f+=l;f>0;a=a*256+e[r+p],p+=g,f-=8);for(o=a&(1<<-f)-1,a>>=-f,f+=i;f>0;o=o*256+e[r+p],p+=g,f-=8);if(a===0)a=1-s;else{if(a===u)return o?NaN:(h?-1:1)*(1/0);o=o+Math.pow(2,i),a=a-s}return(h?-1:1)*o*Math.pow(2,a-i)};$t.write=function(e,r,t,i,n,a){var o,l,u,s=a*8-n-1,f=(1<<s)-1,p=f>>1,g=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=i?0:a-1,F=i?1:-1,b=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,o=f):(o=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-o))<1&&(o--,u*=2),o+p>=1?r+=g/u:r+=g*Math.pow(2,1-p),r*u>=2&&(o++,u/=2),o+p>=f?(l=0,o=f):o+p>=1?(l=(r*u-1)*Math.pow(2,n),o=o+p):(l=r*Math.pow(2,p-1)*Math.pow(2,n),o=0));n>=8;e[t+h]=l&255,h+=F,l/=256,n-=8);for(o=o<<n|l,s+=n;s>0;e[t+h]=o&255,h+=F,o/=256,s-=8);e[t+h-F]|=b*128}});var li=Z(He=>{"use strict";var Wt=Hr(),qe=Kr(),jr=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;He.Buffer=d;He.SlowBuffer=Fa;He.INSPECT_MAX_BYTES=50;var Ft=2147483647;He.kMaxLength=Ft;d.TYPED_ARRAY_SUPPORT=_a();!d.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function _a(){try{let e=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch{return!1}}Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}});Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}});function xe(e){if(e>Ft)throw new RangeError('The value "'+e+'" is invalid for option "size"');let r=new Uint8Array(e);return Object.setPrototypeOf(r,d.prototype),r}function d(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Jt(e)}return Gr(e,r,t)}d.poolSize=8192;function Gr(e,r,t){if(typeof e=="string")return ma(e,r);if(ArrayBuffer.isView(e))return va(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(se(e,ArrayBuffer)||e&&se(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(se(e,SharedArrayBuffer)||e&&se(e.buffer,SharedArrayBuffer)))return Xt(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let i=e.valueOf&&e.valueOf();if(i!=null&&i!==e)return d.from(i,r,t);let n=ba(e);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return d.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}d.from=function(e,r,t){return Gr(e,r,t)};Object.setPrototypeOf(d.prototype,Uint8Array.prototype);Object.setPrototypeOf(d,Uint8Array);function Xr(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function ya(e,r,t){return Xr(e),e<=0?xe(e):r!==void 0?typeof t=="string"?xe(e).fill(r,t):xe(e).fill(r):xe(e)}d.alloc=function(e,r,t){return ya(e,r,t)};function Jt(e){return Xr(e),xe(e<0?0:Qt(e)|0)}d.allocUnsafe=function(e){return Jt(e)};d.allocUnsafeSlow=function(e){return Jt(e)};function ma(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!d.isEncoding(r))throw new TypeError("Unknown encoding: "+r);let t=Vr(e,r)|0,i=xe(t),n=i.write(e,r);return n!==t&&(i=i.slice(0,n)),i}function Gt(e){let r=e.length<0?0:Qt(e.length)|0,t=xe(r);for(let i=0;i<r;i+=1)t[i]=e[i]&255;return t}function va(e){if(se(e,Uint8Array)){let r=new Uint8Array(e);return Xt(r.buffer,r.byteOffset,r.byteLength)}return Gt(e)}function Xt(e,r,t){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');let i;return r===void 0&&t===void 0?i=new Uint8Array(e):t===void 0?i=new Uint8Array(e,r):i=new Uint8Array(e,r,t),Object.setPrototypeOf(i,d.prototype),i}function ba(e){if(d.isBuffer(e)){let r=Qt(e.length)|0,t=xe(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||tr(e.length)?xe(0):Gt(e);if(e.type==="Buffer"&&Array.isArray(e.data))return Gt(e.data)}function Qt(e){if(e>=Ft)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ft.toString(16)+" bytes");return e|0}function Fa(e){return+e!=e&&(e=0),d.alloc(+e)}d.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==d.prototype};d.compare=function(r,t){if(se(r,Uint8Array)&&(r=d.from(r,r.offset,r.byteLength)),se(t,Uint8Array)&&(t=d.from(t,t.offset,t.byteLength)),!d.isBuffer(r)||!d.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;let i=r.length,n=t.length;for(let a=0,o=Math.min(i,n);a<o;++a)if(r[a]!==t[a]){i=r[a],n=t[a];break}return i<n?-1:n<i?1:0};d.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};d.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return d.alloc(0);let i;if(t===void 0)for(t=0,i=0;i<r.length;++i)t+=r[i].length;let n=d.allocUnsafe(t),a=0;for(i=0;i<r.length;++i){let o=r[i];if(se(o,Uint8Array))a+o.length>n.length?(d.isBuffer(o)||(o=d.from(o)),o.copy(n,a)):Uint8Array.prototype.set.call(n,o,a);else if(d.isBuffer(o))o.copy(n,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=o.length}return n};function Vr(e,r){if(d.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||se(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let t=e.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&t===0)return 0;let n=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return Vt(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return oi(e).length;default:if(n)return i?-1:Vt(e).length;r=(""+r).toLowerCase(),n=!0}}d.byteLength=Vr;function ka(e,r,t){let i=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return za(this,r,t);case"utf8":case"utf-8":return Qr(this,r,t);case"ascii":return Ca(this,r,t);case"latin1":case"binary":return Ta(this,r,t);case"base64":return Ua(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Da(this,r,t);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}d.prototype._isBuffer=!0;function Re(e,r,t){let i=e[r];e[r]=e[t],e[t]=i}d.prototype.swap16=function(){let r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<r;t+=2)Re(this,t,t+1);return this};d.prototype.swap32=function(){let r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<r;t+=4)Re(this,t,t+3),Re(this,t+1,t+2);return this};d.prototype.swap64=function(){let r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<r;t+=8)Re(this,t,t+7),Re(this,t+1,t+6),Re(this,t+2,t+5),Re(this,t+3,t+4);return this};d.prototype.toString=function(){let r=this.length;return r===0?"":arguments.length===0?Qr(this,0,r):ka.apply(this,arguments)};d.prototype.toLocaleString=d.prototype.toString;d.prototype.equals=function(r){if(!d.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:d.compare(this,r)===0};d.prototype.inspect=function(){let r="",t=He.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"};jr&&(d.prototype[jr]=d.prototype.inspect);d.prototype.compare=function(r,t,i,n,a){if(se(r,Uint8Array)&&(r=d.from(r,r.offset,r.byteLength)),!d.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),i===void 0&&(i=r?r.length:0),n===void 0&&(n=0),a===void 0&&(a=this.length),t<0||i>r.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&t>=i)return 0;if(n>=a)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,n>>>=0,a>>>=0,this===r)return 0;let o=a-n,l=i-t,u=Math.min(o,l),s=this.slice(n,a),f=r.slice(t,i);for(let p=0;p<u;++p)if(s[p]!==f[p]){o=s[p],l=f[p];break}return o<l?-1:l<o?1:0};function Jr(e,r,t,i,n){if(e.length===0)return-1;if(typeof t=="string"?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,tr(t)&&(t=n?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(n)return-1;t=e.length-1}else if(t<0)if(n)t=0;else return-1;if(typeof r=="string"&&(r=d.from(r,i)),d.isBuffer(r))return r.length===0?-1:Yr(e,r,t,i,n);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):Yr(e,[r],t,i,n);throw new TypeError("val must be string, number or Buffer")}function Yr(e,r,t,i,n){let a=1,o=e.length,l=r.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(e.length<2||r.length<2)return-1;a=2,o/=2,l/=2,t/=2}function u(f,p){return a===1?f[p]:f.readUInt16BE(p*a)}let s;if(n){let f=-1;for(s=t;s<o;s++)if(u(e,s)===u(r,f===-1?0:s-f)){if(f===-1&&(f=s),s-f+1===l)return f*a}else f!==-1&&(s-=s-f),f=-1}else for(t+l>o&&(t=o-l),s=t;s>=0;s--){let f=!0;for(let p=0;p<l;p++)if(u(e,s+p)!==u(r,p)){f=!1;break}if(f)return s}return-1}d.prototype.includes=function(r,t,i){return this.indexOf(r,t,i)!==-1};d.prototype.indexOf=function(r,t,i){return Jr(this,r,t,i,!0)};d.prototype.lastIndexOf=function(r,t,i){return Jr(this,r,t,i,!1)};function Ea(e,r,t,i){t=Number(t)||0;let n=e.length-t;i?(i=Number(i),i>n&&(i=n)):i=n;let a=r.length;i>a/2&&(i=a/2);let o;for(o=0;o<i;++o){let l=parseInt(r.substr(o*2,2),16);if(tr(l))return o;e[t+o]=l}return o}function Aa(e,r,t,i){return kt(Vt(r,e.length-t),e,t,i)}function Ba(e,r,t,i){return kt(Ma(r),e,t,i)}function Sa(e,r,t,i){return kt(oi(r),e,t,i)}function Ia(e,r,t,i){return kt(Za(r,e.length-t),e,t,i)}d.prototype.write=function(r,t,i,n){if(t===void 0)n="utf8",i=this.length,t=0;else if(i===void 0&&typeof t=="string")n=t,i=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(i)?(i=i>>>0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let a=this.length-t;if((i===void 0||i>a)&&(i=a),r.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Ea(this,r,t,i);case"utf8":case"utf-8":return Aa(this,r,t,i);case"ascii":case"latin1":case"binary":return Ba(this,r,t,i);case"base64":return Sa(this,r,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ia(this,r,t,i);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ua(e,r,t){return r===0&&t===e.length?Wt.fromByteArray(e):Wt.fromByteArray(e.slice(r,t))}function Qr(e,r,t){t=Math.min(e.length,t);let i=[],n=r;for(;n<t;){let a=e[n],o=null,l=a>239?4:a>223?3:a>191?2:1;if(n+l<=t){let u,s,f,p;switch(l){case 1:a<128&&(o=a);break;case 2:u=e[n+1],(u&192)===128&&(p=(a&31)<<6|u&63,p>127&&(o=p));break;case 3:u=e[n+1],s=e[n+2],(u&192)===128&&(s&192)===128&&(p=(a&15)<<12|(u&63)<<6|s&63,p>2047&&(p<55296||p>57343)&&(o=p));break;case 4:u=e[n+1],s=e[n+2],f=e[n+3],(u&192)===128&&(s&192)===128&&(f&192)===128&&(p=(a&15)<<18|(u&63)<<12|(s&63)<<6|f&63,p>65535&&p<1114112&&(o=p))}}o===null?(o=65533,l=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|o&1023),i.push(o),n+=l}return Ra(i)}var $r=4096;function Ra(e){let r=e.length;if(r<=$r)return String.fromCharCode.apply(String,e);let t="",i=0;for(;i<r;)t+=String.fromCharCode.apply(String,e.slice(i,i+=$r));return t}function Ca(e,r,t){let i="";t=Math.min(e.length,t);for(let n=r;n<t;++n)i+=String.fromCharCode(e[n]&127);return i}function Ta(e,r,t){let i="";t=Math.min(e.length,t);for(let n=r;n<t;++n)i+=String.fromCharCode(e[n]);return i}function za(e,r,t){let i=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>i)&&(t=i);let n="";for(let a=r;a<t;++a)n+=qa[e[a]];return n}function Da(e,r,t){let i=e.slice(r,t),n="";for(let a=0;a<i.length-1;a+=2)n+=String.fromCharCode(i[a]+i[a+1]*256);return n}d.prototype.slice=function(r,t){let i=this.length;r=~~r,t=t===void 0?i:~~t,r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<r&&(t=r);let n=this.subarray(r,t);return Object.setPrototypeOf(n,d.prototype),n};function K(e,r,t){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}d.prototype.readUintLE=d.prototype.readUIntLE=function(r,t,i){r=r>>>0,t=t>>>0,i||K(r,t,this.length);let n=this[r],a=1,o=0;for(;++o<t&&(a*=256);)n+=this[r+o]*a;return n};d.prototype.readUintBE=d.prototype.readUIntBE=function(r,t,i){r=r>>>0,t=t>>>0,i||K(r,t,this.length);let n=this[r+--t],a=1;for(;t>0&&(a*=256);)n+=this[r+--t]*a;return n};d.prototype.readUint8=d.prototype.readUInt8=function(r,t){return r=r>>>0,t||K(r,1,this.length),this[r]};d.prototype.readUint16LE=d.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||K(r,2,this.length),this[r]|this[r+1]<<8};d.prototype.readUint16BE=d.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||K(r,2,this.length),this[r]<<8|this[r+1]};d.prototype.readUint32LE=d.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||K(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};d.prototype.readUint32BE=d.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||K(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};d.prototype.readBigUInt64LE=ve(function(r){r=r>>>0,Pe(r,"offset");let t=this[r],i=this[r+7];(t===void 0||i===void 0)&&tt(r,this.length-8);let n=t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,a=this[++r]+this[++r]*2**8+this[++r]*2**16+i*2**24;return BigInt(n)+(BigInt(a)<<BigInt(32))});d.prototype.readBigUInt64BE=ve(function(r){r=r>>>0,Pe(r,"offset");let t=this[r],i=this[r+7];(t===void 0||i===void 0)&&tt(r,this.length-8);let n=t*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],a=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+i;return(BigInt(n)<<BigInt(32))+BigInt(a)});d.prototype.readIntLE=function(r,t,i){r=r>>>0,t=t>>>0,i||K(r,t,this.length);let n=this[r],a=1,o=0;for(;++o<t&&(a*=256);)n+=this[r+o]*a;return a*=128,n>=a&&(n-=Math.pow(2,8*t)),n};d.prototype.readIntBE=function(r,t,i){r=r>>>0,t=t>>>0,i||K(r,t,this.length);let n=t,a=1,o=this[r+--n];for(;n>0&&(a*=256);)o+=this[r+--n]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*t)),o};d.prototype.readInt8=function(r,t){return r=r>>>0,t||K(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};d.prototype.readInt16LE=function(r,t){r=r>>>0,t||K(r,2,this.length);let i=this[r]|this[r+1]<<8;return i&32768?i|4294901760:i};d.prototype.readInt16BE=function(r,t){r=r>>>0,t||K(r,2,this.length);let i=this[r+1]|this[r]<<8;return i&32768?i|4294901760:i};d.prototype.readInt32LE=function(r,t){return r=r>>>0,t||K(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};d.prototype.readInt32BE=function(r,t){return r=r>>>0,t||K(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};d.prototype.readBigInt64LE=ve(function(r){r=r>>>0,Pe(r,"offset");let t=this[r],i=this[r+7];(t===void 0||i===void 0)&&tt(r,this.length-8);let n=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(i<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24)});d.prototype.readBigInt64BE=ve(function(r){r=r>>>0,Pe(r,"offset");let t=this[r],i=this[r+7];(t===void 0||i===void 0)&&tt(r,this.length-8);let n=(t<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(n)<<BigInt(32))+BigInt(this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+i)});d.prototype.readFloatLE=function(r,t){return r=r>>>0,t||K(r,4,this.length),qe.read(this,r,!0,23,4)};d.prototype.readFloatBE=function(r,t){return r=r>>>0,t||K(r,4,this.length),qe.read(this,r,!1,23,4)};d.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||K(r,8,this.length),qe.read(this,r,!0,52,8)};d.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||K(r,8,this.length),qe.read(this,r,!1,52,8)};function G(e,r,t,i,n,a){if(!d.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>n||r<a)throw new RangeError('"value" argument is out of bounds');if(t+i>e.length)throw new RangeError("Index out of range")}d.prototype.writeUintLE=d.prototype.writeUIntLE=function(r,t,i,n){if(r=+r,t=t>>>0,i=i>>>0,!n){let l=Math.pow(2,8*i)-1;G(this,r,t,i,l,0)}let a=1,o=0;for(this[t]=r&255;++o<i&&(a*=256);)this[t+o]=r/a&255;return t+i};d.prototype.writeUintBE=d.prototype.writeUIntBE=function(r,t,i,n){if(r=+r,t=t>>>0,i=i>>>0,!n){let l=Math.pow(2,8*i)-1;G(this,r,t,i,l,0)}let a=i-1,o=1;for(this[t+a]=r&255;--a>=0&&(o*=256);)this[t+a]=r/o&255;return t+i};d.prototype.writeUint8=d.prototype.writeUInt8=function(r,t,i){return r=+r,t=t>>>0,i||G(this,r,t,1,255,0),this[t]=r&255,t+1};d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(r,t,i){return r=+r,t=t>>>0,i||G(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2};d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(r,t,i){return r=+r,t=t>>>0,i||G(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2};d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(r,t,i){return r=+r,t=t>>>0,i||G(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4};d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(r,t,i){return r=+r,t=t>>>0,i||G(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function ei(e,r,t,i,n){ai(r,i,n,e,t,7);let a=Number(r&BigInt(4294967295));e[t++]=a,a=a>>8,e[t++]=a,a=a>>8,e[t++]=a,a=a>>8,e[t++]=a;let o=Number(r>>BigInt(32)&BigInt(4294967295));return e[t++]=o,o=o>>8,e[t++]=o,o=o>>8,e[t++]=o,o=o>>8,e[t++]=o,t}function ti(e,r,t,i,n){ai(r,i,n,e,t,7);let a=Number(r&BigInt(4294967295));e[t+7]=a,a=a>>8,e[t+6]=a,a=a>>8,e[t+5]=a,a=a>>8,e[t+4]=a;let o=Number(r>>BigInt(32)&BigInt(4294967295));return e[t+3]=o,o=o>>8,e[t+2]=o,o=o>>8,e[t+1]=o,o=o>>8,e[t]=o,t+8}d.prototype.writeBigUInt64LE=ve(function(r,t=0){return ei(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});d.prototype.writeBigUInt64BE=ve(function(r,t=0){return ti(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});d.prototype.writeIntLE=function(r,t,i,n){if(r=+r,t=t>>>0,!n){let u=Math.pow(2,8*i-1);G(this,r,t,i,u-1,-u)}let a=0,o=1,l=0;for(this[t]=r&255;++a<i&&(o*=256);)r<0&&l===0&&this[t+a-1]!==0&&(l=1),this[t+a]=(r/o>>0)-l&255;return t+i};d.prototype.writeIntBE=function(r,t,i,n){if(r=+r,t=t>>>0,!n){let u=Math.pow(2,8*i-1);G(this,r,t,i,u-1,-u)}let a=i-1,o=1,l=0;for(this[t+a]=r&255;--a>=0&&(o*=256);)r<0&&l===0&&this[t+a+1]!==0&&(l=1),this[t+a]=(r/o>>0)-l&255;return t+i};d.prototype.writeInt8=function(r,t,i){return r=+r,t=t>>>0,i||G(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1};d.prototype.writeInt16LE=function(r,t,i){return r=+r,t=t>>>0,i||G(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2};d.prototype.writeInt16BE=function(r,t,i){return r=+r,t=t>>>0,i||G(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2};d.prototype.writeInt32LE=function(r,t,i){return r=+r,t=t>>>0,i||G(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4};d.prototype.writeInt32BE=function(r,t,i){return r=+r,t=t>>>0,i||G(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};d.prototype.writeBigInt64LE=ve(function(r,t=0){return ei(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});d.prototype.writeBigInt64BE=ve(function(r,t=0){return ti(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ri(e,r,t,i,n,a){if(t+i>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function ii(e,r,t,i,n){return r=+r,t=t>>>0,n||ri(e,r,t,4,34028234663852886e22,-34028234663852886e22),qe.write(e,r,t,i,23,4),t+4}d.prototype.writeFloatLE=function(r,t,i){return ii(this,r,t,!0,i)};d.prototype.writeFloatBE=function(r,t,i){return ii(this,r,t,!1,i)};function ni(e,r,t,i,n){return r=+r,t=t>>>0,n||ri(e,r,t,8,17976931348623157e292,-17976931348623157e292),qe.write(e,r,t,i,52,8),t+8}d.prototype.writeDoubleLE=function(r,t,i){return ni(this,r,t,!0,i)};d.prototype.writeDoubleBE=function(r,t,i){return ni(this,r,t,!1,i)};d.prototype.copy=function(r,t,i,n){if(!d.isBuffer(r))throw new TypeError("argument should be a Buffer");if(i||(i=0),!n&&n!==0&&(n=this.length),t>=r.length&&(t=r.length),t||(t=0),n>0&&n<i&&(n=i),n===i||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),r.length-t<n-i&&(n=r.length-t+i);let a=n-i;return this===r&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,i,n):Uint8Array.prototype.set.call(r,this.subarray(i,n),t),a};d.prototype.fill=function(r,t,i,n){if(typeof r=="string"){if(typeof t=="string"?(n=t,t=0,i=this.length):typeof i=="string"&&(n=i,i=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!d.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(r.length===1){let o=r.charCodeAt(0);(n==="utf8"&&o<128||n==="latin1")&&(r=o)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;t=t>>>0,i=i===void 0?this.length:i>>>0,r||(r=0);let a;if(typeof r=="number")for(a=t;a<i;++a)this[a]=r;else{let o=d.isBuffer(r)?r:d.from(r,n),l=o.length;if(l===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(a=0;a<i-t;++a)this[a+t]=o[a%l]}return this};var Ze={};function er(e,r,t){Ze[e]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:r.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(n){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:n,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}er("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);er("ERR_INVALID_ARG_TYPE",function(e,r){return`The "${e}" argument must be of type number. Received type ${typeof r}`},TypeError);er("ERR_OUT_OF_RANGE",function(e,r,t){let i=`The value of "${e}" is out of range.`,n=t;return Number.isInteger(t)&&Math.abs(t)>2**32?n=Wr(String(t)):typeof t=="bigint"&&(n=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(n=Wr(n)),n+="n"),i+=` It must be ${r}. Received ${n}`,i},RangeError);function Wr(e){let r="",t=e.length,i=e[0]==="-"?1:0;for(;t>=i+4;t-=3)r=`_${e.slice(t-3,t)}${r}`;return`${e.slice(0,t)}${r}`}function Na(e,r,t){Pe(r,"offset"),(e[r]===void 0||e[r+t]===void 0)&&tt(r,e.length-(t+1))}function ai(e,r,t,i,n,a){if(e>t||e<r){let o=typeof r=="bigint"?"n":"",l;throw a>3?r===0||r===BigInt(0)?l=`>= 0${o} and < 2${o} ** ${(a+1)*8}${o}`:l=`>= -(2${o} ** ${(a+1)*8-1}${o}) and < 2 ** ${(a+1)*8-1}${o}`:l=`>= ${r}${o} and <= ${t}${o}`,new Ze.ERR_OUT_OF_RANGE("value",l,e)}Na(i,n,a)}function Pe(e,r){if(typeof e!="number")throw new Ze.ERR_INVALID_ARG_TYPE(r,"number",e)}function tt(e,r,t){throw Math.floor(e)!==e?(Pe(e,t),new Ze.ERR_OUT_OF_RANGE(t||"offset","an integer",e)):r<0?new Ze.ERR_BUFFER_OUT_OF_BOUNDS:new Ze.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${r}`,e)}var Oa=/[^+/0-9A-Za-z-_]/g;function La(e){if(e=e.split("=")[0],e=e.trim().replace(Oa,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Vt(e,r){r=r||1/0;let t,i=e.length,n=null,a=[];for(let o=0;o<i;++o){if(t=e.charCodeAt(o),t>55295&&t<57344){if(!n){if(t>56319){(r-=3)>-1&&a.push(239,191,189);continue}else if(o+1===i){(r-=3)>-1&&a.push(239,191,189);continue}n=t;continue}if(t<56320){(r-=3)>-1&&a.push(239,191,189),n=t;continue}t=(n-55296<<10|t-56320)+65536}else n&&(r-=3)>-1&&a.push(239,191,189);if(n=null,t<128){if((r-=1)<0)break;a.push(t)}else if(t<2048){if((r-=2)<0)break;a.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;a.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;a.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return a}function Ma(e){let r=[];for(let t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function Za(e,r){let t,i,n,a=[];for(let o=0;o<e.length&&!((r-=2)<0);++o)t=e.charCodeAt(o),i=t>>8,n=t%256,a.push(n),a.push(i);return a}function oi(e){return Wt.toByteArray(La(e))}function kt(e,r,t,i){let n;for(n=0;n<i&&!(n+t>=r.length||n>=e.length);++n)r[n+t]=e[n];return n}function se(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function tr(e){return e!==e}var qa=function(){let e="0123456789abcdef",r=new Array(256);for(let t=0;t<16;++t){let i=t*16;for(let n=0;n<16;++n)r[i+n]=e[t]+e[n]}return r}();function ve(e){return typeof BigInt>"u"?Pa:e}function Pa(){throw new Error("BigInt not supported")}});var be=Z($=>{"use strict";var Ha=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function Ka(e,r){return Object.prototype.hasOwnProperty.call(e,r)}$.assign=function(e){for(var r=Array.prototype.slice.call(arguments,1);r.length;){var t=r.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(var i in t)Ka(t,i)&&(e[i]=t[i])}}return e};$.shrinkBuf=function(e,r){return e.length===r?e:e.subarray?e.subarray(0,r):(e.length=r,e)};var ja={arraySet:function(e,r,t,i,n){if(r.subarray&&e.subarray){e.set(r.subarray(t,t+i),n);return}for(var a=0;a<i;a++)e[n+a]=r[t+a]},flattenChunks:function(e){var r,t,i,n,a,o;for(i=0,r=0,t=e.length;r<t;r++)i+=e[r].length;for(o=new Uint8Array(i),n=0,r=0,t=e.length;r<t;r++)a=e[r],o.set(a,n),n+=a.length;return o}},Ya={arraySet:function(e,r,t,i,n){for(var a=0;a<i;a++)e[n+a]=r[t+a]},flattenChunks:function(e){return[].concat.apply([],e)}};$.setTyped=function(e){e?($.Buf8=Uint8Array,$.Buf16=Uint16Array,$.Buf32=Int32Array,$.assign($,ja)):($.Buf8=Array,$.Buf16=Array,$.Buf32=Array,$.assign($,Ya))};$.setTyped(Ha)});var Ui=Z(Ye=>{"use strict";var $a=be(),Wa=4,fi=0,si=1,Ga=2;function je(e){for(var r=e.length;--r>=0;)e[r]=0}var Xa=0,xi=1,Va=2,Ja=3,Qa=258,fr=29,lt=256,it=lt+1+fr,Ke=30,sr=19,gi=2*it+1,Ce=15,rr=16,e0=7,ur=256,wi=16,_i=17,yi=18,or=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Et=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],t0=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],mi=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],r0=512,ge=new Array((it+2)*2);je(ge);var rt=new Array(Ke*2);je(rt);var nt=new Array(r0);je(nt);var at=new Array(Qa-Ja+1);je(at);var hr=new Array(fr);je(hr);var At=new Array(Ke);je(At);function ir(e,r,t,i,n){this.static_tree=e,this.extra_bits=r,this.extra_base=t,this.elems=i,this.max_length=n,this.has_stree=e&&e.length}var vi,bi,Fi;function nr(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}function ki(e){return e<256?nt[e]:nt[256+(e>>>7)]}function ot(e,r){e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255}function X(e,r,t){e.bi_valid>rr-t?(e.bi_buf|=r<<e.bi_valid&65535,ot(e,e.bi_buf),e.bi_buf=r>>rr-e.bi_valid,e.bi_valid+=t-rr):(e.bi_buf|=r<<e.bi_valid&65535,e.bi_valid+=t)}function ue(e,r,t){X(e,t[r*2],t[r*2+1])}function Ei(e,r){var t=0;do t|=e&1,e>>>=1,t<<=1;while(--r>0);return t>>>1}function i0(e){e.bi_valid===16?(ot(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function n0(e,r){var t=r.dyn_tree,i=r.max_code,n=r.stat_desc.static_tree,a=r.stat_desc.has_stree,o=r.stat_desc.extra_bits,l=r.stat_desc.extra_base,u=r.stat_desc.max_length,s,f,p,g,h,F,b=0;for(g=0;g<=Ce;g++)e.bl_count[g]=0;for(t[e.heap[e.heap_max]*2+1]=0,s=e.heap_max+1;s<gi;s++)f=e.heap[s],g=t[t[f*2+1]*2+1]+1,g>u&&(g=u,b++),t[f*2+1]=g,!(f>i)&&(e.bl_count[g]++,h=0,f>=l&&(h=o[f-l]),F=t[f*2],e.opt_len+=F*(g+h),a&&(e.static_len+=F*(n[f*2+1]+h)));if(b!==0){do{for(g=u-1;e.bl_count[g]===0;)g--;e.bl_count[g]--,e.bl_count[g+1]+=2,e.bl_count[u]--,b-=2}while(b>0);for(g=u;g!==0;g--)for(f=e.bl_count[g];f!==0;)p=e.heap[--s],!(p>i)&&(t[p*2+1]!==g&&(e.opt_len+=(g-t[p*2+1])*t[p*2],t[p*2+1]=g),f--)}}function Ai(e,r,t){var i=new Array(Ce+1),n=0,a,o;for(a=1;a<=Ce;a++)i[a]=n=n+t[a-1]<<1;for(o=0;o<=r;o++){var l=e[o*2+1];l!==0&&(e[o*2]=Ei(i[l]++,l))}}function a0(){var e,r,t,i,n,a=new Array(Ce+1);for(t=0,i=0;i<fr-1;i++)for(hr[i]=t,e=0;e<1<<or[i];e++)at[t++]=i;for(at[t-1]=i,n=0,i=0;i<16;i++)for(At[i]=n,e=0;e<1<<Et[i];e++)nt[n++]=i;for(n>>=7;i<Ke;i++)for(At[i]=n<<7,e=0;e<1<<Et[i]-7;e++)nt[256+n++]=i;for(r=0;r<=Ce;r++)a[r]=0;for(e=0;e<=143;)ge[e*2+1]=8,e++,a[8]++;for(;e<=255;)ge[e*2+1]=9,e++,a[9]++;for(;e<=279;)ge[e*2+1]=7,e++,a[7]++;for(;e<=287;)ge[e*2+1]=8,e++,a[8]++;for(Ai(ge,it+1,a),e=0;e<Ke;e++)rt[e*2+1]=5,rt[e*2]=Ei(e,5);vi=new ir(ge,or,lt+1,it,Ce),bi=new ir(rt,Et,0,Ke,Ce),Fi=new ir(new Array(0),t0,0,sr,e0)}function Bi(e){var r;for(r=0;r<it;r++)e.dyn_ltree[r*2]=0;for(r=0;r<Ke;r++)e.dyn_dtree[r*2]=0;for(r=0;r<sr;r++)e.bl_tree[r*2]=0;e.dyn_ltree[ur*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Si(e){e.bi_valid>8?ot(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function o0(e,r,t,i){Si(e),i&&(ot(e,t),ot(e,~t)),$a.arraySet(e.pending_buf,e.window,r,t,e.pending),e.pending+=t}function ui(e,r,t,i){var n=r*2,a=t*2;return e[n]<e[a]||e[n]===e[a]&&i[r]<=i[t]}function ar(e,r,t){for(var i=e.heap[t],n=t<<1;n<=e.heap_len&&(n<e.heap_len&&ui(r,e.heap[n+1],e.heap[n],e.depth)&&n++,!ui(r,i,e.heap[n],e.depth));)e.heap[t]=e.heap[n],t=n,n<<=1;e.heap[t]=i}function hi(e,r,t){var i,n,a=0,o,l;if(e.last_lit!==0)do i=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],n=e.pending_buf[e.l_buf+a],a++,i===0?ue(e,n,r):(o=at[n],ue(e,o+lt+1,r),l=or[o],l!==0&&(n-=hr[o],X(e,n,l)),i--,o=ki(i),ue(e,o,t),l=Et[o],l!==0&&(i-=At[o],X(e,i,l)));while(a<e.last_lit);ue(e,ur,r)}function lr(e,r){var t=r.dyn_tree,i=r.stat_desc.static_tree,n=r.stat_desc.has_stree,a=r.stat_desc.elems,o,l,u=-1,s;for(e.heap_len=0,e.heap_max=gi,o=0;o<a;o++)t[o*2]!==0?(e.heap[++e.heap_len]=u=o,e.depth[o]=0):t[o*2+1]=0;for(;e.heap_len<2;)s=e.heap[++e.heap_len]=u<2?++u:0,t[s*2]=1,e.depth[s]=0,e.opt_len--,n&&(e.static_len-=i[s*2+1]);for(r.max_code=u,o=e.heap_len>>1;o>=1;o--)ar(e,t,o);s=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ar(e,t,1),l=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=l,t[s*2]=t[o*2]+t[l*2],e.depth[s]=(e.depth[o]>=e.depth[l]?e.depth[o]:e.depth[l])+1,t[o*2+1]=t[l*2+1]=s,e.heap[1]=s++,ar(e,t,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],n0(e,r),Ai(t,u,e.bl_count)}function ci(e,r,t){var i,n=-1,a,o=r[0*2+1],l=0,u=7,s=4;for(o===0&&(u=138,s=3),r[(t+1)*2+1]=65535,i=0;i<=t;i++)a=o,o=r[(i+1)*2+1],!(++l<u&&a===o)&&(l<s?e.bl_tree[a*2]+=l:a!==0?(a!==n&&e.bl_tree[a*2]++,e.bl_tree[wi*2]++):l<=10?e.bl_tree[_i*2]++:e.bl_tree[yi*2]++,l=0,n=a,o===0?(u=138,s=3):a===o?(u=6,s=3):(u=7,s=4))}function di(e,r,t){var i,n=-1,a,o=r[0*2+1],l=0,u=7,s=4;for(o===0&&(u=138,s=3),i=0;i<=t;i++)if(a=o,o=r[(i+1)*2+1],!(++l<u&&a===o)){if(l<s)do ue(e,a,e.bl_tree);while(--l!==0);else a!==0?(a!==n&&(ue(e,a,e.bl_tree),l--),ue(e,wi,e.bl_tree),X(e,l-3,2)):l<=10?(ue(e,_i,e.bl_tree),X(e,l-3,3)):(ue(e,yi,e.bl_tree),X(e,l-11,7));l=0,n=a,o===0?(u=138,s=3):a===o?(u=6,s=3):(u=7,s=4)}}function l0(e){var r;for(ci(e,e.dyn_ltree,e.l_desc.max_code),ci(e,e.dyn_dtree,e.d_desc.max_code),lr(e,e.bl_desc),r=sr-1;r>=3&&e.bl_tree[mi[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r}function f0(e,r,t,i){var n;for(X(e,r-257,5),X(e,t-1,5),X(e,i-4,4),n=0;n<i;n++)X(e,e.bl_tree[mi[n]*2+1],3);di(e,e.dyn_ltree,r-1),di(e,e.dyn_dtree,t-1)}function s0(e){var r=4093624447,t;for(t=0;t<=31;t++,r>>>=1)if(r&1&&e.dyn_ltree[t*2]!==0)return fi;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return si;for(t=32;t<lt;t++)if(e.dyn_ltree[t*2]!==0)return si;return fi}var pi=!1;function u0(e){pi||(a0(),pi=!0),e.l_desc=new nr(e.dyn_ltree,vi),e.d_desc=new nr(e.dyn_dtree,bi),e.bl_desc=new nr(e.bl_tree,Fi),e.bi_buf=0,e.bi_valid=0,Bi(e)}function Ii(e,r,t,i){X(e,(Xa<<1)+(i?1:0),3),o0(e,r,t,!0)}function h0(e){X(e,xi<<1,3),ue(e,ur,ge),i0(e)}function c0(e,r,t,i){var n,a,o=0;e.level>0?(e.strm.data_type===Ga&&(e.strm.data_type=s0(e)),lr(e,e.l_desc),lr(e,e.d_desc),o=l0(e),n=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=n&&(n=a)):n=a=t+5,t+4<=n&&r!==-1?Ii(e,r,t,i):e.strategy===Wa||a===n?(X(e,(xi<<1)+(i?1:0),3),hi(e,ge,rt)):(X(e,(Va<<1)+(i?1:0),3),f0(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),hi(e,e.dyn_ltree,e.dyn_dtree)),Bi(e),i&&Si(e)}function d0(e,r,t){return e.pending_buf[e.d_buf+e.last_lit*2]=r>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=r&255,e.pending_buf[e.l_buf+e.last_lit]=t&255,e.last_lit++,r===0?e.dyn_ltree[t*2]++:(e.matches++,r--,e.dyn_ltree[(at[t]+lt+1)*2]++,e.dyn_dtree[ki(r)*2]++),e.last_lit===e.lit_bufsize-1}Ye._tr_init=u0;Ye._tr_stored_block=Ii;Ye._tr_flush_block=c0;Ye._tr_tally=d0;Ye._tr_align=h0});var cr=Z((cl,Ri)=>{"use strict";function p0(e,r,t,i){for(var n=e&65535|0,a=e>>>16&65535|0,o=0;t!==0;){o=t>2e3?2e3:t,t-=o;do n=n+r[i++]|0,a=a+n|0;while(--o);n%=65521,a%=65521}return n|a<<16|0}Ri.exports=p0});var dr=Z((dl,Ci)=>{"use strict";function x0(){for(var e,r=[],t=0;t<256;t++){e=t;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;r[t]=e}return r}var g0=x0();function w0(e,r,t,i){var n=g0,a=i+t;e^=-1;for(var o=i;o<a;o++)e=e>>>8^n[(e^r[o])&255];return e^-1}Ci.exports=w0});var Bt=Z((pl,Ti)=>{"use strict";Ti.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var Pi=Z(de=>{"use strict";var W=be(),te=Ui(),Oi=cr(),Fe=dr(),_0=Bt(),Ne=0,y0=1,m0=3,Se=4,zi=5,ce=0,Di=1,re=-2,v0=-3,pr=-5,b0=-1,F0=1,St=2,k0=3,E0=4,A0=0,B0=2,Ct=8,S0=9,I0=15,U0=8,R0=29,C0=256,gr=C0+1+R0,T0=30,z0=19,D0=2*gr+1,N0=15,T=3,Ae=258,oe=Ae+T+1,O0=32,Tt=42,wr=69,It=73,Ut=91,Rt=103,Te=113,st=666,P=1,ut=2,ze=3,Ge=4,L0=3;function Be(e,r){return e.msg=_0[r],r}function Ni(e){return(e<<1)-(e>4?9:0)}function Ee(e){for(var r=e.length;--r>=0;)e[r]=0}function ke(e){var r=e.state,t=r.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(W.arraySet(e.output,r.pending_buf,r.pending_out,t,e.next_out),e.next_out+=t,r.pending_out+=t,e.total_out+=t,e.avail_out-=t,r.pending-=t,r.pending===0&&(r.pending_out=0))}function j(e,r){te._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,ke(e.strm)}function z(e,r){e.pending_buf[e.pending++]=r}function ft(e,r){e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255}function M0(e,r,t,i){var n=e.avail_in;return n>i&&(n=i),n===0?0:(e.avail_in-=n,W.arraySet(r,e.input,e.next_in,n,t),e.state.wrap===1?e.adler=Oi(e.adler,r,n,t):e.state.wrap===2&&(e.adler=Fe(e.adler,r,n,t)),e.next_in+=n,e.total_in+=n,n)}function Li(e,r){var t=e.max_chain_length,i=e.strstart,n,a,o=e.prev_length,l=e.nice_match,u=e.strstart>e.w_size-oe?e.strstart-(e.w_size-oe):0,s=e.window,f=e.w_mask,p=e.prev,g=e.strstart+Ae,h=s[i+o-1],F=s[i+o];e.prev_length>=e.good_match&&(t>>=2),l>e.lookahead&&(l=e.lookahead);do if(n=r,!(s[n+o]!==F||s[n+o-1]!==h||s[n]!==s[i]||s[++n]!==s[i+1])){i+=2,n++;do;while(s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&i<g);if(a=Ae-(g-i),i=g-Ae,a>o){if(e.match_start=r,o=a,a>=l)break;h=s[i+o-1],F=s[i+o]}}while((r=p[r&f])>u&&--t!==0);return o<=e.lookahead?o:e.lookahead}function De(e){var r=e.w_size,t,i,n,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-oe)){W.arraySet(e.window,e.window,r,r,0),e.match_start-=r,e.strstart-=r,e.block_start-=r,i=e.hash_size,t=i;do n=e.head[--t],e.head[t]=n>=r?n-r:0;while(--i);i=r,t=i;do n=e.prev[--t],e.prev[t]=n>=r?n-r:0;while(--i);a+=r}if(e.strm.avail_in===0)break;if(i=M0(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=i,e.lookahead+e.insert>=T)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+T-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<T)););}while(e.lookahead<oe&&e.strm.avail_in!==0)}function Z0(e,r){var t=65535;for(t>e.pending_buf_size-5&&(t=e.pending_buf_size-5);;){if(e.lookahead<=1){if(De(e),e.lookahead===0&&r===Ne)return P;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+t;if((e.strstart===0||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,j(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-oe&&(j(e,!1),e.strm.avail_out===0))return P}return e.insert=0,r===Se?(j(e,!0),e.strm.avail_out===0?ze:Ge):(e.strstart>e.block_start&&(j(e,!1),e.strm.avail_out===0),P)}function xr(e,r){for(var t,i;;){if(e.lookahead<oe){if(De(e),e.lookahead<oe&&r===Ne)return P;if(e.lookahead===0)break}if(t=0,e.lookahead>=T&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+T-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),t!==0&&e.strstart-t<=e.w_size-oe&&(e.match_length=Li(e,t)),e.match_length>=T)if(i=te._tr_tally(e,e.strstart-e.match_start,e.match_length-T),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=T){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+T-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=te._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(j(e,!1),e.strm.avail_out===0))return P}return e.insert=e.strstart<T-1?e.strstart:T-1,r===Se?(j(e,!0),e.strm.avail_out===0?ze:Ge):e.last_lit&&(j(e,!1),e.strm.avail_out===0)?P:ut}function $e(e,r){for(var t,i,n;;){if(e.lookahead<oe){if(De(e),e.lookahead<oe&&r===Ne)return P;if(e.lookahead===0)break}if(t=0,e.lookahead>=T&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+T-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=T-1,t!==0&&e.prev_length<e.max_lazy_match&&e.strstart-t<=e.w_size-oe&&(e.match_length=Li(e,t),e.match_length<=5&&(e.strategy===F0||e.match_length===T&&e.strstart-e.match_start>4096)&&(e.match_length=T-1)),e.prev_length>=T&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-T,i=te._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-T),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=n&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+T-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=T-1,e.strstart++,i&&(j(e,!1),e.strm.avail_out===0))return P}else if(e.match_available){if(i=te._tr_tally(e,0,e.window[e.strstart-1]),i&&j(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return P}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=te._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<T-1?e.strstart:T-1,r===Se?(j(e,!0),e.strm.avail_out===0?ze:Ge):e.last_lit&&(j(e,!1),e.strm.avail_out===0)?P:ut}function q0(e,r){for(var t,i,n,a,o=e.window;;){if(e.lookahead<=Ae){if(De(e),e.lookahead<=Ae&&r===Ne)return P;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=T&&e.strstart>0&&(n=e.strstart-1,i=o[n],i===o[++n]&&i===o[++n]&&i===o[++n])){a=e.strstart+Ae;do;while(i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&n<a);e.match_length=Ae-(a-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=T?(t=te._tr_tally(e,1,e.match_length-T),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(t=te._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),t&&(j(e,!1),e.strm.avail_out===0))return P}return e.insert=0,r===Se?(j(e,!0),e.strm.avail_out===0?ze:Ge):e.last_lit&&(j(e,!1),e.strm.avail_out===0)?P:ut}function P0(e,r){for(var t;;){if(e.lookahead===0&&(De(e),e.lookahead===0)){if(r===Ne)return P;break}if(e.match_length=0,t=te._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,t&&(j(e,!1),e.strm.avail_out===0))return P}return e.insert=0,r===Se?(j(e,!0),e.strm.avail_out===0?ze:Ge):e.last_lit&&(j(e,!1),e.strm.avail_out===0)?P:ut}function he(e,r,t,i,n){this.good_length=e,this.max_lazy=r,this.nice_length=t,this.max_chain=i,this.func=n}var We;We=[new he(0,0,0,0,Z0),new he(4,4,8,4,xr),new he(4,5,16,8,xr),new he(4,6,32,32,xr),new he(4,4,16,16,$e),new he(8,16,32,32,$e),new he(8,16,128,128,$e),new he(8,32,128,256,$e),new he(32,128,258,1024,$e),new he(32,258,258,4096,$e)];function H0(e){e.window_size=2*e.w_size,Ee(e.head),e.max_lazy_match=We[e.level].max_lazy,e.good_match=We[e.level].good_length,e.nice_match=We[e.level].nice_length,e.max_chain_length=We[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=T-1,e.match_available=0,e.ins_h=0}function K0(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Ct,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new W.Buf16(D0*2),this.dyn_dtree=new W.Buf16((2*T0+1)*2),this.bl_tree=new W.Buf16((2*z0+1)*2),Ee(this.dyn_ltree),Ee(this.dyn_dtree),Ee(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new W.Buf16(N0+1),this.heap=new W.Buf16(2*gr+1),Ee(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new W.Buf16(2*gr+1),Ee(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Mi(e){var r;return!e||!e.state?Be(e,re):(e.total_in=e.total_out=0,e.data_type=B0,r=e.state,r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?Tt:Te,e.adler=r.wrap===2?0:1,r.last_flush=Ne,te._tr_init(r),ce)}function Zi(e){var r=Mi(e);return r===ce&&H0(e.state),r}function j0(e,r){return!e||!e.state||e.state.wrap!==2?re:(e.state.gzhead=r,ce)}function qi(e,r,t,i,n,a){if(!e)return re;var o=1;if(r===b0&&(r=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),n<1||n>S0||t!==Ct||i<8||i>15||r<0||r>9||a<0||a>E0)return Be(e,re);i===8&&(i=9);var l=new K0;return e.state=l,l.strm=e,l.wrap=o,l.gzhead=null,l.w_bits=i,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=n+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+T-1)/T),l.window=new W.Buf8(l.w_size*2),l.head=new W.Buf16(l.hash_size),l.prev=new W.Buf16(l.w_size),l.lit_bufsize=1<<n+6,l.pending_buf_size=l.lit_bufsize*4,l.pending_buf=new W.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=r,l.strategy=a,l.method=t,Zi(e)}function Y0(e,r){return qi(e,r,Ct,I0,U0,A0)}function $0(e,r){var t,i,n,a;if(!e||!e.state||r>zi||r<0)return e?Be(e,re):re;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===st&&r!==Se)return Be(e,e.avail_out===0?pr:re);if(i.strm=e,t=i.last_flush,i.last_flush=r,i.status===Tt)if(i.wrap===2)e.adler=0,z(i,31),z(i,139),z(i,8),i.gzhead?(z(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),z(i,i.gzhead.time&255),z(i,i.gzhead.time>>8&255),z(i,i.gzhead.time>>16&255),z(i,i.gzhead.time>>24&255),z(i,i.level===9?2:i.strategy>=St||i.level<2?4:0),z(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(z(i,i.gzhead.extra.length&255),z(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=Fe(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=wr):(z(i,0),z(i,0),z(i,0),z(i,0),z(i,0),z(i,i.level===9?2:i.strategy>=St||i.level<2?4:0),z(i,L0),i.status=Te);else{var o=Ct+(i.w_bits-8<<4)<<8,l=-1;i.strategy>=St||i.level<2?l=0:i.level<6?l=1:i.level===6?l=2:l=3,o|=l<<6,i.strstart!==0&&(o|=O0),o+=31-o%31,i.status=Te,ft(i,o),i.strstart!==0&&(ft(i,e.adler>>>16),ft(i,e.adler&65535)),e.adler=1}if(i.status===wr)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Fe(e.adler,i.pending_buf,i.pending-n,n)),ke(e),n=i.pending,i.pending===i.pending_buf_size));)z(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(e.adler=Fe(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=It)}else i.status=It;if(i.status===It)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Fe(e.adler,i.pending_buf,i.pending-n,n)),ke(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}i.gzindex<i.gzhead.name.length?a=i.gzhead.name.charCodeAt(i.gzindex++)&255:a=0,z(i,a)}while(a!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=Fe(e.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.gzindex=0,i.status=Ut)}else i.status=Ut;if(i.status===Ut)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Fe(e.adler,i.pending_buf,i.pending-n,n)),ke(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}i.gzindex<i.gzhead.comment.length?a=i.gzhead.comment.charCodeAt(i.gzindex++)&255:a=0,z(i,a)}while(a!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=Fe(e.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.status=Rt)}else i.status=Rt;if(i.status===Rt&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&ke(e),i.pending+2<=i.pending_buf_size&&(z(i,e.adler&255),z(i,e.adler>>8&255),e.adler=0,i.status=Te)):i.status=Te),i.pending!==0){if(ke(e),e.avail_out===0)return i.last_flush=-1,ce}else if(e.avail_in===0&&Ni(r)<=Ni(t)&&r!==Se)return Be(e,pr);if(i.status===st&&e.avail_in!==0)return Be(e,pr);if(e.avail_in!==0||i.lookahead!==0||r!==Ne&&i.status!==st){var u=i.strategy===St?P0(i,r):i.strategy===k0?q0(i,r):We[i.level].func(i,r);if((u===ze||u===Ge)&&(i.status=st),u===P||u===ze)return e.avail_out===0&&(i.last_flush=-1),ce;if(u===ut&&(r===y0?te._tr_align(i):r!==zi&&(te._tr_stored_block(i,0,0,!1),r===m0&&(Ee(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),ke(e),e.avail_out===0))return i.last_flush=-1,ce}return r!==Se?ce:i.wrap<=0?Di:(i.wrap===2?(z(i,e.adler&255),z(i,e.adler>>8&255),z(i,e.adler>>16&255),z(i,e.adler>>24&255),z(i,e.total_in&255),z(i,e.total_in>>8&255),z(i,e.total_in>>16&255),z(i,e.total_in>>24&255)):(ft(i,e.adler>>>16),ft(i,e.adler&65535)),ke(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?ce:Di)}function W0(e){var r;return!e||!e.state?re:(r=e.state.status,r!==Tt&&r!==wr&&r!==It&&r!==Ut&&r!==Rt&&r!==Te&&r!==st?Be(e,re):(e.state=null,r===Te?Be(e,v0):ce))}function G0(e,r){var t=r.length,i,n,a,o,l,u,s,f;if(!e||!e.state||(i=e.state,o=i.wrap,o===2||o===1&&i.status!==Tt||i.lookahead))return re;for(o===1&&(e.adler=Oi(e.adler,r,t,0)),i.wrap=0,t>=i.w_size&&(o===0&&(Ee(i.head),i.strstart=0,i.block_start=0,i.insert=0),f=new W.Buf8(i.w_size),W.arraySet(f,r,t-i.w_size,i.w_size,0),r=f,t=i.w_size),l=e.avail_in,u=e.next_in,s=e.input,e.avail_in=t,e.next_in=0,e.input=r,De(i);i.lookahead>=T;){n=i.strstart,a=i.lookahead-(T-1);do i.ins_h=(i.ins_h<<i.hash_shift^i.window[n+T-1])&i.hash_mask,i.prev[n&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=n,n++;while(--a);i.strstart=n,i.lookahead=T-1,De(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=T-1,i.match_available=0,e.next_in=u,e.input=s,e.avail_in=l,i.wrap=o,ce}de.deflateInit=Y0;de.deflateInit2=qi;de.deflateReset=Zi;de.deflateResetKeep=Mi;de.deflateSetHeader=j0;de.deflate=$0;de.deflateEnd=W0;de.deflateSetDictionary=G0;de.deflateInfo="pako deflate (from Nodeca project)"});var _r=Z(Xe=>{"use strict";var zt=be(),Hi=!0,Ki=!0;try{String.fromCharCode.apply(null,[0])}catch{Hi=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Ki=!1}var ht=new zt.Buf8(256);for(we=0;we<256;we++)ht[we]=we>=252?6:we>=248?5:we>=240?4:we>=224?3:we>=192?2:1;var we;ht[254]=ht[254]=1;Xe.string2buf=function(e){var r,t,i,n,a,o=e.length,l=0;for(n=0;n<o;n++)t=e.charCodeAt(n),(t&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),n++)),l+=t<128?1:t<2048?2:t<65536?3:4;for(r=new zt.Buf8(l),a=0,n=0;a<l;n++)t=e.charCodeAt(n),(t&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),n++)),t<128?r[a++]=t:t<2048?(r[a++]=192|t>>>6,r[a++]=128|t&63):t<65536?(r[a++]=224|t>>>12,r[a++]=128|t>>>6&63,r[a++]=128|t&63):(r[a++]=240|t>>>18,r[a++]=128|t>>>12&63,r[a++]=128|t>>>6&63,r[a++]=128|t&63);return r};function ji(e,r){if(r<65534&&(e.subarray&&Ki||!e.subarray&&Hi))return String.fromCharCode.apply(null,zt.shrinkBuf(e,r));for(var t="",i=0;i<r;i++)t+=String.fromCharCode(e[i]);return t}Xe.buf2binstring=function(e){return ji(e,e.length)};Xe.binstring2buf=function(e){for(var r=new zt.Buf8(e.length),t=0,i=r.length;t<i;t++)r[t]=e.charCodeAt(t);return r};Xe.buf2string=function(e,r){var t,i,n,a,o=r||e.length,l=new Array(o*2);for(i=0,t=0;t<o;){if(n=e[t++],n<128){l[i++]=n;continue}if(a=ht[n],a>4){l[i++]=65533,t+=a-1;continue}for(n&=a===2?31:a===3?15:7;a>1&&t<o;)n=n<<6|e[t++]&63,a--;if(a>1){l[i++]=65533;continue}n<65536?l[i++]=n:(n-=65536,l[i++]=55296|n>>10&1023,l[i++]=56320|n&1023)}return ji(l,i)};Xe.utf8border=function(e,r){var t;for(r=r||e.length,r>e.length&&(r=e.length),t=r-1;t>=0&&(e[t]&192)===128;)t--;return t<0||t===0?r:t+ht[e[t]]>r?t:r}});var yr=Z((wl,Yi)=>{"use strict";function X0(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}Yi.exports=X0});var Xi=Z(pt=>{"use strict";var ct=Pi(),dt=be(),vr=_r(),br=Bt(),V0=yr(),Gi=Object.prototype.toString,J0=0,mr=4,Ve=0,$i=1,Wi=2,Q0=-1,eo=0,to=8;function Oe(e){if(!(this instanceof Oe))return new Oe(e);this.options=dt.assign({level:Q0,method:to,chunkSize:16384,windowBits:15,memLevel:8,strategy:eo,to:""},e||{});var r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new V0,this.strm.avail_out=0;var t=ct.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(t!==Ve)throw new Error(br[t]);if(r.header&&ct.deflateSetHeader(this.strm,r.header),r.dictionary){var i;if(typeof r.dictionary=="string"?i=vr.string2buf(r.dictionary):Gi.call(r.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(r.dictionary):i=r.dictionary,t=ct.deflateSetDictionary(this.strm,i),t!==Ve)throw new Error(br[t]);this._dict_set=!0}}Oe.prototype.push=function(e,r){var t=this.strm,i=this.options.chunkSize,n,a;if(this.ended)return!1;a=r===~~r?r:r===!0?mr:J0,typeof e=="string"?t.input=vr.string2buf(e):Gi.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;do{if(t.avail_out===0&&(t.output=new dt.Buf8(i),t.next_out=0,t.avail_out=i),n=ct.deflate(t,a),n!==$i&&n!==Ve)return this.onEnd(n),this.ended=!0,!1;(t.avail_out===0||t.avail_in===0&&(a===mr||a===Wi))&&(this.options.to==="string"?this.onData(vr.buf2binstring(dt.shrinkBuf(t.output,t.next_out))):this.onData(dt.shrinkBuf(t.output,t.next_out)))}while((t.avail_in>0||t.avail_out===0)&&n!==$i);return a===mr?(n=ct.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Ve):(a===Wi&&(this.onEnd(Ve),t.avail_out=0),!0)};Oe.prototype.onData=function(e){this.chunks.push(e)};Oe.prototype.onEnd=function(e){e===Ve&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=dt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Fr(e,r){var t=new Oe(r);if(t.push(e,!0),t.err)throw t.msg||br[t.err];return t.result}function ro(e,r){return r=r||{},r.raw=!0,Fr(e,r)}function io(e,r){return r=r||{},r.gzip=!0,Fr(e,r)}pt.Deflate=Oe;pt.deflate=Fr;pt.deflateRaw=ro;pt.gzip=io});var tn=Z((Al,en)=>{"use strict";var Dt=30,lo=12;en.exports=function(r,t){var i,n,a,o,l,u,s,f,p,g,h,F,b,S,k,v,I,R,A,c,_,y,w,B,x;i=r.state,n=r.next_in,B=r.input,a=n+(r.avail_in-5),o=r.next_out,x=r.output,l=o-(t-r.avail_out),u=o+(r.avail_out-257),s=i.dmax,f=i.wsize,p=i.whave,g=i.wnext,h=i.window,F=i.hold,b=i.bits,S=i.lencode,k=i.distcode,v=(1<<i.lenbits)-1,I=(1<<i.distbits)-1;e:do{b<15&&(F+=B[n++]<<b,b+=8,F+=B[n++]<<b,b+=8),R=S[F&v];t:for(;;){if(A=R>>>24,F>>>=A,b-=A,A=R>>>16&255,A===0)x[o++]=R&65535;else if(A&16){c=R&65535,A&=15,A&&(b<A&&(F+=B[n++]<<b,b+=8),c+=F&(1<<A)-1,F>>>=A,b-=A),b<15&&(F+=B[n++]<<b,b+=8,F+=B[n++]<<b,b+=8),R=k[F&I];r:for(;;){if(A=R>>>24,F>>>=A,b-=A,A=R>>>16&255,A&16){if(_=R&65535,A&=15,b<A&&(F+=B[n++]<<b,b+=8,b<A&&(F+=B[n++]<<b,b+=8)),_+=F&(1<<A)-1,_>s){r.msg="invalid distance too far back",i.mode=Dt;break e}if(F>>>=A,b-=A,A=o-l,_>A){if(A=_-A,A>p&&i.sane){r.msg="invalid distance too far back",i.mode=Dt;break e}if(y=0,w=h,g===0){if(y+=f-A,A<c){c-=A;do x[o++]=h[y++];while(--A);y=o-_,w=x}}else if(g<A){if(y+=f+g-A,A-=g,A<c){c-=A;do x[o++]=h[y++];while(--A);if(y=0,g<c){A=g,c-=A;do x[o++]=h[y++];while(--A);y=o-_,w=x}}}else if(y+=g-A,A<c){c-=A;do x[o++]=h[y++];while(--A);y=o-_,w=x}for(;c>2;)x[o++]=w[y++],x[o++]=w[y++],x[o++]=w[y++],c-=3;c&&(x[o++]=w[y++],c>1&&(x[o++]=w[y++]))}else{y=o-_;do x[o++]=x[y++],x[o++]=x[y++],x[o++]=x[y++],c-=3;while(c>2);c&&(x[o++]=x[y++],c>1&&(x[o++]=x[y++]))}}else if(A&64){r.msg="invalid distance code",i.mode=Dt;break e}else{R=k[(R&65535)+(F&(1<<A)-1)];continue r}break}}else if(A&64)if(A&32){i.mode=lo;break e}else{r.msg="invalid literal/length code",i.mode=Dt;break e}else{R=S[(R&65535)+(F&(1<<A)-1)];continue t}break}}while(n<a&&o<u);c=b>>3,n-=c,b-=c<<3,F&=(1<<b)-1,r.next_in=n,r.next_out=o,r.avail_in=n<a?5+(a-n):5-(n-a),r.avail_out=o<u?257+(u-o):257-(o-u),i.hold=F,i.bits=b}});var sn=Z((Bl,fn)=>{"use strict";var rn=be(),Je=15,nn=852,an=592,on=0,Ar=1,ln=2,fo=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],so=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],uo=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],ho=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];fn.exports=function(r,t,i,n,a,o,l,u){var s=u.bits,f=0,p=0,g=0,h=0,F=0,b=0,S=0,k=0,v=0,I=0,R,A,c,_,y,w=null,B=0,x,U=new rn.Buf16(Je+1),m=new rn.Buf16(Je+1),C=null,N=0,Y,H,V;for(f=0;f<=Je;f++)U[f]=0;for(p=0;p<n;p++)U[t[i+p]]++;for(F=s,h=Je;h>=1&&U[h]===0;h--);if(F>h&&(F=h),h===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,u.bits=1,0;for(g=1;g<h&&U[g]===0;g++);for(F<g&&(F=g),k=1,f=1;f<=Je;f++)if(k<<=1,k-=U[f],k<0)return-1;if(k>0&&(r===on||h!==1))return-1;for(m[1]=0,f=1;f<Je;f++)m[f+1]=m[f]+U[f];for(p=0;p<n;p++)t[i+p]!==0&&(l[m[t[i+p]]++]=p);if(r===on?(w=C=l,x=19):r===Ar?(w=fo,B-=257,C=so,N-=257,x=256):(w=uo,C=ho,x=-1),I=0,p=0,f=g,y=o,b=F,S=0,c=-1,v=1<<F,_=v-1,r===Ar&&v>nn||r===ln&&v>an)return 1;for(;;){Y=f-S,l[p]<x?(H=0,V=l[p]):l[p]>x?(H=C[N+l[p]],V=w[B+l[p]]):(H=96,V=0),R=1<<f-S,A=1<<b,g=A;do A-=R,a[y+(I>>S)+A]=Y<<24|H<<16|V|0;while(A!==0);for(R=1<<f-1;I&R;)R>>=1;if(R!==0?(I&=R-1,I+=R):I=0,p++,--U[f]===0){if(f===h)break;f=t[i+l[p]]}if(f>F&&(I&_)!==c){for(S===0&&(S=F),y+=g,b=f-S,k=1<<b;b+S<h&&(k-=U[b+S],!(k<=0));)b++,k<<=1;if(v+=1<<b,r===Ar&&v>nn||r===ln&&v>an)return 1;c=I&_,a[c]=F<<24|b<<16|y-o|0}}return I!==0&&(a[y+I]=f-S<<24|64<<16|0),u.bits=F,0}});var Kn=Z(le=>{"use strict";var Q=be(),Cr=cr(),pe=dr(),co=tn(),xt=sn(),po=0,Dn=1,Nn=2,un=4,xo=5,Nt=6,Le=0,go=1,wo=2,ie=-2,On=-3,Tr=-4,_o=-5,hn=8,Ln=1,cn=2,dn=3,pn=4,xn=5,gn=6,wn=7,_n=8,yn=9,mn=10,Mt=11,_e=12,Br=13,vn=14,Sr=15,bn=16,Fn=17,kn=18,En=19,Ot=20,Lt=21,An=22,Bn=23,Sn=24,In=25,Un=26,Ir=27,Rn=28,Cn=29,O=30,zr=31,yo=32,mo=852,vo=592,bo=15,Fo=bo;function Tn(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function ko(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Q.Buf16(320),this.work=new Q.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Mn(e){var r;return!e||!e.state?ie:(r=e.state,e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=Ln,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new Q.Buf32(mo),r.distcode=r.distdyn=new Q.Buf32(vo),r.sane=1,r.back=-1,Le)}function Zn(e){var r;return!e||!e.state?ie:(r=e.state,r.wsize=0,r.whave=0,r.wnext=0,Mn(e))}function qn(e,r){var t,i;return!e||!e.state||(i=e.state,r<0?(t=0,r=-r):(t=(r>>4)+1,r<48&&(r&=15)),r&&(r<8||r>15))?ie:(i.window!==null&&i.wbits!==r&&(i.window=null),i.wrap=t,i.wbits=r,Zn(e))}function Pn(e,r){var t,i;return e?(i=new ko,e.state=i,i.window=null,t=qn(e,r),t!==Le&&(e.state=null),t):ie}function Eo(e){return Pn(e,Fo)}var zn=!0,Ur,Rr;function Ao(e){if(zn){var r;for(Ur=new Q.Buf32(512),Rr=new Q.Buf32(32),r=0;r<144;)e.lens[r++]=8;for(;r<256;)e.lens[r++]=9;for(;r<280;)e.lens[r++]=7;for(;r<288;)e.lens[r++]=8;for(xt(Dn,e.lens,0,288,Ur,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;xt(Nn,e.lens,0,32,Rr,0,e.work,{bits:5}),zn=!1}e.lencode=Ur,e.lenbits=9,e.distcode=Rr,e.distbits=5}function Hn(e,r,t,i){var n,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Q.Buf8(a.wsize)),i>=a.wsize?(Q.arraySet(a.window,r,t-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(n=a.wsize-a.wnext,n>i&&(n=i),Q.arraySet(a.window,r,t-i,n,a.wnext),i-=n,i?(Q.arraySet(a.window,r,t-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=n))),0}function Bo(e,r){var t,i,n,a,o,l,u,s,f,p,g,h,F,b,S=0,k,v,I,R,A,c,_,y,w=new Q.Buf8(4),B,x,U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return ie;t=e.state,t.mode===_e&&(t.mode=Br),o=e.next_out,n=e.output,u=e.avail_out,a=e.next_in,i=e.input,l=e.avail_in,s=t.hold,f=t.bits,p=l,g=u,y=Le;e:for(;;)switch(t.mode){case Ln:if(t.wrap===0){t.mode=Br;break}for(;f<16;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}if(t.wrap&2&&s===35615){t.check=0,w[0]=s&255,w[1]=s>>>8&255,t.check=pe(t.check,w,2,0),s=0,f=0,t.mode=cn;break}if(t.flags=0,t.head&&(t.head.done=!1),!(t.wrap&1)||(((s&255)<<8)+(s>>8))%31){e.msg="incorrect header check",t.mode=O;break}if((s&15)!==hn){e.msg="unknown compression method",t.mode=O;break}if(s>>>=4,f-=4,_=(s&15)+8,t.wbits===0)t.wbits=_;else if(_>t.wbits){e.msg="invalid window size",t.mode=O;break}t.dmax=1<<_,e.adler=t.check=1,t.mode=s&512?mn:_e,s=0,f=0;break;case cn:for(;f<16;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}if(t.flags=s,(t.flags&255)!==hn){e.msg="unknown compression method",t.mode=O;break}if(t.flags&57344){e.msg="unknown header flags set",t.mode=O;break}t.head&&(t.head.text=s>>8&1),t.flags&512&&(w[0]=s&255,w[1]=s>>>8&255,t.check=pe(t.check,w,2,0)),s=0,f=0,t.mode=dn;case dn:for(;f<32;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}t.head&&(t.head.time=s),t.flags&512&&(w[0]=s&255,w[1]=s>>>8&255,w[2]=s>>>16&255,w[3]=s>>>24&255,t.check=pe(t.check,w,4,0)),s=0,f=0,t.mode=pn;case pn:for(;f<16;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}t.head&&(t.head.xflags=s&255,t.head.os=s>>8),t.flags&512&&(w[0]=s&255,w[1]=s>>>8&255,t.check=pe(t.check,w,2,0)),s=0,f=0,t.mode=xn;case xn:if(t.flags&1024){for(;f<16;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}t.length=s,t.head&&(t.head.extra_len=s),t.flags&512&&(w[0]=s&255,w[1]=s>>>8&255,t.check=pe(t.check,w,2,0)),s=0,f=0}else t.head&&(t.head.extra=null);t.mode=gn;case gn:if(t.flags&1024&&(h=t.length,h>l&&(h=l),h&&(t.head&&(_=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),Q.arraySet(t.head.extra,i,a,h,_)),t.flags&512&&(t.check=pe(t.check,i,h,a)),l-=h,a+=h,t.length-=h),t.length))break e;t.length=0,t.mode=wn;case wn:if(t.flags&2048){if(l===0)break e;h=0;do _=i[a+h++],t.head&&_&&t.length<65536&&(t.head.name+=String.fromCharCode(_));while(_&&h<l);if(t.flags&512&&(t.check=pe(t.check,i,h,a)),l-=h,a+=h,_)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=_n;case _n:if(t.flags&4096){if(l===0)break e;h=0;do _=i[a+h++],t.head&&_&&t.length<65536&&(t.head.comment+=String.fromCharCode(_));while(_&&h<l);if(t.flags&512&&(t.check=pe(t.check,i,h,a)),l-=h,a+=h,_)break e}else t.head&&(t.head.comment=null);t.mode=yn;case yn:if(t.flags&512){for(;f<16;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}if(s!==(t.check&65535)){e.msg="header crc mismatch",t.mode=O;break}s=0,f=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=_e;break;case mn:for(;f<32;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}e.adler=t.check=Tn(s),s=0,f=0,t.mode=Mt;case Mt:if(t.havedict===0)return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=l,t.hold=s,t.bits=f,wo;e.adler=t.check=1,t.mode=_e;case _e:if(r===xo||r===Nt)break e;case Br:if(t.last){s>>>=f&7,f-=f&7,t.mode=Ir;break}for(;f<3;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}switch(t.last=s&1,s>>>=1,f-=1,s&3){case 0:t.mode=vn;break;case 1:if(Ao(t),t.mode=Ot,r===Nt){s>>>=2,f-=2;break e}break;case 2:t.mode=Fn;break;case 3:e.msg="invalid block type",t.mode=O}s>>>=2,f-=2;break;case vn:for(s>>>=f&7,f-=f&7;f<32;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}if((s&65535)!==(s>>>16^65535)){e.msg="invalid stored block lengths",t.mode=O;break}if(t.length=s&65535,s=0,f=0,t.mode=Sr,r===Nt)break e;case Sr:t.mode=bn;case bn:if(h=t.length,h){if(h>l&&(h=l),h>u&&(h=u),h===0)break e;Q.arraySet(n,i,a,h,o),l-=h,a+=h,u-=h,o+=h,t.length-=h;break}t.mode=_e;break;case Fn:for(;f<14;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}if(t.nlen=(s&31)+257,s>>>=5,f-=5,t.ndist=(s&31)+1,s>>>=5,f-=5,t.ncode=(s&15)+4,s>>>=4,f-=4,t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols",t.mode=O;break}t.have=0,t.mode=kn;case kn:for(;t.have<t.ncode;){for(;f<3;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}t.lens[U[t.have++]]=s&7,s>>>=3,f-=3}for(;t.have<19;)t.lens[U[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,B={bits:t.lenbits},y=xt(po,t.lens,0,19,t.lencode,0,t.work,B),t.lenbits=B.bits,y){e.msg="invalid code lengths set",t.mode=O;break}t.have=0,t.mode=En;case En:for(;t.have<t.nlen+t.ndist;){for(;S=t.lencode[s&(1<<t.lenbits)-1],k=S>>>24,v=S>>>16&255,I=S&65535,!(k<=f);){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}if(I<16)s>>>=k,f-=k,t.lens[t.have++]=I;else{if(I===16){for(x=k+2;f<x;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}if(s>>>=k,f-=k,t.have===0){e.msg="invalid bit length repeat",t.mode=O;break}_=t.lens[t.have-1],h=3+(s&3),s>>>=2,f-=2}else if(I===17){for(x=k+3;f<x;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}s>>>=k,f-=k,_=0,h=3+(s&7),s>>>=3,f-=3}else{for(x=k+7;f<x;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}s>>>=k,f-=k,_=0,h=11+(s&127),s>>>=7,f-=7}if(t.have+h>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=O;break}for(;h--;)t.lens[t.have++]=_}}if(t.mode===O)break;if(t.lens[256]===0){e.msg="invalid code -- missing end-of-block",t.mode=O;break}if(t.lenbits=9,B={bits:t.lenbits},y=xt(Dn,t.lens,0,t.nlen,t.lencode,0,t.work,B),t.lenbits=B.bits,y){e.msg="invalid literal/lengths set",t.mode=O;break}if(t.distbits=6,t.distcode=t.distdyn,B={bits:t.distbits},y=xt(Nn,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,B),t.distbits=B.bits,y){e.msg="invalid distances set",t.mode=O;break}if(t.mode=Ot,r===Nt)break e;case Ot:t.mode=Lt;case Lt:if(l>=6&&u>=258){e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=l,t.hold=s,t.bits=f,co(e,g),o=e.next_out,n=e.output,u=e.avail_out,a=e.next_in,i=e.input,l=e.avail_in,s=t.hold,f=t.bits,t.mode===_e&&(t.back=-1);break}for(t.back=0;S=t.lencode[s&(1<<t.lenbits)-1],k=S>>>24,v=S>>>16&255,I=S&65535,!(k<=f);){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}if(v&&!(v&240)){for(R=k,A=v,c=I;S=t.lencode[c+((s&(1<<R+A)-1)>>R)],k=S>>>24,v=S>>>16&255,I=S&65535,!(R+k<=f);){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}s>>>=R,f-=R,t.back+=R}if(s>>>=k,f-=k,t.back+=k,t.length=I,v===0){t.mode=Un;break}if(v&32){t.back=-1,t.mode=_e;break}if(v&64){e.msg="invalid literal/length code",t.mode=O;break}t.extra=v&15,t.mode=An;case An:if(t.extra){for(x=t.extra;f<x;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}t.length+=s&(1<<t.extra)-1,s>>>=t.extra,f-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=Bn;case Bn:for(;S=t.distcode[s&(1<<t.distbits)-1],k=S>>>24,v=S>>>16&255,I=S&65535,!(k<=f);){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}if(!(v&240)){for(R=k,A=v,c=I;S=t.distcode[c+((s&(1<<R+A)-1)>>R)],k=S>>>24,v=S>>>16&255,I=S&65535,!(R+k<=f);){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}s>>>=R,f-=R,t.back+=R}if(s>>>=k,f-=k,t.back+=k,v&64){e.msg="invalid distance code",t.mode=O;break}t.offset=I,t.extra=v&15,t.mode=Sn;case Sn:if(t.extra){for(x=t.extra;f<x;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}t.offset+=s&(1<<t.extra)-1,s>>>=t.extra,f-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=O;break}t.mode=In;case In:if(u===0)break e;if(h=g-u,t.offset>h){if(h=t.offset-h,h>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=O;break}h>t.wnext?(h-=t.wnext,F=t.wsize-h):F=t.wnext-h,h>t.length&&(h=t.length),b=t.window}else b=n,F=o-t.offset,h=t.length;h>u&&(h=u),u-=h,t.length-=h;do n[o++]=b[F++];while(--h);t.length===0&&(t.mode=Lt);break;case Un:if(u===0)break e;n[o++]=t.length,u--,t.mode=Lt;break;case Ir:if(t.wrap){for(;f<32;){if(l===0)break e;l--,s|=i[a++]<<f,f+=8}if(g-=u,e.total_out+=g,t.total+=g,g&&(e.adler=t.check=t.flags?pe(t.check,n,g,o-g):Cr(t.check,n,g,o-g)),g=u,(t.flags?s:Tn(s))!==t.check){e.msg="incorrect data check",t.mode=O;break}s=0,f=0}t.mode=Rn;case Rn:if(t.wrap&&t.flags){for(;f<32;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8}if(s!==(t.total&4294967295)){e.msg="incorrect length check",t.mode=O;break}s=0,f=0}t.mode=Cn;case Cn:y=go;break e;case O:y=On;break e;case zr:return Tr;case yo:default:return ie}return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=l,t.hold=s,t.bits=f,(t.wsize||g!==e.avail_out&&t.mode<O&&(t.mode<Ir||r!==un))&&Hn(e,e.output,e.next_out,g-e.avail_out)?(t.mode=zr,Tr):(p-=e.avail_in,g-=e.avail_out,e.total_in+=p,e.total_out+=g,t.total+=g,t.wrap&&g&&(e.adler=t.check=t.flags?pe(t.check,n,g,e.next_out-g):Cr(t.check,n,g,e.next_out-g)),e.data_type=t.bits+(t.last?64:0)+(t.mode===_e?128:0)+(t.mode===Ot||t.mode===Sr?256:0),(p===0&&g===0||r===un)&&y===Le&&(y=_o),y)}function So(e){if(!e||!e.state)return ie;var r=e.state;return r.window&&(r.window=null),e.state=null,Le}function Io(e,r){var t;return!e||!e.state||(t=e.state,!(t.wrap&2))?ie:(t.head=r,r.done=!1,Le)}function Uo(e,r){var t=r.length,i,n,a;return!e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==Mt)?ie:i.mode===Mt&&(n=1,n=Cr(n,r,t,0),n!==i.check)?On:(a=Hn(e,r,t,t),a?(i.mode=zr,Tr):(i.havedict=1,Le))}le.inflateReset=Zn;le.inflateReset2=qn;le.inflateResetKeep=Mn;le.inflateInit=Eo;le.inflateInit2=Pn;le.inflate=Bo;le.inflateEnd=So;le.inflateGetHeader=Io;le.inflateSetDictionary=Uo;le.inflateInfo="pako inflate (from Nodeca project)"});var Yn=Z((Il,jn)=>{"use strict";jn.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var Wn=Z((Ul,$n)=>{"use strict";function Ro(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}$n.exports=Ro});var Xn=Z(wt=>{"use strict";var Qe=Kn(),gt=be(),Zt=_r(),M=Yn(),Dr=Bt(),Co=yr(),To=Wn(),Gn=Object.prototype.toString;function Me(e){if(!(this instanceof Me))return new Me(e);this.options=gt.assign({chunkSize:16384,windowBits:0,to:""},e||{});var r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(e&&e.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15||(r.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Co,this.strm.avail_out=0;var t=Qe.inflateInit2(this.strm,r.windowBits);if(t!==M.Z_OK)throw new Error(Dr[t]);if(this.header=new To,Qe.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=Zt.string2buf(r.dictionary):Gn.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(t=Qe.inflateSetDictionary(this.strm,r.dictionary),t!==M.Z_OK)))throw new Error(Dr[t])}Me.prototype.push=function(e,r){var t=this.strm,i=this.options.chunkSize,n=this.options.dictionary,a,o,l,u,s,f=!1;if(this.ended)return!1;o=r===~~r?r:r===!0?M.Z_FINISH:M.Z_NO_FLUSH,typeof e=="string"?t.input=Zt.binstring2buf(e):Gn.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;do{if(t.avail_out===0&&(t.output=new gt.Buf8(i),t.next_out=0,t.avail_out=i),a=Qe.inflate(t,M.Z_NO_FLUSH),a===M.Z_NEED_DICT&&n&&(a=Qe.inflateSetDictionary(this.strm,n)),a===M.Z_BUF_ERROR&&f===!0&&(a=M.Z_OK,f=!1),a!==M.Z_STREAM_END&&a!==M.Z_OK)return this.onEnd(a),this.ended=!0,!1;t.next_out&&(t.avail_out===0||a===M.Z_STREAM_END||t.avail_in===0&&(o===M.Z_FINISH||o===M.Z_SYNC_FLUSH))&&(this.options.to==="string"?(l=Zt.utf8border(t.output,t.next_out),u=t.next_out-l,s=Zt.buf2string(t.output,l),t.next_out=u,t.avail_out=i-u,u&>.arraySet(t.output,t.output,l,u,0),this.onData(s)):this.onData(gt.shrinkBuf(t.output,t.next_out))),t.avail_in===0&&t.avail_out===0&&(f=!0)}while((t.avail_in>0||t.avail_out===0)&&a!==M.Z_STREAM_END);return a===M.Z_STREAM_END&&(o=M.Z_FINISH),o===M.Z_FINISH?(a=Qe.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===M.Z_OK):(o===M.Z_SYNC_FLUSH&&(this.onEnd(M.Z_OK),t.avail_out=0),!0)};Me.prototype.onData=function(e){this.chunks.push(e)};Me.prototype.onEnd=function(e){e===M.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=gt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Nr(e,r){var t=new Me(r);if(t.push(e,!0),t.err)throw t.msg||Dr[t.err];return t.result}function zo(e,r){return r=r||{},r.raw=!0,Nr(e,r)}wt.Inflate=Me;wt.inflate=Nr;wt.inflateRaw=zo;wt.ungzip=Nr});var ea=Z(()=>{});var ta=Z((Yl,Ht)=>{(function(){"use strict";var e="input is invalid type",r=typeof window=="object",t=r?window:{};t.JS_SHA256_NO_WINDOW&&(r=!1);var i=!r&&typeof self=="object",n=!t.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;n?t=global:i&&(t=self);var a=!t.JS_SHA256_NO_COMMON_JS&&typeof Ht=="object"&&Ht.exports,o=typeof define=="function"&&define.amd,l=!t.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",u="0123456789abcdef".split(""),s=[-2147483648,8388608,32768,128],f=[24,16,8,0],p=[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],g=["hex","array","digest","arrayBuffer"],h=[];(t.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(t.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(c){return typeof c=="object"&&c.buffer&&c.buffer.constructor===ArrayBuffer});var F=function(c,_){return function(y){return new I(_,!0).update(y)[c]()}},b=function(c){var _=F("hex",c);n&&(_=S(_,c)),_.create=function(){return new I(c)},_.update=function(B){return _.create().update(B)};for(var y=0;y<g.length;++y){var w=g[y];_[w]=F(w,c)}return _},S=function(c,_){var y=fa("crypto"),w=ea().Buffer,B=_?"sha224":"sha256",x;w.from&&!t.JS_SHA256_NO_BUFFER_FROM?x=w.from:x=function(m){return new w(m)};var U=function(m){if(typeof m=="string")return y.createHash(B).update(m,"utf8").digest("hex");if(m==null)throw new Error(e);return m.constructor===ArrayBuffer&&(m=new Uint8Array(m)),Array.isArray(m)||ArrayBuffer.isView(m)||m.constructor===w?y.createHash(B).update(x(m)).digest("hex"):c(m)};return U},k=function(c,_){return function(y,w){return new R(y,_,!0).update(w)[c]()}},v=function(c){var _=k("hex",c);_.create=function(B){return new R(B,c)},_.update=function(B,x){return _.create(B).update(x)};for(var y=0;y<g.length;++y){var w=g[y];_[w]=k(w,c)}return _};function I(c,_){_?(h[0]=h[16]=h[1]=h[2]=h[3]=h[4]=h[5]=h[6]=h[7]=h[8]=h[9]=h[10]=h[11]=h[12]=h[13]=h[14]=h[15]=0,this.blocks=h):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=c}I.prototype.update=function(c){if(!this.finalized){var _,y=typeof c;if(y!=="string"){if(y==="object"){if(c===null)throw new Error(e);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(e)}else throw new Error(e);_=!0}for(var w,B=0,x,U=c.length,m=this.blocks;B<U;){if(this.hashed&&(this.hashed=!1,m[0]=this.block,this.block=m[16]=m[1]=m[2]=m[3]=m[4]=m[5]=m[6]=m[7]=m[8]=m[9]=m[10]=m[11]=m[12]=m[13]=m[14]=m[15]=0),_)for(x=this.start;B<U&&x<64;++B)m[x>>>2]|=c[B]<<f[x++&3];else for(x=this.start;B<U&&x<64;++B)w=c.charCodeAt(B),w<128?m[x>>>2]|=w<<f[x++&3]:w<2048?(m[x>>>2]|=(192|w>>>6)<<f[x++&3],m[x>>>2]|=(128|w&63)<<f[x++&3]):w<55296||w>=57344?(m[x>>>2]|=(224|w>>>12)<<f[x++&3],m[x>>>2]|=(128|w>>>6&63)<<f[x++&3],m[x>>>2]|=(128|w&63)<<f[x++&3]):(w=65536+((w&1023)<<10|c.charCodeAt(++B)&1023),m[x>>>2]|=(240|w>>>18)<<f[x++&3],m[x>>>2]|=(128|w>>>12&63)<<f[x++&3],m[x>>>2]|=(128|w>>>6&63)<<f[x++&3],m[x>>>2]|=(128|w&63)<<f[x++&3]);this.lastByteIndex=x,this.bytes+=x-this.start,x>=64?(this.block=m[16],this.start=x-64,this.hash(),this.hashed=!0):this.start=x}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},I.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var c=this.blocks,_=this.lastByteIndex;c[16]=this.block,c[_>>>2]|=s[_&3],this.block=c[16],_>=56&&(this.hashed||this.hash(),c[0]=this.block,c[16]=c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=c[11]=c[12]=c[13]=c[14]=c[15]=0),c[14]=this.hBytes<<3|this.bytes>>>29,c[15]=this.bytes<<3,this.hash()}},I.prototype.hash=function(){var c=this.h0,_=this.h1,y=this.h2,w=this.h3,B=this.h4,x=this.h5,U=this.h6,m=this.h7,C=this.blocks,N,Y,H,V,D,ye,me,et,Kt,jt,yt;for(N=16;N<64;++N)D=C[N-15],Y=(D>>>7|D<<25)^(D>>>18|D<<14)^D>>>3,D=C[N-2],H=(D>>>17|D<<15)^(D>>>19|D<<13)^D>>>10,C[N]=C[N-16]+Y+C[N-7]+H<<0;for(yt=_&y,N=0;N<64;N+=4)this.first?(this.is224?(et=300032,D=C[0]-1413257819,m=D-150054599<<0,w=D+24177077<<0):(et=704751109,D=C[0]-210244248,m=D-1521486534<<0,w=D+143694565<<0),this.first=!1):(Y=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),H=(B>>>6|B<<26)^(B>>>11|B<<21)^(B>>>25|B<<7),et=c&_,V=et^c&y^yt,me=B&x^~B&U,D=m+H+me+p[N]+C[N],ye=Y+V,m=w+D<<0,w=D+ye<<0),Y=(w>>>2|w<<30)^(w>>>13|w<<19)^(w>>>22|w<<10),H=(m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7),Kt=w&c,V=Kt^w&_^et,me=m&B^~m&x,D=U+H+me+p[N+1]+C[N+1],ye=Y+V,U=y+D<<0,y=D+ye<<0,Y=(y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10),H=(U>>>6|U<<26)^(U>>>11|U<<21)^(U>>>25|U<<7),jt=y&w,V=jt^y&c^Kt,me=U&m^~U&B,D=x+H+me+p[N+2]+C[N+2],ye=Y+V,x=_+D<<0,_=D+ye<<0,Y=(_>>>2|_<<30)^(_>>>13|_<<19)^(_>>>22|_<<10),H=(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7),yt=_&y,V=yt^_&w^jt,me=x&U^~x&m,D=B+H+me+p[N+3]+C[N+3],ye=Y+V,B=c+D<<0,c=D+ye<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+c<<0,this.h1=this.h1+_<<0,this.h2=this.h2+y<<0,this.h3=this.h3+w<<0,this.h4=this.h4+B<<0,this.h5=this.h5+x<<0,this.h6=this.h6+U<<0,this.h7=this.h7+m<<0},I.prototype.hex=function(){this.finalize();var c=this.h0,_=this.h1,y=this.h2,w=this.h3,B=this.h4,x=this.h5,U=this.h6,m=this.h7,C=u[c>>>28&15]+u[c>>>24&15]+u[c>>>20&15]+u[c>>>16&15]+u[c>>>12&15]+u[c>>>8&15]+u[c>>>4&15]+u[c&15]+u[_>>>28&15]+u[_>>>24&15]+u[_>>>20&15]+u[_>>>16&15]+u[_>>>12&15]+u[_>>>8&15]+u[_>>>4&15]+u[_&15]+u[y>>>28&15]+u[y>>>24&15]+u[y>>>20&15]+u[y>>>16&15]+u[y>>>12&15]+u[y>>>8&15]+u[y>>>4&15]+u[y&15]+u[w>>>28&15]+u[w>>>24&15]+u[w>>>20&15]+u[w>>>16&15]+u[w>>>12&15]+u[w>>>8&15]+u[w>>>4&15]+u[w&15]+u[B>>>28&15]+u[B>>>24&15]+u[B>>>20&15]+u[B>>>16&15]+u[B>>>12&15]+u[B>>>8&15]+u[B>>>4&15]+u[B&15]+u[x>>>28&15]+u[x>>>24&15]+u[x>>>20&15]+u[x>>>16&15]+u[x>>>12&15]+u[x>>>8&15]+u[x>>>4&15]+u[x&15]+u[U>>>28&15]+u[U>>>24&15]+u[U>>>20&15]+u[U>>>16&15]+u[U>>>12&15]+u[U>>>8&15]+u[U>>>4&15]+u[U&15];return this.is224||(C+=u[m>>>28&15]+u[m>>>24&15]+u[m>>>20&15]+u[m>>>16&15]+u[m>>>12&15]+u[m>>>8&15]+u[m>>>4&15]+u[m&15]),C},I.prototype.toString=I.prototype.hex,I.prototype.digest=function(){this.finalize();var c=this.h0,_=this.h1,y=this.h2,w=this.h3,B=this.h4,x=this.h5,U=this.h6,m=this.h7,C=[c>>>24&255,c>>>16&255,c>>>8&255,c&255,_>>>24&255,_>>>16&255,_>>>8&255,_&255,y>>>24&255,y>>>16&255,y>>>8&255,y&255,w>>>24&255,w>>>16&255,w>>>8&255,w&255,B>>>24&255,B>>>16&255,B>>>8&255,B&255,x>>>24&255,x>>>16&255,x>>>8&255,x&255,U>>>24&255,U>>>16&255,U>>>8&255,U&255];return this.is224||C.push(m>>>24&255,m>>>16&255,m>>>8&255,m&255),C},I.prototype.array=I.prototype.digest,I.prototype.arrayBuffer=function(){this.finalize();var c=new ArrayBuffer(this.is224?28:32),_=new DataView(c);return _.setUint32(0,this.h0),_.setUint32(4,this.h1),_.setUint32(8,this.h2),_.setUint32(12,this.h3),_.setUint32(16,this.h4),_.setUint32(20,this.h5),_.setUint32(24,this.h6),this.is224||_.setUint32(28,this.h7),c};function R(c,_,y){var w,B=typeof c;if(B==="string"){var x=[],U=c.length,m=0,C;for(w=0;w<U;++w)C=c.charCodeAt(w),C<128?x[m++]=C:C<2048?(x[m++]=192|C>>>6,x[m++]=128|C&63):C<55296||C>=57344?(x[m++]=224|C>>>12,x[m++]=128|C>>>6&63,x[m++]=128|C&63):(C=65536+((C&1023)<<10|c.charCodeAt(++w)&1023),x[m++]=240|C>>>18,x[m++]=128|C>>>12&63,x[m++]=128|C>>>6&63,x[m++]=128|C&63);c=x}else if(B==="object"){if(c===null)throw new Error(e);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(e)}else throw new Error(e);c.length>64&&(c=new I(_,!0).update(c).array());var N=[],Y=[];for(w=0;w<64;++w){var H=c[w]||0;N[w]=92^H,Y[w]=54^H}I.call(this,_,y),this.update(Y),this.oKeyPad=N,this.inner=!0,this.sharedMemory=y}R.prototype=new I,R.prototype.finalize=function(){if(I.prototype.finalize.call(this),this.inner){this.inner=!1;var c=this.array();I.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(c),I.prototype.finalize.call(this)}};var A=b();A.sha256=A,A.sha224=b(!0),A.sha256.hmac=v(),A.sha224.hmac=v(!0),a?Ht.exports=A:(t.sha256=A.sha256,t.sha224=A.sha224,o&&define(function(){return A}))})()});var Yo={};sa(Yo,{Buffer:()=>L.Buffer,Crypto:()=>q,CryptoError:()=>J,DefaultAlphabet:()=>Vi,Strength:()=>Qn,decryptData:()=>Jn,decryptMessage:()=>No,encryptData:()=>Qi,encryptMessage:()=>oo,generateMnemonic:()=>Oo,generateSignKeys:()=>qo,generateSignature:()=>Ho,generateSignedTransactionBytes:()=>jo,getAccountIdFromPublicKey:()=>Po,getRandomBytes:()=>kr,getRandomString:()=>no,getRandomWords:()=>Er,sha256AsBase64:()=>Mo,sha256AsBytes:()=>Lr,sha256AsHex:()=>Lo,sha256Binary:()=>Ie,sha256Raw:()=>qt,verifySignature:()=>Ko});var L=vt(li());var J=class extends Error{};var q=class e{static cryptoAdapter;static get adapter(){if(!e.cryptoAdapter)throw new J("No Crypto Adapter provided - Use [Crypto.init()] first");return e.cryptoAdapter}static init(r){e.cryptoAdapter=r}};var E=class e{static KEY_SIZE=32;static UNPACKED_SIZE=16;static ORDER=[237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16];static ORDER_TIMES_8=[104,159,174,231,210,24,147,192,178,230,188,23,245,206,247,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128];static BASE_2Y=[22587,610,29883,44076,15515,9479,25859,56197,23910,4462,17831,16322,62102,36542,52412,16035];static BASE_R2Y=[5744,16384,61977,54121,8776,18501,26522,34893,23833,5823,55924,58749,24147,14085,13606,6080];static C1=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];static C9=[9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];static C486671=[27919,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0];static C39420360=[33224,601,0,0,0,0,0,0,0,0,0,0,0,0,0,0];static P25=33554431;static P26=67108863;static clamp(r){r[31]&=127,r[31]|=64,r[0]&=248}static cpy32(r,t){for(let i=0;i<32;i++)r[i]=t[i]}static mula_small(r,t,i,n,a,o){i=i|0,a=a|0,o=o|0;let l=0;for(let u=0;u<a;++u)l+=(t[u+i]&255)+o*(n[u]&255),r[u+i]=l&255,l>>=8;return l}static mula32(r,t,i,n,a){n=n|0,a=a|0;let o=31,l=0,u=0;for(;u<n;u++){let s=a*(i[u]&255);l+=e.mula_small(r,r,u,t,o,s)+(r[u+o]&255)+s*(t[o]&255),r[u+o]=l&255,l>>=8}return r[u+o]=l+(r[u+o]&255)&255,l>>8}static divmod(r,t,i,n,a){i=i|0,a=a|0;let o=0,l=(n[a-1]&255)<<8;for(a>1&&(l|=n[a-2]&255);i-->=a;){let u=o<<16|(t[i]&255)<<8;i>0&&(u|=t[i-1]&255);let s=i-a+1;u/=l,o+=e.mula_small(t,t,s,n,a,-u),r[s]=u+o&255,e.mula_small(t,t,s,n,a,-o),o=t[i]&255,t[i]=0}t[a-1]=o&255}static numsize(r,t){for(;t--!==0&&r[t]===0;);return t+1}static egcd32(r,t,i,n){let a,o=32,l,u;for(u=0;u<32;u++)r[u]=t[u]=0;if(r[0]=1,a=e.numsize(i,32),a===0)return t;let s=new Array(32);for(;;){if(l=o-a+1,e.divmod(s,n,o,i,a),o=e.numsize(n,o),o===0)return r;if(e.mula32(t,r,s,l,-1),l=a-o+1,e.divmod(s,i,a,n,o),a=e.numsize(i,a),a===0)return t;e.mula32(r,t,s,l,-1)}}static unpack(r,t){for(let i=0;i<e.KEY_SIZE;i+=2)r[i/2]=t[i]&255|(t[i+1]&255)<<8}static is_overflow(r){return r[0]>e.P26-19&&(r[1]&r[3]&r[5]&r[7]&r[9])===e.P25&&(r[2]&r[4]&r[6]&r[8])===e.P26||r[9]>e.P25}static pack(r,t){for(let i=0;i<e.UNPACKED_SIZE;++i)t[2*i]=r[i]&255,t[2*i+1]=(r[i]&65280)>>8}static createUnpackedArray(){return new Uint16Array(e.UNPACKED_SIZE)}static cpy(r,t){for(let i=0;i<e.UNPACKED_SIZE;++i)r[i]=t[i]}static set(r,t){r[0]=t;for(let i=1;i<e.UNPACKED_SIZE;++i)r[i]=0}static recip(r,t,i){let n=e.createUnpackedArray(),a=e.createUnpackedArray(),o=e.createUnpackedArray(),l=e.createUnpackedArray(),u=e.createUnpackedArray(),s;for(e.sqr(a,t),e.sqr(o,a),e.sqr(n,o),e.mul(o,n,t),e.mul(n,o,a),e.sqr(a,n),e.mul(l,a,o),e.sqr(a,l),e.sqr(o,a),e.sqr(a,o),e.sqr(o,a),e.sqr(a,o),e.mul(o,a,l),e.sqr(a,o),e.sqr(l,a),s=1;s<5;s++)e.sqr(a,l),e.sqr(l,a);for(e.mul(a,l,o),e.sqr(l,a),e.sqr(u,l),s=1;s<10;s++)e.sqr(l,u),e.sqr(u,l);for(e.mul(l,u,a),s=0;s<5;s++)e.sqr(a,l),e.sqr(l,a);for(e.mul(a,l,o),e.sqr(o,a),e.sqr(l,o),s=1;s<25;s++)e.sqr(o,l),e.sqr(l,o);for(e.mul(o,l,a),e.sqr(l,o),e.sqr(u,l),s=1;s<50;s++)e.sqr(l,u),e.sqr(u,l);for(e.mul(l,u,o),s=0;s<25;s++)e.sqr(u,l),e.sqr(l,u);e.mul(o,l,a),e.sqr(a,o),e.sqr(o,a),i!==0?e.mul(r,t,o):(e.sqr(a,o),e.sqr(o,a),e.sqr(a,o),e.mul(r,a,n))}static is_negative(r){let t=e.is_overflow(r)||r[9]<0,i=r[0]&1;return((t?1:0)^i)&4294967295}static sqrt(r,t){let i=e.createUnpackedArray(),n=e.createUnpackedArray(),a=e.createUnpackedArray();e.add(n,t,t),e.recip(i,n,1),e.sqr(r,i),e.mul(a,n,r),e.sub(a,a,e.C1),e.mul(n,i,a),e.mul(r,t,n)}static c255lsqr8h(r,t,i,n,a,o,l,u){let s=[],f;return f=u*u,s[0]=f&65535,f=(f/65536|0)+2*u*l,s[1]=f&65535,f=(f/65536|0)+2*u*o+l*l,s[2]=f&65535,f=(f/65536|0)+2*u*a+2*l*o,s[3]=f&65535,f=(f/65536|0)+2*u*n+2*l*a+o*o,s[4]=f&65535,f=(f/65536|0)+2*u*i+2*l*n+2*o*a,s[5]=f&65535,f=(f/65536|0)+2*u*t+2*l*i+2*o*n+a*a,s[6]=f&65535,f=(f/65536|0)+2*u*r+2*l*t+2*o*i+2*a*n,s[7]=f&65535,f=(f/65536|0)+2*l*r+2*o*t+2*a*i+n*n,s[8]=f&65535,f=(f/65536|0)+2*o*r+2*a*t+2*n*i,s[9]=f&65535,f=(f/65536|0)+2*a*r+2*n*t+i*i,s[10]=f&65535,f=(f/65536|0)+2*n*r+2*i*t,s[11]=f&65535,f=(f/65536|0)+2*i*r+t*t,s[12]=f&65535,f=(f/65536|0)+2*t*r,s[13]=f&65535,f=(f/65536|0)+r*r,s[14]=f&65535,s[15]=f/65536|0,s}static sqr(r,t){let i=e.c255lsqr8h(t[15],t[14],t[13],t[12],t[11],t[10],t[9],t[8]),n=e.c255lsqr8h(t[7],t[6],t[5],t[4],t[3],t[2],t[1],t[0]),a=e.c255lsqr8h(t[15]+t[7],t[14]+t[6],t[13]+t[5],t[12]+t[4],t[11]+t[3],t[10]+t[2],t[9]+t[1],t[8]+t[0]),o;o=8388608+n[0]+(a[8]-i[8]-n[8]+i[0]-128)*38,r[0]=o&65535,o=8388480+(o/65536|0)+n[1]+(a[9]-i[9]-n[9]+i[1])*38,r[1]=o&65535,o=8388480+(o/65536|0)+n[2]+(a[10]-i[10]-n[10]+i[2])*38,r[2]=o&65535,o=8388480+(o/65536|0)+n[3]+(a[11]-i[11]-n[11]+i[3])*38,r[3]=o&65535,o=8388480+(o/65536|0)+n[4]+(a[12]-i[12]-n[12]+i[4])*38,r[4]=o&65535,o=8388480+(o/65536|0)+n[5]+(a[13]-i[13]-n[13]+i[5])*38,r[5]=o&65535,o=8388480+(o/65536|0)+n[6]+(a[14]-i[14]-n[14]+i[6])*38,r[6]=o&65535,o=8388480+(o/65536|0)+n[7]+(a[15]-i[15]-n[15]+i[7])*38,r[7]=o&65535,o=8388480+(o/65536|0)+n[8]+a[0]-i[0]-n[0]+i[8]*38,r[8]=o&65535,o=8388480+(o/65536|0)+n[9]+a[1]-i[1]-n[1]+i[9]*38,r[9]=o&65535,o=8388480+(o/65536|0)+n[10]+a[2]-i[2]-n[2]+i[10]*38,r[10]=o&65535,o=8388480+(o/65536|0)+n[11]+a[3]-i[3]-n[3]+i[11]*38,r[11]=o&65535,o=8388480+(o/65536|0)+n[12]+a[4]-i[4]-n[4]+i[12]*38,r[12]=o&65535,o=8388480+(o/65536|0)+n[13]+a[5]-i[5]-n[5]+i[13]*38,r[13]=o&65535,o=8388480+(o/65536|0)+n[14]+a[6]-i[6]-n[6]+i[14]*38,r[14]=o&65535;let l=8388480+(o/65536|0)+n[15]+a[7]-i[7]-n[7]+i[15]*38;e.c255lreduce(r,l)}static c255lmul8h(r,t,i,n,a,o,l,u,s,f,p,g,h,F,b,S){let k=[],v;return v=u*S,k[0]=v&65535,v=(v/65536|0)+u*b+l*S,k[1]=v&65535,v=(v/65536|0)+u*F+l*b+o*S,k[2]=v&65535,v=(v/65536|0)+u*h+l*F+o*b+a*S,k[3]=v&65535,v=(v/65536|0)+u*g+l*h+o*F+a*b+n*S,k[4]=v&65535,v=(v/65536|0)+u*p+l*g+o*h+a*F+n*b+i*S,k[5]=v&65535,v=(v/65536|0)+u*f+l*p+o*g+a*h+n*F+i*b+t*S,k[6]=v&65535,v=(v/65536|0)+u*s+l*f+o*p+a*g+n*h+i*F+t*b+r*S,k[7]=v&65535,v=(v/65536|0)+l*s+o*f+a*p+n*g+i*h+t*F+r*b,k[8]=v&65535,v=(v/65536|0)+o*s+a*f+n*p+i*g+t*h+r*F,k[9]=v&65535,v=(v/65536|0)+a*s+n*f+i*p+t*g+r*h,k[10]=v&65535,v=(v/65536|0)+n*s+i*f+t*p+r*g,k[11]=v&65535,v=(v/65536|0)+i*s+t*f+r*p,k[12]=v&65535,v=(v/65536|0)+t*s+r*f,k[13]=v&65535,v=(v/65536|0)+r*s,k[14]=v&65535,k[15]=v/65536|0,k}static mul(r,t,i){let n=e.c255lmul8h(t[15],t[14],t[13],t[12],t[11],t[10],t[9],t[8],i[15],i[14],i[13],i[12],i[11],i[10],i[9],i[8]),a=e.c255lmul8h(t[7],t[6],t[5],t[4],t[3],t[2],t[1],t[0],i[7],i[6],i[5],i[4],i[3],i[2],i[1],i[0]),o=e.c255lmul8h(t[15]+t[7],t[14]+t[6],t[13]+t[5],t[12]+t[4],t[11]+t[3],t[10]+t[2],t[9]+t[1],t[8]+t[0],i[15]+i[7],i[14]+i[6],i[13]+i[5],i[12]+i[4],i[11]+i[3],i[10]+i[2],i[9]+i[1],i[8]+i[0]),l;l=8388608+a[0]+(o[8]-n[8]-a[8]+n[0]-128)*38,r[0]=l&65535,l=8388480+(l/65536|0)+a[1]+(o[9]-n[9]-a[9]+n[1])*38,r[1]=l&65535,l=8388480+(l/65536|0)+a[2]+(o[10]-n[10]-a[10]+n[2])*38,r[2]=l&65535,l=8388480+(l/65536|0)+a[3]+(o[11]-n[11]-a[11]+n[3])*38,r[3]=l&65535,l=8388480+(l/65536|0)+a[4]+(o[12]-n[12]-a[12]+n[4])*38,r[4]=l&65535,l=8388480+(l/65536|0)+a[5]+(o[13]-n[13]-a[13]+n[5])*38,r[5]=l&65535,l=8388480+(l/65536|0)+a[6]+(o[14]-n[14]-a[14]+n[6])*38,r[6]=l&65535,l=8388480+(l/65536|0)+a[7]+(o[15]-n[15]-a[15]+n[7])*38,r[7]=l&65535,l=8388480+(l/65536|0)+a[8]+o[0]-n[0]-a[0]+n[8]*38,r[8]=l&65535,l=8388480+(l/65536|0)+a[9]+o[1]-n[1]-a[1]+n[9]*38,r[9]=l&65535,l=8388480+(l/65536|0)+a[10]+o[2]-n[2]-a[2]+n[10]*38,r[10]=l&65535,l=8388480+(l/65536|0)+a[11]+o[3]-n[3]-a[3]+n[11]*38,r[11]=l&65535,l=8388480+(l/65536|0)+a[12]+o[4]-n[4]-a[4]+n[12]*38,r[12]=l&65535,l=8388480+(l/65536|0)+a[13]+o[5]-n[5]-a[5]+n[13]*38,r[13]=l&65535,l=8388480+(l/65536|0)+a[14]+o[6]-n[6]-a[6]+n[14]*38,r[14]=l&65535;let u=8388480+(l/65536|0)+a[15]+o[7]-n[7]-a[7]+n[15]*38;e.c255lreduce(r,u)}static c255lreduce(r,t){let i=t;r[15]=i&32767,i=(i/32768|0)*19;for(let n=0;n<=14;++n)i+=r[n],r[n]=i&65535,i=i/65536|0;r[15]+=i}static add(r,t,i){let n;n=((t[15]/32768|0)+(i[15]/32768|0))*19+t[0]+i[0],r[0]=n&65535;for(let a=1;a<=14;++a)n=(n/65536|0)+t[a]+i[a],r[a]=n&65535;r[15]=(n/65536|0)+(t[15]&32767)+(i[15]&32767)}static sub(r,t,i){let n;n=524288+((t[15]/32768|0)-(i[15]/32768|0)-1)*19+t[0]-i[0],r[0]=n&65535;for(let a=1;a<=14;++a)n=(n/65536|0)+524280+t[a]-i[a],r[a]=n&65535;r[15]=(n/65536|0)+32760+(t[15]&32767)-(i[15]&32767)}static mul_small(r,t,i){let n;n=t[0]*i,r[0]=n&65535;for(let o=1;o<=14;++o)n=(n/65536|0)+t[o]*i,r[o]=n&65535;let a=(n/65536|0)+t[15]*i;e.c255lreduce(r,a)}static mont_prep(r,t,i,n){e.add(r,i,n),e.sub(t,i,n)}static mont_add(r,t,i,n,a,o,l){e.mul(a,t,i),e.mul(o,r,n),e.add(r,a,o),e.sub(t,a,o),e.sqr(a,r),e.sqr(r,t),e.mul(o,r,l)}static mont_dbl(r,t,i,n,a,o){e.sqr(r,i),e.sqr(t,n),e.mul(a,r,t),e.sub(t,r,t),e.mul_small(o,t,121665),e.add(r,r,o),e.mul(o,r,t)}static x_to_y2(r,t,i){e.sqr(r,i),e.mul_small(t,i,486662),e.add(r,r,t),e.add(r,r,e.C1),e.mul(t,r,i)}static core(r,t,i,n){let a=e.createUnpackedArray(),o=e.createUnpackedArray(),l=e.createUnpackedArray(),u=e.createUnpackedArray(),s=e.createUnpackedArray(),f=[e.createUnpackedArray(),e.createUnpackedArray()],p=[e.createUnpackedArray(),e.createUnpackedArray()],g,h;for(n!==null?e.unpack(a,n):e.set(a,9),e.set(f[0],1),e.set(p[0],0),e.cpy(f[1],a),e.set(p[1],1),g=32;g--!==0;)for(h=8;h--!==0;){let F=(i[g]&255)>>h&1,b=~(i[g]&255)>>h&1,S=f[b],k=p[b],v=f[F],I=p[F];e.mont_prep(o,l,S,k),e.mont_prep(u,s,v,I),e.mont_add(o,l,u,s,S,k,a),e.mont_dbl(o,l,u,s,v,I)}if(e.recip(o,p[0],0),e.mul(a,f[0],o),e.pack(a,r),t!==null){e.x_to_y2(l,o,a),e.recip(u,p[1],0),e.mul(l,f[1],u),e.add(l,l,a),e.add(l,l,e.C486671),e.sub(a,a,e.C9),e.sqr(u,a),e.mul(a,l,u),e.sub(a,a,o),e.sub(a,a,e.C39420360),e.mul(o,a,e.BASE_R2Y),e.is_negative(o)!==0?e.cpy32(t,i):e.mula_small(t,e.ORDER_TIMES_8,0,i,32,-1);let F=new Array(32),b=new Array(64),S=new Array(64);e.cpy32(F,e.ORDER),e.cpy32(t,e.egcd32(b,S,t,F)),t[31]&128&&e.mula_small(t,t,0,e.ORDER,32,1)}}};var ne=class{static sign(r,t,i){let n,a,o=new Array(32),l=new Array(32),u=new Array(64),s=new Array(64);E.cpy32(o,r),E.cpy32(l,t);let f=new Array(32);E.divmod(f,o,32,E.ORDER,32),E.divmod(f,l,32,E.ORDER,32);let p=new Array(32);for(E.mula_small(p,l,0,o,32,-1),E.mula_small(p,p,0,E.ORDER,32,1),E.mula32(u,p,i,32,1),E.divmod(s,u,64,E.ORDER,32),n=0,a=0;a<32;a++)n|=p[a]=u[a];return n!==0?p:void 0}static verify(r,t,i){let n=new Array(32),a=[E.createUnpackedArray(),E.createUnpackedArray()],o=[E.createUnpackedArray(),E.createUnpackedArray()],l=[E.createUnpackedArray(),E.createUnpackedArray(),E.createUnpackedArray()],u=[E.createUnpackedArray(),E.createUnpackedArray(),E.createUnpackedArray()],s=[E.createUnpackedArray(),E.createUnpackedArray(),E.createUnpackedArray()],f=[E.createUnpackedArray(),E.createUnpackedArray(),E.createUnpackedArray()],p=0,g=0,h=0,F=0,b,S,k;for(E.set(a[0],9),E.unpack(a[1],i),E.x_to_y2(s[0],f[0],a[1]),E.sqrt(s[0],f[0]),S=E.is_negative(s[0]),E.add(f[0],f[0],E.C39420360),E.mul(f[1],E.BASE_2Y,s[0]),E.sub(s[S],f[0],f[1]),E.add(s[1-S],f[0],f[1]),E.cpy(f[0],a[1]),E.sub(f[0],f[0],E.C9),E.sqr(f[1],f[0]),E.recip(f[0],f[1],0),E.mul(o[0],s[0],f[0]),E.sub(o[0],o[0],a[1]),E.sub(o[0],o[0],E.C486671),E.mul(o[1],s[1],f[0]),E.sub(o[1],o[1],a[1]),E.sub(o[1],o[1],E.C486671),E.mul_small(o[0],o[0],1),E.mul_small(o[1],o[1],1),b=0;b<32;b++)p=p>>8^r[b]&255^(r[b]&255)<<1,g=g>>8^t[b]&255^(t[b]&255)<<1,F=~(p^g),h=F&(h&128)>>7^p,h^=F&(h&1)<<1,h^=F&(h&2)<<1,h^=F&(h&4)<<1,h^=F&(h&8)<<1,h^=F&(h&16)<<1,h^=F&(h&32)<<1,h^=F&(h&64)<<1,n[b]=h&255;for(h=(F&(h&128)<<1^p)>>8,E.set(l[0],1),E.cpy(l[1],a[h]),E.cpy(l[2],o[0]),E.set(u[0],0),E.set(u[1],1),E.set(u[2],1),p=0,g=0,b=32;b--!==0;)for(p=p<<8|r[b]&255,g=g<<8|t[b]&255,h=h<<8|n[b]&255,S=8;S--!==0;)E.mont_prep(s[0],f[0],l[0],u[0]),E.mont_prep(s[1],f[1],l[1],u[1]),E.mont_prep(s[2],f[2],l[2],u[2]),k=((p^p>>1)>>S&1)+((g^g>>1)>>S&1),E.mont_dbl(l[2],u[2],s[k],f[k],l[0],u[0]),k=h>>S&2^(h>>S&1)<<1,E.mont_add(s[1],f[1],s[k],f[k],l[1],u[1],a[h>>S&1]),E.mont_add(s[2],f[2],s[0],f[0],l[2],u[2],o[((p^g)>>S&2)>>1]);k=(p&1)+(g&1),E.recip(s[0],u[k],0),E.mul(s[1],l[k],s[0]);let v=[];return E.pack(s[1],v),v}static keygen(r){let t=[],i=[];return r=r||[],E.clamp(r),E.core(t,i,r,null),{p:t,s:i,k:r}}static clamp(r){return E.clamp(r),r}static sharedkey(r,t){let i=[];return E.core(i,null,r,t),i}};var ae={IvLength:16,SharedKeyLength:32};globalThis.Buffer=L.Buffer;var Ji=vt(Xi());function kr(e){return q.adapter.getRandomValues(new Uint8Array(e))}function Er(e,r){if(e>r.length)throw new Error("Too few words in dictionary");if(r.length>2**32)throw new Error("Dictionary must have less than 65536 words");let t=new Set,i=2**32-2**32%r.length,n=new Uint8Array(4),a=q.adapter;for(;t.size<e;){a.getRandomValues(n);let o=(n[0]<<24|n[1]<<16|n[2]<<8|n[3])>>>0,l=o%r.length;o<i&&t.add(o%r.length)}return Array.from(t).map(o=>r[o])}var Vi="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";function no(e,r=Vi){if(r.length===0)throw new Error("Alphabet must not be empty.");let t=65536;if(r.length>=t)throw new Error(`Alphabet is too large. Alphabet must be less than ${t} characters long.`);let i=Math.floor(t/r.length)*r.length,n=q.adapter.getRandomValues(new Uint8Array(e*2)),a=new Uint16Array(n.buffer),o="";for(let l=0;l<e;l++){let u=a[l];for(;u>=i;){let s=q.adapter.getRandomValues(new Uint8Array(2));u=new Uint16Array(s.buffer)[0]}o+=r[u%r.length]}return o}async function ao(e,r,t){try{let i=new Uint8Array(t.slice(0));for(let o=0;o<ae.SharedKeyLength;o++)i[o]^=r[o];let n=q.adapter,a=n.sha256(i);return await n.encryptAes256Cbc(e,a)}catch(i){throw new J(i.message)}}async function Qi(e,r,t){try{let i=ne.sharedkey(L.Buffer.from(t,"hex"),L.Buffer.from(r,"hex")),n=(0,Ji.deflate)(e),a=kr(ae.SharedKeyLength),o=await ao(n,a,i);return{nonce:a,data:o}}catch(i){throw new J(i.message)}}async function oo(e,r,t){let i=new Uint8Array(L.Buffer.from(e,"utf-8")),n=await Qi(i,r,t);return{data:L.Buffer.from(n.data).toString("hex"),nonce:L.Buffer.from(n.nonce).toString("hex"),isText:!0}}var Vn=vt(Xn());async function Do(e,r,t){if(e.length<ae.IvLength||e.length%ae.IvLength!==0)throw new J("Invalid Ciphertext");let i=new Uint8Array(t.slice(0));for(let n=0;n<ae.SharedKeyLength;n++)i[n]^=r[n];try{let n=q.adapter,a=n.sha256(i);return await n.decryptAes256Cbc(e,a)}catch(n){throw new J(n.message)}}async function Jn(e,r,t){try{let i=ne.sharedkey(L.Buffer.from(t,"hex"),L.Buffer.from(r,"hex")),n=await Do(e.data,e.nonce,i);return(0,Vn.inflate)(n)}catch(i){throw new J(i.message)}}async function No(e,r,t){if(!e.isText)throw new J("Encrypted message is marked as non-text. Use decryptData instead");let i={data:new Uint8Array(L.Buffer.from(e.data,"hex")),nonce:new Uint8Array(L.Buffer.from(e.nonce,"hex"))},n=await Jn(i,r,t);return L.Buffer.from(n).toString("utf-8")}var Or=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"];var Qn=(a=>(a[a.Bits_128=12]="Bits_128",a[a.Bits_160=15]="Bits_160",a[a.Bits_192=18]="Bits_192",a[a.Bits_224=21]="Bits_224",a[a.Bits_256=24]="Bits_256",a))(Qn||{});function Oo(e={strength:18,dictionary:Or}){let{strength:r=18,dictionary:t=Or}=e;if(t.length<1024)throw new Error("Dictionary too weak");return Er(r.valueOf(),t).join(" ")}function qt(e,r){return q.adapter.sha256(L.Buffer.from(e,r))}function Lr(e,r="utf8"){return new Uint8Array(qt(e,r))}function Lo(e,r="utf8"){return L.Buffer.from(qt(e,r)).toString("hex")}function Mo(e,r="utf8"){return L.Buffer.from(qt(e,r)).toString("base64")}function Ie(e){let r=typeof e=="string"?L.Buffer.from(e,"hex"):e;return q.adapter.sha256(r)}function Zo(e){let r=[0];for(let t=0;t<e.length;t+=1){let i=parseInt(e.charAt(t),16);for(let n=0;n<r.length;n+=1)r[n]=r[n]*16+i,i=r[n]/10|0,r[n]%=10;for(;i>0;)r.push(i%10),i=i/10|0}return r.reverse().join("")}function Mr(e){return new Uint8Array(Buffer.from(e,"hex"))}function Pt(e,r){let t=new Uint8Array(e.length+r.length);return t.set(e),t.set(r,e.length),t}function qo(e){let r=Lr(e),t=ne.keygen(r);return{publicKey:Buffer.from(t.p).toString("hex"),signPrivateKey:Buffer.from(t.s).toString("hex"),agreementPrivateKey:Buffer.from(t.k).toString("hex")}}function Po(e){let t=Ie(e).slice(0,8).reverse();return Zo(Buffer.from(t).toString("hex"))}function Ho(e,r){let t=Ie(e),i=Mr(r),n=Pt(t,i),a=Ie(n),o=Buffer.from(ne.keygen(a).p),l=Pt(t,o),u=Ie(l),s=Buffer.from(ne.sign(u,a,i));return Buffer.from(Pt(s,u)).toString("hex")}function Ko(e,r,t){let i=Mr(e),n=Mr(t),a=i.slice(0,32),o=i.slice(32),l=Buffer.from(ne.verify(a,o,n)),u=Ie(r),s=Pt(u,l),f=Ie(s);if(o.length!==f.length)return!1;for(let p=0;p<o.length;p++)if(o[p]!==f[p])return!1;return!0}var jo=(e,r)=>e.substr(0,192)+r+e.substr(320);var ra=vt(ta()),_t=class{crypto;constructor(){if(typeof window<"u")this.crypto=window.crypto;else throw new Error("WebCryptoAdapter: Looks like you are not in a web environment...")}getRandomValues(r){return this.crypto.getRandomValues(r)}async getKey(r){return this.crypto.subtle.importKey("raw",r,"AES-CBC",!0,["encrypt","decrypt"])}async decryptAes256Cbc(r,t){let i=await this.getKey(t),n=r.slice(0,ae.IvLength),a=await this.crypto.subtle.decrypt({name:"AES-CBC",iv:n},i,r.slice(ae.IvLength));return new Uint8Array(a)}async encryptAes256Cbc(r,t){let i=await this.getKey(t),n=this.getRandomValues(new Uint8Array(ae.IvLength)),a=await this.crypto.subtle.encrypt({name:"AES-CBC",iv:n},i,r),o=new Uint8Array(a),l=new Uint8Array(n.length+o.length);return l.set(n),l.set(o,n.length),l}sha256(r){return Uint8Array.from(ra.sha256.digest(r))}};q.init(new _t);return ua(Yo);})();
/*! Bundled license information:
ieee754/index.js:
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
buffer/index.js:
(*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*)
js-sha256/src/sha256.js:
(**
* [js-sha256]{@link https://github.com/emn178/js-sha256}
*
* @version 0.11.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2024
* @license MIT
*)
*/
//# sourceMappingURL=signumjs.crypto.min.js.map