Sindbad~EG File Manager
var mega=(()=>{var Jp=Object.create;var rn=Object.defineProperty;var Xp=Object.getOwnPropertyDescriptor;var Qp=Object.getOwnPropertyNames;var Zp=Object.getPrototypeOf,ey=Object.prototype.hasOwnProperty;var he=(t,e)=>()=>(t&&(e=t(t=0)),e);var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ty=(t,e)=>{for(var r in e)rn(t,r,{get:e[r],enumerable:!0})},qs=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Qp(e))!ey.call(t,i)&&i!==r&&rn(t,i,{get:()=>e[i],enumerable:!(n=Xp(e,i))||n.enumerable});return t};var pe=(t,e,r)=>(r=t!=null?Jp(Zp(t)):{},qs(e||!t||!t.__esModule?rn(r,"default",{value:t,enumerable:!0}):r,t)),wr=t=>qs(rn({},"__esModule",{value:!0}),t);var Ws=_(nn=>{"use strict";c();nn.byteLength=ny;nn.toByteArray=oy;nn.fromByteArray=ly;var Re=[],ye=[],ry=typeof Uint8Array<"u"?Uint8Array:Array,$i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(ct=0,Us=$i.length;ct<Us;++ct)Re[ct]=$i[ct],ye[$i.charCodeAt(ct)]=ct;var ct,Us;ye[45]=62;ye[95]=63;function js(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function ny(t){var e=js(t),r=e[0],n=e[1];return(r+n)*3/4-n}function iy(t,e,r){return(e+r)*3/4-r}function oy(t){var e,r=js(t),n=r[0],i=r[1],o=new ry(iy(t,n,i)),a=0,s=i>0?n-4:n,l;for(l=0;l<s;l+=4)e=ye[t.charCodeAt(l)]<<18|ye[t.charCodeAt(l+1)]<<12|ye[t.charCodeAt(l+2)]<<6|ye[t.charCodeAt(l+3)],o[a++]=e>>16&255,o[a++]=e>>8&255,o[a++]=e&255;return i===2&&(e=ye[t.charCodeAt(l)]<<2|ye[t.charCodeAt(l+1)]>>4,o[a++]=e&255),i===1&&(e=ye[t.charCodeAt(l)]<<10|ye[t.charCodeAt(l+1)]<<4|ye[t.charCodeAt(l+2)]>>2,o[a++]=e>>8&255,o[a++]=e&255),o}function ay(t){return Re[t>>18&63]+Re[t>>12&63]+Re[t>>6&63]+Re[t&63]}function sy(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(ay(n));return i.join("")}function ly(t){for(var e,r=t.length,n=r%3,i=[],o=16383,a=0,s=r-n;a<s;a+=o)i.push(sy(t,a,a+o>s?s:a+o));return n===1?(e=t[r-1],i.push(Re[e>>2]+Re[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(Re[e>>10]+Re[e>>4&63]+Re[e<<2&63]+"=")),i.join("")}});var $s=_(Gi=>{c();Gi.read=function(t,e,r,n,i){var o,a,s=i*8-n-1,l=(1<<s)-1,f=l>>1,u=-7,d=r?i-1:0,b=r?-1:1,h=t[e+d];for(d+=b,o=h&(1<<-u)-1,h>>=-u,u+=s;u>0;o=o*256+t[e+d],d+=b,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=a*256+t[e+d],d+=b,u-=8);if(o===0)o=1-f;else{if(o===l)return a?NaN:(h?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-f}return(h?-1:1)*a*Math.pow(2,o-n)};Gi.write=function(t,e,r,n,i,o){var a,s,l,f=o*8-i-1,u=(1<<f)-1,d=u>>1,b=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,E=n?1:-1,m=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+d>=1?e+=b/l:e+=b*Math.pow(2,1-d),e*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(e*l-1)*Math.pow(2,i),a=a+d):(s=e*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;t[r+h]=s&255,h+=E,s/=256,i-=8);for(a=a<<i|s,f+=i;f>0;t[r+h]=a&255,h+=E,a/=256,f-=8);t[r+h-E]|=m*128}});var de=_(qt=>{"use strict";c();var Hi=Ws(),Dt=$s(),Gs=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;qt.Buffer=g;qt.SlowBuffer=py;qt.INSPECT_MAX_BYTES=50;var on=2147483647;qt.kMaxLength=on;g.TYPED_ARRAY_SUPPORT=fy();!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 fy(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.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 Ue(t){if(t>on)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,g.prototype),e}function g(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Yi(t)}return zs(t,e,r)}g.poolSize=8192;function zs(t,e,r){if(typeof t=="string")return cy(t,e);if(ArrayBuffer.isView(t))return dy(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(xe(t,ArrayBuffer)||t&&xe(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(xe(t,SharedArrayBuffer)||t&&xe(t.buffer,SharedArrayBuffer)))return Ki(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=t.valueOf&&t.valueOf();if(n!=null&&n!==t)return g.from(n,e,r);let i=hy(t);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return g.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}g.from=function(t,e,r){return zs(t,e,r)};Object.setPrototypeOf(g.prototype,Uint8Array.prototype);Object.setPrototypeOf(g,Uint8Array);function Ys(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function uy(t,e,r){return Ys(t),t<=0?Ue(t):e!==void 0?typeof r=="string"?Ue(t).fill(e,r):Ue(t).fill(e):Ue(t)}g.alloc=function(t,e,r){return uy(t,e,r)};function Yi(t){return Ys(t),Ue(t<0?0:Ji(t)|0)}g.allocUnsafe=function(t){return Yi(t)};g.allocUnsafeSlow=function(t){return Yi(t)};function cy(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!g.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let r=Js(t,e)|0,n=Ue(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}function Vi(t){let e=t.length<0?0:Ji(t.length)|0,r=Ue(e);for(let n=0;n<e;n+=1)r[n]=t[n]&255;return r}function dy(t){if(xe(t,Uint8Array)){let e=new Uint8Array(t);return Ki(e.buffer,e.byteOffset,e.byteLength)}return Vi(t)}function Ki(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return e===void 0&&r===void 0?n=new Uint8Array(t):r===void 0?n=new Uint8Array(t,e):n=new Uint8Array(t,e,r),Object.setPrototypeOf(n,g.prototype),n}function hy(t){if(g.isBuffer(t)){let e=Ji(t.length)|0,r=Ue(e);return r.length===0||t.copy(r,0,0,e),r}if(t.length!==void 0)return typeof t.length!="number"||Qi(t.length)?Ue(0):Vi(t);if(t.type==="Buffer"&&Array.isArray(t.data))return Vi(t.data)}function Ji(t){if(t>=on)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+on.toString(16)+" bytes");return t|0}function py(t){return+t!=t&&(t=0),g.alloc(+t)}g.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==g.prototype};g.compare=function(e,r){if(xe(e,Uint8Array)&&(e=g.from(e,e.offset,e.byteLength)),xe(r,Uint8Array)&&(r=g.from(r,r.offset,r.byteLength)),!g.isBuffer(e)||!g.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;let n=e.length,i=r.length;for(let o=0,a=Math.min(n,i);o<a;++o)if(e[o]!==r[o]){n=e[o],i=r[o];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,r){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(r===void 0)for(r=0,n=0;n<e.length;++n)r+=e[n].length;let i=g.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){let a=e[n];if(xe(a,Uint8Array))o+a.length>i.length?(g.isBuffer(a)||(a=g.from(a)),a.copy(i,o)):Uint8Array.prototype.set.call(i,a,o);else if(g.isBuffer(a))a.copy(i,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=a.length}return i};function Js(t,e){if(g.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||xe(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return zi(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return ol(t).length;default:if(i)return n?-1:zi(t).length;e=(""+e).toLowerCase(),i=!0}}g.byteLength=Js;function yy(t,e,r){let n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return Ry(this,e,r);case"utf8":case"utf-8":return Qs(this,e,r);case"ascii":return Ay(this,e,r);case"latin1":case"binary":return vy(this,e,r);case"base64":return Ey(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xy(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}g.prototype._isBuffer=!0;function dt(t,e,r){let n=t[e];t[e]=t[r],t[r]=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 r=0;r<e;r+=2)dt(this,r,r+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 r=0;r<e;r+=4)dt(this,r,r+3),dt(this,r+1,r+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 r=0;r<e;r+=8)dt(this,r,r+7),dt(this,r+1,r+6),dt(this,r+2,r+5),dt(this,r+3,r+4);return this};g.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?Qs(this,0,e):yy.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="",r=qt.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"};Gs&&(g.prototype[Gs]=g.prototype.inspect);g.prototype.compare=function(e,r,n,i,o){if(xe(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(r===void 0&&(r=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;let a=o-i,s=n-r,l=Math.min(a,s),f=this.slice(i,o),u=e.slice(r,n);for(let d=0;d<l;++d)if(f[d]!==u[d]){a=f[d],s=u[d];break}return a<s?-1:s<a?1:0};function Xs(t,e,r,n,i){if(t.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Qi(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof e=="string"&&(e=g.from(e,n)),g.isBuffer(e))return e.length===0?-1:Hs(t,e,r,n,i);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Hs(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Hs(t,e,r,n,i){let o=1,a=t.length,s=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||e.length<2)return-1;o=2,a/=2,s/=2,r/=2}function l(u,d){return o===1?u[d]:u.readUInt16BE(d*o)}let f;if(i){let u=-1;for(f=r;f<a;f++)if(l(t,f)===l(e,u===-1?0:f-u)){if(u===-1&&(u=f),f-u+1===s)return u*o}else u!==-1&&(f-=f-u),u=-1}else for(r+s>a&&(r=a-s),f=r;f>=0;f--){let u=!0;for(let d=0;d<s;d++)if(l(t,f+d)!==l(e,d)){u=!1;break}if(u)return f}return-1}g.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};g.prototype.indexOf=function(e,r,n){return Xs(this,e,r,n,!0)};g.prototype.lastIndexOf=function(e,r,n){return Xs(this,e,r,n,!1)};function by(t,e,r,n){r=Number(r)||0;let i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;let o=e.length;n>o/2&&(n=o/2);let a;for(a=0;a<n;++a){let s=parseInt(e.substr(a*2,2),16);if(Qi(s))return a;t[r+a]=s}return a}function gy(t,e,r,n){return an(zi(e,t.length-r),t,r,n)}function wy(t,e,r,n){return an(By(e),t,r,n)}function my(t,e,r,n){return an(ol(e),t,r,n)}function _y(t,e,r,n){return an(Py(e,t.length-r),t,r,n)}g.prototype.write=function(e,r,n,i){if(r===void 0)i="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")i=r,n=this.length,r=0;else if(isFinite(r))r=r>>>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 o=this.length-r;if((n===void 0||n>o)&&(n=o),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let a=!1;for(;;)switch(i){case"hex":return by(this,e,r,n);case"utf8":case"utf-8":return gy(this,e,r,n);case"ascii":case"latin1":case"binary":return wy(this,e,r,n);case"base64":return my(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _y(this,e,r,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}};g.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ey(t,e,r){return e===0&&r===t.length?Hi.fromByteArray(t):Hi.fromByteArray(t.slice(e,r))}function Qs(t,e,r){r=Math.min(t.length,r);let n=[],i=e;for(;i<r;){let o=t[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=r){let l,f,u,d;switch(s){case 1:o<128&&(a=o);break;case 2:l=t[i+1],(l&192)===128&&(d=(o&31)<<6|l&63,d>127&&(a=d));break;case 3:l=t[i+1],f=t[i+2],(l&192)===128&&(f&192)===128&&(d=(o&15)<<12|(l&63)<<6|f&63,d>2047&&(d<55296||d>57343)&&(a=d));break;case 4:l=t[i+1],f=t[i+2],u=t[i+3],(l&192)===128&&(f&192)===128&&(u&192)===128&&(d=(o&15)<<18|(l&63)<<12|(f&63)<<6|u&63,d>65535&&d<1114112&&(a=d))}}a===null?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),i+=s}return Sy(n)}var Vs=4096;function Sy(t){let e=t.length;if(e<=Vs)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Vs));return r}function Ay(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]&127);return n}function vy(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function Ry(t,e,r){let n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let o=e;o<r;++o)i+=My[t[o]];return i}function xy(t,e,r){let n=t.slice(e,r),i="";for(let o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}g.prototype.slice=function(e,r){let n=this.length;e=~~e,r=r===void 0?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);let i=this.subarray(e,r);return Object.setPrototypeOf(i,g.prototype),i};function Q(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}g.prototype.readUintLE=g.prototype.readUIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||Q(e,r,this.length);let i=this[e],o=1,a=0;for(;++a<r&&(o*=256);)i+=this[e+a]*o;return i};g.prototype.readUintBE=g.prototype.readUIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||Q(e,r,this.length);let i=this[e+--r],o=1;for(;r>0&&(o*=256);)i+=this[e+--r]*o;return i};g.prototype.readUint8=g.prototype.readUInt8=function(e,r){return e=e>>>0,r||Q(e,1,this.length),this[e]};g.prototype.readUint16LE=g.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||Q(e,2,this.length),this[e]|this[e+1]<<8};g.prototype.readUint16BE=g.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||Q(e,2,this.length),this[e]<<8|this[e+1]};g.prototype.readUint32LE=g.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||Q(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,r){return e=e>>>0,r||Q(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};g.prototype.readBigUInt64LE=et(function(e){e=e>>>0,Ft(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&mr(e,this.length-8);let i=r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,o=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(i)+(BigInt(o)<<BigInt(32))});g.prototype.readBigUInt64BE=et(function(e){e=e>>>0,Ft(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&mr(e,this.length-8);let i=r*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],o=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(i)<<BigInt(32))+BigInt(o)});g.prototype.readIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||Q(e,r,this.length);let i=this[e],o=1,a=0;for(;++a<r&&(o*=256);)i+=this[e+a]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*r)),i};g.prototype.readIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||Q(e,r,this.length);let i=r,o=1,a=this[e+--i];for(;i>0&&(o*=256);)a+=this[e+--i]*o;return o*=128,a>=o&&(a-=Math.pow(2,8*r)),a};g.prototype.readInt8=function(e,r){return e=e>>>0,r||Q(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};g.prototype.readInt16LE=function(e,r){e=e>>>0,r||Q(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};g.prototype.readInt16BE=function(e,r){e=e>>>0,r||Q(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};g.prototype.readInt32LE=function(e,r){return e=e>>>0,r||Q(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};g.prototype.readInt32BE=function(e,r){return e=e>>>0,r||Q(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};g.prototype.readBigInt64LE=et(function(e){e=e>>>0,Ft(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&mr(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(r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)});g.prototype.readBigInt64BE=et(function(e){e=e>>>0,Ft(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&mr(e,this.length-8);let i=(r<<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,r){return e=e>>>0,r||Q(e,4,this.length),Dt.read(this,e,!0,23,4)};g.prototype.readFloatBE=function(e,r){return e=e>>>0,r||Q(e,4,this.length),Dt.read(this,e,!1,23,4)};g.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||Q(e,8,this.length),Dt.read(this,e,!0,52,8)};g.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||Q(e,8,this.length),Dt.read(this,e,!1,52,8)};function fe(t,e,r,n,i,o){if(!g.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}g.prototype.writeUintLE=g.prototype.writeUIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;fe(this,e,r,n,s,0)}let o=1,a=0;for(this[r]=e&255;++a<n&&(o*=256);)this[r+a]=e/o&255;return r+n};g.prototype.writeUintBE=g.prototype.writeUIntBE=function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;fe(this,e,r,n,s,0)}let o=n-1,a=1;for(this[r+o]=e&255;--o>=0&&(a*=256);)this[r+o]=e/a&255;return r+n};g.prototype.writeUint8=g.prototype.writeUInt8=function(e,r,n){return e=+e,r=r>>>0,n||fe(this,e,r,1,255,0),this[r]=e&255,r+1};g.prototype.writeUint16LE=g.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||fe(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2};g.prototype.writeUint16BE=g.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||fe(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2};g.prototype.writeUint32LE=g.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||fe(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4};g.prototype.writeUint32BE=g.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||fe(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};function Zs(t,e,r,n,i){il(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o=o>>8,t[r++]=o,o=o>>8,t[r++]=o,o=o>>8,t[r++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a,r}function el(t,e,r,n,i){il(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o=o>>8,t[r+6]=o,o=o>>8,t[r+5]=o,o=o>>8,t[r+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a=a>>8,t[r+2]=a,a=a>>8,t[r+1]=a,a=a>>8,t[r]=a,r+8}g.prototype.writeBigUInt64LE=et(function(e,r=0){return Zs(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});g.prototype.writeBigUInt64BE=et(function(e,r=0){return el(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});g.prototype.writeIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){let l=Math.pow(2,8*n-1);fe(this,e,r,n,l-1,-l)}let o=0,a=1,s=0;for(this[r]=e&255;++o<n&&(a*=256);)e<0&&s===0&&this[r+o-1]!==0&&(s=1),this[r+o]=(e/a>>0)-s&255;return r+n};g.prototype.writeIntBE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){let l=Math.pow(2,8*n-1);fe(this,e,r,n,l-1,-l)}let o=n-1,a=1,s=0;for(this[r+o]=e&255;--o>=0&&(a*=256);)e<0&&s===0&&this[r+o+1]!==0&&(s=1),this[r+o]=(e/a>>0)-s&255;return r+n};g.prototype.writeInt8=function(e,r,n){return e=+e,r=r>>>0,n||fe(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1};g.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||fe(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2};g.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||fe(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2};g.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||fe(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4};g.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||fe(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};g.prototype.writeBigInt64LE=et(function(e,r=0){return Zs(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});g.prototype.writeBigInt64BE=et(function(e,r=0){return el(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function tl(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function rl(t,e,r,n,i){return e=+e,r=r>>>0,i||tl(t,e,r,4,34028234663852886e22,-34028234663852886e22),Dt.write(t,e,r,n,23,4),r+4}g.prototype.writeFloatLE=function(e,r,n){return rl(this,e,r,!0,n)};g.prototype.writeFloatBE=function(e,r,n){return rl(this,e,r,!1,n)};function nl(t,e,r,n,i){return e=+e,r=r>>>0,i||tl(t,e,r,8,17976931348623157e292,-17976931348623157e292),Dt.write(t,e,r,n,52,8),r+8}g.prototype.writeDoubleLE=function(e,r,n){return nl(this,e,r,!0,n)};g.prototype.writeDoubleBE=function(e,r,n){return nl(this,e,r,!1,n)};g.prototype.copy=function(e,r,n,i){if(!g.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(r<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-r<i-n&&(i=e.length-r+n);let o=i-n;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,n,i):Uint8Array.prototype.set.call(e,this.subarray(n,i),r),o};g.prototype.fill=function(e,r,n,i){if(typeof e=="string"){if(typeof r=="string"?(i=r,r=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 a=e.charCodeAt(0);(i==="utf8"&&a<128||i==="latin1")&&(e=a)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);let o;if(typeof e=="number")for(o=r;o<n;++o)this[o]=e;else{let a=g.isBuffer(e)?e:g.from(e,i),s=a.length;if(s===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-r;++o)this[o+r]=a[o%s]}return this};var Nt={};function Xi(t,e,r){Nt[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}Xi("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);Xi("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError);Xi("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=Ks(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Ks(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n},RangeError);function Ks(t){let e="",r=t.length,n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function Ty(t,e,r){Ft(e,"offset"),(t[e]===void 0||t[e+r]===void 0)&&mr(e,t.length-(r+1))}function il(t,e,r,n,i,o){if(t>r||t<e){let a=typeof e=="bigint"?"n":"",s;throw o>3?e===0||e===BigInt(0)?s=`>= 0${a} and < 2${a} ** ${(o+1)*8}${a}`:s=`>= -(2${a} ** ${(o+1)*8-1}${a}) and < 2 ** ${(o+1)*8-1}${a}`:s=`>= ${e}${a} and <= ${r}${a}`,new Nt.ERR_OUT_OF_RANGE("value",s,t)}Ty(n,i,o)}function Ft(t,e){if(typeof t!="number")throw new Nt.ERR_INVALID_ARG_TYPE(e,"number",t)}function mr(t,e,r){throw Math.floor(t)!==t?(Ft(t,r),new Nt.ERR_OUT_OF_RANGE(r||"offset","an integer",t)):e<0?new Nt.ERR_BUFFER_OUT_OF_BOUNDS:new Nt.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}var Iy=/[^+/0-9A-Za-z-_]/g;function Oy(t){if(t=t.split("=")[0],t=t.trim().replace(Iy,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function zi(t,e){e=e||1/0;let r,n=t.length,i=null,o=[];for(let a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}else if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function By(t){let e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function Py(t,e){let r,n,i,o=[];for(let a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function ol(t){return Hi.toByteArray(Oy(t))}function an(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function xe(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function Qi(t){return t!==t}var My=function(){let t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function et(t){return typeof BigInt>"u"?ky:t}function ky(){throw new Error("BigInt not supported")}});var p,y,w,c=he(()=>{p=pe(de(),1),y={env:{},nextTick:(t,...e)=>{globalThis.setTimeout(t,0,...e)}},w=globalThis});var $=_((jv,al)=>{"use strict";c();al.exports={ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,e){return t.includes(e)},ArrayPrototypeIndexOf(t,e){return t.indexOf(e)},ArrayPrototypeJoin(t,e){return t.join(e)},ArrayPrototypeMap(t,e){return t.map(e)},ArrayPrototypePop(t,e){return t.pop(e)},ArrayPrototypePush(t,e){return t.push(e)},ArrayPrototypeSlice(t,e,r){return t.slice(e,r)},Error,FunctionPrototypeCall(t,e,...r){return t.call(e,...r)},FunctionPrototypeSymbolHasInstance(t,e){return Function.prototype[Symbol.hasInstance].call(t,e)},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(t,e){return Object.defineProperties(t,e)},ObjectDefineProperty(t,e,r){return Object.defineProperty(t,e,r)},ObjectGetOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,e){return Object.setPrototypeOf(t,e)},Promise,PromisePrototypeCatch(t,e){return t.catch(e)},PromisePrototypeThen(t,e,r){return t.then(e,r)},PromiseReject(t){return Promise.reject(t)},PromiseResolve(t){return Promise.resolve(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,e){return t.test(e)},SafeSet:Set,String,StringPrototypeSlice(t,e,r){return t.slice(e,r)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(t,e,r){return t.set(e,r)},Boolean,Uint8Array}});var Ut={};ty(Ut,{Agent:()=>Ly,default:()=>Zi});var Ly,Zi,je=he(()=>{c();Ly=null,Zi=null});var Te=_((Gv,eo)=>{"use strict";c();var jt=typeof Reflect=="object"?Reflect:null,sl=jt&&typeof jt.apply=="function"?jt.apply:function(e,r,n){return Function.prototype.apply.call(e,r,n)},sn;jt&&typeof jt.ownKeys=="function"?sn=jt.ownKeys:Object.getOwnPropertySymbols?sn=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:sn=function(e){return Object.getOwnPropertyNames(e)};function Cy(t){console&&console.warn&&console.warn(t)}var fl=Number.isNaN||function(e){return e!==e};function D(){D.init.call(this)}eo.exports=D;eo.exports.once=qy;D.EventEmitter=D;D.prototype._events=void 0;D.prototype._eventsCount=0;D.prototype._maxListeners=void 0;var ll=10;function ln(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(D,"defaultMaxListeners",{enumerable:!0,get:function(){return ll},set:function(t){if(typeof t!="number"||t<0||fl(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");ll=t}});D.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};D.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||fl(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function ul(t){return t._maxListeners===void 0?D.defaultMaxListeners:t._maxListeners}D.prototype.getMaxListeners=function(){return ul(this)};D.prototype.emit=function(e){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i=e==="error",o=this._events;if(o!==void 0)i=i&&o.error===void 0;else if(!i)return!1;if(i){var a;if(r.length>0&&(a=r[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[e];if(l===void 0)return!1;if(typeof l=="function")sl(l,this,r);else for(var f=l.length,u=yl(l,f),n=0;n<f;++n)sl(u[n],this,r);return!0};function cl(t,e,r,n){var i,o,a;if(ln(r),o=t._events,o===void 0?(o=t._events=Object.create(null),t._eventsCount=0):(o.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),a===void 0)a=o[e]=r,++t._eventsCount;else if(typeof a=="function"?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),i=ul(t),i>0&&a.length>i&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=t,s.type=e,s.count=a.length,Cy(s)}return t}D.prototype.addListener=function(e,r){return cl(this,e,r,!1)};D.prototype.on=D.prototype.addListener;D.prototype.prependListener=function(e,r){return cl(this,e,r,!0)};function Ny(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function dl(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=Ny.bind(n);return i.listener=r,n.wrapFn=i,i}D.prototype.once=function(e,r){return ln(r),this.on(e,dl(this,e,r)),this};D.prototype.prependOnceListener=function(e,r){return ln(r),this.prependListener(e,dl(this,e,r)),this};D.prototype.removeListener=function(e,r){var n,i,o,a,s;if(ln(r),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(o=-1,a=n.length-1;a>=0;a--)if(n[a]===r||n[a].listener===r){s=n[a].listener,o=a;break}if(o<0)return this;o===0?n.shift():Dy(n,o),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,s||r)}return this};D.prototype.off=D.prototype.removeListener;D.prototype.removeAllListeners=function(e){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var o=Object.keys(n),a;for(i=0;i<o.length;++i)a=o[i],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[e],typeof r=="function")this.removeListener(e,r);else if(r!==void 0)for(i=r.length-1;i>=0;i--)this.removeListener(e,r[i]);return this};function hl(t,e,r){var n=t._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?Fy(i):yl(i,i.length)}D.prototype.listeners=function(e){return hl(this,e,!0)};D.prototype.rawListeners=function(e){return hl(this,e,!1)};D.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):pl.call(t,e)};D.prototype.listenerCount=pl;function pl(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}D.prototype.eventNames=function(){return this._eventsCount>0?sn(this._events):[]};function yl(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function Dy(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function Fy(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function qy(t,e){return new Promise(function(r,n){function i(a){t.removeListener(e,o),n(a)}function o(){typeof t.removeListener=="function"&&t.removeListener("error",i),r([].slice.call(arguments))}bl(t,e,o,{once:!0}),e!=="error"&&Uy(t,i,{once:!0})})}function Uy(t,e,r){typeof t.on=="function"&&bl(t,"error",e,r)}function bl(t,e,r,n){if(typeof t.on=="function")n.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function i(o){n.once&&t.removeEventListener(e,i),r(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}});var ne=_((Vv,ro)=>{"use strict";c();var jy=de(),{kResistStopPropagation:Wy,SymbolDispose:$y}=$(),Gy=globalThis.AbortSignal||(je(),wr(Ut)).AbortSignal,Hy=globalThis.AbortController||(je(),wr(Ut)).AbortController,Vy=Object.getPrototypeOf(async function(){}).constructor,gl=globalThis.Blob||jy.Blob,Ky=typeof gl<"u"?function(e){return e instanceof gl}:function(e){return!1},wl=(t,e)=>{if(t!==void 0&&(t===null||typeof t!="object"||!("aborted"in t)))throw new ERR_INVALID_ARG_TYPE(e,"AbortSignal",t)},zy=(t,e)=>{if(typeof t!="function")throw new ERR_INVALID_ARG_TYPE(e,"Function",t)},to=class extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError(`Expected input to be an Array, got ${typeof e}`);let r="";for(let n=0;n<e.length;n++)r+=` ${e[n].stack}
`;super(r),this.name="AggregateError",this.errors=e}};ro.exports={AggregateError:to,kEmptyObject:Object.freeze({}),once(t){let e=!1;return function(...r){e||(e=!0,t.apply(this,r))}},createDeferredPromise:function(){let t,e;return{promise:new Promise((n,i)=>{t=n,e=i}),resolve:t,reject:e}},promisify(t){return new Promise((e,r)=>{t((n,...i)=>n?r(n):e(...i))})},debuglog(){return function(){}},format(t,...e){return t.replace(/%([sdifj])/g,function(...[r,n]){let i=e.shift();return n==="f"?i.toFixed(6):n==="j"?JSON.stringify(i):n==="s"&&typeof i=="object"?`${i.constructor!==Object?i.constructor.name:""} {}`.trim():i.toString()})},inspect(t){switch(typeof t){case"string":if(t.includes("'"))if(t.includes('"')){if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}else return`"${t}"`;return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}},types:{isAsyncFunction(t){return t instanceof Vy},isArrayBufferView(t){return ArrayBuffer.isView(t)}},isBlob:Ky,deprecate(t,e){return t},addAbortListener:Te().addAbortListener||function(e,r){if(e===void 0)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",e);wl(e,"signal"),zy(r,"listener");let n;return e.aborted?queueMicrotask(()=>r()):(e.addEventListener("abort",r,{__proto__:null,once:!0,[Wy]:!0}),n=()=>{e.removeEventListener("abort",r)}),{__proto__:null,[$y](){var i;(i=n)===null||i===void 0||i()}}},AbortSignalAny:Gy.any||function(e){if(e.length===1)return e[0];let r=new Hy,n=()=>r.abort();return e.forEach(i=>{wl(i,"signals"),i.addEventListener("abort",n,{once:!0})}),r.signal.addEventListener("abort",()=>{e.forEach(i=>i.removeEventListener("abort",n))},{once:!0}),r.signal}};ro.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")});var ae=_((zv,El)=>{"use strict";c();var{format:Yy,inspect:fn,AggregateError:Jy}=ne(),Xy=globalThis.AggregateError||Jy,Qy=Symbol("kIsNodeError"),Zy=["string","function","number","object","Function","Object","boolean","bigint","symbol"],eb=/^([A-Z][a-z0-9]*)+$/,tb="__node_internal_",un={};function ht(t,e){if(!t)throw new un.ERR_INTERNAL_ASSERTION(e)}function ml(t){let e="",r=t.length,n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function rb(t,e,r){if(typeof e=="function")return ht(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);let n=(e.match(/%[dfijoOs]/g)||[]).length;return ht(n===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${n}).`),r.length===0?e:Yy(e,...r)}function te(t,e,r){r||(r=Error);class n extends r{constructor(...o){super(rb(t,e,o))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(n.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),n.prototype.code=t,n.prototype[Qy]=!0,un[t]=n}function _l(t){let e=tb+t.name;return Object.defineProperty(t,"name",{value:e}),t}function nb(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let r=new Xy([e,t],e.message);return r.code=e.code,r}return t||e}var no=class extends Error{constructor(e="The operation was aborted",r=void 0){if(r!==void 0&&typeof r!="object")throw new un.ERR_INVALID_ARG_TYPE("options","Object",r);super(e,r),this.code="ABORT_ERR",this.name="AbortError"}};te("ERR_ASSERTION","%s",Error);te("ERR_INVALID_ARG_TYPE",(t,e,r)=>{ht(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let n="The ";t.endsWith(" argument")?n+=`${t} `:n+=`"${t}" ${t.includes(".")?"property":"argument"} `,n+="must be ";let i=[],o=[],a=[];for(let l of e)ht(typeof l=="string","All expected entries have to be of type string"),Zy.includes(l)?i.push(l.toLowerCase()):eb.test(l)?o.push(l):(ht(l!=="object",'The value "object" should be written as "Object"'),a.push(l));if(o.length>0){let l=i.indexOf("object");l!==-1&&(i.splice(i,l,1),o.push("Object"))}if(i.length>0){switch(i.length){case 1:n+=`of type ${i[0]}`;break;case 2:n+=`one of type ${i[0]} or ${i[1]}`;break;default:{let l=i.pop();n+=`one of type ${i.join(", ")}, or ${l}`}}(o.length>0||a.length>0)&&(n+=" or ")}if(o.length>0){switch(o.length){case 1:n+=`an instance of ${o[0]}`;break;case 2:n+=`an instance of ${o[0]} or ${o[1]}`;break;default:{let l=o.pop();n+=`an instance of ${o.join(", ")}, or ${l}`}}a.length>0&&(n+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(n+="an "),n+=`${a[0]}`;break;case 2:n+=`one of ${a[0]} or ${a[1]}`;break;default:{let l=a.pop();n+=`one of ${a.join(", ")}, or ${l}`}}if(r==null)n+=`. Received ${r}`;else if(typeof r=="function"&&r.name)n+=`. Received function ${r.name}`;else if(typeof r=="object"){var s;if((s=r.constructor)!==null&&s!==void 0&&s.name)n+=`. Received an instance of ${r.constructor.name}`;else{let l=fn(r,{depth:-1});n+=`. Received ${l}`}}else{let l=fn(r,{colors:!1});l.length>25&&(l=`${l.slice(0,25)}...`),n+=`. Received type ${typeof r} (${l})`}return n},TypeError);te("ERR_INVALID_ARG_VALUE",(t,e,r="is invalid")=>{let n=fn(e);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${t.includes(".")?"property":"argument"} '${t}' ${r}. Received ${n}`},TypeError);te("ERR_INVALID_RETURN_VALUE",(t,e,r)=>{var n;let i=r!=null&&(n=r.constructor)!==null&&n!==void 0&&n.name?`instance of ${r.constructor.name}`:`type ${typeof r}`;return`Expected ${t} to be returned from the "${e}" function but got ${i}.`},TypeError);te("ERR_MISSING_ARGS",(...t)=>{ht(t.length>0,"At least one arg needs to be specified");let e,r=t.length;switch(t=(Array.isArray(t)?t:[t]).map(n=>`"${n}"`).join(" or "),r){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{let n=t.pop();e+=`The ${t.join(", ")}, and ${n} arguments`}break}return`${e} must be specified`},TypeError);te("ERR_OUT_OF_RANGE",(t,e,r)=>{ht(e,'Missing "range" argument');let n;return Number.isInteger(r)&&Math.abs(r)>2**32?n=ml(String(r)):typeof r=="bigint"?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=ml(n)),n+="n"):n=fn(r),`The value of "${t}" is out of range. It must be ${e}. Received ${n}`},RangeError);te("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error);te("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error);te("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error);te("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error);te("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error);te("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);te("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error);te("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error);te("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error);te("ERR_STREAM_WRITE_AFTER_END","write after end",Error);te("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);El.exports={AbortError:no,aggregateTwoErrors:_l(nb),hideStackFrames:_l,codes:un}});var $t=_((Jv,Pl)=>{"use strict";c();var{ArrayIsArray:oo,ArrayPrototypeIncludes:Rl,ArrayPrototypeJoin:xl,ArrayPrototypeMap:ib,NumberIsInteger:ao,NumberIsNaN:ob,NumberMAX_SAFE_INTEGER:ab,NumberMIN_SAFE_INTEGER:sb,NumberParseInt:lb,ObjectPrototypeHasOwnProperty:fb,RegExpPrototypeExec:Tl,String:ub,StringPrototypeToUpperCase:cb,StringPrototypeTrim:db}=$(),{hideStackFrames:be,codes:{ERR_SOCKET_BAD_PORT:hb,ERR_INVALID_ARG_TYPE:ie,ERR_INVALID_ARG_VALUE:Wt,ERR_OUT_OF_RANGE:pt,ERR_UNKNOWN_SIGNAL:Sl}}=ae(),{normalizeEncoding:pb}=ne(),{isAsyncFunction:yb,isArrayBufferView:bb}=ne().types,Al={};function gb(t){return t===(t|0)}function wb(t){return t===t>>>0}var mb=/^[0-7]+$/,_b="must be a 32-bit unsigned integer or an octal string";function Eb(t,e,r){if(typeof t>"u"&&(t=r),typeof t=="string"){if(Tl(mb,t)===null)throw new Wt(e,t,_b);t=lb(t,8)}return Il(t,e),t}var Sb=be((t,e,r=sb,n=ab)=>{if(typeof t!="number")throw new ie(e,"number",t);if(!ao(t))throw new pt(e,"an integer",t);if(t<r||t>n)throw new pt(e,`>= ${r} && <= ${n}`,t)}),Ab=be((t,e,r=-2147483648,n=2147483647)=>{if(typeof t!="number")throw new ie(e,"number",t);if(!ao(t))throw new pt(e,"an integer",t);if(t<r||t>n)throw new pt(e,`>= ${r} && <= ${n}`,t)}),Il=be((t,e,r=!1)=>{if(typeof t!="number")throw new ie(e,"number",t);if(!ao(t))throw new pt(e,"an integer",t);let n=r?1:0,i=4294967295;if(t<n||t>i)throw new pt(e,`>= ${n} && <= ${i}`,t)});function so(t,e){if(typeof t!="string")throw new ie(e,"string",t)}function vb(t,e,r=void 0,n){if(typeof t!="number")throw new ie(e,"number",t);if(r!=null&&t<r||n!=null&&t>n||(r!=null||n!=null)&&ob(t))throw new pt(e,`${r!=null?`>= ${r}`:""}${r!=null&&n!=null?" && ":""}${n!=null?`<= ${n}`:""}`,t)}var Rb=be((t,e,r)=>{if(!Rl(r,t)){let i="must be one of: "+xl(ib(r,o=>typeof o=="string"?`'${o}'`:ub(o)),", ");throw new Wt(e,t,i)}});function Ol(t,e){if(typeof t!="boolean")throw new ie(e,"boolean",t)}function io(t,e,r){return t==null||!fb(t,e)?r:t[e]}var xb=be((t,e,r=null)=>{let n=io(r,"allowArray",!1),i=io(r,"allowFunction",!1);if(!io(r,"nullable",!1)&&t===null||!n&&oo(t)||typeof t!="object"&&(!i||typeof t!="function"))throw new ie(e,"Object",t)}),Tb=be((t,e)=>{if(t!=null&&typeof t!="object"&&typeof t!="function")throw new ie(e,"a dictionary",t)}),cn=be((t,e,r=0)=>{if(!oo(t))throw new ie(e,"Array",t);if(t.length<r){let n=`must be longer than ${r}`;throw new Wt(e,t,n)}});function Ib(t,e){cn(t,e);for(let r=0;r<t.length;r++)so(t[r],`${e}[${r}]`)}function Ob(t,e){cn(t,e);for(let r=0;r<t.length;r++)Ol(t[r],`${e}[${r}]`)}function Bb(t,e){cn(t,e);for(let r=0;r<t.length;r++){let n=t[r],i=`${e}[${r}]`;if(n==null)throw new ie(i,"AbortSignal",n);Bl(n,i)}}function Pb(t,e="signal"){if(so(t,e),Al[t]===void 0)throw Al[cb(t)]!==void 0?new Sl(t+" (signals must use all capital letters)"):new Sl(t)}var Mb=be((t,e="buffer")=>{if(!bb(t))throw new ie(e,["Buffer","TypedArray","DataView"],t)});function kb(t,e){let r=pb(e),n=t.length;if(r==="hex"&&n%2!==0)throw new Wt("encoding",e,`is invalid for data of length ${n}`)}function Lb(t,e="Port",r=!0){if(typeof t!="number"&&typeof t!="string"||typeof t=="string"&&db(t).length===0||+t!==+t>>>0||t>65535||t===0&&!r)throw new hb(e,t,r);return t|0}var Bl=be((t,e)=>{if(t!==void 0&&(t===null||typeof t!="object"||!("aborted"in t)))throw new ie(e,"AbortSignal",t)}),Cb=be((t,e)=>{if(typeof t!="function")throw new ie(e,"Function",t)}),Nb=be((t,e)=>{if(typeof t!="function"||yb(t))throw new ie(e,"Function",t)}),Db=be((t,e)=>{if(t!==void 0)throw new ie(e,"undefined",t)});function Fb(t,e,r){if(!Rl(r,t))throw new ie(e,`('${xl(r,"|")}')`,t)}var qb=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function vl(t,e){if(typeof t>"u"||!Tl(qb,t))throw new Wt(e,t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function Ub(t){if(typeof t=="string")return vl(t,"hints"),t;if(oo(t)){let e=t.length,r="";if(e===0)return r;for(let n=0;n<e;n++){let i=t[n];vl(i,"hints"),r+=i,n!==e-1&&(r+=", ")}return r}throw new Wt("hints",t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}Pl.exports={isInt32:gb,isUint32:wb,parseFileMode:Eb,validateArray:cn,validateStringArray:Ib,validateBooleanArray:Ob,validateAbortSignalArray:Bb,validateBoolean:Ol,validateBuffer:Mb,validateDictionary:Tb,validateEncoding:kb,validateFunction:Cb,validateInt32:Ab,validateInteger:Sb,validateNumber:vb,validateObject:xb,validateOneOf:Rb,validatePlainFunction:Nb,validatePort:Lb,validateSignalName:Pb,validateString:so,validateUint32:Il,validateUndefined:Db,validateUnion:Fb,validateAbortSignal:Bl,validateLinkHeaderValue:Ub}});var tt=_((Qv,Cl)=>{c();var K=Cl.exports={},Ie,Oe;function lo(){throw new Error("setTimeout has not been defined")}function fo(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Ie=setTimeout:Ie=lo}catch{Ie=lo}try{typeof clearTimeout=="function"?Oe=clearTimeout:Oe=fo}catch{Oe=fo}})();function Ml(t){if(Ie===setTimeout)return setTimeout(t,0);if((Ie===lo||!Ie)&&setTimeout)return Ie=setTimeout,setTimeout(t,0);try{return Ie(t,0)}catch{try{return Ie.call(null,t,0)}catch{return Ie.call(this,t,0)}}}function jb(t){if(Oe===clearTimeout)return clearTimeout(t);if((Oe===fo||!Oe)&&clearTimeout)return Oe=clearTimeout,clearTimeout(t);try{return Oe(t)}catch{try{return Oe.call(null,t)}catch{return Oe.call(this,t)}}}var We=[],Gt=!1,yt,dn=-1;function Wb(){!Gt||!yt||(Gt=!1,yt.length?We=yt.concat(We):dn=-1,We.length&&kl())}function kl(){if(!Gt){var t=Ml(Wb);Gt=!0;for(var e=We.length;e;){for(yt=We,We=[];++dn<e;)yt&&yt[dn].run();dn=-1,e=We.length}yt=null,Gt=!1,jb(t)}}K.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];We.push(new Ll(t,e)),We.length===1&&!Gt&&Ml(kl)};function Ll(t,e){this.fun=t,this.array=e}Ll.prototype.run=function(){this.fun.apply(null,this.array)};K.title="browser";K.browser=!0;K.env={};K.argv=[];K.version="";K.versions={};function $e(){}K.on=$e;K.addListener=$e;K.once=$e;K.off=$e;K.removeListener=$e;K.removeAllListeners=$e;K.emit=$e;K.prependListener=$e;K.prependOnceListener=$e;K.listeners=function(t){return[]};K.binding=function(t){throw new Error("process.binding is not supported")};K.cwd=function(){return"/"};K.chdir=function(t){throw new Error("process.chdir is not supported")};K.umask=function(){return 0}});var Pe=_((eR,Jl)=>{"use strict";c();var{SymbolAsyncIterator:Nl,SymbolIterator:Dl,SymbolFor:bt}=$(),Fl=bt("nodejs.stream.destroyed"),ql=bt("nodejs.stream.errored"),uo=bt("nodejs.stream.readable"),co=bt("nodejs.stream.writable"),Ul=bt("nodejs.stream.disturbed"),$b=bt("nodejs.webstream.isClosedPromise"),Gb=bt("nodejs.webstream.controllerErrorFunction");function hn(t,e=!1){var r;return!!(t&&typeof t.pipe=="function"&&typeof t.on=="function"&&(!e||typeof t.pause=="function"&&typeof t.resume=="function")&&(!t._writableState||((r=t._readableState)===null||r===void 0?void 0:r.readable)!==!1)&&(!t._writableState||t._readableState))}function pn(t){var e;return!!(t&&typeof t.write=="function"&&typeof t.on=="function"&&(!t._readableState||((e=t._writableState)===null||e===void 0?void 0:e.writable)!==!1))}function Hb(t){return!!(t&&typeof t.pipe=="function"&&t._readableState&&typeof t.on=="function"&&typeof t.write=="function")}function Be(t){return t&&(t._readableState||t._writableState||typeof t.write=="function"&&typeof t.on=="function"||typeof t.pipe=="function"&&typeof t.on=="function")}function jl(t){return!!(t&&!Be(t)&&typeof t.pipeThrough=="function"&&typeof t.getReader=="function"&&typeof t.cancel=="function")}function Wl(t){return!!(t&&!Be(t)&&typeof t.getWriter=="function"&&typeof t.abort=="function")}function $l(t){return!!(t&&!Be(t)&&typeof t.readable=="object"&&typeof t.writable=="object")}function Vb(t){return jl(t)||Wl(t)||$l(t)}function Kb(t,e){return t==null?!1:e===!0?typeof t[Nl]=="function":e===!1?typeof t[Dl]=="function":typeof t[Nl]=="function"||typeof t[Dl]=="function"}function yn(t){if(!Be(t))return null;let e=t._writableState,r=t._readableState,n=e||r;return!!(t.destroyed||t[Fl]||n!=null&&n.destroyed)}function Gl(t){if(!pn(t))return null;if(t.writableEnded===!0)return!0;let e=t._writableState;return e!=null&&e.errored?!1:typeof e?.ended!="boolean"?null:e.ended}function zb(t,e){if(!pn(t))return null;if(t.writableFinished===!0)return!0;let r=t._writableState;return r!=null&&r.errored?!1:typeof r?.finished!="boolean"?null:!!(r.finished||e===!1&&r.ended===!0&&r.length===0)}function Yb(t){if(!hn(t))return null;if(t.readableEnded===!0)return!0;let e=t._readableState;return!e||e.errored?!1:typeof e?.ended!="boolean"?null:e.ended}function Hl(t,e){if(!hn(t))return null;let r=t._readableState;return r!=null&&r.errored?!1:typeof r?.endEmitted!="boolean"?null:!!(r.endEmitted||e===!1&&r.ended===!0&&r.length===0)}function Vl(t){return t&&t[uo]!=null?t[uo]:typeof t?.readable!="boolean"?null:yn(t)?!1:hn(t)&&t.readable&&!Hl(t)}function Kl(t){return t&&t[co]!=null?t[co]:typeof t?.writable!="boolean"?null:yn(t)?!1:pn(t)&&t.writable&&!Gl(t)}function Jb(t,e){return Be(t)?yn(t)?!0:!(e?.readable!==!1&&Vl(t)||e?.writable!==!1&&Kl(t)):null}function Xb(t){var e,r;return Be(t)?t.writableErrored?t.writableErrored:(e=(r=t._writableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function Qb(t){var e,r;return Be(t)?t.readableErrored?t.readableErrored:(e=(r=t._readableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function Zb(t){if(!Be(t))return null;if(typeof t.closed=="boolean")return t.closed;let e=t._writableState,r=t._readableState;return typeof e?.closed=="boolean"||typeof r?.closed=="boolean"?e?.closed||r?.closed:typeof t._closed=="boolean"&&zl(t)?t._closed:null}function zl(t){return typeof t._closed=="boolean"&&typeof t._defaultKeepAlive=="boolean"&&typeof t._removedConnection=="boolean"&&typeof t._removedContLen=="boolean"}function Yl(t){return typeof t._sent100=="boolean"&&zl(t)}function eg(t){var e;return typeof t._consuming=="boolean"&&typeof t._dumped=="boolean"&&((e=t.req)===null||e===void 0?void 0:e.upgradeOrConnect)===void 0}function tg(t){if(!Be(t))return null;let e=t._writableState,r=t._readableState,n=e||r;return!n&&Yl(t)||!!(n&&n.autoDestroy&&n.emitClose&&n.closed===!1)}function rg(t){var e;return!!(t&&((e=t[Ul])!==null&&e!==void 0?e:t.readableDidRead||t.readableAborted))}function ng(t){var e,r,n,i,o,a,s,l,f,u;return!!(t&&((e=(r=(n=(i=(o=(a=t[ql])!==null&&a!==void 0?a:t.readableErrored)!==null&&o!==void 0?o:t.writableErrored)!==null&&i!==void 0?i:(s=t._readableState)===null||s===void 0?void 0:s.errorEmitted)!==null&&n!==void 0?n:(l=t._writableState)===null||l===void 0?void 0:l.errorEmitted)!==null&&r!==void 0?r:(f=t._readableState)===null||f===void 0?void 0:f.errored)!==null&&e!==void 0?e:!((u=t._writableState)===null||u===void 0)&&u.errored))}Jl.exports={isDestroyed:yn,kIsDestroyed:Fl,isDisturbed:rg,kIsDisturbed:Ul,isErrored:ng,kIsErrored:ql,isReadable:Vl,kIsReadable:uo,kIsClosedPromise:$b,kControllerErrorFunction:Gb,kIsWritable:co,isClosed:Zb,isDuplexNodeStream:Hb,isFinished:Jb,isIterable:Kb,isReadableNodeStream:hn,isReadableStream:jl,isReadableEnded:Yb,isReadableFinished:Hl,isReadableErrored:Qb,isNodeStream:Be,isWebStream:Vb,isWritable:Kl,isWritableNodeStream:pn,isWritableStream:Wl,isWritableEnded:Gl,isWritableFinished:zb,isWritableErrored:Xb,isServerRequest:eg,isServerResponse:Yl,willEmitClose:tg,isTransformStream:$l}});var Ge=_((rR,go)=>{c();var rt=tt(),{AbortError:af,codes:ig}=ae(),{ERR_INVALID_ARG_TYPE:og,ERR_STREAM_PREMATURE_CLOSE:Xl}=ig,{kEmptyObject:po,once:yo}=ne(),{validateAbortSignal:ag,validateFunction:sg,validateObject:lg,validateBoolean:fg}=$t(),{Promise:ug,PromisePrototypeThen:cg,SymbolDispose:sf}=$(),{isClosed:dg,isReadable:Ql,isReadableNodeStream:ho,isReadableStream:hg,isReadableFinished:Zl,isReadableErrored:ef,isWritable:tf,isWritableNodeStream:rf,isWritableStream:pg,isWritableFinished:nf,isWritableErrored:of,isNodeStream:yg,willEmitClose:bg,kIsClosedPromise:gg}=Pe(),Ht;function wg(t){return t.setHeader&&typeof t.abort=="function"}var bo=()=>{};function lf(t,e,r){var n,i;if(arguments.length===2?(r=e,e=po):e==null?e=po:lg(e,"options"),sg(r,"callback"),ag(e.signal,"options.signal"),r=yo(r),hg(t)||pg(t))return mg(t,e,r);if(!yg(t))throw new og("stream",["ReadableStream","WritableStream","Stream"],t);let o=(n=e.readable)!==null&&n!==void 0?n:ho(t),a=(i=e.writable)!==null&&i!==void 0?i:rf(t),s=t._writableState,l=t._readableState,f=()=>{t.writable||b()},u=bg(t)&&ho(t)===o&&rf(t)===a,d=nf(t,!1),b=()=>{d=!0,t.destroyed&&(u=!1),!(u&&(!t.readable||o))&&(!o||h)&&r.call(t)},h=Zl(t,!1),E=()=>{h=!0,t.destroyed&&(u=!1),!(u&&(!t.writable||a))&&(!a||d)&&r.call(t)},m=I=>{r.call(t,I)},A=dg(t),S=()=>{A=!0;let I=of(t)||ef(t);if(I&&typeof I!="boolean")return r.call(t,I);if(o&&!h&&ho(t,!0)&&!Zl(t,!1))return r.call(t,new Xl);if(a&&!d&&!nf(t,!1))return r.call(t,new Xl);r.call(t)},R=()=>{A=!0;let I=of(t)||ef(t);if(I&&typeof I!="boolean")return r.call(t,I);r.call(t)},M=()=>{t.req.on("finish",b)};wg(t)?(t.on("complete",b),u||t.on("abort",S),t.req?M():t.on("request",M)):a&&!s&&(t.on("end",f),t.on("close",f)),!u&&typeof t.aborted=="boolean"&&t.on("aborted",S),t.on("end",E),t.on("finish",b),e.error!==!1&&t.on("error",m),t.on("close",S),A?rt.nextTick(S):s!=null&&s.errorEmitted||l!=null&&l.errorEmitted?u||rt.nextTick(R):(!o&&(!u||Ql(t))&&(d||tf(t)===!1)||!a&&(!u||tf(t))&&(h||Ql(t)===!1)||l&&t.req&&t.aborted)&&rt.nextTick(R);let v=()=>{r=bo,t.removeListener("aborted",S),t.removeListener("complete",b),t.removeListener("abort",S),t.removeListener("request",M),t.req&&t.req.removeListener("finish",b),t.removeListener("end",f),t.removeListener("close",f),t.removeListener("finish",b),t.removeListener("end",E),t.removeListener("error",m),t.removeListener("close",S)};if(e.signal&&!A){let I=()=>{let j=r;v(),j.call(t,new af(void 0,{cause:e.signal.reason}))};if(e.signal.aborted)rt.nextTick(I);else{Ht=Ht||ne().addAbortListener;let j=Ht(e.signal,I),F=r;r=yo((...X)=>{j[sf](),F.apply(t,X)})}}return v}function mg(t,e,r){let n=!1,i=bo;if(e.signal)if(i=()=>{n=!0,r.call(t,new af(void 0,{cause:e.signal.reason}))},e.signal.aborted)rt.nextTick(i);else{Ht=Ht||ne().addAbortListener;let a=Ht(e.signal,i),s=r;r=yo((...l)=>{a[sf](),s.apply(t,l)})}let o=(...a)=>{n||rt.nextTick(()=>r.apply(t,a))};return cg(t[gg].promise,o,o),bo}function _g(t,e){var r;let n=!1;return e===null&&(e=po),(r=e)!==null&&r!==void 0&&r.cleanup&&(fg(e.cleanup,"cleanup"),n=e.cleanup),new ug((i,o)=>{let a=lf(t,e,s=>{n&&a(),s?o(s):i()})})}go.exports=lf;go.exports.finished=_g});var gt=_((iR,bf)=>{"use strict";c();var Me=tt(),{aggregateTwoErrors:Eg,codes:{ERR_MULTIPLE_CALLBACK:Sg},AbortError:Ag}=ae(),{Symbol:cf}=$(),{kIsDestroyed:vg,isDestroyed:Rg,isFinished:xg,isServerRequest:Tg}=Pe(),df=cf("kDestroy"),wo=cf("kConstruct");function hf(t,e,r){t&&(t.stack,e&&!e.errored&&(e.errored=t),r&&!r.errored&&(r.errored=t))}function Ig(t,e){let r=this._readableState,n=this._writableState,i=n||r;return n!=null&&n.destroyed||r!=null&&r.destroyed?(typeof e=="function"&&e(),this):(hf(t,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),i.constructed?ff(this,t,e):this.once(df,function(o){ff(this,Eg(o,t),e)}),this)}function ff(t,e,r){let n=!1;function i(o){if(n)return;n=!0;let a=t._readableState,s=t._writableState;hf(o,s,a),s&&(s.closed=!0),a&&(a.closed=!0),typeof r=="function"&&r(o),o?Me.nextTick(Og,t,o):Me.nextTick(pf,t)}try{t._destroy(e||null,i)}catch(o){i(o)}}function Og(t,e){mo(t,e),pf(t)}function pf(t){let e=t._readableState,r=t._writableState;r&&(r.closeEmitted=!0),e&&(e.closeEmitted=!0),(r!=null&&r.emitClose||e!=null&&e.emitClose)&&t.emit("close")}function mo(t,e){let r=t._readableState,n=t._writableState;n!=null&&n.errorEmitted||r!=null&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),t.emit("error",e))}function Bg(){let t=this._readableState,e=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=t.readable===!1,t.endEmitted=t.readable===!1),e&&(e.constructed=!0,e.destroyed=!1,e.closed=!1,e.closeEmitted=!1,e.errored=null,e.errorEmitted=!1,e.finalCalled=!1,e.prefinished=!1,e.ended=e.writable===!1,e.ending=e.writable===!1,e.finished=e.writable===!1)}function _o(t,e,r){let n=t._readableState,i=t._writableState;if(i!=null&&i.destroyed||n!=null&&n.destroyed)return this;n!=null&&n.autoDestroy||i!=null&&i.autoDestroy?t.destroy(e):e&&(e.stack,i&&!i.errored&&(i.errored=e),n&&!n.errored&&(n.errored=e),r?Me.nextTick(mo,t,e):mo(t,e))}function Pg(t,e){if(typeof t._construct!="function")return;let r=t._readableState,n=t._writableState;r&&(r.constructed=!1),n&&(n.constructed=!1),t.once(wo,e),!(t.listenerCount(wo)>1)&&Me.nextTick(Mg,t)}function Mg(t){let e=!1;function r(n){if(e){_o(t,n??new Sg);return}e=!0;let i=t._readableState,o=t._writableState,a=o||i;i&&(i.constructed=!0),o&&(o.constructed=!0),a.destroyed?t.emit(df,n):n?_o(t,n,!0):Me.nextTick(kg,t)}try{t._construct(n=>{Me.nextTick(r,n)})}catch(n){Me.nextTick(r,n)}}function kg(t){t.emit(wo)}function uf(t){return t?.setHeader&&typeof t.abort=="function"}function yf(t){t.emit("close")}function Lg(t,e){t.emit("error",e),Me.nextTick(yf,t)}function Cg(t,e){!t||Rg(t)||(!e&&!xg(t)&&(e=new Ag),Tg(t)?(t.socket=null,t.destroy(e)):uf(t)?t.abort():uf(t.req)?t.req.abort():typeof t.destroy=="function"?t.destroy(e):typeof t.close=="function"?t.close():e?Me.nextTick(Lg,t,e):Me.nextTick(yf,t),t.destroyed||(t[vg]=!0))}bf.exports={construct:Pg,destroyer:Cg,destroy:Ig,undestroy:Bg,errorOrDestroy:_o}});var wn=_((aR,wf)=>{"use strict";c();var{ArrayIsArray:Ng,ObjectSetPrototypeOf:gf}=$(),{EventEmitter:bn}=Te();function gn(t){bn.call(this,t)}gf(gn.prototype,bn.prototype);gf(gn,bn);gn.prototype.pipe=function(t,e){let r=this;function n(u){t.writable&&t.write(u)===!1&&r.pause&&r.pause()}r.on("data",n);function i(){r.readable&&r.resume&&r.resume()}t.on("drain",i),!t._isStdio&&(!e||e.end!==!1)&&(r.on("end",a),r.on("close",s));let o=!1;function a(){o||(o=!0,t.end())}function s(){o||(o=!0,typeof t.destroy=="function"&&t.destroy())}function l(u){f(),bn.listenerCount(this,"error")===0&&this.emit("error",u)}Eo(r,"error",l),Eo(t,"error",l);function f(){r.removeListener("data",n),t.removeListener("drain",i),r.removeListener("end",a),r.removeListener("close",s),r.removeListener("error",l),t.removeListener("error",l),r.removeListener("end",f),r.removeListener("close",f),t.removeListener("close",f)}return r.on("end",f),r.on("close",f),t.on("close",f),t.emit("pipe",r),t};function Eo(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Ng(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}wf.exports={Stream:gn,prependListener:Eo}});var _r=_((lR,mn)=>{"use strict";c();var{SymbolDispose:Dg}=$(),{AbortError:mf,codes:Fg}=ae(),{isNodeStream:_f,isWebStream:qg,kControllerErrorFunction:Ug}=Pe(),jg=Ge(),{ERR_INVALID_ARG_TYPE:Ef}=Fg,So,Wg=(t,e)=>{if(typeof t!="object"||!("aborted"in t))throw new Ef(e,"AbortSignal",t)};mn.exports.addAbortSignal=function(e,r){if(Wg(e,"signal"),!_f(r)&&!qg(r))throw new Ef("stream",["ReadableStream","WritableStream","Stream"],r);return mn.exports.addAbortSignalNoValidate(e,r)};mn.exports.addAbortSignalNoValidate=function(t,e){if(typeof t!="object"||!("aborted"in t))return e;let r=_f(e)?()=>{e.destroy(new mf(void 0,{cause:t.reason}))}:()=>{e[Ug](new mf(void 0,{cause:t.reason}))};if(t.aborted)r();else{So=So||ne().addAbortListener;let n=So(t,r);jg(e,n[Dg])}return e}});var vf=_((cR,Af)=>{"use strict";c();var{StringPrototypeSlice:Sf,SymbolIterator:$g,TypedArrayPrototypeSet:_n,Uint8Array:Gg}=$(),{Buffer:Ao}=de(),{inspect:Hg}=ne();Af.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){let r={data:e,next:null};this.length>0?this.tail.next=r:this.head=r,this.tail=r,++this.length}unshift(e){let r={data:e,next:this.head};this.length===0&&(this.tail=r),this.head=r,++this.length}shift(){if(this.length===0)return;let e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(this.length===0)return"";let r=this.head,n=""+r.data;for(;(r=r.next)!==null;)n+=e+r.data;return n}concat(e){if(this.length===0)return Ao.alloc(0);let r=Ao.allocUnsafe(e>>>0),n=this.head,i=0;for(;n;)_n(r,n.data,i),i+=n.data.length,n=n.next;return r}consume(e,r){let n=this.head.data;if(e<n.length){let i=n.slice(0,e);return this.head.data=n.slice(e),i}return e===n.length?this.shift():r?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[$g](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let r="",n=this.head,i=0;do{let o=n.data;if(e>o.length)r+=o,e-=o.length;else{e===o.length?(r+=o,++i,n.next?this.head=n.next:this.head=this.tail=null):(r+=Sf(o,0,e),this.head=n,n.data=Sf(o,e));break}++i}while((n=n.next)!==null);return this.length-=i,r}_getBuffer(e){let r=Ao.allocUnsafe(e),n=e,i=this.head,o=0;do{let a=i.data;if(e>a.length)_n(r,a,n-e),e-=a.length;else{e===a.length?(_n(r,a,n-e),++o,i.next?this.head=i.next:this.head=this.tail=null):(_n(r,new Gg(a.buffer,a.byteOffset,e),n-e),this.head=i,i.data=a.slice(e));break}++o}while((i=i.next)!==null);return this.length-=o,r}[Symbol.for("nodejs.util.inspect.custom")](e,r){return Hg(this,{...r,depth:0,customInspect:!1})}}});var Er=_((hR,If)=>{"use strict";c();var{MathFloor:Vg,NumberIsInteger:Kg}=$(),{validateInteger:zg}=$t(),{ERR_INVALID_ARG_VALUE:Yg}=ae().codes,Rf=16*1024,xf=16;function Jg(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Tf(t){return t?xf:Rf}function Xg(t,e){zg(e,"value",0),t?xf=e:Rf=e}function Qg(t,e,r,n){let i=Jg(e,n,r);if(i!=null){if(!Kg(i)||i<0){let o=n?`options.${r}`:"options.highWaterMark";throw new Yg(o,i)}return Vg(i)}return Tf(t.objectMode)}If.exports={getHighWaterMark:Qg,getDefaultHighWaterMark:Tf,setDefaultHighWaterMark:Xg}});var Pf=_((vo,Bf)=>{c();var En=de(),ke=En.Buffer;function Of(t,e){for(var r in t)e[r]=t[r]}ke.from&&ke.alloc&&ke.allocUnsafe&&ke.allocUnsafeSlow?Bf.exports=En:(Of(En,vo),vo.Buffer=wt);function wt(t,e,r){return ke(t,e,r)}wt.prototype=Object.create(ke.prototype);Of(ke,wt);wt.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return ke(t,e,r)};wt.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=ke(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};wt.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return ke(t)};wt.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return En.SlowBuffer(t)}});var Sn=_(kf=>{"use strict";c();var xo=Pf().Buffer,Mf=xo.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Zg(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function ew(t){var e=Zg(t);if(typeof e!="string"&&(xo.isEncoding===Mf||!Mf(t)))throw new Error("Unknown encoding: "+t);return e||t}kf.StringDecoder=Sr;function Sr(t){this.encoding=ew(t);var e;switch(this.encoding){case"utf16le":this.text=aw,this.end=sw,e=4;break;case"utf8":this.fillLast=nw,e=4;break;case"base64":this.text=lw,this.end=fw,e=3;break;default:this.write=uw,this.end=cw;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=xo.allocUnsafe(e)}Sr.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};Sr.prototype.end=ow;Sr.prototype.text=iw;Sr.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function Ro(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function tw(t,e,r){var n=e.length-1;if(n<r)return 0;var i=Ro(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=Ro(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=Ro(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function rw(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function nw(t){var e=this.lastTotal-this.lastNeed,r=rw(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function iw(t,e){var r=tw(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function ow(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function aw(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function sw(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function lw(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function fw(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function uw(t){return t.toString(this.encoding)}function cw(t){return t&&t.length?this.write(t):""}});var To=_((wR,Df)=>{"use strict";c();var Lf=tt(),{PromisePrototypeThen:dw,SymbolAsyncIterator:Cf,SymbolIterator:Nf}=$(),{Buffer:hw}=de(),{ERR_INVALID_ARG_TYPE:pw,ERR_STREAM_NULL_VALUES:yw}=ae().codes;function bw(t,e,r){let n;if(typeof e=="string"||e instanceof hw)return new t({objectMode:!0,...r,read(){this.push(e),this.push(null)}});let i;if(e&&e[Cf])i=!0,n=e[Cf]();else if(e&&e[Nf])i=!1,n=e[Nf]();else throw new pw("iterable",["Iterable"],e);let o=new t({objectMode:!0,highWaterMark:1,...r}),a=!1;o._read=function(){a||(a=!0,l())},o._destroy=function(f,u){dw(s(f),()=>Lf.nextTick(u,f),d=>Lf.nextTick(u,d||f))};async function s(f){let u=f!=null,d=typeof n.throw=="function";if(u&&d){let{value:b,done:h}=await n.throw(f);if(await b,h)return}if(typeof n.return=="function"){let{value:b}=await n.return();await b}}async function l(){for(;;){try{let{value:f,done:u}=i?await n.next():n.next();if(u)o.push(null);else{let d=f&&typeof f.then=="function"?await f:f;if(d===null)throw a=!1,new yw;if(o.push(d))continue;a=!1}}catch(f){o.destroy(f)}break}}return o}Df.exports=bw});var vr=_((_R,tu)=>{c();var Se=tt(),{ArrayPrototypeIndexOf:gw,NumberIsInteger:ww,NumberIsNaN:mw,NumberParseInt:_w,ObjectDefineProperties:Co,ObjectKeys:Ew,ObjectSetPrototypeOf:Uf,Promise:jf,SafeSet:Sw,SymbolAsyncDispose:Aw,SymbolAsyncIterator:vw,Symbol:Rw}=$();tu.exports=x;x.ReadableState=xn;var{EventEmitter:xw}=Te(),{Stream:nt,prependListener:Tw}=wn(),{Buffer:Io}=de(),{addAbortSignal:Iw}=_r(),Wf=Ge(),k=ne().debuglog("stream",t=>{k=t}),Ow=vf(),zt=gt(),{getHighWaterMark:Bw,getDefaultHighWaterMark:Pw}=Er(),{aggregateTwoErrors:Ff,codes:{ERR_INVALID_ARG_TYPE:Mw,ERR_METHOD_NOT_IMPLEMENTED:kw,ERR_OUT_OF_RANGE:Lw,ERR_STREAM_PUSH_AFTER_EOF:Cw,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:Nw},AbortError:Dw}=ae(),{validateObject:Fw}=$t(),mt=Rw("kPaused"),{StringDecoder:$f}=Sn(),qw=To();Uf(x.prototype,nt.prototype);Uf(x,nt);var Oo=()=>{},{errorOrDestroy:Vt}=zt,Kt=1,Uw=2,Gf=4,Ar=8,Hf=16,An=32,vn=64,Vf=128,jw=256,Ww=512,$w=1024,ko=2048,Lo=4096,Gw=8192,Hw=16384,Vw=32768,Kf=65536,Kw=1<<17,zw=1<<18;function z(t){return{enumerable:!1,get(){return(this.state&t)!==0},set(e){e?this.state|=t:this.state&=~t}}}Co(xn.prototype,{objectMode:z(Kt),ended:z(Uw),endEmitted:z(Gf),reading:z(Ar),constructed:z(Hf),sync:z(An),needReadable:z(vn),emittedReadable:z(Vf),readableListening:z(jw),resumeScheduled:z(Ww),errorEmitted:z($w),emitClose:z(ko),autoDestroy:z(Lo),destroyed:z(Gw),closed:z(Hw),closeEmitted:z(Vw),multiAwaitDrain:z(Kf),readingMore:z(Kw),dataEmitted:z(zw)});function xn(t,e,r){typeof r!="boolean"&&(r=e instanceof Le()),this.state=ko|Lo|Hf|An,t&&t.objectMode&&(this.state|=Kt),r&&t&&t.readableObjectMode&&(this.state|=Kt),this.highWaterMark=t?Bw(this,t,"readableHighWaterMark",r):Pw(!1),this.buffer=new Ow,this.length=0,this.pipes=[],this.flowing=null,this[mt]=null,t&&t.emitClose===!1&&(this.state&=~ko),t&&t.autoDestroy===!1&&(this.state&=~Lo),this.errored=null,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,t&&t.encoding&&(this.decoder=new $f(t.encoding),this.encoding=t.encoding)}function x(t){if(!(this instanceof x))return new x(t);let e=this instanceof Le();this._readableState=new xn(t,this,e),t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.construct=="function"&&(this._construct=t.construct),t.signal&&!e&&Iw(t.signal,this)),nt.call(this,t),zt.construct(this,()=>{this._readableState.needReadable&&Rn(this,this._readableState)})}x.prototype.destroy=zt.destroy;x.prototype._undestroy=zt.undestroy;x.prototype._destroy=function(t,e){e(t)};x.prototype[xw.captureRejectionSymbol]=function(t){this.destroy(t)};x.prototype[Aw]=function(){let t;return this.destroyed||(t=this.readableEnded?null:new Dw,this.destroy(t)),new jf((e,r)=>Wf(this,n=>n&&n!==t?r(n):e(null)))};x.prototype.push=function(t,e){return zf(this,t,e,!1)};x.prototype.unshift=function(t,e){return zf(this,t,e,!0)};function zf(t,e,r,n){k("readableAddChunk",e);let i=t._readableState,o;if(i.state&Kt||(typeof e=="string"?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?e=Io.from(e,r).toString(i.encoding):(e=Io.from(e,r),r=""))):e instanceof Io?r="":nt._isUint8Array(e)?(e=nt._uint8ArrayToBuffer(e),r=""):e!=null&&(o=new Mw("chunk",["string","Buffer","Uint8Array"],e))),o)Vt(t,o);else if(e===null)i.state&=~Ar,Xw(t,i);else if(i.state&Kt||e&&e.length>0)if(n)if(i.state&Gf)Vt(t,new Nw);else{if(i.destroyed||i.errored)return!1;Bo(t,i,e,!0)}else if(i.ended)Vt(t,new Cw);else{if(i.destroyed||i.errored)return!1;i.state&=~Ar,i.decoder&&!r?(e=i.decoder.write(e),i.objectMode||e.length!==0?Bo(t,i,e,!1):Rn(t,i)):Bo(t,i,e,!1)}else n||(i.state&=~Ar,Rn(t,i));return!i.ended&&(i.length<i.highWaterMark||i.length===0)}function Bo(t,e,r,n){e.flowing&&e.length===0&&!e.sync&&t.listenerCount("data")>0?(e.state&Kf?e.awaitDrainWriters.clear():e.awaitDrainWriters=null,e.dataEmitted=!0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.state&vn&&Tn(t)),Rn(t,e)}x.prototype.isPaused=function(){let t=this._readableState;return t[mt]===!0||t.flowing===!1};x.prototype.setEncoding=function(t){let e=new $f(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;let r=this._readableState.buffer,n="";for(let i of r)n+=e.write(i);return r.clear(),n!==""&&r.push(n),this._readableState.length=n.length,this};var Yw=1073741824;function Jw(t){if(t>Yw)throw new Lw("size","<= 1GiB",t);return t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++,t}function qf(t,e){return t<=0||e.length===0&&e.ended?0:e.state&Kt?1:mw(t)?e.flowing&&e.length?e.buffer.first().length:e.length:t<=e.length?t:e.ended?e.length:0}x.prototype.read=function(t){k("read",t),t===void 0?t=NaN:ww(t)||(t=_w(t,10));let e=this._readableState,r=t;if(t>e.highWaterMark&&(e.highWaterMark=Jw(t)),t!==0&&(e.state&=~Vf),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return k("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Po(this):Tn(this),null;if(t=qf(t,e),t===0&&e.ended)return e.length===0&&Po(this),null;let n=(e.state&vn)!==0;if(k("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,k("length less than watermark",n)),e.ended||e.reading||e.destroyed||e.errored||!e.constructed)n=!1,k("reading, ended or constructing",n);else if(n){k("do read"),e.state|=Ar|An,e.length===0&&(e.state|=vn);try{this._read(e.highWaterMark)}catch(o){Vt(this,o)}e.state&=~An,e.reading||(t=qf(r,e))}let i;return t>0?i=Zf(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Po(this)),i!==null&&!e.errorEmitted&&!e.closeEmitted&&(e.dataEmitted=!0,this.emit("data",i)),i};function Xw(t,e){if(k("onEofChunk"),!e.ended){if(e.decoder){let r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Tn(t):(e.needReadable=!1,e.emittedReadable=!0,Yf(t))}}function Tn(t){let e=t._readableState;k("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(k("emitReadable",e.flowing),e.emittedReadable=!0,Se.nextTick(Yf,t))}function Yf(t){let e=t._readableState;k("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&!e.errored&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Xf(t)}function Rn(t,e){!e.readingMore&&e.constructed&&(e.readingMore=!0,Se.nextTick(Qw,t,e))}function Qw(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){let r=e.length;if(k("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}x.prototype._read=function(t){throw new kw("_read()")};x.prototype.pipe=function(t,e){let r=this,n=this._readableState;n.pipes.length===1&&(n.multiAwaitDrain||(n.multiAwaitDrain=!0,n.awaitDrainWriters=new Sw(n.awaitDrainWriters?[n.awaitDrainWriters]:[]))),n.pipes.push(t),k("pipe count=%d opts=%j",n.pipes.length,e);let o=(!e||e.end!==!1)&&t!==Se.stdout&&t!==Se.stderr?s:A;n.endEmitted?Se.nextTick(o):r.once("end",o),t.on("unpipe",a);function a(S,R){k("onunpipe"),S===r&&R&&R.hasUnpiped===!1&&(R.hasUnpiped=!0,u())}function s(){k("onend"),t.end()}let l,f=!1;function u(){k("cleanup"),t.removeListener("close",E),t.removeListener("finish",m),l&&t.removeListener("drain",l),t.removeListener("error",h),t.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",A),r.removeListener("data",b),f=!0,l&&n.awaitDrainWriters&&(!t._writableState||t._writableState.needDrain)&&l()}function d(){f||(n.pipes.length===1&&n.pipes[0]===t?(k("false write response, pause",0),n.awaitDrainWriters=t,n.multiAwaitDrain=!1):n.pipes.length>1&&n.pipes.includes(t)&&(k("false write response, pause",n.awaitDrainWriters.size),n.awaitDrainWriters.add(t)),r.pause()),l||(l=Zw(r,t),t.on("drain",l))}r.on("data",b);function b(S){k("ondata");let R=t.write(S);k("dest.write",R),R===!1&&d()}function h(S){if(k("onerror",S),A(),t.removeListener("error",h),t.listenerCount("error")===0){let R=t._writableState||t._readableState;R&&!R.errorEmitted?Vt(t,S):t.emit("error",S)}}Tw(t,"error",h);function E(){t.removeListener("finish",m),A()}t.once("close",E);function m(){k("onfinish"),t.removeListener("close",E),A()}t.once("finish",m);function A(){k("unpipe"),r.unpipe(t)}return t.emit("pipe",r),t.writableNeedDrain===!0?d():n.flowing||(k("pipe resume"),r.resume()),t};function Zw(t,e){return function(){let n=t._readableState;n.awaitDrainWriters===e?(k("pipeOnDrain",1),n.awaitDrainWriters=null):n.multiAwaitDrain&&(k("pipeOnDrain",n.awaitDrainWriters.size),n.awaitDrainWriters.delete(e)),(!n.awaitDrainWriters||n.awaitDrainWriters.size===0)&&t.listenerCount("data")&&t.resume()}}x.prototype.unpipe=function(t){let e=this._readableState,r={hasUnpiped:!1};if(e.pipes.length===0)return this;if(!t){let i=e.pipes;e.pipes=[],this.pause();for(let o=0;o<i.length;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}let n=gw(e.pipes,t);return n===-1?this:(e.pipes.splice(n,1),e.pipes.length===0&&this.pause(),t.emit("unpipe",this,r),this)};x.prototype.on=function(t,e){let r=nt.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,k("on readable",n.length,n.reading),n.length?Tn(this):n.reading||Se.nextTick(em,this)),r};x.prototype.addListener=x.prototype.on;x.prototype.removeListener=function(t,e){let r=nt.prototype.removeListener.call(this,t,e);return t==="readable"&&Se.nextTick(Jf,this),r};x.prototype.off=x.prototype.removeListener;x.prototype.removeAllListeners=function(t){let e=nt.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&Se.nextTick(Jf,this),e};function Jf(t){let e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&e[mt]===!1?e.flowing=!0:t.listenerCount("data")>0?t.resume():e.readableListening||(e.flowing=null)}function em(t){k("readable nexttick read 0"),t.read(0)}x.prototype.resume=function(){let t=this._readableState;return t.flowing||(k("resume"),t.flowing=!t.readableListening,tm(this,t)),t[mt]=!1,this};function tm(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Se.nextTick(rm,t,e))}function rm(t,e){k("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Xf(t),e.flowing&&!e.reading&&t.read(0)}x.prototype.pause=function(){return k("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(k("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[mt]=!0,this};function Xf(t){let e=t._readableState;for(k("flow",e.flowing);e.flowing&&t.read()!==null;);}x.prototype.wrap=function(t){let e=!1;t.on("data",n=>{!this.push(n)&&t.pause&&(e=!0,t.pause())}),t.on("end",()=>{this.push(null)}),t.on("error",n=>{Vt(this,n)}),t.on("close",()=>{this.destroy()}),t.on("destroy",()=>{this.destroy()}),this._read=()=>{e&&t.resume&&(e=!1,t.resume())};let r=Ew(t);for(let n=1;n<r.length;n++){let i=r[n];this[i]===void 0&&typeof t[i]=="function"&&(this[i]=t[i].bind(t))}return this};x.prototype[vw]=function(){return Qf(this)};x.prototype.iterator=function(t){return t!==void 0&&Fw(t,"options"),Qf(this,t)};function Qf(t,e){typeof t.read!="function"&&(t=x.wrap(t,{objectMode:!0}));let r=nm(t,e);return r.stream=t,r}async function*nm(t,e){let r=Oo;function n(a){this===t?(r(),r=Oo):r=a}t.on("readable",n);let i,o=Wf(t,{writable:!1},a=>{i=a?Ff(i,a):null,r(),r=Oo});try{for(;;){let a=t.destroyed?null:t.read();if(a!==null)yield a;else{if(i)throw i;if(i===null)return;await new jf(n)}}}catch(a){throw i=Ff(i,a),i}finally{(i||e?.destroyOnReturn!==!1)&&(i===void 0||t._readableState.autoDestroy)?zt.destroyer(t,null):(t.off("readable",n),o())}}Co(x.prototype,{readable:{__proto__:null,get(){let t=this._readableState;return!!t&&t.readable!==!1&&!t.destroyed&&!t.errorEmitted&&!t.endEmitted},set(t){this._readableState&&(this._readableState.readable=!!t)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(t){this._readableState&&(this._readableState.destroyed=t)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}});Co(xn.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[mt]!==!1},set(t){this[mt]=!!t}}});x._fromList=Zf;function Zf(t,e){if(e.length===0)return null;let r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function Po(t){let e=t._readableState;k("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,Se.nextTick(im,e,t))}function im(t,e){if(k("endReadableNT",t.endEmitted,t.length),!t.errored&&!t.closeEmitted&&!t.endEmitted&&t.length===0){if(t.endEmitted=!0,e.emit("end"),e.writable&&e.allowHalfOpen===!1)Se.nextTick(om,e);else if(t.autoDestroy){let r=e._writableState;(!r||r.autoDestroy&&(r.finished||r.writable===!1))&&e.destroy()}}}function om(t){t.writable&&!t.writableEnded&&!t.destroyed&&t.end()}x.from=function(t,e){return qw(x,t,e)};var Mo;function eu(){return Mo===void 0&&(Mo={}),Mo}x.fromWeb=function(t,e){return eu().newStreamReadableFromReadableStream(t,e)};x.toWeb=function(t,e){return eu().newReadableStreamFromStreamReadable(t,e)};x.wrap=function(t,e){var r,n;return new x({objectMode:(r=(n=t.readableObjectMode)!==null&&n!==void 0?n:t.objectMode)!==null&&r!==void 0?r:!0,...e,destroy(i,o){zt.destroyer(t,i),o(i)}}).wrap(t)}});var Mn=_((SR,hu)=>{c();var _t=tt(),{ArrayPrototypeSlice:iu,Error:am,FunctionPrototypeSymbolHasInstance:ou,ObjectDefineProperty:au,ObjectDefineProperties:sm,ObjectSetPrototypeOf:su,StringPrototypeToLowerCase:lm,Symbol:fm,SymbolHasInstance:um}=$();hu.exports=G;G.WritableState=Tr;var{EventEmitter:cm}=Te(),Rr=wn().Stream,{Buffer:In}=de(),Pn=gt(),{addAbortSignal:dm}=_r(),{getHighWaterMark:hm,getDefaultHighWaterMark:pm}=Er(),{ERR_INVALID_ARG_TYPE:ym,ERR_METHOD_NOT_IMPLEMENTED:bm,ERR_MULTIPLE_CALLBACK:lu,ERR_STREAM_CANNOT_PIPE:gm,ERR_STREAM_DESTROYED:xr,ERR_STREAM_ALREADY_FINISHED:wm,ERR_STREAM_NULL_VALUES:mm,ERR_STREAM_WRITE_AFTER_END:_m,ERR_UNKNOWN_ENCODING:fu}=ae().codes,{errorOrDestroy:Yt}=Pn;su(G.prototype,Rr.prototype);su(G,Rr);function Fo(){}var Jt=fm("kOnFinished");function Tr(t,e,r){typeof r!="boolean"&&(r=e instanceof Le()),this.objectMode=!!(t&&t.objectMode),r&&(this.objectMode=this.objectMode||!!(t&&t.writableObjectMode)),this.highWaterMark=t?hm(this,t,"writableHighWaterMark",r):pm(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let n=!!(t&&t.decodeStrings===!1);this.decodeStrings=!n,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=Sm.bind(void 0,e),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,Bn(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!t||t.emitClose!==!1,this.autoDestroy=!t||t.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[Jt]=[]}function Bn(t){t.buffered=[],t.bufferedIndex=0,t.allBuffers=!0,t.allNoop=!0}Tr.prototype.getBuffer=function(){return iu(this.buffered,this.bufferedIndex)};au(Tr.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function G(t){let e=this instanceof Le();if(!e&&!ou(G,this))return new G(t);this._writableState=new Tr(t,this,e),t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final),typeof t.construct=="function"&&(this._construct=t.construct),t.signal&&dm(t.signal,this)),Rr.call(this,t),Pn.construct(this,()=>{let r=this._writableState;r.writing||Uo(this,r),jo(this,r)})}au(G,um,{__proto__:null,value:function(t){return ou(this,t)?!0:this!==G?!1:t&&t._writableState instanceof Tr}});G.prototype.pipe=function(){Yt(this,new gm)};function uu(t,e,r,n){let i=t._writableState;if(typeof r=="function")n=r,r=i.defaultEncoding;else{if(!r)r=i.defaultEncoding;else if(r!=="buffer"&&!In.isEncoding(r))throw new fu(r);typeof n!="function"&&(n=Fo)}if(e===null)throw new mm;if(!i.objectMode)if(typeof e=="string")i.decodeStrings!==!1&&(e=In.from(e,r),r="buffer");else if(e instanceof In)r="buffer";else if(Rr._isUint8Array(e))e=Rr._uint8ArrayToBuffer(e),r="buffer";else throw new ym("chunk",["string","Buffer","Uint8Array"],e);let o;return i.ending?o=new _m:i.destroyed&&(o=new xr("write")),o?(_t.nextTick(n,o),Yt(t,o,!0),o):(i.pendingcb++,Em(t,i,e,r,n))}G.prototype.write=function(t,e,r){return uu(this,t,e,r)===!0};G.prototype.cork=function(){this._writableState.corked++};G.prototype.uncork=function(){let t=this._writableState;t.corked&&(t.corked--,t.writing||Uo(this,t))};G.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=lm(e)),!In.isEncoding(e))throw new fu(e);return this._writableState.defaultEncoding=e,this};function Em(t,e,r,n,i){let o=e.objectMode?1:r.length;e.length+=o;let a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked||e.errored||!e.constructed?(e.buffered.push({chunk:r,encoding:n,callback:i}),e.allBuffers&&n!=="buffer"&&(e.allBuffers=!1),e.allNoop&&i!==Fo&&(e.allNoop=!1)):(e.writelen=o,e.writecb=i,e.writing=!0,e.sync=!0,t._write(r,n,e.onwrite),e.sync=!1),a&&!e.errored&&!e.destroyed}function ru(t,e,r,n,i,o,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new xr("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function nu(t,e,r,n){--e.pendingcb,n(r),qo(e),Yt(t,r)}function Sm(t,e){let r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function"){Yt(t,new lu);return}r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,e?(e.stack,r.errored||(r.errored=e),t._readableState&&!t._readableState.errored&&(t._readableState.errored=e),n?_t.nextTick(nu,t,r,e,i):nu(t,r,e,i)):(r.buffered.length>r.bufferedIndex&&Uo(t,r),n?r.afterWriteTickInfo!==null&&r.afterWriteTickInfo.cb===i?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:i,stream:t,state:r},_t.nextTick(Am,r.afterWriteTickInfo)):cu(t,r,1,i))}function Am({stream:t,state:e,count:r,cb:n}){return e.afterWriteTickInfo=null,cu(t,e,r,n)}function cu(t,e,r,n){for(!e.ending&&!t.destroyed&&e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"));r-- >0;)e.pendingcb--,n();e.destroyed&&qo(e),jo(t,e)}function qo(t){if(t.writing)return;for(let i=t.bufferedIndex;i<t.buffered.length;++i){var e;let{chunk:o,callback:a}=t.buffered[i],s=t.objectMode?1:o.length;t.length-=s,a((e=t.errored)!==null&&e!==void 0?e:new xr("write"))}let r=t[Jt].splice(0);for(let i=0;i<r.length;i++){var n;r[i]((n=t.errored)!==null&&n!==void 0?n:new xr("end"))}Bn(t)}function Uo(t,e){if(e.corked||e.bufferProcessing||e.destroyed||!e.constructed)return;let{buffered:r,bufferedIndex:n,objectMode:i}=e,o=r.length-n;if(!o)return;let a=n;if(e.bufferProcessing=!0,o>1&&t._writev){e.pendingcb-=o-1;let s=e.allNoop?Fo:f=>{for(let u=a;u<r.length;++u)r[u].callback(f)},l=e.allNoop&&a===0?r:iu(r,a);l.allBuffers=e.allBuffers,ru(t,e,!0,e.length,l,"",s),Bn(e)}else{do{let{chunk:s,encoding:l,callback:f}=r[a];r[a++]=null;let u=i?1:s.length;ru(t,e,!1,u,s,l,f)}while(a<r.length&&!e.writing);a===r.length?Bn(e):a>256?(r.splice(0,a),e.bufferedIndex=0):e.bufferedIndex=a}e.bufferProcessing=!1}G.prototype._write=function(t,e,r){if(this._writev)this._writev([{chunk:t,encoding:e}],r);else throw new bm("_write()")};G.prototype._writev=null;G.prototype.end=function(t,e,r){let n=this._writableState;typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null);let i;if(t!=null){let o=uu(this,t,e);o instanceof am&&(i=o)}return n.corked&&(n.corked=1,this.uncork()),i||(!n.errored&&!n.ending?(n.ending=!0,jo(this,n,!0),n.ended=!0):n.finished?i=new wm("end"):n.destroyed&&(i=new xr("end"))),typeof r=="function"&&(i||n.finished?_t.nextTick(r,i):n[Jt].push(r)),this};function On(t){return t.ending&&!t.destroyed&&t.constructed&&t.length===0&&!t.errored&&t.buffered.length===0&&!t.finished&&!t.writing&&!t.errorEmitted&&!t.closeEmitted}function vm(t,e){let r=!1;function n(i){if(r){Yt(t,i??lu());return}if(r=!0,e.pendingcb--,i){let o=e[Jt].splice(0);for(let a=0;a<o.length;a++)o[a](i);Yt(t,i,e.sync)}else On(e)&&(e.prefinished=!0,t.emit("prefinish"),e.pendingcb++,_t.nextTick(Do,t,e))}e.sync=!0,e.pendingcb++;try{t._final(n)}catch(i){n(i)}e.sync=!1}function Rm(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.finalCalled=!0,vm(t,e)):(e.prefinished=!0,t.emit("prefinish")))}function jo(t,e,r){On(e)&&(Rm(t,e),e.pendingcb===0&&(r?(e.pendingcb++,_t.nextTick((n,i)=>{On(i)?Do(n,i):i.pendingcb--},t,e)):On(e)&&(e.pendingcb++,Do(t,e))))}function Do(t,e){e.pendingcb--,e.finished=!0;let r=e[Jt].splice(0);for(let n=0;n<r.length;n++)r[n]();if(t.emit("finish"),e.autoDestroy){let n=t._readableState;(!n||n.autoDestroy&&(n.endEmitted||n.readable===!1))&&t.destroy()}}sm(G.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(t){this._writableState&&(this._writableState.destroyed=t)}},writable:{__proto__:null,get(){let t=this._writableState;return!!t&&t.writable!==!1&&!t.destroyed&&!t.errored&&!t.ending&&!t.ended},set(t){this._writableState&&(this._writableState.writable=!!t)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let t=this._writableState;return t?!t.destroyed&&!t.ending&&t.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var xm=Pn.destroy;G.prototype.destroy=function(t,e){let r=this._writableState;return!r.destroyed&&(r.bufferedIndex<r.buffered.length||r[Jt].length)&&_t.nextTick(qo,r),xm.call(this,t,e),this};G.prototype._undestroy=Pn.undestroy;G.prototype._destroy=function(t,e){e(t)};G.prototype[cm.captureRejectionSymbol]=function(t){this.destroy(t)};var No;function du(){return No===void 0&&(No={}),No}G.fromWeb=function(t,e){return du().newStreamWritableFromWritableStream(t,e)};G.toWeb=function(t){return du().newWritableStreamFromStreamWritable(t)}});var Iu=_((vR,Tu)=>{c();var Wo=tt(),Tm=de(),{isReadable:Im,isWritable:Om,isIterable:pu,isNodeStream:Bm,isReadableNodeStream:yu,isWritableNodeStream:bu,isDuplexNodeStream:Pm,isReadableStream:gu,isWritableStream:wu}=Pe(),mu=Ge(),{AbortError:Ru,codes:{ERR_INVALID_ARG_TYPE:Mm,ERR_INVALID_RETURN_VALUE:_u}}=ae(),{destroyer:Qt}=gt(),km=Le(),xu=vr(),Lm=Mn(),{createDeferredPromise:Eu}=ne(),Su=To(),Au=globalThis.Blob||Tm.Blob,Cm=typeof Au<"u"?function(e){return e instanceof Au}:function(e){return!1},Nm=globalThis.AbortController||(je(),wr(Ut)).AbortController,{FunctionPrototypeCall:vu}=$(),it=class extends km{constructor(e){super(e),e?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),e?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};Tu.exports=function t(e,r){if(Pm(e))return e;if(yu(e))return Xt({readable:e});if(bu(e))return Xt({writable:e});if(Bm(e))return Xt({writable:!1,readable:!1});if(gu(e))return Xt({readable:xu.fromWeb(e)});if(wu(e))return Xt({writable:Lm.fromWeb(e)});if(typeof e=="function"){let{value:i,write:o,final:a,destroy:s}=Dm(e);if(pu(i))return Su(it,i,{objectMode:!0,write:o,final:a,destroy:s});let l=i?.then;if(typeof l=="function"){let f,u=vu(l,i,d=>{if(d!=null)throw new _u("nully","body",d)},d=>{Qt(f,d)});return f=new it({objectMode:!0,readable:!1,write:o,final(d){a(async()=>{try{await u,Wo.nextTick(d,null)}catch(b){Wo.nextTick(d,b)}})},destroy:s})}throw new _u("Iterable, AsyncIterable or AsyncFunction",r,i)}if(Cm(e))return t(e.arrayBuffer());if(pu(e))return Su(it,e,{objectMode:!0,writable:!1});if(gu(e?.readable)&&wu(e?.writable))return it.fromWeb(e);if(typeof e?.writable=="object"||typeof e?.readable=="object"){let i=e!=null&&e.readable?yu(e?.readable)?e?.readable:t(e.readable):void 0,o=e!=null&&e.writable?bu(e?.writable)?e?.writable:t(e.writable):void 0;return Xt({readable:i,writable:o})}let n=e?.then;if(typeof n=="function"){let i;return vu(n,e,o=>{o!=null&&i.push(o),i.push(null)},o=>{Qt(i,o)}),i=new it({objectMode:!0,writable:!1,read(){}})}throw new Mm(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],e)};function Dm(t){let{promise:e,resolve:r}=Eu(),n=new Nm,i=n.signal;return{value:t(async function*(){for(;;){let a=e;e=null;let{chunk:s,done:l,cb:f}=await a;if(Wo.nextTick(f),l)return;if(i.aborted)throw new Ru(void 0,{cause:i.reason});({promise:e,resolve:r}=Eu()),yield s}}(),{signal:i}),write(a,s,l){let f=r;r=null,f({chunk:a,done:!1,cb:l})},final(a){let s=r;r=null,s({done:!0,cb:a})},destroy(a,s){n.abort(),s(a)}}}function Xt(t){let e=t.readable&&typeof t.readable.read!="function"?xu.wrap(t.readable):t.readable,r=t.writable,n=!!Im(e),i=!!Om(r),o,a,s,l,f;function u(d){let b=l;l=null,b?b(d):d&&f.destroy(d)}return f=new it({readableObjectMode:!!(e!=null&&e.readableObjectMode),writableObjectMode:!!(r!=null&&r.writableObjectMode),readable:n,writable:i}),i&&(mu(r,d=>{i=!1,d&&Qt(e,d),u(d)}),f._write=function(d,b,h){r.write(d,b)?h():o=h},f._final=function(d){r.end(),a=d},r.on("drain",function(){if(o){let d=o;o=null,d()}}),r.on("finish",function(){if(a){let d=a;a=null,d()}})),n&&(mu(e,d=>{n=!1,d&&Qt(e,d),u(d)}),e.on("readable",function(){if(s){let d=s;s=null,d()}}),e.on("end",function(){f.push(null)}),f._read=function(){for(;;){let d=e.read();if(d===null){s=f._read;return}if(!f.push(d))return}}),f._destroy=function(d,b){!d&&l!==null&&(d=new Ru),s=null,o=null,a=null,l===null?b(d):(l=b,Qt(r,d),Qt(e,d))},f}});var Le=_((xR,Pu)=>{"use strict";c();var{ObjectDefineProperties:Fm,ObjectGetOwnPropertyDescriptor:He,ObjectKeys:qm,ObjectSetPrototypeOf:Ou}=$();Pu.exports=Ae;var Ho=vr(),ge=Mn();Ou(Ae.prototype,Ho.prototype);Ou(Ae,Ho);{let t=qm(ge.prototype);for(let e=0;e<t.length;e++){let r=t[e];Ae.prototype[r]||(Ae.prototype[r]=ge.prototype[r])}}function Ae(t){if(!(this instanceof Ae))return new Ae(t);Ho.call(this,t),ge.call(this,t),t?(this.allowHalfOpen=t.allowHalfOpen!==!1,t.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),t.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}Fm(Ae.prototype,{writable:{__proto__:null,...He(ge.prototype,"writable")},writableHighWaterMark:{__proto__:null,...He(ge.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...He(ge.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...He(ge.prototype,"writableBuffer")},writableLength:{__proto__:null,...He(ge.prototype,"writableLength")},writableFinished:{__proto__:null,...He(ge.prototype,"writableFinished")},writableCorked:{__proto__:null,...He(ge.prototype,"writableCorked")},writableEnded:{__proto__:null,...He(ge.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...He(ge.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(t){this._readableState&&this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}});var $o;function Bu(){return $o===void 0&&($o={}),$o}Ae.fromWeb=function(t,e){return Bu().newStreamDuplexFromReadableWritablePair(t,e)};Ae.toWeb=function(t){return Bu().newReadableWritablePairFromDuplex(t)};var Go;Ae.from=function(t){return Go||(Go=Iu()),Go(t,"body")}});var zo=_((IR,ku)=>{"use strict";c();var{ObjectSetPrototypeOf:Mu,Symbol:Um}=$();ku.exports=Ve;var{ERR_METHOD_NOT_IMPLEMENTED:jm}=ae().codes,Ko=Le(),{getHighWaterMark:Wm}=Er();Mu(Ve.prototype,Ko.prototype);Mu(Ve,Ko);var Ir=Um("kCallback");function Ve(t){if(!(this instanceof Ve))return new Ve(t);let e=t?Wm(this,t,"readableHighWaterMark",!0):null;e===0&&(t={...t,highWaterMark:null,readableHighWaterMark:e,writableHighWaterMark:t.writableHighWaterMark||0}),Ko.call(this,t),this._readableState.sync=!1,this[Ir]=null,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",$m)}function Vo(t){typeof this._flush=="function"&&!this.destroyed?this._flush((e,r)=>{if(e){t?t(e):this.destroy(e);return}r!=null&&this.push(r),this.push(null),t&&t()}):(this.push(null),t&&t())}function $m(){this._final!==Vo&&Vo.call(this)}Ve.prototype._final=Vo;Ve.prototype._transform=function(t,e,r){throw new jm("_transform()")};Ve.prototype._write=function(t,e,r){let n=this._readableState,i=this._writableState,o=n.length;this._transform(t,e,(a,s)=>{if(a){r(a);return}s!=null&&this.push(s),i.ended||o===n.length||n.length<n.highWaterMark?r():this[Ir]=r})};Ve.prototype._read=function(){if(this[Ir]){let t=this[Ir];this[Ir]=null,t()}}});var Jo=_((BR,Cu)=>{"use strict";c();var{ObjectSetPrototypeOf:Lu}=$();Cu.exports=Zt;var Yo=zo();Lu(Zt.prototype,Yo.prototype);Lu(Zt,Yo);function Zt(t){if(!(this instanceof Zt))return new Zt(t);Yo.call(this,t)}Zt.prototype._transform=function(t,e,r){r(null,t)}});var Nn=_((MR,Uu)=>{c();var Or=tt(),{ArrayIsArray:Gm,Promise:Hm,SymbolAsyncIterator:Vm,SymbolDispose:Km}=$(),Cn=Ge(),{once:zm}=ne(),Ym=gt(),Nu=Le(),{aggregateTwoErrors:Jm,codes:{ERR_INVALID_ARG_TYPE:oa,ERR_INVALID_RETURN_VALUE:Xo,ERR_MISSING_ARGS:Xm,ERR_STREAM_DESTROYED:Qm,ERR_STREAM_PREMATURE_CLOSE:Zm},AbortError:e0}=ae(),{validateFunction:t0,validateAbortSignal:r0}=$t(),{isIterable:Et,isReadable:Qo,isReadableNodeStream:Ln,isNodeStream:Du,isTransformStream:er,isWebStream:n0,isReadableStream:Zo,isReadableFinished:i0}=Pe(),o0=globalThis.AbortController||(je(),wr(Ut)).AbortController,ea,ta,ra;function Fu(t,e,r){let n=!1;t.on("close",()=>{n=!0});let i=Cn(t,{readable:e,writable:r},o=>{n=!o});return{destroy:o=>{n||(n=!0,Ym.destroyer(t,o||new Qm("pipe")))},cleanup:i}}function a0(t){return t0(t[t.length-1],"streams[stream.length - 1]"),t.pop()}function na(t){if(Et(t))return t;if(Ln(t))return s0(t);throw new oa("val",["Readable","Iterable","AsyncIterable"],t)}async function*s0(t){ta||(ta=vr()),yield*ta.prototype[Vm].call(t)}async function kn(t,e,r,{end:n}){let i,o=null,a=f=>{if(f&&(i=f),o){let u=o;o=null,u()}},s=()=>new Hm((f,u)=>{i?u(i):o=()=>{i?u(i):f()}});e.on("drain",a);let l=Cn(e,{readable:!1},a);try{e.writableNeedDrain&&await s();for await(let f of t)e.write(f)||await s();n&&(e.end(),await s()),r()}catch(f){r(i!==f?Jm(i,f):f)}finally{l(),e.off("drain",a)}}async function ia(t,e,r,{end:n}){er(e)&&(e=e.writable);let i=e.getWriter();try{for await(let o of t)await i.ready,i.write(o).catch(()=>{});await i.ready,n&&await i.close(),r()}catch(o){try{await i.abort(o),r(o)}catch(a){r(a)}}}function l0(...t){return qu(t,zm(a0(t)))}function qu(t,e,r){if(t.length===1&&Gm(t[0])&&(t=t[0]),t.length<2)throw new Xm("streams");let n=new o0,i=n.signal,o=r?.signal,a=[];r0(o,"options.signal");function s(){E(new e0)}ra=ra||ne().addAbortListener;let l;o&&(l=ra(o,s));let f,u,d=[],b=0;function h(M){E(M,--b===0)}function E(M,v){var I;if(M&&(!f||f.code==="ERR_STREAM_PREMATURE_CLOSE")&&(f=M),!(!f&&!v)){for(;d.length;)d.shift()(f);(I=l)===null||I===void 0||I[Km](),n.abort(),v&&(f||a.forEach(j=>j()),Or.nextTick(e,f,u))}}let m;for(let M=0;M<t.length;M++){let v=t[M],I=M<t.length-1,j=M>0,F=I||r?.end!==!1,X=M===t.length-1;if(Du(v)){let U=function(ee){ee&&ee.name!=="AbortError"&&ee.code!=="ERR_STREAM_PREMATURE_CLOSE"&&h(ee)};var R=U;if(F){let{destroy:ee,cleanup:qe}=Fu(v,I,j);d.push(ee),Qo(v)&&X&&a.push(qe)}v.on("error",U),Qo(v)&&X&&a.push(()=>{v.removeListener("error",U)})}if(M===0)if(typeof v=="function"){if(m=v({signal:i}),!Et(m))throw new Xo("Iterable, AsyncIterable or Stream","source",m)}else Et(v)||Ln(v)||er(v)?m=v:m=Nu.from(v);else if(typeof v=="function"){if(er(m)){var A;m=na((A=m)===null||A===void 0?void 0:A.readable)}else m=na(m);if(m=v(m,{signal:i}),I){if(!Et(m,!0))throw new Xo("AsyncIterable",`transform[${M-1}]`,m)}else{var S;ea||(ea=Jo());let U=new ea({objectMode:!0}),ee=(S=m)===null||S===void 0?void 0:S.then;if(typeof ee=="function")b++,ee.call(m,q=>{u=q,q!=null&&U.write(q),F&&U.end(),Or.nextTick(h)},q=>{U.destroy(q),Or.nextTick(h,q)});else if(Et(m,!0))b++,kn(m,U,h,{end:F});else if(Zo(m)||er(m)){let q=m.readable||m;b++,kn(q,U,h,{end:F})}else throw new Xo("AsyncIterable or Promise","destination",m);m=U;let{destroy:qe,cleanup:C}=Fu(m,!1,!0);d.push(qe),X&&a.push(C)}}else if(Du(v)){if(Ln(m)){b+=2;let U=f0(m,v,h,{end:F});Qo(v)&&X&&a.push(U)}else if(er(m)||Zo(m)){let U=m.readable||m;b++,kn(U,v,h,{end:F})}else if(Et(m))b++,kn(m,v,h,{end:F});else throw new oa("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],m);m=v}else if(n0(v)){if(Ln(m))b++,ia(na(m),v,h,{end:F});else if(Zo(m)||Et(m))b++,ia(m,v,h,{end:F});else if(er(m))b++,ia(m.readable,v,h,{end:F});else throw new oa("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],m);m=v}else m=Nu.from(v)}return(i!=null&&i.aborted||o!=null&&o.aborted)&&Or.nextTick(s),m}function f0(t,e,r,{end:n}){let i=!1;if(e.on("close",()=>{i||r(new Zm)}),t.pipe(e,{end:!1}),n){let a=function(){i=!0,e.end()};var o=a;i0(t)?Or.nextTick(a):t.once("end",a)}else r();return Cn(t,{readable:!0,writable:!1},a=>{let s=t._readableState;a&&a.code==="ERR_STREAM_PREMATURE_CLOSE"&&s&&s.ended&&!s.errored&&!s.errorEmitted?t.once("end",r).once("error",r):r(a)}),Cn(e,{readable:!1,writable:!0},r)}Uu.exports={pipelineImpl:qu,pipeline:l0}});var sa=_((LR,Vu)=>{"use strict";c();var{pipeline:u0}=Nn(),Dn=Le(),{destroyer:c0}=gt(),{isNodeStream:Fn,isReadable:ju,isWritable:Wu,isWebStream:aa,isTransformStream:St,isWritableStream:$u,isReadableStream:Gu}=Pe(),{AbortError:d0,codes:{ERR_INVALID_ARG_VALUE:Hu,ERR_MISSING_ARGS:h0}}=ae(),p0=Ge();Vu.exports=function(...e){if(e.length===0)throw new h0("streams");if(e.length===1)return Dn.from(e[0]);let r=[...e];if(typeof e[0]=="function"&&(e[0]=Dn.from(e[0])),typeof e[e.length-1]=="function"){let h=e.length-1;e[h]=Dn.from(e[h])}for(let h=0;h<e.length;++h)if(!(!Fn(e[h])&&!aa(e[h]))){if(h<e.length-1&&!(ju(e[h])||Gu(e[h])||St(e[h])))throw new Hu(`streams[${h}]`,r[h],"must be readable");if(h>0&&!(Wu(e[h])||$u(e[h])||St(e[h])))throw new Hu(`streams[${h}]`,r[h],"must be writable")}let n,i,o,a,s;function l(h){let E=a;a=null,E?E(h):h?s.destroy(h):!b&&!d&&s.destroy()}let f=e[0],u=u0(e,l),d=!!(Wu(f)||$u(f)||St(f)),b=!!(ju(u)||Gu(u)||St(u));if(s=new Dn({writableObjectMode:!!(f!=null&&f.writableObjectMode),readableObjectMode:!!(u!=null&&u.readableObjectMode),writable:d,readable:b}),d){if(Fn(f))s._write=function(E,m,A){f.write(E,m)?A():n=A},s._final=function(E){f.end(),i=E},f.on("drain",function(){if(n){let E=n;n=null,E()}});else if(aa(f)){let m=(St(f)?f.writable:f).getWriter();s._write=async function(A,S,R){try{await m.ready,m.write(A).catch(()=>{}),R()}catch(M){R(M)}},s._final=async function(A){try{await m.ready,m.close().catch(()=>{}),i=A}catch(S){A(S)}}}let h=St(u)?u.readable:u;p0(h,()=>{if(i){let E=i;i=null,E()}})}if(b){if(Fn(u))u.on("readable",function(){if(o){let h=o;o=null,h()}}),u.on("end",function(){s.push(null)}),s._read=function(){for(;;){let h=u.read();if(h===null){o=s._read;return}if(!s.push(h))return}};else if(aa(u)){let E=(St(u)?u.readable:u).getReader();s._read=async function(){for(;;)try{let{value:m,done:A}=await E.read();if(!s.push(m))return;if(A){s.push(null);return}}catch{return}}}}return s._destroy=function(h,E){!h&&a!==null&&(h=new d0),o=null,n=null,i=null,a===null?E(h):(a=E,Fn(u)&&c0(u,h))},s}});var rc=_((NR,ua)=>{"use strict";c();var y0=globalThis.AbortController||(je(),wr(Ut)).AbortController,{codes:{ERR_INVALID_ARG_VALUE:b0,ERR_INVALID_ARG_TYPE:Br,ERR_MISSING_ARGS:g0,ERR_OUT_OF_RANGE:w0},AbortError:Ce}=ae(),{validateAbortSignal:At,validateInteger:Ku,validateObject:vt}=$t(),m0=$().Symbol("kWeak"),_0=$().Symbol("kResistStopPropagation"),{finished:E0}=Ge(),S0=sa(),{addAbortSignalNoValidate:A0}=_r(),{isWritable:v0,isNodeStream:R0}=Pe(),{deprecate:x0}=ne(),{ArrayPrototypePush:T0,Boolean:I0,MathFloor:zu,Number:O0,NumberIsNaN:B0,Promise:Yu,PromiseReject:Ju,PromiseResolve:P0,PromisePrototypeThen:Xu,Symbol:Zu}=$(),qn=Zu("kEmpty"),Qu=Zu("kEof");function M0(t,e){if(e!=null&&vt(e,"options"),e?.signal!=null&&At(e.signal,"options.signal"),R0(t)&&!v0(t))throw new b0("stream",t,"must be writable");let r=S0(this,t);return e!=null&&e.signal&&A0(e.signal,r),r}function Un(t,e){if(typeof t!="function")throw new Br("fn",["Function","AsyncFunction"],t);e!=null&&vt(e,"options"),e?.signal!=null&&At(e.signal,"options.signal");let r=1;e?.concurrency!=null&&(r=zu(e.concurrency));let n=r-1;return e?.highWaterMark!=null&&(n=zu(e.highWaterMark)),Ku(r,"options.concurrency",1),Ku(n,"options.highWaterMark",0),n+=r,async function*(){let o=ne().AbortSignalAny([e?.signal].filter(I0)),a=this,s=[],l={signal:o},f,u,d=!1,b=0;function h(){d=!0,E()}function E(){b-=1,m()}function m(){u&&!d&&b<r&&s.length<n&&(u(),u=null)}async function A(){try{for await(let S of a){if(d)return;if(o.aborted)throw new Ce;try{if(S=t(S,l),S===qn)continue;S=P0(S)}catch(R){S=Ju(R)}b+=1,Xu(S,E,h),s.push(S),f&&(f(),f=null),!d&&(s.length>=n||b>=r)&&await new Yu(R=>{u=R})}s.push(Qu)}catch(S){let R=Ju(S);Xu(R,E,h),s.push(R)}finally{d=!0,f&&(f(),f=null)}}A();try{for(;;){for(;s.length>0;){let S=await s[0];if(S===Qu)return;if(o.aborted)throw new Ce;S!==qn&&(yield S),s.shift(),m()}await new Yu(S=>{f=S})}}finally{d=!0,u&&(u(),u=null)}}.call(this)}function k0(t=void 0){return t!=null&&vt(t,"options"),t?.signal!=null&&At(t.signal,"options.signal"),async function*(){let r=0;for await(let i of this){var n;if(t!=null&&(n=t.signal)!==null&&n!==void 0&&n.aborted)throw new Ce({cause:t.signal.reason});yield[r++,i]}}.call(this)}async function ec(t,e=void 0){for await(let r of fa.call(this,t,e))return!0;return!1}async function L0(t,e=void 0){if(typeof t!="function")throw new Br("fn",["Function","AsyncFunction"],t);return!await ec.call(this,async(...r)=>!await t(...r),e)}async function C0(t,e){for await(let r of fa.call(this,t,e))return r}async function N0(t,e){if(typeof t!="function")throw new Br("fn",["Function","AsyncFunction"],t);async function r(n,i){return await t(n,i),qn}for await(let n of Un.call(this,r,e));}function fa(t,e){if(typeof t!="function")throw new Br("fn",["Function","AsyncFunction"],t);async function r(n,i){return await t(n,i)?n:qn}return Un.call(this,r,e)}var la=class extends g0{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function D0(t,e,r){var n;if(typeof t!="function")throw new Br("reducer",["Function","AsyncFunction"],t);r!=null&&vt(r,"options"),r?.signal!=null&&At(r.signal,"options.signal");let i=arguments.length>1;if(r!=null&&(n=r.signal)!==null&&n!==void 0&&n.aborted){let f=new Ce(void 0,{cause:r.signal.reason});throw this.once("error",()=>{}),await E0(this.destroy(f)),f}let o=new y0,a=o.signal;if(r!=null&&r.signal){let f={once:!0,[m0]:this,[_0]:!0};r.signal.addEventListener("abort",()=>o.abort(),f)}let s=!1;try{for await(let f of this){var l;if(s=!0,r!=null&&(l=r.signal)!==null&&l!==void 0&&l.aborted)throw new Ce;i?e=await t(e,f,{signal:a}):(e=f,i=!0)}if(!s&&!i)throw new la}finally{o.abort()}return e}async function F0(t){t!=null&&vt(t,"options"),t?.signal!=null&&At(t.signal,"options.signal");let e=[];for await(let n of this){var r;if(t!=null&&(r=t.signal)!==null&&r!==void 0&&r.aborted)throw new Ce(void 0,{cause:t.signal.reason});T0(e,n)}return e}function q0(t,e){let r=Un.call(this,t,e);return async function*(){for await(let i of r)yield*i}.call(this)}function tc(t){if(t=O0(t),B0(t))return 0;if(t<0)throw new w0("number",">= 0",t);return t}function U0(t,e=void 0){return e!=null&&vt(e,"options"),e?.signal!=null&&At(e.signal,"options.signal"),t=tc(t),async function*(){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new Ce;for await(let o of this){var i;if(e!=null&&(i=e.signal)!==null&&i!==void 0&&i.aborted)throw new Ce;t--<=0&&(yield o)}}.call(this)}function j0(t,e=void 0){return e!=null&&vt(e,"options"),e?.signal!=null&&At(e.signal,"options.signal"),t=tc(t),async function*(){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new Ce;for await(let o of this){var i;if(e!=null&&(i=e.signal)!==null&&i!==void 0&&i.aborted)throw new Ce;if(t-- >0&&(yield o),t<=0)return}}.call(this)}ua.exports.streamReturningOperators={asIndexedPairs:x0(k0,"readable.asIndexedPairs will be removed in a future version."),drop:U0,filter:fa,flatMap:q0,map:Un,take:j0,compose:M0};ua.exports.promiseReturningOperators={every:L0,forEach:N0,reduce:D0,toArray:F0,some:ec,find:C0}});var ca=_((FR,nc)=>{"use strict";c();var{ArrayPrototypePop:W0,Promise:$0}=$(),{isIterable:G0,isNodeStream:H0,isWebStream:V0}=Pe(),{pipelineImpl:K0}=Nn(),{finished:z0}=Ge();da();function Y0(...t){return new $0((e,r)=>{let n,i,o=t[t.length-1];if(o&&typeof o=="object"&&!H0(o)&&!G0(o)&&!V0(o)){let a=W0(t);n=a.signal,i=a.end}K0(t,(a,s)=>{a?r(a):e(s)},{signal:n,end:i})})}nc.exports={finished:z0,pipeline:Y0}});var da=_((UR,dc)=>{c();var{Buffer:J0}=de(),{ObjectDefineProperty:Ke,ObjectKeys:ac,ReflectApply:sc}=$(),{promisify:{custom:lc}}=ne(),{streamReturningOperators:ic,promiseReturningOperators:oc}=rc(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:fc}}=ae(),X0=sa(),{setDefaultHighWaterMark:Q0,getDefaultHighWaterMark:Z0}=Er(),{pipeline:uc}=Nn(),{destroyer:e_}=gt(),cc=Ge(),ha=ca(),Pr=Pe(),W=dc.exports=wn().Stream;W.isDestroyed=Pr.isDestroyed;W.isDisturbed=Pr.isDisturbed;W.isErrored=Pr.isErrored;W.isReadable=Pr.isReadable;W.isWritable=Pr.isWritable;W.Readable=vr();for(let t of ac(ic)){let r=function(...n){if(new.target)throw fc();return W.Readable.from(sc(e,this,n))};pa=r;let e=ic[t];Ke(r,"name",{__proto__:null,value:e.name}),Ke(r,"length",{__proto__:null,value:e.length}),Ke(W.Readable.prototype,t,{__proto__:null,value:r,enumerable:!1,configurable:!0,writable:!0})}var pa;for(let t of ac(oc)){let r=function(...i){if(new.target)throw fc();return sc(e,this,i)};pa=r;let e=oc[t];Ke(r,"name",{__proto__:null,value:e.name}),Ke(r,"length",{__proto__:null,value:e.length}),Ke(W.Readable.prototype,t,{__proto__:null,value:r,enumerable:!1,configurable:!0,writable:!0})}var pa;W.Writable=Mn();W.Duplex=Le();W.Transform=zo();W.PassThrough=Jo();W.pipeline=uc;var{addAbortSignal:t_}=_r();W.addAbortSignal=t_;W.finished=cc;W.destroy=e_;W.compose=X0;W.setDefaultHighWaterMark=Q0;W.getDefaultHighWaterMark=Z0;Ke(W,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return ha}});Ke(uc,lc,{__proto__:null,enumerable:!0,get(){return ha.pipeline}});Ke(cc,lc,{__proto__:null,enumerable:!0,get(){return ha.finished}});W.Stream=W;W._isUint8Array=function(e){return e instanceof Uint8Array};W._uint8ArrayToBuffer=function(e){return J0.from(e.buffer,e.byteOffset,e.byteLength)}});var Rt=_((WR,O)=>{"use strict";c();var Y=Rt();if(Y&&y.env.READABLE_STREAM==="disable"){let t=Y.promises;O.exports._uint8ArrayToBuffer=Y._uint8ArrayToBuffer,O.exports._isUint8Array=Y._isUint8Array,O.exports.isDisturbed=Y.isDisturbed,O.exports.isErrored=Y.isErrored,O.exports.isReadable=Y.isReadable,O.exports.Readable=Y.Readable,O.exports.Writable=Y.Writable,O.exports.Duplex=Y.Duplex,O.exports.Transform=Y.Transform,O.exports.PassThrough=Y.PassThrough,O.exports.addAbortSignal=Y.addAbortSignal,O.exports.finished=Y.finished,O.exports.destroy=Y.destroy,O.exports.pipeline=Y.pipeline,O.exports.compose=Y.compose,Object.defineProperty(Y,"promises",{configurable:!0,enumerable:!0,get(){return t}}),O.exports.Stream=Y.Stream}else{let t=da(),e=ca(),r=t.Readable.destroy;O.exports=t.Readable,O.exports._uint8ArrayToBuffer=t._uint8ArrayToBuffer,O.exports._isUint8Array=t._isUint8Array,O.exports.isDisturbed=t.isDisturbed,O.exports.isErrored=t.isErrored,O.exports.isReadable=t.isReadable,O.exports.Readable=t.Readable,O.exports.Writable=t.Writable,O.exports.Duplex=t.Duplex,O.exports.Transform=t.Transform,O.exports.PassThrough=t.PassThrough,O.exports.addAbortSignal=t.addAbortSignal,O.exports.finished=t.finished,O.exports.destroy=t.destroy,O.exports.destroy=r,O.exports.pipeline=t.pipeline,O.exports.compose=t.compose,Object.defineProperty(t,"promises",{configurable:!0,enumerable:!0,get(){return e}}),O.exports.Stream=t.Stream}O.exports.default=O.exports});var yc=_((GR,pc)=>{c();pc.exports=hc;function hc(t,e){if(t&&e)return hc(t)(e);if(typeof t!="function")throw new TypeError("need wrapper function");return Object.keys(t).forEach(function(n){r[n]=t[n]}),r;function r(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];var o=t.apply(this,n),a=n[n.length-1];return typeof o=="function"&&o!==a&&Object.keys(a).forEach(function(s){o[s]=a[s]}),o}}});var ba=_((VR,ya)=>{c();var bc=yc();ya.exports=bc(jn);ya.exports.strict=bc(gc);jn.proto=jn(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return jn(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return gc(this)},configurable:!0})});function jn(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function gc(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||"Function wrapped with `once`";return e.onceError=r+" shouldn't be called more than once",e.called=!1,e}});var ga=_((zR,mc)=>{c();var r_=ba(),n_=function(){},i_=function(t){return t.setHeader&&typeof t.abort=="function"},o_=function(t){return t.stdio&&Array.isArray(t.stdio)&&t.stdio.length===3},wc=function(t,e,r){if(typeof e=="function")return wc(t,null,e);e||(e={}),r=r_(r||n_);var n=t._writableState,i=t._readableState,o=e.readable||e.readable!==!1&&t.readable,a=e.writable||e.writable!==!1&&t.writable,s=!1,l=function(){t.writable||f()},f=function(){a=!1,o||r.call(t)},u=function(){o=!1,a||r.call(t)},d=function(A){r.call(t,A?new Error("exited with error code: "+A):null)},b=function(A){r.call(t,A)},h=function(){y.nextTick(E)},E=function(){if(!s){if(o&&!(i&&i.ended&&!i.destroyed))return r.call(t,new Error("premature close"));if(a&&!(n&&n.ended&&!n.destroyed))return r.call(t,new Error("premature close"))}},m=function(){t.req.on("finish",f)};return i_(t)?(t.on("complete",f),t.on("abort",h),t.req?m():t.on("request",m)):a&&!n&&(t.on("end",l),t.on("close",l)),o_(t)&&t.on("exit",d),t.on("end",u),t.on("finish",f),e.error!==!1&&t.on("error",b),t.on("close",h),function(){s=!0,t.removeListener("complete",f),t.removeListener("abort",h),t.removeListener("request",m),t.req&&t.req.removeListener("finish",f),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",f),t.removeListener("exit",d),t.removeListener("end",u),t.removeListener("error",b),t.removeListener("close",h)}};mc.exports=wc});var _c=_(()=>{c()});var Ac=_((ZR,Sc)=>{c();var a_=ba(),s_=ga(),wa=_c(),Mr=function(){},l_=/^v?\.0/.test(y.version),Wn=function(t){return typeof t=="function"},f_=function(t){return!l_||!wa?!1:(t instanceof(wa.ReadStream||Mr)||t instanceof(wa.WriteStream||Mr))&&Wn(t.close)},u_=function(t){return t.setHeader&&Wn(t.abort)},c_=function(t,e,r,n){n=a_(n);var i=!1;t.on("close",function(){i=!0}),s_(t,{readable:e,writable:r},function(a){if(a)return n(a);i=!0,n()});var o=!1;return function(a){if(!i&&!o){if(o=!0,f_(t))return t.close(Mr);if(u_(t))return t.abort();if(Wn(t.destroy))return t.destroy();n(a||new Error("stream was destroyed"))}}},Ec=function(t){t()},d_=function(t,e){return t.pipe(e)},h_=function(){var t=Array.prototype.slice.call(arguments),e=Wn(t[t.length-1]||Mr)&&t.pop()||Mr;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var r,n=t.map(function(i,o){var a=o<t.length-1,s=o>0;return c_(i,a,s,function(l){r||(r=l),l&&n.forEach(Ec),!a&&(n.forEach(Ec),e(r))})});return t.reduce(d_)};Sc.exports=h_});var ze=_((t1,ma)=>{c();typeof Object.create=="function"?ma.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:ma.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}}});var _a=_((n1,vc)=>{c();vc.exports=Te().EventEmitter});var Ea=_(()=>{c()});var Bc=_((l1,Oc)=>{"use strict";c();function Rc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function xc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Rc(Object(r),!0).forEach(function(n){p_(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Rc(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function p_(t,e,r){return e=Ic(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function y_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ic(n.key),n)}}function b_(t,e,r){return e&&Tc(t.prototype,e),r&&Tc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ic(t){var e=g_(t,"string");return typeof e=="symbol"?e:String(e)}function g_(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var w_=de(),$n=w_.Buffer,m_=Ea(),Sa=m_.inspect,__=Sa&&Sa.custom||"inspect";function E_(t,e,r){$n.prototype.copy.call(t,e,r)}Oc.exports=function(){function t(){y_(this,t),this.head=null,this.tail=null,this.length=0}return b_(t,[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return $n.alloc(0);for(var n=$n.allocUnsafe(r>>>0),i=this.head,o=0;i;)E_(i.data,n,o),o+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,o=n.data;for(r-=o.length;n=n.next;){var a=n.data,s=r>a.length?a.length:r;if(s===a.length?o+=a:o+=a.slice(0,r),r-=s,r===0){s===a.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(s));break}++i}return this.length-=i,o}},{key:"_getBuffer",value:function(r){var n=$n.allocUnsafe(r),i=this.head,o=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var a=i.data,s=r>a.length?a.length:r;if(a.copy(n,n.length-r,0,s),r-=s,r===0){s===a.length?(++o,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(s));break}++o}return this.length-=o,n}},{key:__,value:function(r,n){return Sa(this,xc(xc({},n),{},{depth:0,customInspect:!1}))}}]),t}()});var va=_((u1,Mc)=>{"use strict";c();function S_(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,y.nextTick(Aa,this,t)):y.nextTick(Aa,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(o){!e&&o?r._writableState?r._writableState.errorEmitted?y.nextTick(Gn,r):(r._writableState.errorEmitted=!0,y.nextTick(Pc,r,o)):y.nextTick(Pc,r,o):e?(y.nextTick(Gn,r),e(o)):y.nextTick(Gn,r)}),this)}function Pc(t,e){Aa(t,e),Gn(t)}function Gn(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function A_(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Aa(t,e){t.emit("error",e)}function v_(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}Mc.exports={destroy:S_,undestroy:A_,errorOrDestroy:v_}});var xt=_((d1,Cc)=>{"use strict";c();function R_(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var Lc={};function we(t,e,r){r||(r=Error);function n(o,a,s){return typeof e=="string"?e:e(o,a,s)}var i=function(o){R_(a,o);function a(s,l,f){return o.call(this,n(s,l,f))||this}return a}(r);i.prototype.name=r.name,i.prototype.code=t,Lc[t]=i}function kc(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(n){return String(n)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:r===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}else return"of ".concat(e," ").concat(String(t))}function x_(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function T_(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function I_(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}we("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);we("ERR_INVALID_ARG_TYPE",function(t,e,r){var n;typeof e=="string"&&x_(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var i;if(T_(t," argument"))i="The ".concat(t," ").concat(n," ").concat(kc(e,"type"));else{var o=I_(t,".")?"property":"argument";i='The "'.concat(t,'" ').concat(o," ").concat(n," ").concat(kc(e,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);we("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");we("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});we("ERR_STREAM_PREMATURE_CLOSE","Premature close");we("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});we("ERR_MULTIPLE_CALLBACK","Callback called multiple times");we("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");we("ERR_STREAM_WRITE_AFTER_END","write after end");we("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);we("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);we("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Cc.exports.codes=Lc});var Ra=_((p1,Nc)=>{"use strict";c();var O_=xt().codes.ERR_INVALID_OPT_VALUE;function B_(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function P_(t,e,r,n){var i=B_(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var o=n?r:"highWaterMark";throw new O_(o,i)}return Math.floor(i)}return t.objectMode?16:16*1024}Nc.exports={getHighWaterMark:P_}});var Fc=_((b1,Dc)=>{c();Dc.exports=M_;function M_(t,e){if(xa("noDeprecation"))return t;var r=!1;function n(){if(!r){if(xa("throwDeprecation"))throw new Error(e);xa("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return n}function xa(t){try{if(!w.localStorage)return!1}catch{return!1}var e=w.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}});var Oa=_((w1,Gc)=>{"use strict";c();Gc.exports=V;function Uc(t){var e=this;this.next=null,this.entry=null,this.finish=function(){oE(e,t)}}var tr;V.WritableState=Lr;var k_={deprecate:Fc()},jc=_a(),Vn=de().Buffer,L_=(typeof w<"u"?w:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function C_(t){return Vn.from(t)}function N_(t){return Vn.isBuffer(t)||t instanceof L_}var Ia=va(),D_=Ra(),F_=D_.getHighWaterMark,ot=xt().codes,q_=ot.ERR_INVALID_ARG_TYPE,U_=ot.ERR_METHOD_NOT_IMPLEMENTED,j_=ot.ERR_MULTIPLE_CALLBACK,W_=ot.ERR_STREAM_CANNOT_PIPE,$_=ot.ERR_STREAM_DESTROYED,G_=ot.ERR_STREAM_NULL_VALUES,H_=ot.ERR_STREAM_WRITE_AFTER_END,V_=ot.ERR_UNKNOWN_ENCODING,rr=Ia.errorOrDestroy;ze()(V,jc);function K_(){}function Lr(t,e,r){tr=tr||Tt(),t=t||{},typeof r!="boolean"&&(r=e instanceof tr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=F_(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=t.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){eE(e,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Uc(this)}Lr.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Lr.prototype,"buffer",{get:k_.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Hn;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Hn=Function.prototype[Symbol.hasInstance],Object.defineProperty(V,Symbol.hasInstance,{value:function(e){return Hn.call(this,e)?!0:this!==V?!1:e&&e._writableState instanceof Lr}})):Hn=function(e){return e instanceof this};function V(t){tr=tr||Tt();var e=this instanceof tr;if(!e&&!Hn.call(V,this))return new V(t);this._writableState=new Lr(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),jc.call(this)}V.prototype.pipe=function(){rr(this,new W_)};function z_(t,e){var r=new H_;rr(t,r),y.nextTick(e,r)}function Y_(t,e,r,n){var i;return r===null?i=new G_:typeof r!="string"&&!e.objectMode&&(i=new q_("chunk",["string","Buffer"],r)),i?(rr(t,i),y.nextTick(n,i),!1):!0}V.prototype.write=function(t,e,r){var n=this._writableState,i=!1,o=!n.objectMode&&N_(t);return o&&!Vn.isBuffer(t)&&(t=C_(t)),typeof e=="function"&&(r=e,e=null),o?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=K_),n.ending?z_(this,r):(o||Y_(this,n,t,r))&&(n.pendingcb++,i=X_(this,n,o,t,e,r)),i};V.prototype.cork=function(){this._writableState.corked++};V.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Wc(this,t))};V.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new V_(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(V.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function J_(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Vn.from(e,r)),e}Object.defineProperty(V.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function X_(t,e,r,n,i,o){if(!r){var a=J_(e,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=e.objectMode?1:n.length;e.length+=s;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Ta(t,e,!1,s,n,i,o);return l}function Ta(t,e,r,n,i,o,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new $_("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function Q_(t,e,r,n,i){--e.pendingcb,r?(y.nextTick(i,n),y.nextTick(kr,t,e),t._writableState.errorEmitted=!0,rr(t,n)):(i(n),t._writableState.errorEmitted=!0,rr(t,n),kr(t,e))}function Z_(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function eE(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new j_;if(Z_(r),e)Q_(t,r,n,e,i);else{var o=$c(r)||t.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Wc(t,r),n?y.nextTick(qc,t,r,o,i):qc(t,r,o,i)}}function qc(t,e,r,n){r||tE(t,e),e.pendingcb--,n(),kr(t,e)}function tE(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Wc(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,s=!0;r;)i[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;i.allBuffers=s,Ta(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new Uc(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,f=r.encoding,u=r.callback,d=e.objectMode?1:l.length;if(Ta(t,e,!1,d,l,f,u),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}V.prototype._write=function(t,e,r){r(new U_("_write()"))};V.prototype._writev=null;V.prototype.end=function(t,e,r){var n=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||iE(this,n,r),this};Object.defineProperty(V.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function $c(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function rE(t,e){t._final(function(r){e.pendingcb--,r&&rr(t,r),e.prefinished=!0,t.emit("prefinish"),kr(t,e)})}function nE(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,y.nextTick(rE,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function kr(t,e){var r=$c(e);if(r&&(nE(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}function iE(t,e,r){e.ending=!0,kr(t,e),r&&(e.finished?y.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function oE(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}Object.defineProperty(V.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});V.prototype.destroy=Ia.destroy;V.prototype._undestroy=Ia.undestroy;V.prototype._destroy=function(t,e){e(t)}});var Tt=_((_1,Vc)=>{"use strict";c();var aE=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Vc.exports=Ne;var Hc=Ma(),Pa=Oa();ze()(Ne,Hc);for(Ba=aE(Pa.prototype),Kn=0;Kn<Ba.length;Kn++)zn=Ba[Kn],Ne.prototype[zn]||(Ne.prototype[zn]=Pa.prototype[zn]);var Ba,zn,Kn;function Ne(t){if(!(this instanceof Ne))return new Ne(t);Hc.call(this,t),Pa.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",sE)))}Object.defineProperty(Ne.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ne.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ne.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function sE(){this._writableState.ended||y.nextTick(lE,this)}function lE(t){t.end()}Object.defineProperty(Ne.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var Yn=_((S1,Yc)=>{"use strict";c();var Kc=xt().codes.ERR_STREAM_PREMATURE_CLOSE;function fE(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}function uE(){}function cE(t){return t.setHeader&&typeof t.abort=="function"}function zc(t,e,r){if(typeof e=="function")return zc(t,null,e);e||(e={}),r=fE(r||uE);var n=e.readable||e.readable!==!1&&t.readable,i=e.writable||e.writable!==!1&&t.writable,o=function(){t.writable||s()},a=t._writableState&&t._writableState.finished,s=function(){i=!1,a=!0,n||r.call(t)},l=t._readableState&&t._readableState.endEmitted,f=function(){n=!1,l=!0,i||r.call(t)},u=function(E){r.call(t,E)},d=function(){var E;if(n&&!l)return(!t._readableState||!t._readableState.ended)&&(E=new Kc),r.call(t,E);if(i&&!a)return(!t._writableState||!t._writableState.ended)&&(E=new Kc),r.call(t,E)},b=function(){t.req.on("finish",s)};return cE(t)?(t.on("complete",s),t.on("abort",d),t.req?b():t.on("request",b)):i&&!t._writableState&&(t.on("end",o),t.on("close",o)),t.on("end",f),t.on("finish",s),e.error!==!1&&t.on("error",u),t.on("close",d),function(){t.removeListener("complete",s),t.removeListener("abort",d),t.removeListener("request",b),t.req&&t.req.removeListener("finish",s),t.removeListener("end",o),t.removeListener("close",o),t.removeListener("finish",s),t.removeListener("end",f),t.removeListener("error",u),t.removeListener("close",d)}}Yc.exports=zc});var Xc=_((v1,Jc)=>{"use strict";c();var Jn;function at(t,e,r){return e=dE(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function dE(t){var e=hE(t,"string");return typeof e=="symbol"?e:String(e)}function hE(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var pE=Yn(),st=Symbol("lastResolve"),It=Symbol("lastReject"),Cr=Symbol("error"),Xn=Symbol("ended"),Ot=Symbol("lastPromise"),ka=Symbol("handlePromise"),Bt=Symbol("stream");function lt(t,e){return{value:t,done:e}}function yE(t){var e=t[st];if(e!==null){var r=t[Bt].read();r!==null&&(t[Ot]=null,t[st]=null,t[It]=null,e(lt(r,!1)))}}function bE(t){y.nextTick(yE,t)}function gE(t,e){return function(r,n){t.then(function(){if(e[Xn]){r(lt(void 0,!0));return}e[ka](r,n)},n)}}var wE=Object.getPrototypeOf(function(){}),mE=Object.setPrototypeOf((Jn={get stream(){return this[Bt]},next:function(){var e=this,r=this[Cr];if(r!==null)return Promise.reject(r);if(this[Xn])return Promise.resolve(lt(void 0,!0));if(this[Bt].destroyed)return new Promise(function(a,s){y.nextTick(function(){e[Cr]?s(e[Cr]):a(lt(void 0,!0))})});var n=this[Ot],i;if(n)i=new Promise(gE(n,this));else{var o=this[Bt].read();if(o!==null)return Promise.resolve(lt(o,!1));i=new Promise(this[ka])}return this[Ot]=i,i}},at(Jn,Symbol.asyncIterator,function(){return this}),at(Jn,"return",function(){var e=this;return new Promise(function(r,n){e[Bt].destroy(null,function(i){if(i){n(i);return}r(lt(void 0,!0))})})}),Jn),wE),_E=function(e){var r,n=Object.create(mE,(r={},at(r,Bt,{value:e,writable:!0}),at(r,st,{value:null,writable:!0}),at(r,It,{value:null,writable:!0}),at(r,Cr,{value:null,writable:!0}),at(r,Xn,{value:e._readableState.endEmitted,writable:!0}),at(r,ka,{value:function(o,a){var s=n[Bt].read();s?(n[Ot]=null,n[st]=null,n[It]=null,o(lt(s,!1))):(n[st]=o,n[It]=a)},writable:!0}),r));return n[Ot]=null,pE(e,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=n[It];o!==null&&(n[Ot]=null,n[st]=null,n[It]=null,o(i)),n[Cr]=i;return}var a=n[st];a!==null&&(n[Ot]=null,n[st]=null,n[It]=null,a(lt(void 0,!0))),n[Xn]=!0}),e.on("readable",bE.bind(null,n)),n};Jc.exports=_E});var Zc=_((x1,Qc)=>{c();Qc.exports=function(){throw new Error("Readable.from is not available in the browser")}});var Ma=_((O1,fd)=>{"use strict";c();fd.exports=N;var nr;N.ReadableState=nd;var I1=Te().EventEmitter,rd=function(e,r){return e.listeners(r).length},Dr=_a(),Qn=de().Buffer,EE=(typeof w<"u"?w:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function SE(t){return Qn.from(t)}function AE(t){return Qn.isBuffer(t)||t instanceof EE}var La=Ea(),T;La&&La.debuglog?T=La.debuglog("stream"):T=function(){};var vE=Bc(),ja=va(),RE=Ra(),xE=RE.getHighWaterMark,Zn=xt().codes,TE=Zn.ERR_INVALID_ARG_TYPE,IE=Zn.ERR_STREAM_PUSH_AFTER_EOF,OE=Zn.ERR_METHOD_NOT_IMPLEMENTED,BE=Zn.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,ir,Ca,Na;ze()(N,Dr);var Nr=ja.errorOrDestroy,Da=["error","close","destroy","pause","resume"];function PE(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function nd(t,e,r){nr=nr||Tt(),t=t||{},typeof r!="boolean"&&(r=e instanceof nr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=xE(this,t,"readableHighWaterMark",r),this.buffer=new vE,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(ir||(ir=Sn().StringDecoder),this.decoder=new ir(t.encoding),this.encoding=t.encoding)}function N(t){if(nr=nr||Tt(),!(this instanceof N))return new N(t);var e=this instanceof nr;this._readableState=new nd(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Dr.call(this)}Object.defineProperty(N.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});N.prototype.destroy=ja.destroy;N.prototype._undestroy=ja.undestroy;N.prototype._destroy=function(t,e){e(t)};N.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Qn.from(t,e),e=""),n=!0),id(this,t,e,!1,n)};N.prototype.unshift=function(t){return id(this,t,null,!0,!1)};function id(t,e,r,n,i){T("readableAddChunk",e);var o=t._readableState;if(e===null)o.reading=!1,LE(t,o);else{var a;if(i||(a=ME(o,e)),a)Nr(t,a);else if(o.objectMode||e&&e.length>0)if(typeof e!="string"&&!o.objectMode&&Object.getPrototypeOf(e)!==Qn.prototype&&(e=SE(e)),n)o.endEmitted?Nr(t,new BE):Fa(t,o,e,!0);else if(o.ended)Nr(t,new IE);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||e.length!==0?Fa(t,o,e,!1):Ua(t,o)):Fa(t,o,e,!1)}else n||(o.reading=!1,Ua(t,o))}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}function Fa(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&ei(t)),Ua(t,e)}function ME(t,e){var r;return!AE(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TE("chunk",["string","Buffer","Uint8Array"],e)),r}N.prototype.isPaused=function(){return this._readableState.flowing===!1};N.prototype.setEncoding=function(t){ir||(ir=Sn().StringDecoder);var e=new ir(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var ed=1073741824;function kE(t){return t>=ed?t=ed:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function td(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=kE(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}N.prototype.read=function(t){T("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return T("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?qa(this):ei(this),null;if(t=td(t,e),t===0&&e.ended)return e.length===0&&qa(this),null;var n=e.needReadable;T("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,T("length less than watermark",n)),e.ended||e.reading?(n=!1,T("reading or ended",n)):n&&(T("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=td(r,e)));var i;return t>0?i=sd(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&qa(this)),i!==null&&this.emit("data",i),i};function LE(t,e){if(T("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?ei(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,od(t)))}}function ei(t){var e=t._readableState;T("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(T("emitReadable",e.flowing),e.emittedReadable=!0,y.nextTick(od,t))}function od(t){var e=t._readableState;T("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Wa(t)}function Ua(t,e){e.readingMore||(e.readingMore=!0,y.nextTick(CE,t,e))}function CE(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(T("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}N.prototype._read=function(t){Nr(this,new OE("_read()"))};N.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,T("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==y.stdout&&t!==y.stderr,o=i?s:m;n.endEmitted?y.nextTick(o):r.once("end",o),t.on("unpipe",a);function a(A,S){T("onunpipe"),A===r&&S&&S.hasUnpiped===!1&&(S.hasUnpiped=!0,u())}function s(){T("onend"),t.end()}var l=NE(r);t.on("drain",l);var f=!1;function u(){T("cleanup"),t.removeListener("close",h),t.removeListener("finish",E),t.removeListener("drain",l),t.removeListener("error",b),t.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",m),r.removeListener("data",d),f=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",d);function d(A){T("ondata");var S=t.write(A);T("dest.write",S),S===!1&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&ld(n.pipes,t)!==-1)&&!f&&(T("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function b(A){T("onerror",A),m(),t.removeListener("error",b),rd(t,"error")===0&&Nr(t,A)}PE(t,"error",b);function h(){t.removeListener("finish",E),m()}t.once("close",h);function E(){T("onfinish"),t.removeListener("close",h),m()}t.once("finish",E);function m(){T("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(T("pipe resume"),r.resume()),t};function NE(t){return function(){var r=t._readableState;T("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&rd(t,"data")&&(r.flowing=!0,Wa(t))}}N.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=ld(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};N.prototype.on=function(t,e){var r=Dr.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,T("on readable",n.length,n.reading),n.length?ei(this):n.reading||y.nextTick(DE,this)),r};N.prototype.addListener=N.prototype.on;N.prototype.removeListener=function(t,e){var r=Dr.prototype.removeListener.call(this,t,e);return t==="readable"&&y.nextTick(ad,this),r};N.prototype.removeAllListeners=function(t){var e=Dr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&y.nextTick(ad,this),e};function ad(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function DE(t){T("readable nexttick read 0"),t.read(0)}N.prototype.resume=function(){var t=this._readableState;return t.flowing||(T("resume"),t.flowing=!t.readableListening,FE(this,t)),t.paused=!1,this};function FE(t,e){e.resumeScheduled||(e.resumeScheduled=!0,y.nextTick(qE,t,e))}function qE(t,e){T("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Wa(t),e.flowing&&!e.reading&&t.read(0)}N.prototype.pause=function(){return T("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(T("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Wa(t){var e=t._readableState;for(T("flow",e.flowing);e.flowing&&t.read()!==null;);}N.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(T("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(T("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var s=e.push(a);s||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=function(s){return function(){return t[s].apply(t,arguments)}}(i));for(var o=0;o<Da.length;o++)t.on(Da[o],this.emit.bind(this,Da[o]));return this._read=function(a){T("wrapped _read",a),n&&(n=!1,t.resume())},this};typeof Symbol=="function"&&(N.prototype[Symbol.asyncIterator]=function(){return Ca===void 0&&(Ca=Xc()),Ca(this)});Object.defineProperty(N.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(N.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(N.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});N._fromList=sd;Object.defineProperty(N.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function sd(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function qa(t){var e=t._readableState;T("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,y.nextTick(UE,e,t))}function UE(t,e){if(T("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(N.from=function(t,e){return Na===void 0&&(Na=Zc()),Na(N,t,e)});function ld(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}});var $a=_((P1,cd)=>{"use strict";c();cd.exports=Ye;var ti=xt().codes,jE=ti.ERR_METHOD_NOT_IMPLEMENTED,WE=ti.ERR_MULTIPLE_CALLBACK,$E=ti.ERR_TRANSFORM_ALREADY_TRANSFORMING,GE=ti.ERR_TRANSFORM_WITH_LENGTH_0,ri=Tt();ze()(Ye,ri);function HE(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new WE);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Ye(t){if(!(this instanceof Ye))return new Ye(t);ri.call(this,t),this._transformState={afterTransform:HE.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",VE)}function VE(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){ud(t,e,r)}):ud(this,null,null)}Ye.prototype.push=function(t,e){return this._transformState.needTransform=!1,ri.prototype.push.call(this,t,e)};Ye.prototype._transform=function(t,e,r){r(new jE("_transform()"))};Ye.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Ye.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Ye.prototype._destroy=function(t,e){ri.prototype._destroy.call(this,t,function(r){e(r)})};function ud(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new GE;if(t._transformState.transforming)throw new $E;return t.push(null)}});var pd=_((k1,hd)=>{"use strict";c();hd.exports=Fr;var dd=$a();ze()(Fr,dd);function Fr(t){if(!(this instanceof Fr))return new Fr(t);dd.call(this,t)}Fr.prototype._transform=function(t,e,r){r(null,t)}});var md=_((C1,wd)=>{"use strict";c();var Ga;function KE(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var gd=xt().codes,zE=gd.ERR_MISSING_ARGS,YE=gd.ERR_STREAM_DESTROYED;function yd(t){if(t)throw t}function JE(t){return t.setHeader&&typeof t.abort=="function"}function XE(t,e,r,n){n=KE(n);var i=!1;t.on("close",function(){i=!0}),Ga===void 0&&(Ga=Yn()),Ga(t,{readable:e,writable:r},function(a){if(a)return n(a);i=!0,n()});var o=!1;return function(a){if(!i&&!o){if(o=!0,JE(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();n(a||new YE("pipe"))}}}function bd(t){t()}function QE(t,e){return t.pipe(e)}function ZE(t){return!t.length||typeof t[t.length-1]!="function"?yd:t.pop()}function eS(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=ZE(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new zE("streams");var i,o=e.map(function(a,s){var l=s<e.length-1,f=s>0;return XE(a,l,f,function(u){i||(i=u),u&&o.forEach(bd),!l&&(o.forEach(bd),n(i))})});return e.reduce(QE)}wd.exports=eS});var Ed=_((me,_d)=>{c();me=_d.exports=Ma();me.Stream=me;me.Readable=me;me.Writable=Oa();me.Duplex=Tt();me.Transform=$a();me.PassThrough=pd();me.finished=Yn();me.pipeline=md()});var Ad=_((F1,Sd)=>{c();Sd.exports=tS;function tS(t){var e=t._readableState;return e?e.objectMode||typeof t._duplexState=="number"?t.read():t.read(rS(e)):null}function rS(t){if(t.buffer.length){var e=t.bufferIndex||0;if(t.buffer.head)return t.buffer.head.data.length;if(t.buffer.length-e>0&&t.buffer[e])return t.buffer[e].length}return t.length}});var Id=_((U1,Td)=>{c();var ni=Ed(),vd=ga(),nS=ze(),iS=Ad(),Rd=p.Buffer.from&&p.Buffer.from!==Uint8Array.from?p.Buffer.from([0]):new p.Buffer([0]),Ha=function(t,e){t._corked?t.once("uncork",e):e()},oS=function(t,e){t._autoDestroy&&t.destroy(e)},xd=function(t,e){return function(r){r?oS(t,r.message==="premature close"?null:r):e&&!t._ended&&t.end()}},aS=function(t,e){if(!t||t._writableState&&t._writableState.finished)return e();if(t._writableState)return t.end(e);t.end(),e()},sS=function(){},lS=function(t){return new ni.Readable({objectMode:!0,highWaterMark:16}).wrap(t)},re=function(t,e,r){if(!(this instanceof re))return new re(t,e,r);ni.Duplex.call(this,r),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!r||r.autoDestroy!==!1,this._forwardDestroy=!r||r.destroy!==!1,this._forwardEnd=!r||r.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,t&&this.setWritable(t),e&&this.setReadable(e)};nS(re,ni.Duplex);re.obj=function(t,e,r){return r||(r={}),r.objectMode=!0,r.highWaterMark=16,new re(t,e,r)};re.prototype.cork=function(){++this._corked===1&&this.emit("cork")};re.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork")};re.prototype.setWritable=function(t){if(this._unwrite&&this._unwrite(),this.destroyed){t&&t.destroy&&t.destroy();return}if(t===null||t===!1){this.end();return}var e=this,r=vd(t,{writable:!0,readable:!1},xd(this,this._forwardEnd)),n=function(){var o=e._ondrain;e._ondrain=null,o&&o()},i=function(){e._writable.removeListener("drain",n),r()};this._unwrite&&y.nextTick(n),this._writable=t,this._writable.on("drain",n),this._unwrite=i,this.uncork()};re.prototype.setReadable=function(t){if(this._unread&&this._unread(),this.destroyed){t&&t.destroy&&t.destroy();return}if(t===null||t===!1){this.push(null),this.resume();return}var e=this,r=vd(t,{writable:!1,readable:!0},xd(this)),n=function(){e._forward()},i=function(){e.push(null)},o=function(){e._readable2.removeListener("readable",n),e._readable2.removeListener("end",i),r()};this._drained=!0,this._readable=t,this._readable2=t._readableState?t:lS(t),this._readable2.on("readable",n),this._readable2.on("end",i),this._unread=o,this._forward()};re.prototype._read=function(){this._drained=!0,this._forward()};re.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var t;this._drained&&(t=iS(this._readable2))!==null;)this.destroyed||(this._drained=this.push(t));this._forwarding=!1}};re.prototype.destroy=function(t,e){if(e||(e=sS),this.destroyed)return e(null);this.destroyed=!0;var r=this;y.nextTick(function(){r._destroy(t),e(null)})};re.prototype._destroy=function(t){if(t){var e=this._ondrain;this._ondrain=null,e?e(t):this.emit("error",t)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")};re.prototype._write=function(t,e,r){if(!this.destroyed){if(this._corked)return Ha(this,this._write.bind(this,t,e,r));if(t===Rd)return this._finish(r);if(!this._writable)return r();this._writable.write(t)===!1?this._ondrain=r:this.destroyed||r()}};re.prototype._finish=function(t){var e=this;this.emit("preend"),Ha(this,function(){aS(e._forwardEnd&&e._writable,function(){e._writableState.prefinished===!1&&(e._writableState.prefinished=!0),e.emit("prefinish"),Ha(e,t)})})};re.prototype.end=function(t,e,r){return typeof t=="function"?this.end(null,null,t):typeof e=="function"?this.end(t,null,e):(this._ended=!0,t&&this.write(t),!this._writableState.ending&&!this._writableState.destroyed&&this.write(Rd),ni.Writable.prototype.end.call(this,r))};Td.exports=re});var Pd=_((W1,ii)=>{c();var fS=Ac(),uS=ze(),Od=Id(),Bd=function(t){return t.length?Array.isArray(t[0])?t[0]:Array.prototype.slice.call(t):[]},Va=function(t){var e=function(){var r=Bd(arguments);if(!(this instanceof e))return new e(r);Od.call(this,null,null,t),r.length&&this.setPipeline(r)};return uS(e,Od),e.prototype.setPipeline=function(){var r=Bd(arguments),n=this,i=!1,o=r[0],a=r[r.length-1];a=a.readable?a:null,o=o.writable?o:null;var s=function(){r[0].emit("error",new Error("stream was destroyed"))};if(this.on("close",s),this.on("prefinish",function(){i||n.cork()}),fS(r,function(l){if(n.removeListener("close",s),l)return n.destroy(l.message==="premature close"?null:l);i=!0,n._autoDestroy===!1&&(n._autoDestroy=!0),n.uncork()}),this.destroyed)return s();this.setWritable(o),this.setReadable(a)},e};ii.exports=Va({autoDestroy:!1,destroy:!1});ii.exports.obj=Va({autoDestroy:!1,destroy:!1,objectMode:!0,highWaterMark:16});ii.exports.ctor=Va});function oi(t,e){let r=[],n;t.on("data",i=>r.push(i)),t.on("end",()=>{n||(n=!0,e(null,p.Buffer.concat(r)))}),t.on("error",i=>{n||(n=!0,e(i))})}function ai(t){let e;return new Ka.Transform({transform(r,n,i){e&&(r=p.Buffer.concat([e,r]));let o=Math.floor(r.length/t)*t;o?r.length>o?(e=r.slice(o),this.push(r.slice(0,o))):(e=void 0,this.push(r)):e=e?p.Buffer.concat([e,r]):r,i()},flush(r){e&&this.push(e),r()}})}function Md(t,e){let r=[],n=0;return new Ka.Transform({transform(i,o,a){r.push(i),n+=i.length,a()},flush(i){e(n);function o(){for(;r.length;)if(!t.write(r.shift()))return t.once("drain",o);t.end(),i()}o()}})}function J(t){let e,r=new Promise((n,i)=>{e=(o,a)=>{o?i(o):n(a)}});return t&&r.then(n=>t(null,n),t),[e,r]}var Ka,or=he(()=>{c();Ka=pe(Rt(),1)});var kd=_(()=>{c()});var za=_((Ld,si)=>{c();(function(t){"use strict";typeof define<"u"&&define.amd?define([],function(){return e}):typeof si<"u"&&si.exports?si.exports=e:t.secureRandom=e;function e(i,o){if(o=o||{type:"Array"},typeof y<"u"&&typeof y.pid=="number"&&y.versions&&y.versions.node)return r(i,o);var a=window.crypto||window.msCrypto;if(!a)throw new Error("Your browser does not support window.crypto.");return n(i,o)}function r(i,o){var a=kd(),s=a.randomBytes(i);switch(o.type){case"Array":return[].slice.call(s);case"Buffer":return s;case"Uint8Array":for(var l=new Uint8Array(i),f=0;f<i;++f)l[f]=s.readUInt8(f);return l;default:throw new Error(o.type+" is unsupported.")}}function n(i,o){var a=new Uint8Array(i),s=window.crypto||window.msCrypto;switch(s.getRandomValues(a),o.type){case"Array":return[].slice.call(a);case"Buffer":try{var l=new p.Buffer(1)}catch{throw new Error("Buffer not supported in this environment. Use Node.js or Browserify for browser support.")}return new p.Buffer(a);case"Uint8Array":return a;default:throw new Error(o.type+" is unsupported.")}}e.randomArray=function(i){return e(i,{type:"Array"})},e.randomUint8Array=function(i){return e(i,{type:"Uint8Array"})},e.randomBuffer=function(i){return e(i,{type:"Buffer"})}})(Ld)});var ar,Cd=he(()=>{c();ar=class{constructor(e){this._tables[0][0][0]||this._precompute();let r,n,i,o,a,s=this._tables[0][4],l=this._tables[1],f=e.length,u=1;if(f!==4&&f!==6&&f!==8)throw new Error("invalid aes key size");for(this._key=[o=e.slice(0),a=[]],r=f;r<4*f+28;r++)i=o[r-1],(r%f===0||f===8&&r%f===4)&&(i=s[i>>>24]<<24^s[i>>16&255]<<16^s[i>>8&255]<<8^s[i&255],r%f===0&&(i=i<<8^i>>>24^u<<24,u=u<<1^(u>>7)*283)),o[r]=o[r-f]^i;for(n=0;r;n++,r--)i=o[n&3?r:r-4],r<=4||n<4?a[n]=i:a[n]=l[0][s[i>>>24]]^l[1][s[i>>16&255]]^l[2][s[i>>8&255]]^l[3][s[i&255]]}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){let e=this._tables[0],r=this._tables[1],n=e[4],i=r[4],o,a,s,l=[],f=[],u,d,b,h,E,m;for(o=0;o<256;o++)f[(l[o]=o<<1^(o>>7)*283)^o]=o;for(a=s=0;!n[a];a^=u||1,s=f[s]||1)for(h=s^s<<1^s<<2^s<<3^s<<4,h=h>>8^h&255^99,n[a]=h,i[h]=a,b=l[d=l[u=l[a]]],m=b*16843009^d*65537^u*257^a*16843008,E=l[h]*257^h*16843008,o=0;o<4;o++)e[o][a]=E=E<<24^E>>>8,r[o][h]=m=m<<24^m>>>8;for(o=0;o<5;o++)e[o]=e[o].slice(0),r[o]=r[o].slice(0)}_crypt(e,r){if(e.length!==4)throw new Error("invalid aes block size");let n=this._key[r],i=e[0]^n[0],o=e[r?3:1]^n[1],a=e[2]^n[2],s=e[r?1:3]^n[3],l,f,u,d=n.length/4-2,b,h=4,E=[0,0,0,0],m=this._tables[r],A=m[0],S=m[1],R=m[2],M=m[3],v=m[4];for(b=0;b<d;b++)l=A[i>>>24]^S[o>>16&255]^R[a>>8&255]^M[s&255]^n[h],f=A[o>>>24]^S[a>>16&255]^R[s>>8&255]^M[i&255]^n[h+1],u=A[a>>>24]^S[s>>16&255]^R[i>>8&255]^M[o&255]^n[h+2],s=A[s>>>24]^S[i>>16&255]^R[o>>8&255]^M[a&255]^n[h+3],h+=4,i=l,o=f,a=u;for(b=0;b<4;b++)E[r?3&-b:b]=v[i>>>24]<<24^v[o>>16&255]<<16^v[a>>8&255]<<8^v[s&255]^n[h++],l=i,i=o,o=a,a=s,s=l;return E}};ar.prototype._tables=[[[],[],[],[],[]],[[],[],[],[],[]]]});function Ya(t){let e,r,n,i=[2479122403,2108737444,3518906241,22203222],o=p.Buffer.alloc(Math.ceil(t.length/4)*4);for(o.set(t,0),n=65536;n--;)for(r=0;r<t.length;r+=16){let s=[0,0,0,0];for(e=0;e<16;e+=4)e+r<t.length&&(s[e/4]=o.readInt32BE(e+r));i=new ar(s).encrypt(i)}let a=p.Buffer.allocUnsafe(16);for(e=0;e<4;e++)a.writeInt32BE(i[e],e*4);return a}function Ja(t,e,r){let n=p.Buffer.from(e.s,"base64"),i=1e5,o="SHA-512";window.crypto.subtle.importKey("raw",t,"PBKDF2",!1,["deriveKey","deriveBits"]).then(a=>window.crypto.subtle.deriveBits({name:"PBKDF2",salt:n,iterations:i,hash:{name:o}},a,256)).then(a=>{r(null,p.Buffer.from(a))}).catch(r)}var oe,qr,sr,Nd=he(()=>{c();Cd();oe=class{constructor(e){if(e.length!==16)throw Error("Wrong key length. Key must be 128bit.");let r=[];for(let n=0;n<4;n++)r[n]=e.readInt32BE(n*4);this.aes=new ar(r)}encryptCBC(e){let r=[0,0,0,0],n=Array(4),i,o;for(i=0;i<e.length;i+=16){for(o=0;o<4;o++)n[o]=e.readUInt32BE(i+o*4)^r[o];for(r=this.aes.encrypt(n),o=0;o<4;o++)e.writeInt32BE(r[o],i+o*4)}}decryptCBC(e){let r=[0,0,0,0],n=Array(4),i=Array(4),o,a;for(o=0;o<e.length;o+=16){for(a=0;a<4;a++)n[a]=e.readUInt32BE(o+a*4);for(i=n,n=this.aes.decrypt(n),a=0;a<4;a++)e.writeInt32BE(n[a]^r[a],o+a*4);r=i}}stringhash(e){let r=[0,0,0,0];for(let i=0;i<e.length;i+=4)if(e.length-i<4){let o=e.length-i;r[i/4&3]^=e.readIntBE(i,o)<<(4-o)*8}else r[i/4&3]^=e.readInt32BE(i);for(let i=16384;i--;)r=this.aes.encrypt(r);let n=p.Buffer.allocUnsafe(8);return n.writeInt32BE(r[0],0),n.writeInt32BE(r[2],4),n}encryptECB(e){let r=[];for(let n=0;n<e.length;n+=16)r[0]=e.readInt32BE(n),r[1]=e.readInt32BE(n+4),r[2]=e.readInt32BE(n+8),r[3]=e.readInt32BE(n+12),r=this.aes.encrypt(r),e.writeInt32BE(r[0],n),e.writeInt32BE(r[1],n+4),e.writeInt32BE(r[2],n+8),e.writeInt32BE(r[3],n+12);return e}decryptECB(e){let r=[];for(let n=0;n<e.length;n+=16)r[0]=e.readInt32BE(n),r[1]=e.readInt32BE(n+4),r[2]=e.readInt32BE(n+8),r[3]=e.readInt32BE(n+12),r=this.aes.decrypt(r),e.writeInt32BE(r[0],n),e.writeInt32BE(r[1],n+4),e.writeInt32BE(r[2],n+8),e.writeInt32BE(r[3],n+12);return e}},qr=class{constructor(e,r,n=0){this.aes=e,this.nonce=r.slice(0,8),this.increment=131072,this.posNext=this.increment,this.pos=0,this.ctr=p.Buffer.alloc(16),this.nonce.copy(this.ctr,0),this.incrementCTR(n/16)}encrypt(e){for(let r=0;r<e.length;r+=16){let n=this.aes.encryptECB(p.Buffer.from(this.ctr));for(let i=0;i<16;i++)e[r+i]^=n[i];this.incrementCTR()}return e}decrypt(e){for(let r=0;r<e.length;r+=16){let n=this.aes.encryptECB(p.Buffer.from(this.ctr));for(let i=0;i<16;i++)e[r+i]^=n[i];this.incrementCTR()}return e}incrementCTR(e=1){let r=this.ctr,n=15,i;for(;e!==0;)i=(e+r[n])%256,e=Math.floor((e+r[n])/256),r[n]=i,n-=1,n<0&&(n=15)}},sr=class{constructor(e,r,n=0){this.aes=e,this.nonce=r.slice(0,8),this.increment=131072,this.posNext=this.increment,this.pos=0,this.mac=p.Buffer.alloc(16),this.nonce.copy(this.mac,0),this.nonce.copy(this.mac,8),this.macs=[]}condense(){this.mac&&(this.macs.push(this.mac),this.mac=void 0);let e=p.Buffer.alloc(16);for(let n=0;n<this.macs.length;n++){for(let i=0;i<16;i++)e[i]^=this.macs[n][i];this.aes.encryptECB(e)}let r=p.Buffer.allocUnsafe(8);return r.writeInt32BE(e.readInt32BE(0)^e.readInt32BE(4),0),r.writeInt32BE(e.readInt32BE(8)^e.readInt32BE(12),4),r}update(e){for(let r=0;r<e.length;r+=16){for(let n=0;n<16;n++)this.mac[n]^=e[r+n];this.aes.encryptECB(this.mac),this.checkBounding()}}checkBounding(){this.pos+=16,this.pos>=this.posNext&&(this.macs.push(p.Buffer.from(this.mac)),this.nonce.copy(this.mac,0),this.nonce.copy(this.mac,8),this.increment<1048576&&(this.increment+=131072),this.posNext+=this.increment)}}});function se(t){return typeof t=="string"?Ur(t):t}function H(t){return t.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Ur(t){return p.Buffer.from(t,"base64")}function De(t){return new oe(Xa(t).slice(0,16))}function ui(t,e={}){let r=e.start||0;if(r!==0)throw Error("Encryption cannot start midstream otherwise MAC verification will fail.");t=se(t),t||(t=(0,Dd.default)(24)),t instanceof p.Buffer||(t=p.Buffer.from(t));let n=new li.Transform({transform(s,l,f){a.update(s);let u=o.encrypt(s);f(null,p.Buffer.from(u))},flush(s){n.mac=a.condense(),n.key=cS(t,n.mac),s()}});if(t.length!==24)throw Error("Wrong key length. Key must be 192bit.");let i=new oe(t.slice(0,16)),o=new qr(i,t.slice(16),r),a=new sr(i,t.slice(16));return n=(0,fi.default)(ai(16),n),n}function ci(t,e={}){let r=e.start||0;if(r!==0&&(e.disableVerification=!0),r%16!==0)throw Error("start argument of megaDecrypt must be a multiple of 16");t=se(t),t instanceof p.Buffer||(t=p.Buffer.from(t));let n=De(t),i=new qr(n,t.slice(16),r),o=!e.disableVerification&&new sr(n,t.slice(16)),a=new li.Transform({transform(s,l,f){let u=i.decrypt(s);o&&o.update(u),f(null,p.Buffer.from(u))},flush(s){if(o&&(a.mac=o.condense()),!e.disableVerification&&!a.mac.equals(t.slice(24))){s(Error("MAC verification failed"));return}s()}});return a=(0,fi.default)(ai(16),a),a}function Fd(t){t=se(t),t instanceof p.Buffer||(t=p.Buffer.from(t));let e=new li.Transform({transform(i,o,a){n.update(i),a(null)},flush(i){if(e.mac=n.condense(),!e.mac.equals(t.slice(24))){i(Error("MAC verification failed"));return}i()}});if(t.length!==32)throw Error("Wrong key length. Key must be 256bit.");let r=De(t),n=new sr(r,t.slice(16));return e=(0,fi.default)(ai(16),e),e}function Xa(t){let e=p.Buffer.alloc(32);t.copy(e);for(let r=0;r<16;r++)e.writeUInt8(e.readUInt8(r)^e.readUInt8(16+r,!0),r);return e}function cS(t,e){let r=p.Buffer.alloc(32);t.copy(r),e.copy(r,24);for(let n=0;n<16;n++)r.writeUInt8(r.readUInt8(n)^r.readUInt8(16+n),n);return r}function qd(t,e){if(t.length!==e.length)return!1;let r=t.length,n=0;for(let i=0;i<r;i++)n|=t[i]^e[i];return n===0}var li,fi,Dd,jr=he(()=>{c();li=pe(Rt(),1),fi=pe(Pd(),1);or();Dd=pe(za(),1);Nd()});function Gr(t){let e=[];for(;t-- >0;)e[t]=0;return e}function Hr(t){let e=t.length;if(t[e-1])return t;for(;e>1&&t[e-1]===0;)e--;return t.slice(0,e)}function hS(t){let e=1,r;return(r=t>>>16)!==0&&(t=r,e+=16),(r=t>>8)!==0&&(t=r,e+=8),(r=t>>4)!==0&&(t=r,e+=4),(r=t>>2)!==0&&(t=r,e+=2),(r=t>>1)!==0&&(t=r,e+=1),e}function jd(t,e){let r=t.length,n=e.length;if(r<n)return jd(e,t);let i=[],o=0,a=0;for(;a<n;a++)o+=t[a]+e[a],i[a]=o&268435455,o>>>=28;for(;a<r;a++)o+=t[a],i[a]=o&268435455,o>>>=28;return o&&(i[a]=o),i}function _e(t,e){let r=t.length,n=e.length;if(n>r)return[];if(n===r){if(e[n-1]>t[n-1])return[];if(n===1)return[t[0]-e[0]]}let i=[],o=0,a;for(a=0;a<n;a++)o+=t[a]-e[a],i[a]=o&268435455,o>>=28;for(;a<r;a++)o+=t[a],i[a]=o&268435455,o>>=28;return o?[]:Hr(i)}function Qa(t,e,r,n,i){let o=r&16383,a=r>>14,s=n&16383,l=n>>14,f=a*s+l*o,u=o*s+((f&16383)<<14)+t[e]+i;return t[e]=u&268435455,i=a*l+(f>>14)+(u>>28),i}function pS(t){let e=t.length,r=2*e,n=Gr(r),i=0,o,a;for(o=0;o<e;o++){for(i=Qa(n,2*o,t[o],t[o],0),a=o+1;a<e;a++)i=Qa(n,o+a,2*t[a],t[o],i);n[o+e]=i}return Hr(n)}function ft(t,e){let r=t.length,n=e.length,i=Gr(r+n-1),o,a,s;for(a=0;a<n;a++){for(o=0,s=0;s<r;s++)o=Qa(i,a+s,t[s],e[a],o);i[a+r]=o}return Hr(i)}function Wr(t,e,r){let n=0;for(;e>=0&&r-- >0;)n=n*268435456+t[e--];return n}function Wd(t,e){let r=t.length-1,n=e.length-1,i=r-n,o,a,s,l;if(r<n||r===n&&(t[r]<e[r]||r>0&&t[r]===e[r]&&t[r-1]<e[r-1]))return Je.q=[0],Je.mod=t,Je;if(r===n&&Wr(t,n,2)/Wr(e,n,2)<4){for(o=t.concat(),a=0;s=_e(o,e),s.length!==0;)o=s,a++;return Je.q=[a],Je.mod=o,Je}let f=Math.floor(Math.log(e[n])/dS)+1,u=28-f;o=t.concat();let d=e.concat();if(u){for(l=n;l>0;l--)d[l]=d[l]<<u&268435455|d[l-1]>>f;for(d[0]=d[0]<<u&268435455,o[r]&(268435455<<f&268435455)&&(o[++r]=0,i++),l=r;l>0;l--)o[l]=o[l]<<u&268435455|o[l-1]>>f;o[0]=o[0]<<u&268435455}let b,h=Gr(i+1),E=Gr(i).concat(d);for(;b=_e(o,E),b.length!==0;)h[i]++,o=b;let m=d[n],A=Wr(d,n,2),S;for(l=r;l>n;l--){S=l-n-1,l>=o.length?h[S]=1:o[l]===m?h[S]=268435455:h[S]=Math.floor(Wr(o,l,2)/m);let R=Wr(o,l,3);for(;h[S]*A>R;)h[S]--;E=E.slice(1),b=_e(o,ft([h[S]],E)),b.length===0&&(h[S]--,b=_e(o,ft([h[S]],E))),o=b}if(u){for(l=0;l<o.length-1;l++)o[l]=o[l]>>u|o[l+1]<<f&268435455;o[o.length-1]>>=u}return Je.q=Hr(h),Je.mod=Hr(o),Je}function yS(t,e){let r=0,n;for(let i=t.length-1;i>=0;i--)n=t[i],r=((n>>14)+(r<<14))%e,r=((n&16383)+(r<<14))%e;return r}function lr(t,e){if(e.length===1){if(t.length===1)return[t[0]%e[0]];if(e[0]<16383)return[yS(t,e[0])]}return Wd(t,e).mod}function $r(t,e,r){let n=t.length-(e.length<<1);if(n>0)return $r(t.slice(0,n).concat($r(t.slice(n),e,r)),e,r);let i=e.length+1,o=e.length-1,a,s=ft(t.slice(o),r).slice(i),l=t.slice(0,i),f=ft(s,e).slice(0,i),u=_e(l,f);u.length===0&&(l[i]=1,u=_e(l,f));for(let d=0;a=_e(u,e),a.length!==0;d++)if(u=a,d>=3)return $r(u,e,r);return u}function Ud(t,e,r){let n=t.concat(),i=e.length-1,o=r.length*2,a=Gr(o+1);for(a[o]=1,a=Wd(a,r).q,o=hS(e[i])-2;i>=0;i--){for(;o>=0;o-=1)n=$r(pS(n),r,a),e[i]&1<<o&&(n=$r(ft(n,t),r,a));o=27}return n}function bS(t,e,r,n,i){let o=Ud(lr(t,r),lr(e,_e(r,[1])),r),a=Ud(lr(t,n),lr(e,_e(n,[1])),n),s=_e(a,o);return s.length===0?(s=_e(o,a),s=lr(ft(s,i),n),s=_e(n,s)):s=lr(ft(s,i),n),jd(ft(s,r),o)}function $d(t){let e=1,r=[0],n=0,i=256,o=t.length,a;if(o<2)return 0;let s=(o-2)*8,l=t.charCodeAt(0)*256+t.charCodeAt(1);if(l>s||l<s-8)return 0;for(let f=0;f<s;f++)(i<<=1)>255&&(i=1,a=t.charCodeAt(--o)),e>268435455&&(e=1,r[++n]=0),a&i&&(r[n]|=e),e<<=1;return r}function gS(t){let e=1,r=0,n=[0],i=1,o=0,a=t.length*28,s="",l;for(l=0;l<a;l++)t[r]&e&&(n[o]|=i),(i<<=1)>255&&(i=1,n[++o]=0),(e<<=1)>268435455&&(e=1,r++);for(;o>=0&&n[o]===0;)o--;for(l=0;l<=o;l++)s=String.fromCharCode(n[l])+s;return s}function Gd(t){let e=[];for(let r=0;r<4;r++){let n=(t[0]*256+t[1]+7>>3)+2;if(e[r]=$d(t.toString("binary").substr(0,n)),typeof e[r]=="number"){if(r!==4||t.length>=16)return!1;break}t=t.slice(n)}return e}function Hd(t,e){let r=$d(t.toString("binary")),n=gS(bS(r,e[2],e[0],e[1],e[3]));return p.Buffer.from(n,"binary")}var Je,dS,Vd=he(()=>{c();Je={},dS=Math.log(2)});var wS,Vr,Za=he(()=>{c();je();wS=globalThis.AbortController||Zi,Vr=wS});function zd(t){if(t.statusText==="Server Too Busy")return-3;if(!t.ok)throw Error(`Server returned error: ${t.statusText}`);return t.json()}function SS(t){if(t.name!=="AbortError")throw t}var Yd,es,Kd,mS,_S,ES,ts,Fe,Kr=he(()=>{c();Yd=pe(Te(),1);je();je();Za();or();es=4,Kd={1:"EINTERNAL (-1): An internal error has occurred. Please submit a bug report, detailing the exact circumstances in which this error occurred.",2:"EARGS (-2): You have passed invalid arguments to this command.",3:"EAGAIN (-3): A temporary congestion or server malfunction prevented your request from being processed. No data was altered. Retried "+es+" times.",4:"ERATELIMIT (-4): You have exceeded your command weight per time quota. Please wait a few seconds, then try again (this should never happen in sane real-life applications).",5:"EFAILED (-5): The upload failed. Please restart it from scratch.",6:"ETOOMANY (-6): Too many concurrent IP addresses are accessing this upload target URL.",7:"ERANGE (-7): The upload file packet is out of range or not starting and ending on a chunk boundary.",8:"EEXPIRED (-8): The upload target URL you are trying to access has expired. Please request a fresh one.",9:"ENOENT (-9): Object (typically, node or user) not found. Wrong password?",10:"ECIRCULAR (-10): Circular linkage attempted",11:"EACCESS (-11): Access violation (e.g., trying to write to a read-only share)",12:"EEXIST (-12): Trying to create an object that already exists",13:"EINCOMPLETE (-13): Trying to access an incomplete resource",14:"EKEY (-14): A decryption operation failed (never returned by the API)",15:"ESID (-15): Invalid or expired user session, please relogin",16:"EBLOCKED (-16): User blocked",17:"EOVERQUOTA (-17): Request over quota",18:"ETEMPUNAVAIL (-18): Resource temporarily not available, please try again later",19:"ETOOMANYCONNECTIONS (-19)",24:"EGOINGOVERQUOTA (-24)",25:"EROLLEDBACK (-25)",26:"EMFAREQUIRED (-26): Multi-Factor Authentication Required",27:"EMASTERONLY (-27)",28:"EBUSINESSPASTDUE (-28)",29:"EPAYWALL (-29): ODQ paywall state",400:"ETOOERR (-400)",401:"ESHAREROVERQUOTA (-401)"},mS="https://g.api.mega.co.nz/",_S=null,ES=null,ts=class t extends Yd.EventEmitter{constructor(e,r={}){super(),this.keepalive=e,this.counterId=Math.random().toString().substr(2,10),this.gateway=r.gateway||mS;let n="1.2.2",i=t.getShouldAvoidUA();this.userAgent=r.userAgent===null||i?null:`${r.userAgent||""} megajs/${n}`.trim(),this.httpAgent=r.httpAgent||_S,this.httpsAgent=r.httpsAgent||ES,this.fetch=r.fetch||this.defaultFetch.bind(this),this.closed=!1}async defaultFetch(e,r){if(r||(r={}),r.agent||(r.agent=n=>n.protocol==="http:"?this.httpAgent:this.httpsAgent),this.userAgent&&(r.headers||(r.headers={}),r.headers["user-agent"]||(r.headers["user-agent"]=this.userAgent)),!t.fetchModule)if(typeof globalThis.fetch=="function")t.fetchModule=globalThis.fetch.bind(globalThis);else throw Error("globalThis.fetch not found!");return t.fetchModule(e,r)}request(e,r,n=0){let i=e.a==="sml";if(this.closed&&!i)throw Error("API is closed");let[o,a]=J(r),s={id:(this.counterId++).toString()};return this.sid&&(s.sid=this.sid),typeof e._querystring=="object"&&(Object.assign(s,e._querystring),delete e._querystring),this.fetch(`${this.gateway}cs?${new URLSearchParams(s)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([e])}).then(zd).then(l=>{if(this.closed&&!i)return;if(!l)return o(Error("Empty response"));l.length&&(l=l[0]);let f;if(typeof l=="number"&&l<0){if(l===-3&&n<es)return setTimeout(()=>{this.request(e,o,n+1)},Math.pow(2,n+1)*1e3);f=Error(Kd[-l])}else this.keepalive&&l&&l.sn&&this.pull(l.sn);o(f,l)}).catch(l=>{o(l)}),a}pull(e,r=0){let n=new Vr;this.sn=n,this.fetch(`${this.gateway}sc?${new URLSearchParams({sn:e,sid:this.sid})}`,{method:"POST",signal:n.signal}).then(zd).then(i=>{if(this.sn=void 0,!this.closed){if(typeof i=="number"&&i<0){if(i===-3&&r<es)return setTimeout(()=>{this.pull(e,r+1)},Math.pow(2,r+1)*1e3);this.emit("error",Error(Kd[-i]))}i.w?this.wait(i.w,e):i.sn&&(i.a&&this.emit("sc",i.a),this.pull(i.sn))}}).catch(SS).catch(i=>{this.emit("error",i)})}wait(e,r){let n=new Vr;this.sn=n,this.fetch(e,{method:"POST",signal:n.signal}).catch(()=>{}).then(()=>{this.sn=void 0,this.pull(r)})}close(){this.sn&&this.sn.abort(),this.closed=!0}static getGlobalApi(){return t.globalApi||(t.globalApi=new t),t.globalApi}static handleForceHttps(e){return e??!globalThis.Deno}static getShouldAvoidUA(){let e;try{globalThis.Headers()}catch(r){e=r.message}return!((globalThis.fetch+"").length===38&&e.includes("Headers"))}};Fe=ts});var rs=_((wx,Jd)=>{"use strict";c();Jd.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,r);if(a.value!==i||a.enumerable!==!0)return!1}return!0}});var di=_((_x,Xd)=>{"use strict";c();var AS=rs();Xd.exports=function(){return AS()&&!!Symbol.toStringTag}});var Zd=_((Sx,Qd)=>{"use strict";c();Qd.exports=Error});var th=_((vx,eh)=>{"use strict";c();eh.exports=EvalError});var nh=_((xx,rh)=>{"use strict";c();rh.exports=RangeError});var oh=_((Ix,ih)=>{"use strict";c();ih.exports=ReferenceError});var ns=_((Bx,ah)=>{"use strict";c();ah.exports=SyntaxError});var zr=_((Mx,sh)=>{"use strict";c();sh.exports=TypeError});var fh=_((Lx,lh)=>{"use strict";c();lh.exports=URIError});var dh=_((Nx,ch)=>{"use strict";c();var uh=typeof Symbol<"u"&&Symbol,vS=rs();ch.exports=function(){return typeof uh!="function"||typeof Symbol!="function"||typeof uh("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:vS()}});var ph=_((Fx,hh)=>{"use strict";c();var is={__proto__:null,foo:{}},RS=Object;hh.exports=function(){return{__proto__:is}.foo===is.foo&&!(is instanceof RS)}});var gh=_((Ux,bh)=>{"use strict";c();var xS="Function.prototype.bind called on incompatible ",TS=Object.prototype.toString,IS=Math.max,OS="[object Function]",yh=function(e,r){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var o=0;o<r.length;o+=1)n[o+e.length]=r[o];return n},BS=function(e,r){for(var n=[],i=r||0,o=0;i<e.length;i+=1,o+=1)n[o]=e[i];return n},PS=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};bh.exports=function(e){var r=this;if(typeof r!="function"||TS.apply(r)!==OS)throw new TypeError(xS+r);for(var n=BS(arguments,1),i,o=function(){if(this instanceof i){var u=r.apply(this,yh(n,arguments));return Object(u)===u?u:this}return r.apply(e,yh(n,arguments))},a=IS(0,r.length-n.length),s=[],l=0;l<a;l++)s[l]="$"+l;if(i=Function("binder","return function ("+PS(s,",")+"){ return binder.apply(this,arguments); }")(o),r.prototype){var f=function(){};f.prototype=r.prototype,i.prototype=new f,f.prototype=null}return i}});var hi=_((Wx,wh)=>{"use strict";c();var MS=gh();wh.exports=Function.prototype.bind||MS});var _h=_((Gx,mh)=>{"use strict";c();var kS=Function.prototype.call,LS=Object.prototype.hasOwnProperty,CS=hi();mh.exports=CS.call(kS,LS)});var hr=_((Vx,Rh)=>{"use strict";c();var L,NS=Zd(),DS=th(),FS=nh(),qS=oh(),dr=ns(),cr=zr(),US=fh(),vh=Function,os=function(t){try{return vh('"use strict"; return ('+t+").constructor;")()}catch{}},Pt=Object.getOwnPropertyDescriptor;if(Pt)try{Pt({},"")}catch{Pt=null}var as=function(){throw new cr},jS=Pt?function(){try{return arguments.callee,as}catch{try{return Pt(arguments,"callee").get}catch{return as}}}():as,fr=dh()(),WS=ph()(),Z=Object.getPrototypeOf||(WS?function(t){return t.__proto__}:null),ur={},$S=typeof Uint8Array>"u"||!Z?L:Z(Uint8Array),Mt={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?L:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?L:ArrayBuffer,"%ArrayIteratorPrototype%":fr&&Z?Z([][Symbol.iterator]()):L,"%AsyncFromSyncIteratorPrototype%":L,"%AsyncFunction%":ur,"%AsyncGenerator%":ur,"%AsyncGeneratorFunction%":ur,"%AsyncIteratorPrototype%":ur,"%Atomics%":typeof Atomics>"u"?L:Atomics,"%BigInt%":typeof BigInt>"u"?L:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?L:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?L:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?L:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":NS,"%eval%":eval,"%EvalError%":DS,"%Float32Array%":typeof Float32Array>"u"?L:Float32Array,"%Float64Array%":typeof Float64Array>"u"?L:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?L:FinalizationRegistry,"%Function%":vh,"%GeneratorFunction%":ur,"%Int8Array%":typeof Int8Array>"u"?L:Int8Array,"%Int16Array%":typeof Int16Array>"u"?L:Int16Array,"%Int32Array%":typeof Int32Array>"u"?L:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":fr&&Z?Z(Z([][Symbol.iterator]())):L,"%JSON%":typeof JSON=="object"?JSON:L,"%Map%":typeof Map>"u"?L:Map,"%MapIteratorPrototype%":typeof Map>"u"||!fr||!Z?L:Z(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?L:Promise,"%Proxy%":typeof Proxy>"u"?L:Proxy,"%RangeError%":FS,"%ReferenceError%":qS,"%Reflect%":typeof Reflect>"u"?L:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?L:Set,"%SetIteratorPrototype%":typeof Set>"u"||!fr||!Z?L:Z(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?L:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":fr&&Z?Z(""[Symbol.iterator]()):L,"%Symbol%":fr?Symbol:L,"%SyntaxError%":dr,"%ThrowTypeError%":jS,"%TypedArray%":$S,"%TypeError%":cr,"%Uint8Array%":typeof Uint8Array>"u"?L:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?L:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?L:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?L:Uint32Array,"%URIError%":US,"%WeakMap%":typeof WeakMap>"u"?L:WeakMap,"%WeakRef%":typeof WeakRef>"u"?L:WeakRef,"%WeakSet%":typeof WeakSet>"u"?L:WeakSet};if(Z)try{null.error}catch(t){Eh=Z(Z(t)),Mt["%Error.prototype%"]=Eh}var Eh,GS=function t(e){var r;if(e==="%AsyncFunction%")r=os("async function () {}");else if(e==="%GeneratorFunction%")r=os("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=os("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&Z&&(r=Z(i.prototype))}return Mt[e]=r,r},Sh={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Yr=hi(),pi=_h(),HS=Yr.call(Function.call,Array.prototype.concat),VS=Yr.call(Function.apply,Array.prototype.splice),Ah=Yr.call(Function.call,String.prototype.replace),yi=Yr.call(Function.call,String.prototype.slice),KS=Yr.call(Function.call,RegExp.prototype.exec),zS=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,YS=/\\(\\)?/g,JS=function(e){var r=yi(e,0,1),n=yi(e,-1);if(r==="%"&&n!=="%")throw new dr("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new dr("invalid intrinsic syntax, expected opening `%`");var i=[];return Ah(e,zS,function(o,a,s,l){i[i.length]=s?Ah(l,YS,"$1"):a||o}),i},XS=function(e,r){var n=e,i;if(pi(Sh,n)&&(i=Sh[n],n="%"+i[0]+"%"),pi(Mt,n)){var o=Mt[n];if(o===ur&&(o=GS(n)),typeof o>"u"&&!r)throw new cr("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new dr("intrinsic "+e+" does not exist!")};Rh.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new cr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new cr('"allowMissing" argument must be a boolean');if(KS(/^%?[^%]*%?$/,e)===null)throw new dr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=JS(e),i=n.length>0?n[0]:"",o=XS("%"+i+"%",r),a=o.name,s=o.value,l=!1,f=o.alias;f&&(i=f[0],VS(n,HS([0,1],f)));for(var u=1,d=!0;u<n.length;u+=1){var b=n[u],h=yi(b,0,1),E=yi(b,-1);if((h==='"'||h==="'"||h==="`"||E==='"'||E==="'"||E==="`")&&h!==E)throw new dr("property names with quotes must have matching quotes");if((b==="constructor"||!d)&&(l=!0),i+="."+b,a="%"+i+"%",pi(Mt,a))s=Mt[a];else if(s!=null){if(!(b in s)){if(!r)throw new cr("base intrinsic for "+e+" exists, but the property is not available.");return}if(Pt&&u+1>=n.length){var m=Pt(s,b);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[b]}else d=pi(s,b),s=s[b];d&&!l&&(Mt[a]=s)}}return s}});var gi=_((zx,xh)=>{"use strict";c();var QS=hr(),bi=QS("%Object.defineProperty%",!0)||!1;if(bi)try{bi({},"a",{value:1})}catch{bi=!1}xh.exports=bi});var mi=_((Jx,Th)=>{"use strict";c();var ZS=hr(),wi=ZS("%Object.getOwnPropertyDescriptor%",!0);if(wi)try{wi([],"length")}catch{wi=null}Th.exports=wi});var Ph=_((Qx,Bh)=>{"use strict";c();var Ih=gi(),eA=ns(),pr=zr(),Oh=mi();Bh.exports=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new pr("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new pr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new pr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new pr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new pr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new pr("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!Oh&&Oh(e,r);if(Ih)Ih(e,r,{configurable:a===null&&l?l.configurable:!a,enumerable:i===null&&l?l.enumerable:!i,value:n,writable:o===null&&l?l.writable:!o});else if(s||!i&&!o&&!a)e[r]=n;else throw new eA("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var Lh=_((eT,kh)=>{"use strict";c();var ss=gi(),Mh=function(){return!!ss};Mh.hasArrayLengthDefineBug=function(){if(!ss)return null;try{return ss([],"length",{value:1}).length!==1}catch{return!0}};kh.exports=Mh});var qh=_((rT,Fh)=>{"use strict";c();var tA=hr(),Ch=Ph(),rA=Lh()(),Nh=mi(),Dh=zr(),nA=tA("%Math.floor%");Fh.exports=function(e,r){if(typeof e!="function")throw new Dh("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||nA(r)!==r)throw new Dh("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in e&&Nh){var a=Nh(e,"length");a&&!a.configurable&&(i=!1),a&&!a.writable&&(o=!1)}return(i||o||!n)&&(rA?Ch(e,"length",r,!0,!0):Ch(e,"length",r)),e}});var fs=_((iT,_i)=>{"use strict";c();var ls=hi(),Ei=hr(),iA=qh(),oA=zr(),Wh=Ei("%Function.prototype.apply%"),$h=Ei("%Function.prototype.call%"),Gh=Ei("%Reflect.apply%",!0)||ls.call($h,Wh),Uh=gi(),aA=Ei("%Math.max%");_i.exports=function(e){if(typeof e!="function")throw new oA("a function is required");var r=Gh(ls,$h,arguments);return iA(r,1+aA(0,e.length-(arguments.length-1)),!0)};var jh=function(){return Gh(ls,Wh,arguments)};Uh?Uh(_i.exports,"apply",{value:jh}):_i.exports.apply=jh});var us=_((aT,Kh)=>{"use strict";c();var Hh=hr(),Vh=fs(),sA=Vh(Hh("String.prototype.indexOf"));Kh.exports=function(e,r){var n=Hh(e,!!r);return typeof n=="function"&&sA(e,".prototype.")>-1?Vh(n):n}});var Jh=_((lT,Yh)=>{"use strict";c();var lA=di()(),fA=us(),cs=fA("Object.prototype.toString"),Si=function(e){return lA&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:cs(e)==="[object Arguments]"},zh=function(e){return Si(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&cs(e)!=="[object Array]"&&cs(e.callee)==="[object Function]"},uA=function(){return Si(arguments)}();Si.isLegacyArguments=zh;Yh.exports=uA?Si:zh});var Zh=_((uT,Qh)=>{"use strict";c();var cA=Object.prototype.toString,dA=Function.prototype.toString,hA=/^\s*(?:function)?\*/,Xh=di()(),ds=Object.getPrototypeOf,pA=function(){if(!Xh)return!1;try{return Function("return function*() {}")()}catch{}},hs;Qh.exports=function(e){if(typeof e!="function")return!1;if(hA.test(dA.call(e)))return!0;if(!Xh){var r=cA.call(e);return r==="[object GeneratorFunction]"}if(!ds)return!1;if(typeof hs>"u"){var n=pA();hs=n?ds(n):!1}return ds(e)===hs}});var np=_((dT,rp)=>{"use strict";c();var tp=Function.prototype.toString,yr=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,ys,Ai;if(typeof yr=="function"&&typeof Object.defineProperty=="function")try{ys=Object.defineProperty({},"length",{get:function(){throw Ai}}),Ai={},yr(function(){throw 42},null,ys)}catch(t){t!==Ai&&(yr=null)}else yr=null;var yA=/^\s*class\b/,bs=function(e){try{var r=tp.call(e);return yA.test(r)}catch{return!1}},ps=function(e){try{return bs(e)?!1:(tp.call(e),!0)}catch{return!1}},vi=Object.prototype.toString,bA="[object Object]",gA="[object Function]",wA="[object GeneratorFunction]",mA="[object HTMLAllCollection]",_A="[object HTML document.all class]",EA="[object HTMLCollection]",SA=typeof Symbol=="function"&&!!Symbol.toStringTag,AA=!(0 in[,]),gs=function(){return!1};typeof document=="object"&&(ep=document.all,vi.call(ep)===vi.call(document.all)&&(gs=function(e){if((AA||!e)&&(typeof e>"u"||typeof e=="object"))try{var r=vi.call(e);return(r===mA||r===_A||r===EA||r===bA)&&e("")==null}catch{}return!1}));var ep;rp.exports=yr?function(e){if(gs(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{yr(e,null,ys)}catch(r){if(r!==Ai)return!1}return!bs(e)&&ps(e)}:function(e){if(gs(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(SA)return ps(e);if(bs(e))return!1;var r=vi.call(e);return r!==gA&&r!==wA&&!/^\[object HTML/.test(r)?!1:ps(e)}});var ap=_((pT,op)=>{"use strict";c();var vA=np(),RA=Object.prototype.toString,ip=Object.prototype.hasOwnProperty,xA=function(e,r,n){for(var i=0,o=e.length;i<o;i++)ip.call(e,i)&&(n==null?r(e[i],i,e):r.call(n,e[i],i,e))},TA=function(e,r,n){for(var i=0,o=e.length;i<o;i++)n==null?r(e.charAt(i),i,e):r.call(n,e.charAt(i),i,e)},IA=function(e,r,n){for(var i in e)ip.call(e,i)&&(n==null?r(e[i],i,e):r.call(n,e[i],i,e))},OA=function(e,r,n){if(!vA(r))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),RA.call(e)==="[object Array]"?xA(e,r,i):typeof e=="string"?TA(e,r,i):IA(e,r,i)};op.exports=OA});var lp=_((bT,sp)=>{"use strict";c();sp.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var up=_((wT,fp)=>{"use strict";c();var ws=lp(),BA=typeof globalThis>"u"?w:globalThis;fp.exports=function(){for(var e=[],r=0;r<ws.length;r++)typeof BA[ws[r]]=="function"&&(e[e.length]=ws[r]);return e}});var As=_((_T,pp)=>{"use strict";c();var xi=ap(),PA=up(),cp=fs(),Es=us(),Ri=mi(),MA=Es("Object.prototype.toString"),hp=di()(),dp=typeof globalThis>"u"?w:globalThis,_s=PA(),Ss=Es("String.prototype.slice"),ms=Object.getPrototypeOf,kA=Es("Array.prototype.indexOf",!0)||function(e,r){for(var n=0;n<e.length;n+=1)if(e[n]===r)return n;return-1},Ti={__proto__:null};hp&&Ri&&ms?xi(_s,function(t){var e=new dp[t];if(Symbol.toStringTag in e){var r=ms(e),n=Ri(r,Symbol.toStringTag);if(!n){var i=ms(r);n=Ri(i,Symbol.toStringTag)}Ti["$"+t]=cp(n.get)}}):xi(_s,function(t){var e=new dp[t],r=e.slice||e.set;r&&(Ti["$"+t]=cp(r))});var LA=function(e){var r=!1;return xi(Ti,function(n,i){if(!r)try{"$"+n(e)===i&&(r=Ss(i,1))}catch{}}),r},CA=function(e){var r=!1;return xi(Ti,function(n,i){if(!r)try{n(e),r=Ss(i,1)}catch{}}),r};pp.exports=function(e){if(!e||typeof e!="object")return!1;if(!hp){var r=Ss(MA(e),8,-1);return kA(_s,r)>-1?r:r!=="Object"?!1:CA(e)}return Ri?LA(e):null}});var bp=_((ST,yp)=>{"use strict";c();var NA=As();yp.exports=function(e){return!!NA(e)}});var Bp=_(B=>{"use strict";c();var DA=Jh(),FA=Zh(),ve=As(),gp=bp();function br(t){return t.call.bind(t)}var wp=typeof BigInt<"u",mp=typeof Symbol<"u",Ee=br(Object.prototype.toString),qA=br(Number.prototype.valueOf),UA=br(String.prototype.valueOf),jA=br(Boolean.prototype.valueOf);wp&&(_p=br(BigInt.prototype.valueOf));var _p;mp&&(Ep=br(Symbol.prototype.valueOf));var Ep;function Xr(t,e){if(typeof t!="object")return!1;try{return e(t),!0}catch{return!1}}B.isArgumentsObject=DA;B.isGeneratorFunction=FA;B.isTypedArray=gp;function WA(t){return typeof Promise<"u"&&t instanceof Promise||t!==null&&typeof t=="object"&&typeof t.then=="function"&&typeof t.catch=="function"}B.isPromise=WA;function $A(t){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(t):gp(t)||Ap(t)}B.isArrayBufferView=$A;function GA(t){return ve(t)==="Uint8Array"}B.isUint8Array=GA;function HA(t){return ve(t)==="Uint8ClampedArray"}B.isUint8ClampedArray=HA;function VA(t){return ve(t)==="Uint16Array"}B.isUint16Array=VA;function KA(t){return ve(t)==="Uint32Array"}B.isUint32Array=KA;function zA(t){return ve(t)==="Int8Array"}B.isInt8Array=zA;function YA(t){return ve(t)==="Int16Array"}B.isInt16Array=YA;function JA(t){return ve(t)==="Int32Array"}B.isInt32Array=JA;function XA(t){return ve(t)==="Float32Array"}B.isFloat32Array=XA;function QA(t){return ve(t)==="Float64Array"}B.isFloat64Array=QA;function ZA(t){return ve(t)==="BigInt64Array"}B.isBigInt64Array=ZA;function ev(t){return ve(t)==="BigUint64Array"}B.isBigUint64Array=ev;function Ii(t){return Ee(t)==="[object Map]"}Ii.working=typeof Map<"u"&&Ii(new Map);function tv(t){return typeof Map>"u"?!1:Ii.working?Ii(t):t instanceof Map}B.isMap=tv;function Oi(t){return Ee(t)==="[object Set]"}Oi.working=typeof Set<"u"&&Oi(new Set);function rv(t){return typeof Set>"u"?!1:Oi.working?Oi(t):t instanceof Set}B.isSet=rv;function Bi(t){return Ee(t)==="[object WeakMap]"}Bi.working=typeof WeakMap<"u"&&Bi(new WeakMap);function nv(t){return typeof WeakMap>"u"?!1:Bi.working?Bi(t):t instanceof WeakMap}B.isWeakMap=nv;function Rs(t){return Ee(t)==="[object WeakSet]"}Rs.working=typeof WeakSet<"u"&&Rs(new WeakSet);function iv(t){return Rs(t)}B.isWeakSet=iv;function Pi(t){return Ee(t)==="[object ArrayBuffer]"}Pi.working=typeof ArrayBuffer<"u"&&Pi(new ArrayBuffer);function Sp(t){return typeof ArrayBuffer>"u"?!1:Pi.working?Pi(t):t instanceof ArrayBuffer}B.isArrayBuffer=Sp;function Mi(t){return Ee(t)==="[object DataView]"}Mi.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Mi(new DataView(new ArrayBuffer(1),0,1));function Ap(t){return typeof DataView>"u"?!1:Mi.working?Mi(t):t instanceof DataView}B.isDataView=Ap;var vs=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Jr(t){return Ee(t)==="[object SharedArrayBuffer]"}function vp(t){return typeof vs>"u"?!1:(typeof Jr.working>"u"&&(Jr.working=Jr(new vs)),Jr.working?Jr(t):t instanceof vs)}B.isSharedArrayBuffer=vp;function ov(t){return Ee(t)==="[object AsyncFunction]"}B.isAsyncFunction=ov;function av(t){return Ee(t)==="[object Map Iterator]"}B.isMapIterator=av;function sv(t){return Ee(t)==="[object Set Iterator]"}B.isSetIterator=sv;function lv(t){return Ee(t)==="[object Generator]"}B.isGeneratorObject=lv;function fv(t){return Ee(t)==="[object WebAssembly.Module]"}B.isWebAssemblyCompiledModule=fv;function Rp(t){return Xr(t,qA)}B.isNumberObject=Rp;function xp(t){return Xr(t,UA)}B.isStringObject=xp;function Tp(t){return Xr(t,jA)}B.isBooleanObject=Tp;function Ip(t){return wp&&Xr(t,_p)}B.isBigIntObject=Ip;function Op(t){return mp&&Xr(t,Ep)}B.isSymbolObject=Op;function uv(t){return Rp(t)||xp(t)||Tp(t)||Ip(t)||Op(t)}B.isBoxedPrimitive=uv;function cv(t){return typeof Uint8Array<"u"&&(Sp(t)||vp(t))}B.isAnyArrayBuffer=cv;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(t){Object.defineProperty(B,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})})});var Mp=_((xT,Pp)=>{c();Pp.exports=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}});var Fp=_(P=>{c();var kp=Object.getOwnPropertyDescriptors||function(e){for(var r=Object.keys(e),n={},i=0;i<r.length;i++)n[r[i]]=Object.getOwnPropertyDescriptor(e,r[i]);return n},dv=/%[sdj%]/g;P.format=function(t){if(!qi(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(ut(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,i=n.length,o=String(t).replace(dv,function(s){if(s==="%%")return"%";if(r>=i)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch{return"[Circular]"}default:return s}}),a=n[r];r<i;a=n[++r])Fi(a)||!gr(a)?o+=" "+a:o+=" "+ut(a);return o};P.deprecate=function(t,e){if(typeof y<"u"&&y.noDeprecation===!0)return t;if(typeof y>"u")return function(){return P.deprecate(t,e).apply(this,arguments)};var r=!1;function n(){if(!r){if(y.throwDeprecation)throw new Error(e);y.traceDeprecation?console.trace(e):console.error(e),r=!0}return t.apply(this,arguments)}return n};var ki={},Lp=/^$/;y.env.NODE_DEBUG&&(Li=y.env.NODE_DEBUG,Li=Li.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),Lp=new RegExp("^"+Li+"$","i"));var Li;P.debuglog=function(t){if(t=t.toUpperCase(),!ki[t])if(Lp.test(t)){var e=y.pid;ki[t]=function(){var r=P.format.apply(P,arguments);console.error("%s %d: %s",t,e,r)}}else ki[t]=function(){};return ki[t]};function ut(t,e){var r={seen:[],stylize:pv};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Os(e)?r.showHidden=e:e&&P._extend(r,e),Lt(r.showHidden)&&(r.showHidden=!1),Lt(r.depth)&&(r.depth=2),Lt(r.colors)&&(r.colors=!1),Lt(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=hv),Ni(r,t,r.depth)}P.inspect=ut;ut.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};ut.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function hv(t,e){var r=ut.styles[e];return r?"\x1B["+ut.colors[r][0]+"m"+t+"\x1B["+ut.colors[r][1]+"m":t}function pv(t,e){return t}function yv(t){var e={};return t.forEach(function(r,n){e[r]=!0}),e}function Ni(t,e,r){if(t.customInspect&&e&&Ci(e.inspect)&&e.inspect!==P.inspect&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(r,t);return qi(n)||(n=Ni(t,n,r)),n}var i=bv(t,e);if(i)return i;var o=Object.keys(e),a=yv(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),Zr(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return xs(e);if(o.length===0){if(Ci(e)){var s=e.name?": "+e.name:"";return t.stylize("[Function"+s+"]","special")}if(Qr(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(Di(e))return t.stylize(Date.prototype.toString.call(e),"date");if(Zr(e))return xs(e)}var l="",f=!1,u=["{","}"];if(Cp(e)&&(f=!0,u=["[","]"]),Ci(e)){var d=e.name?": "+e.name:"";l=" [Function"+d+"]"}if(Qr(e)&&(l=" "+RegExp.prototype.toString.call(e)),Di(e)&&(l=" "+Date.prototype.toUTCString.call(e)),Zr(e)&&(l=" "+xs(e)),o.length===0&&(!f||e.length==0))return u[0]+l+u[1];if(r<0)return Qr(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var b;return f?b=gv(t,e,r,a,o):b=o.map(function(h){return Is(t,e,r,a,h,f)}),t.seen.pop(),wv(b,l,u)}function bv(t,e){if(Lt(e))return t.stylize("undefined","undefined");if(qi(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(Np(e))return t.stylize(""+e,"number");if(Os(e))return t.stylize(""+e,"boolean");if(Fi(e))return t.stylize("null","null")}function xs(t){return"["+Error.prototype.toString.call(t)+"]"}function gv(t,e,r,n,i){for(var o=[],a=0,s=e.length;a<s;++a)Dp(e,String(a))?o.push(Is(t,e,r,n,String(a),!0)):o.push("");return i.forEach(function(l){l.match(/^\d+$/)||o.push(Is(t,e,r,n,l,!0))}),o}function Is(t,e,r,n,i,o){var a,s,l;if(l=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},l.get?l.set?s=t.stylize("[Getter/Setter]","special"):s=t.stylize("[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),Dp(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(l.value)<0?(Fi(r)?s=Ni(t,l.value,null):s=Ni(t,l.value,r-1),s.indexOf(`
`)>-1&&(o?s=s.split(`
`).map(function(f){return" "+f}).join(`
`).slice(2):s=`
`+s.split(`
`).map(function(f){return" "+f}).join(`
`))):s=t.stylize("[Circular]","special")),Lt(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function wv(t,e,r){var n=0,i=t.reduce(function(o,a){return n++,a.indexOf(`
`)>=0&&n++,o+a.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(e===""?"":e+`
`)+" "+t.join(`,
`)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}P.types=Bp();function Cp(t){return Array.isArray(t)}P.isArray=Cp;function Os(t){return typeof t=="boolean"}P.isBoolean=Os;function Fi(t){return t===null}P.isNull=Fi;function mv(t){return t==null}P.isNullOrUndefined=mv;function Np(t){return typeof t=="number"}P.isNumber=Np;function qi(t){return typeof t=="string"}P.isString=qi;function _v(t){return typeof t=="symbol"}P.isSymbol=_v;function Lt(t){return t===void 0}P.isUndefined=Lt;function Qr(t){return gr(t)&&Bs(t)==="[object RegExp]"}P.isRegExp=Qr;P.types.isRegExp=Qr;function gr(t){return typeof t=="object"&&t!==null}P.isObject=gr;function Di(t){return gr(t)&&Bs(t)==="[object Date]"}P.isDate=Di;P.types.isDate=Di;function Zr(t){return gr(t)&&(Bs(t)==="[object Error]"||t instanceof Error)}P.isError=Zr;P.types.isNativeError=Zr;function Ci(t){return typeof t=="function"}P.isFunction=Ci;function Ev(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}P.isPrimitive=Ev;P.isBuffer=Mp();function Bs(t){return Object.prototype.toString.call(t)}function Ts(t){return t<10?"0"+t.toString(10):t.toString(10)}var Sv=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Av(){var t=new Date,e=[Ts(t.getHours()),Ts(t.getMinutes()),Ts(t.getSeconds())].join(":");return[t.getDate(),Sv[t.getMonth()],e].join(" ")}P.log=function(){console.log("%s - %s",Av(),P.format.apply(P,arguments))};P.inherits=ze();P._extend=function(t,e){if(!e||!gr(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};function Dp(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var kt=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;P.promisify=function(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');if(kt&&e[kt]){var r=e[kt];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,kt,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,i,o=new Promise(function(l,f){n=l,i=f}),a=[],s=0;s<arguments.length;s++)a.push(arguments[s]);a.push(function(l,f){l?i(l):n(f)});try{e.apply(this,a)}catch(l){i(l)}return o}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),kt&&Object.defineProperty(r,kt,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,kp(e))};P.promisify.custom=kt;function vv(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}function Rv(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');function e(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var i=r.pop();if(typeof i!="function")throw new TypeError("The last argument must be of type Function");var o=this,a=function(){return i.apply(o,arguments)};t.apply(this,r).then(function(s){y.nextTick(a.bind(null,null,s))},function(s){y.nextTick(vv.bind(null,s,a))})}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,kp(t)),e}P.callbackify=Rv});var jp=_((BT,Up)=>{c();var xv=Rt(),Tv=Fp(),qp=xv.Transform;function en(t){if(!(this instanceof en))return new en(t);this._toSkip=t.skip,qp.call(this,t)}Tv.inherits(en,qp);en.prototype._transform=function(t,e,r){this._toSkip==0?this.push(t):this._toSkip>t.length?this._toSkip-=t.length:(this._toSkip!==t.length&&this.push(t.slice(this._toSkip)),this._toSkip=0),r()};Up.exports=en});var Wp,$p,Gp,Ps,Ms,Xe,ks=he(()=>{c();jr();Kr();Wp=pe(Te(),1);or();$p=pe(Rt(),1),Gp=pe(jp(),1);Za();Ps=class t extends Wp.EventEmitter{constructor(e){if(super(),this.checkConstructorArgument(e.downloadId),this.checkConstructorArgument(e.key),this.checkConstructorArgument(e.loadedFile),this.downloadId=e.downloadId,this.key=e.key?se(e.key):null,this.type=e.directory?1:0,this.directory=!!e.directory,this.api=e.api||Fe.getGlobalApi(),!(this.api instanceof Fe))throw Error("api must be a instance of API");this.loadedFile=e.loadedFile}get createdAt(){if(typeof this.timestamp<"u")return this.timestamp*1e3}checkConstructorArgument(e){if(typeof e=="string"&&!/^[\w-]+$/.test(e))throw Error(`Invalid argument: "${e}"`)}loadMetadata(e,r){if(this.size=r.s||0,this.timestamp=r.ts||0,this.type=r.t,this.directory=!!r.t,this.owner=r.u,this.name=null,!e||!r.k)return;let n=r.k.split(":");this.key=se(n[n.length-1]),e.decryptECB(this.key),r.a&&this.decryptAttributes(r.a)}decryptAttributes(e){if(!this.key)return this;e=Ur(e),De(this.key).decryptCBC(e);let r=t.unpackAttributes(e);r&&this.parseAttributes(r)}parseAttributes(e){this.attributes=e,this.name=e.n,this.label=Ms[e.lbl||0],this.favorited=!!e.fav}loadAttributes(e){let[r,n]=J(e),i=this.directory?{a:"f",c:1,ca:1,r:1,_querystring:{n:this.downloadId}}:{a:"g",p:this.downloadId};return this.api.request(i,(o,a)=>{if(o)return r(o);if(this.directory){let s=Object.create(null),l=a.f,f=l.find(d=>d.k&&d.h===d.k.split(":")[0]),u=this.key?new oe(this.key):null;this.nodeId=f.h,this.timestamp=f.ts,s[f.h]=this;for(let d of l){if(d===f)continue;let b=new t(d,this.storage);b.loadMetadata(u,d),b.downloadId=[this.downloadId,d.h],s[d.h]=b}for(let d of l){let b=s[d.p];if(b){let h=s[d.h];b.children||(b.children=[]),b.children.push(h),h.parent=b}}if(this.loadMetadata(u,f),this.key&&!this.attributes)return r(Error("Attributes could not be decrypted with provided key."));if(this.loadedFile){let d=s[this.loadedFile];typeof d>"u"?r(Error("Node (file or folder) not found in folder")):r(null,d)}else r(null,this)}else{if(this.size=a.s,this.decryptAttributes(a.at),this.key&&!this.attributes)return r(Error("Attributes could not be decrypted with provided key."));r(null,this)}}),n}download(e,r){typeof e=="function"&&(r=e,e={}),e||(e={});let n=e.start||0,i=e.returnCiphertext?n:n-n%16,o=e.end||null,a=e.maxConnections||4,s=e.initialChunkSize||128*1024,l=e.chunkSizeIncrement||128*1024,f=e.maxChunkSize||1024*1024,d={a:"g",g:1,ssl:Fe.handleForceHttps(e.forceHttps)?2:0};if(this.nodeId?d.n=this.nodeId:Array.isArray(this.downloadId)?(d._querystring={n:this.downloadId[0]},d.n=this.downloadId[1]):d.p=this.downloadId,this.directory)throw Error("Can't download: folder download isn't supported");if(!this.key&&!e.returnCiphertext)throw Error("Can't download: key isn't defined");let b=this.key&&!e.returnCiphertext?ci(this.key,{start:i,disableVerification:i!==0||o!==null}):new $p.PassThrough,h=i===n?b:b.pipe(new Gp.default({skip:n-i})),E=e.handleRetries||t.defaultHandleRetries;return this.api.request(d,(m,A)=>{if(m)return h.emit("error",m);if(typeof A.g!="string"||A.g.substr(0,4)!=="http")return h.emit("error",Error("MEGA servers returned an invalid response, maybe caused by rate limit"));if(A.s===0)return h.end();if(o||(o=A.s-1),n>o)return h.emit("error",Error("You can't download past the end of the file."));function S(C){if(C.status!==200){if(C.status===509){let q=C.headers.get("x-mega-time-left"),ue=Error("Bandwidth limit reached: "+q+" seconds until it resets");ue.timeLimit=q,h.emit("error",ue);return}h.emit("error",Error("MEGA returned a "+C.status+" status code"))}}function R(C){h.emit("error",C)}let M=0;if(h.on("data",C=>{M+=C.length,h.emit("progress",{bytesLoaded:M,bytesTotal:A.s})}),a===1){let C=new Vr;h.on("close",()=>{C.abort()}),this.api.fetch(A.g+"/"+i+"-"+o,{signal:C.signal}).then(q=>{S(q);let ue=q.body;if(ue)if(ue.pipe)q.body.pipe(b);else if(ue.getReader){let Ze=ue.getReader(),ce=({done:le,value:Ct})=>{if(le)b.end();else return b.write(Ct),Ze.read().then(ce)};Ze.read().then(ce)}else throw Error("Single connection streaming not supported by fetch");else throw Error("Missing response body")}).catch(R);return}let v={},I=0,j=0,F=!1,X=i,U=s;h.on("error",()=>{F=!0}),h.on("close",()=>{F=!0});let ee=()=>{if(X>o){F=!0,I===j&&b.end();return}let C=X,q=Math.min(o,C+U-1),ue=I++,Ze=0,ce=()=>{Ze++,this.api.fetch(A.g+"/"+C+"-"+q).then(le=>(S(le),le.arrayBuffer())).then(le=>{let Ct=p.Buffer.from(le);v[ue]=Ct,j===ue&&qe()},le=>{E(Ze,le,Ct=>{Ct?R(Ct):ce()})})};ce(),X=q+1,U<f&&(U=U+l)},qe=()=>{let C;for(;;){let q=v[j];if(!q||(C=!b.write(q),delete v[j],j++,C))break}F&&I===j&&b.end(),C?b.once("drain",qe):ee()};for(let C=0;C<a;C++)ee()}),r&&oi(h,r),h}downloadBuffer(e,r){let[n,i]=J(r);return this.download(e,n),i}link(e,r){arguments.length===1&&typeof e=="function"&&(r=e,e={noKey:!1});let[n,i]=J(r);typeof e=="boolean"&&(e={noKey:e});let o=`https://mega.nz/${this.directory?"folder":"file"}/${this.downloadId}`;return!e.noKey&&this.key&&(o+=`#${H(this.key)}`),!e.noKey&&this.loadedFile&&(o+=`/file/${this.loadedFile}`),n(null,o),i}find(e,r){if(!this.children)throw Error("You can only call .find on directories");if(typeof e=="string"){let n=e;e=i=>i.name===n}else if(Array.isArray(e)){let n=e;e=i=>n.includes(i.name)}if(typeof e!="function")throw Error("Query must be a file matching function, an array of valid file names or a string with a file name");return this.children.reduce((n,i)=>n||(i.children?r?i.find(e,r):null:e(i)?i:null),null)}filter(e,r){if(!this.children)throw Error("You can only call .filter on directories");if(typeof e=="string"){let n=e;e=i=>i.name===n}else if(Array.isArray(e)){let n=e;e=i=>n.includes(i.name)}if(typeof e!="function")throw Error("Query must be a file matching function, an array of valid file names or a string with a file name");return this.children.reduce((n,i)=>i.children?r?n.concat(i.find(e,r)):n:e(i)?n.concat(i):n,[])}navigate(e,r){if(!this.children)throw Error("You can only call .navigate on directories");if(typeof e=="string")e=e.split("/");else if(!Array.isArray(e))throw Error("Query must be an array or a string");return e.reduce((n,i)=>n&&n.children&&n.children.find(o=>o.name===i),this)}static fromURL(e,r={}){if(typeof e=="object")return new t(e);let n=new URL(e);if(n.hostname!=="mega.nz"&&n.hostname!=="mega.co.nz")throw Error("Invalid URL: wrong hostname");if(!n.hash)throw Error("Invalid URL: no hash");if(n.pathname.match(/\/(file|folder)\//)!==null){let i=n.hash.substr(1).split("/file/"),o=n.pathname.substring(n.pathname.lastIndexOf("/")+1,n.pathname.length+1),a=i[0];if(o&&!a||!o&&a)throw Error("Invalid URL: too few arguments");return new t({downloadId:o,key:a,directory:n.pathname.indexOf("/folder/")>=0,loadedFile:i[1],...r})}else{let i=n.hash.split("!");if(i[0]!=="#"&&i[0]!=="#F")throw Error("Invalid URL: format not recognized");if(i.length<=1)throw Error("Invalid URL: too few arguments");if(i.length>=(i[0]==="#"?4:5))throw Error("Invalid URL: too many arguments");return new t({downloadId:i[1],key:i[2],directory:i[0]==="#F",loadedFile:i[3],...r})}}static unpackAttributes(e){let r=0;for(;r<e.length&&e.readUInt8(r);)r++;if(e=e.slice(0,r).toString(),e.substr(0,6)==='MEGA{"')try{return JSON.parse(e.substr(4))}catch{}}static defaultHandleRetries(e,r,n){e>8?n(r):setTimeout(n,1e3*Math.pow(2,e))}},Ms=["","red","orange","yellow","green","blue","purple","grey"],Xe=Ps});function Ui(t,e,r){let n=t.shareKeys;Array.isArray(e)||(e=Vp(e)),r||(r=e.map(o=>tn(n,o)).reduce((o,a)=>o.concat(a)).filter((o,a,s)=>a===s.indexOf(o)));let i=[r,e.map(o=>o.nodeId),[]];for(let o=r.length;o--;){let a=new oe(n[r[o]]);for(let s=e.length;s--;){let l=p.Buffer.from(e[s].key);l&&(l.length===32||l.length===16)&&i[2].push(o,s,H(a.encryptECB(l)))}}return i}function Vp(t){return[t].concat((t.children||[]).map(Vp).reduce((e,r)=>e.concat(r),[]))}function tn(t,e){let r=e.nodeId,n=e.parent,i=[];return t[r]&&i.push(r),n?i.concat(tn(t,n)):i}var ji,Ls,Hp,Cs,Wi,Ns=he(()=>{c();ks();ji=pe(za(),1),Ls=pe(Rt(),1);jr();or();Kr();Hp={},Cs=class t extends Xe{constructor(e,r){if(super(e),this.storage=r,this.api=r.api,this.nodeId=e.h,this.timestamp=e.ts,this.type=e.t,this.directory=!!this.type,e.k){let n=e.k.split("/"),i=r.aes;for(let o of n){let a=o.split(":")[0];if(a===r.user){e.k=o;break}let s=r.shareKeys[a];if(s){e.k=o,i=Hp[a],i||(i=Hp[a]=new oe(s));break}}this.loadMetadata(i,e)}}loadAttributes(){throw Error("This is not needed for files loaded from logged in sessions")}mkdir(e,r){if(!this.directory)throw Error("node isn't a directory");let[n,i]=J(r);if(typeof e=="string"&&(e={name:e}),e.attributes||(e.attributes={}),e.name&&(e.attributes.n=e.name),!e.attributes.n)throw Error("file name is required");if(e.target||(e.target=this),e.key||(e.key=p.Buffer.from((0,ji.default)(16))),e.key.length!==16)throw Error("wrong key length, must be 128bit");let o=e.key,a=t.packAttributes(e.attributes);De(o).encryptCBC(a);let s=p.Buffer.from(o);this.storage.aes.encryptECB(s);let l={a:"p",t:e.target.nodeId?e.target.nodeId:e.target,n:[{h:"xxxxxxxx",t:1,a:H(a),k:H(s)}]},f=tn(this.storage.shareKeys,this);return f.length>0&&(l.cr=Ui(this.storage,[{nodeId:"xxxxxxxx",key:o}],f)),this.api.request(l,(u,d)=>{if(u)return n(u);let b=this.storage._importFile(d.f[0]);this.storage.emit("add",b),n(null,b)}),i}upload(e,r,n){if(!this.directory)throw Error("node is not a directory");arguments.length===2&&typeof r=="function"&&([n,r]=[r,null]);let[i,o]=J(n);if(typeof e=="string"&&(e={name:e}),e.attributes||(e.attributes={}),e.name&&(e.attributes.n=e.name),!e.attributes.n)throw Error("File name is required.");if(!(typeof e.size=="number"&&e.size>=0)&&!(r&&typeof r.pipe!="function"&&typeof r.length=="number")&&!e.allowUploadBuffering)throw Error("Specify a file size or set allowUploadBuffering to true");e.target||(e.target=this);let a,s=se(e.key);s||(s=(0,ji.default)(24)),s instanceof p.Buffer||(s=p.Buffer.from(s));let l=e.uploadCiphertext?32:24;if(s.length!==l)throw Error("Wrong key length. Key must be 192bit");e.uploadCiphertext&&(a=s,s=Xa(s).slice(0,24)),e.key=s;let f=[],u=(h,E,m,A)=>{if(h)return b(h);if(!m||m.length===0){b(Error("Server returned a invalid response while uploading"));return}let S=Number(m.toString());if(S<0){b(Error("Server returned error "+S+" while uploading"));return}if(f[E]=m,E===0&&!a&&(a=A.key),e.thumbnailImage&&!f[1]||e.previewImage&&!f[2]||!f[0])return;let R=t.packAttributes(e.attributes);De(a).encryptCBC(R);let M=p.Buffer.from(a);this.storage.aes.encryptECB(M);let v={h:H(f[0]),t:0,a:H(R),k:H(M)};f.length!==1&&(v.fa=f.slice(1).map((F,X)=>X+"*"+H(F)).filter(F=>F).join("/"));let I={a:"p",t:e.target.nodeId?e.target.nodeId:e.target,n:[v]},j=tn(this.storage.shareKeys,this);j.length>0&&(I.cr=Ui(this.storage,[{nodeId:v.h,key:a}],j)),this.api.request(I,(F,X)=>{if(F)return b(F);let U=this.storage._importFile(X.f[0]);this.storage.emit("add",U),d.emit("complete",U),i&&i(null,U)})};e.thumbnailImage&&this._uploadAttribute(e,e.thumbnailImage,1,u),e.previewImage&&this._uploadAttribute(e,e.previewImage,2,u);let d=this._upload(e,r,0,u);function b(h){d.listenerCount("error")?d.emit("error",h):i(h)}return d.complete=o,d}_upload(e,r,n,i){let o=e.uploadCiphertext?new Ls.PassThrough:ui(e.key),a=o,s=e.size;return r&&typeof r.pipe!="function"&&(s=r.length,a.end(r)),s!=null?(s===0&&o.end(),this._uploadWithSize(a,s,o,n,e,i)):a=Md(a,l=>{this._uploadWithSize(a,l,o,n,e,i)}),r&&typeof r.pipe=="function"&&r.pipe(a),a}_uploadAttribute(e,r,n,i){let o=(a,s)=>{if(a)return i(a);let l=s.length,f=Math.ceil(l/16)*16-l;f!==0&&(s=p.Buffer.concat([s,p.Buffer.alloc(f)])),(e.handle?De(e.key):new oe(e.key.slice(0,16))).encryptCBC(s);let d=new Ls.PassThrough;d.end(s),this._uploadWithSize(d,s.length,d,n,e,i)};if(r instanceof p.Buffer){o(null,r);return}oi(r,o)}_uploadWithSize(e,r,n,i,o,a){let s=Fe.handleForceHttps(o.forceHttps)?2:0,l=i===0?{a:"u",ssl:s,s:r,ms:0,r:0,e:0,v:2}:{a:"ufa",ssl:s,s:r};o.handle&&(l.h=o.handle);let f=i===0?o.initialChunkSize||128*1024:r,u=o.chunkSizeIncrement||128*1024,d=o.maxChunkSize||1024*1024,b=o.maxConnections||4,h=o.handleRetries||Xe.defaultHandleRetries,E=f,m=0,A=!1,S=0,R,M,v,I,j,F=0,X=()=>{I=Math.min(E,r-S),M=p.Buffer.alloc(I),m++,E<d&&(E+=u),j=0,R&&(R.copy(M),j=Math.min(R.length,I),R=R.length>I?R.slice(I):null),j===I?U():(A=!0,qe())},U=()=>{let C=S,q=M,ue=0,Ze=()=>{ue++,this.api.fetch(v+"/"+(i===0?C:i-1),{method:"POST",body:q,headers:{"content-length":q.length}}).then(ce=>{if(ce.status!==200)throw Error("MEGA returned a "+ce.status+" status code");return ce.arrayBuffer()}).then(ce=>{F+=q.length,e.emit("progress",{bytesLoaded:ee,bytesUploaded:F,bytesTotal:r});let le=p.Buffer.from(ce);le.length>0?(n.end(),y.nextTick(()=>{a(null,i,le,n)})):S<r&&!A&&X()},ce=>{h(ue,ce,le=>{le?e.emit("error",le):Ze()})})};Ze(),M=null,S+=I,S<r&&!A&&m<b&&X()},ee=0,qe=()=>{for(;;){let C=n.read();if(C===null){n.once("readable",qe);break}if(ee+=C.length,C.copy(M,j),j+=C.length,j>=I){A=!1,R=C.slice(C.length-(j-I)),U();break}}};n.on("end",()=>{r&&ee!==r&&e.emit("error",Error("Specified data size does not match: "+r+" !== "+ee))}),this.api.request(l,(C,q)=>{if(C)return a(C);v=q.p,X()})}uploadAttribute(e,r,n){let[i,o]=J(n);if(typeof e=="string"&&(e=["thumbnail","preview"].indexOf(e)),e!==0&&e!==1)throw Error("Invalid attribute type");return this._uploadAttribute({key:this.key,handle:this.nodeId},r,e+1,(a,s,l,f)=>{if(a)return i(a);let u={a:"pfa",n:this.nodeId,fa:e+"*"+H(l)};this.api.request(u,(d,b)=>{if(d)return i(d);i(null,this)})}),o}delete(e,r){return typeof e=="function"&&(r=e,e=void 0),typeof e>"u"&&(e=this.parent===this.storage.trash),e?this.api.request({a:"d",n:this.nodeId},r):this.moveTo(this.storage.trash,r)}moveTo(e,r){if(typeof e=="string"&&(e=this.storage.files[e]),!(e instanceof Xe))throw Error("target must be a folder or a nodeId");let n={a:"m",n:this.nodeId,t:e.nodeId},i=tn(this.storage.shareKeys,e);return i.length>0&&(n.cr=Ui(this.storage,[this],i)),this.api.request(n,r)}setAttributes(e,r){let[n,i]=J(r);Object.assign(this.attributes,e);let o=t.packAttributes(this.attributes);return De(this.key).encryptCBC(o),this.api.request({a:"a",n:this.nodeId,at:H(o)},a=>{this.parseAttributes(this.attributes),n(a)}),i}rename(e,r){return this.setAttributes({n:e},r)}setLabel(e,r){if(typeof e=="string"&&(e=Ms.indexOf(e)),typeof e!="number"||Math.floor(e)!==e||e<0||e>7)throw Error("label must be a integer between 0 and 7 or a valid label name");return this.setAttributes({lbl:e},r)}setFavorite(e,r){return this.setAttributes({fav:e?1:0},r)}link(e,r){arguments.length===1&&typeof e=="function"&&(r=e,e={noKey:!1}),typeof e=="boolean"&&(e={noKey:e}),e||(e={});let n=e.__folderKey;if(this.directory&&!n)return this.shareFolder(e,r);let[i,o]=J(r);return this.api.request({a:"l",n:this.nodeId},(a,s)=>{if(a)return i(a);let l=`https://mega.nz/${n?"folder":"file"}/${s}`;!e.noKey&&this.key&&(l+=`#${H(n||this.key)}`),i(null,l)}),o}shareFolder(e,r){if(!this.directory)throw Error("node isn't a folder");let n=this.nodeId,i=this.storage.shareKeys[n];if(i)return this.link(Object.assign({__folderKey:i},e),r);let o=se(e.key);o||(o=(0,ji.default)(16)),o instanceof p.Buffer||(o=p.Buffer.from(o));let[a,s]=J(r);if(o.length!==16)return a(Error("share key must be 16 byte / 22 characters")),s;this.storage.shareKeys[n]=o;let l=p.Buffer.from(n+n);this.storage.aes.encryptECB(l);let f={a:"s2",n,s:[{u:"EXP",r:0}],ok:H(this.storage.aes.encryptECB(p.Buffer.from(o))),ha:H(l),cr:Ui(this.storage,this)};return this.api.request(f,u=>{if(u)return a(u);this.link(Object.assign({__folderKey:o},e),a)}),s}unshare(e){return this.directory?this.unshareFolder(e):this.api.request({a:"l",n:this.nodeId,d:1},e)}unshareFolder(e){if(!this.directory)throw Error("node isn't a folder");return delete this.storage.shareKeys[this.nodeId],this.api.request({a:"s2",n:this.nodeId,s:[{u:"EXP",r:""}]},e)}importFile(e,r){let[n,i]=J(r);if(!this.directory)throw Error("importFile can only be called on directories");if(typeof e=="string"&&(e=Xe.fromURL(e)),!(e instanceof Xe))throw Error("First argument of importFile should be a File or a URL string");if(!e.key)return n(Error("Can't import files without encryption keys")),i;let o=(a,s)=>{if(a)return n(a);let l=t.packAttributes(s.attributes);De(s.key).encryptCBC(l);let f=Array.isArray(s.downloadId)?s.downloadId[1]:s.downloadId,u={a:"p",t:this.nodeId,n:[{ph:f,t:0,a:H(l),k:H(this.storage.aes.encryptECB(s.key))}]};this.api.request(u,(d,b)=>{if(d)return n(d);let h=this.storage._importFile(b.f[0]);this.storage.emit("add",h),n(null,h)})};return e.attributes?o(null,e):e.loadAttributes(o),i}static packAttributes(e){let r=JSON.stringify(e);r=p.Buffer.from(`MEGA${r}`);let n=p.Buffer.alloc(Math.ceil(r.length/16)*16);return r.copy(n),n}};Wi=Cs});var Kp,Ds,Iv,Ov,Bv,Fs,zp=he(()=>{c();jr();Vd();Kr();Kp=pe(Te(),1);Ns();or();Ds=class t extends Kp.EventEmitter{constructor(e,r){super(),arguments.length===1&&typeof e=="function"&&(r=e,e={});let[n,i]=J(r);this.ready=i,e.keepalive=e.keepalive===void 0?!0:!!e.keepalive,e.autoload=e.autoload===void 0?!0:!!e.autoload,e.autologin=e.autologin===void 0?!0:!!e.autologin,this.api=new Fe(e.keepalive,e),this.files={},this.options=e,this.status="closed",e.autologin?this.login(n):y.nextTick(()=>{n(null,this)})}login(e){let[r,n]=J(e);if(typeof this.options.email!="string")return y.nextTick(()=>{r(Error("starting a session without credentials isn't supported"))}),n;let i=()=>{this.status="ready",r(null,this),this.emit("ready",this)},o=f=>{this.api.request({a:"ug"},(u,d)=>{if(u)return f(u);this.name=d.name,this.user=d.u,this.options.autoload?this.reload(!0,b=>{if(b)return f(b);i()}):i()})};this.email=this.options.email.toLowerCase();let a=f=>{let u=Ya(p.Buffer.from(this.options.password)),d=new oe(u),b=H(d.stringhash(p.Buffer.from(this.email))),h={a:"us",user:this.email,uh:b};l(h,d,f)},s=(f,u)=>{Ja(p.Buffer.from(this.options.password),f,(d,b)=>{if(d)return u(d);let h=new oe(b.slice(0,16)),E=H(b.slice(16)),m={a:"us",user:this.email,uh:E};l(m,h,u)})},l=(f,u,d)=>{delete this.options.password,this.options.secondFactorCode&&(f.mfa=this.options.secondFactorCode.toString()),this.api.request(f,(b,h)=>{if(b)return d(b);this.key=se(h.k),u.decryptECB(this.key),this.aes=new oe(this.key);let E=se(h.csid),m=this.aes.decryptECB(se(h.privk)),A=Gd(m);if(!A)throw Error("invalid credentials");let S=H(Hd(E,A).slice(0,43));this.api.sid=this.sid=S,this.RSAPrivateKey=A,o(d)})};return this.api.request({a:"us0",user:this.email},(f,u)=>{if(f)return r(f);if(u.v===1)return a(r);if(u.v===2)return s(u,r);r(Error("Account version not supported"))}),this.status="connecting",n}reload(e,r){typeof e=="function"&&([e,r]=[r,e]);let[n,i]=J(r);return this.status==="connecting"&&!e?(this.once("ready",()=>{this.reload(e,n)}),i):(this.mounts=[],this.api.request({a:"f",c:1},(o,a)=>{if(o)return n(o);this.shareKeys=a.ok.reduce((s,l)=>{let f=l.h,u=this.aes.encryptECB(p.Buffer.from(f+f));return qd(se(l.ha),u)&&(s[f]=this.aes.decryptECB(se(l.k))),s},{});for(let s of a.f)if(s=this._importFile(s),a.ph!==void 0&&(s.shareId=a.ph.find(l=>l.h===s.nodeId)?.ph,s.shared=!!s.shareId,s.shared)){s.shareURL=`https://mega.nz/${s.directory?"folder":"file"}/${s.shareId}`;let l=s.directory?this.shareKeys[s.nodeId]:s.key;l&&(s.shareURL+="#"+H(l))}n(null,this.mounts)}),this.api.on("sc",o=>{let a={};o.forEach(s=>{if(s.a==="u"){let l=this.files[s.n];l&&(l.timestamp=s.ts,l.decryptAttributes(s.at),l.emit("update"),this.emit("update",l))}else s.a==="d"?a[s.n]=!0:s.a==="t"&&s.t.f.forEach(l=>{let f=this.files[l.h];if(f){delete a[l.h];let u=f.parent;if(u.nodeId===l.p)return;u.children.splice(u.children.indexOf(f),1),f.parent=this.files[l.p],f.parent.children||(f.parent.children=[]),f.parent.children.push(f),f.emit("move",u),this.emit("move",f,u)}else this.emit("add",this._importFile(l))})}),Object.keys(a).forEach(s=>{let l=this.files[s],f=l.parent;f.children.splice(f.children.indexOf(l),1),this.emit("delete",l),l.emit("delete")})}),i)}_importFile(e){if(!this.files[e.h]){let r=this.files[e.h]=new Wi(e,this);if(e.t===Iv&&(this.root=r,r.name="Cloud Drive"),e.t===Bv&&(this.trash=r,r.name="Rubbish Bin"),e.t===Ov&&(this.inbox=r,r.name="Inbox"),e.t>1&&this.mounts.push(r),e.p){let n=this.files[e.p];n&&(n.children||(n.children=[]),n.children.push(r),r.parent=n)}}return this.files[e.h]}mkdir(e,r){if(this.status!=="ready")throw Error("storage is not ready");return this.root.mkdir(e,r)}upload(e,r,n){if(this.status!=="ready")throw Error("storage is not ready");return this.root.upload(e,r,n)}find(e,r){if(this.status!=="ready")throw Error("storage is not ready");return this.root.find(e,r)}filter(e,r){if(this.status!=="ready")throw Error("storage is not ready");return this.root.filter(e,r)}navigate(e,r){if(this.status!=="ready")throw Error("storage is not ready");return this.root.navigate(e,r)}close(e){return this.status="closed",this.api.close(),this.api.request({a:"sml"},e)}getAccountInfo(e){let[r,n]=J(e);return this.api.request({a:"uq",strg:1,xfer:1,pro:1},(i,o)=>{i&&r(i);let a={};a.type=o.utype,a.spaceUsed=o.cstrg,a.spaceTotal=o.mstrg,a.downloadBandwidthTotal=o.mxfer||Math.pow(1024,5)*10,a.downloadBandwidthUsed=o.caxfer||0,a.sharedBandwidthUsed=o.csxfer||0,a.sharedBandwidthLimit=o.srvratio,r(null,a)}),n}toJSON(){return{key:H(this.key),sid:this.sid,name:this.name,user:this.user,options:this.options}}static fromJSON(e){let r=new t(Object.assign(e.options,{autoload:!1,autologin:!1}));return r.key=Ur(e.key),r.aes=new oe(r.key),r.api.sid=r.sid=e.sid,r.name=e.name,r.user=e.user,r}},Iv=2,Ov=3,Bv=4,Fs=Ds});var Pv=_((rI,Yp)=>{c();jr();zp();Ns();ks();Kr();function Qe(t,e){return new Fs(t,e)}Qe.Storage=Fs;Qe.File=Xe;Qe.MutableFile=Wi;Qe.API=Fe;Qe.file=Xe.fromURL;Qe.encrypt=ui;Qe.decrypt=ci;Qe.verify=Fd;Yp.exports=Qe});return Pv();})();
/*! Bundled license information:
ieee754/index.js:
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
buffer/index.js:
(*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*)
safe-buffer/index.js:
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
*/
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists