ipfs-core
Version:
JavaScript implementation of the IPFS specification
2 lines • 1.69 MB
JavaScript
(function (root, factory) {(typeof module === 'object' && module.exports) ? module.exports = factory() : root.IpfsCore = factory()}(typeof self !== 'undefined' ? self : this, function () {
"use strict";var IpfsCore=(()=>{var oue=Object.create;var dm=Object.defineProperty;var aue=Object.getOwnPropertyDescriptor;var cue=Object.getOwnPropertyNames;var lue=Object.getPrototypeOf,uue=Object.prototype.hasOwnProperty;var fue=(r,e,t)=>e in r?dm(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var op=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var hue=(r,e)=>()=>(r&&(e=r(r=0)),e);var P=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),jt=(r,e)=>{for(var t in e)dm(r,t,{get:e[t],enumerable:!0})},jk=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of cue(e))!uue.call(r,i)&&i!==t&&dm(r,i,{get:()=>e[i],enumerable:!(n=aue(e,i))||n.enumerable});return r};var S=(r,e,t)=>(t=r!=null?oue(lue(r)):{},jk(e||!r||!r.__esModule?dm(t,"default",{value:r,enumerable:!0}):t,r)),due=r=>jk(dm({},"__esModule",{value:!0}),r);var Q7=(r,e,t)=>(fue(r,typeof e!="symbol"?e+"":e,t),t);var Qk=P(L3=>{"use strict";l();L3.byteLength=mue;L3.toByteArray=yue;L3.fromByteArray=Eue;var aa=[],Bs=[],pue=typeof Uint8Array<"u"?Uint8Array:Array,X7="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Wf=0,Wk=X7.length;Wf<Wk;++Wf)aa[Wf]=X7[Wf],Bs[X7.charCodeAt(Wf)]=Wf;var Wf,Wk;Bs["-".charCodeAt(0)]=62;Bs["_".charCodeAt(0)]=63;function Yk(r){var e=r.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=r.indexOf("=");t===-1&&(t=e);var n=t===e?0:4-t%4;return[t,n]}function mue(r){var e=Yk(r),t=e[0],n=e[1];return(t+n)*3/4-n}function gue(r,e,t){return(e+t)*3/4-t}function yue(r){var e,t=Yk(r),n=t[0],i=t[1],s=new pue(gue(r,n,i)),o=0,a=i>0?n-4:n,c;for(c=0;c<a;c+=4)e=Bs[r.charCodeAt(c)]<<18|Bs[r.charCodeAt(c+1)]<<12|Bs[r.charCodeAt(c+2)]<<6|Bs[r.charCodeAt(c+3)],s[o++]=e>>16&255,s[o++]=e>>8&255,s[o++]=e&255;return i===2&&(e=Bs[r.charCodeAt(c)]<<2|Bs[r.charCodeAt(c+1)]>>4,s[o++]=e&255),i===1&&(e=Bs[r.charCodeAt(c)]<<10|Bs[r.charCodeAt(c+1)]<<4|Bs[r.charCodeAt(c+2)]>>2,s[o++]=e>>8&255,s[o++]=e&255),s}function wue(r){return aa[r>>18&63]+aa[r>>12&63]+aa[r>>6&63]+aa[r&63]}function bue(r,e,t){for(var n,i=[],s=e;s<t;s+=3)n=(r[s]<<16&16711680)+(r[s+1]<<8&65280)+(r[s+2]&255),i.push(wue(n));return i.join("")}function Eue(r){for(var e,t=r.length,n=t%3,i=[],s=16383,o=0,a=t-n;o<a;o+=s)i.push(bue(r,o,o+s>a?a:o+s));return n===1?(e=r[t-1],i.push(aa[e>>2]+aa[e<<4&63]+"==")):n===2&&(e=(r[t-2]<<8)+r[t-1],i.push(aa[e>>10]+aa[e>>4&63]+aa[e<<2&63]+"=")),i.join("")}});var Xk=P(Z7=>{l();Z7.read=function(r,e,t,n,i){var s,o,a=i*8-n-1,c=(1<<a)-1,u=c>>1,f=-7,h=t?i-1:0,p=t?-1:1,d=r[e+h];for(h+=p,s=d&(1<<-f)-1,d>>=-f,f+=a;f>0;s=s*256+r[e+h],h+=p,f-=8);for(o=s&(1<<-f)-1,s>>=-f,f+=n;f>0;o=o*256+r[e+h],h+=p,f-=8);if(s===0)s=1-u;else{if(s===c)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-u}return(d?-1:1)*o*Math.pow(2,s-n)};Z7.write=function(r,e,t,n,i,s){var o,a,c,u=s*8-i-1,f=(1<<u)-1,h=f>>1,p=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:s-1,m=n?1:-1,g=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=f):(o=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+h>=1?e+=p/c:e+=p*Math.pow(2,1-h),e*c>=2&&(o++,c/=2),o+h>=f?(a=0,o=f):o+h>=1?(a=(e*c-1)*Math.pow(2,i),o=o+h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;r[t+d]=a&255,d+=m,a/=256,i-=8);for(o=o<<i|a,u+=i;u>0;r[t+d]=o&255,d+=m,o/=256,u-=8);r[t+d-m]|=g*128}});var fp=P(up=>{"use strict";l();var J7=Qk(),cp=Xk(),Zk=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;up.Buffer=G;up.SlowBuffer=Tue;up.INSPECT_MAX_BYTES=50;var B3=2147483647;up.kMaxLength=B3;G.TYPED_ARRAY_SUPPORT=_ue();!G.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 _ue(){try{let r=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(r,e),r.foo()===42}catch{return!1}}Object.defineProperty(G.prototype,"parent",{enumerable:!0,get:function(){if(G.isBuffer(this))return this.buffer}});Object.defineProperty(G.prototype,"offset",{enumerable:!0,get:function(){if(G.isBuffer(this))return this.byteOffset}});function _c(r){if(r>B3)throw new RangeError('The value "'+r+'" is invalid for option "size"');let e=new Uint8Array(r);return Object.setPrototypeOf(e,G.prototype),e}function G(r,e,t){if(typeof r=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return n_(r)}return rO(r,e,t)}G.poolSize=8192;function rO(r,e,t){if(typeof r=="string")return Sue(r,e);if(ArrayBuffer.isView(r))return xue(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(ca(r,ArrayBuffer)||r&&ca(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ca(r,SharedArrayBuffer)||r&&ca(r.buffer,SharedArrayBuffer)))return t_(r,e,t);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=r.valueOf&&r.valueOf();if(n!=null&&n!==r)return G.from(n,e,t);let i=Aue(r);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return G.from(r[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}G.from=function(r,e,t){return rO(r,e,t)};Object.setPrototypeOf(G.prototype,Uint8Array.prototype);Object.setPrototypeOf(G,Uint8Array);function nO(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function vue(r,e,t){return nO(r),r<=0?_c(r):e!==void 0?typeof t=="string"?_c(r).fill(e,t):_c(r).fill(e):_c(r)}G.alloc=function(r,e,t){return vue(r,e,t)};function n_(r){return nO(r),_c(r<0?0:i_(r)|0)}G.allocUnsafe=function(r){return n_(r)};G.allocUnsafeSlow=function(r){return n_(r)};function Sue(r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!G.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let t=iO(r,e)|0,n=_c(t),i=n.write(r,e);return i!==t&&(n=n.slice(0,i)),n}function e_(r){let e=r.length<0?0:i_(r.length)|0,t=_c(e);for(let n=0;n<e;n+=1)t[n]=r[n]&255;return t}function xue(r){if(ca(r,Uint8Array)){let e=new Uint8Array(r);return t_(e.buffer,e.byteOffset,e.byteLength)}return e_(r)}function t_(r,e,t){if(e<0||r.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<e+(t||0))throw new RangeError('"length" is outside of buffer bounds');let n;return e===void 0&&t===void 0?n=new Uint8Array(r):t===void 0?n=new Uint8Array(r,e):n=new Uint8Array(r,e,t),Object.setPrototypeOf(n,G.prototype),n}function Aue(r){if(G.isBuffer(r)){let e=i_(r.length)|0,t=_c(e);return t.length===0||r.copy(t,0,0,e),t}if(r.length!==void 0)return typeof r.length!="number"||o_(r.length)?_c(0):e_(r);if(r.type==="Buffer"&&Array.isArray(r.data))return e_(r.data)}function i_(r){if(r>=B3)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+B3.toString(16)+" bytes");return r|0}function Tue(r){return+r!=r&&(r=0),G.alloc(+r)}G.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==G.prototype};G.compare=function(e,t){if(ca(e,Uint8Array)&&(e=G.from(e,e.offset,e.byteLength)),ca(t,Uint8Array)&&(t=G.from(t,t.offset,t.byteLength)),!G.isBuffer(e)||!G.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,i=t.length;for(let s=0,o=Math.min(n,i);s<o;++s)if(e[s]!==t[s]){n=e[s],i=t[s];break}return n<i?-1:i<n?1:0};G.isEncoding=function(e){switch(String(e).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}};G.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return G.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;let i=G.allocUnsafe(t),s=0;for(n=0;n<e.length;++n){let o=e[n];if(ca(o,Uint8Array))s+o.length>i.length?(G.isBuffer(o)||(o=G.from(o)),o.copy(i,s)):Uint8Array.prototype.set.call(i,o,s);else if(G.isBuffer(o))o.copy(i,s);else throw new TypeError('"list" argument must be an Array of Buffers');s+=o.length}return i};function iO(r,e){if(G.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||ca(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);let t=r.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return r_(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return dO(r).length;default:if(i)return n?-1:r_(r).length;e=(""+e).toLowerCase(),i=!0}}G.byteLength=iO;function Iue(r,e,t){let n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return Uue(this,e,t);case"utf8":case"utf-8":return oO(this,e,t);case"ascii":return Lue(this,e,t);case"latin1":case"binary":return Bue(this,e,t);case"base64":return Nue(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Mue(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}G.prototype._isBuffer=!0;function Yf(r,e,t){let n=r[e];r[e]=r[t],r[t]=n}G.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)Yf(this,t,t+1);return this};G.prototype.swap32=function(){let e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)Yf(this,t,t+3),Yf(this,t+1,t+2);return this};G.prototype.swap64=function(){let e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)Yf(this,t,t+7),Yf(this,t+1,t+6),Yf(this,t+2,t+5),Yf(this,t+3,t+4);return this};G.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?oO(this,0,e):Iue.apply(this,arguments)};G.prototype.toLocaleString=G.prototype.toString;G.prototype.equals=function(e){if(!G.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:G.compare(this,e)===0};G.prototype.inspect=function(){let e="",t=up.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"};Zk&&(G.prototype[Zk]=G.prototype.inspect);G.prototype.compare=function(e,t,n,i,s){if(ca(e,Uint8Array)&&(e=G.from(e,e.offset,e.byteLength)),!G.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),s===void 0&&(s=this.length),t<0||n>e.length||i<0||s>this.length)throw new RangeError("out of range index");if(i>=s&&t>=n)return 0;if(i>=s)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,s>>>=0,this===e)return 0;let o=s-i,a=n-t,c=Math.min(o,a),u=this.slice(i,s),f=e.slice(t,n);for(let h=0;h<c;++h)if(u[h]!==f[h]){o=u[h],a=f[h];break}return o<a?-1:a<o?1:0};function sO(r,e,t,n,i){if(r.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,o_(t)&&(t=i?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(i)return-1;t=r.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof e=="string"&&(e=G.from(e,n)),G.isBuffer(e))return e.length===0?-1:Jk(r,e,t,n,i);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):Jk(r,[e],t,n,i);throw new TypeError("val must be string, number or Buffer")}function Jk(r,e,t,n,i){let s=1,o=r.length,a=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||e.length<2)return-1;s=2,o/=2,a/=2,t/=2}function c(f,h){return s===1?f[h]:f.readUInt16BE(h*s)}let u;if(i){let f=-1;for(u=t;u<o;u++)if(c(r,u)===c(e,f===-1?0:u-f)){if(f===-1&&(f=u),u-f+1===a)return f*s}else f!==-1&&(u-=u-f),f=-1}else for(t+a>o&&(t=o-a),u=t;u>=0;u--){let f=!0;for(let h=0;h<a;h++)if(c(r,u+h)!==c(e,h)){f=!1;break}if(f)return u}return-1}G.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1};G.prototype.indexOf=function(e,t,n){return sO(this,e,t,n,!0)};G.prototype.lastIndexOf=function(e,t,n){return sO(this,e,t,n,!1)};function Rue(r,e,t,n){t=Number(t)||0;let i=r.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;let s=e.length;n>s/2&&(n=s/2);let o;for(o=0;o<n;++o){let a=parseInt(e.substr(o*2,2),16);if(o_(a))return o;r[t+o]=a}return o}function Cue(r,e,t,n){return U3(r_(e,r.length-t),r,t,n)}function Pue(r,e,t,n){return U3(Kue(e),r,t,n)}function kue(r,e,t,n){return U3(dO(e),r,t,n)}function Oue(r,e,t,n){return U3(que(e,r.length-t),r,t,n)}G.prototype.write=function(e,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let s=this.length-t;if((n===void 0||n>s)&&(n=s),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let o=!1;for(;;)switch(i){case"hex":return Rue(this,e,t,n);case"utf8":case"utf-8":return Cue(this,e,t,n);case"ascii":case"latin1":case"binary":return Pue(this,e,t,n);case"base64":return kue(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Oue(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};G.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Nue(r,e,t){return e===0&&t===r.length?J7.fromByteArray(r):J7.fromByteArray(r.slice(e,t))}function oO(r,e,t){t=Math.min(r.length,t);let n=[],i=e;for(;i<t;){let s=r[i],o=null,a=s>239?4:s>223?3:s>191?2:1;if(i+a<=t){let c,u,f,h;switch(a){case 1:s<128&&(o=s);break;case 2:c=r[i+1],(c&192)===128&&(h=(s&31)<<6|c&63,h>127&&(o=h));break;case 3:c=r[i+1],u=r[i+2],(c&192)===128&&(u&192)===128&&(h=(s&15)<<12|(c&63)<<6|u&63,h>2047&&(h<55296||h>57343)&&(o=h));break;case 4:c=r[i+1],u=r[i+2],f=r[i+3],(c&192)===128&&(u&192)===128&&(f&192)===128&&(h=(s&15)<<18|(c&63)<<12|(u&63)<<6|f&63,h>65535&&h<1114112&&(o=h))}}o===null?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=a}return Due(n)}var eO=4096;function Due(r){let e=r.length;if(e<=eO)return String.fromCharCode.apply(String,r);let t="",n=0;for(;n<e;)t+=String.fromCharCode.apply(String,r.slice(n,n+=eO));return t}function Lue(r,e,t){let n="";t=Math.min(r.length,t);for(let i=e;i<t;++i)n+=String.fromCharCode(r[i]&127);return n}function Bue(r,e,t){let n="";t=Math.min(r.length,t);for(let i=e;i<t;++i)n+=String.fromCharCode(r[i]);return n}function Uue(r,e,t){let n=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);let i="";for(let s=e;s<t;++s)i+=$ue[r[s]];return i}function Mue(r,e,t){let n=r.slice(e,t),i="";for(let s=0;s<n.length-1;s+=2)i+=String.fromCharCode(n[s]+n[s+1]*256);return i}G.prototype.slice=function(e,t){let n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);let i=this.subarray(e,t);return Object.setPrototypeOf(i,G.prototype),i};function Rn(r,e,t){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}G.prototype.readUintLE=G.prototype.readUIntLE=function(e,t,n){e=e>>>0,t=t>>>0,n||Rn(e,t,this.length);let i=this[e],s=1,o=0;for(;++o<t&&(s*=256);)i+=this[e+o]*s;return i};G.prototype.readUintBE=G.prototype.readUIntBE=function(e,t,n){e=e>>>0,t=t>>>0,n||Rn(e,t,this.length);let i=this[e+--t],s=1;for(;t>0&&(s*=256);)i+=this[e+--t]*s;return i};G.prototype.readUint8=G.prototype.readUInt8=function(e,t){return e=e>>>0,t||Rn(e,1,this.length),this[e]};G.prototype.readUint16LE=G.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||Rn(e,2,this.length),this[e]|this[e+1]<<8};G.prototype.readUint16BE=G.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||Rn(e,2,this.length),this[e]<<8|this[e+1]};G.prototype.readUint32LE=G.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||Rn(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};G.prototype.readUint32BE=G.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||Rn(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};G.prototype.readBigUInt64LE=Wl(function(e){e=e>>>0,lp(e,"offset");let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&pm(e,this.length-8);let i=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,s=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(i)+(BigInt(s)<<BigInt(32))});G.prototype.readBigUInt64BE=Wl(function(e){e=e>>>0,lp(e,"offset");let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&pm(e,this.length-8);let i=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],s=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(i)<<BigInt(32))+BigInt(s)});G.prototype.readIntLE=function(e,t,n){e=e>>>0,t=t>>>0,n||Rn(e,t,this.length);let i=this[e],s=1,o=0;for(;++o<t&&(s*=256);)i+=this[e+o]*s;return s*=128,i>=s&&(i-=Math.pow(2,8*t)),i};G.prototype.readIntBE=function(e,t,n){e=e>>>0,t=t>>>0,n||Rn(e,t,this.length);let i=t,s=1,o=this[e+--i];for(;i>0&&(s*=256);)o+=this[e+--i]*s;return s*=128,o>=s&&(o-=Math.pow(2,8*t)),o};G.prototype.readInt8=function(e,t){return e=e>>>0,t||Rn(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};G.prototype.readInt16LE=function(e,t){e=e>>>0,t||Rn(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};G.prototype.readInt16BE=function(e,t){e=e>>>0,t||Rn(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};G.prototype.readInt32LE=function(e,t){return e=e>>>0,t||Rn(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};G.prototype.readInt32BE=function(e,t){return e=e>>>0,t||Rn(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};G.prototype.readBigInt64LE=Wl(function(e){e=e>>>0,lp(e,"offset");let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&pm(e,this.length-8);let i=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)});G.prototype.readBigInt64BE=Wl(function(e){e=e>>>0,lp(e,"offset");let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&pm(e,this.length-8);let i=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(i)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n)});G.prototype.readFloatLE=function(e,t){return e=e>>>0,t||Rn(e,4,this.length),cp.read(this,e,!0,23,4)};G.prototype.readFloatBE=function(e,t){return e=e>>>0,t||Rn(e,4,this.length),cp.read(this,e,!1,23,4)};G.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||Rn(e,8,this.length),cp.read(this,e,!0,52,8)};G.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||Rn(e,8,this.length),cp.read(this,e,!1,52,8)};function Fi(r,e,t,n,i,s){if(!G.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<s)throw new RangeError('"value" argument is out of bounds');if(t+n>r.length)throw new RangeError("Index out of range")}G.prototype.writeUintLE=G.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t=t>>>0,n=n>>>0,!i){let a=Math.pow(2,8*n)-1;Fi(this,e,t,n,a,0)}let s=1,o=0;for(this[t]=e&255;++o<n&&(s*=256);)this[t+o]=e/s&255;return t+n};G.prototype.writeUintBE=G.prototype.writeUIntBE=function(e,t,n,i){if(e=+e,t=t>>>0,n=n>>>0,!i){let a=Math.pow(2,8*n)-1;Fi(this,e,t,n,a,0)}let s=n-1,o=1;for(this[t+s]=e&255;--s>=0&&(o*=256);)this[t+s]=e/o&255;return t+n};G.prototype.writeUint8=G.prototype.writeUInt8=function(e,t,n){return e=+e,t=t>>>0,n||Fi(this,e,t,1,255,0),this[t]=e&255,t+1};G.prototype.writeUint16LE=G.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t>>>0,n||Fi(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};G.prototype.writeUint16BE=G.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t>>>0,n||Fi(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};G.prototype.writeUint32LE=G.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t>>>0,n||Fi(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};G.prototype.writeUint32BE=G.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t>>>0,n||Fi(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function aO(r,e,t,n,i){hO(e,n,i,r,t,7);let s=Number(e&BigInt(4294967295));r[t++]=s,s=s>>8,r[t++]=s,s=s>>8,r[t++]=s,s=s>>8,r[t++]=s;let o=Number(e>>BigInt(32)&BigInt(4294967295));return r[t++]=o,o=o>>8,r[t++]=o,o=o>>8,r[t++]=o,o=o>>8,r[t++]=o,t}function cO(r,e,t,n,i){hO(e,n,i,r,t,7);let s=Number(e&BigInt(4294967295));r[t+7]=s,s=s>>8,r[t+6]=s,s=s>>8,r[t+5]=s,s=s>>8,r[t+4]=s;let o=Number(e>>BigInt(32)&BigInt(4294967295));return r[t+3]=o,o=o>>8,r[t+2]=o,o=o>>8,r[t+1]=o,o=o>>8,r[t]=o,t+8}G.prototype.writeBigUInt64LE=Wl(function(e,t=0){return aO(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});G.prototype.writeBigUInt64BE=Wl(function(e,t=0){return cO(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});G.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t=t>>>0,!i){let c=Math.pow(2,8*n-1);Fi(this,e,t,n,c-1,-c)}let s=0,o=1,a=0;for(this[t]=e&255;++s<n&&(o*=256);)e<0&&a===0&&this[t+s-1]!==0&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+n};G.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t=t>>>0,!i){let c=Math.pow(2,8*n-1);Fi(this,e,t,n,c-1,-c)}let s=n-1,o=1,a=0;for(this[t+s]=e&255;--s>=0&&(o*=256);)e<0&&a===0&&this[t+s+1]!==0&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+n};G.prototype.writeInt8=function(e,t,n){return e=+e,t=t>>>0,n||Fi(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};G.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t>>>0,n||Fi(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};G.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t>>>0,n||Fi(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};G.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t>>>0,n||Fi(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};G.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t>>>0,n||Fi(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};G.prototype.writeBigInt64LE=Wl(function(e,t=0){return aO(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});G.prototype.writeBigInt64BE=Wl(function(e,t=0){return cO(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function lO(r,e,t,n,i,s){if(t+n>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function uO(r,e,t,n,i){return e=+e,t=t>>>0,i||lO(r,e,t,4,34028234663852886e22,-34028234663852886e22),cp.write(r,e,t,n,23,4),t+4}G.prototype.writeFloatLE=function(e,t,n){return uO(this,e,t,!0,n)};G.prototype.writeFloatBE=function(e,t,n){return uO(this,e,t,!1,n)};function fO(r,e,t,n,i){return e=+e,t=t>>>0,i||lO(r,e,t,8,17976931348623157e292,-17976931348623157e292),cp.write(r,e,t,n,52,8),t+8}G.prototype.writeDoubleLE=function(e,t,n){return fO(this,e,t,!0,n)};G.prototype.writeDoubleBE=function(e,t,n){return fO(this,e,t,!1,n)};G.prototype.copy=function(e,t,n,i){if(!G.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);let s=i-n;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,n,i):Uint8Array.prototype.set.call(e,this.subarray(n,i),t),s};G.prototype.fill=function(e,t,n,i){if(typeof e=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!G.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(e.length===1){let o=e.charCodeAt(0);(i==="utf8"&&o<128||i==="latin1")&&(e=o)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);let s;if(typeof e=="number")for(s=t;s<n;++s)this[s]=e;else{let o=G.isBuffer(e)?e:G.from(e,i),a=o.length;if(a===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<n-t;++s)this[s+t]=o[s%a]}return this};var ap={};function s_(r,e,t){ap[r]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,this.stack,delete this.name}get code(){return r}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${r}]: ${this.message}`}}}s_("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);s_("ERR_INVALID_ARG_TYPE",function(r,e){return`The "${r}" argument must be of type number. Received type ${typeof e}`},TypeError);s_("ERR_OUT_OF_RANGE",function(r,e,t){let n=`The value of "${r}" is out of range.`,i=t;return Number.isInteger(t)&&Math.abs(t)>2**32?i=tO(String(t)):typeof t=="bigint"&&(i=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(i=tO(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n},RangeError);function tO(r){let e="",t=r.length,n=r[0]==="-"?1:0;for(;t>=n+4;t-=3)e=`_${r.slice(t-3,t)}${e}`;return`${r.slice(0,t)}${e}`}function Fue(r,e,t){lp(e,"offset"),(r[e]===void 0||r[e+t]===void 0)&&pm(e,r.length-(t+1))}function hO(r,e,t,n,i,s){if(r>t||r<e){let o=typeof e=="bigint"?"n":"",a;throw s>3?e===0||e===BigInt(0)?a=`>= 0${o} and < 2${o} ** ${(s+1)*8}${o}`:a=`>= -(2${o} ** ${(s+1)*8-1}${o}) and < 2 ** ${(s+1)*8-1}${o}`:a=`>= ${e}${o} and <= ${t}${o}`,new ap.ERR_OUT_OF_RANGE("value",a,r)}Fue(n,i,s)}function lp(r,e){if(typeof r!="number")throw new ap.ERR_INVALID_ARG_TYPE(e,"number",r)}function pm(r,e,t){throw Math.floor(r)!==r?(lp(r,t),new ap.ERR_OUT_OF_RANGE(t||"offset","an integer",r)):e<0?new ap.ERR_BUFFER_OUT_OF_BOUNDS:new ap.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${e}`,r)}var Vue=/[^+/0-9A-Za-z-_]/g;function zue(r){if(r=r.split("=")[0],r=r.trim().replace(Vue,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function r_(r,e){e=e||1/0;let t,n=r.length,i=null,s=[];for(let o=0;o<n;++o){if(t=r.charCodeAt(o),t>55295&&t<57344){if(!i){if(t>56319){(e-=3)>-1&&s.push(239,191,189);continue}else if(o+1===n){(e-=3)>-1&&s.push(239,191,189);continue}i=t;continue}if(t<56320){(e-=3)>-1&&s.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,t<128){if((e-=1)<0)break;s.push(t)}else if(t<2048){if((e-=2)<0)break;s.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;s.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;s.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return s}function Kue(r){let e=[];for(let t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function que(r,e){let t,n,i,s=[];for(let o=0;o<r.length&&!((e-=2)<0);++o)t=r.charCodeAt(o),n=t>>8,i=t%256,s.push(i),s.push(n);return s}function dO(r){return J7.toByteArray(zue(r))}function U3(r,e,t,n){let i;for(i=0;i<n&&!(i+t>=e.length||i>=r.length);++i)e[i+t]=r[i];return i}function ca(r,e){return r instanceof e||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===e.name}function o_(r){return r!==r}var $ue=function(){let r="0123456789abcdef",e=new Array(256);for(let t=0;t<16;++t){let n=t*16;for(let i=0;i<16;++i)e[n+i]=r[t]+r[i]}return e}();function Wl(r){return typeof BigInt>"u"?Hue:r}function Hue(){throw new Error("BigInt not supported")}});var wO=P((ICe,yO)=>{l();var Yr=yO.exports={},la,ua;function a_(){throw new Error("setTimeout has not been defined")}function c_(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?la=setTimeout:la=a_}catch{la=a_}try{typeof clearTimeout=="function"?ua=clearTimeout:ua=c_}catch{ua=c_}})();function pO(r){if(la===setTimeout)return setTimeout(r,0);if((la===a_||!la)&&setTimeout)return la=setTimeout,setTimeout(r,0);try{return la(r,0)}catch{try{return la.call(null,r,0)}catch{return la.call(this,r,0)}}}function Gue(r){if(ua===clearTimeout)return clearTimeout(r);if((ua===c_||!ua)&&clearTimeout)return ua=clearTimeout,clearTimeout(r);try{return ua(r)}catch{try{return ua.call(null,r)}catch{return ua.call(this,r)}}}var vc=[],hp=!1,Qf,M3=-1;function jue(){!hp||!Qf||(hp=!1,Qf.length?vc=Qf.concat(vc):M3=-1,vc.length&&mO())}function mO(){if(!hp){var r=pO(jue);hp=!0;for(var e=vc.length;e;){for(Qf=vc,vc=[];++M3<e;)Qf&&Qf[M3].run();M3=-1,e=vc.length}Qf=null,hp=!1,Gue(r)}}Yr.nextTick=function(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];vc.push(new gO(r,e)),vc.length===1&&!hp&&pO(mO)};function gO(r,e){this.fun=r,this.array=e}gO.prototype.run=function(){this.fun.apply(null,this.array)};Yr.title="browser";Yr.browser=!0;Yr.env={};Yr.argv=[];Yr.version="";Yr.versions={};function Sc(){}Yr.on=Sc;Yr.addListener=Sc;Yr.once=Sc;Yr.off=Sc;Yr.removeListener=Sc;Yr.removeAllListeners=Sc;Yr.emit=Sc;Yr.prependListener=Sc;Yr.prependOnceListener=Sc;Yr.listeners=function(r){return[]};Yr.binding=function(r){throw new Error("process.binding is not supported")};Yr.cwd=function(){return"/"};Yr.chdir=function(r){throw new Error("process.chdir is not supported")};Yr.umask=function(){return 0}});var Buffer,process,l=hue(()=>{({Buffer}=fp()),process=wO()});var EO=P((PCe,bO)=>{"use strict";l();bO.exports=r=>{if(Object.prototype.toString.call(r)!=="[object Object]")return!1;let e=Object.getPrototypeOf(r);return e===null||e===Object.prototype}});var u_=P((xO,AO)=>{"use strict";l();var F3=EO(),{hasOwnProperty:vO}=Object.prototype,{propertyIsEnumerable:Wue}=Object,dp=(r,e,t)=>Object.defineProperty(r,e,{value:t,writable:!0,enumerable:!0,configurable:!0}),Yue=xO,_O={concatArrays:!1,ignoreUndefined:!1},V3=r=>{let e=[];for(let t in r)vO.call(r,t)&&e.push(t);if(Object.getOwnPropertySymbols){let t=Object.getOwnPropertySymbols(r);for(let n of t)Wue.call(r,n)&&e.push(n)}return e};function pp(r){return Array.isArray(r)?Que(r):F3(r)?Xue(r):r}function Que(r){let e=r.slice(0,0);return V3(r).forEach(t=>{dp(e,t,pp(r[t]))}),e}function Xue(r){let e=Object.getPrototypeOf(r)===null?Object.create(null):{};return V3(r).forEach(t=>{dp(e,t,pp(r[t]))}),e}var SO=(r,e,t,n)=>(t.forEach(i=>{typeof e[i]>"u"&&n.ignoreUndefined||(i in r&&r[i]!==Object.getPrototypeOf(r)?dp(r,i,l_(r[i],e[i],n)):dp(r,i,pp(e[i])))}),r),Zue=(r,e,t)=>{let n=r.slice(0,0),i=0;return[r,e].forEach(s=>{let o=[];for(let a=0;a<s.length;a++)vO.call(s,a)&&(o.push(String(a)),s===r?dp(n,i++,s[a]):dp(n,i++,pp(s[a])));n=SO(n,s,V3(s).filter(a=>!o.includes(a)),t)}),n};function l_(r,e,t){return t.concatArrays&&Array.isArray(r)&&Array.isArray(e)?Zue(r,e,t):!F3(e)||!F3(r)?pp(e):SO(r,e,V3(e),t)}AO.exports=function(...r){let e=l_(pp(_O),this!==Yue&&this||{},_O),t={_:{}};for(let n of r)if(n!==void 0){if(!F3(n))throw new TypeError("`"+n+"` is not an Option Object");t=l_(t,{_:n},e)}return t._}});var f_=P((LCe,IO)=>{l();function Jue(){return!!(typeof window<"u"&&typeof window.process=="object"&&window.process.type==="renderer"||typeof process<"u"&&typeof process.versions=="object"&&process.versions.electron||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Electron")>=0)}IO.exports=Jue});var K3=P((UCe,RO)=>{"use strict";l();var efe=f_(),z3=typeof window=="object"&&typeof document=="object"&&document.nodeType===9,mm=efe(),tfe=z3&&!mm,rfe=mm&&!z3,nfe=mm&&z3,ife=typeof op=="function"&&typeof process<"u"&&typeof process.release<"u"&&process.release.name==="node"&&!mm,sfe=typeof importScripts=="function"&&typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,ofe=typeof process<"u"&&typeof process.env<"u"&&!1,afe=typeof navigator<"u"&&navigator.product==="ReactNative";RO.exports={isTest:ofe,isElectron:mm,isElectronMain:rfe,isElectronRenderer:nfe,isNode:ife,isBrowser:tfe,isWebWorker:sfe,isEnvWithDom:z3,isReactNative:afe}});var h_=P((VCe,CO)=>{l();var mp=1e3,gp=mp*60,yp=gp*60,Xf=yp*24,cfe=Xf*7,lfe=Xf*365.25;CO.exports=function(r,e){e=e||{};var t=typeof r;if(t==="string"&&r.length>0)return ufe(r);if(t==="number"&&isFinite(r))return e.long?hfe(r):ffe(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function ufe(r){if(r=String(r),!(r.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(e){var t=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return t*lfe;case"weeks":case"week":case"w":return t*cfe;case"days":case"day":case"d":return t*Xf;case"hours":case"hour":case"hrs":case"hr":case"h":return t*yp;case"minutes":case"minute":case"mins":case"min":case"m":return t*gp;case"seconds":case"second":case"secs":case"sec":case"s":return t*mp;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function ffe(r){var e=Math.abs(r);return e>=Xf?Math.round(r/Xf)+"d":e>=yp?Math.round(r/yp)+"h":e>=gp?Math.round(r/gp)+"m":e>=mp?Math.round(r/mp)+"s":r+"ms"}function hfe(r){var e=Math.abs(r);return e>=Xf?q3(r,e,Xf,"day"):e>=yp?q3(r,e,yp,"hour"):e>=gp?q3(r,e,gp,"minute"):e>=mp?q3(r,e,mp,"second"):r+" ms"}function q3(r,e,t,n){var i=e>=t*1.5;return Math.round(r/t)+" "+n+(i?"s":"")}});var kO=P((KCe,PO)=>{l();function dfe(r){t.debug=t,t.default=t,t.coerce=c,t.disable=s,t.enable=i,t.enabled=o,t.humanize=h_(),t.destroy=u,Object.keys(r).forEach(f=>{t[f]=r[f]}),t.names=[],t.skips=[],t.formatters={};function e(f){let h=0;for(let p=0;p<f.length;p++)h=(h<<5)-h+f.charCodeAt(p),h|=0;return t.colors[Math.abs(h)%t.colors.length]}t.selectColor=e;function t(f){let h,p=null,d,m;function g(...y){if(!g.enabled)return;let w=g,b=Number(new Date),_=b-(h||b);w.diff=_,w.prev=h,w.curr=b,h=b,y[0]=t.coerce(y[0]),typeof y[0]!="string"&&y.unshift("%O");let v=0;y[0]=y[0].replace(/%([a-zA-Z%])/g,(x,A)=>{if(x==="%%")return"%";v++;let R=t.formatters[A];if(typeof R=="function"){let O=y[v];x=R.call(w,O),y.splice(v,1),v--}return x}),t.formatArgs.call(w,y),(w.log||t.log).apply(w,y)}return g.namespace=f,g.useColors=t.useColors(),g.color=t.selectColor(f),g.extend=n,g.destroy=t.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(d!==t.namespaces&&(d=t.namespaces,m=t.enabled(f)),m),set:y=>{p=y}}),typeof t.init=="function"&&t.init(g),g}function n(f,h){let p=t(this.namespace+(typeof h>"u"?":":h)+f);return p.log=this.log,p}function i(f){t.save(f),t.namespaces=f,t.names=[],t.skips=[];let h,p=(typeof f=="string"?f:"").split(/[\s,]+/),d=p.length;for(h=0;h<d;h++)p[h]&&(f=p[h].replace(/\*/g,".*?"),f[0]==="-"?t.skips.push(new RegExp("^"+f.slice(1)+"$")):t.names.push(new RegExp("^"+f+"$")))}function s(){let f=[...t.names.map(a),...t.skips.map(a).map(h=>"-"+h)].join(",");return t.enable(""),f}function o(f){if(f[f.length-1]==="*")return!0;let h,p;for(h=0,p=t.skips.length;h<p;h++)if(t.skips[h].test(f))return!1;for(h=0,p=t.names.length;h<p;h++)if(t.names[h].test(f))return!0;return!1}function a(f){return f.toString().substring(2,f.toString().length-2).replace(/\.\*\?$/,"*")}function c(f){return f instanceof Error?f.stack||f.message:f}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}PO.exports=dfe});var Us=P((ns,$3)=>{l();ns.formatArgs=mfe;ns.save=gfe;ns.load=yfe;ns.useColors=pfe;ns.storage=wfe();ns.destroy=(()=>{let r=!1;return()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();ns.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function pfe(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function mfe(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+$3.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;r.splice(1,0,e,"color: inherit");let t=0,n=0;r[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(t++,i==="%c"&&(n=t))}),r.splice(n,0,e)}ns.log=console.debug||console.log||(()=>{});function gfe(r){try{r?ns.storage.setItem("debug",r):ns.storage.removeItem("debug")}catch{}}function yfe(){let r;try{r=ns.storage.getItem("debug")}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=process.env.DEBUG),r}function wfe(){try{return localStorage}catch{}}$3.exports=kO()(ns);var{formatters:bfe}=$3.exports;bfe.j=function(r){try{return JSON.stringify(r)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var W=P((fPe,BO)=>{"use strict";l();function LO(r,e){for(let t in e)Object.defineProperty(r,t,{value:e[t],enumerable:!0,configurable:!0});return r}function Mfe(r,e,t){if(!r||typeof r=="string")throw new TypeError("Please pass an Error to err-code");t||(t={}),typeof e=="object"&&(t=e,e=""),e&&(t.code=e);try{return LO(r,t)}catch{t.message=r.message,t.stack=r.stack;let i=function(){};return i.prototype=Object.create(Object.getPrototypeOf(r)),LO(new i,t)}}BO.exports=Mfe});var Xl=P((dPe,UO)=>{"use strict";l();UO.exports=Ffe;function Ffe(r,e){for(var t=new Array(arguments.length-1),n=0,i=2,s=!0;i<arguments.length;)t[n++]=arguments[i++];return new Promise(function(a,c){t[n]=function(f){if(s)if(s=!1,f)c(f);else{for(var h=new Array(arguments.length-1),p=0;p<h.length;)h[p++]=arguments[p];a.apply(null,h)}};try{r.apply(e||null,t)}catch(u){s&&(s=!1,c(u))}})}});var Zl=P(VO=>{"use strict";l();var H3=VO;H3.length=function(e){var t=e.length;if(!t)return 0;for(var n=0;--t%4>1&&e.charAt(t)==="=";)++n;return Math.ceil(e.length*3)/4-n};var bp=new Array(64),FO=new Array(123);for(vo=0;vo<64;)FO[bp[vo]=vo<26?vo+65:vo<52?vo+71:vo<62?vo-4:vo-59|43]=vo++;var vo;H3.encode=function(e,t,n){for(var i=null,s=[],o=0,a=0,c;t<n;){var u=e[t++];switch(a){case 0:s[o++]=bp[u>>2],c=(u&3)<<4,a=1;break;case 1:s[o++]=bp[c|u>>4],c=(u&15)<<2,a=2;break;case 2:s[o++]=bp[c|u>>6],s[o++]=bp[u&63],a=0;break}o>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,s)),o=0)}return a&&(s[o++]=bp[c],s[o++]=61,a===1&&(s[o++]=61)),i?(o&&i.push(String.fromCharCode.apply(String,s.slice(0,o))),i.join("")):String.fromCharCode.apply(String,s.slice(0,o))};var MO="invalid encoding";H3.decode=function(e,t,n){for(var i=n,s=0,o,a=0;a<e.length;){var c=e.charCodeAt(a++);if(c===61&&s>1)break;if((c=FO[c])===void 0)throw Error(MO);switch(s){case 0:o=c,s=1;break;case 1:t[n++]=o<<2|(c&48)>>4,o=c,s=2;break;case 2:t[n++]=(o&15)<<4|(c&60)>>2,o=c,s=3;break;case 3:t[n++]=(o&3)<<6|c,s=0;break}}if(s===1)throw Error(MO);return n-i};H3.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}});var Jl=P((yPe,zO)=>{"use strict";l();zO.exports=G3;function G3(){this._listeners={}}G3.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||this}),this};G3.prototype.off=function(e,t){if(e===void 0)this._listeners={};else if(t===void 0)this._listeners[e]=[];else for(var n=this._listeners[e],i=0;i<n.length;)n[i].fn===t?n.splice(i,1):++i;return this};G3.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var n=[],i=1;i<arguments.length;)n.push(arguments[i++]);for(i=0;i<t.length;)t[i].fn.apply(t[i++].ctx,n)}return this}});var eu=P((bPe,jO)=>{"use strict";l();jO.exports=KO(KO);function KO(r){return typeof Float32Array<"u"?function(){var e=new Float32Array([-0]),t=new Uint8Array(e.buffer),n=t[3]===128;function i(c,u,f){e[0]=c,u[f]=t[0],u[f+1]=t[1],u[f+2]=t[2],u[f+3]=t[3]}function s(c,u,f){e[0]=c,u[f]=t[3],u[f+1]=t[2],u[f+2]=t[1],u[f+3]=t[0]}r.writeFloatLE=n?i:s,r.writeFloatBE=n?s:i;function o(c,u){return t[0]=c[u],t[1]=c[u+1],t[2]=c[u+2],t[3]=c[u+3],e[0]}function a(c,u){return t[3]=c[u],t[2]=c[u+1],t[1]=c[u+2],t[0]=c[u+3],e[0]}r.readFloatLE=n?o:a,r.readFloatBE=n?a:o}():function(){function e(n,i,s,o){var a=i<0?1:0;if(a&&(i=-i),i===0)n(1/i>0?0:2147483648,s,o);else if(isNaN(i))n(2143289344,s,o);else if(i>34028234663852886e22)n((a<<31|2139095040)>>>0,s,o);else if(i<11754943508222875e-54)n((a<<31|Math.round(i/1401298464324817e-60))>>>0,s,o);else{var c=Math.floor(Math.log(i)/Math.LN2),u=Math.round(i*Math.pow(2,-c)*8388608)&8388607;n((a<<31|c+127<<23|u)>>>0,s,o)}}r.writeFloatLE=e.bind(null,qO),r.writeFloatBE=e.bind(null,$O);function t(n,i,s){var o=n(i,s),a=(o>>31)*2+1,c=o>>>23&255,u=o&8388607;return c===255?u?NaN:a*(1/0):c===0?a*1401298464324817e-60*u:a*Math.pow(2,c-150)*(u+8388608)}r.readFloatLE=t.bind(null,HO),r.readFloatBE=t.bind(null,GO)}(),typeof Float64Array<"u"?function(){var e=new Float64Array([-0]),t=new Uint8Array(e.buffer),n=t[7]===128;function i(c,u,f){e[0]=c,u[f]=t[0],u[f+1]=t[1],u[f+2]=t[2],u[f+3]=t[3],u[f+4]=t[4],u[f+5]=t[5],u[f+6]=t[6],u[f+7]=t[7]}function s(c,u,f){e[0]=c,u[f]=t[7],u[f+1]=t[6],u[f+2]=t[5],u[f+3]=t[4],u[f+4]=t[3],u[f+5]=t[2],u[f+6]=t[1],u[f+7]=t[0]}r.writeDoubleLE=n?i:s,r.writeDoubleBE=n?s:i;function o(c,u){return t[0]=c[u],t[1]=c[u+1],t[2]=c[u+2],t[3]=c[u+3],t[4]=c[u+4],t[5]=c[u+5],t[6]=c[u+6],t[7]=c[u+7],e[0]}function a(c,u){return t[7]=c[u],t[6]=c[u+1],t[5]=c[u+2],t[4]=c[u+3],t[3]=c[u+4],t[2]=c[u+5],t[1]=c[u+6],t[0]=c[u+7],e[0]}r.readDoubleLE=n?o:a,r.readDoubleBE=n?a:o}():function(){function e(n,i,s,o,a,c){var u=o<0?1:0;if(u&&(o=-o),o===0)n(0,a,c+i),n(1/o>0?0:2147483648,a,c+s);else if(isNaN(o))n(0,a,c+i),n(2146959360,a,c+s);else if(o>17976931348623157e292)n(0,a,c+i),n((u<<31|2146435072)>>>0,a,c+s);else{var f;if(o<22250738585072014e-324)f=o/5e-324,n(f>>>0,a,c+i),n((u<<31|f/4294967296)>>>0,a,c+s);else{var h=Math.floor(Math.log(o)/Math.LN2);h===1024&&(h=1023),f=o*Math.pow(2,-h),n(f*4503599627370496>>>0,a,c+i),n((u<<31|h+1023<<20|f*1048576&1048575)>>>0,a,c+s)}}}r.writeDoubleLE=e.bind(null,qO,0,4),r.writeDoubleBE=e.bind(null,$O,4,0);function t(n,i,s,o,a){var c=n(o,a+i),u=n(o,a+s),f=(u>>31)*2+1,h=u>>>20&2047,p=4294967296*(u&1048575)+c;return h===2047?p?NaN:f*(1/0):h===0?f*5e-324*p:f*Math.pow(2,h-1075)*(p+4503599627370496)}r.readDoubleLE=t.bind(null,HO,0,4),r.readDoubleBE=t.bind(null,GO,4,0)}(),r}function qO(r,e,t){e[t]=r&255,e[t+1]=r>>>8&255,e[t+2]=r>>>16&255,e[t+3]=r>>>24}function $O(r,e,t){e[t]=r>>>24,e[t+1]=r>>>16&255,e[t+2]=r>>>8&255,e[t+3]=r&255}function HO(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16|r[e+3]<<24)>>>0}function GO(r,e){return(r[e]<<24|r[e+1]<<16|r[e+2]<<8|r[e+3])>>>0}});var tu=P((exports,module)=>{"use strict";l();module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(r){}return null}});var ru=P(WO=>{"use strict";l();var A_=WO;A_.length=function(e){for(var t=0,n=0,i=0;i<e.length;++i)n=e.charCodeAt(i),n<128?t+=1:n<2048?t+=2:(n&64512)===55296&&(e.charCodeAt(i+1)&64512)===56320?(++i,t+=4):t+=3;return t};A_.read=function(e,t,n){var i=n-t;if(i<1)return"";for(var s=null,o=[],a=0,c;t<n;)c=e[t++],c<128?o[a++]=c:c>191&&c<224?o[a++]=(c&31)<<6|e[t++]&63:c>239&&c<365?(c=((c&7)<<18|(e[t++]&63)<<12|(e[t++]&63)<<6|e[t++]&63)-65536,o[a++]=55296+(c>>10),o[a++]=56320+(c&1023)):o[a++]=(c&15)<<12|(e[t++]&63)<<6|e[t++]&63,a>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),a=0);return s?(a&&s.push(String.fromCharCode.apply(String,o.slice(0,a))),s.join("")):String.fromCharCode.apply(String,o.slice(0,a))};A_.write=function(e,t,n){for(var i=n,s,o,a=0;a<e.length;++a)s=e.charCodeAt(a),s<128?t[n++]=s:s<2048?(t[n++]=s>>6|192,t[n++]=s&63|128):(s&64512)===55296&&((o=e.charCodeAt(a+1))&64512)===56320?(s=65536+((s&1023)<<10)+(o&1023),++a,t[n++]=s>>18|240,t[n++]=s>>12&63|128,t[n++]=s>>6&63|128,t[n++]=s&63|128):(t[n++]=s>>12|224,t[n++]=s>>6&63|128,t[n++]=s&63|128);return n-i}});var nu=P((xPe,YO)=>{"use strict";l();YO.exports=Vfe;function Vfe(r,e,t){var n=t||8192,i=n>>>1,s=null,o=n;return function(c){if(c<1||c>i)return r(c);o+c>n&&(s=r(n),o=0);var u=e.call(s,o,o+=c);return o&7&&(o=(o|7)+1),u}}});var XO=P((TPe,QO)=>{"use strict";l();QO.exports=Cn;var gm=su();function Cn(r,e){this.lo=r>>>0,this.hi=e>>>0}var Jf=Cn.zero=new Cn(0,0);Jf.toNumber=function(){return 0};Jf.zzEncode=Jf.zzDecode=function(){return this};Jf.length=function(){return 1};var zfe=Cn.zeroHash="\0\0\0\0\0\0\0\0";Cn.fromNumber=function(e){if(e===0)return Jf;var t=e<0;t&&(e=-e);var n=e>>>0,i=(e-n)/4294967296>>>0;return t&&(i=~i>>>0,n=~n>>>0,++n>4294967295&&(n=0,++i>4294967295&&(i=0))),new Cn(n,i)};Cn.from=function(e){if(typeof e=="number")return Cn.fromNumber(e);if(gm.isString(e))if(gm.Long)e=gm.Long.fromString(e);else return Cn.fromNumber(parseInt(e,10));return e.low||e.high?new Cn(e.low>>>0,e.high>>>0):Jf};Cn.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+n*4294967296)}return this.lo+this.hi*4294967296};Cn.prototype.toLong=function(e){return gm.Long?new gm.Long(this.lo|0,this.hi|0,Boolean(e)):{low:this.lo|0,high:this.hi|0,unsigned:Boolean(e)}};var iu=String.prototype.charCodeAt;Cn.fromHash=function(e){return e===zfe?Jf:new Cn((iu.call(e,0)|iu.call(e,1)<<8|iu.call(e,2)<<16|iu.call(e,3)<<24)>>>0,(iu.call(e,4)|iu.call(e,5)<<8|iu.call(e,6)<<16|iu.call(e,7)<<24)>>>0)};Cn.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};Cn.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this};Cn.prototype.zzDecode=function(){var e=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this};Cn.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return n===0?t===0?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}});var su=P(T_=>{"use strict";l();var Se=T_;Se.asPromise=Xl();Se.base64=Zl();Se.EventEmitter=Jl();Se.float=eu();Se.inquire=tu();Se.utf8=ru();Se.pool=nu();Se.LongBits=XO();Se.isNode=Boolean(typeof globalThis<"u"&&globalThis&&globalThis.process&&globalThis.process.versions&&globalThis.process.versions.node);Se.global=Se.isNode&&globalThis||typeof window<"u"&&window||typeof self<"u"&&self||T_;Se.emptyArray=Object.freeze?Object.freeze([]):[];Se.emptyObject=Object.freeze?Object.freeze({}):{};Se.isInteger=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};Se.isString=function(e){return typeof e=="string"||e instanceof String};Se.isObject=function(e){return e&&typeof e=="object"};Se.isset=Se.isSet=function(e,t){var n=e[t];return n!=null&&e.hasOwnProperty(t)?typeof n!="object"||(Array.isArray(n)?n.length:Object.keys(n).length)>0:!1};Se.Buffer=function(){try{var r=Se.inquire("buffer").Buffer;return r.prototype.utf8Write?r:null}catch{return null}}();Se._Buffer_from=null;Se._Buffer_allocUnsafe=null;Se.newBuffer=function(e){return typeof e=="number"?Se.Buffer?Se._Buffer_allocUnsafe(e):new Se.Array(e):Se.Buffer?Se._Buffer_from(e):typeof Uint8Array>"u"?e:new Uint8Array(e)};Se.Array=typeof Uint8Array<"u"?Uint8Array:Array;Se.Long=Se.global.dcodeIO&&S