UNPKG

interface-ipfs-core

Version:

A test suite and interface you can use to implement a IPFS core interface.

3 lines 1.94 MB
(function (root, factory) {(typeof module === 'object' && module.exports) ? module.exports = factory() : root.InterfaceIpfsCore = factory()}(typeof self !== 'undefined' ? self : this, function () { "use strict";var InterfaceIpfsCore=(()=>{var vj=Object.create;var L4=Object.defineProperty;var xj=Object.getOwnPropertyDescriptor;var Ej=Object.getOwnPropertyNames;var _j=Object.getPrototypeOf,Sj=Object.prototype.hasOwnProperty;var Y2=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var Q=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Nt=(e,t)=>{for(var n in t)L4(e,n,{get:t[n],enumerable:!0})},jg=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of Ej(t))!Sj.call(e,l)&&l!==n&&L4(e,l,{get:()=>t[l],enumerable:!(r=xj(t,l))||r.enumerable});return e};var De=(e,t,n)=>(n=e!=null?vj(_j(e)):{},jg(t||!e||!e.__esModule?L4(n,"default",{value:e,enumerable:!0}):n,e)),Aj=e=>jg(L4({},"__esModule",{value:!0}),e);var sb=Q(U4=>{"use strict";U4.byteLength=Mz;U4.toByteArray=Lz;U4.fromByteArray=qz;var I3=[],xr=[],Pz=typeof Uint8Array<"u"?Uint8Array:Array,S9="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(R0=0,ob=S9.length;R0<ob;++R0)I3[R0]=S9[R0],xr[S9.charCodeAt(R0)]=R0;var R0,ob;xr["-".charCodeAt(0)]=62;xr["_".charCodeAt(0)]=63;function ab(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function Mz(e){var t=ab(e),n=t[0],r=t[1];return(n+r)*3/4-r}function Nz(e,t,n){return(t+n)*3/4-n}function Lz(e){var t,n=ab(e),r=n[0],l=n[1],i=new Pz(Nz(e,r,l)),o=0,a=l>0?r-4:r,s;for(s=0;s<a;s+=4)t=xr[e.charCodeAt(s)]<<18|xr[e.charCodeAt(s+1)]<<12|xr[e.charCodeAt(s+2)]<<6|xr[e.charCodeAt(s+3)],i[o++]=t>>16&255,i[o++]=t>>8&255,i[o++]=t&255;return l===2&&(t=xr[e.charCodeAt(s)]<<2|xr[e.charCodeAt(s+1)]>>4,i[o++]=t&255),l===1&&(t=xr[e.charCodeAt(s)]<<10|xr[e.charCodeAt(s+1)]<<4|xr[e.charCodeAt(s+2)]>>2,i[o++]=t>>8&255,i[o++]=t&255),i}function Oz(e){return I3[e>>18&63]+I3[e>>12&63]+I3[e>>6&63]+I3[e&63]}function Fz(e,t,n){for(var r,l=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),l.push(Oz(r));return l.join("")}function qz(e){for(var t,n=e.length,r=n%3,l=[],i=16383,o=0,a=n-r;o<a;o+=i)l.push(Fz(e,o,o+i>a?a:o+i));return r===1?(t=e[n-1],l.push(I3[t>>2]+I3[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],l.push(I3[t>>10]+I3[t>>4&63]+I3[t<<2&63]+"=")),l.join("")}});var ub=Q(A9=>{A9.read=function(e,t,n,r,l){var i,o,a=l*8-r-1,s=(1<<a)-1,u=s>>1,c=-7,f=n?l-1:0,m=n?-1:1,d=e[t+f];for(f+=m,i=d&(1<<-c)-1,d>>=-c,c+=a;c>0;i=i*256+e[t+f],f+=m,c-=8);for(o=i&(1<<-c)-1,i>>=-c,c+=r;c>0;o=o*256+e[t+f],f+=m,c-=8);if(i===0)i=1-u;else{if(i===s)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,r),i=i-u}return(d?-1:1)*o*Math.pow(2,i-r)};A9.write=function(e,t,n,r,l,i){var o,a,s,u=i*8-l-1,c=(1<<u)-1,f=c>>1,m=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,p=r?1:-1,g=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-o))<1&&(o--,s*=2),o+f>=1?t+=m/s:t+=m*Math.pow(2,1-f),t*s>=2&&(o++,s/=2),o+f>=c?(a=0,o=c):o+f>=1?(a=(t*s-1)*Math.pow(2,l),o=o+f):(a=t*Math.pow(2,f-1)*Math.pow(2,l),o=0));l>=8;e[n+d]=a&255,d+=p,a/=256,l-=8);for(o=o<<l|a,u+=l;u>0;e[n+d]=o&255,d+=p,o/=256,u-=8);e[n+d-p]|=g*128}});var Er=Q(ra=>{"use strict";var T9=sb(),ta=ub(),cb=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ra.Buffer=Ie;ra.SlowBuffer=Vz;ra.INSPECT_MAX_BYTES=50;var j4=2147483647;ra.kMaxLength=j4;Ie.TYPED_ARRAY_SUPPORT=Uz();!Ie.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 Uz(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(Ie.prototype,"parent",{enumerable:!0,get:function(){if(Ie.isBuffer(this))return this.buffer}});Object.defineProperty(Ie.prototype,"offset",{enumerable:!0,get:function(){if(Ie.isBuffer(this))return this.byteOffset}});function Sl(e){if(e>j4)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,Ie.prototype),t}function Ie(e,t,n){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return R9(e)}return pb(e,t,n)}Ie.poolSize=8192;function pb(e,t,n){if(typeof e=="string")return zz(e,t);if(ArrayBuffer.isView(e))return $z(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(C3(e,ArrayBuffer)||e&&C3(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(C3(e,SharedArrayBuffer)||e&&C3(e.buffer,SharedArrayBuffer)))return C9(e,t,n);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let r=e.valueOf&&e.valueOf();if(r!=null&&r!==e)return Ie.from(r,t,n);let l=Hz(e);if(l)return l;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return Ie.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}Ie.from=function(e,t,n){return pb(e,t,n)};Object.setPrototypeOf(Ie.prototype,Uint8Array.prototype);Object.setPrototypeOf(Ie,Uint8Array);function mb(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 jz(e,t,n){return mb(e),e<=0?Sl(e):t!==void 0?typeof n=="string"?Sl(e).fill(t,n):Sl(e).fill(t):Sl(e)}Ie.alloc=function(e,t,n){return jz(e,t,n)};function R9(e){return mb(e),Sl(e<0?0:k9(e)|0)}Ie.allocUnsafe=function(e){return R9(e)};Ie.allocUnsafeSlow=function(e){return R9(e)};function zz(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Ie.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let n=yb(e,t)|0,r=Sl(n),l=r.write(e,t);return l!==n&&(r=r.slice(0,l)),r}function I9(e){let t=e.length<0?0:k9(e.length)|0,n=Sl(t);for(let r=0;r<t;r+=1)n[r]=e[r]&255;return n}function $z(e){if(C3(e,Uint8Array)){let t=new Uint8Array(e);return C9(t.buffer,t.byteOffset,t.byteLength)}return I9(e)}function C9(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return t===void 0&&n===void 0?r=new Uint8Array(e):n===void 0?r=new Uint8Array(e,t):r=new Uint8Array(e,t,n),Object.setPrototypeOf(r,Ie.prototype),r}function Hz(e){if(Ie.isBuffer(e)){let t=k9(e.length)|0,n=Sl(t);return n.length===0||e.copy(n,0,0,t),n}if(e.length!==void 0)return typeof e.length!="number"||P9(e.length)?Sl(0):I9(e);if(e.type==="Buffer"&&Array.isArray(e.data))return I9(e.data)}function k9(e){if(e>=j4)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+j4.toString(16)+" bytes");return e|0}function Vz(e){return+e!=e&&(e=0),Ie.alloc(+e)}Ie.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==Ie.prototype};Ie.compare=function(t,n){if(C3(t,Uint8Array)&&(t=Ie.from(t,t.offset,t.byteLength)),C3(n,Uint8Array)&&(n=Ie.from(n,n.offset,n.byteLength)),!Ie.isBuffer(t)||!Ie.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===n)return 0;let r=t.length,l=n.length;for(let i=0,o=Math.min(r,l);i<o;++i)if(t[i]!==n[i]){r=t[i],l=n[i];break}return r<l?-1:l<r?1:0};Ie.isEncoding=function(t){switch(String(t).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}};Ie.concat=function(t,n){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return Ie.alloc(0);let r;if(n===void 0)for(n=0,r=0;r<t.length;++r)n+=t[r].length;let l=Ie.allocUnsafe(n),i=0;for(r=0;r<t.length;++r){let o=t[r];if(C3(o,Uint8Array))i+o.length>l.length?(Ie.isBuffer(o)||(o=Ie.from(o)),o.copy(l,i)):Uint8Array.prototype.set.call(l,o,i);else if(Ie.isBuffer(o))o.copy(l,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return l};function yb(e,t){if(Ie.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||C3(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 n=e.length,r=arguments.length>2&&arguments[2]===!0;if(!r&&n===0)return 0;let l=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return D9(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n*2;case"hex":return n>>>1;case"base64":return Ab(e).length;default:if(l)return r?-1:D9(e).length;t=(""+t).toLowerCase(),l=!0}}Ie.byteLength=yb;function Kz(e,t,n){let r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return n$(this,t,n);case"utf8":case"utf-8":return bb(this,t,n);case"ascii":return e$(this,t,n);case"latin1":case"binary":return t$(this,t,n);case"base64":return Jz(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r$(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}Ie.prototype._isBuffer=!0;function k0(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}Ie.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let n=0;n<t;n+=2)k0(this,n,n+1);return this};Ie.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let n=0;n<t;n+=4)k0(this,n,n+3),k0(this,n+1,n+2);return this};Ie.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let n=0;n<t;n+=8)k0(this,n,n+7),k0(this,n+1,n+6),k0(this,n+2,n+5),k0(this,n+3,n+4);return this};Ie.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?bb(this,0,t):Kz.apply(this,arguments)};Ie.prototype.toLocaleString=Ie.prototype.toString;Ie.prototype.equals=function(t){if(!Ie.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:Ie.compare(this,t)===0};Ie.prototype.inspect=function(){let t="",n=ra.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"};cb&&(Ie.prototype[cb]=Ie.prototype.inspect);Ie.prototype.compare=function(t,n,r,l,i){if(C3(t,Uint8Array)&&(t=Ie.from(t,t.offset,t.byteLength)),!Ie.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(n===void 0&&(n=0),r===void 0&&(r=t?t.length:0),l===void 0&&(l=0),i===void 0&&(i=this.length),n<0||r>t.length||l<0||i>this.length)throw new RangeError("out of range index");if(l>=i&&n>=r)return 0;if(l>=i)return-1;if(n>=r)return 1;if(n>>>=0,r>>>=0,l>>>=0,i>>>=0,this===t)return 0;let o=i-l,a=r-n,s=Math.min(o,a),u=this.slice(l,i),c=t.slice(n,r);for(let f=0;f<s;++f)if(u[f]!==c[f]){o=u[f],a=c[f];break}return o<a?-1:a<o?1:0};function gb(e,t,n,r,l){if(e.length===0)return-1;if(typeof n=="string"?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,P9(n)&&(n=l?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(l)return-1;n=e.length-1}else if(n<0)if(l)n=0;else return-1;if(typeof t=="string"&&(t=Ie.from(t,r)),Ie.isBuffer(t))return t.length===0?-1:fb(e,t,n,r,l);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?l?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):fb(e,[t],n,r,l);throw new TypeError("val must be string, number or Buffer")}function fb(e,t,n,r,l){let i=1,o=e.length,a=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le")){if(e.length<2||t.length<2)return-1;i=2,o/=2,a/=2,n/=2}function s(c,f){return i===1?c[f]:c.readUInt16BE(f*i)}let u;if(l){let c=-1;for(u=n;u<o;u++)if(s(e,u)===s(t,c===-1?0:u-c)){if(c===-1&&(c=u),u-c+1===a)return c*i}else c!==-1&&(u-=u-c),c=-1}else for(n+a>o&&(n=o-a),u=n;u>=0;u--){let c=!0;for(let f=0;f<a;f++)if(s(e,u+f)!==s(t,f)){c=!1;break}if(c)return u}return-1}Ie.prototype.includes=function(t,n,r){return this.indexOf(t,n,r)!==-1};Ie.prototype.indexOf=function(t,n,r){return gb(this,t,n,r,!0)};Ie.prototype.lastIndexOf=function(t,n,r){return gb(this,t,n,r,!1)};function Wz(e,t,n,r){n=Number(n)||0;let l=e.length-n;r?(r=Number(r),r>l&&(r=l)):r=l;let i=t.length;r>i/2&&(r=i/2);let o;for(o=0;o<r;++o){let a=parseInt(t.substr(o*2,2),16);if(P9(a))return o;e[n+o]=a}return o}function Gz(e,t,n,r){return z4(D9(t,e.length-n),e,n,r)}function Xz(e,t,n,r){return z4(a$(t),e,n,r)}function Yz(e,t,n,r){return z4(Ab(t),e,n,r)}function Zz(e,t,n,r){return z4(s$(t,e.length-n),e,n,r)}Ie.prototype.write=function(t,n,r,l){if(n===void 0)l="utf8",r=this.length,n=0;else if(r===void 0&&typeof n=="string")l=n,r=this.length,n=0;else if(isFinite(n))n=n>>>0,isFinite(r)?(r=r>>>0,l===void 0&&(l="utf8")):(l=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-n;if((r===void 0||r>i)&&(r=i),t.length>0&&(r<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");l||(l="utf8");let o=!1;for(;;)switch(l){case"hex":return Wz(this,t,n,r);case"utf8":case"utf-8":return Gz(this,t,n,r);case"ascii":case"latin1":case"binary":return Xz(this,t,n,r);case"base64":return Yz(this,t,n,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Zz(this,t,n,r);default:if(o)throw new TypeError("Unknown encoding: "+l);l=(""+l).toLowerCase(),o=!0}};Ie.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Jz(e,t,n){return t===0&&n===e.length?T9.fromByteArray(e):T9.fromByteArray(e.slice(t,n))}function bb(e,t,n){n=Math.min(e.length,n);let r=[],l=t;for(;l<n;){let i=e[l],o=null,a=i>239?4:i>223?3:i>191?2:1;if(l+a<=n){let s,u,c,f;switch(a){case 1:i<128&&(o=i);break;case 2:s=e[l+1],(s&192)===128&&(f=(i&31)<<6|s&63,f>127&&(o=f));break;case 3:s=e[l+1],u=e[l+2],(s&192)===128&&(u&192)===128&&(f=(i&15)<<12|(s&63)<<6|u&63,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:s=e[l+1],u=e[l+2],c=e[l+3],(s&192)===128&&(u&192)===128&&(c&192)===128&&(f=(i&15)<<18|(s&63)<<12|(u&63)<<6|c&63,f>65535&&f<1114112&&(o=f))}}o===null?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|o&1023),r.push(o),l+=a}return Qz(r)}var db=4096;function Qz(e){let t=e.length;if(t<=db)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=db));return n}function e$(e,t,n){let r="";n=Math.min(e.length,n);for(let l=t;l<n;++l)r+=String.fromCharCode(e[l]&127);return r}function t$(e,t,n){let r="";n=Math.min(e.length,n);for(let l=t;l<n;++l)r+=String.fromCharCode(e[l]);return r}function n$(e,t,n){let r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let l="";for(let i=t;i<n;++i)l+=u$[e[i]];return l}function r$(e,t,n){let r=e.slice(t,n),l="";for(let i=0;i<r.length-1;i+=2)l+=String.fromCharCode(r[i]+r[i+1]*256);return l}Ie.prototype.slice=function(t,n){let r=this.length;t=~~t,n=n===void 0?r:~~n,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),n<0?(n+=r,n<0&&(n=0)):n>r&&(n=r),n<t&&(n=t);let l=this.subarray(t,n);return Object.setPrototypeOf(l,Ie.prototype),l};function Qn(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}Ie.prototype.readUintLE=Ie.prototype.readUIntLE=function(t,n,r){t=t>>>0,n=n>>>0,r||Qn(t,n,this.length);let l=this[t],i=1,o=0;for(;++o<n&&(i*=256);)l+=this[t+o]*i;return l};Ie.prototype.readUintBE=Ie.prototype.readUIntBE=function(t,n,r){t=t>>>0,n=n>>>0,r||Qn(t,n,this.length);let l=this[t+--n],i=1;for(;n>0&&(i*=256);)l+=this[t+--n]*i;return l};Ie.prototype.readUint8=Ie.prototype.readUInt8=function(t,n){return t=t>>>0,n||Qn(t,1,this.length),this[t]};Ie.prototype.readUint16LE=Ie.prototype.readUInt16LE=function(t,n){return t=t>>>0,n||Qn(t,2,this.length),this[t]|this[t+1]<<8};Ie.prototype.readUint16BE=Ie.prototype.readUInt16BE=function(t,n){return t=t>>>0,n||Qn(t,2,this.length),this[t]<<8|this[t+1]};Ie.prototype.readUint32LE=Ie.prototype.readUInt32LE=function(t,n){return t=t>>>0,n||Qn(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};Ie.prototype.readUint32BE=Ie.prototype.readUInt32BE=function(t,n){return t=t>>>0,n||Qn(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};Ie.prototype.readBigUInt64LE=pi(function(t){t=t>>>0,na(t,"offset");let n=this[t],r=this[t+7];(n===void 0||r===void 0)&&as(t,this.length-8);let l=n+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,i=this[++t]+this[++t]*2**8+this[++t]*2**16+r*2**24;return BigInt(l)+(BigInt(i)<<BigInt(32))});Ie.prototype.readBigUInt64BE=pi(function(t){t=t>>>0,na(t,"offset");let n=this[t],r=this[t+7];(n===void 0||r===void 0)&&as(t,this.length-8);let l=n*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],i=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+r;return(BigInt(l)<<BigInt(32))+BigInt(i)});Ie.prototype.readIntLE=function(t,n,r){t=t>>>0,n=n>>>0,r||Qn(t,n,this.length);let l=this[t],i=1,o=0;for(;++o<n&&(i*=256);)l+=this[t+o]*i;return i*=128,l>=i&&(l-=Math.pow(2,8*n)),l};Ie.prototype.readIntBE=function(t,n,r){t=t>>>0,n=n>>>0,r||Qn(t,n,this.length);let l=n,i=1,o=this[t+--l];for(;l>0&&(i*=256);)o+=this[t+--l]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*n)),o};Ie.prototype.readInt8=function(t,n){return t=t>>>0,n||Qn(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};Ie.prototype.readInt16LE=function(t,n){t=t>>>0,n||Qn(t,2,this.length);let r=this[t]|this[t+1]<<8;return r&32768?r|4294901760:r};Ie.prototype.readInt16BE=function(t,n){t=t>>>0,n||Qn(t,2,this.length);let r=this[t+1]|this[t]<<8;return r&32768?r|4294901760:r};Ie.prototype.readInt32LE=function(t,n){return t=t>>>0,n||Qn(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};Ie.prototype.readInt32BE=function(t,n){return t=t>>>0,n||Qn(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};Ie.prototype.readBigInt64LE=pi(function(t){t=t>>>0,na(t,"offset");let n=this[t],r=this[t+7];(n===void 0||r===void 0)&&as(t,this.length-8);let l=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(r<<24);return(BigInt(l)<<BigInt(32))+BigInt(n+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});Ie.prototype.readBigInt64BE=pi(function(t){t=t>>>0,na(t,"offset");let n=this[t],r=this[t+7];(n===void 0||r===void 0)&&as(t,this.length-8);let l=(n<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(l)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+r)});Ie.prototype.readFloatLE=function(t,n){return t=t>>>0,n||Qn(t,4,this.length),ta.read(this,t,!0,23,4)};Ie.prototype.readFloatBE=function(t,n){return t=t>>>0,n||Qn(t,4,this.length),ta.read(this,t,!1,23,4)};Ie.prototype.readDoubleLE=function(t,n){return t=t>>>0,n||Qn(t,8,this.length),ta.read(this,t,!0,52,8)};Ie.prototype.readDoubleBE=function(t,n){return t=t>>>0,n||Qn(t,8,this.length),ta.read(this,t,!1,52,8)};function F2(e,t,n,r,l,i){if(!Ie.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>l||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}Ie.prototype.writeUintLE=Ie.prototype.writeUIntLE=function(t,n,r,l){if(t=+t,n=n>>>0,r=r>>>0,!l){let a=Math.pow(2,8*r)-1;F2(this,t,n,r,a,0)}let i=1,o=0;for(this[n]=t&255;++o<r&&(i*=256);)this[n+o]=t/i&255;return n+r};Ie.prototype.writeUintBE=Ie.prototype.writeUIntBE=function(t,n,r,l){if(t=+t,n=n>>>0,r=r>>>0,!l){let a=Math.pow(2,8*r)-1;F2(this,t,n,r,a,0)}let i=r-1,o=1;for(this[n+i]=t&255;--i>=0&&(o*=256);)this[n+i]=t/o&255;return n+r};Ie.prototype.writeUint8=Ie.prototype.writeUInt8=function(t,n,r){return t=+t,n=n>>>0,r||F2(this,t,n,1,255,0),this[n]=t&255,n+1};Ie.prototype.writeUint16LE=Ie.prototype.writeUInt16LE=function(t,n,r){return t=+t,n=n>>>0,r||F2(this,t,n,2,65535,0),this[n]=t&255,this[n+1]=t>>>8,n+2};Ie.prototype.writeUint16BE=Ie.prototype.writeUInt16BE=function(t,n,r){return t=+t,n=n>>>0,r||F2(this,t,n,2,65535,0),this[n]=t>>>8,this[n+1]=t&255,n+2};Ie.prototype.writeUint32LE=Ie.prototype.writeUInt32LE=function(t,n,r){return t=+t,n=n>>>0,r||F2(this,t,n,4,4294967295,0),this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=t&255,n+4};Ie.prototype.writeUint32BE=Ie.prototype.writeUInt32BE=function(t,n,r){return t=+t,n=n>>>0,r||F2(this,t,n,4,4294967295,0),this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=t&255,n+4};function wb(e,t,n,r,l){Sb(t,r,l,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i=i>>8,e[n++]=i,i=i>>8,e[n++]=i,i=i>>8,e[n++]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o=o>>8,e[n++]=o,o=o>>8,e[n++]=o,o=o>>8,e[n++]=o,n}function vb(e,t,n,r,l){Sb(t,r,l,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i=i>>8,e[n+6]=i,i=i>>8,e[n+5]=i,i=i>>8,e[n+4]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o=o>>8,e[n+2]=o,o=o>>8,e[n+1]=o,o=o>>8,e[n]=o,n+8}Ie.prototype.writeBigUInt64LE=pi(function(t,n=0){return wb(this,t,n,BigInt(0),BigInt("0xffffffffffffffff"))});Ie.prototype.writeBigUInt64BE=pi(function(t,n=0){return vb(this,t,n,BigInt(0),BigInt("0xffffffffffffffff"))});Ie.prototype.writeIntLE=function(t,n,r,l){if(t=+t,n=n>>>0,!l){let s=Math.pow(2,8*r-1);F2(this,t,n,r,s-1,-s)}let i=0,o=1,a=0;for(this[n]=t&255;++i<r&&(o*=256);)t<0&&a===0&&this[n+i-1]!==0&&(a=1),this[n+i]=(t/o>>0)-a&255;return n+r};Ie.prototype.writeIntBE=function(t,n,r,l){if(t=+t,n=n>>>0,!l){let s=Math.pow(2,8*r-1);F2(this,t,n,r,s-1,-s)}let i=r-1,o=1,a=0;for(this[n+i]=t&255;--i>=0&&(o*=256);)t<0&&a===0&&this[n+i+1]!==0&&(a=1),this[n+i]=(t/o>>0)-a&255;return n+r};Ie.prototype.writeInt8=function(t,n,r){return t=+t,n=n>>>0,r||F2(this,t,n,1,127,-128),t<0&&(t=255+t+1),this[n]=t&255,n+1};Ie.prototype.writeInt16LE=function(t,n,r){return t=+t,n=n>>>0,r||F2(this,t,n,2,32767,-32768),this[n]=t&255,this[n+1]=t>>>8,n+2};Ie.prototype.writeInt16BE=function(t,n,r){return t=+t,n=n>>>0,r||F2(this,t,n,2,32767,-32768),this[n]=t>>>8,this[n+1]=t&255,n+2};Ie.prototype.writeInt32LE=function(t,n,r){return t=+t,n=n>>>0,r||F2(this,t,n,4,2147483647,-2147483648),this[n]=t&255,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24,n+4};Ie.prototype.writeInt32BE=function(t,n,r){return t=+t,n=n>>>0,r||F2(this,t,n,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=t&255,n+4};Ie.prototype.writeBigInt64LE=pi(function(t,n=0){return wb(this,t,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});Ie.prototype.writeBigInt64BE=pi(function(t,n=0){return vb(this,t,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function xb(e,t,n,r,l,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Eb(e,t,n,r,l){return t=+t,n=n>>>0,l||xb(e,t,n,4,34028234663852886e22,-34028234663852886e22),ta.write(e,t,n,r,23,4),n+4}Ie.prototype.writeFloatLE=function(t,n,r){return Eb(this,t,n,!0,r)};Ie.prototype.writeFloatBE=function(t,n,r){return Eb(this,t,n,!1,r)};function _b(e,t,n,r,l){return t=+t,n=n>>>0,l||xb(e,t,n,8,17976931348623157e292,-17976931348623157e292),ta.write(e,t,n,r,52,8),n+8}Ie.prototype.writeDoubleLE=function(t,n,r){return _b(this,t,n,!0,r)};Ie.prototype.writeDoubleBE=function(t,n,r){return _b(this,t,n,!1,r)};Ie.prototype.copy=function(t,n,r,l){if(!Ie.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),!l&&l!==0&&(l=this.length),n>=t.length&&(n=t.length),n||(n=0),l>0&&l<r&&(l=r),l===r||t.length===0||this.length===0)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(l<0)throw new RangeError("sourceEnd out of bounds");l>this.length&&(l=this.length),t.length-n<l-r&&(l=t.length-n+r);let i=l-r;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(n,r,l):Uint8Array.prototype.set.call(t,this.subarray(r,l),n),i};Ie.prototype.fill=function(t,n,r,l){if(typeof t=="string"){if(typeof n=="string"?(l=n,n=0,r=this.length):typeof r=="string"&&(l=r,r=this.length),l!==void 0&&typeof l!="string")throw new TypeError("encoding must be a string");if(typeof l=="string"&&!Ie.isEncoding(l))throw new TypeError("Unknown encoding: "+l);if(t.length===1){let o=t.charCodeAt(0);(l==="utf8"&&o<128||l==="latin1")&&(t=o)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(n<0||this.length<n||this.length<r)throw new RangeError("Out of range index");if(r<=n)return this;n=n>>>0,r=r===void 0?this.length:r>>>0,t||(t=0);let i;if(typeof t=="number")for(i=n;i<r;++i)this[i]=t;else{let o=Ie.isBuffer(t)?t:Ie.from(t,l),a=o.length;if(a===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-n;++i)this[i+n]=o[i%a]}return this};var ea={};function B9(e,t,n){ea[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(l){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:l,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}B9("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);B9("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);B9("ERR_OUT_OF_RANGE",function(e,t,n){let r=`The value of "${e}" is out of range.`,l=n;return Number.isInteger(n)&&Math.abs(n)>2**32?l=hb(String(n)):typeof n=="bigint"&&(l=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(l=hb(l)),l+="n"),r+=` It must be ${t}. Received ${l}`,r},RangeError);function hb(e){let t="",n=e.length,r=e[0]==="-"?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function l$(e,t,n){na(t,"offset"),(e[t]===void 0||e[t+n]===void 0)&&as(t,e.length-(n+1))}function Sb(e,t,n,r,l,i){if(e>n||e<t){let o=typeof t=="bigint"?"n":"",a;throw i>3?t===0||t===BigInt(0)?a=`>= 0${o} and < 2${o} ** ${(i+1)*8}${o}`:a=`>= -(2${o} ** ${(i+1)*8-1}${o}) and < 2 ** ${(i+1)*8-1}${o}`:a=`>= ${t}${o} and <= ${n}${o}`,new ea.ERR_OUT_OF_RANGE("value",a,e)}l$(r,l,i)}function na(e,t){if(typeof e!="number")throw new ea.ERR_INVALID_ARG_TYPE(t,"number",e)}function as(e,t,n){throw Math.floor(e)!==e?(na(e,n),new ea.ERR_OUT_OF_RANGE(n||"offset","an integer",e)):t<0?new ea.ERR_BUFFER_OUT_OF_BOUNDS:new ea.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}var i$=/[^+/0-9A-Za-z-_]/g;function o$(e){if(e=e.split("=")[0],e=e.trim().replace(i$,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function D9(e,t){t=t||1/0;let n,r=e.length,l=null,i=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!l){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(o+1===r){(t-=3)>-1&&i.push(239,191,189);continue}l=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),l=n;continue}n=(l-55296<<10|n-56320)+65536}else l&&(t-=3)>-1&&i.push(239,191,189);if(l=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return i}function a$(e){let t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function s$(e,t){let n,r,l,i=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,l=n%256,i.push(l),i.push(r);return i}function Ab(e){return T9.toByteArray(o$(e))}function z4(e,t,n,r){let l;for(l=0;l<r&&!(l+n>=t.length||l>=e.length);++l)t[l+n]=e[l];return l}function C3(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function P9(e){return e!==e}var u$=function(){let e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){let r=n*16;for(let l=0;l<16;++l)t[r+l]=e[n]+e[l]}return t}();function pi(e){return typeof BigInt>"u"?c$:e}function c$(){throw new Error("BigInt not supported")}});var Gn=Q((m6e,Tb)=>{"use strict";Tb.exports={ArrayIsArray(e){return Array.isArray(e)},ArrayPrototypeIncludes(e,t){return e.includes(t)},ArrayPrototypeIndexOf(e,t){return e.indexOf(t)},ArrayPrototypeJoin(e,t){return e.join(t)},ArrayPrototypeMap(e,t){return e.map(t)},ArrayPrototypePop(e,t){return e.pop(t)},ArrayPrototypePush(e,t){return e.push(t)},ArrayPrototypeSlice(e,t,n){return e.slice(t,n)},Error,FunctionPrototypeCall(e,t,...n){return e.call(t,...n)},FunctionPrototypeSymbolHasInstance(e,t){return Function.prototype[Symbol.hasInstance].call(e,t)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(e,t){return Object.defineProperties(e,t)},ObjectDefineProperty(e,t,n){return Object.defineProperty(e,t,n)},ObjectGetOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)},ObjectKeys(e){return Object.keys(e)},ObjectSetPrototypeOf(e,t){return Object.setPrototypeOf(e,t)},Promise,PromisePrototypeCatch(e,t){return e.catch(t)},PromisePrototypeThen(e,t,n){return e.then(t,n)},PromiseReject(e){return Promise.reject(e)},ReflectApply:Reflect.apply,RegExpPrototypeTest(e,t){return e.test(t)},SafeSet:Set,String,StringPrototypeSlice(e,t,n){return e.slice(t,n)},StringPrototypeToLowerCase(e){return e.toLowerCase()},StringPrototypeToUpperCase(e){return e.toUpperCase()},StringPrototypeTrim(e){return e.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(e,t,n){return e.set(t,n)},Uint8Array}});var D3=Q((y6e,N9)=>{"use strict";var f$=Er(),d$=Object.getPrototypeOf(async function(){}).constructor,Ib=globalThis.Blob||f$.Blob,h$=typeof Ib<"u"?function(t){return t instanceof Ib}:function(t){return!1},M9=class extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError(`Expected input to be an Array, got ${typeof t}`);let n="";for(let r=0;r<t.length;r++)n+=` ${t[r].stack} `;super(n),this.name="AggregateError",this.errors=t}};N9.exports={AggregateError:M9,kEmptyObject:Object.freeze({}),once(e){let t=!1;return function(...n){t||(t=!0,e.apply(this,n))}},createDeferredPromise:function(){let e,t;return{promise:new Promise((r,l)=>{e=r,t=l}),resolve:e,reject:t}},promisify(e){return new Promise((t,n)=>{e((r,...l)=>r?n(r):t(...l))})},debuglog(){return function(){}},format(e,...t){return e.replace(/%([sdifj])/g,function(...[n,r]){let l=t.shift();return r==="f"?l.toFixed(6):r==="j"?JSON.stringify(l):r==="s"&&typeof l=="object"?`${l.constructor!==Object?l.constructor.name:""} {}`.trim():l.toString()})},inspect(e){switch(typeof e){case"string":if(e.includes("'"))if(e.includes('"')){if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}else return`"${e}"`;return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction(e){return e instanceof d$},isArrayBufferView(e){return ArrayBuffer.isView(e)}},isBlob:h$};N9.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")});var H4=Q((g6e,$4)=>{"use strict";var{AbortController:Cb,AbortSignal:p$}=typeof self<"u"?self:typeof window<"u"?window:void 0;$4.exports=Cb;$4.exports.AbortSignal=p$;$4.exports.default=Cb});var D2=Q((b6e,kb)=>{"use strict";var{format:m$,inspect:V4,AggregateError:y$}=D3(),g$=globalThis.AggregateError||y$,b$=Symbol("kIsNodeError"),w$=["string","function","number","object","Function","Object","boolean","bigint","symbol"],v$=/^([A-Z][a-z0-9]*)+$/,x$="__node_internal_",K4={};function B0(e,t){if(!e)throw new K4.ERR_INTERNAL_ASSERTION(t)}function Db(e){let t="",n=e.length,r=e[0]==="-"?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function E$(e,t,n){if(typeof t=="function")return B0(t.length<=n.length,`Code: ${e}; The provided arguments length (${n.length}) does not match the required ones (${t.length}).`),t(...n);let r=(t.match(/%[dfijoOs]/g)||[]).length;return B0(r===n.length,`Code: ${e}; The provided arguments length (${n.length}) does not match the required ones (${r}).`),n.length===0?t:m$(t,...n)}function m2(e,t,n){n||(n=Error);class r extends n{constructor(...i){super(E$(e,t,i))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(r.prototype,{name:{value:n.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),r.prototype.code=e,r.prototype[b$]=!0,K4[e]=r}function Rb(e){let t=x$+e.name;return Object.defineProperty(e,"name",{value:t}),e}function _$(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;let n=new g$([t,e],t.message);return n.code=t.code,n}return e||t}var L9=class extends Error{constructor(t="The operation was aborted",n=void 0){if(n!==void 0&&typeof n!="object")throw new K4.ERR_INVALID_ARG_TYPE("options","Object",n);super(t,n),this.code="ABORT_ERR",this.name="AbortError"}};m2("ERR_ASSERTION","%s",Error);m2("ERR_INVALID_ARG_TYPE",(e,t,n)=>{B0(typeof e=="string","'name' must be a string"),Array.isArray(t)||(t=[t]);let r="The ";e.endsWith(" argument")?r+=`${e} `:r+=`"${e}" ${e.includes(".")?"property":"argument"} `,r+="must be ";let l=[],i=[],o=[];for(let s of t)B0(typeof s=="string","All expected entries have to be of type string"),w$.includes(s)?l.push(s.toLowerCase()):v$.test(s)?i.push(s):(B0(s!=="object",'The value "object" should be written as "Object"'),o.push(s));if(i.length>0){let s=l.indexOf("object");s!==-1&&(l.splice(l,s,1),i.push("Object"))}if(l.length>0){switch(l.length){case 1:r+=`of type ${l[0]}`;break;case 2:r+=`one of type ${l[0]} or ${l[1]}`;break;default:{let s=l.pop();r+=`one of type ${l.join(", ")}, or ${s}`}}(i.length>0||o.length>0)&&(r+=" or ")}if(i.length>0){switch(i.length){case 1:r+=`an instance of ${i[0]}`;break;case 2:r+=`an instance of ${i[0]} or ${i[1]}`;break;default:{let s=i.pop();r+=`an instance of ${i.join(", ")}, or ${s}`}}o.length>0&&(r+=" or ")}switch(o.length){case 0:break;case 1:o[0].toLowerCase()!==o[0]&&(r+="an "),r+=`${o[0]}`;break;case 2:r+=`one of ${o[0]} or ${o[1]}`;break;default:{let s=o.pop();r+=`one of ${o.join(", ")}, or ${s}`}}if(n==null)r+=`. Received ${n}`;else if(typeof n=="function"&&n.name)r+=`. Received function ${n.name}`;else if(typeof n=="object"){var a;if((a=n.constructor)!==null&&a!==void 0&&a.name)r+=`. Received an instance of ${n.constructor.name}`;else{let s=V4(n,{depth:-1});r+=`. Received ${s}`}}else{let s=V4(n,{colors:!1});s.length>25&&(s=`${s.slice(0,25)}...`),r+=`. Received type ${typeof n} (${s})`}return r},TypeError);m2("ERR_INVALID_ARG_VALUE",(e,t,n="is invalid")=>{let r=V4(t);return r.length>128&&(r=r.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${n}. Received ${r}`},TypeError);m2("ERR_INVALID_RETURN_VALUE",(e,t,n)=>{var r;let l=n!=null&&(r=n.constructor)!==null&&r!==void 0&&r.name?`instance of ${n.constructor.name}`:`type ${typeof n}`;return`Expected ${e} to be returned from the "${t}" function but got ${l}.`},TypeError);m2("ERR_MISSING_ARGS",(...e)=>{B0(e.length>0,"At least one arg needs to be specified");let t,n=e.length;switch(e=(Array.isArray(e)?e:[e]).map(r=>`"${r}"`).join(" or "),n){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{let r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}break}return`${t} must be specified`},TypeError);m2("ERR_OUT_OF_RANGE",(e,t,n)=>{B0(t,'Missing "range" argument');let r;return Number.isInteger(n)&&Math.abs(n)>2**32?r=Db(String(n)):typeof n=="bigint"?(r=String(n),(n>2n**32n||n<-(2n**32n))&&(r=Db(r)),r+="n"):r=V4(n),`The value of "${e}" is out of range. It must be ${t}. Received ${r}`},RangeError);m2("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error);m2("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error);m2("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error);m2("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error);m2("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error);m2("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);m2("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error);m2("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error);m2("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error);m2("ERR_STREAM_WRITE_AFTER_END","write after end",Error);m2("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);kb.exports={AbortError:L9,aggregateTwoErrors:Rb(_$),hideStackFrames:Rb,codes:K4}});var ss=Q((w6e,Ub)=>{"use strict";var{ArrayIsArray:F9,ArrayPrototypeIncludes:Nb,ArrayPrototypeJoin:Lb,ArrayPrototypeMap:S$,NumberIsInteger:q9,NumberIsNaN:A$,NumberMAX_SAFE_INTEGER:T$,NumberMIN_SAFE_INTEGER:I$,NumberParseInt:C$,ObjectPrototypeHasOwnProperty:D$,RegExpPrototypeExec:Ob,String:R$,StringPrototypeToUpperCase:k$,StringPrototypeTrim:B$}=Gn(),{hideStackFrames:_r,codes:{ERR_SOCKET_BAD_PORT:P$,ERR_INVALID_ARG_TYPE:R2,ERR_INVALID_ARG_VALUE:la,ERR_OUT_OF_RANGE:P0,ERR_UNKNOWN_SIGNAL:Bb}}=D2(),{normalizeEncoding:M$}=D3(),{isAsyncFunction:N$,isArrayBufferView:L$}=D3().types,Pb={};function O$(e){return e===(e|0)}function F$(e){return e===e>>>0}var q$=/^[0-7]+$/,U$="must be a 32-bit unsigned integer or an octal string";function j$(e,t,n){if(typeof e>"u"&&(e=n),typeof e=="string"){if(Ob(q$,e)===null)throw new la(t,e,U$);e=C$(e,8)}return Fb(e,t),e}var z$=_r((e,t,n=I$,r=T$)=>{if(typeof e!="number")throw new R2(t,"number",e);if(!q9(e))throw new P0(t,"an integer",e);if(e<n||e>r)throw new P0(t,`>= ${n} && <= ${r}`,e)}),$$=_r((e,t,n=-2147483648,r=2147483647)=>{if(typeof e!="number")throw new R2(t,"number",e);if(!q9(e))throw new P0(t,"an integer",e);if(e<n||e>r)throw new P0(t,`>= ${n} && <= ${r}`,e)}),Fb=_r((e,t,n=!1)=>{if(typeof e!="number")throw new R2(t,"number",e);if(!q9(e))throw new P0(t,"an integer",e);let r=n?1:0,l=4294967295;if(e<r||e>l)throw new P0(t,`>= ${r} && <= ${l}`,e)});function U9(e,t){if(typeof e!="string")throw new R2(t,"string",e)}function H$(e,t,n=void 0,r){if(typeof e!="number")throw new R2(t,"number",e);if(n!=null&&e<n||r!=null&&e>r||(n!=null||r!=null)&&A$(e))throw new P0(t,`${n!=null?`>= ${n}`:""}${n!=null&&r!=null?" && ":""}${r!=null?`<= ${r}`:""}`,e)}var V$=_r((e,t,n)=>{if(!Nb(n,e)){let l="must be one of: "+Lb(S$(n,i=>typeof i=="string"?`'${i}'`:R$(i)),", ");throw new la(t,e,l)}});function qb(e,t){if(typeof e!="boolean")throw new R2(t,"boolean",e)}function O9(e,t,n){return e==null||!D$(e,t)?n:e[t]}var K$=_r((e,t,n=null)=>{let r=O9(n,"allowArray",!1),l=O9(n,"allowFunction",!1);if(!O9(n,"nullable",!1)&&e===null||!r&&F9(e)||typeof e!="object"&&(!l||typeof e!="function"))throw new R2(t,"Object",e)}),W$=_r((e,t)=>{if(e!=null&&typeof e!="object"&&typeof e!="function")throw new R2(t,"a dictionary",e)}),j9=_r((e,t,n=0)=>{if(!F9(e))throw new R2(t,"Array",e);if(e.length<n){let r=`must be longer than ${n}`;throw new la(t,e,r)}});function G$(e,t){j9(e,t);for(let n=0;n<e.length;n++)U9(e[n],`${t}[${n}]`)}function X$(e,t){j9(e,t);for(let n=0;n<e.length;n++)qb(e[n],`${t}[${n}]`)}function Y$(e,t="signal"){if(U9(e,t),Pb[e]===void 0)throw Pb[k$(e)]!==void 0?new Bb(e+" (signals must use all capital letters)"):new Bb(e)}var Z$=_r((e,t="buffer")=>{if(!L$(e))throw new R2(t,["Buffer","TypedArray","DataView"],e)});function J$(e,t){let n=M$(t),r=e.length;if(n==="hex"&&r%2!==0)throw new la("encoding",t,`is invalid for data of length ${r}`)}function Q$(e,t="Port",n=!0){if(typeof e!="number"&&typeof e!="string"||typeof e=="string"&&B$(e).length===0||+e!==+e>>>0||e>65535||e===0&&!n)throw new P$(t,e,n);return e|0}var eH=_r((e,t)=>{if(e!==void 0&&(e===null||typeof e!="object"||!("aborted"in e)))throw new R2(t,"AbortSignal",e)}),tH=_r((e,t)=>{if(typeof e!="function")throw new R2(t,"Function",e)}),nH=_r((e,t)=>{if(typeof e!="function"||N$(e))throw new R2(t,"Function",e)}),rH=_r((e,t)=>{if(e!==void 0)throw new R2(t,"undefined",e)});function lH(e,t,n){if(!Nb(n,e))throw new R2(t,`('${Lb(n,"|")}')`,e)}var iH=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function Mb(e,t){if(typeof e>"u"||!Ob(iH,e))throw new la(t,e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function oH(e){if(typeof e=="string")return Mb(e,"hints"),e;if(F9(e)){let t=e.length,n="";if(t===0)return n;for(let r=0;r<t;r++){let l=e[r];Mb(l,"hints"),n+=l,r!==t-1&&(n+=", ")}return n}throw new la("hints",e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}Ub.exports={isInt32:O$,isUint32:F$,parseFileMode:j$,validateArray:j9,validateStringArray:G$,validateBooleanArray:X$,validateBoolean:qb,validateBuffer:Z$,validateDictionary:W$,validateEncoding:J$,validateFunction:tH,validateInt32:$$,validateInteger:z$,validateNumber:H$,validateObject:K$,validateOneOf:V$,validatePlainFunction:nH,validatePort:Q$,validateSignalName:Y$,validateString:U9,validateUint32:Fb,validateUndefined:rH,validateUnion:lH,validateAbortSignal:eH,validateLinkHeaderValue:oH}});var mi=Q((v6e,Hb)=>{var qn=Hb.exports={},R3,k3;function z9(){throw new Error("setTimeout has not been defined")}function $9(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?R3=setTimeout:R3=z9}catch{R3=z9}try{typeof clearTimeout=="function"?k3=clearTimeout:k3=$9}catch{k3=$9}})();function jb(e){if(R3===setTimeout)return setTimeout(e,0);if((R3===z9||!R3)&&setTimeout)return R3=setTimeout,setTimeout(e,0);try{return R3(e,0)}catch{try{return R3.call(null,e,0)}catch{return R3.call(this,e,0)}}}function aH(e){if(k3===clearTimeout)return clearTimeout(e);if((k3===$9||!k3)&&clearTimeout)return k3=clearTimeout,clearTimeout(e);try{return k3(e)}catch{try{return k3.call(null,e)}catch{return k3.call(this,e)}}}var Al=[],ia=!1,M0,W4=-1;function sH(){!ia||!M0||(ia=!1,M0.length?Al=M0.concat(Al):W4=-1,Al.length&&zb())}function zb(){if(!ia){var e=jb(sH);ia=!0;for(var t=Al.length;t;){for(M0=Al,Al=[];++W4<t;)M0&&M0[W4].run();W4=-1,t=Al.length}M0=null,ia=!1,aH(e)}}qn.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Al.push(new $b(e,t)),Al.length===1&&!ia&&jb(zb)};function $b(e,t){this.fun=e,this.array=t}$b.prototype.run=function(){this.fun.apply(null,this.array)};qn.title="browser";qn.browser=!0;qn.env={};qn.argv=[];qn.version="";qn.versions={};function Tl(){}qn.on=Tl;qn.addListener=Tl;qn.once=Tl;qn.off=Tl;qn.removeListener=Tl;qn.removeAllListeners=Tl;qn.emit=Tl;qn.prependListener=Tl;qn.prependOnceListener=Tl;qn.listeners=function(e){return[]};qn.binding=function(e){throw new Error("process.binding is not supported")};qn.cwd=function(){return"/"};qn.chdir=function(e){throw new Error("process.chdir is not supported")};qn.umask=function(){return 0}});var P3=Q((x6e,ow)=>{"use strict";var{Symbol:G4,SymbolAsyncIterator:Vb,SymbolIterator:Kb,SymbolFor:Wb}=Gn(),Gb=G4("kDestroyed"),Xb=G4("kIsErrored"),H9=G4("kIsReadable"),Yb=G4("kIsDisturbed"),uH=Wb("nodejs.webstream.isClosedPromise"),cH=Wb("nodejs.webstream.controllerErrorFunction");function X4(e,t=!1){var n;return!!(e&&typeof e.pipe=="function"&&typeof e.on=="function"&&(!t||typeof e.pause=="function"&&typeof e.resume=="function")&&(!e._writableState||((n=e._readableState)===null||n===void 0?void 0:n.readable)!==!1)&&(!e._writableState||e._readableState))}function Y4(e){var t;return!!(e&&typeof e.write=="function"&&typeof e.on=="function"&&(!e._readableState||((t=e._writableState)===null||t===void 0?void 0:t.writable)!==!1))}function fH(e){return!!(e&&typeof e.pipe=="function"&&e._readableState&&typeof e.on=="function"&&typeof e.write=="function")}function B3(e){return e&&(e._readableState||e._writableState||typeof e.write=="function"&&typeof e.on=="function"||typeof e.pipe=="function"&&typeof e.on=="function")}function Zb(e){return!!(e&&!B3(e)&&typeof e.pipeThrough=="function"&&typeof e.getReader=="function"&&typeof e.cancel=="function")}function Jb(e){return!!(e&&!B3(e)&&typeof e.getWriter=="function"&&typeof e.abort=="function")}function Qb(e){return!!(e&&!B3(e)&&typeof e.readable=="object"&&typeof e.writable=="object")}function dH(e){return Zb(e)||Jb(e)||Qb(e)}function hH(e,t){return e==null?!1:t===!0?typeof e[Vb]=="function":t===!1?typeof e[Kb]=="function":typeof e[Vb]=="function"||typeof e[Kb]=="function"}function Z4(e){if(!B3(e))return null;let t=e._writableState,n=e._readableState,r=t||n;return!!(e.destroyed||e[Gb]||r!=null&&r.destroyed)}function ew(e){if(!Y4(e))return null;if(e.writableEnded===!0)return!0;let t=e._writableState;return t!=null&&t.errored?!1:typeof t?.ended!="boolean"?null:t.ended}function pH(e,t){if(!Y4(e))return null;if(e.writableFinished===!0)return!0;let n=e._writableState;return n!=null&&n.errored?!1:typeof n?.finished!="boolean"?null:!!(n.finished||t===!1&&n.ended===!0&&n.length===0)}function mH(e){if(!X4(e))return null;if(e.readableEnded===!0)return!0;let t=e._readableState;return!t||t.errored?!1:typeof t?.ended!="boolean"?null:t.ended}function tw(e,t){if(!X4(e))return null;let n=e._readableState;return n!=null&&n.errored?!1:typeof n?.endEmitted!="boolean"?null:!!(n.endEmitted||t===!1&&n.ended===!0&&n.length===0)}function nw(e){return e&&e[H9]!=null?e[H9]:typeof e?.readable!="boolean"?null:Z4(e)?!1:X4(e)&&e.readable&&!tw(e)}function rw(e){return typeof e?.writable!="boolean"?null:Z4(e)?!1:Y4(e)&&e.writable&&!ew(e)}function yH(e,t){return B3(e)?Z4(e)?!0:!(t?.readable!==!1&&nw(e)||t?.writable!==!1&&rw(e)):null}function gH(e){var t,n;return B3(e)?e.writableErrored?e.writableErrored:(t=(n=e._writableState)===null||n===void 0?void 0:n.errored)!==null&&t!==void 0?t:null:null}function bH(e){var t,n;return B3(e)?e.readableErrored?e.readableErrored:(t=(n=e._readableState)===null||n===void 0?void 0:n.errored)!==null&&t!==void 0?t:null:null}function wH(e){if(!B3(e))return null;if(typeof e.closed=="boolean")return e.closed;let t=e._writableState,n=e._readableState;return typeof t?.closed=="boolean"||typeof n?.closed=="boolean"?t?.closed||n?.closed:typeof e._closed=="boolean"&&lw(e)?e._closed:null}function lw(e){return typeof e._closed=="boolean"&&typeof e._defaultKeepAlive=="boolean"&&typeof e._removedConnection=="boolean"&&typeof e._removedContLen=="boolean"}function iw(e){return typeof e._sent100=="boolean"&&lw(e)}function vH(e){var t;return typeof e._consuming=="boolean"&&typeof e._dumped=="boolean"&&((t=e.req)===null||t===void 0?void 0:t.upgradeOrConnect)===void 0}function xH(e){if(!B3(e))return null;let t=e._writableState,n=e._readableState,r=t||n;return!r&&iw(e)||!!(r&&r.autoDestroy&&r.emitClose&&r.closed===!1)}function EH(e){var t;return!!(e&&((t=e[Yb])!==null&&t!==void 0?t:e.readableDidRead||e.readableAborted))}function _H(e){var t,n,r,l,i,o,a,s,u,c;return!!(e&&((t=(n=(r=(l=(i=(o=e[Xb])!==null&&o!==void 0?o:e.readableErrored)!==null&&i!==void 0?i:e.writableErrored)!==null&&l!==void 0?l:(a=e._readableState)===null||a===void 0?void 0:a.errorEmitted)!==null&&r!==void 0?r:(s=e._writableState)===null||s===void 0?void 0:s.errorEmitted)!==null&&n!==void 0?n:(u=e._readableState)===null||u===void 0?void 0:u.errored)!==null&&t!==void 0?t:!((c=e._writableState)===null||c===void 0)&&c.errored))}ow.exports={kDestroyed:Gb,isDisturbed:EH,kIsDisturbed:Yb,isErrored:_H,kIsErrored:Xb,isReadable:nw,kIsReadable:H9,kIsClosedPromise:uH,kControllerErrorFunction:cH,isClosed:wH,isDestroyed:Z4,isDuplexNodeStream:fH,isFinished:yH,isIterable:hH,isReadableNodeStream:X4,isReadableStream:Zb,isReadableEnded:mH,isReadableFinished:tw,isReadableErrored:bH,isNodeStream:B3,isWebStream:dH,isWritable:rw,isWritableNodeStream:Y4,isWritableStream:Jb,isWritableEnded:ew,isWritableFinished:pH,isWritableErrored:gH,isServerRequest:vH,isServerResponse:iw,willEmitClose:xH,isTransformStream:Qb}});var Il=Q((E6e,X9)=>{var yi=mi(),{AbortError:mw,codes:SH}=D2(),{ERR_INVALID_ARG_TYPE:AH,ERR_STREAM_PREMATURE_CLOSE:aw}=SH,{kEmptyObject:K9,once:W9}=D3(),{validateAbortSignal:TH,validateFunction:IH,validateObject:CH,validateBoolean:DH}=ss(),{Promise:RH,PromisePrototypeThen:kH}=Gn(),{isClosed:BH,isReadable:sw,isReadableNodeStream:V9,isReadableStream:PH,isReadableFinished:uw,isReadableErrored:cw,isWritable:fw,isWritableNodeStream:dw,isWritableStream:MH,isWritableFinished:hw,isWritableErrored:pw,isNodeStream:NH,willEmitClose:LH,kIsClosedPromise:OH}=P3();function FH(e){return e.setHeader&&typeof e.abort=="function"}var G9=()=>{};function yw(e,t,n){var r,l;if(arguments.length===2?(n=t,t=K9):t==null?t=K9:CH(t,"options"),IH(n,"callback"),TH(t.signal,"options.signal"),n=W9(n),PH(e)||MH(e))return qH(e,t,n);if(!NH(e))throw new AH("stream",["ReadableStream","WritableStream","Stream"],e);let i=(r=t.readable)!==null&&r!==void 0?r:V9(e),o=(l=t.writable)!==null&&l!==void 0?l:dw(e),a=e._writableState,s=e._readableState,u=()=>{e.writable||m()},c=LH(e)&&V9(e)===i&&dw(e)===o,f=hw(e,!1),m=()=>{f=!0,e.destroyed&&(c=!1)