@legit-sdk/react 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +128 -128
- package/dist/server.d.ts +1 -1
- package/dist/server.js +7 -173
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -1,177 +1,11 @@
|
|
|
1
1
|
// legit-sdk server bundle (Node.js)
|
|
2
2
|
|
|
3
|
-
var C4=Object.defineProperty;var l=(a,i)=>C4(a,"name",{value:i,configurable:!0});import{createContext as tD,useContext as rD,useEffect as _4,useState as Ud,useRef as nD}from"react";var L4=Object.create,Gs=Object.defineProperty,N4=Object.getOwnPropertyDescriptor,D4=Object.getOwnPropertyNames,U4=Object.getPrototypeOf,M4=Object.prototype.hasOwnProperty,$4=l((a,i,f)=>i in a?Gs(a,i,{enumerable:!0,configurable:!0,writable:!0,value:f}):a[i]=f,"Z$"),e=l((a,i)=>Gs(a,"name",{value:i,configurable:!0}),"o"),Qt=l((a,i)=>()=>(a&&(i=a(a=0)),i),"dt"),Ge=l((a,i)=>()=>(i||a((i={exports:{}}).exports,i),i.exports),"ge"),nn=l((a,i)=>{for(var f in i)Gs(a,f,{get:i[f],enumerable:!0})},"Ur"),nI=l((a,i,f,g)=>{if(i&&typeof i=="object"||typeof i=="function")for(let o of D4(i))!M4.call(a,o)&&o!==f&&Gs(a,o,{get:l(()=>i[o],"get"),enumerable:!(g=N4(i,o))||g.enumerable});return a},"c1"),$t=l((a,i,f)=>(f=a!=null?L4(U4(a)):{},nI(i||!a||!a.__esModule?Gs(f,"default",{value:a,enumerable:!0}):f,a)),"ft"),cr=l(a=>nI(Gs({},"__esModule",{value:!0}),a),"Lt"),vt=l((a,i,f)=>$4(a,typeof i!="symbol"?i+"":i,f),"De");function iI(){if(Um)return gs;Um=!0,gs.byteLength=u,gs.toByteArray=h,gs.fromByteArray=y;for(var a=[],i=[],f=typeof Uint8Array<"u"?Uint8Array:Array,g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,n=g.length;o<n;++o)a[o]=g[o],i[g.charCodeAt(o)]=o;i[45]=62,i[95]=63;function r(w){var _=w.length;if(_%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var S=w.indexOf("=");S===-1&&(S=_);var T=S===_?0:4-S%4;return[S,T]}l(r,"i"),e(r,"getLens");function u(w){var _=r(w),S=_[0],T=_[1];return(S+T)*3/4-T}l(u,"f"),e(u,"byteLength");function p(w,_,S){return(_+S)*3/4-S}l(p,"h"),e(p,"_byteLength");function h(w){var _,S=r(w),T=S[0],O=S[1],E=new f(p(w,T,O)),P=0,A=O>0?T-4:T,x;for(x=0;x<A;x+=4)_=i[w.charCodeAt(x)]<<18|i[w.charCodeAt(x+1)]<<12|i[w.charCodeAt(x+2)]<<6|i[w.charCodeAt(x+3)],E[P++]=_>>16&255,E[P++]=_>>8&255,E[P++]=_&255;return O===2&&(_=i[w.charCodeAt(x)]<<2|i[w.charCodeAt(x+1)]>>4,E[P++]=_&255),O===1&&(_=i[w.charCodeAt(x)]<<10|i[w.charCodeAt(x+1)]<<4|i[w.charCodeAt(x+2)]>>2,E[P++]=_>>8&255,E[P++]=_&255),E}l(h,"c"),e(h,"toByteArray");function d(w){return a[w>>18&63]+a[w>>12&63]+a[w>>6&63]+a[w&63]}l(d,"d"),e(d,"tripletToBase64");function m(w,_,S){for(var T,O=[],E=_;E<S;E+=3)T=(w[E]<<16&16711680)+(w[E+1]<<8&65280)+(w[E+2]&255),O.push(d(T));return O.join("")}l(m,"y"),e(m,"encodeChunk");function y(w){for(var _,S=w.length,T=S%3,O=[],E=16383,P=0,A=S-T;P<A;P+=E)O.push(m(w,P,P+E>A?A:P+E));return T===1?(_=w[S-1],O.push(a[_>>2]+a[_<<4&63]+"==")):T===2&&(_=(w[S-2]<<8)+w[S-1],O.push(a[_>>10]+a[_>>4&63]+a[_<<2&63]+"=")),O.join("")}return l(y,"m"),e(y,"fromByteArray"),gs}l(iI,"Q$");function oI(){return Mm||(Mm=!0,_u.read=function(a,i,f,g,o){var n,r,u=o*8-g-1,p=(1<<u)-1,h=p>>1,d=-7,m=f?o-1:0,y=f?-1:1,w=a[i+m];for(m+=y,n=w&(1<<-d)-1,w>>=-d,d+=u;d>0;n=n*256+a[i+m],m+=y,d-=8);for(r=n&(1<<-d)-1,n>>=-d,d+=g;d>0;r=r*256+a[i+m],m+=y,d-=8);if(n===0)n=1-h;else{if(n===p)return r?NaN:(w?-1:1)*(1/0);r=r+Math.pow(2,g),n=n-h}return(w?-1:1)*r*Math.pow(2,n-g)},_u.write=function(a,i,f,g,o,n){var r,u,p,h=n*8-o-1,d=(1<<h)-1,m=d>>1,y=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=g?0:n-1,_=g?1:-1,S=i<0||i===0&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(u=isNaN(i)?1:0,r=d):(r=Math.floor(Math.log(i)/Math.LN2),i*(p=Math.pow(2,-r))<1&&(r--,p*=2),r+m>=1?i+=y/p:i+=y*Math.pow(2,1-m),i*p>=2&&(r++,p/=2),r+m>=d?(u=0,r=d):r+m>=1?(u=(i*p-1)*Math.pow(2,o),r=r+m):(u=i*Math.pow(2,m-1)*Math.pow(2,o),r=0));o>=8;a[f+w]=u&255,w+=_,u/=256,o-=8);for(r=r<<o|u,h+=o;h>0;a[f+w]=r&255,w+=_,r/=256,h-=8);a[f+w-_]|=S*128}),_u}l(oI,"e8");function qA(){if($m)return ji;$m=!0;let a=iI(),i=oI(),f=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ji.Buffer=r,ji.SlowBuffer=O,ji.INSPECT_MAX_BYTES=50;let g=2147483647;ji.kMaxLength=g,r.TYPED_ARRAY_SUPPORT=o(),!r.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 o(){try{let t=new Uint8Array(1),s={foo:e(function(){return 42},"foo")};return Object.setPrototypeOf(s,Uint8Array.prototype),Object.setPrototypeOf(t,s),t.foo()===42}catch{return!1}}l(o,"a"),e(o,"typedArraySupport"),Object.defineProperty(r.prototype,"parent",{enumerable:!0,get:e(function(){if(r.isBuffer(this))return this.buffer},"get")}),Object.defineProperty(r.prototype,"offset",{enumerable:!0,get:e(function(){if(r.isBuffer(this))return this.byteOffset},"get")});function n(t){if(t>g)throw new RangeError('The value "'+t+'" is invalid for option "size"');let s=new Uint8Array(t);return Object.setPrototypeOf(s,r.prototype),s}l(n,"s"),e(n,"createBuffer");function r(t,s,c){if(typeof t=="number"){if(typeof s=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(t)}return u(t,s,c)}l(r,"i"),e(r,"Buffer2"),r.poolSize=8192;function u(t,s,c){if(typeof t=="string")return m(t,s);if(ArrayBuffer.isView(t))return w(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(Ie(t,ArrayBuffer)||t&&Ie(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(t,SharedArrayBuffer)||t&&Ie(t.buffer,SharedArrayBuffer)))return _(t,s,c);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let v=t.valueOf&&t.valueOf();if(v!=null&&v!==t)return r.from(v,s,c);let R=S(t);if(R)return R;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return r.from(t[Symbol.toPrimitive]("string"),s,c);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}l(u,"f"),e(u,"from"),r.from=function(t,s,c){return u(t,s,c)},Object.setPrototypeOf(r.prototype,Uint8Array.prototype),Object.setPrototypeOf(r,Uint8Array);function p(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"')}l(p,"h"),e(p,"assertSize");function h(t,s,c){return p(t),t<=0?n(t):s!==void 0?typeof c=="string"?n(t).fill(s,c):n(t).fill(s):n(t)}l(h,"c"),e(h,"alloc"),r.alloc=function(t,s,c){return h(t,s,c)};function d(t){return p(t),n(t<0?0:T(t)|0)}l(d,"d"),e(d,"allocUnsafe"),r.allocUnsafe=function(t){return d(t)},r.allocUnsafeSlow=function(t){return d(t)};function m(t,s){if((typeof s!="string"||s==="")&&(s="utf8"),!r.isEncoding(s))throw new TypeError("Unknown encoding: "+s);let c=E(t,s)|0,v=n(c),R=v.write(t,s);return R!==c&&(v=v.slice(0,R)),v}l(m,"y"),e(m,"fromString");function y(t){let s=t.length<0?0:T(t.length)|0,c=n(s);for(let v=0;v<s;v+=1)c[v]=t[v]&255;return c}l(y,"m"),e(y,"fromArrayLike");function w(t){if(Ie(t,Uint8Array)){let s=new Uint8Array(t);return _(s.buffer,s.byteOffset,s.byteLength)}return y(t)}l(w,"g"),e(w,"fromArrayView");function _(t,s,c){if(s<0||t.byteLength<s)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<s+(c||0))throw new RangeError('"length" is outside of buffer bounds');let v;return s===void 0&&c===void 0?v=new Uint8Array(t):c===void 0?v=new Uint8Array(t,s):v=new Uint8Array(t,s,c),Object.setPrototypeOf(v,r.prototype),v}l(_,"v"),e(_,"fromArrayBuffer");function S(t){if(r.isBuffer(t)){let s=T(t.length)|0,c=n(s);return c.length===0||t.copy(c,0,0,s),c}if(t.length!==void 0)return typeof t.length!="number"||ke(t.length)?n(0):y(t);if(t.type==="Buffer"&&Array.isArray(t.data))return y(t.data)}l(S,"_"),e(S,"fromObject");function T(t){if(t>=g)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+g.toString(16)+" bytes");return t|0}l(T,"b"),e(T,"checked");function O(t){return+t!=t&&(t=0),r.alloc(+t)}l(O,"E"),e(O,"SlowBuffer"),r.isBuffer=e(function(t){return t!=null&&t._isBuffer===!0&&t!==r.prototype},"isBuffer"),r.compare=e(function(t,s){if(Ie(t,Uint8Array)&&(t=r.from(t,t.offset,t.byteLength)),Ie(s,Uint8Array)&&(s=r.from(s,s.offset,s.byteLength)),!r.isBuffer(t)||!r.isBuffer(s))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===s)return 0;let c=t.length,v=s.length;for(let R=0,C=Math.min(c,v);R<C;++R)if(t[R]!==s[R]){c=t[R],v=s[R];break}return c<v?-1:v<c?1:0},"compare"),r.isEncoding=e(function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},"isEncoding"),r.concat=e(function(t,s){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return r.alloc(0);let c;if(s===void 0)for(s=0,c=0;c<t.length;++c)s+=t[c].length;let v=r.allocUnsafe(s),R=0;for(c=0;c<t.length;++c){let C=t[c];if(Ie(C,Uint8Array))R+C.length>v.length?(r.isBuffer(C)||(C=r.from(C)),C.copy(v,R)):Uint8Array.prototype.set.call(v,C,R);else if(r.isBuffer(C))C.copy(v,R);else throw new TypeError('"list" argument must be an Array of Buffers');R+=C.length}return v},"concat");function E(t,s){if(r.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Ie(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 c=t.length,v=arguments.length>2&&arguments[2]===!0;if(!v&&c===0)return 0;let R=!1;for(;;)switch(s){case"ascii":case"latin1":case"binary":return c;case"utf8":case"utf-8":return Ee(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c*2;case"hex":return c>>>1;case"base64":return ge(t).length;default:if(R)return v?-1:Ee(t).length;s=(""+s).toLowerCase(),R=!0}}l(E,"R"),e(E,"byteLength"),r.byteLength=E;function P(t,s,c){let v=!1;if((s===void 0||s<0)&&(s=0),s>this.length||((c===void 0||c>this.length)&&(c=this.length),c<=0)||(c>>>=0,s>>>=0,c<=s))return"";for(t||(t="utf8");;)switch(t){case"hex":return se(this,s,c);case"utf8":case"utf-8":return ae(this,s,c);case"ascii":return xe(this,s,c);case"latin1":case"binary":return Pe(this,s,c);case"base64":return re(this,s,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Te(this,s,c);default:if(v)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),v=!0}}l(P,"T"),e(P,"slowToString"),r.prototype._isBuffer=!0;function A(t,s,c){let v=t[s];t[s]=t[c],t[c]=v}l(A,"F"),e(A,"swap"),r.prototype.swap16=e(function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let s=0;s<t;s+=2)A(this,s,s+1);return this},"swap16"),r.prototype.swap32=e(function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let s=0;s<t;s+=4)A(this,s,s+3),A(this,s+1,s+2);return this},"swap32"),r.prototype.swap64=e(function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let s=0;s<t;s+=8)A(this,s,s+7),A(this,s+1,s+6),A(this,s+2,s+5),A(this,s+3,s+4);return this},"swap64"),r.prototype.toString=e(function(){let t=this.length;return t===0?"":arguments.length===0?ae(this,0,t):P.apply(this,arguments)},"toString"),r.prototype.toLocaleString=r.prototype.toString,r.prototype.equals=e(function(t){if(!r.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:r.compare(this,t)===0},"equals"),r.prototype.inspect=e(function(){let t="",s=ji.INSPECT_MAX_BYTES;return t=this.toString("hex",0,s).replace(/(.{2})/g,"$1 ").trim(),this.length>s&&(t+=" ... "),"<Buffer "+t+">"},"inspect"),f&&(r.prototype[f]=r.prototype.inspect),r.prototype.compare=e(function(t,s,c,v,R){if(Ie(t,Uint8Array)&&(t=r.from(t,t.offset,t.byteLength)),!r.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(s===void 0&&(s=0),c===void 0&&(c=t?t.length:0),v===void 0&&(v=0),R===void 0&&(R=this.length),s<0||c>t.length||v<0||R>this.length)throw new RangeError("out of range index");if(v>=R&&s>=c)return 0;if(v>=R)return-1;if(s>=c)return 1;if(s>>>=0,c>>>=0,v>>>=0,R>>>=0,this===t)return 0;let C=R-v,j=c-s,Z=Math.min(C,j),oe=this.slice(v,R),Ae=t.slice(s,c);for(let le=0;le<Z;++le)if(oe[le]!==Ae[le]){C=oe[le],j=Ae[le];break}return C<j?-1:j<C?1:0},"compare");function x(t,s,c,v,R){if(t.length===0)return-1;if(typeof c=="string"?(v=c,c=0):c>2147483647?c=2147483647:c<-2147483648&&(c=-2147483648),c=+c,ke(c)&&(c=R?0:t.length-1),c<0&&(c=t.length+c),c>=t.length){if(R)return-1;c=t.length-1}else if(c<0)if(R)c=0;else return-1;if(typeof s=="string"&&(s=r.from(s,v)),r.isBuffer(s))return s.length===0?-1:U(t,s,c,v,R);if(typeof s=="number")return s=s&255,typeof Uint8Array.prototype.indexOf=="function"?R?Uint8Array.prototype.indexOf.call(t,s,c):Uint8Array.prototype.lastIndexOf.call(t,s,c):U(t,[s],c,v,R);throw new TypeError("val must be string, number or Buffer")}l(x,"S"),e(x,"bidirectionalIndexOf");function U(t,s,c,v,R){let C=1,j=t.length,Z=s.length;if(v!==void 0&&(v=String(v).toLowerCase(),v==="ucs2"||v==="ucs-2"||v==="utf16le"||v==="utf-16le")){if(t.length<2||s.length<2)return-1;C=2,j/=2,Z/=2,c/=2}function oe(le,Fe){return C===1?le[Fe]:le.readUInt16BE(Fe*C)}l(oe,"re"),e(oe,"read");let Ae;if(R){let le=-1;for(Ae=c;Ae<j;Ae++)if(oe(t,Ae)===oe(s,le===-1?0:Ae-le)){if(le===-1&&(le=Ae),Ae-le+1===Z)return le*C}else le!==-1&&(Ae-=Ae-le),le=-1}else for(c+Z>j&&(c=j-Z),Ae=c;Ae>=0;Ae--){let le=!0;for(let Fe=0;Fe<Z;Fe++)if(oe(t,Ae+Fe)!==oe(s,Fe)){le=!1;break}if(le)return Ae}return-1}l(U,"B"),e(U,"arrayIndexOf"),r.prototype.includes=e(function(t,s,c){return this.indexOf(t,s,c)!==-1},"includes"),r.prototype.indexOf=e(function(t,s,c){return x(this,t,s,c,!0)},"indexOf"),r.prototype.lastIndexOf=e(function(t,s,c){return x(this,t,s,c,!1)},"lastIndexOf");function M(t,s,c,v){c=Number(c)||0;let R=t.length-c;v?(v=Number(v),v>R&&(v=R)):v=R;let C=s.length;v>C/2&&(v=C/2);let j;for(j=0;j<v;++j){let Z=parseInt(s.substr(j*2,2),16);if(ke(Z))return j;t[c+j]=Z}return j}l(M,"P"),e(M,"hexWrite");function ee(t,s,c,v){return Ne(Ee(s,t.length-c),t,c,v)}l(ee,"N"),e(ee,"utf8Write");function V(t,s,c,v){return Ne(Oe(s),t,c,v)}l(V,"L"),e(V,"asciiWrite");function q(t,s,c,v){return Ne(ge(s),t,c,v)}l(q,"C"),e(q,"base64Write");function G(t,s,c,v){return Ne(be(s,t.length-c),t,c,v)}l(G,"j"),e(G,"ucs2Write"),r.prototype.write=e(function(t,s,c,v){if(s===void 0)v="utf8",c=this.length,s=0;else if(c===void 0&&typeof s=="string")v=s,c=this.length,s=0;else if(isFinite(s))s=s>>>0,isFinite(c)?(c=c>>>0,v===void 0&&(v="utf8")):(v=c,c=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let R=this.length-s;if((c===void 0||c>R)&&(c=R),t.length>0&&(c<0||s<0)||s>this.length)throw new RangeError("Attempt to write outside buffer bounds");v||(v="utf8");let C=!1;for(;;)switch(v){case"hex":return M(this,t,s,c);case"utf8":case"utf-8":return ee(this,t,s,c);case"ascii":case"latin1":case"binary":return V(this,t,s,c);case"base64":return q(this,t,s,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,t,s,c);default:if(C)throw new TypeError("Unknown encoding: "+v);v=(""+v).toLowerCase(),C=!0}},"write"),r.prototype.toJSON=e(function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},"toJSON");function re(t,s,c){return s===0&&c===t.length?a.fromByteArray(t):a.fromByteArray(t.slice(s,c))}l(re,"q"),e(re,"base64Slice");function ae(t,s,c){c=Math.min(t.length,c);let v=[],R=s;for(;R<c;){let C=t[R],j=null,Z=C>239?4:C>223?3:C>191?2:1;if(R+Z<=c){let oe,Ae,le,Fe;switch(Z){case 1:C<128&&(j=C);break;case 2:oe=t[R+1],(oe&192)===128&&(Fe=(C&31)<<6|oe&63,Fe>127&&(j=Fe));break;case 3:oe=t[R+1],Ae=t[R+2],(oe&192)===128&&(Ae&192)===128&&(Fe=(C&15)<<12|(oe&63)<<6|Ae&63,Fe>2047&&(Fe<55296||Fe>57343)&&(j=Fe));break;case 4:oe=t[R+1],Ae=t[R+2],le=t[R+3],(oe&192)===128&&(Ae&192)===128&&(le&192)===128&&(Fe=(C&15)<<18|(oe&63)<<12|(Ae&63)<<6|le&63,Fe>65535&&Fe<1114112&&(j=Fe))}}j===null?(j=65533,Z=1):j>65535&&(j-=65536,v.push(j>>>10&1023|55296),j=56320|j&1023),v.push(j),R+=Z}return we(v)}l(ae,"Z"),e(ae,"utf8Slice");let de=4096;function we(t){let s=t.length;if(s<=de)return String.fromCharCode.apply(String,t);let c="",v=0;for(;v<s;)c+=String.fromCharCode.apply(String,t.slice(v,v+=de));return c}l(we,"se"),e(we,"decodeCodePointsArray");function xe(t,s,c){let v="";c=Math.min(t.length,c);for(let R=s;R<c;++R)v+=String.fromCharCode(t[R]&127);return v}l(xe,"_e"),e(xe,"asciiSlice");function Pe(t,s,c){let v="";c=Math.min(t.length,c);for(let R=s;R<c;++R)v+=String.fromCharCode(t[R]);return v}l(Pe,"pe"),e(Pe,"latin1Slice");function se(t,s,c){let v=t.length;(!s||s<0)&&(s=0),(!c||c<0||c>v)&&(c=v);let R="";for(let C=s;C<c;++C)R+=Ce[t[C]];return R}l(se,"Q"),e(se,"hexSlice");function Te(t,s,c){let v=t.slice(s,c),R="";for(let C=0;C<v.length-1;C+=2)R+=String.fromCharCode(v[C]+v[C+1]*256);return R}l(Te,"he"),e(Te,"utf16leSlice"),r.prototype.slice=e(function(t,s){let c=this.length;t=~~t,s=s===void 0?c:~~s,t<0?(t+=c,t<0&&(t=0)):t>c&&(t=c),s<0?(s+=c,s<0&&(s=0)):s>c&&(s=c),s<t&&(s=t);let v=this.subarray(t,s);return Object.setPrototypeOf(v,r.prototype),v},"slice");function J(t,s,c){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+s>c)throw new RangeError("Trying to access beyond buffer length")}l(J,"U"),e(J,"checkOffset"),r.prototype.readUintLE=r.prototype.readUIntLE=e(function(t,s,c){t=t>>>0,s=s>>>0,c||J(t,s,this.length);let v=this[t],R=1,C=0;for(;++C<s&&(R*=256);)v+=this[t+C]*R;return v},"readUIntLE"),r.prototype.readUintBE=r.prototype.readUIntBE=e(function(t,s,c){t=t>>>0,s=s>>>0,c||J(t,s,this.length);let v=this[t+--s],R=1;for(;s>0&&(R*=256);)v+=this[t+--s]*R;return v},"readUIntBE"),r.prototype.readUint8=r.prototype.readUInt8=e(function(t,s){return t=t>>>0,s||J(t,1,this.length),this[t]},"readUInt8"),r.prototype.readUint16LE=r.prototype.readUInt16LE=e(function(t,s){return t=t>>>0,s||J(t,2,this.length),this[t]|this[t+1]<<8},"readUInt16LE"),r.prototype.readUint16BE=r.prototype.readUInt16BE=e(function(t,s){return t=t>>>0,s||J(t,2,this.length),this[t]<<8|this[t+1]},"readUInt16BE"),r.prototype.readUint32LE=r.prototype.readUInt32LE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},"readUInt32LE"),r.prototype.readUint32BE=r.prototype.readUInt32BE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},"readUInt32BE"),r.prototype.readBigUInt64LE=$e(e(function(t){t=t>>>0,N(t,"offset");let s=this[t],c=this[t+7];(s===void 0||c===void 0)&&I(t,this.length-8);let v=s+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,R=this[++t]+this[++t]*2**8+this[++t]*2**16+c*2**24;return BigInt(v)+(BigInt(R)<<BigInt(32))},"readBigUInt64LE")),r.prototype.readBigUInt64BE=$e(e(function(t){t=t>>>0,N(t,"offset");let s=this[t],c=this[t+7];(s===void 0||c===void 0)&&I(t,this.length-8);let v=s*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],R=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+c;return(BigInt(v)<<BigInt(32))+BigInt(R)},"readBigUInt64BE")),r.prototype.readIntLE=e(function(t,s,c){t=t>>>0,s=s>>>0,c||J(t,s,this.length);let v=this[t],R=1,C=0;for(;++C<s&&(R*=256);)v+=this[t+C]*R;return R*=128,v>=R&&(v-=Math.pow(2,8*s)),v},"readIntLE"),r.prototype.readIntBE=e(function(t,s,c){t=t>>>0,s=s>>>0,c||J(t,s,this.length);let v=s,R=1,C=this[t+--v];for(;v>0&&(R*=256);)C+=this[t+--v]*R;return R*=128,C>=R&&(C-=Math.pow(2,8*s)),C},"readIntBE"),r.prototype.readInt8=e(function(t,s){return t=t>>>0,s||J(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},"readInt8"),r.prototype.readInt16LE=e(function(t,s){t=t>>>0,s||J(t,2,this.length);let c=this[t]|this[t+1]<<8;return c&32768?c|4294901760:c},"readInt16LE"),r.prototype.readInt16BE=e(function(t,s){t=t>>>0,s||J(t,2,this.length);let c=this[t+1]|this[t]<<8;return c&32768?c|4294901760:c},"readInt16BE"),r.prototype.readInt32LE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},"readInt32LE"),r.prototype.readInt32BE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},"readInt32BE"),r.prototype.readBigInt64LE=$e(e(function(t){t=t>>>0,N(t,"offset");let s=this[t],c=this[t+7];(s===void 0||c===void 0)&&I(t,this.length-8);let v=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(c<<24);return(BigInt(v)<<BigInt(32))+BigInt(s+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)},"readBigInt64LE")),r.prototype.readBigInt64BE=$e(e(function(t){t=t>>>0,N(t,"offset");let s=this[t],c=this[t+7];(s===void 0||c===void 0)&&I(t,this.length-8);let v=(s<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(v)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+c)},"readBigInt64BE")),r.prototype.readFloatLE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),i.read(this,t,!0,23,4)},"readFloatLE"),r.prototype.readFloatBE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),i.read(this,t,!1,23,4)},"readFloatBE"),r.prototype.readDoubleLE=e(function(t,s){return t=t>>>0,s||J(t,8,this.length),i.read(this,t,!0,52,8)},"readDoubleLE"),r.prototype.readDoubleBE=e(function(t,s){return t=t>>>0,s||J(t,8,this.length),i.read(this,t,!1,52,8)},"readDoubleBE");function ue(t,s,c,v,R,C){if(!r.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(s>R||s<C)throw new RangeError('"value" argument is out of bounds');if(c+v>t.length)throw new RangeError("Index out of range")}l(ue,"J"),e(ue,"checkInt"),r.prototype.writeUintLE=r.prototype.writeUIntLE=e(function(t,s,c,v){if(t=+t,s=s>>>0,c=c>>>0,!v){let j=Math.pow(2,8*c)-1;ue(this,t,s,c,j,0)}let R=1,C=0;for(this[s]=t&255;++C<c&&(R*=256);)this[s+C]=t/R&255;return s+c},"writeUIntLE"),r.prototype.writeUintBE=r.prototype.writeUIntBE=e(function(t,s,c,v){if(t=+t,s=s>>>0,c=c>>>0,!v){let j=Math.pow(2,8*c)-1;ue(this,t,s,c,j,0)}let R=c-1,C=1;for(this[s+R]=t&255;--R>=0&&(C*=256);)this[s+R]=t/C&255;return s+c},"writeUIntBE"),r.prototype.writeUint8=r.prototype.writeUInt8=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,1,255,0),this[s]=t&255,s+1},"writeUInt8"),r.prototype.writeUint16LE=r.prototype.writeUInt16LE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,2,65535,0),this[s]=t&255,this[s+1]=t>>>8,s+2},"writeUInt16LE"),r.prototype.writeUint16BE=r.prototype.writeUInt16BE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,2,65535,0),this[s]=t>>>8,this[s+1]=t&255,s+2},"writeUInt16BE"),r.prototype.writeUint32LE=r.prototype.writeUInt32LE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,4,4294967295,0),this[s+3]=t>>>24,this[s+2]=t>>>16,this[s+1]=t>>>8,this[s]=t&255,s+4},"writeUInt32LE"),r.prototype.writeUint32BE=r.prototype.writeUInt32BE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,4,4294967295,0),this[s]=t>>>24,this[s+1]=t>>>16,this[s+2]=t>>>8,this[s+3]=t&255,s+4},"writeUInt32BE");function te(t,s,c,v,R){ve(s,v,R,t,c,7);let C=Number(s&BigInt(4294967295));t[c++]=C,C=C>>8,t[c++]=C,C=C>>8,t[c++]=C,C=C>>8,t[c++]=C;let j=Number(s>>BigInt(32)&BigInt(4294967295));return t[c++]=j,j=j>>8,t[c++]=j,j=j>>8,t[c++]=j,j=j>>8,t[c++]=j,c}l(te,"z"),e(te,"wrtBigUInt64LE");function X(t,s,c,v,R){ve(s,v,R,t,c,7);let C=Number(s&BigInt(4294967295));t[c+7]=C,C=C>>8,t[c+6]=C,C=C>>8,t[c+5]=C,C=C>>8,t[c+4]=C;let j=Number(s>>BigInt(32)&BigInt(4294967295));return t[c+3]=j,j=j>>8,t[c+2]=j,j=j>>8,t[c+1]=j,j=j>>8,t[c]=j,c+8}l(X,"V"),e(X,"wrtBigUInt64BE"),r.prototype.writeBigUInt64LE=$e(e(function(t,s=0){return te(this,t,s,BigInt(0),BigInt("0xffffffffffffffff"))},"writeBigUInt64LE")),r.prototype.writeBigUInt64BE=$e(e(function(t,s=0){return X(this,t,s,BigInt(0),BigInt("0xffffffffffffffff"))},"writeBigUInt64BE")),r.prototype.writeIntLE=e(function(t,s,c,v){if(t=+t,s=s>>>0,!v){let Z=Math.pow(2,8*c-1);ue(this,t,s,c,Z-1,-Z)}let R=0,C=1,j=0;for(this[s]=t&255;++R<c&&(C*=256);)t<0&&j===0&&this[s+R-1]!==0&&(j=1),this[s+R]=(t/C>>0)-j&255;return s+c},"writeIntLE"),r.prototype.writeIntBE=e(function(t,s,c,v){if(t=+t,s=s>>>0,!v){let Z=Math.pow(2,8*c-1);ue(this,t,s,c,Z-1,-Z)}let R=c-1,C=1,j=0;for(this[s+R]=t&255;--R>=0&&(C*=256);)t<0&&j===0&&this[s+R+1]!==0&&(j=1),this[s+R]=(t/C>>0)-j&255;return s+c},"writeIntBE"),r.prototype.writeInt8=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,1,127,-128),t<0&&(t=255+t+1),this[s]=t&255,s+1},"writeInt8"),r.prototype.writeInt16LE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,2,32767,-32768),this[s]=t&255,this[s+1]=t>>>8,s+2},"writeInt16LE"),r.prototype.writeInt16BE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,2,32767,-32768),this[s]=t>>>8,this[s+1]=t&255,s+2},"writeInt16BE"),r.prototype.writeInt32LE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,4,2147483647,-2147483648),this[s]=t&255,this[s+1]=t>>>8,this[s+2]=t>>>16,this[s+3]=t>>>24,s+4},"writeInt32LE"),r.prototype.writeInt32BE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[s]=t>>>24,this[s+1]=t>>>16,this[s+2]=t>>>8,this[s+3]=t&255,s+4},"writeInt32BE"),r.prototype.writeBigInt64LE=$e(e(function(t,s=0){return te(this,t,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))},"writeBigInt64LE")),r.prototype.writeBigInt64BE=$e(e(function(t,s=0){return X(this,t,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))},"writeBigInt64BE"));function ye(t,s,c,v,R,C){if(c+v>t.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("Index out of range")}l(ye,"G"),e(ye,"checkIEEE754");function Re(t,s,c,v,R){return s=+s,c=c>>>0,R||ye(t,s,c,4),i.write(t,s,c,v,23,4),c+4}l(Re,"fe"),e(Re,"writeFloat"),r.prototype.writeFloatLE=e(function(t,s,c){return Re(this,t,s,!0,c)},"writeFloatLE"),r.prototype.writeFloatBE=e(function(t,s,c){return Re(this,t,s,!1,c)},"writeFloatBE");function De(t,s,c,v,R){return s=+s,c=c>>>0,R||ye(t,s,c,8),i.write(t,s,c,v,52,8),c+8}l(De,"be"),e(De,"writeDouble"),r.prototype.writeDoubleLE=e(function(t,s,c){return De(this,t,s,!0,c)},"writeDoubleLE"),r.prototype.writeDoubleBE=e(function(t,s,c){return De(this,t,s,!1,c)},"writeDoubleBE"),r.prototype.copy=e(function(t,s,c,v){if(!r.isBuffer(t))throw new TypeError("argument should be a Buffer");if(c||(c=0),!v&&v!==0&&(v=this.length),s>=t.length&&(s=t.length),s||(s=0),v>0&&v<c&&(v=c),v===c||t.length===0||this.length===0)return 0;if(s<0)throw new RangeError("targetStart out of bounds");if(c<0||c>=this.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("sourceEnd out of bounds");v>this.length&&(v=this.length),t.length-s<v-c&&(v=t.length-s+c);let R=v-c;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(s,c,v):Uint8Array.prototype.set.call(t,this.subarray(c,v),s),R},"copy"),r.prototype.fill=e(function(t,s,c,v){if(typeof t=="string"){if(typeof s=="string"?(v=s,s=0,c=this.length):typeof c=="string"&&(v=c,c=this.length),v!==void 0&&typeof v!="string")throw new TypeError("encoding must be a string");if(typeof v=="string"&&!r.isEncoding(v))throw new TypeError("Unknown encoding: "+v);if(t.length===1){let C=t.charCodeAt(0);(v==="utf8"&&C<128||v==="latin1")&&(t=C)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(s<0||this.length<s||this.length<c)throw new RangeError("Out of range index");if(c<=s)return this;s=s>>>0,c=c===void 0?this.length:c>>>0,t||(t=0);let R;if(typeof t=="number")for(R=s;R<c;++R)this[R]=t;else{let C=r.isBuffer(t)?t:r.from(t,v),j=C.length;if(j===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(R=0;R<c-s;++R)this[R+s]=C[R%j]}return this},"fill");let Y={};function H(t,s,c){var R;var v;Y[t]=(v=(R=class extends c{constructor(){super(),Object.defineProperty(this,"message",{value:s.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(j){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:j,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}},l(R,"w"),R),e(v,"NodeError"),v)}l(H,"$"),e(H,"E"),H("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),H("ERR_INVALID_ARG_TYPE",function(t,s){return`The "${t}" argument must be of type number. Received type ${typeof s}`},TypeError),H("ERR_OUT_OF_RANGE",function(t,s,c){let v=`The value of "${t}" is out of range.`,R=c;return Number.isInteger(c)&&Math.abs(c)>2**32?R=Q(String(c)):typeof c=="bigint"&&(R=String(c),(c>BigInt(2)**BigInt(32)||c<-(BigInt(2)**BigInt(32)))&&(R=Q(R)),R+="n"),v+=` It must be ${s}. Received ${R}`,v},RangeError);function Q(t){let s="",c=t.length,v=t[0]==="-"?1:0;for(;c>=v+4;c-=3)s=`_${t.slice(c-3,c)}${s}`;return`${t.slice(0,c)}${s}`}l(Q,"H"),e(Q,"addNumericalSeparator");function fe(t,s,c){N(s,"offset"),(t[s]===void 0||t[s+c]===void 0)&&I(s,t.length-(c+1))}l(fe,"te"),e(fe,"checkBounds");function ve(t,s,c,v,R,C){if(t>c||t<s){let j=typeof s=="bigint"?"n":"",Z;throw s===0||s===BigInt(0)?Z=`>= 0${j} and < 2${j} ** ${(C+1)*8}${j}`:Z=`>= -(2${j} ** ${(C+1)*8-1}${j}) and < 2 ** ${(C+1)*8-1}${j}`,new Y.ERR_OUT_OF_RANGE("value",Z,t)}fe(v,R,C)}l(ve,"oe"),e(ve,"checkIntBI");function N(t,s){if(typeof t!="number")throw new Y.ERR_INVALID_ARG_TYPE(s,"number",t)}l(N,"I"),e(N,"validateNumber");function I(t,s,c){throw Math.floor(t)!==t?(N(t,c),new Y.ERR_OUT_OF_RANGE("offset","an integer",t)):s<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${s}`,t)}l(I,"x"),e(I,"boundsError");let D=/[^+/0-9A-Za-z-_]/g;function z(t){if(t=t.split("=")[0],t=t.trim().replace(D,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}l(z,"Y"),e(z,"base64clean");function Ee(t,s){s=s||1/0;let c,v=t.length,R=null,C=[];for(let j=0;j<v;++j){if(c=t.charCodeAt(j),c>55295&&c<57344){if(!R){if(c>56319){(s-=3)>-1&&C.push(239,191,189);continue}else if(j+1===v){(s-=3)>-1&&C.push(239,191,189);continue}R=c;continue}if(c<56320){(s-=3)>-1&&C.push(239,191,189),R=c;continue}c=(R-55296<<10|c-56320)+65536}else R&&(s-=3)>-1&&C.push(239,191,189);if(R=null,c<128){if((s-=1)<0)break;C.push(c)}else if(c<2048){if((s-=2)<0)break;C.push(c>>6|192,c&63|128)}else if(c<65536){if((s-=3)<0)break;C.push(c>>12|224,c>>6&63|128,c&63|128)}else if(c<1114112){if((s-=4)<0)break;C.push(c>>18|240,c>>12&63|128,c>>6&63|128,c&63|128)}else throw new Error("Invalid code point")}return C}l(Ee,"ue"),e(Ee,"utf8ToBytes");function Oe(t){let s=[];for(let c=0;c<t.length;++c)s.push(t.charCodeAt(c)&255);return s}l(Oe,"le"),e(Oe,"asciiToBytes");function be(t,s){let c,v,R,C=[];for(let j=0;j<t.length&&!((s-=2)<0);++j)c=t.charCodeAt(j),v=c>>8,R=c%256,C.push(R),C.push(v);return C}l(be,"ee"),e(be,"utf16leToBytes");function ge(t){return a.toByteArray(z(t))}l(ge,"ie"),e(ge,"base64ToBytes");function Ne(t,s,c,v){let R;for(R=0;R<v&&!(R+c>=s.length||R>=t.length);++R)s[R+c]=t[R];return R}l(Ne,"me"),e(Ne,"blitBuffer");function Ie(t,s){return t instanceof s||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===s.name}l(Ie,"ye"),e(Ie,"isInstance");function ke(t){return t!==t}l(ke,"ve"),e(ke,"numberIsNaN");let Ce=function(){let t="0123456789abcdef",s=new Array(256);for(let c=0;c<16;++c){let v=c*16;for(let R=0;R<16;++R)s[v+R]=t[c]+t[R]}return s}();function $e(t){return typeof BigInt>"u"?Ke:t}l($e,"Be"),e($e,"defineBigIntMethod");function Ke(){throw new Error("BigInt not supported")}return l(Ke,"Je"),e(Ke,"BufferBigIntNotDefined"),ji}l(qA,"t8");var gs,Um,_u,Mm,ji,$m,Si,zs,aI,sI,dE=Qt(()=>{gs={},Um=!1,e(iI,"dew$2"),_u={},Mm=!1,e(oI,"dew$1"),ji={},$m=!1,e(qA,"dew"),Si=qA(),Si.Buffer,Si.SlowBuffer,Si.INSPECT_MAX_BYTES,Si.kMaxLength,zs=Si.Buffer,aI=Si.INSPECT_MAX_BYTES,sI=Si.kMaxLength}),Dn=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.constants=a.SEP=void 0,a.SEP="/",a.constants={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:64,O_EXCL:128,O_NOCTTY:256,O_TRUNC:512,O_APPEND:1024,O_DIRECTORY:65536,O_NOATIME:262144,O_NOFOLLOW:131072,O_SYNC:1052672,O_SYMLINK:2097152,O_DIRECT:16384,O_NONBLOCK:2048,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_FS_SYMLINK_DIR:1,UV_FS_SYMLINK_JUNCTION:2,UV_FS_COPYFILE_EXCL:1,UV_FS_COPYFILE_FICLONE:2,UV_FS_COPYFILE_FICLONE_FORCE:4,COPYFILE_EXCL:1,COPYFILE_FICLONE:2,COPYFILE_FICLONE_FORCE:4}}),lI=Ge(a=>{"use strict";var y;Object.defineProperty(a,"__esModule",{value:!0}),a.Stats=void 0;var i=Dn(),{S_IFMT:f,S_IFDIR:g,S_IFREG:o,S_IFBLK:n,S_IFCHR:r,S_IFLNK:u,S_IFIFO:p,S_IFSOCK:h}=i.constants,d=(y=class{static build(_,S=!1){let T=new y,{uid:O,gid:E,atime:P,mtime:A,ctime:x}=_,U=S?ee=>BigInt(ee):ee=>ee;T.uid=U(O),T.gid=U(E),T.rdev=U(_.rdev),T.blksize=U(4096),T.ino=U(_.ino),T.size=U(_.getSize()),T.blocks=U(1),T.atime=P,T.mtime=A,T.ctime=x,T.birthtime=x,T.atimeMs=U(P.getTime()),T.mtimeMs=U(A.getTime());let M=U(x.getTime());if(T.ctimeMs=M,T.birthtimeMs=M,S){T.atimeNs=BigInt(P.getTime())*BigInt(1e6),T.mtimeNs=BigInt(A.getTime())*BigInt(1e6);let ee=BigInt(x.getTime())*BigInt(1e6);T.ctimeNs=ee,T.birthtimeNs=ee}return T.dev=U(0),T.mode=U(_.mode),T.nlink=U(_.nlink),T}_checkModeProperty(_){return(Number(this.mode)&f)===_}isDirectory(){return this._checkModeProperty(g)}isFile(){return this._checkModeProperty(o)}isBlockDevice(){return this._checkModeProperty(n)}isCharacterDevice(){return this._checkModeProperty(r)}isSymbolicLink(){return this._checkModeProperty(u)}isFIFO(){return this._checkModeProperty(p)}isSocket(){return this._checkModeProperty(h)}},l(y,"Fu"),y);e(d,"Stats");var m=d;a.Stats=m,a.default=m});function fI(){if(Wm)return ys;Wm=!0,ys.byteLength=u,ys.toByteArray=h,ys.fromByteArray=y;for(var a=[],i=[],f=typeof Uint8Array<"u"?Uint8Array:Array,g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,n=g.length;o<n;++o)a[o]=g[o],i[g.charCodeAt(o)]=o;i[45]=62,i[95]=63;function r(w){var _=w.length;if(_%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var S=w.indexOf("=");S===-1&&(S=_);var T=S===_?0:4-S%4;return[S,T]}l(r,"i"),e(r,"getLens");function u(w){var _=r(w),S=_[0],T=_[1];return(S+T)*3/4-T}l(u,"f"),e(u,"byteLength");function p(w,_,S){return(_+S)*3/4-S}l(p,"h"),e(p,"_byteLength");function h(w){var _,S=r(w),T=S[0],O=S[1],E=new f(p(w,T,O)),P=0,A=O>0?T-4:T,x;for(x=0;x<A;x+=4)_=i[w.charCodeAt(x)]<<18|i[w.charCodeAt(x+1)]<<12|i[w.charCodeAt(x+2)]<<6|i[w.charCodeAt(x+3)],E[P++]=_>>16&255,E[P++]=_>>8&255,E[P++]=_&255;return O===2&&(_=i[w.charCodeAt(x)]<<2|i[w.charCodeAt(x+1)]>>4,E[P++]=_&255),O===1&&(_=i[w.charCodeAt(x)]<<10|i[w.charCodeAt(x+1)]<<4|i[w.charCodeAt(x+2)]>>2,E[P++]=_>>8&255,E[P++]=_&255),E}l(h,"c"),e(h,"toByteArray");function d(w){return a[w>>18&63]+a[w>>12&63]+a[w>>6&63]+a[w&63]}l(d,"d"),e(d,"tripletToBase64");function m(w,_,S){for(var T,O=[],E=_;E<S;E+=3)T=(w[E]<<16&16711680)+(w[E+1]<<8&65280)+(w[E+2]&255),O.push(d(T));return O.join("")}l(m,"y"),e(m,"encodeChunk");function y(w){for(var _,S=w.length,T=S%3,O=[],E=16383,P=0,A=S-T;P<A;P+=E)O.push(m(w,P,P+E>A?A:P+E));return T===1?(_=w[S-1],O.push(a[_>>2]+a[_<<4&63]+"==")):T===2&&(_=(w[S-2]<<8)+w[S-1],O.push(a[_>>10]+a[_>>4&63]+a[_<<2&63]+"=")),O.join("")}return l(y,"m"),e(y,"fromByteArray"),ys}l(fI,"x6");function uI(){return zm||(zm=!0,Eu.read=function(a,i,f,g,o){var n,r,u=o*8-g-1,p=(1<<u)-1,h=p>>1,d=-7,m=f?o-1:0,y=f?-1:1,w=a[i+m];for(m+=y,n=w&(1<<-d)-1,w>>=-d,d+=u;d>0;n=n*256+a[i+m],m+=y,d-=8);for(r=n&(1<<-d)-1,n>>=-d,d+=g;d>0;r=r*256+a[i+m],m+=y,d-=8);if(n===0)n=1-h;else{if(n===p)return r?NaN:(w?-1:1)*(1/0);r=r+Math.pow(2,g),n=n-h}return(w?-1:1)*r*Math.pow(2,n-g)},Eu.write=function(a,i,f,g,o,n){var r,u,p,h=n*8-o-1,d=(1<<h)-1,m=d>>1,y=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=g?0:n-1,_=g?1:-1,S=i<0||i===0&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(u=isNaN(i)?1:0,r=d):(r=Math.floor(Math.log(i)/Math.LN2),i*(p=Math.pow(2,-r))<1&&(r--,p*=2),r+m>=1?i+=y/p:i+=y*Math.pow(2,1-m),i*p>=2&&(r++,p/=2),r+m>=d?(u=0,r=d):r+m>=1?(u=(i*p-1)*Math.pow(2,o),r=r+m):(u=i*Math.pow(2,m-1)*Math.pow(2,o),r=0));o>=8;a[f+w]=u&255,w+=_,u/=256,o-=8);for(r=r<<o|u,h+=o;h>0;a[f+w]=r&255,w+=_,r/=256,h-=8);a[f+w-_]|=S*128}),Eu}l(uI,"O6");function GA(){if(Hm)return Ci;Hm=!0;let a=fI(),i=uI(),f=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ci.Buffer=r,Ci.SlowBuffer=O,Ci.INSPECT_MAX_BYTES=50;let g=2147483647;Ci.kMaxLength=g,r.TYPED_ARRAY_SUPPORT=o(),!r.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 o(){try{let t=new Uint8Array(1),s={foo:e(function(){return 42},"foo")};return Object.setPrototypeOf(s,Uint8Array.prototype),Object.setPrototypeOf(t,s),t.foo()===42}catch{return!1}}l(o,"a"),e(o,"typedArraySupport"),Object.defineProperty(r.prototype,"parent",{enumerable:!0,get:e(function(){if(r.isBuffer(this))return this.buffer},"get")}),Object.defineProperty(r.prototype,"offset",{enumerable:!0,get:e(function(){if(r.isBuffer(this))return this.byteOffset},"get")});function n(t){if(t>g)throw new RangeError('The value "'+t+'" is invalid for option "size"');let s=new Uint8Array(t);return Object.setPrototypeOf(s,r.prototype),s}l(n,"s"),e(n,"createBuffer");function r(t,s,c){if(typeof t=="number"){if(typeof s=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(t)}return u(t,s,c)}l(r,"i"),e(r,"Buffer2"),r.poolSize=8192;function u(t,s,c){if(typeof t=="string")return m(t,s);if(ArrayBuffer.isView(t))return w(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(Ie(t,ArrayBuffer)||t&&Ie(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(t,SharedArrayBuffer)||t&&Ie(t.buffer,SharedArrayBuffer)))return _(t,s,c);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let v=t.valueOf&&t.valueOf();if(v!=null&&v!==t)return r.from(v,s,c);let R=S(t);if(R)return R;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return r.from(t[Symbol.toPrimitive]("string"),s,c);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}l(u,"f"),e(u,"from"),r.from=function(t,s,c){return u(t,s,c)},Object.setPrototypeOf(r.prototype,Uint8Array.prototype),Object.setPrototypeOf(r,Uint8Array);function p(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"')}l(p,"h"),e(p,"assertSize");function h(t,s,c){return p(t),t<=0?n(t):s!==void 0?typeof c=="string"?n(t).fill(s,c):n(t).fill(s):n(t)}l(h,"c"),e(h,"alloc"),r.alloc=function(t,s,c){return h(t,s,c)};function d(t){return p(t),n(t<0?0:T(t)|0)}l(d,"d"),e(d,"allocUnsafe"),r.allocUnsafe=function(t){return d(t)},r.allocUnsafeSlow=function(t){return d(t)};function m(t,s){if((typeof s!="string"||s==="")&&(s="utf8"),!r.isEncoding(s))throw new TypeError("Unknown encoding: "+s);let c=E(t,s)|0,v=n(c),R=v.write(t,s);return R!==c&&(v=v.slice(0,R)),v}l(m,"y"),e(m,"fromString");function y(t){let s=t.length<0?0:T(t.length)|0,c=n(s);for(let v=0;v<s;v+=1)c[v]=t[v]&255;return c}l(y,"m"),e(y,"fromArrayLike");function w(t){if(Ie(t,Uint8Array)){let s=new Uint8Array(t);return _(s.buffer,s.byteOffset,s.byteLength)}return y(t)}l(w,"g"),e(w,"fromArrayView");function _(t,s,c){if(s<0||t.byteLength<s)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<s+(c||0))throw new RangeError('"length" is outside of buffer bounds');let v;return s===void 0&&c===void 0?v=new Uint8Array(t):c===void 0?v=new Uint8Array(t,s):v=new Uint8Array(t,s,c),Object.setPrototypeOf(v,r.prototype),v}l(_,"v"),e(_,"fromArrayBuffer");function S(t){if(r.isBuffer(t)){let s=T(t.length)|0,c=n(s);return c.length===0||t.copy(c,0,0,s),c}if(t.length!==void 0)return typeof t.length!="number"||ke(t.length)?n(0):y(t);if(t.type==="Buffer"&&Array.isArray(t.data))return y(t.data)}l(S,"_"),e(S,"fromObject");function T(t){if(t>=g)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+g.toString(16)+" bytes");return t|0}l(T,"b"),e(T,"checked");function O(t){return+t!=t&&(t=0),r.alloc(+t)}l(O,"E"),e(O,"SlowBuffer"),r.isBuffer=e(function(t){return t!=null&&t._isBuffer===!0&&t!==r.prototype},"isBuffer"),r.compare=e(function(t,s){if(Ie(t,Uint8Array)&&(t=r.from(t,t.offset,t.byteLength)),Ie(s,Uint8Array)&&(s=r.from(s,s.offset,s.byteLength)),!r.isBuffer(t)||!r.isBuffer(s))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===s)return 0;let c=t.length,v=s.length;for(let R=0,C=Math.min(c,v);R<C;++R)if(t[R]!==s[R]){c=t[R],v=s[R];break}return c<v?-1:v<c?1:0},"compare"),r.isEncoding=e(function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},"isEncoding"),r.concat=e(function(t,s){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return r.alloc(0);let c;if(s===void 0)for(s=0,c=0;c<t.length;++c)s+=t[c].length;let v=r.allocUnsafe(s),R=0;for(c=0;c<t.length;++c){let C=t[c];if(Ie(C,Uint8Array))R+C.length>v.length?(r.isBuffer(C)||(C=r.from(C)),C.copy(v,R)):Uint8Array.prototype.set.call(v,C,R);else if(r.isBuffer(C))C.copy(v,R);else throw new TypeError('"list" argument must be an Array of Buffers');R+=C.length}return v},"concat");function E(t,s){if(r.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Ie(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 c=t.length,v=arguments.length>2&&arguments[2]===!0;if(!v&&c===0)return 0;let R=!1;for(;;)switch(s){case"ascii":case"latin1":case"binary":return c;case"utf8":case"utf-8":return Ee(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c*2;case"hex":return c>>>1;case"base64":return ge(t).length;default:if(R)return v?-1:Ee(t).length;s=(""+s).toLowerCase(),R=!0}}l(E,"R"),e(E,"byteLength"),r.byteLength=E;function P(t,s,c){let v=!1;if((s===void 0||s<0)&&(s=0),s>this.length||((c===void 0||c>this.length)&&(c=this.length),c<=0)||(c>>>=0,s>>>=0,c<=s))return"";for(t||(t="utf8");;)switch(t){case"hex":return se(this,s,c);case"utf8":case"utf-8":return ae(this,s,c);case"ascii":return xe(this,s,c);case"latin1":case"binary":return Pe(this,s,c);case"base64":return re(this,s,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Te(this,s,c);default:if(v)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),v=!0}}l(P,"T"),e(P,"slowToString"),r.prototype._isBuffer=!0;function A(t,s,c){let v=t[s];t[s]=t[c],t[c]=v}l(A,"F"),e(A,"swap"),r.prototype.swap16=e(function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let s=0;s<t;s+=2)A(this,s,s+1);return this},"swap16"),r.prototype.swap32=e(function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let s=0;s<t;s+=4)A(this,s,s+3),A(this,s+1,s+2);return this},"swap32"),r.prototype.swap64=e(function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let s=0;s<t;s+=8)A(this,s,s+7),A(this,s+1,s+6),A(this,s+2,s+5),A(this,s+3,s+4);return this},"swap64"),r.prototype.toString=e(function(){let t=this.length;return t===0?"":arguments.length===0?ae(this,0,t):P.apply(this,arguments)},"toString"),r.prototype.toLocaleString=r.prototype.toString,r.prototype.equals=e(function(t){if(!r.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:r.compare(this,t)===0},"equals"),r.prototype.inspect=e(function(){let t="",s=Ci.INSPECT_MAX_BYTES;return t=this.toString("hex",0,s).replace(/(.{2})/g,"$1 ").trim(),this.length>s&&(t+=" ... "),"<Buffer "+t+">"},"inspect"),f&&(r.prototype[f]=r.prototype.inspect),r.prototype.compare=e(function(t,s,c,v,R){if(Ie(t,Uint8Array)&&(t=r.from(t,t.offset,t.byteLength)),!r.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(s===void 0&&(s=0),c===void 0&&(c=t?t.length:0),v===void 0&&(v=0),R===void 0&&(R=this.length),s<0||c>t.length||v<0||R>this.length)throw new RangeError("out of range index");if(v>=R&&s>=c)return 0;if(v>=R)return-1;if(s>=c)return 1;if(s>>>=0,c>>>=0,v>>>=0,R>>>=0,this===t)return 0;let C=R-v,j=c-s,Z=Math.min(C,j),oe=this.slice(v,R),Ae=t.slice(s,c);for(let le=0;le<Z;++le)if(oe[le]!==Ae[le]){C=oe[le],j=Ae[le];break}return C<j?-1:j<C?1:0},"compare");function x(t,s,c,v,R){if(t.length===0)return-1;if(typeof c=="string"?(v=c,c=0):c>2147483647?c=2147483647:c<-2147483648&&(c=-2147483648),c=+c,ke(c)&&(c=R?0:t.length-1),c<0&&(c=t.length+c),c>=t.length){if(R)return-1;c=t.length-1}else if(c<0)if(R)c=0;else return-1;if(typeof s=="string"&&(s=r.from(s,v)),r.isBuffer(s))return s.length===0?-1:U(t,s,c,v,R);if(typeof s=="number")return s=s&255,typeof Uint8Array.prototype.indexOf=="function"?R?Uint8Array.prototype.indexOf.call(t,s,c):Uint8Array.prototype.lastIndexOf.call(t,s,c):U(t,[s],c,v,R);throw new TypeError("val must be string, number or Buffer")}l(x,"S"),e(x,"bidirectionalIndexOf");function U(t,s,c,v,R){let C=1,j=t.length,Z=s.length;if(v!==void 0&&(v=String(v).toLowerCase(),v==="ucs2"||v==="ucs-2"||v==="utf16le"||v==="utf-16le")){if(t.length<2||s.length<2)return-1;C=2,j/=2,Z/=2,c/=2}function oe(le,Fe){return C===1?le[Fe]:le.readUInt16BE(Fe*C)}l(oe,"re"),e(oe,"read");let Ae;if(R){let le=-1;for(Ae=c;Ae<j;Ae++)if(oe(t,Ae)===oe(s,le===-1?0:Ae-le)){if(le===-1&&(le=Ae),Ae-le+1===Z)return le*C}else le!==-1&&(Ae-=Ae-le),le=-1}else for(c+Z>j&&(c=j-Z),Ae=c;Ae>=0;Ae--){let le=!0;for(let Fe=0;Fe<Z;Fe++)if(oe(t,Ae+Fe)!==oe(s,Fe)){le=!1;break}if(le)return Ae}return-1}l(U,"B"),e(U,"arrayIndexOf"),r.prototype.includes=e(function(t,s,c){return this.indexOf(t,s,c)!==-1},"includes"),r.prototype.indexOf=e(function(t,s,c){return x(this,t,s,c,!0)},"indexOf"),r.prototype.lastIndexOf=e(function(t,s,c){return x(this,t,s,c,!1)},"lastIndexOf");function M(t,s,c,v){c=Number(c)||0;let R=t.length-c;v?(v=Number(v),v>R&&(v=R)):v=R;let C=s.length;v>C/2&&(v=C/2);let j;for(j=0;j<v;++j){let Z=parseInt(s.substr(j*2,2),16);if(ke(Z))return j;t[c+j]=Z}return j}l(M,"P"),e(M,"hexWrite");function ee(t,s,c,v){return Ne(Ee(s,t.length-c),t,c,v)}l(ee,"N"),e(ee,"utf8Write");function V(t,s,c,v){return Ne(Oe(s),t,c,v)}l(V,"L"),e(V,"asciiWrite");function q(t,s,c,v){return Ne(ge(s),t,c,v)}l(q,"C"),e(q,"base64Write");function G(t,s,c,v){return Ne(be(s,t.length-c),t,c,v)}l(G,"j"),e(G,"ucs2Write"),r.prototype.write=e(function(t,s,c,v){if(s===void 0)v="utf8",c=this.length,s=0;else if(c===void 0&&typeof s=="string")v=s,c=this.length,s=0;else if(isFinite(s))s=s>>>0,isFinite(c)?(c=c>>>0,v===void 0&&(v="utf8")):(v=c,c=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let R=this.length-s;if((c===void 0||c>R)&&(c=R),t.length>0&&(c<0||s<0)||s>this.length)throw new RangeError("Attempt to write outside buffer bounds");v||(v="utf8");let C=!1;for(;;)switch(v){case"hex":return M(this,t,s,c);case"utf8":case"utf-8":return ee(this,t,s,c);case"ascii":case"latin1":case"binary":return V(this,t,s,c);case"base64":return q(this,t,s,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,t,s,c);default:if(C)throw new TypeError("Unknown encoding: "+v);v=(""+v).toLowerCase(),C=!0}},"write"),r.prototype.toJSON=e(function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},"toJSON");function re(t,s,c){return s===0&&c===t.length?a.fromByteArray(t):a.fromByteArray(t.slice(s,c))}l(re,"q"),e(re,"base64Slice");function ae(t,s,c){c=Math.min(t.length,c);let v=[],R=s;for(;R<c;){let C=t[R],j=null,Z=C>239?4:C>223?3:C>191?2:1;if(R+Z<=c){let oe,Ae,le,Fe;switch(Z){case 1:C<128&&(j=C);break;case 2:oe=t[R+1],(oe&192)===128&&(Fe=(C&31)<<6|oe&63,Fe>127&&(j=Fe));break;case 3:oe=t[R+1],Ae=t[R+2],(oe&192)===128&&(Ae&192)===128&&(Fe=(C&15)<<12|(oe&63)<<6|Ae&63,Fe>2047&&(Fe<55296||Fe>57343)&&(j=Fe));break;case 4:oe=t[R+1],Ae=t[R+2],le=t[R+3],(oe&192)===128&&(Ae&192)===128&&(le&192)===128&&(Fe=(C&15)<<18|(oe&63)<<12|(Ae&63)<<6|le&63,Fe>65535&&Fe<1114112&&(j=Fe))}}j===null?(j=65533,Z=1):j>65535&&(j-=65536,v.push(j>>>10&1023|55296),j=56320|j&1023),v.push(j),R+=Z}return we(v)}l(ae,"Z"),e(ae,"utf8Slice");let de=4096;function we(t){let s=t.length;if(s<=de)return String.fromCharCode.apply(String,t);let c="",v=0;for(;v<s;)c+=String.fromCharCode.apply(String,t.slice(v,v+=de));return c}l(we,"se"),e(we,"decodeCodePointsArray");function xe(t,s,c){let v="";c=Math.min(t.length,c);for(let R=s;R<c;++R)v+=String.fromCharCode(t[R]&127);return v}l(xe,"_e"),e(xe,"asciiSlice");function Pe(t,s,c){let v="";c=Math.min(t.length,c);for(let R=s;R<c;++R)v+=String.fromCharCode(t[R]);return v}l(Pe,"pe"),e(Pe,"latin1Slice");function se(t,s,c){let v=t.length;(!s||s<0)&&(s=0),(!c||c<0||c>v)&&(c=v);let R="";for(let C=s;C<c;++C)R+=Ce[t[C]];return R}l(se,"Q"),e(se,"hexSlice");function Te(t,s,c){let v=t.slice(s,c),R="";for(let C=0;C<v.length-1;C+=2)R+=String.fromCharCode(v[C]+v[C+1]*256);return R}l(Te,"he"),e(Te,"utf16leSlice"),r.prototype.slice=e(function(t,s){let c=this.length;t=~~t,s=s===void 0?c:~~s,t<0?(t+=c,t<0&&(t=0)):t>c&&(t=c),s<0?(s+=c,s<0&&(s=0)):s>c&&(s=c),s<t&&(s=t);let v=this.subarray(t,s);return Object.setPrototypeOf(v,r.prototype),v},"slice");function J(t,s,c){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+s>c)throw new RangeError("Trying to access beyond buffer length")}l(J,"U"),e(J,"checkOffset"),r.prototype.readUintLE=r.prototype.readUIntLE=e(function(t,s,c){t=t>>>0,s=s>>>0,c||J(t,s,this.length);let v=this[t],R=1,C=0;for(;++C<s&&(R*=256);)v+=this[t+C]*R;return v},"readUIntLE"),r.prototype.readUintBE=r.prototype.readUIntBE=e(function(t,s,c){t=t>>>0,s=s>>>0,c||J(t,s,this.length);let v=this[t+--s],R=1;for(;s>0&&(R*=256);)v+=this[t+--s]*R;return v},"readUIntBE"),r.prototype.readUint8=r.prototype.readUInt8=e(function(t,s){return t=t>>>0,s||J(t,1,this.length),this[t]},"readUInt8"),r.prototype.readUint16LE=r.prototype.readUInt16LE=e(function(t,s){return t=t>>>0,s||J(t,2,this.length),this[t]|this[t+1]<<8},"readUInt16LE"),r.prototype.readUint16BE=r.prototype.readUInt16BE=e(function(t,s){return t=t>>>0,s||J(t,2,this.length),this[t]<<8|this[t+1]},"readUInt16BE"),r.prototype.readUint32LE=r.prototype.readUInt32LE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},"readUInt32LE"),r.prototype.readUint32BE=r.prototype.readUInt32BE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},"readUInt32BE"),r.prototype.readBigUInt64LE=$e(e(function(t){t=t>>>0,N(t,"offset");let s=this[t],c=this[t+7];(s===void 0||c===void 0)&&I(t,this.length-8);let v=s+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,R=this[++t]+this[++t]*2**8+this[++t]*2**16+c*2**24;return BigInt(v)+(BigInt(R)<<BigInt(32))},"readBigUInt64LE")),r.prototype.readBigUInt64BE=$e(e(function(t){t=t>>>0,N(t,"offset");let s=this[t],c=this[t+7];(s===void 0||c===void 0)&&I(t,this.length-8);let v=s*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],R=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+c;return(BigInt(v)<<BigInt(32))+BigInt(R)},"readBigUInt64BE")),r.prototype.readIntLE=e(function(t,s,c){t=t>>>0,s=s>>>0,c||J(t,s,this.length);let v=this[t],R=1,C=0;for(;++C<s&&(R*=256);)v+=this[t+C]*R;return R*=128,v>=R&&(v-=Math.pow(2,8*s)),v},"readIntLE"),r.prototype.readIntBE=e(function(t,s,c){t=t>>>0,s=s>>>0,c||J(t,s,this.length);let v=s,R=1,C=this[t+--v];for(;v>0&&(R*=256);)C+=this[t+--v]*R;return R*=128,C>=R&&(C-=Math.pow(2,8*s)),C},"readIntBE"),r.prototype.readInt8=e(function(t,s){return t=t>>>0,s||J(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},"readInt8"),r.prototype.readInt16LE=e(function(t,s){t=t>>>0,s||J(t,2,this.length);let c=this[t]|this[t+1]<<8;return c&32768?c|4294901760:c},"readInt16LE"),r.prototype.readInt16BE=e(function(t,s){t=t>>>0,s||J(t,2,this.length);let c=this[t+1]|this[t]<<8;return c&32768?c|4294901760:c},"readInt16BE"),r.prototype.readInt32LE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},"readInt32LE"),r.prototype.readInt32BE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},"readInt32BE"),r.prototype.readBigInt64LE=$e(e(function(t){t=t>>>0,N(t,"offset");let s=this[t],c=this[t+7];(s===void 0||c===void 0)&&I(t,this.length-8);let v=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(c<<24);return(BigInt(v)<<BigInt(32))+BigInt(s+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)},"readBigInt64LE")),r.prototype.readBigInt64BE=$e(e(function(t){t=t>>>0,N(t,"offset");let s=this[t],c=this[t+7];(s===void 0||c===void 0)&&I(t,this.length-8);let v=(s<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(v)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+c)},"readBigInt64BE")),r.prototype.readFloatLE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),i.read(this,t,!0,23,4)},"readFloatLE"),r.prototype.readFloatBE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),i.read(this,t,!1,23,4)},"readFloatBE"),r.prototype.readDoubleLE=e(function(t,s){return t=t>>>0,s||J(t,8,this.length),i.read(this,t,!0,52,8)},"readDoubleLE"),r.prototype.readDoubleBE=e(function(t,s){return t=t>>>0,s||J(t,8,this.length),i.read(this,t,!1,52,8)},"readDoubleBE");function ue(t,s,c,v,R,C){if(!r.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(s>R||s<C)throw new RangeError('"value" argument is out of bounds');if(c+v>t.length)throw new RangeError("Index out of range")}l(ue,"J"),e(ue,"checkInt"),r.prototype.writeUintLE=r.prototype.writeUIntLE=e(function(t,s,c,v){if(t=+t,s=s>>>0,c=c>>>0,!v){let j=Math.pow(2,8*c)-1;ue(this,t,s,c,j,0)}let R=1,C=0;for(this[s]=t&255;++C<c&&(R*=256);)this[s+C]=t/R&255;return s+c},"writeUIntLE"),r.prototype.writeUintBE=r.prototype.writeUIntBE=e(function(t,s,c,v){if(t=+t,s=s>>>0,c=c>>>0,!v){let j=Math.pow(2,8*c)-1;ue(this,t,s,c,j,0)}let R=c-1,C=1;for(this[s+R]=t&255;--R>=0&&(C*=256);)this[s+R]=t/C&255;return s+c},"writeUIntBE"),r.prototype.writeUint8=r.prototype.writeUInt8=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,1,255,0),this[s]=t&255,s+1},"writeUInt8"),r.prototype.writeUint16LE=r.prototype.writeUInt16LE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,2,65535,0),this[s]=t&255,this[s+1]=t>>>8,s+2},"writeUInt16LE"),r.prototype.writeUint16BE=r.prototype.writeUInt16BE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,2,65535,0),this[s]=t>>>8,this[s+1]=t&255,s+2},"writeUInt16BE"),r.prototype.writeUint32LE=r.prototype.writeUInt32LE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,4,4294967295,0),this[s+3]=t>>>24,this[s+2]=t>>>16,this[s+1]=t>>>8,this[s]=t&255,s+4},"writeUInt32LE"),r.prototype.writeUint32BE=r.prototype.writeUInt32BE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,4,4294967295,0),this[s]=t>>>24,this[s+1]=t>>>16,this[s+2]=t>>>8,this[s+3]=t&255,s+4},"writeUInt32BE");function te(t,s,c,v,R){ve(s,v,R,t,c,7);let C=Number(s&BigInt(4294967295));t[c++]=C,C=C>>8,t[c++]=C,C=C>>8,t[c++]=C,C=C>>8,t[c++]=C;let j=Number(s>>BigInt(32)&BigInt(4294967295));return t[c++]=j,j=j>>8,t[c++]=j,j=j>>8,t[c++]=j,j=j>>8,t[c++]=j,c}l(te,"z"),e(te,"wrtBigUInt64LE");function X(t,s,c,v,R){ve(s,v,R,t,c,7);let C=Number(s&BigInt(4294967295));t[c+7]=C,C=C>>8,t[c+6]=C,C=C>>8,t[c+5]=C,C=C>>8,t[c+4]=C;let j=Number(s>>BigInt(32)&BigInt(4294967295));return t[c+3]=j,j=j>>8,t[c+2]=j,j=j>>8,t[c+1]=j,j=j>>8,t[c]=j,c+8}l(X,"V"),e(X,"wrtBigUInt64BE"),r.prototype.writeBigUInt64LE=$e(e(function(t,s=0){return te(this,t,s,BigInt(0),BigInt("0xffffffffffffffff"))},"writeBigUInt64LE")),r.prototype.writeBigUInt64BE=$e(e(function(t,s=0){return X(this,t,s,BigInt(0),BigInt("0xffffffffffffffff"))},"writeBigUInt64BE")),r.prototype.writeIntLE=e(function(t,s,c,v){if(t=+t,s=s>>>0,!v){let Z=Math.pow(2,8*c-1);ue(this,t,s,c,Z-1,-Z)}let R=0,C=1,j=0;for(this[s]=t&255;++R<c&&(C*=256);)t<0&&j===0&&this[s+R-1]!==0&&(j=1),this[s+R]=(t/C>>0)-j&255;return s+c},"writeIntLE"),r.prototype.writeIntBE=e(function(t,s,c,v){if(t=+t,s=s>>>0,!v){let Z=Math.pow(2,8*c-1);ue(this,t,s,c,Z-1,-Z)}let R=c-1,C=1,j=0;for(this[s+R]=t&255;--R>=0&&(C*=256);)t<0&&j===0&&this[s+R+1]!==0&&(j=1),this[s+R]=(t/C>>0)-j&255;return s+c},"writeIntBE"),r.prototype.writeInt8=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,1,127,-128),t<0&&(t=255+t+1),this[s]=t&255,s+1},"writeInt8"),r.prototype.writeInt16LE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,2,32767,-32768),this[s]=t&255,this[s+1]=t>>>8,s+2},"writeInt16LE"),r.prototype.writeInt16BE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,2,32767,-32768),this[s]=t>>>8,this[s+1]=t&255,s+2},"writeInt16BE"),r.prototype.writeInt32LE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,4,2147483647,-2147483648),this[s]=t&255,this[s+1]=t>>>8,this[s+2]=t>>>16,this[s+3]=t>>>24,s+4},"writeInt32LE"),r.prototype.writeInt32BE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[s]=t>>>24,this[s+1]=t>>>16,this[s+2]=t>>>8,this[s+3]=t&255,s+4},"writeInt32BE"),r.prototype.writeBigInt64LE=$e(e(function(t,s=0){return te(this,t,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))},"writeBigInt64LE")),r.prototype.writeBigInt64BE=$e(e(function(t,s=0){return X(this,t,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))},"writeBigInt64BE"));function ye(t,s,c,v,R,C){if(c+v>t.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("Index out of range")}l(ye,"G"),e(ye,"checkIEEE754");function Re(t,s,c,v,R){return s=+s,c=c>>>0,R||ye(t,s,c,4),i.write(t,s,c,v,23,4),c+4}l(Re,"fe"),e(Re,"writeFloat"),r.prototype.writeFloatLE=e(function(t,s,c){return Re(this,t,s,!0,c)},"writeFloatLE"),r.prototype.writeFloatBE=e(function(t,s,c){return Re(this,t,s,!1,c)},"writeFloatBE");function De(t,s,c,v,R){return s=+s,c=c>>>0,R||ye(t,s,c,8),i.write(t,s,c,v,52,8),c+8}l(De,"be"),e(De,"writeDouble"),r.prototype.writeDoubleLE=e(function(t,s,c){return De(this,t,s,!0,c)},"writeDoubleLE"),r.prototype.writeDoubleBE=e(function(t,s,c){return De(this,t,s,!1,c)},"writeDoubleBE"),r.prototype.copy=e(function(t,s,c,v){if(!r.isBuffer(t))throw new TypeError("argument should be a Buffer");if(c||(c=0),!v&&v!==0&&(v=this.length),s>=t.length&&(s=t.length),s||(s=0),v>0&&v<c&&(v=c),v===c||t.length===0||this.length===0)return 0;if(s<0)throw new RangeError("targetStart out of bounds");if(c<0||c>=this.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("sourceEnd out of bounds");v>this.length&&(v=this.length),t.length-s<v-c&&(v=t.length-s+c);let R=v-c;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(s,c,v):Uint8Array.prototype.set.call(t,this.subarray(c,v),s),R},"copy"),r.prototype.fill=e(function(t,s,c,v){if(typeof t=="string"){if(typeof s=="string"?(v=s,s=0,c=this.length):typeof c=="string"&&(v=c,c=this.length),v!==void 0&&typeof v!="string")throw new TypeError("encoding must be a string");if(typeof v=="string"&&!r.isEncoding(v))throw new TypeError("Unknown encoding: "+v);if(t.length===1){let C=t.charCodeAt(0);(v==="utf8"&&C<128||v==="latin1")&&(t=C)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(s<0||this.length<s||this.length<c)throw new RangeError("Out of range index");if(c<=s)return this;s=s>>>0,c=c===void 0?this.length:c>>>0,t||(t=0);let R;if(typeof t=="number")for(R=s;R<c;++R)this[R]=t;else{let C=r.isBuffer(t)?t:r.from(t,v),j=C.length;if(j===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(R=0;R<c-s;++R)this[R+s]=C[R%j]}return this},"fill");let Y={};function H(t,s,c){var R;var v;Y[t]=(v=(R=class extends c{constructor(){super(),Object.defineProperty(this,"message",{value:s.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(j){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:j,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}},l(R,"w"),R),e(v,"NodeError"),v)}l(H,"$"),e(H,"E"),H("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),H("ERR_INVALID_ARG_TYPE",function(t,s){return`The "${t}" argument must be of type number. Received type ${typeof s}`},TypeError),H("ERR_OUT_OF_RANGE",function(t,s,c){let v=`The value of "${t}" is out of range.`,R=c;return Number.isInteger(c)&&Math.abs(c)>2**32?R=Q(String(c)):typeof c=="bigint"&&(R=String(c),(c>BigInt(2)**BigInt(32)||c<-(BigInt(2)**BigInt(32)))&&(R=Q(R)),R+="n"),v+=` It must be ${s}. Received ${R}`,v},RangeError);function Q(t){let s="",c=t.length,v=t[0]==="-"?1:0;for(;c>=v+4;c-=3)s=`_${t.slice(c-3,c)}${s}`;return`${t.slice(0,c)}${s}`}l(Q,"H"),e(Q,"addNumericalSeparator");function fe(t,s,c){N(s,"offset"),(t[s]===void 0||t[s+c]===void 0)&&I(s,t.length-(c+1))}l(fe,"te"),e(fe,"checkBounds");function ve(t,s,c,v,R,C){if(t>c||t<s){let j=typeof s=="bigint"?"n":"",Z;throw s===0||s===BigInt(0)?Z=`>= 0${j} and < 2${j} ** ${(C+1)*8}${j}`:Z=`>= -(2${j} ** ${(C+1)*8-1}${j}) and < 2 ** ${(C+1)*8-1}${j}`,new Y.ERR_OUT_OF_RANGE("value",Z,t)}fe(v,R,C)}l(ve,"oe"),e(ve,"checkIntBI");function N(t,s){if(typeof t!="number")throw new Y.ERR_INVALID_ARG_TYPE(s,"number",t)}l(N,"I"),e(N,"validateNumber");function I(t,s,c){throw Math.floor(t)!==t?(N(t,c),new Y.ERR_OUT_OF_RANGE("offset","an integer",t)):s<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${s}`,t)}l(I,"x"),e(I,"boundsError");let D=/[^+/0-9A-Za-z-_]/g;function z(t){if(t=t.split("=")[0],t=t.trim().replace(D,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}l(z,"Y"),e(z,"base64clean");function Ee(t,s){s=s||1/0;let c,v=t.length,R=null,C=[];for(let j=0;j<v;++j){if(c=t.charCodeAt(j),c>55295&&c<57344){if(!R){if(c>56319){(s-=3)>-1&&C.push(239,191,189);continue}else if(j+1===v){(s-=3)>-1&&C.push(239,191,189);continue}R=c;continue}if(c<56320){(s-=3)>-1&&C.push(239,191,189),R=c;continue}c=(R-55296<<10|c-56320)+65536}else R&&(s-=3)>-1&&C.push(239,191,189);if(R=null,c<128){if((s-=1)<0)break;C.push(c)}else if(c<2048){if((s-=2)<0)break;C.push(c>>6|192,c&63|128)}else if(c<65536){if((s-=3)<0)break;C.push(c>>12|224,c>>6&63|128,c&63|128)}else if(c<1114112){if((s-=4)<0)break;C.push(c>>18|240,c>>12&63|128,c>>6&63|128,c&63|128)}else throw new Error("Invalid code point")}return C}l(Ee,"ue"),e(Ee,"utf8ToBytes");function Oe(t){let s=[];for(let c=0;c<t.length;++c)s.push(t.charCodeAt(c)&255);return s}l(Oe,"le"),e(Oe,"asciiToBytes");function be(t,s){let c,v,R,C=[];for(let j=0;j<t.length&&!((s-=2)<0);++j)c=t.charCodeAt(j),v=c>>8,R=c%256,C.push(R),C.push(v);return C}l(be,"ee"),e(be,"utf16leToBytes");function ge(t){return a.toByteArray(z(t))}l(ge,"ie"),e(ge,"base64ToBytes");function Ne(t,s,c,v){let R;for(R=0;R<v&&!(R+c>=s.length||R>=t.length);++R)s[R+c]=t[R];return R}l(Ne,"me"),e(Ne,"blitBuffer");function Ie(t,s){return t instanceof s||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===s.name}l(Ie,"ye"),e(Ie,"isInstance");function ke(t){return t!==t}l(ke,"ve"),e(ke,"numberIsNaN");let Ce=function(){let t="0123456789abcdef",s=new Array(256);for(let c=0;c<16;++c){let v=c*16;for(let R=0;R<16;++R)s[v+R]=t[c]+t[R]}return s}();function $e(t){return typeof BigInt>"u"?Ke:t}l($e,"Be"),e($e,"defineBigIntMethod");function Ke(){throw new Error("BigInt not supported")}return l(Ke,"Je"),e(Ke,"BufferBigIntNotDefined"),Ci}l(GA,"P6");var ys,Wm,Eu,zm,Ci,Hm,Ai,cI,hI,dI,W4=Qt(()=>{ys={},Wm=!1,e(fI,"dew$2"),Eu={},zm=!1,e(uI,"dew$1"),Ci={},Hm=!1,e(GA,"dew"),Ai=GA(),Ai.Buffer,Ai.SlowBuffer,Ai.INSPECT_MAX_BYTES,Ai.kMaxLength,cI=Ai.Buffer,hI=Ai.INSPECT_MAX_BYTES,dI=Ai.kMaxLength}),pI={};nn(pI,{Buffer:l(()=>cI,"Buffer"),INSPECT_MAX_BYTES:l(()=>hI,"INSPECT_MAX_BYTES"),kMaxLength:l(()=>dI,"kMaxLength")});var z4=Qt(()=>{W4()}),H4=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=void 0;var i=(z4(),cr(pI));Object.defineProperty(a,"Buffer",{enumerable:!0,get:e(function(){return i.Buffer},"get")})}),ka=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.bufferFrom=a.bufferAllocUnsafe=a.Buffer=void 0;var i=H4();Object.defineProperty(a,"Buffer",{enumerable:!0,get:e(function(){return i.Buffer},"get")});function f(n,...r){return new i.Buffer(n,...r)}l(f,"F1"),e(f,"bufferV0P12Ponyfill");var g=i.Buffer.allocUnsafe||f;a.bufferAllocUnsafe=g;var o=i.Buffer.from||f;a.bufferFrom=o}),gI=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.inherits=i,a.promisify=f,a.inspect=g,a.format=o;function i(n,r){if(n==null)throw new TypeError("The constructor to inherit from is not defined");if(r==null)throw new TypeError("The super constructor to inherit from is not defined");n.super_=r,n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}})}l(i,"D6"),e(i,"inherits");function f(n){if(typeof n!="function")throw new TypeError('The "original" argument must be of type function');return function(...r){return new Promise((u,p)=>{n.call(this,...r,(h,d)=>{h?p(h):u(d)})})}}l(f,"$6"),e(f,"promisify");function g(n){return n===null?"null":n===void 0?"undefined":typeof n=="string"?`'${n}'`:typeof n=="number"||typeof n=="boolean"?String(n):Array.isArray(n)?`[ ${n.map(r=>g(r)).join(", ")} ]`:typeof n=="object"?`{ ${Object.entries(n).map(([r,u])=>`${r}: ${g(u)}`).join(", ")} }`:String(n)}l(g,"fy"),e(g,"inspect");function o(n,...r){if(r.length===0)return n;let u=n,p=0;for(u=u.replace(/%[sdj%]/g,h=>{if(p>=r.length)return h;let d=r[p++];switch(h){case"%s":return String(d);case"%d":return Number(d).toString();case"%j":try{return JSON.stringify(d)}catch{return"[Circular]"}case"%%":return"%";default:return h}});p<r.length;)u+=" "+String(r[p++]);return u}l(o,"M6"),e(o,"format")}),yd=Ge(a=>{"use strict";var d;Object.defineProperty(a,"__esModule",{value:!0}),a.AssertionError=a.RangeError=a.TypeError=a.Error=void 0,a.message=p,a.E=h;var i=gI(),f=typeof Symbol>"u"?"_kCode":Symbol("code"),g={};function o(m){var w;var y;return y=(w=class extends m{constructor(S,...T){super(p(S,T)),this.code=S,this[f]=S,this.name=`${super.name} [${this[f]}]`}},l(w,"t"),w),e(y,"NodeError"),y}l(o,"dy"),e(o,"makeNodeError");var n=globalThis,r=(d=class extends n.Error{constructor(y){if(typeof y!="object"||y===null)throw new a.TypeError("ERR_INVALID_ARG_TYPE","options","object");y.message?super(y.message):super(`${(0,i.inspect)(y.actual).slice(0,128)} ${y.operator} ${(0,i.inspect)(y.expected).slice(0,128)}`),this.generatedMessage=!y.message,this.name="AssertionError [ERR_ASSERTION]",this.code="ERR_ASSERTION",this.actual=y.actual,this.expected=y.expected,this.operator=y.operator,a.Error.captureStackTrace(this,y.stackStartFunction)}},l(d,"py"),d);e(r,"AssertionError");var u=r;a.AssertionError=u;function p(m,y){if(typeof m!="string")throw new a.Error("Error message key must be a string");let w=g[m];if(!w)throw new a.Error(`An invalid error message key was used: ${m}.`);let _;if(typeof w=="function")_=w;else{if(_=i.format,y===void 0||y.length===0)return w;y.unshift(w)}return String(_.apply(null,y))}l(p,"P1"),e(p,"message");function h(m,y){g[m]=typeof y=="function"?y:String(y)}l(h,"Ci"),e(h,"E"),a.Error=o(n.Error),a.TypeError=o(n.TypeError),a.RangeError=o(n.RangeError),h("ERR_DIR_CLOSED","Directory handle was closed"),h("ERR_DIR_CONCURRENT_OPERATION","Cannot do synchronous work on directory handle with concurrent asynchronous operations"),h("ERR_INVALID_FILE_URL_HOST",'File URL host must be "localhost" or empty on %s'),h("ERR_INVALID_FILE_URL_PATH","File URL path %s"),h("ERR_INVALID_OPT_VALUE",(m,y)=>`The value "${String(y)}" is invalid for option "${m}"`),h("ERR_INVALID_OPT_VALUE_ENCODING",m=>`The value "${String(m)}" is invalid for option "encoding"`),h("ERR_INVALID_ARG_VALUE","Unable to open file as blob")}),md=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ENCODING_UTF8=void 0,a.assertEncoding=g,a.strToEncoding=o;var i=ka(),f=yd();a.ENCODING_UTF8="utf8";function g(n){if(n&&!i.Buffer.isEncoding(n))throw new f.TypeError("ERR_INVALID_OPT_VALUE_ENCODING",n)}l(g,"j6"),e(g,"assertEncoding");function o(n,r){return!r||r===a.ENCODING_UTF8?n:r==="buffer"?new i.Buffer(n):new i.Buffer(n).toString(r)}l(o,"H6"),e(o,"strToEncoding")}),pE=Ge(a=>{"use strict";var w;Object.defineProperty(a,"__esModule",{value:!0}),a.Dirent=void 0;var i=Dn(),f=md(),{S_IFMT:g,S_IFDIR:o,S_IFREG:n,S_IFBLK:r,S_IFCHR:u,S_IFLNK:p,S_IFIFO:h,S_IFSOCK:d}=i.constants,m=(w=class{constructor(){this.name="",this.path="",this.parentPath="",this.mode=0}static build(S,T){let O=new w,{mode:E}=S.getNode();return O.name=(0,f.strToEncoding)(S.getName(),T),O.mode=E,O.path=S.getParentPath(),O.parentPath=O.path,O}_checkModeProperty(S){return(this.mode&g)===S}isDirectory(){return this._checkModeProperty(o)}isFile(){return this._checkModeProperty(n)}isBlockDevice(){return this._checkModeProperty(r)}isCharacterDevice(){return this._checkModeProperty(u)}isSymbolicLink(){return this._checkModeProperty(p)}isFIFO(){return this._checkModeProperty(h)}isSocket(){return this._checkModeProperty(d)}},l(w,"Bu"),w);e(m,"Dirent");var y=m;a.Dirent=y,a.default=y});function Qh(a){throw new Error("Node.js process "+a+" is not supported by JSPM core outside of Node.js")}l(Qh,"by");function yI(){!da||!na||(da=!1,na.length?Bn=na.concat(Bn):$l=-1,Bn.length&&gE())}l(yI,"Q6");function gE(){if(!da){var a=setTimeout(yI,0);da=!0;for(var i=Bn.length;i;){for(na=Bn,Bn=[];++$l<i;)na&&na[$l].run();$l=-1,i=Bn.length}na=null,da=!1,clearTimeout(a)}}l(gE,"k1");function VA(a){var i=new Array(arguments.length-1);if(arguments.length>1)for(var f=1;f<arguments.length;f++)i[f-1]=arguments[f];Bn.push(new qm(a,i)),Bn.length===1&&!da&&setTimeout(gE,0)}l(VA,"eM");function qm(a,i){this.fun=a,this.array=i}l(qm,"B1");function yr(){}l(yr,"Yt");function KA(a){Qh("_linkedBinding")}l(KA,"gM");function JA(a){Qh("dlopen")}l(JA,"_M");function YA(){return[]}l(YA,"EM");function ZA(){return[]}l(ZA,"SM");function QA(a,i){if(!a)throw new Error(i||"assertion error")}l(QA,"kM");function XA(){return!1}l(XA,"NM");function eR(){return ai.now()/1e3}l(eR,"QM");function Zf(a){var i=Math.floor((Date.now()-ai.now())*.001),f=ai.now()*.001,g=Math.floor(f)+i,o=Math.floor(f%1*1e9);return a&&(g=g-a[0],o=o-a[1],o<0&&(g--,o+=Su)),[g,o]}l(Zf,"vy");function Kn(){return yE}l(Kn,"Ni");function tR(a){return[]}l(tR,"cU");function rR(){if(Gm)return Au;Gm=!0;var a=yE;function i(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}l(i,"t"),e(i,"assertPath");function f(n,r){for(var u="",p=0,h=-1,d=0,m,y=0;y<=n.length;++y){if(y<n.length)m=n.charCodeAt(y);else{if(m===47)break;m=47}if(m===47){if(!(h===y-1||d===1))if(h!==y-1&&d===2){if(u.length<2||p!==2||u.charCodeAt(u.length-1)!==46||u.charCodeAt(u.length-2)!==46){if(u.length>2){var w=u.lastIndexOf("/");if(w!==u.length-1){w===-1?(u="",p=0):(u=u.slice(0,w),p=u.length-1-u.lastIndexOf("/")),h=y,d=0;continue}}else if(u.length===2||u.length===1){u="",p=0,h=y,d=0;continue}}r&&(u.length>0?u+="/..":u="..",p=2)}else u.length>0?u+="/"+n.slice(h+1,y):u=n.slice(h+1,y),p=y-h-1;h=y,d=0}else m===46&&d!==-1?++d:d=-1}return u}l(f,"r"),e(f,"normalizeStringPosix");function g(n,r){var u=r.dir||r.root,p=r.base||(r.name||"")+(r.ext||"");return u?u===r.root?u+p:u+n+p:p}l(g,"n"),e(g,"_format");var o={resolve:e(function(){for(var n="",r=!1,u,p=arguments.length-1;p>=-1&&!r;p--){var h;p>=0?h=arguments[p]:(u===void 0&&(u=a.cwd()),h=u),i(h),h.length!==0&&(n=h+"/"+n,r=h.charCodeAt(0)===47)}return n=f(n,!r),r?n.length>0?"/"+n:"/":n.length>0?n:"."},"resolve2"),normalize:e(function(n){if(i(n),n.length===0)return".";var r=n.charCodeAt(0)===47,u=n.charCodeAt(n.length-1)===47;return n=f(n,!r),n.length===0&&!r&&(n="."),n.length>0&&u&&(n+="/"),r?"/"+n:n},"normalize2"),isAbsolute:e(function(n){return i(n),n.length>0&&n.charCodeAt(0)===47},"isAbsolute2"),join:e(function(){if(arguments.length===0)return".";for(var n,r=0;r<arguments.length;++r){var u=arguments[r];i(u),u.length>0&&(n===void 0?n=u:n+="/"+u)}return n===void 0?".":o.normalize(n)},"join2"),relative:e(function(n,r){if(i(n),i(r),n===r||(n=o.resolve(n),r=o.resolve(r),n===r))return"";for(var u=1;u<n.length&&n.charCodeAt(u)===47;++u);for(var p=n.length,h=p-u,d=1;d<r.length&&r.charCodeAt(d)===47;++d);for(var m=r.length,y=m-d,w=h<y?h:y,_=-1,S=0;S<=w;++S){if(S===w){if(y>w){if(r.charCodeAt(d+S)===47)return r.slice(d+S+1);if(S===0)return r.slice(d+S)}else h>w&&(n.charCodeAt(u+S)===47?_=S:S===0&&(_=0));break}var T=n.charCodeAt(u+S),O=r.charCodeAt(d+S);if(T!==O)break;T===47&&(_=S)}var E="";for(S=u+_+1;S<=p;++S)(S===p||n.charCodeAt(S)===47)&&(E.length===0?E+="..":E+="/..");return E.length>0?E+r.slice(d+_):(d+=_,r.charCodeAt(d)===47&&++d,r.slice(d))},"relative2"),_makeLong:e(function(n){return n},"_makeLong2"),dirname:e(function(n){if(i(n),n.length===0)return".";for(var r=n.charCodeAt(0),u=r===47,p=-1,h=!0,d=n.length-1;d>=1;--d)if(r=n.charCodeAt(d),r===47){if(!h){p=d;break}}else h=!1;return p===-1?u?"/":".":u&&p===1?"//":n.slice(0,p)},"dirname2"),basename:e(function(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');i(n);var u=0,p=-1,h=!0,d;if(r!==void 0&&r.length>0&&r.length<=n.length){if(r.length===n.length&&r===n)return"";var m=r.length-1,y=-1;for(d=n.length-1;d>=0;--d){var w=n.charCodeAt(d);if(w===47){if(!h){u=d+1;break}}else y===-1&&(h=!1,y=d+1),m>=0&&(w===r.charCodeAt(m)?--m===-1&&(p=d):(m=-1,p=y))}return u===p?p=y:p===-1&&(p=n.length),n.slice(u,p)}else{for(d=n.length-1;d>=0;--d)if(n.charCodeAt(d)===47){if(!h){u=d+1;break}}else p===-1&&(h=!1,p=d+1);return p===-1?"":n.slice(u,p)}},"basename2"),extname:e(function(n){i(n);for(var r=-1,u=0,p=-1,h=!0,d=0,m=n.length-1;m>=0;--m){var y=n.charCodeAt(m);if(y===47){if(!h){u=m+1;break}continue}p===-1&&(h=!1,p=m+1),y===46?r===-1?r=m:d!==1&&(d=1):r!==-1&&(d=-1)}return r===-1||p===-1||d===0||d===1&&r===p-1&&r===u+1?"":n.slice(r,p)},"extname2"),format:e(function(n){if(n===null||typeof n!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof n);return g("/",n)},"format2"),parse:e(function(n){i(n);var r={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return r;var u=n.charCodeAt(0),p=u===47,h;p?(r.root="/",h=1):h=0;for(var d=-1,m=0,y=-1,w=!0,_=n.length-1,S=0;_>=h;--_){if(u=n.charCodeAt(_),u===47){if(!w){m=_+1;break}continue}y===-1&&(w=!1,y=_+1),u===46?d===-1?d=_:S!==1&&(S=1):d!==-1&&(S=-1)}return d===-1||y===-1||S===0||S===1&&d===y-1&&d===m+1?y!==-1&&(m===0&&p?r.base=r.name=n.slice(1,y):r.base=r.name=n.slice(m,y)):(m===0&&p?(r.name=n.slice(1,d),r.base=n.slice(1,y)):(r.name=n.slice(m,d),r.base=n.slice(m,y)),r.ext=n.slice(d,y)),m>0?r.dir=n.slice(0,m-1):p&&(r.dir="/"),r},"parse2"),sep:"/",delimiter:":",win32:null,posix:null};return o.posix=o,Au=o,Au}l(rR,"hU");var Bn,da,na,$l,nR,iR,oR,aR,sR,lR,fR,uR,cR,hR,dR,pR,gR,yR,mR,wR,bR,vR,_R,ER,SR,Qf,AR,RR,OR,kR,TR,FR,BR,xR,IR,PR,jR,CR,LR,NR,DR,UR,MR,$R,WR,zR,HR,qR,GR,VR,KR,ai,ly,Su,JR,YR,ZR,QR,XR,eO,tO,rO,nO,iO,oO,yE,Au,Gm,Er,mI,wI,bI,vI,_I,EI,SI,AI,RI,OI,kI,TI,FI,BI,xI,q4=Qt(()=>{e(Qh,"unimplemented"),Bn=[],da=!1,$l=-1,e(yI,"cleanUpNextTick"),e(gE,"drainQueue"),e(VA,"nextTick"),e(qm,"Item"),qm.prototype.run=function(){this.fun.apply(null,this.array)},nR="browser",iR="x64",oR="browser",aR={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},sR=["/usr/bin/node"],lR=[],fR="v16.8.0",uR={},cR=e(function(a,i){console.warn((i?i+": ":"")+a)},"emitWarning"),hR=e(function(a){Qh("binding")},"binding"),dR=e(function(a){return 0},"umask"),pR=e(function(){return"/"},"cwd"),gR=e(function(a){},"chdir"),yR={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},e(yr,"noop"),mR=yr,wR=[],e(KA,"_linkedBinding"),bR={},vR=!1,_R={},e(JA,"dlopen"),e(YA,"_getActiveRequests"),e(ZA,"_getActiveHandles"),ER=yr,SR=yr,Qf=e(function(){return{}},"cpuUsage"),AR=Qf,RR=Qf,OR=yr,kR=yr,TR=yr,FR={},e(QA,"assert"),BR={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},xR=yr,IR=yr,e(XA,"hasUncaughtExceptionCaptureCallback"),PR=yr,jR=yr,CR=yr,LR=yr,NR=yr,DR=void 0,UR=void 0,MR=void 0,$R=yr,WR=2,zR=1,HR="/bin/usr/node",qR=9229,GR="node",VR=[],KR=yr,ai={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},ai.now===void 0&&(ly=Date.now(),ai.timing&&ai.timing.navigationStart&&(ly=ai.timing.navigationStart),ai.now=()=>Date.now()-ly),e(eR,"uptime"),Su=1e9,e(Zf,"hrtime"),Zf.bigint=function(a){var i=Zf(a);return typeof BigInt>"u"?i[0]*Su+i[1]:BigInt(i[0]*Su)+BigInt(i[1])},JR=10,YR={},ZR=0,e(Kn,"on"),QR=Kn,XR=Kn,eO=Kn,tO=Kn,rO=Kn,nO=yr,iO=Kn,oO=Kn,e(tR,"listeners"),yE={version:fR,versions:uR,arch:iR,platform:oR,release:yR,_rawDebug:mR,moduleLoadList:wR,binding:hR,_linkedBinding:KA,_events:YR,_eventsCount:ZR,_maxListeners:JR,on:Kn,addListener:QR,once:XR,off:eO,removeListener:tO,removeAllListeners:rO,emit:nO,prependListener:iO,prependOnceListener:oO,listeners:tR,domain:bR,_exiting:vR,config:_R,dlopen:JA,uptime:eR,_getActiveRequests:YA,_getActiveHandles:ZA,reallyExit:ER,_kill:SR,cpuUsage:Qf,resourceUsage:AR,memoryUsage:RR,kill:OR,exit:kR,openStdin:TR,allowedNodeEnvironmentFlags:FR,assert:QA,features:BR,_fatalExceptions:xR,setUncaughtExceptionCaptureCallback:IR,hasUncaughtExceptionCaptureCallback:XA,emitWarning:cR,nextTick:VA,_tickCallback:PR,_debugProcess:jR,_debugEnd:CR,_startProfilerIdleNotifier:LR,_stopProfilerIdleNotifier:NR,stdout:DR,stdin:MR,stderr:UR,abort:$R,umask:dR,chdir:gR,cwd:pR,env:aR,title:nR,argv:sR,execArgv:lR,pid:WR,ppid:zR,execPath:HR,debugPort:qR,hrtime:Zf,argv0:GR,_preload_modules:VR,setSourceMapsEnabled:KR},Au={},Gm=!1,e(rR,"dew"),Er=rR(),mI=Er._makeLong,wI=Er.basename,bI=Er.delimiter,vI=Er.dirname,_I=Er.extname,EI=Er.format,SI=Er.isAbsolute,AI=Er.join,RI=Er.normalize,OI=Er.parse,kI=Er.posix,TI=Er.relative,FI=Er.resolve,BI=Er.sep,xI=Er.win32}),II={};nn(II,{_makeLong:l(()=>mI,"_makeLong"),basename:l(()=>wI,"basename"),delimiter:l(()=>bI,"delimiter"),dirname:l(()=>vI,"dirname"),extname:l(()=>_I,"extname"),format:l(()=>EI,"format"),isAbsolute:l(()=>SI,"isAbsolute"),join:l(()=>AI,"join"),normalize:l(()=>RI,"normalize"),parse:l(()=>OI,"parse"),posix:l(()=>kI,"posix"),relative:l(()=>TI,"relative"),resolve:l(()=>FI,"resolve"),sep:l(()=>BI,"sep"),win32:l(()=>xI,"win32")});var G4=Qt(()=>{q4()}),pf=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.basename=a.isAbsolute=a.normalize=a.dirname=a.relative=a.join=a.posix=a.sep=a.resolve=void 0;var i=(G4(),cr(II));Object.defineProperty(a,"resolve",{enumerable:!0,get:e(function(){return i.resolve},"get")}),Object.defineProperty(a,"sep",{enumerable:!0,get:e(function(){return i.sep},"get")}),Object.defineProperty(a,"posix",{enumerable:!0,get:e(function(){return i.posix},"get")}),Object.defineProperty(a,"join",{enumerable:!0,get:e(function(){return i.join},"get")}),Object.defineProperty(a,"relative",{enumerable:!0,get:e(function(){return i.relative},"get")}),Object.defineProperty(a,"dirname",{enumerable:!0,get:e(function(){return i.dirname},"get")}),Object.defineProperty(a,"normalize",{enumerable:!0,get:e(function(){return i.normalize},"get")}),Object.defineProperty(a,"isAbsolute",{enumerable:!0,get:e(function(){return i.isAbsolute},"get")}),Object.defineProperty(a,"basename",{enumerable:!0,get:e(function(){return i.basename},"get")})}),mE={};nn(mE,{__addDisposableResource:l(()=>m0,"__addDisposableResource"),__assign:l(()=>Ol,"__assign"),__asyncDelegator:l(()=>f0,"__asyncDelegator"),__asyncGenerator:l(()=>l0,"__asyncGenerator"),__asyncValues:l(()=>u0,"__asyncValues"),__await:l(()=>Aa,"__await"),__awaiter:l(()=>r0,"__awaiter"),__classPrivateFieldGet:l(()=>p0,"__classPrivateFieldGet"),__classPrivateFieldIn:l(()=>y0,"__classPrivateFieldIn"),__classPrivateFieldSet:l(()=>g0,"__classPrivateFieldSet"),__createBinding:l(()=>cf,"__createBinding"),__decorate:l(()=>Jm,"__decorate"),__disposeResources:l(()=>w0,"__disposeResources"),__esDecorate:l(()=>Zm,"__esDecorate"),__exportStar:l(()=>i0,"__exportStar"),__extends:l(()=>Vm,"__extends"),__generator:l(()=>n0,"__generator"),__importDefault:l(()=>d0,"__importDefault"),__importStar:l(()=>h0,"__importStar"),__makeTemplateObject:l(()=>c0,"__makeTemplateObject"),__metadata:l(()=>t0,"__metadata"),__param:l(()=>Ym,"__param"),__propKey:l(()=>Xm,"__propKey"),__read:l(()=>Xh,"__read"),__rest:l(()=>Km,"__rest"),__rewriteRelativeImportExtension:l(()=>b0,"__rewriteRelativeImportExtension"),__runInitializers:l(()=>Qm,"__runInitializers"),__setFunctionName:l(()=>e0,"__setFunctionName"),__spread:l(()=>o0,"__spread"),__spreadArray:l(()=>s0,"__spreadArray"),__spreadArrays:l(()=>a0,"__spreadArrays"),__values:l(()=>uf,"__values"),default:l(()=>CI,"default")});function Vm(a,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");Ru(a,i);function f(){this.constructor=a}l(f,"r"),e(f,"__"),a.prototype=i===null?Object.create(i):(f.prototype=i.prototype,new f)}l(Vm,"$1");function Km(a,i){var f={};for(var g in a)Object.prototype.hasOwnProperty.call(a,g)&&i.indexOf(g)<0&&(f[g]=a[g]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,g=Object.getOwnPropertySymbols(a);o<g.length;o++)i.indexOf(g[o])<0&&Object.prototype.propertyIsEnumerable.call(a,g[o])&&(f[g[o]]=a[g[o]]);return f}l(Km,"M1");function Jm(a,i,f,g){var o=arguments.length,n=o<3?i:g===null?g=Object.getOwnPropertyDescriptor(i,f):g,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(a,i,f,g);else for(var u=a.length-1;u>=0;u--)(r=a[u])&&(n=(o<3?r(n):o>3?r(i,f,n):r(i,f))||n);return o>3&&n&&Object.defineProperty(i,f,n),n}l(Jm,"U1");function Ym(a,i){return function(f,g){i(f,g,a)}}l(Ym,"j1");function Zm(a,i,f,g,o,n){function r(O){if(O!==void 0&&typeof O!="function")throw new TypeError("Function expected");return O}l(r,"i"),e(r,"accept");for(var u=g.kind,p=u==="getter"?"get":u==="setter"?"set":"value",h=!i&&a?g.static?a:a.prototype:null,d=i||(h?Object.getOwnPropertyDescriptor(h,g.name):{}),m,y=!1,w=f.length-1;w>=0;w--){var _={};for(var S in g)_[S]=S==="access"?{}:g[S];for(var S in g.access)_.access[S]=g.access[S];_.addInitializer=function(O){if(y)throw new TypeError("Cannot add initializers after decoration has completed");n.push(r(O||null))};var T=(0,f[w])(u==="accessor"?{get:d.get,set:d.set}:d[p],_);if(u==="accessor"){if(T===void 0)continue;if(T===null||typeof T!="object")throw new TypeError("Object expected");(m=r(T.get))&&(d.get=m),(m=r(T.set))&&(d.set=m),(m=r(T.init))&&o.unshift(m)}else(m=r(T))&&(u==="field"?o.unshift(m):d[p]=m)}h&&Object.defineProperty(h,g.name,d),y=!0}l(Zm,"H1");function Qm(a,i,f){for(var g=arguments.length>2,o=0;o<i.length;o++)f=g?i[o].call(a,f):i[o].call(a);return g?f:void 0}l(Qm,"W1");function Xm(a){return typeof a=="symbol"?a:"".concat(a)}l(Xm,"q1");function e0(a,i,f){return typeof i=="symbol"&&(i=i.description?"[".concat(i.description,"]"):""),Object.defineProperty(a,"name",{configurable:!0,value:f?"".concat(f," ",i):i})}l(e0,"z1");function t0(a,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,i)}l(t0,"V1");function r0(a,i,f,g){function o(n){return n instanceof f?n:new f(function(r){r(n)})}return l(o,"a"),e(o,"adopt"),new(f||(f=Promise))(function(n,r){function u(d){try{h(g.next(d))}catch(m){r(m)}}l(u,"f"),e(u,"fulfilled");function p(d){try{h(g.throw(d))}catch(m){r(m)}}l(p,"h"),e(p,"rejected");function h(d){d.done?n(d.value):o(d.value).then(u,p)}l(h,"c"),e(h,"step"),h((g=g.apply(a,i||[])).next())})}l(r0,"G1");function n0(a,i){var f={label:0,sent:e(function(){if(n[0]&1)throw n[1];return n[1]},"sent"),trys:[],ops:[]},g,o,n,r=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return r.next=u(0),r.throw=u(1),r.return=u(2),typeof Symbol=="function"&&(r[Symbol.iterator]=function(){return this}),r;function u(h){return function(d){return p([h,d])}}function p(h){if(g)throw new TypeError("Generator is already executing.");for(;r&&(r=0,h[0]&&(f=0)),f;)try{if(g=1,o&&(n=h[0]&2?o.return:h[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,h[1])).done)return n;switch(o=0,n&&(h=[h[0]&2,n.value]),h[0]){case 0:case 1:n=h;break;case 4:return f.label++,{value:h[1],done:!1};case 5:f.label++,o=h[1],h=[0];continue;case 7:h=f.ops.pop(),f.trys.pop();continue;default:if(n=f.trys,!(n=n.length>0&&n[n.length-1])&&(h[0]===6||h[0]===2)){f=0;continue}if(h[0]===3&&(!n||h[1]>n[0]&&h[1]<n[3])){f.label=h[1];break}if(h[0]===6&&f.label<n[1]){f.label=n[1],n=h;break}if(n&&f.label<n[2]){f.label=n[2],f.ops.push(h);break}n[2]&&f.ops.pop(),f.trys.pop();continue}h=i.call(a,f)}catch(d){h=[6,d],o=0}finally{g=n=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}}l(n0,"Y1");function i0(a,i){for(var f in a)f!=="default"&&!Object.prototype.hasOwnProperty.call(i,f)&&cf(i,a,f)}l(i0,"K1");function uf(a){var i=typeof Symbol=="function"&&Symbol.iterator,f=i&&a[i],g=0;if(f)return f.call(a);if(a&&typeof a.length=="number")return{next:e(function(){return a&&g>=a.length&&(a=void 0),{value:a&&a[g++],done:!a}},"next")};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}l(uf,"Du");function Xh(a,i){var f=typeof Symbol=="function"&&a[Symbol.iterator];if(!f)return a;var g=f.call(a),o,n=[],r;try{for(;(i===void 0||i-- >0)&&!(o=g.next()).done;)n.push(o.value)}catch(u){r={error:u}}finally{try{o&&!o.done&&(f=g.return)&&f.call(g)}finally{if(r)throw r.error}}return n}l(Xh,"Ay");function o0(){for(var a=[],i=0;i<arguments.length;i++)a=a.concat(Xh(arguments[i]));return a}l(o0,"X1");function a0(){for(var a=0,i=0,f=arguments.length;i<f;i++)a+=arguments[i].length;for(var g=Array(a),o=0,i=0;i<f;i++)for(var n=arguments[i],r=0,u=n.length;r<u;r++,o++)g[o]=n[r];return g}l(a0,"J1");function s0(a,i,f){if(f||arguments.length===2)for(var g=0,o=i.length,n;g<o;g++)(n||!(g in i))&&(n||(n=Array.prototype.slice.call(i,0,g)),n[g]=i[g]);return a.concat(n||Array.prototype.slice.call(i))}l(s0,"Z1");function Aa(a){return this instanceof Aa?(this.v=a,this):new Aa(a)}l(Aa,"za");function l0(a,i,f){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var g=f.apply(a,i||[]),o,n=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",r),o[Symbol.asyncIterator]=function(){return this},o;function r(w){return function(_){return Promise.resolve(_).then(w,m)}}function u(w,_){g[w]&&(o[w]=function(S){return new Promise(function(T,O){n.push([w,S,T,O])>1||p(w,S)})},_&&(o[w]=_(o[w])))}function p(w,_){try{h(g[w](_))}catch(S){y(n[0][3],S)}}function h(w){w.value instanceof Aa?Promise.resolve(w.value.v).then(d,m):y(n[0][2],w)}function d(w){p("next",w)}function m(w){p("throw",w)}function y(w,_){w(_),n.shift(),n.length&&p(n[0][0],n[0][1])}}l(l0,"Q1");function f0(a){var i,f;return i={},g("next"),g("throw",function(o){throw o}),g("return"),i[Symbol.iterator]=function(){return this},i;function g(o,n){i[o]=a[o]?function(r){return(f=!f)?{value:Aa(a[o](r)),done:!1}:n?n(r):r}:n}}l(f0,"eE");function u0(a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=a[Symbol.asyncIterator],f;return i?i.call(a):(a=typeof uf=="function"?uf(a):a[Symbol.iterator](),f={},g("next"),g("throw"),g("return"),f[Symbol.asyncIterator]=function(){return this},f);function g(n){f[n]=a[n]&&function(r){return new Promise(function(u,p){r=a[n](r),o(u,p,r.done,r.value)})}}function o(n,r,u,p){Promise.resolve(p).then(function(h){n({value:h,done:u})},r)}}l(u0,"tE");function c0(a,i){return Object.defineProperty?Object.defineProperty(a,"raw",{value:i}):a.raw=i,a}l(c0,"rE");function h0(a){if(a&&a.__esModule)return a;var i={};if(a!=null)for(var f=Ou(a),g=0;g<f.length;g++)f[g]!=="default"&&cf(i,a,f[g]);return PI(i,a),i}l(h0,"nE");function d0(a){return a&&a.__esModule?a:{default:a}}l(d0,"iE");function p0(a,i,f,g){if(f==="a"&&!g)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?a!==i||!g:!i.has(a))throw new TypeError("Cannot read private member from an object whose class did not declare it");return f==="m"?g:f==="a"?g.call(a):g?g.value:i.get(a)}l(p0,"oE");function g0(a,i,f,g,o){if(g==="m")throw new TypeError("Private method is not writable");if(g==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?a!==i||!o:!i.has(a))throw new TypeError("Cannot write private member to an object whose class did not declare it");return g==="a"?o.call(a,f):o?o.value=f:i.set(a,f),f}l(g0,"aE");function y0(a,i){if(i===null||typeof i!="object"&&typeof i!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof a=="function"?i===a:a.has(i)}l(y0,"sE");function m0(a,i,f){if(i!=null){if(typeof i!="object"&&typeof i!="function")throw new TypeError("Object expected.");var g,o;if(f){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");g=i[Symbol.asyncDispose]}if(g===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");g=i[Symbol.dispose],f&&(o=g)}if(typeof g!="function")throw new TypeError("Object not disposable.");o&&(g=e(function(){try{o.call(this)}catch(n){return Promise.reject(n)}},"dispose")),a.stack.push({value:i,dispose:g,async:f})}else f&&a.stack.push({async:!0});return i}l(m0,"lE");function w0(a){function i(n){a.error=a.hasError?new jI(n,a.error,"An error was suppressed during disposal."):n,a.hasError=!0}l(i,"t"),e(i,"fail");var f,g=0;function o(){for(;f=a.stack.pop();)try{if(!f.async&&g===1)return g=0,a.stack.push(f),Promise.resolve().then(o);if(f.dispose){var n=f.dispose.call(f.value);if(f.async)return g|=2,Promise.resolve(n).then(o,function(r){return i(r),o()})}else g|=1}catch(r){i(r)}if(g===1)return a.hasError?Promise.reject(a.error):Promise.resolve();if(a.hasError)throw a.error}return l(o,"a"),e(o,"next"),o()}l(w0,"fE");function b0(a,i){return typeof a=="string"&&/^\.\.?\//.test(a)?a.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(f,g,o,n,r){return g?i?".jsx":".js":o&&(!n||!r)?f:o+n+"."+r.toLowerCase()+"js"}):a}l(b0,"uE");var Ru,Ol,cf,PI,Ou,jI,CI,LI=Qt(()=>{Ru=e(function(a,i){return Ru=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,g){f.__proto__=g}||function(f,g){for(var o in g)Object.prototype.hasOwnProperty.call(g,o)&&(f[o]=g[o])},Ru(a,i)},"extendStatics"),e(Vm,"__extends"),Ol=e(function(){return Ol=Object.assign||e(function(a){for(var i,f=1,g=arguments.length;f<g;f++){i=arguments[f];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(a[o]=i[o])}return a},"__assign"),Ol.apply(this,arguments)},"__assign"),e(Km,"__rest"),e(Jm,"__decorate"),e(Ym,"__param"),e(Zm,"__esDecorate"),e(Qm,"__runInitializers"),e(Xm,"__propKey"),e(e0,"__setFunctionName"),e(t0,"__metadata"),e(r0,"__awaiter"),e(n0,"__generator"),cf=Object.create?function(a,i,f,g){g===void 0&&(g=f);var o=Object.getOwnPropertyDescriptor(i,f);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:e(function(){return i[f]},"get")}),Object.defineProperty(a,g,o)}:function(a,i,f,g){g===void 0&&(g=f),a[g]=i[f]},e(i0,"__exportStar"),e(uf,"__values"),e(Xh,"__read"),e(o0,"__spread"),e(a0,"__spreadArrays"),e(s0,"__spreadArray"),e(Aa,"__await"),e(l0,"__asyncGenerator"),e(f0,"__asyncDelegator"),e(u0,"__asyncValues"),e(c0,"__makeTemplateObject"),PI=Object.create?function(a,i){Object.defineProperty(a,"default",{enumerable:!0,value:i})}:function(a,i){a.default=i},Ou=e(function(a){return Ou=Object.getOwnPropertyNames||function(i){var f=[];for(var g in i)Object.prototype.hasOwnProperty.call(i,g)&&(f[f.length]=g);return f},Ou(a)},"ownKeys"),e(h0,"__importStar"),e(d0,"__importDefault"),e(p0,"__classPrivateFieldGet"),e(g0,"__classPrivateFieldSet"),e(y0,"__classPrivateFieldIn"),e(m0,"__addDisposableResource"),jI=typeof SuppressedError=="function"?SuppressedError:function(a,i,f){var g=new Error(f);return g.name="SuppressedError",g.error=a,g.suppressed=i,g},e(w0,"__disposeResources"),e(b0,"__rewriteRelativeImportExtension"),CI={__extends:Vm,__assign:Ol,__rest:Km,__decorate:Jm,__param:Ym,__esDecorate:Zm,__runInitializers:Qm,__propKey:Xm,__setFunctionName:e0,__metadata:t0,__awaiter:r0,__generator:n0,__createBinding:cf,__exportStar:i0,__values:uf,__read:Xh,__spread:o0,__spreadArrays:a0,__spreadArray:s0,__await:Aa,__asyncGenerator:l0,__asyncDelegator:f0,__asyncValues:u0,__makeTemplateObject:c0,__importStar:h0,__importDefault:d0,__classPrivateFieldGet:p0,__classPrivateFieldSet:g0,__classPrivateFieldIn:y0,__addDisposableResource:m0,__disposeResources:w0,__rewriteRelativeImportExtension:b0}}),V4=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0})}),NI=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.flattenJSON=void 0;var i=ka(),f=pf(),g=f.posix?f.posix.join:f.join,o=e(n=>{let r={};function u(p,h){for(let d in h){let m=h[d],y=g(p,d);typeof m=="string"||m instanceof i.Buffer?r[y]=m:typeof m=="object"&&m!==null&&!(m instanceof i.Buffer)&&Object.keys(m).length>0?u(y,m):r[y]=null}}return l(u,"r"),e(u,"flatten"),u("",n),r},"flattenJSON");a.flattenJSON=o}),DI=Ge(a=>{"use strict";var g;Object.defineProperty(a,"__esModule",{value:!0}),a.FanOut=void 0;var i=(g=class{constructor(){this.listeners=new Set}emit(n){this.listeners.forEach(r=>r(n))}listen(n){let r=this.listeners;return r.add(n),()=>r.delete(n)}},l(g,"Py"),g);e(i,"FanOut");var f=i;a.FanOut=f});function ed(a){throw new Error("Node.js process "+a+" is not supported by JSPM core outside of Node.js")}l(ed,"Cy");function UI(){!pa||!ia||(pa=!1,ia.length?xn=ia.concat(xn):Wl=-1,xn.length&&wE())}l(UI,"BU");function wE(){if(!pa){var a=setTimeout(UI,0);pa=!0;for(var i=xn.length;i;){for(ia=xn,xn=[];++Wl<i;)ia&&ia[Wl].run();Wl=-1,i=xn.length}ia=null,pa=!1,clearTimeout(a)}}l(wE,"pE");function v0(a){var i=new Array(arguments.length-1);if(arguments.length>1)for(var f=1;f<arguments.length;f++)i[f-1]=arguments[f];xn.push(new _0(a,i)),xn.length===1&&!pa&&setTimeout(wE,0)}l(v0,"yE");function _0(a,i){this.fun=a,this.array=i}l(_0,"mE");function mr(){}l(mr,"Kt");function E0(a){ed("_linkedBinding")}l(E0,"CE");function S0(a){ed("dlopen")}l(S0,"$E");function A0(){return[]}l(A0,"ME");function R0(){return[]}l(R0,"UE");function O0(a,i){if(!a)throw new Error(i||"assertion error")}l(O0,"KE");function k0(){return!1}l(k0,"QE");function T0(){return si.now()/1e3}l(T0,"mS");function kl(a){var i=Math.floor((Date.now()-si.now())*.001),f=si.now()*.001,g=Math.floor(f)+i,o=Math.floor(f%1*1e9);return a&&(g=g-a[0],o=o-a[1],o<0&&(g--,o+=ku)),[g,o]}l(kl,"Hu");function An(){return MI}l(An,"Vn");function F0(a){return[]}l(F0,"xS");var xn,pa,ia,Wl,B0,x0,I0,P0,j0,C0,L0,N0,D0,U0,M0,$0,W0,z0,H0,q0,G0,V0,K0,J0,Y0,Z0,Tl,Q0,X0,ew,tw,rw,nw,iw,ow,aw,sw,lw,fw,uw,cw,hw,dw,pw,gw,yw,mw,ww,bw,vw,_w,Ew,si,fy,ku,Sw,Aw,Rw,Ow,kw,Tw,Fw,Bw,xw,Iw,Pw,MI,K4=Qt(()=>{e(ed,"unimplemented"),xn=[],pa=!1,Wl=-1,e(UI,"cleanUpNextTick"),e(wE,"drainQueue"),e(v0,"nextTick"),e(_0,"Item"),_0.prototype.run=function(){this.fun.apply(null,this.array)},B0="browser",x0="x64",I0="browser",P0={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},j0=["/usr/bin/node"],C0=[],L0="v16.8.0",N0={},D0=e(function(a,i){console.warn((i?i+": ":"")+a)},"emitWarning"),U0=e(function(a){ed("binding")},"binding"),M0=e(function(a){return 0},"umask"),$0=e(function(){return"/"},"cwd"),W0=e(function(a){},"chdir"),z0={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},e(mr,"noop"),H0=!0,q0=mr,G0=[],e(E0,"_linkedBinding"),V0={},K0=!1,J0={},e(S0,"dlopen"),e(A0,"_getActiveRequests"),e(R0,"_getActiveHandles"),Y0=mr,Z0=mr,Tl=e(function(){return{}},"cpuUsage"),Q0=Tl,X0=Tl,ew=mr,tw=mr,rw=mr,nw={},e(O0,"assert"),iw={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},ow=mr,aw=mr,e(k0,"hasUncaughtExceptionCaptureCallback"),sw=mr,lw=mr,fw=mr,uw=mr,cw=mr,hw=void 0,dw=void 0,pw=void 0,gw=mr,yw=2,mw=1,ww="/bin/usr/node",bw=9229,vw="node",_w=[],Ew=mr,si={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},si.now===void 0&&(fy=Date.now(),si.timing&&si.timing.navigationStart&&(fy=si.timing.navigationStart),si.now=()=>Date.now()-fy),e(T0,"uptime"),ku=1e9,e(kl,"hrtime"),kl.bigint=function(a){var i=kl(a);return typeof BigInt>"u"?i[0]*ku+i[1]:BigInt(i[0]*ku)+BigInt(i[1])},Sw=10,Aw={},Rw=0,e(An,"on"),Ow=An,kw=An,Tw=An,Fw=An,Bw=An,xw=mr,Iw=An,Pw=An,e(F0,"listeners"),MI={version:L0,versions:N0,arch:x0,platform:I0,browser:H0,release:z0,_rawDebug:q0,moduleLoadList:G0,binding:U0,_linkedBinding:E0,_events:Aw,_eventsCount:Rw,_maxListeners:Sw,on:An,addListener:Ow,once:kw,off:Tw,removeListener:Fw,removeAllListeners:Bw,emit:xw,prependListener:Iw,prependOnceListener:Pw,listeners:F0,domain:V0,_exiting:K0,config:J0,dlopen:S0,uptime:T0,_getActiveRequests:A0,_getActiveHandles:R0,reallyExit:Y0,_kill:Z0,cpuUsage:Tl,resourceUsage:Q0,memoryUsage:X0,kill:ew,exit:tw,openStdin:rw,allowedNodeEnvironmentFlags:nw,assert:O0,features:iw,_fatalExceptions:ow,setUncaughtExceptionCaptureCallback:aw,hasUncaughtExceptionCaptureCallback:k0,emitWarning:D0,nextTick:v0,_tickCallback:sw,_debugProcess:lw,_debugEnd:fw,_startProfilerIdleNotifier:uw,_stopProfilerIdleNotifier:cw,stdout:hw,stdin:pw,stderr:dw,abort:gw,umask:M0,chdir:W0,cwd:$0,env:P0,title:B0,argv:j0,execArgv:C0,pid:yw,ppid:mw,execPath:ww,debugPort:bw,hrtime:kl,argv0:vw,_preload_modules:_w,setSourceMapsEnabled:Ew}}),$I={};nn($I,{_debugEnd:l(()=>fw,"_debugEnd"),_debugProcess:l(()=>lw,"_debugProcess"),_events:l(()=>Aw,"_events"),_eventsCount:l(()=>Rw,"_eventsCount"),_exiting:l(()=>K0,"_exiting"),_fatalExceptions:l(()=>ow,"_fatalExceptions"),_getActiveHandles:l(()=>R0,"_getActiveHandles"),_getActiveRequests:l(()=>A0,"_getActiveRequests"),_kill:l(()=>Z0,"_kill"),_linkedBinding:l(()=>E0,"_linkedBinding"),_maxListeners:l(()=>Sw,"_maxListeners"),_preload_modules:l(()=>_w,"_preload_modules"),_rawDebug:l(()=>q0,"_rawDebug"),_startProfilerIdleNotifier:l(()=>uw,"_startProfilerIdleNotifier"),_stopProfilerIdleNotifier:l(()=>cw,"_stopProfilerIdleNotifier"),_tickCallback:l(()=>sw,"_tickCallback"),abort:l(()=>gw,"abort"),addListener:l(()=>Ow,"addListener"),allowedNodeEnvironmentFlags:l(()=>nw,"allowedNodeEnvironmentFlags"),arch:l(()=>x0,"arch"),argv:l(()=>j0,"argv"),argv0:l(()=>vw,"argv0"),assert:l(()=>O0,"assert"),binding:l(()=>U0,"binding"),browser:l(()=>H0,"browser"),chdir:l(()=>W0,"chdir"),config:l(()=>J0,"config"),cpuUsage:l(()=>Tl,"cpuUsage"),cwd:l(()=>$0,"cwd"),debugPort:l(()=>bw,"debugPort"),dlopen:l(()=>S0,"dlopen"),domain:l(()=>V0,"domain"),emit:l(()=>xw,"emit"),emitWarning:l(()=>D0,"emitWarning"),env:l(()=>P0,"env"),execArgv:l(()=>C0,"execArgv"),execPath:l(()=>ww,"execPath"),exit:l(()=>tw,"exit"),features:l(()=>iw,"features"),hasUncaughtExceptionCaptureCallback:l(()=>k0,"hasUncaughtExceptionCaptureCallback"),hrtime:l(()=>kl,"hrtime"),kill:l(()=>ew,"kill"),listeners:l(()=>F0,"listeners"),memoryUsage:l(()=>X0,"memoryUsage"),moduleLoadList:l(()=>G0,"moduleLoadList"),nextTick:l(()=>v0,"nextTick"),off:l(()=>Tw,"off"),on:l(()=>An,"on"),once:l(()=>kw,"once"),openStdin:l(()=>rw,"openStdin"),pid:l(()=>yw,"pid"),platform:l(()=>I0,"platform"),ppid:l(()=>mw,"ppid"),prependListener:l(()=>Iw,"prependListener"),prependOnceListener:l(()=>Pw,"prependOnceListener"),reallyExit:l(()=>Y0,"reallyExit"),release:l(()=>z0,"release"),removeAllListeners:l(()=>Bw,"removeAllListeners"),removeListener:l(()=>Fw,"removeListener"),resourceUsage:l(()=>Q0,"resourceUsage"),setSourceMapsEnabled:l(()=>Ew,"setSourceMapsEnabled"),setUncaughtExceptionCaptureCallback:l(()=>aw,"setUncaughtExceptionCaptureCallback"),stderr:l(()=>dw,"stderr"),stdin:l(()=>pw,"stdin"),stdout:l(()=>hw,"stdout"),title:l(()=>B0,"title"),umask:l(()=>M0,"umask"),uptime:l(()=>T0,"uptime"),version:l(()=>L0,"version"),versions:l(()=>N0,"versions")});var J4=Qt(()=>{K4()}),bE=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.createProcess=f;var i=e(()=>{if(typeof process<"u")return process;try{return J4(),cr($I)}catch{return}},"maybeReturnProcess");function f(){let g=i()||{};return g.cwd||(g.cwd=()=>"/"),g.emitWarning||(g.emitWarning=(o,n)=>{console.warn(`${n}${n?": ":""}${o}`)}),g.env||(g.env={}),g}l(f,"kS"),e(f,"createProcess"),a.default=f()}),WI=Ge(a=>{"use strict";var _;Object.defineProperty(a,"__esModule",{value:!0}),a.Node=void 0;var i=DI(),f=bE(),g=ka(),o=Dn(),{S_IFMT:n,S_IFDIR:r,S_IFREG:u,S_IFLNK:p,S_IFCHR:h}=o.constants,d=e(()=>f.default.getuid?.()??0,"getuid"),m=e(()=>f.default.getgid?.()??0,"getgid"),y=(_=class{constructor(T,O=438){this.changes=new i.FanOut,this._uid=d(),this._gid=m(),this._atime=new Date,this._mtime=new Date,this._ctime=new Date,this.rdev=0,this._nlink=1,this.mode=O,this.ino=T}set ctime(T){this._ctime=T}get ctime(){return this._ctime}set uid(T){this._uid=T,this.ctime=new Date}get uid(){return this._uid}set gid(T){this._gid=T,this.ctime=new Date}get gid(){return this._gid}set atime(T){this._atime=T}get atime(){return this._atime}set mtime(T){this._mtime=T,this.ctime=new Date}get mtime(){return this._mtime}get perm(){return this.mode&~n}set perm(T){this.mode=this.mode&n|T&~n,this.ctime=new Date}set nlink(T){this._nlink=T,this.ctime=new Date}get nlink(){return this._nlink}getString(T="utf8"){return this.atime=new Date,this.getBuffer().toString(T)}setString(T){this.buf=(0,g.bufferFrom)(T,"utf8"),this.touch()}getBuffer(){return this.atime=new Date,this.buf||(this.buf=(0,g.bufferAllocUnsafe)(0)),(0,g.bufferFrom)(this.buf)}setBuffer(T){this.buf=(0,g.bufferFrom)(T),this.touch()}getSize(){return this.buf?this.buf.length:0}setModeProperty(T){this.mode=T}isFile(){return(this.mode&n)===u}isDirectory(){return(this.mode&n)===r}isSymlink(){return(this.mode&n)===p}isCharacterDevice(){return(this.mode&n)===h}makeSymlink(T){this.mode=p|438,this.symlink=T}write(T,O=0,E=T.length,P=0){if(this.buf||(this.buf=(0,g.bufferAllocUnsafe)(0)),P+E>this.buf.length){let A=(0,g.bufferAllocUnsafe)(P+E);this.buf.copy(A,0,0,this.buf.length),this.buf=A}return T.copy(this.buf,P,O,O+E),this.touch(),E}read(T,O=0,E=T.byteLength,P=0){if(this.atime=new Date,this.buf||(this.buf=(0,g.bufferAllocUnsafe)(0)),P>=this.buf.length)return 0;let A=E;A>T.byteLength&&(A=T.byteLength),A+P>this.buf.length&&(A=this.buf.length-P);let x=T instanceof g.Buffer?T:g.Buffer.from(T.buffer,T.byteOffset,T.byteLength);return this.buf.copy(x,O,P,P+A),A}truncate(T=0){if(!T)this.buf=(0,g.bufferAllocUnsafe)(0);else if(this.buf||(this.buf=(0,g.bufferAllocUnsafe)(0)),T<=this.buf.length)this.buf=this.buf.slice(0,T);else{let O=(0,g.bufferAllocUnsafe)(T);this.buf.copy(O),O.fill(0,this.buf.length),this.buf=O}this.touch()}chmod(T){this.mode=this.mode&n|T&~n,this.touch()}chown(T,O){this.uid=T,this.gid=O,this.touch()}touch(){this.mtime=new Date,this.changes.emit(["modify"])}canRead(T=d(),O=m()){return!!(this.perm&4||O===this.gid&&this.perm&32||T===this.uid&&this.perm&256)}canWrite(T=d(),O=m()){return!!(this.perm&2||O===this.gid&&this.perm&16||T===this.uid&&this.perm&128)}canExecute(T=d(),O=m()){return!!(this.perm&1||O===this.gid&&this.perm&8||T===this.uid&&this.perm&64)}del(){this.changes.emit(["delete"])}toJSON(){return{ino:this.ino,uid:this.uid,gid:this.gid,atime:this.atime.getTime(),mtime:this.mtime.getTime(),ctime:this.ctime.getTime(),perm:this.perm,mode:this.mode,nlink:this.nlink,symlink:this.symlink,data:this.getString()}}},l(_,"Ny"),_);e(y,"Node");var w=y;a.Node=w}),zI=Ge(a=>{"use strict";var r;Object.defineProperty(a,"__esModule",{value:!0}),a.Link=void 0;var i=Dn(),f=DI(),{S_IFREG:g}=i.constants,o=(r=class{get steps(){return this._steps}set steps(p){this._steps=p;for(let[h,d]of this.children.entries())h==="."||h===".."||d?.syncSteps()}constructor(p,h,d){this.changes=new f.FanOut,this.children=new Map,this._steps=[],this.ino=0,this.length=0,this.vol=p,this.parent=h,this.name=d,this.syncSteps()}setNode(p){this.node=p,this.ino=p.ino}getNode(){return this.node}createChild(p,h=this.vol.createNode(g|438)){let d=new r(this.vol,this,p);return d.setNode(h),h.isDirectory()&&(d.children.set(".",d),d.getNode().nlink++),this.setChild(p,d),d}setChild(p,h=new r(this.vol,this,p)){return this.children.set(p,h),h.parent=this,this.length++,h.getNode().isDirectory()&&(h.children.set("..",this),this.getNode().nlink++),this.getNode().mtime=new Date,this.changes.emit(["child:add",h,this]),h}deleteChild(p){p.getNode().isDirectory()&&(p.children.delete(".."),this.getNode().nlink--),this.children.delete(p.getName()),this.length--,this.getNode().mtime=new Date,this.changes.emit(["child:del",p,this])}getChild(p){return this.getNode().atime=new Date,this.children.get(p)}getPath(){return this.steps.join("/")}getParentPath(){return this.steps.slice(0,-1).join("/")}getName(){return this.steps[this.steps.length-1]}toJSON(){return{steps:this.steps,ino:this.ino,children:Array.from(this.children.keys())}}syncSteps(){this.steps=this.parent?this.parent.steps.concat([this.name]):[this.name]}},l(r,"Ll"),r);e(o,"Link");var n=o;a.Link=n}),HI=Ge(a=>{"use strict";var n;Object.defineProperty(a,"__esModule",{value:!0}),a.File=void 0;var i=Dn(),{O_APPEND:f}=i.constants,g=(n=class{constructor(u,p,h,d){this.link=u,this.node=p,this.flags=h,this.fd=d,this.position=0,this.flags&f&&(this.position=this.getSize())}getString(u="utf8"){return this.node.getString()}setString(u){this.node.setString(u)}getBuffer(){return this.node.getBuffer()}setBuffer(u){this.node.setBuffer(u)}getSize(){return this.node.getSize()}truncate(u){this.node.truncate(u)}seekTo(u){this.position=u}write(u,p=0,h=u.length,d){typeof d!="number"&&(d=this.position);let m=this.node.write(u,p,h,d);return this.position=d+m,m}read(u,p=0,h=u.byteLength,d){typeof d!="number"&&(d=this.position);let m=this.node.read(u,p,h,d);return this.position=d+m,m}chmod(u){this.node.chmod(u)}chown(u,p){this.node.chown(u,p)}},l(n,"jy"),n);e(g,"File");var o=g;a.File=o}),gf=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.FLAGS=a.ERRSTR=void 0;var i=Dn();a.ERRSTR={PATH_STR:"path must be a string, Buffer, or Uint8Array",FD:"fd must be a file descriptor",MODE_INT:"mode must be an int",CB:"callback must be a function",UID:"uid must be an unsigned int",GID:"gid must be an unsigned int",LEN:"len must be an integer",ATIME:"atime must be an integer",MTIME:"mtime must be an integer",PREFIX:"filename prefix is required",BUFFER:"buffer must be an instance of Buffer or StaticBuffer",OFFSET:"offset must be an integer",LENGTH:"length must be an integer",POSITION:"position must be an integer"};var{O_RDONLY:f,O_WRONLY:g,O_RDWR:o,O_CREAT:n,O_EXCL:r,O_TRUNC:u,O_APPEND:p,O_SYNC:h}=i.constants,d;(function(m){m[m.r=f]="r",m[m["r+"]=o]="r+",m[m.rs=f|h]="rs",m[m.sr=m.rs]="sr",m[m["rs+"]=o|h]="rs+",m[m["sr+"]=m["rs+"]]="sr+",m[m.w=g|n|u]="w",m[m.wx=g|n|u|r]="wx",m[m.xw=m.wx]="xw",m[m["w+"]=o|n|u]="w+",m[m["wx+"]=o|n|u|r]="wx+",m[m["xw+"]=m["wx+"]]="xw+",m[m.a=g|p|n]="a",m[m.ax=g|p|n|r]="ax",m[m.xa=m.ax]="xa",m[m["a+"]=o|p|n]="a+",m[m["ax+"]=o|p|n|r]="ax+",m[m["xa+"]=m["ax+"]]="xa+"})(d||(a.FLAGS=d={}))}),qI=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default=typeof queueMicrotask=="function"?queueMicrotask:i=>Promise.resolve().then(()=>i()).catch(()=>{})}),vE=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.filenameToSteps=a.resolve=a.unixify=a.isWin=void 0,a.isFd=_,a.validateFd=S,a.dataToBuffer=T;var i=pf(),f=ka(),g=bE(),o=md(),n=gf();a.isWin=g.default.platform==="win32";var r=i.resolve,u=i.posix?i.posix.sep:i.sep,p=e((O,E)=>{let P=O[E];return E>0&&(P==="/"||a.isWin&&P==="\\")},"isSeparator"),h=e(O=>{let E=O.length-1;if(E<2)return O;for(;p(O,E);)E--;return O.substr(0,E+1)},"removeTrailingSeparator"),d=e((O,E)=>{if(typeof O!="string")throw new TypeError("expected a string");return O=O.replace(/[\\\/]+/g,"/"),E!==!1&&(O=h(O)),O},"normalizePath"),m=e((O,E=!0)=>a.isWin?(O=d(O,E),O.replace(/^([a-zA-Z]+:|\.\/)/,"")):O,"unixify");a.unixify=m;var y=e((O,E=g.default.cwd())=>r(E,O),"resolve");if(a.resolve=y,a.isWin){let O=y;a.resolve=y=e((E,P)=>(0,a.unixify)(O(E,P)),"resolve")}var w=e((O,E)=>{let P=y(O,E).substring(1);return P?P.split(u):[]},"filenameToSteps");a.filenameToSteps=w;function _(O){return O>>>0===O}l(_,"MS"),e(_,"isFd");function S(O){if(!_(O))throw TypeError(n.ERRSTR.FD)}l(S,"r3"),e(S,"validateFd");function T(O,E=o.ENCODING_UTF8){return f.Buffer.isBuffer(O)?O:O instanceof Uint8Array?(0,f.bufferFrom)(O):E==="buffer"?(0,f.bufferFrom)(String(O),"utf8"):(0,f.bufferFrom)(String(O),E)}l(T,"n3"),e(T,"dataToBuffer")});function aO(){if(Nw)return Tu;Nw=!0;let a=2147483647,i=36,f=1,g=26,o=38,n=700,r=72,u=128,p="-",h=/^xn--/,d=/[^\0-\x7F]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=i-f,_=Math.floor,S=String.fromCharCode;function T(q){throw new RangeError(y[q])}l(T,"b"),e(T,"error");function O(q,G){let re=[],ae=q.length;for(;ae--;)re[ae]=G(q[ae]);return re}l(O,"E"),e(O,"map");function E(q,G){let re=q.split("@"),ae="";re.length>1&&(ae=re[0]+"@",q=re[1]),q=q.replace(m,".");let de=q.split("."),we=O(de,G).join(".");return ae+we}l(E,"R"),e(E,"mapDomain");function P(q){let G=[],re=0,ae=q.length;for(;re<ae;){let de=q.charCodeAt(re++);if(de>=55296&&de<=56319&&re<ae){let we=q.charCodeAt(re++);(we&64512)==56320?G.push(((de&1023)<<10)+(we&1023)+65536):(G.push(de),re--)}else G.push(de)}return G}l(P,"T"),e(P,"ucs2decode");let A=e(q=>String.fromCodePoint(...q),"ucs2encode"),x=e(function(q){return q>=48&&q<58?26+(q-48):q>=65&&q<91?q-65:q>=97&&q<123?q-97:i},"basicToDigit"),U=e(function(q,G){return q+22+75*(q<26)-((G!=0)<<5)},"digitToBasic"),M=e(function(q,G,re){let ae=0;for(q=re?_(q/n):q>>1,q+=_(q/G);q>w*g>>1;ae+=i)q=_(q/w);return _(ae+(w+1)*q/(q+o))},"adapt"),ee=e(function(q){let G=[],re=q.length,ae=0,de=u,we=r,xe=q.lastIndexOf(p);xe<0&&(xe=0);for(let Pe=0;Pe<xe;++Pe)q.charCodeAt(Pe)>=128&&T("not-basic"),G.push(q.charCodeAt(Pe));for(let Pe=xe>0?xe+1:0;Pe<re;){let se=ae;for(let J=1,ue=i;;ue+=i){Pe>=re&&T("invalid-input");let te=x(q.charCodeAt(Pe++));te>=i&&T("invalid-input"),te>_((a-ae)/J)&&T("overflow"),ae+=te*J;let X=ue<=we?f:ue>=we+g?g:ue-we;if(te<X)break;let ye=i-X;J>_(a/ye)&&T("overflow"),J*=ye}let Te=G.length+1;we=M(ae-se,Te,se==0),_(ae/Te)>a-de&&T("overflow"),de+=_(ae/Te),ae%=Te,G.splice(ae++,0,de)}return String.fromCodePoint(...G)},"decode2"),V=e(function(q){let G=[];q=P(q);let re=q.length,ae=u,de=0,we=r;for(let se of q)se<128&&G.push(S(se));let xe=G.length,Pe=xe;for(xe&&G.push(p);Pe<re;){let se=a;for(let J of q)J>=ae&&J<se&&(se=J);let Te=Pe+1;se-ae>_((a-de)/Te)&&T("overflow"),de+=(se-ae)*Te,ae=se;for(let J of q)if(J<ae&&++de>a&&T("overflow"),J===ae){let ue=de;for(let te=i;;te+=i){let X=te<=we?f:te>=we+g?g:te-we;if(ue<X)break;let ye=ue-X,Re=i-X;G.push(S(U(X+ye%Re,0))),ue=_(ye/Re)}G.push(S(U(ue,0))),we=M(de,Te,Pe===xe),de=0,++Pe}++de,++ae}return G.join("")},"encode2");return Tu={version:"2.3.1",ucs2:{decode:P,encode:A},decode:ee,encode:V,toASCII:e(function(q){return E(q,function(G){return d.test(G)?"xn--"+V(G):G})},"toASCII2"),toUnicode:e(function(q){return E(q,function(G){return h.test(G)?ee(G.slice(4).toLowerCase()):G})},"toUnicode2")},Tu}l(aO,"i3");function GI(){return Uw||(Uw=!0,Dw=e(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var a={},i=Symbol("test"),f=Object(i);if(typeof i=="string"||Object.prototype.toString.call(i)!=="[object Symbol]"||Object.prototype.toString.call(f)!=="[object Symbol]")return!1;var g=42;a[i]=g;for(i in a)return!1;if(typeof Object.keys=="function"&&Object.keys(a).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(a).length!==0)return!1;var o=Object.getOwnPropertySymbols(a);if(o.length!==1||o[0]!==i||!Object.prototype.propertyIsEnumerable.call(a,i))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var n=Object.getOwnPropertyDescriptor(a,i);if(n.value!==g||n.enumerable!==!0)return!1}return!0},"hasSymbols")),Dw}l(GI,"o3");function VI(){return $w||($w=!0,Mw=Error),Mw}l(VI,"a3");function KI(){return zw||(zw=!0,Ww=EvalError),Ww}l(KI,"s3");function JI(){return qw||(qw=!0,Hw=RangeError),Hw}l(JI,"l3");function YI(){return Vw||(Vw=!0,Gw=ReferenceError),Gw}l(YI,"f3");function _E(){return Jw||(Jw=!0,Kw=SyntaxError),Kw}l(_E,"wA");function Vs(){return Zw||(Zw=!0,Yw=TypeError),Yw}l(Vs,"Dl");function ZI(){return Xw||(Xw=!0,Qw=URIError),Qw}l(ZI,"u3");function QI(){if(eb)return Fu;eb=!0;var a=typeof Symbol<"u"&&Symbol,i=GI();return Fu=e(function(){return typeof a!="function"||typeof Symbol!="function"||typeof a("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:i()},"hasNativeSymbols"),Fu}l(QI,"c3");function XI(){if(tb)return Bu;tb=!0;var a={__proto__:null,foo:{}},i=Object;return Bu=e(function(){return{__proto__:a}.foo===a.foo&&!(a instanceof i)},"hasProto"),Bu}l(XI,"h3");function e6(){if(rb)return xu;rb=!0;var a="Function.prototype.bind called on incompatible ",i=Object.prototype.toString,f=Math.max,g="[object Function]",o=e(function(u,p){for(var h=[],d=0;d<u.length;d+=1)h[d]=u[d];for(var m=0;m<p.length;m+=1)h[m+u.length]=p[m];return h},"concatty2"),n=e(function(u,p){for(var h=[],d=p,m=0;d<u.length;d+=1,m+=1)h[m]=u[d];return h},"slicy2"),r=e(function(u,p){for(var h="",d=0;d<u.length;d+=1)h+=u[d],d+1<u.length&&(h+=p);return h},"joiny");return xu=e(function(u){var p=this;if(typeof p!="function"||i.apply(p)!==g)throw new TypeError(a+p);for(var h=n(arguments,1),d,m=e(function(){if(this instanceof d){var T=p.apply(this,o(h,arguments));return Object(T)===T?T:this}return p.apply(u,o(h,arguments))},"binder"),y=f(0,p.length-h.length),w=[],_=0;_<y;_++)w[_]="$"+_;if(d=Function("binder","return function ("+r(w,",")+"){ return binder.apply(this,arguments); }")(m),p.prototype){var S=e(function(){},"Empty2");S.prototype=p.prototype,d.prototype=new S,S.prototype=null}return d},"bind"),xu}l(e6,"d3");function wd(){if(nb)return Iu;nb=!0;var a=e6();return Iu=Function.prototype.bind||a,Iu}l(wd,"Rm");function t6(){if(ib)return Pu;ib=!0;var a=Function.prototype.call,i=Object.prototype.hasOwnProperty,f=wd();return Pu=f.call(a,i),Pu}l(t6,"p3");function Ta(){if(ob)return ju;ob=!0;var a,i=VI(),f=KI(),g=JI(),o=YI(),n=_E(),r=Vs(),u=ZI(),p=Function,h=e(function(Pe){try{return p('"use strict"; return ('+Pe+").constructor;")()}catch{}},"getEvalledConstructor"),d=Object.getOwnPropertyDescriptor;if(d)try{d({},"")}catch{d=null}var m=e(function(){throw new r},"throwTypeError"),y=d?function(){try{return arguments.callee,m}catch{try{return d(arguments,"callee").get}catch{return m}}}():m,w=QI()(),_=XI()(),S=Object.getPrototypeOf||(_?function(Pe){return Pe.__proto__}:null),T={},O=typeof Uint8Array>"u"||!S?a:S(Uint8Array),E={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?a:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?a:ArrayBuffer,"%ArrayIteratorPrototype%":w&&S?S([][Symbol.iterator]()):a,"%AsyncFromSyncIteratorPrototype%":a,"%AsyncFunction%":T,"%AsyncGenerator%":T,"%AsyncGeneratorFunction%":T,"%AsyncIteratorPrototype%":T,"%Atomics%":typeof Atomics>"u"?a:Atomics,"%BigInt%":typeof BigInt>"u"?a:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?a:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?a:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?a:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":f,"%Float32Array%":typeof Float32Array>"u"?a:Float32Array,"%Float64Array%":typeof Float64Array>"u"?a:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?a:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":T,"%Int8Array%":typeof Int8Array>"u"?a:Int8Array,"%Int16Array%":typeof Int16Array>"u"?a:Int16Array,"%Int32Array%":typeof Int32Array>"u"?a:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w&&S?S(S([][Symbol.iterator]())):a,"%JSON%":typeof JSON=="object"?JSON:a,"%Map%":typeof Map>"u"?a:Map,"%MapIteratorPrototype%":typeof Map>"u"||!w||!S?a:S(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?a:Promise,"%Proxy%":typeof Proxy>"u"?a:Proxy,"%RangeError%":g,"%ReferenceError%":o,"%Reflect%":typeof Reflect>"u"?a:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?a:Set,"%SetIteratorPrototype%":typeof Set>"u"||!w||!S?a:S(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?a:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w&&S?S(""[Symbol.iterator]()):a,"%Symbol%":w?Symbol:a,"%SyntaxError%":n,"%ThrowTypeError%":y,"%TypedArray%":O,"%TypeError%":r,"%Uint8Array%":typeof Uint8Array>"u"?a:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?a:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?a:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?a:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?a:WeakMap,"%WeakRef%":typeof WeakRef>"u"?a:WeakRef,"%WeakSet%":typeof WeakSet>"u"?a:WeakSet};if(S)try{null.error}catch(Pe){var P=S(S(Pe));E["%Error.prototype%"]=P}var A=e(l(function Pe(se){var Te;if(se==="%AsyncFunction%")Te=h("async function () {}");else if(se==="%GeneratorFunction%")Te=h("function* () {}");else if(se==="%AsyncGeneratorFunction%")Te=h("async function* () {}");else if(se==="%AsyncGenerator%"){var J=Pe("%AsyncGeneratorFunction%");J&&(Te=J.prototype)}else if(se==="%AsyncIteratorPrototype%"){var ue=Pe("%AsyncGenerator%");ue&&S&&(Te=S(ue.prototype))}return E[se]=Te,Te},"pe"),"doEval2"),x={__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"]},U=wd(),M=t6(),ee=U.call(Function.call,Array.prototype.concat),V=U.call(Function.apply,Array.prototype.splice),q=U.call(Function.call,String.prototype.replace),G=U.call(Function.call,String.prototype.slice),re=U.call(Function.call,RegExp.prototype.exec),ae=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,de=/\\(\\)?/g,we=e(function(Pe){var se=G(Pe,0,1),Te=G(Pe,-1);if(se==="%"&&Te!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(Te==="%"&&se!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var J=[];return q(Pe,ae,function(ue,te,X,ye){J[J.length]=X?q(ye,de,"$1"):te||ue}),J},"stringToPath2"),xe=e(function(Pe,se){var Te=Pe,J;if(M(x,Te)&&(J=x[Te],Te="%"+J[0]+"%"),M(E,Te)){var ue=E[Te];if(ue===T&&(ue=A(Te)),typeof ue>"u"&&!se)throw new r("intrinsic "+Pe+" exists, but is not available. Please file an issue!");return{alias:J,name:Te,value:ue}}throw new n("intrinsic "+Pe+" does not exist!")},"getBaseIntrinsic2");return ju=e(function(Pe,se){if(typeof Pe!="string"||Pe.length===0)throw new r("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof se!="boolean")throw new r('"allowMissing" argument must be a boolean');if(re(/^%?[^%]*%?$/,Pe)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Te=we(Pe),J=Te.length>0?Te[0]:"",ue=xe("%"+J+"%",se),te=ue.name,X=ue.value,ye=!1,Re=ue.alias;Re&&(J=Re[0],V(Te,ee([0,1],Re)));for(var De=1,Y=!0;De<Te.length;De+=1){var H=Te[De],Q=G(H,0,1),fe=G(H,-1);if((Q==='"'||Q==="'"||Q==="`"||fe==='"'||fe==="'"||fe==="`")&&Q!==fe)throw new n("property names with quotes must have matching quotes");if((H==="constructor"||!Y)&&(ye=!0),J+="."+H,te="%"+J+"%",M(E,te))X=E[te];else if(X!=null){if(!(H in X)){if(!se)throw new r("base intrinsic for "+Pe+" exists, but the property is not available.");return}if(d&&De+1>=Te.length){var ve=d(X,H);Y=!!ve,Y&&"get"in ve&&!("originalValue"in ve.get)?X=ve.get:X=X[H]}else Y=M(X,H),X=X[H];Y&&!ye&&(E[te]=X)}}return X},"GetIntrinsic"),ju}l(Ta,"Ja");function bd(){if(ab)return Cu;ab=!0;var a=Ta(),i=a("%Object.defineProperty%",!0)||!1;if(i)try{i({},"a",{value:1})}catch{i=!1}return Cu=i,Cu}l(bd,"Tm");function EE(){if(sb)return Lu;sb=!0;var a=Ta(),i=a("%Object.getOwnPropertyDescriptor%",!0);if(i)try{i([],"length")}catch{i=null}return Lu=i,Lu}l(EE,"vA");function r6(){if(lb)return Nu;lb=!0;var a=bd(),i=_E(),f=Vs(),g=EE();return Nu=e(function(o,n,r){if(!o||typeof o!="object"&&typeof o!="function")throw new f("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new f("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new f("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new f("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new f("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new f("`loose`, if provided, must be a boolean");var u=arguments.length>3?arguments[3]:null,p=arguments.length>4?arguments[4]:null,h=arguments.length>5?arguments[5]:null,d=arguments.length>6?arguments[6]:!1,m=!!g&&g(o,n);if(a)a(o,n,{configurable:h===null&&m?m.configurable:!h,enumerable:u===null&&m?m.enumerable:!u,value:r,writable:p===null&&m?m.writable:!p});else if(d||!u&&!p&&!h)o[n]=r;else throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},"defineDataProperty"),Nu}l(r6,"y3");function n6(){if(fb)return Du;fb=!0;var a=bd(),i=e(function(){return!!a},"hasPropertyDescriptors2");return i.hasArrayLengthDefineBug=e(function(){if(!a)return null;try{return a([],"length",{value:1}).length!==1}catch{return!0}},"hasArrayLengthDefineBug"),Du=i,Du}l(n6,"m3");function i6(){if(ub)return Uu;ub=!0;var a=Ta(),i=r6(),f=n6()(),g=EE(),o=Vs(),n=a("%Math.floor%");return Uu=e(function(r,u){if(typeof r!="function")throw new o("`fn` is not a function");if(typeof u!="number"||u<0||u>4294967295||n(u)!==u)throw new o("`length` must be a positive 32-bit integer");var p=arguments.length>2&&!!arguments[2],h=!0,d=!0;if("length"in r&&g){var m=g(r,"length");m&&!m.configurable&&(h=!1),m&&!m.writable&&(d=!1)}return(h||d||!p)&&(f?i(r,"length",u,!0,!0):i(r,"length",u)),r},"setFunctionLength"),Uu}l(i6,"g3");function o6(){if(cb)return ms;cb=!0;var a=wd(),i=Ta(),f=i6(),g=Vs(),o=i("%Function.prototype.apply%"),n=i("%Function.prototype.call%"),r=i("%Reflect.apply%",!0)||a.call(n,o),u=bd(),p=i("%Math.max%");ms=e(function(d){if(typeof d!="function")throw new g("a function is required");var m=r(a,n,arguments);return f(m,1+p(0,d.length-(arguments.length-1)),!0)},"callBind");var h=e(function(){return r(a,o,arguments)},"applyBind2");return u?u(ms,"apply",{value:h}):ms.apply=h,ms}l(o6,"w3");function a6(){if(hb)return Mu;hb=!0;var a=Ta(),i=o6(),f=i(a("String.prototype.indexOf"));return Mu=e(function(g,o){var n=a(g,!!o);return typeof n=="function"&&f(g,".prototype.")>-1?i(n):n},"callBoundIntrinsic"),Mu}l(a6,"v3");function td(a){throw new Error("Node.js process "+a+" is not supported by JSPM core outside of Node.js")}l(td,"Fm");function s6(){!ga||!oa||(ga=!1,oa.length?In=oa.concat(In):zl=-1,In.length&&SE())}l(s6,"b3");function SE(){if(!ga){var a=setTimeout(s6,0);ga=!0;for(var i=In.length;i;){for(oa=In,In=[];++zl<i;)oa&&oa[zl].run();zl=-1,i=In.length}oa=null,ga=!1,clearTimeout(a)}}l(SE,"bA");function sO(a){var i=new Array(arguments.length-1);if(arguments.length>1)for(var f=1;f<arguments.length;f++)i[f-1]=arguments[f];In.push(new jw(a,i)),In.length===1&&!ga&&setTimeout(SE,0)}l(sO,"_3");function jw(a,i){this.fun=a,this.array=i}l(jw,"_A");function wr(){}l(wr,"Xt");function lO(a){td("_linkedBinding")}l(lO,"$3");function fO(a){td("dlopen")}l(fO,"H3");function uO(){return[]}l(uO,"W3");function cO(){return[]}l(cO,"q3");function hO(a,i){if(!a)throw new Error(i||"assertion error")}l(hO,"Q3");function dO(){return!1}l(dO,"nj");function pO(){return li.now()/1e3}l(pO,"bj");function Xf(a){var i=Math.floor((Date.now()-li.now())*.001),f=li.now()*.001,g=Math.floor(f)+i,o=Math.floor(f%1*1e9);return a&&(g=g-a[0],o=o-a[1],o<0&&(g--,o+=$u)),[g,o]}l(Xf,"Sm");function Jn(){return RE}l(Jn,"Ui");function gO(a){return[]}l(gO,"kj");function yO(){if(db)return Wu;db=!0;var a=RE;function i(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}l(i,"t"),e(i,"assertPath");function f(n,r){for(var u="",p=0,h=-1,d=0,m,y=0;y<=n.length;++y){if(y<n.length)m=n.charCodeAt(y);else{if(m===47)break;m=47}if(m===47){if(!(h===y-1||d===1))if(h!==y-1&&d===2){if(u.length<2||p!==2||u.charCodeAt(u.length-1)!==46||u.charCodeAt(u.length-2)!==46){if(u.length>2){var w=u.lastIndexOf("/");if(w!==u.length-1){w===-1?(u="",p=0):(u=u.slice(0,w),p=u.length-1-u.lastIndexOf("/")),h=y,d=0;continue}}else if(u.length===2||u.length===1){u="",p=0,h=y,d=0;continue}}r&&(u.length>0?u+="/..":u="..",p=2)}else u.length>0?u+="/"+n.slice(h+1,y):u=n.slice(h+1,y),p=y-h-1;h=y,d=0}else m===46&&d!==-1?++d:d=-1}return u}l(f,"r"),e(f,"normalizeStringPosix");function g(n,r){var u=r.dir||r.root,p=r.base||(r.name||"")+(r.ext||"");return u?u===r.root?u+p:u+n+p:p}l(g,"n"),e(g,"_format");var o={resolve:e(function(){for(var n="",r=!1,u,p=arguments.length-1;p>=-1&&!r;p--){var h;p>=0?h=arguments[p]:(u===void 0&&(u=a.cwd()),h=u),i(h),h.length!==0&&(n=h+"/"+n,r=h.charCodeAt(0)===47)}return n=f(n,!r),r?n.length>0?"/"+n:"/":n.length>0?n:"."},"resolve2"),normalize:e(function(n){if(i(n),n.length===0)return".";var r=n.charCodeAt(0)===47,u=n.charCodeAt(n.length-1)===47;return n=f(n,!r),n.length===0&&!r&&(n="."),n.length>0&&u&&(n+="/"),r?"/"+n:n},"normalize"),isAbsolute:e(function(n){return i(n),n.length>0&&n.charCodeAt(0)===47},"isAbsolute"),join:e(function(){if(arguments.length===0)return".";for(var n,r=0;r<arguments.length;++r){var u=arguments[r];i(u),u.length>0&&(n===void 0?n=u:n+="/"+u)}return n===void 0?".":o.normalize(n)},"join"),relative:e(function(n,r){if(i(n),i(r),n===r||(n=o.resolve(n),r=o.resolve(r),n===r))return"";for(var u=1;u<n.length&&n.charCodeAt(u)===47;++u);for(var p=n.length,h=p-u,d=1;d<r.length&&r.charCodeAt(d)===47;++d);for(var m=r.length,y=m-d,w=h<y?h:y,_=-1,S=0;S<=w;++S){if(S===w){if(y>w){if(r.charCodeAt(d+S)===47)return r.slice(d+S+1);if(S===0)return r.slice(d+S)}else h>w&&(n.charCodeAt(u+S)===47?_=S:S===0&&(_=0));break}var T=n.charCodeAt(u+S),O=r.charCodeAt(d+S);if(T!==O)break;T===47&&(_=S)}var E="";for(S=u+_+1;S<=p;++S)(S===p||n.charCodeAt(S)===47)&&(E.length===0?E+="..":E+="/..");return E.length>0?E+r.slice(d+_):(d+=_,r.charCodeAt(d)===47&&++d,r.slice(d))},"relative"),_makeLong:e(function(n){return n},"_makeLong"),dirname:e(function(n){if(i(n),n.length===0)return".";for(var r=n.charCodeAt(0),u=r===47,p=-1,h=!0,d=n.length-1;d>=1;--d)if(r=n.charCodeAt(d),r===47){if(!h){p=d;break}}else h=!1;return p===-1?u?"/":".":u&&p===1?"//":n.slice(0,p)},"dirname"),basename:e(function(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');i(n);var u=0,p=-1,h=!0,d;if(r!==void 0&&r.length>0&&r.length<=n.length){if(r.length===n.length&&r===n)return"";var m=r.length-1,y=-1;for(d=n.length-1;d>=0;--d){var w=n.charCodeAt(d);if(w===47){if(!h){u=d+1;break}}else y===-1&&(h=!1,y=d+1),m>=0&&(w===r.charCodeAt(m)?--m===-1&&(p=d):(m=-1,p=y))}return u===p?p=y:p===-1&&(p=n.length),n.slice(u,p)}else{for(d=n.length-1;d>=0;--d)if(n.charCodeAt(d)===47){if(!h){u=d+1;break}}else p===-1&&(h=!1,p=d+1);return p===-1?"":n.slice(u,p)}},"basename"),extname:e(function(n){i(n);for(var r=-1,u=0,p=-1,h=!0,d=0,m=n.length-1;m>=0;--m){var y=n.charCodeAt(m);if(y===47){if(!h){u=m+1;break}continue}p===-1&&(h=!1,p=m+1),y===46?r===-1?r=m:d!==1&&(d=1):r!==-1&&(d=-1)}return r===-1||p===-1||d===0||d===1&&r===p-1&&r===u+1?"":n.slice(r,p)},"extname"),format:e(function(n){if(n===null||typeof n!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof n);return g("/",n)},"format2"),parse:e(function(n){i(n);var r={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return r;var u=n.charCodeAt(0),p=u===47,h;p?(r.root="/",h=1):h=0;for(var d=-1,m=0,y=-1,w=!0,_=n.length-1,S=0;_>=h;--_){if(u=n.charCodeAt(_),u===47){if(!w){m=_+1;break}continue}y===-1&&(w=!1,y=_+1),u===46?d===-1?d=_:S!==1&&(S=1):d!==-1&&(S=-1)}return d===-1||y===-1||S===0||S===1&&d===y-1&&d===m+1?y!==-1&&(m===0&&p?r.base=r.name=n.slice(1,y):r.base=r.name=n.slice(m,y)):(m===0&&p?(r.name=n.slice(1,d),r.base=n.slice(1,y)):(r.name=n.slice(m,d),r.base=n.slice(m,y)),r.ext=n.slice(d,y)),m>0?r.dir=n.slice(0,m-1):p&&(r.dir="/"),r},"parse2"),sep:"/",delimiter:":",win32:null,posix:null};return o.posix=o,Wu=o,Wu}l(yO,"Bj");function l6(){if(gb)return zu;gb=!0;var a=typeof Map=="function"&&Map.prototype,i=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,f=a&&i&&typeof i.get=="function"?i.get:null,g=a&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,n=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,r=o&&n&&typeof n.get=="function"?n.get:null,u=o&&Set.prototype.forEach,p=typeof WeakMap=="function"&&WeakMap.prototype,h=p?WeakMap.prototype.has:null,d=typeof WeakSet=="function"&&WeakSet.prototype,m=d?WeakSet.prototype.has:null,y=typeof WeakRef=="function"&&WeakRef.prototype,w=y?WeakRef.prototype.deref:null,_=Boolean.prototype.valueOf,S=Object.prototype.toString,T=Function.prototype.toString,O=String.prototype.match,E=String.prototype.slice,P=String.prototype.replace,A=String.prototype.toUpperCase,x=String.prototype.toLowerCase,U=RegExp.prototype.test,M=Array.prototype.concat,ee=Array.prototype.join,V=Array.prototype.slice,q=Math.floor,G=typeof BigInt=="function"?BigInt.prototype.valueOf:null,re=Object.getOwnPropertySymbols,ae=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,de=typeof Symbol=="function"&&typeof Symbol.iterator=="object",we=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===de||!0)?Symbol.toStringTag:null,xe=Object.prototype.propertyIsEnumerable,Pe=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(Z){return Z.__proto__}:null);function se(Z,oe){if(Z===1/0||Z===-1/0||Z!==Z||Z&&Z>-1e3&&Z<1e3||U.call(/e/,oe))return oe;var Ae=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof Z=="number"){var le=Z<0?-q(-Z):q(Z);if(le!==Z){var Fe=String(le),ie=E.call(oe,Fe.length+1);return P.call(Fe,Ae,"$&_")+"."+P.call(P.call(ie,/([0-9]{3})/g,"$&_"),/_$/,"")}}return P.call(oe,Ae,"$&_")}l(se,"Q"),e(se,"addNumericSeparator");var Te=g6,J=Te.custom,ue=ve(J)?J:null;zu=e(l(function Z(oe,Ae,le,Fe){var ie=Ae||{};if(D(ie,"quoteStyle")&&ie.quoteStyle!=="single"&&ie.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(D(ie,"maxStringLength")&&(typeof ie.maxStringLength=="number"?ie.maxStringLength<0&&ie.maxStringLength!==1/0:ie.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Je=D(ie,"customInspect")?ie.customInspect:!0;if(typeof Je!="boolean"&&Je!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(D(ie,"indent")&&ie.indent!==null&&ie.indent!==" "&&!(parseInt(ie.indent,10)===ie.indent&&ie.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(D(ie,"numericSeparator")&&typeof ie.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var dt=ie.numericSeparator;if(typeof oe>"u")return"undefined";if(oe===null)return"null";if(typeof oe=="boolean")return oe?"true":"false";if(typeof oe=="string")return $e(oe,ie);if(typeof oe=="number"){if(oe===0)return 1/0/oe>0?"0":"-0";var W=String(oe);return dt?se(oe,W):W}if(typeof oe=="bigint"){var qe=String(oe)+"n";return dt?se(oe,qe):qe}var Ve=typeof ie.depth>"u"?5:ie.depth;if(typeof le>"u"&&(le=0),le>=Ve&&Ve>0&&typeof oe=="object")return ye(oe)?"[Array]":"[Object]";var pe=R(ie,le);if(typeof Fe>"u")Fe=[];else if(Oe(Fe,oe)>=0)return"[Circular]";function Le(Nt,Ut,dr){if(Ut&&(Fe=V.call(Fe),Fe.push(Ut)),dr){var el={depth:ie.depth};return D(ie,"quoteStyle")&&(el.quoteStyle=ie.quoteStyle),Z(Nt,el,le+1,Fe)}return Z(Nt,ie,le+1,Fe)}if(l(Le,"nr"),e(Le,"inspect"),typeof oe=="function"&&!De(oe)){var He=Ee(oe),me=j(oe,Le);return"[Function"+(He?": "+He:" (anonymous)")+"]"+(me.length>0?" { "+ee.call(me,", ")+" }":"")}if(ve(oe)){var Se=de?P.call(String(oe),/^(Symbol\(.*\))_[^)]*$/,"$1"):ae.call(oe);return typeof oe=="object"&&!de?t(Se):Se}if(Ce(oe)){for(var We="<"+x.call(String(oe.nodeName)),Qe=oe.attributes||[],lt=0;lt<Qe.length;lt++)We+=" "+Qe[lt].name+"="+te(X(Qe[lt].value),"double",ie);return We+=">",oe.childNodes&&oe.childNodes.length&&(We+="..."),We+="</"+x.call(String(oe.nodeName))+">",We}if(ye(oe)){if(oe.length===0)return"[]";var bt=j(oe,Le);return pe&&!v(bt)?"["+C(bt,pe)+"]":"[ "+ee.call(bt,", ")+" ]"}if(Y(oe)){var ht=j(oe,Le);return!("cause"in Error.prototype)&&"cause"in oe&&!xe.call(oe,"cause")?"{ ["+String(oe)+"] "+ee.call(M.call("[cause]: "+Le(oe.cause),ht),", ")+" }":ht.length===0?"["+String(oe)+"]":"{ ["+String(oe)+"] "+ee.call(ht,", ")+" }"}if(typeof oe=="object"&&Je){if(ue&&typeof oe[ue]=="function"&&Te)return Te(oe,{depth:Ve-le});if(Je!=="symbol"&&typeof oe.inspect=="function")return oe.inspect()}if(be(oe)){var Ot=[];return g&&g.call(oe,function(Nt,Ut){Ot.push(Le(Ut,oe,!0)+" => "+Le(Nt,oe))}),c("Map",f.call(oe),Ot,pe)}if(Ie(oe)){var zt=[];return u&&u.call(oe,function(Nt){zt.push(Le(Nt,oe))}),c("Set",r.call(oe),zt,pe)}if(ge(oe))return s("WeakMap");if(ke(oe))return s("WeakSet");if(Ne(oe))return s("WeakRef");if(Q(oe))return t(Le(Number(oe)));if(N(oe))return t(Le(G.call(oe)));if(fe(oe))return t(_.call(oe));if(H(oe))return t(Le(String(oe)));if(typeof window<"u"&&oe===window)return"{ [object Window] }";if(typeof globalThis<"u"&&oe===globalThis||typeof Hu<"u"&&oe===Hu)return"{ [object globalThis] }";if(!Re(oe)&&!De(oe)){var Wt=j(oe,Le),nr=Pe?Pe(oe)===Object.prototype:oe instanceof Object||oe.constructor===Object,Ar=oe instanceof Object?"":"null prototype",et=!nr&&we&&Object(oe)===oe&&we in oe?E.call(z(oe),8,-1):Ar?"Object":"",Xt=nr||typeof oe.constructor!="function"?"":oe.constructor.name?oe.constructor.name+" ":"",Ft=Xt+(et||Ar?"["+ee.call(M.call([],et||[],Ar||[]),": ")+"] ":"");return Wt.length===0?Ft+"{}":pe?Ft+"{"+C(Wt,pe)+"}":Ft+"{ "+ee.call(Wt,", ")+" }"}return String(oe)},"W"),"inspect_");function te(Z,oe,Ae){var le=(Ae.quoteStyle||oe)==="double"?'"':"'";return le+Z+le}l(te,"z"),e(te,"wrapQuotes");function X(Z){return P.call(String(Z),/"/g,""")}l(X,"V"),e(X,"quote");function ye(Z){return z(Z)==="[object Array]"&&(!we||!(typeof Z=="object"&&we in Z))}l(ye,"G"),e(ye,"isArray");function Re(Z){return z(Z)==="[object Date]"&&(!we||!(typeof Z=="object"&&we in Z))}l(Re,"fe"),e(Re,"isDate");function De(Z){return z(Z)==="[object RegExp]"&&(!we||!(typeof Z=="object"&&we in Z))}l(De,"be"),e(De,"isRegExp");function Y(Z){return z(Z)==="[object Error]"&&(!we||!(typeof Z=="object"&&we in Z))}l(Y,"D"),e(Y,"isError");function H(Z){return z(Z)==="[object String]"&&(!we||!(typeof Z=="object"&&we in Z))}l(H,"$"),e(H,"isString");function Q(Z){return z(Z)==="[object Number]"&&(!we||!(typeof Z=="object"&&we in Z))}l(Q,"H"),e(Q,"isNumber");function fe(Z){return z(Z)==="[object Boolean]"&&(!we||!(typeof Z=="object"&&we in Z))}l(fe,"te"),e(fe,"isBoolean");function ve(Z){if(de)return Z&&typeof Z=="object"&&Z instanceof Symbol;if(typeof Z=="symbol")return!0;if(!Z||typeof Z!="object"||!ae)return!1;try{return ae.call(Z),!0}catch{}return!1}l(ve,"oe"),e(ve,"isSymbol");function N(Z){if(!Z||typeof Z!="object"||!G)return!1;try{return G.call(Z),!0}catch{}return!1}l(N,"I"),e(N,"isBigInt");var I=Object.prototype.hasOwnProperty||function(Z){return Z in(this||Hu)};function D(Z,oe){return I.call(Z,oe)}l(D,"M"),e(D,"has");function z(Z){return S.call(Z)}l(z,"Y"),e(z,"toStr");function Ee(Z){if(Z.name)return Z.name;var oe=O.call(T.call(Z),/^function\s*([\w$]+)/);return oe?oe[1]:null}l(Ee,"ue"),e(Ee,"nameOf");function Oe(Z,oe){if(Z.indexOf)return Z.indexOf(oe);for(var Ae=0,le=Z.length;Ae<le;Ae++)if(Z[Ae]===oe)return Ae;return-1}l(Oe,"le"),e(Oe,"indexOf");function be(Z){if(!f||!Z||typeof Z!="object")return!1;try{f.call(Z);try{r.call(Z)}catch{return!0}return Z instanceof Map}catch{}return!1}l(be,"ee"),e(be,"isMap");function ge(Z){if(!h||!Z||typeof Z!="object")return!1;try{h.call(Z,h);try{m.call(Z,m)}catch{return!0}return Z instanceof WeakMap}catch{}return!1}l(ge,"ie"),e(ge,"isWeakMap");function Ne(Z){if(!w||!Z||typeof Z!="object")return!1;try{return w.call(Z),!0}catch{}return!1}l(Ne,"me"),e(Ne,"isWeakRef");function Ie(Z){if(!r||!Z||typeof Z!="object")return!1;try{r.call(Z);try{f.call(Z)}catch{return!0}return Z instanceof Set}catch{}return!1}l(Ie,"ye"),e(Ie,"isSet");function ke(Z){if(!m||!Z||typeof Z!="object")return!1;try{m.call(Z,m);try{h.call(Z,h)}catch{return!0}return Z instanceof WeakSet}catch{}return!1}l(ke,"ve"),e(ke,"isWeakSet");function Ce(Z){return!Z||typeof Z!="object"?!1:typeof HTMLElement<"u"&&Z instanceof HTMLElement?!0:typeof Z.nodeName=="string"&&typeof Z.getAttribute=="function"}l(Ce,"Me"),e(Ce,"isElement");function $e(Z,oe){if(Z.length>oe.maxStringLength){var Ae=Z.length-oe.maxStringLength,le="... "+Ae+" more character"+(Ae>1?"s":"");return $e(E.call(Z,0,oe.maxStringLength),oe)+le}var Fe=P.call(P.call(Z,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Ke);return te(Fe,"single",oe)}l($e,"Be"),e($e,"inspectString");function Ke(Z){var oe=Z.charCodeAt(0),Ae={8:"b",9:"t",10:"n",12:"f",13:"r"}[oe];return Ae?"\\"+Ae:"\\x"+(oe<16?"0":"")+A.call(oe.toString(16))}l(Ke,"Je"),e(Ke,"lowbyte");function t(Z){return"Object("+Z+")"}l(t,"p"),e(t,"markBoxed");function s(Z){return Z+" { ? }"}l(s,"l"),e(s,"weakCollectionOf");function c(Z,oe,Ae,le){var Fe=le?C(Ae,le):ee.call(Ae,", ");return Z+" ("+oe+") {"+Fe+"}"}l(c,"u"),e(c,"collectionOf");function v(Z){for(var oe=0;oe<Z.length;oe++)if(Oe(Z[oe],`
|
|
4
|
-
|
|
5
|
-
`+oe.prev+oe.base;return Ae+ee.call(Z,","+Ae)+`
|
|
6
|
-
`+oe.prev}l(C,"O"),e(C,"indentedJoin");function j(Z,oe){var Ae=ye(Z),le=[];if(Ae){le.length=Z.length;for(var Fe=0;Fe<Z.length;Fe++)le[Fe]=D(Z,Fe)?oe(Z[Fe],Z):""}var ie=typeof re=="function"?re(Z):[],Je;if(de){Je={};for(var dt=0;dt<ie.length;dt++)Je["$"+ie[dt]]=ie[dt]}for(var W in Z)D(Z,W)&&(Ae&&String(Number(W))===W&&W<Z.length||de&&Je["$"+W]instanceof Symbol||(U.call(/[^\w$]/,W)?le.push(oe(W,Z)+": "+oe(Z[W],Z)):le.push(W+": "+oe(Z[W],Z))));if(typeof re=="function")for(var qe=0;qe<ie.length;qe++)xe.call(Z,ie[qe])&&le.push("["+oe(ie[qe])+"]: "+oe(Z[ie[qe]],Z));return le}return l(j,"k"),e(j,"arrObjKeys"),zu}l(l6,"Lj");function f6(){if(yb)return qu;yb=!0;var a=Ta(),i=a6(),f=l6(),g=Vs(),o=a("%WeakMap%",!0),n=a("%Map%",!0),r=i("WeakMap.prototype.get",!0),u=i("WeakMap.prototype.set",!0),p=i("WeakMap.prototype.has",!0),h=i("Map.prototype.get",!0),d=i("Map.prototype.set",!0),m=i("Map.prototype.has",!0),y=e(function(T,O){for(var E=T,P;(P=E.next)!==null;E=P)if(P.key===O)return E.next=P.next,P.next=T.next,T.next=P,P},"listGetNode"),w=e(function(T,O){var E=y(T,O);return E&&E.value},"listGet"),_=e(function(T,O,E){var P=y(T,O);P?P.value=E:T.next={key:O,next:T.next,value:E}},"listSet"),S=e(function(T,O){return!!y(T,O)},"listHas");return qu=e(function(){var T,O,E,P={assert:e(function(A){if(!P.has(A))throw new g("Side channel does not contain "+f(A))},"assert"),get:e(function(A){if(o&&A&&(typeof A=="object"||typeof A=="function")){if(T)return r(T,A)}else if(n){if(O)return h(O,A)}else if(E)return w(E,A)},"get"),has:e(function(A){if(o&&A&&(typeof A=="object"||typeof A=="function")){if(T)return p(T,A)}else if(n){if(O)return m(O,A)}else if(E)return S(E,A);return!1},"has"),set:e(function(A,x){o&&A&&(typeof A=="object"||typeof A=="function")?(T||(T=new o),u(T,A,x)):n?(O||(O=new n),d(O,A,x)):(E||(E={key:{},next:null}),_(E,A,x))},"set")};return P},"getSideChannel"),qu}l(f6,"Nj");function vd(){if(mb)return Gu;mb=!0;var a=String.prototype.replace,i=/%20/g,f={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Gu={default:f.RFC3986,formatters:{RFC1738:e(function(g){return a.call(g,i,"+")},"RFC1738"),RFC3986:e(function(g){return String(g)},"RFC3986")},RFC1738:f.RFC1738,RFC3986:f.RFC3986},Gu}l(vd,"Om");function AE(){if(wb)return Vu;wb=!0;var a=vd(),i=Object.prototype.hasOwnProperty,f=Array.isArray,g=function(){for(var T=[],O=0;O<256;++O)T.push("%"+((O<16?"0":"")+O.toString(16)).toUpperCase());return T}(),o=e(function(T){for(;T.length>1;){var O=T.pop(),E=O.obj[O.prop];if(f(E)){for(var P=[],A=0;A<E.length;++A)typeof E[A]<"u"&&P.push(E[A]);O.obj[O.prop]=P}}},"compactQueue2"),n=e(function(T,O){for(var E=O&&O.plainObjects?Object.create(null):{},P=0;P<T.length;++P)typeof T[P]<"u"&&(E[P]=T[P]);return E},"arrayToObject2"),r=e(l(function T(O,E,P){if(!E)return O;if(typeof E!="object"){if(f(O))O.push(E);else if(O&&typeof O=="object")(P&&(P.plainObjects||P.allowPrototypes)||!i.call(Object.prototype,E))&&(O[E]=!0);else return[O,E];return O}if(!O||typeof O!="object")return[O].concat(E);var A=O;return f(O)&&!f(E)&&(A=n(O,P)),f(O)&&f(E)?(E.forEach(function(x,U){if(i.call(O,U)){var M=O[U];M&&typeof M=="object"&&x&&typeof x=="object"?O[U]=T(M,x,P):O.push(x)}else O[U]=x}),O):Object.keys(E).reduce(function(x,U){var M=E[U];return i.call(x,U)?x[U]=T(x[U],M,P):x[U]=M,x},A)},"b"),"merge2"),u=e(function(T,O){return Object.keys(O).reduce(function(E,P){return E[P]=O[P],E},T)},"assignSingleSource"),p=e(function(T,O,E){var P=T.replace(/\+/g," ");if(E==="iso-8859-1")return P.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(P)}catch{return P}},"decode2"),h=1024,d=e(function(T,O,E,P,A){if(T.length===0)return T;var x=T;if(typeof T=="symbol"?x=Symbol.prototype.toString.call(T):typeof T!="string"&&(x=String(T)),E==="iso-8859-1")return escape(x).replace(/%u[0-9a-f]{4}/gi,function(re){return"%26%23"+parseInt(re.slice(2),16)+"%3B"});for(var U="",M=0;M<x.length;M+=h){for(var ee=x.length>=h?x.slice(M,M+h):x,V=[],q=0;q<ee.length;++q){var G=ee.charCodeAt(q);if(G===45||G===46||G===95||G===126||G>=48&&G<=57||G>=65&&G<=90||G>=97&&G<=122||A===a.RFC1738&&(G===40||G===41)){V[V.length]=ee.charAt(q);continue}if(G<128){V[V.length]=g[G];continue}if(G<2048){V[V.length]=g[192|G>>6]+g[128|G&63];continue}if(G<55296||G>=57344){V[V.length]=g[224|G>>12]+g[128|G>>6&63]+g[128|G&63];continue}q+=1,G=65536+((G&1023)<<10|ee.charCodeAt(q)&1023),V[V.length]=g[240|G>>18]+g[128|G>>12&63]+g[128|G>>6&63]+g[128|G&63]}U+=V.join("")}return U},"encode3"),m=e(function(T){for(var O=[{obj:{o:T},prop:"o"}],E=[],P=0;P<O.length;++P)for(var A=O[P],x=A.obj[A.prop],U=Object.keys(x),M=0;M<U.length;++M){var ee=U[M],V=x[ee];typeof V=="object"&&V!==null&&E.indexOf(V)===-1&&(O.push({obj:x,prop:ee}),E.push(V))}return o(O),T},"compact2"),y=e(function(T){return Object.prototype.toString.call(T)==="[object RegExp]"},"isRegExp2"),w=e(function(T){return!T||typeof T!="object"?!1:!!(T.constructor&&T.constructor.isBuffer&&T.constructor.isBuffer(T))},"isBuffer2"),_=e(function(T,O){return[].concat(T,O)},"combine2"),S=e(function(T,O){if(f(T)){for(var E=[],P=0;P<T.length;P+=1)E.push(O(T[P]));return E}return O(T)},"maybeMap2");return Vu={arrayToObject:n,assign:u,combine:_,compact:m,decode:p,encode:d,isBuffer:w,isRegExp:y,maybeMap:S,merge:r},Vu}l(AE,"SA");function u6(){if(bb)return Ku;bb=!0;var a=f6(),i=AE(),f=vd(),g=Object.prototype.hasOwnProperty,o={brackets:e(function(S){return S+"[]"},"brackets"),comma:"comma",indices:e(function(S,T){return S+"["+T+"]"},"indices"),repeat:e(function(S){return S},"repeat")},n=Array.isArray,r=Array.prototype.push,u=e(function(S,T){r.apply(S,n(T)?T:[T])},"pushToArray"),p=Date.prototype.toISOString,h=f.default,d={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:i.encode,encodeValuesOnly:!1,format:h,formatter:f.formatters[h],indices:!1,serializeDate:e(function(S){return p.call(S)},"serializeDate"),skipNulls:!1,strictNullHandling:!1},m=e(function(S){return typeof S=="string"||typeof S=="number"||typeof S=="boolean"||typeof S=="symbol"||typeof S=="bigint"},"isNonNullishPrimitive2"),y={},w=e(l(function S(T,O,E,P,A,x,U,M,ee,V,q,G,re,ae,de,we,xe,Pe){for(var se=T,Te=Pe,J=0,ue=!1;(Te=Te.get(y))!==void 0&&!ue;){var te=Te.get(T);if(J+=1,typeof te<"u"){if(te===J)throw new RangeError("Cyclic object value");ue=!0}typeof Te.get(y)>"u"&&(J=0)}if(typeof V=="function"?se=V(O,se):se instanceof Date?se=re(se):E==="comma"&&n(se)&&(se=i.maybeMap(se,function(z){return z instanceof Date?re(z):z})),se===null){if(x)return ee&&!we?ee(O,d.encoder,xe,"key",ae):O;se=""}if(m(se)||i.isBuffer(se)){if(ee){var X=we?O:ee(O,d.encoder,xe,"key",ae);return[de(X)+"="+de(ee(se,d.encoder,xe,"value",ae))]}return[de(O)+"="+de(String(se))]}var ye=[];if(typeof se>"u")return ye;var Re;if(E==="comma"&&n(se))we&&ee&&(se=i.maybeMap(se,ee)),Re=[{value:se.length>0?se.join(",")||null:void 0}];else if(n(V))Re=V;else{var De=Object.keys(se);Re=q?De.sort(q):De}var Y=M?O.replace(/\./g,"%2E"):O,H=P&&n(se)&&se.length===1?Y+"[]":Y;if(A&&n(se)&&se.length===0)return H+"[]";for(var Q=0;Q<Re.length;++Q){var fe=Re[Q],ve=typeof fe=="object"&&typeof fe.value<"u"?fe.value:se[fe];if(!(U&&ve===null)){var N=G&&M?fe.replace(/\./g,"%2E"):fe,I=n(se)?typeof E=="function"?E(H,N):H:H+(G?"."+N:"["+N+"]");Pe.set(T,J);var D=a();D.set(y,Pe),u(ye,S(ve,I,E,P,A,x,U,M,E==="comma"&&we&&n(se)?null:ee,V,q,G,re,ae,de,we,xe,D))}}return ye},"_"),"stringify2"),_=e(function(S){if(!S)return d;if(typeof S.allowEmptyArrays<"u"&&typeof S.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof S.encodeDotInKeys<"u"&&typeof S.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(S.encoder!==null&&typeof S.encoder<"u"&&typeof S.encoder!="function")throw new TypeError("Encoder has to be a function.");var T=S.charset||d.charset;if(typeof S.charset<"u"&&S.charset!=="utf-8"&&S.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var O=f.default;if(typeof S.format<"u"){if(!g.call(f.formatters,S.format))throw new TypeError("Unknown format option provided.");O=S.format}var E=f.formatters[O],P=d.filter;(typeof S.filter=="function"||n(S.filter))&&(P=S.filter);var A;if(S.arrayFormat in o?A=S.arrayFormat:"indices"in S?A=S.indices?"indices":"repeat":A=d.arrayFormat,"commaRoundTrip"in S&&typeof S.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var x=typeof S.allowDots>"u"?S.encodeDotInKeys===!0?!0:d.allowDots:!!S.allowDots;return{addQueryPrefix:typeof S.addQueryPrefix=="boolean"?S.addQueryPrefix:d.addQueryPrefix,allowDots:x,allowEmptyArrays:typeof S.allowEmptyArrays=="boolean"?!!S.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:A,charset:T,charsetSentinel:typeof S.charsetSentinel=="boolean"?S.charsetSentinel:d.charsetSentinel,commaRoundTrip:S.commaRoundTrip,delimiter:typeof S.delimiter>"u"?d.delimiter:S.delimiter,encode:typeof S.encode=="boolean"?S.encode:d.encode,encodeDotInKeys:typeof S.encodeDotInKeys=="boolean"?S.encodeDotInKeys:d.encodeDotInKeys,encoder:typeof S.encoder=="function"?S.encoder:d.encoder,encodeValuesOnly:typeof S.encodeValuesOnly=="boolean"?S.encodeValuesOnly:d.encodeValuesOnly,filter:P,format:O,formatter:E,serializeDate:typeof S.serializeDate=="function"?S.serializeDate:d.serializeDate,skipNulls:typeof S.skipNulls=="boolean"?S.skipNulls:d.skipNulls,sort:typeof S.sort=="function"?S.sort:null,strictNullHandling:typeof S.strictNullHandling=="boolean"?S.strictNullHandling:d.strictNullHandling}},"normalizeStringifyOptions2");return Ku=e(function(S,T){var O=S,E=_(T),P,A;typeof E.filter=="function"?(A=E.filter,O=A("",O)):n(E.filter)&&(A=E.filter,P=A);var x=[];if(typeof O!="object"||O===null)return"";var U=o[E.arrayFormat],M=U==="comma"&&E.commaRoundTrip;P||(P=Object.keys(O)),E.sort&&P.sort(E.sort);for(var ee=a(),V=0;V<P.length;++V){var q=P[V];E.skipNulls&&O[q]===null||u(x,w(O[q],q,U,M,E.allowEmptyArrays,E.strictNullHandling,E.skipNulls,E.encodeDotInKeys,E.encode?E.encoder:null,E.filter,E.sort,E.allowDots,E.serializeDate,E.format,E.formatter,E.encodeValuesOnly,E.charset,ee))}var G=x.join(E.delimiter),re=E.addQueryPrefix===!0?"?":"";return E.charsetSentinel&&(E.charset==="iso-8859-1"?re+="utf8=%26%2310003%3B&":re+="utf8=%E2%9C%93&"),G.length>0?re+G:""},"exports$42"),Ku}l(u6,"Dj");function c6(){if(vb)return Ju;vb=!0;var a=AE(),i=Object.prototype.hasOwnProperty,f=Array.isArray,g={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:a.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},o=e(function(y){return y.replace(/&#(\d+);/g,function(w,_){return String.fromCharCode(parseInt(_,10))})},"interpretNumericEntities"),n=e(function(y,w){return y&&typeof y=="string"&&w.comma&&y.indexOf(",")>-1?y.split(","):y},"parseArrayValue"),r="utf8=%26%2310003%3B",u="utf8=%E2%9C%93",p=e(function(y,w){var _={__proto__:null},S=w.ignoreQueryPrefix?y.replace(/^\?/,""):y;S=S.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var T=w.parameterLimit===1/0?void 0:w.parameterLimit,O=S.split(w.delimiter,T),E=-1,P,A=w.charset;if(w.charsetSentinel)for(P=0;P<O.length;++P)O[P].indexOf("utf8=")===0&&(O[P]===u?A="utf-8":O[P]===r&&(A="iso-8859-1"),E=P,P=O.length);for(P=0;P<O.length;++P)if(P!==E){var x=O[P],U=x.indexOf("]="),M=U===-1?x.indexOf("="):U+1,ee,V;M===-1?(ee=w.decoder(x,g.decoder,A,"key"),V=w.strictNullHandling?null:""):(ee=w.decoder(x.slice(0,M),g.decoder,A,"key"),V=a.maybeMap(n(x.slice(M+1),w),function(G){return w.decoder(G,g.decoder,A,"value")})),V&&w.interpretNumericEntities&&A==="iso-8859-1"&&(V=o(V)),x.indexOf("[]=")>-1&&(V=f(V)?[V]:V);var q=i.call(_,ee);q&&w.duplicates==="combine"?_[ee]=a.combine(_[ee],V):(!q||w.duplicates==="last")&&(_[ee]=V)}return _},"parseQueryStringValues"),h=e(function(y,w,_,S){for(var T=S?w:n(w,_),O=y.length-1;O>=0;--O){var E,P=y[O];if(P==="[]"&&_.parseArrays)E=_.allowEmptyArrays&&(T===""||_.strictNullHandling&&T===null)?[]:[].concat(T);else{E=_.plainObjects?Object.create(null):{};var A=P.charAt(0)==="["&&P.charAt(P.length-1)==="]"?P.slice(1,-1):P,x=_.decodeDotInKeys?A.replace(/%2E/g,"."):A,U=parseInt(x,10);!_.parseArrays&&x===""?E={0:T}:!isNaN(U)&&P!==x&&String(U)===x&&U>=0&&_.parseArrays&&U<=_.arrayLimit?(E=[],E[U]=T):x!=="__proto__"&&(E[x]=T)}T=E}return T},"parseObject"),d=e(function(y,w,_,S){if(y){var T=_.allowDots?y.replace(/\.([^.[]+)/g,"[$1]"):y,O=/(\[[^[\]]*])/,E=/(\[[^[\]]*])/g,P=_.depth>0&&O.exec(T),A=P?T.slice(0,P.index):T,x=[];if(A){if(!_.plainObjects&&i.call(Object.prototype,A)&&!_.allowPrototypes)return;x.push(A)}for(var U=0;_.depth>0&&(P=E.exec(T))!==null&&U<_.depth;){if(U+=1,!_.plainObjects&&i.call(Object.prototype,P[1].slice(1,-1))&&!_.allowPrototypes)return;x.push(P[1])}if(P){if(_.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+_.depth+" and strictDepth is true");x.push("["+T.slice(P.index)+"]")}return h(x,w,_,S)}},"parseQueryStringKeys"),m=e(function(y){if(!y)return g;if(typeof y.allowEmptyArrays<"u"&&typeof y.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof y.decodeDotInKeys<"u"&&typeof y.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(y.decoder!==null&&typeof y.decoder<"u"&&typeof y.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof y.charset<"u"&&y.charset!=="utf-8"&&y.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var w=typeof y.charset>"u"?g.charset:y.charset,_=typeof y.duplicates>"u"?g.duplicates:y.duplicates;if(_!=="combine"&&_!=="first"&&_!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var S=typeof y.allowDots>"u"?y.decodeDotInKeys===!0?!0:g.allowDots:!!y.allowDots;return{allowDots:S,allowEmptyArrays:typeof y.allowEmptyArrays=="boolean"?!!y.allowEmptyArrays:g.allowEmptyArrays,allowPrototypes:typeof y.allowPrototypes=="boolean"?y.allowPrototypes:g.allowPrototypes,allowSparse:typeof y.allowSparse=="boolean"?y.allowSparse:g.allowSparse,arrayLimit:typeof y.arrayLimit=="number"?y.arrayLimit:g.arrayLimit,charset:w,charsetSentinel:typeof y.charsetSentinel=="boolean"?y.charsetSentinel:g.charsetSentinel,comma:typeof y.comma=="boolean"?y.comma:g.comma,decodeDotInKeys:typeof y.decodeDotInKeys=="boolean"?y.decodeDotInKeys:g.decodeDotInKeys,decoder:typeof y.decoder=="function"?y.decoder:g.decoder,delimiter:typeof y.delimiter=="string"||a.isRegExp(y.delimiter)?y.delimiter:g.delimiter,depth:typeof y.depth=="number"||y.depth===!1?+y.depth:g.depth,duplicates:_,ignoreQueryPrefix:y.ignoreQueryPrefix===!0,interpretNumericEntities:typeof y.interpretNumericEntities=="boolean"?y.interpretNumericEntities:g.interpretNumericEntities,parameterLimit:typeof y.parameterLimit=="number"?y.parameterLimit:g.parameterLimit,parseArrays:y.parseArrays!==!1,plainObjects:typeof y.plainObjects=="boolean"?y.plainObjects:g.plainObjects,strictDepth:typeof y.strictDepth=="boolean"?!!y.strictDepth:g.strictDepth,strictNullHandling:typeof y.strictNullHandling=="boolean"?y.strictNullHandling:g.strictNullHandling}},"normalizeParseOptions2");return Ju=e(function(y,w){var _=m(w);if(y===""||y===null||typeof y>"u")return _.plainObjects?Object.create(null):{};for(var S=typeof y=="string"?p(y,_):y,T=_.plainObjects?Object.create(null):{},O=Object.keys(S),E=0;E<O.length;++E){var P=O[E],A=d(P,S[P],_,typeof y=="string");T=a.merge(T,A,_)}return _.allowSparse===!0?T:a.compact(T)},"exports$32"),Ju}l(c6,"$j");function h6(){if(_b)return Yu;_b=!0;var a=u6(),i=c6(),f=vd();return Yu={formats:f,parse:i,stringify:a},Yu}l(h6,"Mj");function mO(){if(Eb)return Ni;Eb=!0;var a=Li;function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}l(i,"t"),e(i,"Url2");var f=/^([a-z0-9.+-]+:)/i,g=/:[0-9]*$/,o=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,n=["<",">",'"',"`"," ","\r",`
|
|
7
|
-
|
|
8
|
-
`)&&(i=i.replace(F6,"%0A")),i.includes("\r")&&(i=i.replace(B6,"%0D")),i.includes(" ")&&(i=i.replace(x6,"%09")),g.pathname=i,g}l(Lw,"RA");var Tu,Nw,Li,Y4,Z4,Q4,X4,eL,tL,Dw,Uw,Mw,$w,Ww,zw,Hw,qw,Gw,Vw,Kw,Jw,Yw,Zw,Qw,Xw,Fu,eb,Bu,tb,xu,rb,Iu,nb,Pu,ib,ju,ob,Cu,ab,Lu,sb,Nu,lb,Du,fb,Uu,ub,ms,cb,Mu,hb,In,ga,oa,zl,wO,bO,vO,_O,EO,SO,AO,RO,OO,kO,TO,FO,BO,xO,IO,PO,jO,CO,LO,NO,DO,eu,UO,MO,$O,WO,zO,HO,qO,GO,VO,KO,JO,YO,ZO,QO,XO,ek,tk,rk,nk,ik,ok,ak,sk,lk,fk,li,uy,$u,uk,ck,hk,dk,pk,gk,yk,mk,wk,bk,vk,RE,Wu,db,pb,g6,zu,gb,Hu,qu,yb,Gu,mb,Vu,wb,Ku,bb,Ju,vb,Yu,_b,Ni,Eb,Tr,_k,y6,m6,w6,b6,v6,_6,E6,S6,A6,R6,rd,O6,k6,T6,F6,B6,x6,rL=Qt(()=>{Tu={},Nw=!1,e(aO,"dew"),Li=aO(),Y4=Li.decode,Z4=Li.encode,Q4=Li.toASCII,X4=Li.toUnicode,eL=Li.ucs2,tL=Li.version,Dw={},Uw=!1,e(GI,"dew$k"),Mw={},$w=!1,e(VI,"dew$j"),Ww={},zw=!1,e(KI,"dew$i"),Hw={},qw=!1,e(JI,"dew$h"),Gw={},Vw=!1,e(YI,"dew$g"),Kw={},Jw=!1,e(_E,"dew$f"),Yw={},Zw=!1,e(Vs,"dew$e"),Qw={},Xw=!1,e(ZI,"dew$d"),Fu={},eb=!1,e(QI,"dew$c"),Bu={},tb=!1,e(XI,"dew$b"),xu={},rb=!1,e(e6,"dew$a"),Iu={},nb=!1,e(wd,"dew$9"),Pu={},ib=!1,e(t6,"dew$8"),ju={},ob=!1,e(Ta,"dew$7"),Cu={},ab=!1,e(bd,"dew$6"),Lu={},sb=!1,e(EE,"dew$5"),Nu={},lb=!1,e(r6,"dew$4"),Du={},fb=!1,e(n6,"dew$3"),Uu={},ub=!1,e(i6,"dew$2"),ms={},cb=!1,e(o6,"dew$1"),Mu={},hb=!1,e(a6,"dew2"),e(td,"unimplemented"),In=[],ga=!1,zl=-1,e(s6,"cleanUpNextTick"),e(SE,"drainQueue"),e(sO,"nextTick"),e(jw,"Item"),jw.prototype.run=function(){this.fun.apply(null,this.array)},wO="browser",bO="x64",vO="browser",_O={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},EO=["/usr/bin/node"],SO=[],AO="v16.8.0",RO={},OO=e(function(a,i){console.warn((i?i+": ":"")+a)},"emitWarning"),kO=e(function(a){td("binding")},"binding"),TO=e(function(a){return 0},"umask"),FO=e(function(){return"/"},"cwd"),BO=e(function(a){},"chdir"),xO={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},e(wr,"noop"),IO=wr,PO=[],e(lO,"_linkedBinding"),jO={},CO=!1,LO={},e(fO,"dlopen"),e(uO,"_getActiveRequests"),e(cO,"_getActiveHandles"),NO=wr,DO=wr,eu=e(function(){return{}},"cpuUsage"),UO=eu,MO=eu,$O=wr,WO=wr,zO=wr,HO={},e(hO,"assert"),qO={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},GO=wr,VO=wr,e(dO,"hasUncaughtExceptionCaptureCallback"),KO=wr,JO=wr,YO=wr,ZO=wr,QO=wr,XO=void 0,ek=void 0,tk=void 0,rk=wr,nk=2,ik=1,ok="/bin/usr/node",ak=9229,sk="node",lk=[],fk=wr,li={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},li.now===void 0&&(uy=Date.now(),li.timing&&li.timing.navigationStart&&(uy=li.timing.navigationStart),li.now=()=>Date.now()-uy),e(pO,"uptime"),$u=1e9,e(Xf,"hrtime"),Xf.bigint=function(a){var i=Xf(a);return typeof BigInt>"u"?i[0]*$u+i[1]:BigInt(i[0]*$u)+BigInt(i[1])},uk=10,ck={},hk=0,e(Jn,"on"),dk=Jn,pk=Jn,gk=Jn,yk=Jn,mk=Jn,wk=wr,bk=Jn,vk=Jn,e(gO,"listeners"),RE={version:AO,versions:RO,arch:bO,platform:vO,release:xO,_rawDebug:IO,moduleLoadList:PO,binding:kO,_linkedBinding:lO,_events:ck,_eventsCount:hk,_maxListeners:uk,on:Jn,addListener:dk,once:pk,off:gk,removeListener:yk,removeAllListeners:mk,emit:wk,prependListener:bk,prependOnceListener:vk,listeners:gO,domain:jO,_exiting:CO,config:LO,dlopen:fO,uptime:pO,_getActiveRequests:uO,_getActiveHandles:cO,reallyExit:NO,_kill:DO,cpuUsage:eu,resourceUsage:UO,memoryUsage:MO,kill:$O,exit:WO,openStdin:zO,allowedNodeEnvironmentFlags:HO,assert:hO,features:qO,_fatalExceptions:GO,setUncaughtExceptionCaptureCallback:VO,hasUncaughtExceptionCaptureCallback:dO,emitWarning:OO,nextTick:sO,_tickCallback:KO,_debugProcess:JO,_debugEnd:YO,_startProfilerIdleNotifier:ZO,_stopProfilerIdleNotifier:QO,stdout:XO,stdin:tk,stderr:ek,abort:rk,umask:TO,chdir:BO,cwd:FO,env:_O,title:wO,argv:EO,execArgv:SO,pid:nk,ppid:ik,execPath:ok,debugPort:ak,hrtime:Xf,argv0:sk,_preload_modules:lk,setSourceMapsEnabled:fk},Wu={},db=!1,e(yO,"dew3"),pb=yO(),g6=Object.freeze(Object.create(null)),zu={},gb=!1,Hu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(l6,"dew$72"),qu={},yb=!1,e(f6,"dew$62"),Gu={},mb=!1,e(vd,"dew$52"),Vu={},wb=!1,e(AE,"dew$42"),Ku={},bb=!1,e(u6,"dew$32"),Ju={},vb=!1,e(c6,"dew$22"),Yu={},_b=!1,e(h6,"dew$12"),Ni={},Eb=!1,e(mO,"dew4"),Tr=mO(),Tr.parse,Tr.resolve,Tr.resolveObject,Tr.format,Tr.Url,_k=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0,Tr.URL=typeof URL<"u"?URL:null,Tr.pathToFileURL=Lw,Tr.fileURLToPath=Cw,y6=Tr.Url,m6=Tr.format,w6=Tr.resolve,b6=Tr.resolveObject,v6=Tr.parse,_6=Tr.URL,E6=92,S6=47,A6=97,R6=122,rd=_k==="win32",O6=/\//g,k6=/%/g,T6=/\\/g,F6=/\n/g,B6=/\r/g,x6=/\t/g,e(Cw,"fileURLToPath"),e(d6,"getPathFromURLWin"),e(p6,"getPathFromURLPosix"),e(Lw,"pathToFileURL")}),OE={};nn(OE,{URL:l(()=>_6,"URL"),Url:l(()=>y6,"Url"),fileURLToPath:l(()=>Cw,"fileURLToPath"),format:l(()=>m6,"format"),parse:l(()=>v6,"parse"),pathToFileURL:l(()=>Lw,"pathToFileURL"),resolve:l(()=>w6,"resolve"),resolveObject:l(()=>b6,"resolveObject")});var I6=Qt(()=>{rL()}),Fa=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.getWriteSyncArgs=a.getWriteArgs=a.bufToUint8=void 0,a.promisify=r,a.validateCallback=u,a.modeToNumber=h,a.nullCheck=d,a.pathToFilename=y,a.createError=re,a.genRndStr6=ae,a.flagsToNumber=de,a.streamToBuffer=we,a.bufferToEncoding=Te,a.isReadableStream=J;var i=gf(),f=yd(),g=ka(),o=qI(),n=vE();function r(ue,te,X=ye=>ye){return(...ye)=>new Promise((Re,De)=>{ue[te].bind(ue)(...ye,(Y,H)=>Y?De(Y):Re(X(H)))})}l(r,"s4"),e(r,"promisify");function u(ue){if(typeof ue!="function")throw TypeError(i.ERRSTR.CB);return ue}l(u,"FA"),e(u,"validateCallback");function p(ue,te){if(typeof ue=="number")return ue;if(typeof ue=="string")return parseInt(ue,8);if(te)return h(te)}l(p,"l4"),e(p,"_modeToNumber");function h(ue,te){let X=p(ue,te);if(typeof X!="number"||isNaN(X))throw new TypeError(i.ERRSTR.MODE_INT);return X}l(h,"xA"),e(h,"modeToNumber");function d(ue,te){if((""+ue).indexOf("\0")!==-1){let X=new Error("Path must be a string without null bytes");if(X.code="ENOENT",typeof te!="function")throw X;return(0,o.default)(()=>{te(X)}),!1}return!0}l(d,"OA"),e(d,"nullCheck");function m(ue){if(ue.hostname!=="")throw new f.TypeError("ERR_INVALID_FILE_URL_HOST",process.platform);let te=ue.pathname;for(let X=0;X<te.length;X++)if(te[X]==="%"){let ye=te.codePointAt(X+2)|32;if(te[X+1]==="2"&&ye===102)throw new f.TypeError("ERR_INVALID_FILE_URL_PATH","must not include encoded / characters")}return decodeURIComponent(te)}l(m,"f4"),e(m,"getPathFromURLPosix");function y(ue){if(ue instanceof Uint8Array&&(ue=(0,g.bufferFrom)(ue)),typeof ue!="string"&&!g.Buffer.isBuffer(ue)){try{if(!(ue instanceof(I6(),cr(OE)).URL))throw new TypeError(i.ERRSTR.PATH_STR)}catch{throw new TypeError(i.ERRSTR.PATH_STR)}ue=m(ue)}let te=String(ue);return d(te),te}l(y,"u4"),e(y,"pathToFilename");var w="ENOENT",_="EBADF",S="EINVAL",T="EPERM",O="EPROTO",E="EEXIST",P="ENOTDIR",A="EMFILE",x="EACCES",U="EISDIR",M="ENOTEMPTY",ee="ENOSYS",V="ERR_FS_EISDIR",q="ERR_OUT_OF_RANGE";function G(ue,te="",X="",ye=""){let Re="";switch(X&&(Re=` '${X}'`),ye&&(Re+=` -> '${ye}'`),ue){case w:return`ENOENT: no such file or directory, ${te}${Re}`;case _:return`EBADF: bad file descriptor, ${te}${Re}`;case S:return`EINVAL: invalid argument, ${te}${Re}`;case T:return`EPERM: operation not permitted, ${te}${Re}`;case O:return`EPROTO: protocol error, ${te}${Re}`;case E:return`EEXIST: file already exists, ${te}${Re}`;case P:return`ENOTDIR: not a directory, ${te}${Re}`;case U:return`EISDIR: illegal operation on a directory, ${te}${Re}`;case x:return`EACCES: permission denied, ${te}${Re}`;case M:return`ENOTEMPTY: directory not empty, ${te}${Re}`;case A:return`EMFILE: too many open files, ${te}${Re}`;case ee:return`ENOSYS: function not implemented, ${te}${Re}`;case V:return`[ERR_FS_EISDIR]: Path is a directory: ${te} returned EISDIR (is a directory) ${X}`;case q:return`[ERR_OUT_OF_RANGE]: value out of range, ${te}${Re}`;default:return`${ue}: error occurred, ${te}${Re}`}}l(G,"R4"),e(G,"formatError");function re(ue,te="",X="",ye="",Re=Error){let De=new Re(G(ue,te,X,ye));return De.code=ue,X&&(De.path=X),De}l(re,"T4"),e(re,"createError");function ae(){return Math.random().toString(36).slice(2,8).padEnd(6,"0")}l(ae,"F4"),e(ae,"genRndStr6");function de(ue){if(typeof ue=="number")return ue;if(typeof ue=="string"){let te=i.FLAGS[ue];if(typeof te<"u")return te}throw new f.TypeError("ERR_INVALID_OPT_VALUE","flags",ue)}l(de,"x4"),e(de,"flagsToNumber");function we(ue){let te=[];return new Promise((X,ye)=>{ue.on("data",Re=>te.push(Re)),ue.on("end",()=>X(g.Buffer.concat(te))),ue.on("error",ye)})}l(we,"O4"),e(we,"streamToBuffer");var xe=e(ue=>new Uint8Array(ue.buffer,ue.byteOffset,ue.byteLength),"bufToUint8");a.bufToUint8=xe;var Pe=e((ue,te,X,ye,Re,De)=>{(0,n.validateFd)(ue);let Y=0,H,Q=null,fe,ve,N=typeof te,I=typeof X,D=typeof ye,z=typeof Re;N!=="string"?I==="function"?ve=X:D==="function"?(Y=X|0,ve=ye):z==="function"?(Y=X|0,H=ye,ve=Re):(Y=X|0,H=ye,Q=Re,ve=De):I==="function"?ve=X:D==="function"?(Q=X,ve=ye):z==="function"&&(Q=X,fe=ye,ve=Re);let Ee=(0,n.dataToBuffer)(te,fe);N!=="string"?typeof H>"u"&&(H=Ee.length):(Y=0,H=Ee.length);let Oe=u(ve);return[ue,N==="string",Ee,Y,H,Q,Oe]},"getWriteArgs");a.getWriteArgs=Pe;var se=e((ue,te,X,ye,Re)=>{(0,n.validateFd)(ue);let De,Y,H,Q,fe=typeof te!="string";fe?(Y=(X||0)|0,H=ye,Q=Re):(Q=X,De=ye);let ve=(0,n.dataToBuffer)(te,De);return fe?typeof H>"u"&&(H=ve.length):(Y=0,H=ve.length),[ue,ve,Y||0,H,Q]},"getWriteSyncArgs");a.getWriteSyncArgs=se;function Te(ue,te){return!te||te==="buffer"?ue:ue.toString(te)}l(Te,"B4"),e(Te,"bufferToEncoding");function J(ue){return ue!==null&&typeof ue=="object"&&typeof ue.pipe=="function"&&typeof ue.on=="function"&&ue.readable===!0}l(J,"C4"),e(J,"isReadableStream")}),nL=Ge(a=>{"use strict";var V;Object.defineProperty(a,"__esModule",{value:!0}),a.Superblock=void 0;var i=pf(),f=WI(),g=zI(),o=HI(),n=ka(),r=bE(),u=Dn(),p=gf(),h=Fa(),d=vE(),m=NI(),y=i.posix?i.posix.sep:i.sep,w=i.posix?i.posix.relative:i.relative,_=i.posix?i.posix.join:i.join,{O_RDONLY:S,O_WRONLY:T,O_RDWR:O,O_CREAT:E,O_EXCL:P,O_TRUNC:A,O_APPEND:x,O_DIRECTORY:U}=u.constants,M=(V=class{static fromJSON(G,re){let ae=new V;return ae.fromJSON(G,re),ae}static fromNestedJSON(G,re){let ae=new V;return ae.fromNestedJSON(G,re),ae}constructor(G={}){this.ino=0,this.inodes={},this.releasedInos=[],this.fds={},this.releasedFds=[],this.maxFiles=1e4,this.openFiles=0,this.open=(ae,de,we,xe=!0)=>{let Pe=this.openFile(ae,de,we,xe);if(!Pe)throw(0,h.createError)("ENOENT","open",ae);return Pe.fd},this.writeFile=(ae,de,we,xe)=>{let Pe=typeof ae=="number",se;Pe?se=ae:se=this.open((0,h.pathToFilename)(ae),we,xe);let Te=0,J=de.length,ue=we&x?void 0:0;try{for(;J>0;){let te=this.write(se,de,Te,J,ue);Te+=te,J-=te,ue!==void 0&&(ue+=te)}}finally{Pe||this.close(se)}},this.read=(ae,de,we,xe,Pe)=>{if(de.byteLength<xe)throw(0,h.createError)("ERR_OUT_OF_RANGE","read",void 0,void 0,RangeError);let se=this.getFileByFdOrThrow(ae);if(se.node.isSymlink())throw(0,h.createError)("EPERM","read",se.link.getPath());return se.read(de,Number(we),Number(xe),Pe===-1||typeof Pe!="number"?void 0:Pe)},this.readv=(ae,de,we)=>{let xe=this.getFileByFdOrThrow(ae),Pe=we??void 0;Pe===-1&&(Pe=void 0);let se=0;for(let Te of de){let J=xe.read(Te,0,Te.byteLength,Pe);if(Pe=void 0,se+=J,J<Te.byteLength)break}return se},this.link=(ae,de)=>{let we;try{we=this.getLinkOrThrow(ae,"link")}catch(J){throw J.code&&(J=(0,h.createError)(J.code,"link",ae,de)),J}let xe=(0,i.dirname)(de),Pe;try{Pe=this.getLinkOrThrow(xe,"link")}catch(J){throw J.code&&(J=(0,h.createError)(J.code,"link",ae,de)),J}let se=(0,i.basename)(de);if(Pe.getChild(se))throw(0,h.createError)("EEXIST","link",ae,de);let Te=we.getNode();Te.nlink++,Pe.createChild(se,Te)},this.unlink=ae=>{let de=this.getLinkOrThrow(ae,"unlink");if(de.length)throw Error("Dir not empty...");this.deleteLink(de);let we=de.getNode();we.nlink--,we.nlink<=0&&this.deleteNode(we)},this.symlink=(ae,de)=>{let we=(0,d.filenameToSteps)(de),xe;try{xe=this.getLinkParentAsDirOrThrow(we)}catch(J){throw J.code&&(J=(0,h.createError)(J.code,"symlink",ae,de)),J}let Pe=we[we.length-1];if(xe.getChild(Pe))throw(0,h.createError)("EEXIST","symlink",ae,de);let se=xe.getNode();if(!se.canExecute()||!se.canWrite())throw(0,h.createError)("EACCES","symlink",ae,de);let Te=xe.createChild(Pe);return Te.getNode().makeSymlink(ae),Te},this.rename=(ae,de)=>{let we;try{we=this.getResolvedLinkOrThrow(ae)}catch(ue){throw ue.code&&(ue=(0,h.createError)(ue.code,"rename",ae,de)),ue}let xe;try{xe=this.getLinkParentAsDirOrThrow(de)}catch(ue){throw ue.code&&(ue=(0,h.createError)(ue.code,"rename",ae,de)),ue}let Pe=we.parent;if(!Pe)throw(0,h.createError)("EINVAL","rename",ae,de);let se=Pe.getNode(),Te=xe.getNode();if(!se.canExecute()||!se.canWrite()||!Te.canExecute()||!Te.canWrite())throw(0,h.createError)("EACCES","rename",ae,de);Pe.deleteChild(we);let J=(0,i.basename)(de);we.name=J,we.steps=[...xe.steps,J],xe.setChild(we.getName(),we)},this.mkdir=(ae,de)=>{let we=(0,d.filenameToSteps)(ae);if(!we.length)throw(0,h.createError)("EEXIST","mkdir",ae);let xe=this.getLinkParentAsDirOrThrow(ae,"mkdir"),Pe=we[we.length-1];if(xe.getChild(Pe))throw(0,h.createError)("EEXIST","mkdir",ae);let se=xe.getNode();if(!se.canWrite()||!se.canExecute())throw(0,h.createError)("EACCES","mkdir",ae);xe.createChild(Pe,this.createNode(u.constants.S_IFDIR|de))},this.mkdirp=(ae,de)=>{let we=!1,xe=(0,d.filenameToSteps)(ae),Pe=null,se=xe.length;for(se=xe.length;se>=0&&(Pe=this.getResolvedLink(xe.slice(0,se)),!Pe);se--);for(Pe||(Pe=this.root,se=0),Pe=this.getResolvedLinkOrThrow(i.sep+xe.slice(0,se).join(i.sep),"mkdir"),se;se<xe.length;se++){let Te=Pe.getNode();if(Te.isDirectory()){if(!Te.canExecute()||!Te.canWrite())throw(0,h.createError)("EACCES","mkdir",ae)}else throw(0,h.createError)("ENOTDIR","mkdir",ae);we=!0,Pe=Pe.createChild(xe[se],this.createNode(u.constants.S_IFDIR|de))}return we?ae:void 0},this.rmdir=(ae,de=!1)=>{let we=this.getLinkAsDirOrThrow(ae,"rmdir");if(we.length&&!de)throw(0,h.createError)("ENOTEMPTY","rmdir",ae);this.deleteLink(we)},this.rm=(ae,de=!1,we=!1)=>{let xe;try{xe=this.getResolvedLinkOrThrow(ae,"stat")}catch(Pe){if(Pe.code==="ENOENT"&&de)return;throw Pe}if(xe.getNode().isDirectory()&&!we)throw(0,h.createError)("ERR_FS_EISDIR","rm",ae);if(!xe.parent?.getNode().canWrite())throw(0,h.createError)("EACCES","rm",ae);this.deleteLink(xe)},this.close=ae=>{(0,d.validateFd)(ae);let de=this.getFileByFdOrThrow(ae,"close");this.closeFile(de)};let re=this.createLink();re.setNode(this.createNode(u.constants.S_IFDIR|511)),re.setChild(".",re),re.getNode().nlink++,re.setChild("..",re),re.getNode().nlink++,this.root=re}createLink(G,re,ae=!1,de){if(!G)return new g.Link(this,void 0,"");if(!re)throw new Error("createLink: name cannot be empty");let we=de??(ae?511:438),xe=de&&de&u.constants.S_IFMT?de&u.constants.S_IFMT:ae?u.constants.S_IFDIR:u.constants.S_IFREG,Pe=we&~u.constants.S_IFMT|xe;return G.createChild(re,this.createNode(Pe))}deleteLink(G){let re=G.parent;return re?(re.deleteChild(G),!0):!1}newInoNumber(){return this.releasedInos.pop()||(this.ino=(this.ino+1)%4294967295,this.ino)}newFdNumber(){let G=this.releasedFds.pop();return typeof G=="number"?G:V.fd--}createNode(G){let re=new f.Node(this.newInoNumber(),G);return this.inodes[re.ino]=re,re}deleteNode(G){G.del(),delete this.inodes[G.ino],this.releasedInos.push(G.ino)}walk(G,re=!1,ae=!1,de=!1,we){let xe,Pe;G instanceof g.Link?(xe=G.steps,Pe=y+xe.join(y)):typeof G=="string"?(xe=(0,d.filenameToSteps)(G),Pe=G):(xe=G,Pe=y+xe.join(y));let se=this.root,Te=0;for(;Te<xe.length;){let J=se.getNode();if(J.isDirectory()){if(de&&!J.canExecute())throw(0,h.createError)("EACCES",we,Pe)}else if(Te<xe.length-1)throw(0,h.createError)("ENOTDIR",we,Pe);if(se=se.getChild(xe[Te])??null,!se){if(ae)throw(0,h.createError)("ENOENT",we,Pe);return null}if(J=se?.getNode(),J.isSymlink()&&(re||Te<xe.length-1)){let ue=(0,i.isAbsolute)(J.symlink)?J.symlink:_((0,i.dirname)(se.getPath()),J.symlink);xe=(0,d.filenameToSteps)(ue).concat(xe.slice(Te+1)),se=this.root,Te=0;continue}if(ae&&!J.isDirectory()&&Te<xe.length-1){let ue=r.default.platform==="win32"?"ENOENT":"ENOTDIR";throw(0,h.createError)(ue,we,Pe)}Te++}return se}getLink(G){return this.walk(G,!1,!1,!1)}getLinkOrThrow(G,re){return this.walk(G,!1,!0,!0,re)}getResolvedLink(G){return this.walk(G,!0,!1,!1)}getResolvedLinkOrThrow(G,re){return this.walk(G,!0,!0,!0,re)}resolveSymlinks(G){return this.getResolvedLink(G.steps.slice(1))}getLinkAsDirOrThrow(G,re){let ae=this.getLinkOrThrow(G,re);if(!ae.getNode().isDirectory())throw(0,h.createError)("ENOTDIR",re,G);return ae}getLinkParent(G){return this.getLink(G.slice(0,-1))}getLinkParentAsDirOrThrow(G,re){let ae=(G instanceof Array?G:(0,d.filenameToSteps)(G)).slice(0,-1),de=y+ae.join(y),we=this.getLinkOrThrow(de,re);if(!we.getNode().isDirectory())throw(0,h.createError)("ENOTDIR",re,de);return we}getFileByFd(G){return this.fds[String(G)]}getFileByFdOrThrow(G,re){if(!(0,d.isFd)(G))throw TypeError(p.ERRSTR.FD);let ae=this.getFileByFd(G);if(!ae)throw(0,h.createError)("EBADF",re);return ae}_toJSON(G=this.root,re={},ae,de){let we=!0,xe=G.children;G.getNode().isFile()&&(xe=new Map([[G.getName(),G.parent.getChild(G.getName())]]),G=G.parent);for(let se of xe.keys()){if(se==="."||se==="..")continue;we=!1;let Te=G.getChild(se);if(!Te)throw new Error("_toJSON: unexpected undefined");let J=Te.getNode();if(J.isFile()){let ue=Te.getPath();ae&&(ue=w(ae,ue)),re[ue]=de?J.getBuffer():J.getString()}else J.isDirectory()&&this._toJSON(Te,re,ae,de)}let Pe=G.getPath();return ae&&(Pe=w(ae,Pe)),Pe&&we&&(re[Pe]=null),re}toJSON(G,re={},ae=!1,de=!1){let we=[];if(G){Array.isArray(G)||(G=[G]);for(let xe of G){let Pe=(0,h.pathToFilename)(xe),se=this.getResolvedLink(Pe);se&&we.push(se)}}else we.push(this.root);if(!we.length)return re;for(let xe of we)this._toJSON(xe,re,ae?xe.getPath():"",de);return re}fromJSON(G,re=r.default.cwd()){for(let ae in G){let de=G[ae];if(ae=(0,d.resolve)(ae,re),typeof de=="string"||de instanceof n.Buffer){let we=(0,i.dirname)(ae);this.mkdirp(we,511);let xe=(0,d.dataToBuffer)(de);this.writeFile(ae,xe,p.FLAGS.w,438)}else this.mkdirp(ae,511)}}fromNestedJSON(G,re){this.fromJSON((0,m.flattenJSON)(G),re)}reset(){this.ino=0,this.inodes={},this.releasedInos=[],this.fds={},this.releasedFds=[],this.openFiles=0,this.root=this.createLink(),this.root.setNode(this.createNode(u.constants.S_IFDIR|511))}mountSync(G,re){this.fromJSON(re,G)}openLink(G,re,ae=!0){if(this.openFiles>=this.maxFiles)throw(0,h.createError)("EMFILE","open",G.getPath());let de=G;ae&&(de=this.getResolvedLinkOrThrow(G.getPath(),"open"));let we=de.getNode();if(we.isDirectory()){if((re&(S|O|T))!==S)throw(0,h.createError)("EISDIR","open",G.getPath())}else if(re&U)throw(0,h.createError)("ENOTDIR","open",G.getPath());if((re&(S|O|T))!==T&&!we.canRead()||re&(T|O)&&!we.canWrite())throw(0,h.createError)("EACCES","open",G.getPath());let xe=new o.File(G,we,re,this.newFdNumber());return this.fds[xe.fd]=xe,this.openFiles++,re&A&&xe.truncate(),xe}openFile(G,re,ae,de=!0){let we=(0,d.filenameToSteps)(G),xe;try{if(xe=de?this.getResolvedLinkOrThrow(G,"open"):this.getLinkOrThrow(G,"open"),xe&&re&E&&re&P)throw(0,h.createError)("EEXIST","open",G)}catch(Pe){if(Pe.code==="ENOENT"&&re&E){let se=(0,i.dirname)(G),Te=this.getResolvedLinkOrThrow(se),J=Te.getNode();if(!J.isDirectory())throw(0,h.createError)("ENOTDIR","open",G);if(!J.canExecute()||!J.canWrite())throw(0,h.createError)("EACCES","open",G);ae??(ae=438),xe=this.createLink(Te,we[we.length-1],!1,ae)}else throw Pe}if(xe)return this.openLink(xe,re,de);throw(0,h.createError)("ENOENT","open",G)}closeFile(G){this.fds[G.fd]&&(this.openFiles--,delete this.fds[G.fd],this.releasedFds.push(G.fd))}write(G,re,ae,de,we){let xe=this.getFileByFdOrThrow(G,"write");if(xe.node.isSymlink())throw(0,h.createError)("EBADF","write",xe.link.getPath());return xe.write(re,ae,de,we===-1||typeof we!="number"?void 0:we)}},l(V,"Qa"),V);e(M,"Superblock");var ee=M;a.Superblock=ee,ee.fd=2147483647}),iL=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Superblock=a.File=a.Link=a.Node=void 0;var i=(LI(),cr(mE));i.__exportStar(V4(),a),i.__exportStar(NI(),a);var f=WI();Object.defineProperty(a,"Node",{enumerable:!0,get:e(function(){return f.Node},"get")});var g=zI();Object.defineProperty(a,"Link",{enumerable:!0,get:e(function(){return g.Link},"get")});var o=HI();Object.defineProperty(a,"File",{enumerable:!0,get:e(function(){return o.File},"get")});var n=nL();Object.defineProperty(a,"Superblock",{enumerable:!0,get:e(function(){return n.Superblock},"get")})}),oL=Ge(a=>{"use strict";var g;Object.defineProperty(a,"__esModule",{value:!0}),a.StatFs=void 0;var i=(g=class{static build(n,r=!1){let u=new g,p=r?_=>BigInt(_):_=>_;u.type=p(2240043254),u.bsize=p(4096);let h=Object.keys(n.inodes).length,d=1e6,m=Math.min(h*2,d),y=d-m;u.blocks=p(d),u.bfree=p(y),u.bavail=p(y);let w=1e6;return u.files=p(w),u.ffree=p(w-h),u}},l(g,"cc"),g);e(i,"StatFs");var f=i;a.StatFs=f,a.default=f}),aL=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});function i(f,g,o){let n=setTimeout.apply(globalThis,arguments);return n&&typeof n=="object"&&typeof n.unref=="function"&&n.unref(),n}l(i,"Y4"),e(i,"setTimeoutUnref"),a.default=i});function P6(){if(Ab)return ws;Ab=!0,ws.byteLength=u,ws.toByteArray=h,ws.fromByteArray=y;for(var a=[],i=[],f=typeof Uint8Array<"u"?Uint8Array:Array,g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,n=g.length;o<n;++o)a[o]=g[o],i[g.charCodeAt(o)]=o;i[45]=62,i[95]=63;function r(w){var _=w.length;if(_%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var S=w.indexOf("=");S===-1&&(S=_);var T=S===_?0:4-S%4;return[S,T]}l(r,"i"),e(r,"getLens");function u(w){var _=r(w),S=_[0],T=_[1];return(S+T)*3/4-T}l(u,"f"),e(u,"byteLength");function p(w,_,S){return(_+S)*3/4-S}l(p,"h"),e(p,"_byteLength");function h(w){var _,S=r(w),T=S[0],O=S[1],E=new f(p(w,T,O)),P=0,A=O>0?T-4:T,x;for(x=0;x<A;x+=4)_=i[w.charCodeAt(x)]<<18|i[w.charCodeAt(x+1)]<<12|i[w.charCodeAt(x+2)]<<6|i[w.charCodeAt(x+3)],E[P++]=_>>16&255,E[P++]=_>>8&255,E[P++]=_&255;return O===2&&(_=i[w.charCodeAt(x)]<<2|i[w.charCodeAt(x+1)]>>4,E[P++]=_&255),O===1&&(_=i[w.charCodeAt(x)]<<10|i[w.charCodeAt(x+1)]<<4|i[w.charCodeAt(x+2)]>>2,E[P++]=_>>8&255,E[P++]=_&255),E}l(h,"c"),e(h,"toByteArray");function d(w){return a[w>>18&63]+a[w>>12&63]+a[w>>6&63]+a[w&63]}l(d,"d"),e(d,"tripletToBase64");function m(w,_,S){for(var T,O=[],E=_;E<S;E+=3)T=(w[E]<<16&16711680)+(w[E+1]<<8&65280)+(w[E+2]&255),O.push(d(T));return O.join("")}l(m,"y"),e(m,"encodeChunk");function y(w){for(var _,S=w.length,T=S%3,O=[],E=16383,P=0,A=S-T;P<A;P+=E)O.push(m(w,P,P+E>A?A:P+E));return T===1?(_=w[S-1],O.push(a[_>>2]+a[_<<4&63]+"==")):T===2&&(_=(w[S-2]<<8)+w[S-1],O.push(a[_>>10]+a[_>>4&63]+a[_<<2&63]+"=")),O.join("")}return l(y,"m"),e(y,"fromByteArray"),ws}l(P6,"K4");function j6(){return Rb||(Rb=!0,Zu.read=function(a,i,f,g,o){var n,r,u=o*8-g-1,p=(1<<u)-1,h=p>>1,d=-7,m=f?o-1:0,y=f?-1:1,w=a[i+m];for(m+=y,n=w&(1<<-d)-1,w>>=-d,d+=u;d>0;n=n*256+a[i+m],m+=y,d-=8);for(r=n&(1<<-d)-1,n>>=-d,d+=g;d>0;r=r*256+a[i+m],m+=y,d-=8);if(n===0)n=1-h;else{if(n===p)return r?NaN:(w?-1:1)*(1/0);r=r+Math.pow(2,g),n=n-h}return(w?-1:1)*r*Math.pow(2,n-g)},Zu.write=function(a,i,f,g,o,n){var r,u,p,h=n*8-o-1,d=(1<<h)-1,m=d>>1,y=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=g?0:n-1,_=g?1:-1,S=i<0||i===0&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(u=isNaN(i)?1:0,r=d):(r=Math.floor(Math.log(i)/Math.LN2),i*(p=Math.pow(2,-r))<1&&(r--,p*=2),r+m>=1?i+=y/p:i+=y*Math.pow(2,1-m),i*p>=2&&(r++,p/=2),r+m>=d?(u=0,r=d):r+m>=1?(u=(i*p-1)*Math.pow(2,o),r=r+m):(u=i*Math.pow(2,m-1)*Math.pow(2,o),r=0));o>=8;a[f+w]=u&255,w+=_,u/=256,o-=8);for(r=r<<o|u,h+=o;h>0;a[f+w]=r&255,w+=_,r/=256,h-=8);a[f+w-_]|=S*128}),Zu}l(j6,"X4");function mi(){if(Ob)return Di;Ob=!0;let a=P6(),i=j6(),f=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Di.Buffer=r,Di.SlowBuffer=O,Di.INSPECT_MAX_BYTES=50;let g=2147483647;Di.kMaxLength=g,r.TYPED_ARRAY_SUPPORT=o(),!r.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 o(){try{let t=new Uint8Array(1),s={foo:e(function(){return 42},"foo")};return Object.setPrototypeOf(s,Uint8Array.prototype),Object.setPrototypeOf(t,s),t.foo()===42}catch{return!1}}l(o,"a"),e(o,"typedArraySupport"),Object.defineProperty(r.prototype,"parent",{enumerable:!0,get:e(function(){if(r.isBuffer(this))return this.buffer},"get")}),Object.defineProperty(r.prototype,"offset",{enumerable:!0,get:e(function(){if(r.isBuffer(this))return this.byteOffset},"get")});function n(t){if(t>g)throw new RangeError('The value "'+t+'" is invalid for option "size"');let s=new Uint8Array(t);return Object.setPrototypeOf(s,r.prototype),s}l(n,"s"),e(n,"createBuffer");function r(t,s,c){if(typeof t=="number"){if(typeof s=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(t)}return u(t,s,c)}l(r,"i"),e(r,"Buffer"),r.poolSize=8192;function u(t,s,c){if(typeof t=="string")return m(t,s);if(ArrayBuffer.isView(t))return w(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(Ie(t,ArrayBuffer)||t&&Ie(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(t,SharedArrayBuffer)||t&&Ie(t.buffer,SharedArrayBuffer)))return _(t,s,c);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let v=t.valueOf&&t.valueOf();if(v!=null&&v!==t)return r.from(v,s,c);let R=S(t);if(R)return R;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return r.from(t[Symbol.toPrimitive]("string"),s,c);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}l(u,"f"),e(u,"from"),r.from=function(t,s,c){return u(t,s,c)},Object.setPrototypeOf(r.prototype,Uint8Array.prototype),Object.setPrototypeOf(r,Uint8Array);function p(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"')}l(p,"h"),e(p,"assertSize");function h(t,s,c){return p(t),t<=0?n(t):s!==void 0?typeof c=="string"?n(t).fill(s,c):n(t).fill(s):n(t)}l(h,"c"),e(h,"alloc"),r.alloc=function(t,s,c){return h(t,s,c)};function d(t){return p(t),n(t<0?0:T(t)|0)}l(d,"d"),e(d,"allocUnsafe"),r.allocUnsafe=function(t){return d(t)},r.allocUnsafeSlow=function(t){return d(t)};function m(t,s){if((typeof s!="string"||s==="")&&(s="utf8"),!r.isEncoding(s))throw new TypeError("Unknown encoding: "+s);let c=E(t,s)|0,v=n(c),R=v.write(t,s);return R!==c&&(v=v.slice(0,R)),v}l(m,"y"),e(m,"fromString");function y(t){let s=t.length<0?0:T(t.length)|0,c=n(s);for(let v=0;v<s;v+=1)c[v]=t[v]&255;return c}l(y,"m"),e(y,"fromArrayLike");function w(t){if(Ie(t,Uint8Array)){let s=new Uint8Array(t);return _(s.buffer,s.byteOffset,s.byteLength)}return y(t)}l(w,"g"),e(w,"fromArrayView");function _(t,s,c){if(s<0||t.byteLength<s)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<s+(c||0))throw new RangeError('"length" is outside of buffer bounds');let v;return s===void 0&&c===void 0?v=new Uint8Array(t):c===void 0?v=new Uint8Array(t,s):v=new Uint8Array(t,s,c),Object.setPrototypeOf(v,r.prototype),v}l(_,"v"),e(_,"fromArrayBuffer");function S(t){if(r.isBuffer(t)){let s=T(t.length)|0,c=n(s);return c.length===0||t.copy(c,0,0,s),c}if(t.length!==void 0)return typeof t.length!="number"||ke(t.length)?n(0):y(t);if(t.type==="Buffer"&&Array.isArray(t.data))return y(t.data)}l(S,"_"),e(S,"fromObject");function T(t){if(t>=g)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+g.toString(16)+" bytes");return t|0}l(T,"b"),e(T,"checked");function O(t){return+t!=t&&(t=0),r.alloc(+t)}l(O,"E"),e(O,"SlowBuffer"),r.isBuffer=e(function(t){return t!=null&&t._isBuffer===!0&&t!==r.prototype},"isBuffer2"),r.compare=e(function(t,s){if(Ie(t,Uint8Array)&&(t=r.from(t,t.offset,t.byteLength)),Ie(s,Uint8Array)&&(s=r.from(s,s.offset,s.byteLength)),!r.isBuffer(t)||!r.isBuffer(s))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===s)return 0;let c=t.length,v=s.length;for(let R=0,C=Math.min(c,v);R<C;++R)if(t[R]!==s[R]){c=t[R],v=s[R];break}return c<v?-1:v<c?1:0},"compare"),r.isEncoding=e(function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},"isEncoding"),r.concat=e(function(t,s){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return r.alloc(0);let c;if(s===void 0)for(s=0,c=0;c<t.length;++c)s+=t[c].length;let v=r.allocUnsafe(s),R=0;for(c=0;c<t.length;++c){let C=t[c];if(Ie(C,Uint8Array))R+C.length>v.length?(r.isBuffer(C)||(C=r.from(C)),C.copy(v,R)):Uint8Array.prototype.set.call(v,C,R);else if(r.isBuffer(C))C.copy(v,R);else throw new TypeError('"list" argument must be an Array of Buffers');R+=C.length}return v},"concat");function E(t,s){if(r.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Ie(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 c=t.length,v=arguments.length>2&&arguments[2]===!0;if(!v&&c===0)return 0;let R=!1;for(;;)switch(s){case"ascii":case"latin1":case"binary":return c;case"utf8":case"utf-8":return Ee(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c*2;case"hex":return c>>>1;case"base64":return ge(t).length;default:if(R)return v?-1:Ee(t).length;s=(""+s).toLowerCase(),R=!0}}l(E,"R"),e(E,"byteLength"),r.byteLength=E;function P(t,s,c){let v=!1;if((s===void 0||s<0)&&(s=0),s>this.length||((c===void 0||c>this.length)&&(c=this.length),c<=0)||(c>>>=0,s>>>=0,c<=s))return"";for(t||(t="utf8");;)switch(t){case"hex":return se(this,s,c);case"utf8":case"utf-8":return ae(this,s,c);case"ascii":return xe(this,s,c);case"latin1":case"binary":return Pe(this,s,c);case"base64":return re(this,s,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Te(this,s,c);default:if(v)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),v=!0}}l(P,"T"),e(P,"slowToString"),r.prototype._isBuffer=!0;function A(t,s,c){let v=t[s];t[s]=t[c],t[c]=v}l(A,"F"),e(A,"swap"),r.prototype.swap16=e(function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let s=0;s<t;s+=2)A(this,s,s+1);return this},"swap16"),r.prototype.swap32=e(function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let s=0;s<t;s+=4)A(this,s,s+3),A(this,s+1,s+2);return this},"swap32"),r.prototype.swap64=e(function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let s=0;s<t;s+=8)A(this,s,s+7),A(this,s+1,s+6),A(this,s+2,s+5),A(this,s+3,s+4);return this},"swap64"),r.prototype.toString=e(function(){let t=this.length;return t===0?"":arguments.length===0?ae(this,0,t):P.apply(this,arguments)},"toString"),r.prototype.toLocaleString=r.prototype.toString,r.prototype.equals=e(function(t){if(!r.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:r.compare(this,t)===0},"equals"),r.prototype.inspect=e(function(){let t="",s=Di.INSPECT_MAX_BYTES;return t=this.toString("hex",0,s).replace(/(.{2})/g,"$1 ").trim(),this.length>s&&(t+=" ... "),"<Buffer "+t+">"},"inspect2"),f&&(r.prototype[f]=r.prototype.inspect),r.prototype.compare=e(function(t,s,c,v,R){if(Ie(t,Uint8Array)&&(t=r.from(t,t.offset,t.byteLength)),!r.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(s===void 0&&(s=0),c===void 0&&(c=t?t.length:0),v===void 0&&(v=0),R===void 0&&(R=this.length),s<0||c>t.length||v<0||R>this.length)throw new RangeError("out of range index");if(v>=R&&s>=c)return 0;if(v>=R)return-1;if(s>=c)return 1;if(s>>>=0,c>>>=0,v>>>=0,R>>>=0,this===t)return 0;let C=R-v,j=c-s,Z=Math.min(C,j),oe=this.slice(v,R),Ae=t.slice(s,c);for(let le=0;le<Z;++le)if(oe[le]!==Ae[le]){C=oe[le],j=Ae[le];break}return C<j?-1:j<C?1:0},"compare");function x(t,s,c,v,R){if(t.length===0)return-1;if(typeof c=="string"?(v=c,c=0):c>2147483647?c=2147483647:c<-2147483648&&(c=-2147483648),c=+c,ke(c)&&(c=R?0:t.length-1),c<0&&(c=t.length+c),c>=t.length){if(R)return-1;c=t.length-1}else if(c<0)if(R)c=0;else return-1;if(typeof s=="string"&&(s=r.from(s,v)),r.isBuffer(s))return s.length===0?-1:U(t,s,c,v,R);if(typeof s=="number")return s=s&255,typeof Uint8Array.prototype.indexOf=="function"?R?Uint8Array.prototype.indexOf.call(t,s,c):Uint8Array.prototype.lastIndexOf.call(t,s,c):U(t,[s],c,v,R);throw new TypeError("val must be string, number or Buffer")}l(x,"S"),e(x,"bidirectionalIndexOf");function U(t,s,c,v,R){let C=1,j=t.length,Z=s.length;if(v!==void 0&&(v=String(v).toLowerCase(),v==="ucs2"||v==="ucs-2"||v==="utf16le"||v==="utf-16le")){if(t.length<2||s.length<2)return-1;C=2,j/=2,Z/=2,c/=2}function oe(le,Fe){return C===1?le[Fe]:le.readUInt16BE(Fe*C)}l(oe,"re"),e(oe,"read");let Ae;if(R){let le=-1;for(Ae=c;Ae<j;Ae++)if(oe(t,Ae)===oe(s,le===-1?0:Ae-le)){if(le===-1&&(le=Ae),Ae-le+1===Z)return le*C}else le!==-1&&(Ae-=Ae-le),le=-1}else for(c+Z>j&&(c=j-Z),Ae=c;Ae>=0;Ae--){let le=!0;for(let Fe=0;Fe<Z;Fe++)if(oe(t,Ae+Fe)!==oe(s,Fe)){le=!1;break}if(le)return Ae}return-1}l(U,"B"),e(U,"arrayIndexOf"),r.prototype.includes=e(function(t,s,c){return this.indexOf(t,s,c)!==-1},"includes"),r.prototype.indexOf=e(function(t,s,c){return x(this,t,s,c,!0)},"indexOf"),r.prototype.lastIndexOf=e(function(t,s,c){return x(this,t,s,c,!1)},"lastIndexOf");function M(t,s,c,v){c=Number(c)||0;let R=t.length-c;v?(v=Number(v),v>R&&(v=R)):v=R;let C=s.length;v>C/2&&(v=C/2);let j;for(j=0;j<v;++j){let Z=parseInt(s.substr(j*2,2),16);if(ke(Z))return j;t[c+j]=Z}return j}l(M,"P"),e(M,"hexWrite");function ee(t,s,c,v){return Ne(Ee(s,t.length-c),t,c,v)}l(ee,"N"),e(ee,"utf8Write");function V(t,s,c,v){return Ne(Oe(s),t,c,v)}l(V,"L"),e(V,"asciiWrite");function q(t,s,c,v){return Ne(ge(s),t,c,v)}l(q,"C"),e(q,"base64Write");function G(t,s,c,v){return Ne(be(s,t.length-c),t,c,v)}l(G,"j"),e(G,"ucs2Write"),r.prototype.write=e(function(t,s,c,v){if(s===void 0)v="utf8",c=this.length,s=0;else if(c===void 0&&typeof s=="string")v=s,c=this.length,s=0;else if(isFinite(s))s=s>>>0,isFinite(c)?(c=c>>>0,v===void 0&&(v="utf8")):(v=c,c=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let R=this.length-s;if((c===void 0||c>R)&&(c=R),t.length>0&&(c<0||s<0)||s>this.length)throw new RangeError("Attempt to write outside buffer bounds");v||(v="utf8");let C=!1;for(;;)switch(v){case"hex":return M(this,t,s,c);case"utf8":case"utf-8":return ee(this,t,s,c);case"ascii":case"latin1":case"binary":return V(this,t,s,c);case"base64":return q(this,t,s,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,t,s,c);default:if(C)throw new TypeError("Unknown encoding: "+v);v=(""+v).toLowerCase(),C=!0}},"write"),r.prototype.toJSON=e(function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},"toJSON");function re(t,s,c){return s===0&&c===t.length?a.fromByteArray(t):a.fromByteArray(t.slice(s,c))}l(re,"q"),e(re,"base64Slice");function ae(t,s,c){c=Math.min(t.length,c);let v=[],R=s;for(;R<c;){let C=t[R],j=null,Z=C>239?4:C>223?3:C>191?2:1;if(R+Z<=c){let oe,Ae,le,Fe;switch(Z){case 1:C<128&&(j=C);break;case 2:oe=t[R+1],(oe&192)===128&&(Fe=(C&31)<<6|oe&63,Fe>127&&(j=Fe));break;case 3:oe=t[R+1],Ae=t[R+2],(oe&192)===128&&(Ae&192)===128&&(Fe=(C&15)<<12|(oe&63)<<6|Ae&63,Fe>2047&&(Fe<55296||Fe>57343)&&(j=Fe));break;case 4:oe=t[R+1],Ae=t[R+2],le=t[R+3],(oe&192)===128&&(Ae&192)===128&&(le&192)===128&&(Fe=(C&15)<<18|(oe&63)<<12|(Ae&63)<<6|le&63,Fe>65535&&Fe<1114112&&(j=Fe))}}j===null?(j=65533,Z=1):j>65535&&(j-=65536,v.push(j>>>10&1023|55296),j=56320|j&1023),v.push(j),R+=Z}return we(v)}l(ae,"Z"),e(ae,"utf8Slice");let de=4096;function we(t){let s=t.length;if(s<=de)return String.fromCharCode.apply(String,t);let c="",v=0;for(;v<s;)c+=String.fromCharCode.apply(String,t.slice(v,v+=de));return c}l(we,"se"),e(we,"decodeCodePointsArray");function xe(t,s,c){let v="";c=Math.min(t.length,c);for(let R=s;R<c;++R)v+=String.fromCharCode(t[R]&127);return v}l(xe,"_e"),e(xe,"asciiSlice");function Pe(t,s,c){let v="";c=Math.min(t.length,c);for(let R=s;R<c;++R)v+=String.fromCharCode(t[R]);return v}l(Pe,"pe"),e(Pe,"latin1Slice");function se(t,s,c){let v=t.length;(!s||s<0)&&(s=0),(!c||c<0||c>v)&&(c=v);let R="";for(let C=s;C<c;++C)R+=Ce[t[C]];return R}l(se,"Q"),e(se,"hexSlice");function Te(t,s,c){let v=t.slice(s,c),R="";for(let C=0;C<v.length-1;C+=2)R+=String.fromCharCode(v[C]+v[C+1]*256);return R}l(Te,"he"),e(Te,"utf16leSlice"),r.prototype.slice=e(function(t,s){let c=this.length;t=~~t,s=s===void 0?c:~~s,t<0?(t+=c,t<0&&(t=0)):t>c&&(t=c),s<0?(s+=c,s<0&&(s=0)):s>c&&(s=c),s<t&&(s=t);let v=this.subarray(t,s);return Object.setPrototypeOf(v,r.prototype),v},"slice");function J(t,s,c){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+s>c)throw new RangeError("Trying to access beyond buffer length")}l(J,"U"),e(J,"checkOffset"),r.prototype.readUintLE=r.prototype.readUIntLE=e(function(t,s,c){t=t>>>0,s=s>>>0,c||J(t,s,this.length);let v=this[t],R=1,C=0;for(;++C<s&&(R*=256);)v+=this[t+C]*R;return v},"readUIntLE"),r.prototype.readUintBE=r.prototype.readUIntBE=e(function(t,s,c){t=t>>>0,s=s>>>0,c||J(t,s,this.length);let v=this[t+--s],R=1;for(;s>0&&(R*=256);)v+=this[t+--s]*R;return v},"readUIntBE"),r.prototype.readUint8=r.prototype.readUInt8=e(function(t,s){return t=t>>>0,s||J(t,1,this.length),this[t]},"readUInt8"),r.prototype.readUint16LE=r.prototype.readUInt16LE=e(function(t,s){return t=t>>>0,s||J(t,2,this.length),this[t]|this[t+1]<<8},"readUInt16LE"),r.prototype.readUint16BE=r.prototype.readUInt16BE=e(function(t,s){return t=t>>>0,s||J(t,2,this.length),this[t]<<8|this[t+1]},"readUInt16BE"),r.prototype.readUint32LE=r.prototype.readUInt32LE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},"readUInt32LE"),r.prototype.readUint32BE=r.prototype.readUInt32BE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},"readUInt32BE"),r.prototype.readBigUInt64LE=$e(e(function(t){t=t>>>0,N(t,"offset");let s=this[t],c=this[t+7];(s===void 0||c===void 0)&&I(t,this.length-8);let v=s+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,R=this[++t]+this[++t]*2**8+this[++t]*2**16+c*2**24;return BigInt(v)+(BigInt(R)<<BigInt(32))},"readBigUInt64LE")),r.prototype.readBigUInt64BE=$e(e(function(t){t=t>>>0,N(t,"offset");let s=this[t],c=this[t+7];(s===void 0||c===void 0)&&I(t,this.length-8);let v=s*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],R=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+c;return(BigInt(v)<<BigInt(32))+BigInt(R)},"readBigUInt64BE")),r.prototype.readIntLE=e(function(t,s,c){t=t>>>0,s=s>>>0,c||J(t,s,this.length);let v=this[t],R=1,C=0;for(;++C<s&&(R*=256);)v+=this[t+C]*R;return R*=128,v>=R&&(v-=Math.pow(2,8*s)),v},"readIntLE"),r.prototype.readIntBE=e(function(t,s,c){t=t>>>0,s=s>>>0,c||J(t,s,this.length);let v=s,R=1,C=this[t+--v];for(;v>0&&(R*=256);)C+=this[t+--v]*R;return R*=128,C>=R&&(C-=Math.pow(2,8*s)),C},"readIntBE"),r.prototype.readInt8=e(function(t,s){return t=t>>>0,s||J(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},"readInt8"),r.prototype.readInt16LE=e(function(t,s){t=t>>>0,s||J(t,2,this.length);let c=this[t]|this[t+1]<<8;return c&32768?c|4294901760:c},"readInt16LE"),r.prototype.readInt16BE=e(function(t,s){t=t>>>0,s||J(t,2,this.length);let c=this[t+1]|this[t]<<8;return c&32768?c|4294901760:c},"readInt16BE"),r.prototype.readInt32LE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},"readInt32LE"),r.prototype.readInt32BE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},"readInt32BE"),r.prototype.readBigInt64LE=$e(e(function(t){t=t>>>0,N(t,"offset");let s=this[t],c=this[t+7];(s===void 0||c===void 0)&&I(t,this.length-8);let v=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(c<<24);return(BigInt(v)<<BigInt(32))+BigInt(s+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)},"readBigInt64LE")),r.prototype.readBigInt64BE=$e(e(function(t){t=t>>>0,N(t,"offset");let s=this[t],c=this[t+7];(s===void 0||c===void 0)&&I(t,this.length-8);let v=(s<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(v)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+c)},"readBigInt64BE")),r.prototype.readFloatLE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),i.read(this,t,!0,23,4)},"readFloatLE"),r.prototype.readFloatBE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),i.read(this,t,!1,23,4)},"readFloatBE"),r.prototype.readDoubleLE=e(function(t,s){return t=t>>>0,s||J(t,8,this.length),i.read(this,t,!0,52,8)},"readDoubleLE"),r.prototype.readDoubleBE=e(function(t,s){return t=t>>>0,s||J(t,8,this.length),i.read(this,t,!1,52,8)},"readDoubleBE");function ue(t,s,c,v,R,C){if(!r.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(s>R||s<C)throw new RangeError('"value" argument is out of bounds');if(c+v>t.length)throw new RangeError("Index out of range")}l(ue,"J"),e(ue,"checkInt"),r.prototype.writeUintLE=r.prototype.writeUIntLE=e(function(t,s,c,v){if(t=+t,s=s>>>0,c=c>>>0,!v){let j=Math.pow(2,8*c)-1;ue(this,t,s,c,j,0)}let R=1,C=0;for(this[s]=t&255;++C<c&&(R*=256);)this[s+C]=t/R&255;return s+c},"writeUIntLE"),r.prototype.writeUintBE=r.prototype.writeUIntBE=e(function(t,s,c,v){if(t=+t,s=s>>>0,c=c>>>0,!v){let j=Math.pow(2,8*c)-1;ue(this,t,s,c,j,0)}let R=c-1,C=1;for(this[s+R]=t&255;--R>=0&&(C*=256);)this[s+R]=t/C&255;return s+c},"writeUIntBE"),r.prototype.writeUint8=r.prototype.writeUInt8=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,1,255,0),this[s]=t&255,s+1},"writeUInt8"),r.prototype.writeUint16LE=r.prototype.writeUInt16LE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,2,65535,0),this[s]=t&255,this[s+1]=t>>>8,s+2},"writeUInt16LE"),r.prototype.writeUint16BE=r.prototype.writeUInt16BE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,2,65535,0),this[s]=t>>>8,this[s+1]=t&255,s+2},"writeUInt16BE"),r.prototype.writeUint32LE=r.prototype.writeUInt32LE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,4,4294967295,0),this[s+3]=t>>>24,this[s+2]=t>>>16,this[s+1]=t>>>8,this[s]=t&255,s+4},"writeUInt32LE"),r.prototype.writeUint32BE=r.prototype.writeUInt32BE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,4,4294967295,0),this[s]=t>>>24,this[s+1]=t>>>16,this[s+2]=t>>>8,this[s+3]=t&255,s+4},"writeUInt32BE");function te(t,s,c,v,R){ve(s,v,R,t,c,7);let C=Number(s&BigInt(4294967295));t[c++]=C,C=C>>8,t[c++]=C,C=C>>8,t[c++]=C,C=C>>8,t[c++]=C;let j=Number(s>>BigInt(32)&BigInt(4294967295));return t[c++]=j,j=j>>8,t[c++]=j,j=j>>8,t[c++]=j,j=j>>8,t[c++]=j,c}l(te,"z"),e(te,"wrtBigUInt64LE");function X(t,s,c,v,R){ve(s,v,R,t,c,7);let C=Number(s&BigInt(4294967295));t[c+7]=C,C=C>>8,t[c+6]=C,C=C>>8,t[c+5]=C,C=C>>8,t[c+4]=C;let j=Number(s>>BigInt(32)&BigInt(4294967295));return t[c+3]=j,j=j>>8,t[c+2]=j,j=j>>8,t[c+1]=j,j=j>>8,t[c]=j,c+8}l(X,"V"),e(X,"wrtBigUInt64BE"),r.prototype.writeBigUInt64LE=$e(e(function(t,s=0){return te(this,t,s,BigInt(0),BigInt("0xffffffffffffffff"))},"writeBigUInt64LE")),r.prototype.writeBigUInt64BE=$e(e(function(t,s=0){return X(this,t,s,BigInt(0),BigInt("0xffffffffffffffff"))},"writeBigUInt64BE")),r.prototype.writeIntLE=e(function(t,s,c,v){if(t=+t,s=s>>>0,!v){let Z=Math.pow(2,8*c-1);ue(this,t,s,c,Z-1,-Z)}let R=0,C=1,j=0;for(this[s]=t&255;++R<c&&(C*=256);)t<0&&j===0&&this[s+R-1]!==0&&(j=1),this[s+R]=(t/C>>0)-j&255;return s+c},"writeIntLE"),r.prototype.writeIntBE=e(function(t,s,c,v){if(t=+t,s=s>>>0,!v){let Z=Math.pow(2,8*c-1);ue(this,t,s,c,Z-1,-Z)}let R=c-1,C=1,j=0;for(this[s+R]=t&255;--R>=0&&(C*=256);)t<0&&j===0&&this[s+R+1]!==0&&(j=1),this[s+R]=(t/C>>0)-j&255;return s+c},"writeIntBE"),r.prototype.writeInt8=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,1,127,-128),t<0&&(t=255+t+1),this[s]=t&255,s+1},"writeInt8"),r.prototype.writeInt16LE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,2,32767,-32768),this[s]=t&255,this[s+1]=t>>>8,s+2},"writeInt16LE"),r.prototype.writeInt16BE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,2,32767,-32768),this[s]=t>>>8,this[s+1]=t&255,s+2},"writeInt16BE"),r.prototype.writeInt32LE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,4,2147483647,-2147483648),this[s]=t&255,this[s+1]=t>>>8,this[s+2]=t>>>16,this[s+3]=t>>>24,s+4},"writeInt32LE"),r.prototype.writeInt32BE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[s]=t>>>24,this[s+1]=t>>>16,this[s+2]=t>>>8,this[s+3]=t&255,s+4},"writeInt32BE"),r.prototype.writeBigInt64LE=$e(e(function(t,s=0){return te(this,t,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))},"writeBigInt64LE")),r.prototype.writeBigInt64BE=$e(e(function(t,s=0){return X(this,t,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))},"writeBigInt64BE"));function ye(t,s,c,v,R,C){if(c+v>t.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("Index out of range")}l(ye,"G"),e(ye,"checkIEEE754");function Re(t,s,c,v,R){return s=+s,c=c>>>0,R||ye(t,s,c,4),i.write(t,s,c,v,23,4),c+4}l(Re,"fe"),e(Re,"writeFloat"),r.prototype.writeFloatLE=e(function(t,s,c){return Re(this,t,s,!0,c)},"writeFloatLE"),r.prototype.writeFloatBE=e(function(t,s,c){return Re(this,t,s,!1,c)},"writeFloatBE");function De(t,s,c,v,R){return s=+s,c=c>>>0,R||ye(t,s,c,8),i.write(t,s,c,v,52,8),c+8}l(De,"be"),e(De,"writeDouble"),r.prototype.writeDoubleLE=e(function(t,s,c){return De(this,t,s,!0,c)},"writeDoubleLE"),r.prototype.writeDoubleBE=e(function(t,s,c){return De(this,t,s,!1,c)},"writeDoubleBE"),r.prototype.copy=e(function(t,s,c,v){if(!r.isBuffer(t))throw new TypeError("argument should be a Buffer");if(c||(c=0),!v&&v!==0&&(v=this.length),s>=t.length&&(s=t.length),s||(s=0),v>0&&v<c&&(v=c),v===c||t.length===0||this.length===0)return 0;if(s<0)throw new RangeError("targetStart out of bounds");if(c<0||c>=this.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("sourceEnd out of bounds");v>this.length&&(v=this.length),t.length-s<v-c&&(v=t.length-s+c);let R=v-c;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(s,c,v):Uint8Array.prototype.set.call(t,this.subarray(c,v),s),R},"copy"),r.prototype.fill=e(function(t,s,c,v){if(typeof t=="string"){if(typeof s=="string"?(v=s,s=0,c=this.length):typeof c=="string"&&(v=c,c=this.length),v!==void 0&&typeof v!="string")throw new TypeError("encoding must be a string");if(typeof v=="string"&&!r.isEncoding(v))throw new TypeError("Unknown encoding: "+v);if(t.length===1){let C=t.charCodeAt(0);(v==="utf8"&&C<128||v==="latin1")&&(t=C)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(s<0||this.length<s||this.length<c)throw new RangeError("Out of range index");if(c<=s)return this;s=s>>>0,c=c===void 0?this.length:c>>>0,t||(t=0);let R;if(typeof t=="number")for(R=s;R<c;++R)this[R]=t;else{let C=r.isBuffer(t)?t:r.from(t,v),j=C.length;if(j===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(R=0;R<c-s;++R)this[R+s]=C[R%j]}return this},"fill");let Y={};function H(t,s,c){var R;var v;Y[t]=(v=(R=class extends c{constructor(){super(),Object.defineProperty(this,"message",{value:s.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(j){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:j,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}},l(R,"w"),R),e(v,"NodeError"),v)}l(H,"$"),e(H,"E"),H("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),H("ERR_INVALID_ARG_TYPE",function(t,s){return`The "${t}" argument must be of type number. Received type ${typeof s}`},TypeError),H("ERR_OUT_OF_RANGE",function(t,s,c){let v=`The value of "${t}" is out of range.`,R=c;return Number.isInteger(c)&&Math.abs(c)>2**32?R=Q(String(c)):typeof c=="bigint"&&(R=String(c),(c>BigInt(2)**BigInt(32)||c<-(BigInt(2)**BigInt(32)))&&(R=Q(R)),R+="n"),v+=` It must be ${s}. Received ${R}`,v},RangeError);function Q(t){let s="",c=t.length,v=t[0]==="-"?1:0;for(;c>=v+4;c-=3)s=`_${t.slice(c-3,c)}${s}`;return`${t.slice(0,c)}${s}`}l(Q,"H"),e(Q,"addNumericalSeparator");function fe(t,s,c){N(s,"offset"),(t[s]===void 0||t[s+c]===void 0)&&I(s,t.length-(c+1))}l(fe,"te"),e(fe,"checkBounds");function ve(t,s,c,v,R,C){if(t>c||t<s){let j=typeof s=="bigint"?"n":"",Z;throw s===0||s===BigInt(0)?Z=`>= 0${j} and < 2${j} ** ${(C+1)*8}${j}`:Z=`>= -(2${j} ** ${(C+1)*8-1}${j}) and < 2 ** ${(C+1)*8-1}${j}`,new Y.ERR_OUT_OF_RANGE("value",Z,t)}fe(v,R,C)}l(ve,"oe"),e(ve,"checkIntBI");function N(t,s){if(typeof t!="number")throw new Y.ERR_INVALID_ARG_TYPE(s,"number",t)}l(N,"I"),e(N,"validateNumber");function I(t,s,c){throw Math.floor(t)!==t?(N(t,c),new Y.ERR_OUT_OF_RANGE("offset","an integer",t)):s<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${s}`,t)}l(I,"x"),e(I,"boundsError");let D=/[^+/0-9A-Za-z-_]/g;function z(t){if(t=t.split("=")[0],t=t.trim().replace(D,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}l(z,"Y"),e(z,"base64clean");function Ee(t,s){s=s||1/0;let c,v=t.length,R=null,C=[];for(let j=0;j<v;++j){if(c=t.charCodeAt(j),c>55295&&c<57344){if(!R){if(c>56319){(s-=3)>-1&&C.push(239,191,189);continue}else if(j+1===v){(s-=3)>-1&&C.push(239,191,189);continue}R=c;continue}if(c<56320){(s-=3)>-1&&C.push(239,191,189),R=c;continue}c=(R-55296<<10|c-56320)+65536}else R&&(s-=3)>-1&&C.push(239,191,189);if(R=null,c<128){if((s-=1)<0)break;C.push(c)}else if(c<2048){if((s-=2)<0)break;C.push(c>>6|192,c&63|128)}else if(c<65536){if((s-=3)<0)break;C.push(c>>12|224,c>>6&63|128,c&63|128)}else if(c<1114112){if((s-=4)<0)break;C.push(c>>18|240,c>>12&63|128,c>>6&63|128,c&63|128)}else throw new Error("Invalid code point")}return C}l(Ee,"ue"),e(Ee,"utf8ToBytes");function Oe(t){let s=[];for(let c=0;c<t.length;++c)s.push(t.charCodeAt(c)&255);return s}l(Oe,"le"),e(Oe,"asciiToBytes");function be(t,s){let c,v,R,C=[];for(let j=0;j<t.length&&!((s-=2)<0);++j)c=t.charCodeAt(j),v=c>>8,R=c%256,C.push(R),C.push(v);return C}l(be,"ee"),e(be,"utf16leToBytes");function ge(t){return a.toByteArray(z(t))}l(ge,"ie"),e(ge,"base64ToBytes");function Ne(t,s,c,v){let R;for(R=0;R<v&&!(R+c>=s.length||R>=t.length);++R)s[R+c]=t[R];return R}l(Ne,"me"),e(Ne,"blitBuffer");function Ie(t,s){return t instanceof s||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===s.name}l(Ie,"ye"),e(Ie,"isInstance");function ke(t){return t!==t}l(ke,"ve"),e(ke,"numberIsNaN");let Ce=function(){let t="0123456789abcdef",s=new Array(256);for(let c=0;c<16;++c){let v=c*16;for(let R=0;R<16;++R)s[v+R]=t[c]+t[R]}return s}();function $e(t){return typeof BigInt>"u"?Ke:t}l($e,"Be"),e($e,"defineBigIntMethod");function Ke(){throw new Error("BigInt not supported")}return l(Ke,"Je"),e(Ke,"BufferBigIntNotDefined"),Di}l(mi,"Wi");function Ek(){if(kb)return Fl;kb=!0;var a=typeof Reflect=="object"?Reflect:null,i=a&&typeof a.apply=="function"?a.apply:e(function(A,x,U){return Function.prototype.apply.call(A,x,U)},"ReflectApply2"),f;a&&typeof a.ownKeys=="function"?f=a.ownKeys:Object.getOwnPropertySymbols?f=e(function(A){return Object.getOwnPropertyNames(A).concat(Object.getOwnPropertySymbols(A))},"ReflectOwnKeys2"):f=e(function(A){return Object.getOwnPropertyNames(A)},"ReflectOwnKeys2");function g(A){console&&console.warn&&console.warn(A)}l(g,"n"),e(g,"ProcessEmitWarning");var o=Number.isNaN||e(function(A){return A!==A},"NumberIsNaN2");function n(){n.init.call(this)}l(n,"s"),e(n,"EventEmitter2"),Fl=n,Fl.once=O,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._eventsCount=0,n.prototype._maxListeners=void 0;var r=10;function u(A){if(typeof A!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}l(u,"f"),e(u,"checkListener"),Object.defineProperty(n,"defaultMaxListeners",{enumerable:!0,get:e(function(){return r},"get"),set:e(function(A){if(typeof A!="number"||A<0||o(A))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+A+".");r=A},"set")}),n.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},n.prototype.setMaxListeners=e(function(A){if(typeof A!="number"||A<0||o(A))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+A+".");return this._maxListeners=A,this},"setMaxListeners");function p(A){return A._maxListeners===void 0?n.defaultMaxListeners:A._maxListeners}l(p,"h"),e(p,"_getMaxListeners"),n.prototype.getMaxListeners=e(function(){return p(this)},"getMaxListeners"),n.prototype.emit=e(function(A){for(var x=[],U=1;U<arguments.length;U++)x.push(arguments[U]);var M=A==="error",ee=this._events;if(ee!==void 0)M=M&&ee.error===void 0;else if(!M)return!1;if(M){var V;if(x.length>0&&(V=x[0]),V instanceof Error)throw V;var q=new Error("Unhandled error."+(V?" ("+V.message+")":""));throw q.context=V,q}var G=ee[A];if(G===void 0)return!1;if(typeof G=="function")i(G,this,x);else for(var re=G.length,ae=_(G,re),U=0;U<re;++U)i(ae[U],this,x);return!0},"emit2");function h(A,x,U,M){var ee,V,q;if(u(U),V=A._events,V===void 0?(V=A._events=Object.create(null),A._eventsCount=0):(V.newListener!==void 0&&(A.emit("newListener",x,U.listener?U.listener:U),V=A._events),q=V[x]),q===void 0)q=V[x]=U,++A._eventsCount;else if(typeof q=="function"?q=V[x]=M?[U,q]:[q,U]:M?q.unshift(U):q.push(U),ee=p(A),ee>0&&q.length>ee&&!q.warned){q.warned=!0;var G=new Error("Possible EventEmitter memory leak detected. "+q.length+" "+String(x)+" listeners added. Use emitter.setMaxListeners() to increase limit");G.name="MaxListenersExceededWarning",G.emitter=A,G.type=x,G.count=q.length,g(G)}return A}l(h,"c"),e(h,"_addListener"),n.prototype.addListener=e(function(A,x){return h(this,A,x,!1)},"addListener2"),n.prototype.on=n.prototype.addListener,n.prototype.prependListener=e(function(A,x){return h(this,A,x,!0)},"prependListener2");function d(){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)}l(d,"d"),e(d,"onceWrapper");function m(A,x,U){var M={fired:!1,wrapFn:void 0,target:A,type:x,listener:U},ee=d.bind(M);return ee.listener=U,M.wrapFn=ee,ee}l(m,"y"),e(m,"_onceWrap"),n.prototype.once=e(function(A,x){return u(x),this.on(A,m(this,A,x)),this},"once4"),n.prototype.prependOnceListener=e(function(A,x){return u(x),this.prependListener(A,m(this,A,x)),this},"prependOnceListener2"),n.prototype.removeListener=e(function(A,x){var U,M,ee,V,q;if(u(x),M=this._events,M===void 0)return this;if(U=M[A],U===void 0)return this;if(U===x||U.listener===x)--this._eventsCount===0?this._events=Object.create(null):(delete M[A],M.removeListener&&this.emit("removeListener",A,U.listener||x));else if(typeof U!="function"){for(ee=-1,V=U.length-1;V>=0;V--)if(U[V]===x||U[V].listener===x){q=U[V].listener,ee=V;break}if(ee<0)return this;ee===0?U.shift():S(U,ee),U.length===1&&(M[A]=U[0]),M.removeListener!==void 0&&this.emit("removeListener",A,q||x)}return this},"removeListener2"),n.prototype.off=n.prototype.removeListener,n.prototype.removeAllListeners=e(function(A){var x,U,M;if(U=this._events,U===void 0)return this;if(U.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):U[A]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete U[A]),this;if(arguments.length===0){var ee=Object.keys(U),V;for(M=0;M<ee.length;++M)V=ee[M],V!=="removeListener"&&this.removeAllListeners(V);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(x=U[A],typeof x=="function")this.removeListener(A,x);else if(x!==void 0)for(M=x.length-1;M>=0;M--)this.removeListener(A,x[M]);return this},"removeAllListeners2");function y(A,x,U){var M=A._events;if(M===void 0)return[];var ee=M[x];return ee===void 0?[]:typeof ee=="function"?U?[ee.listener||ee]:[ee]:U?T(ee):_(ee,ee.length)}l(y,"m"),e(y,"_listeners"),n.prototype.listeners=e(function(A){return y(this,A,!0)},"listeners2"),n.prototype.rawListeners=e(function(A){return y(this,A,!1)},"rawListeners"),n.listenerCount=function(A,x){return typeof A.listenerCount=="function"?A.listenerCount(x):w.call(A,x)},n.prototype.listenerCount=w;function w(A){var x=this._events;if(x!==void 0){var U=x[A];if(typeof U=="function")return 1;if(U!==void 0)return U.length}return 0}l(w,"g"),e(w,"listenerCount2"),n.prototype.eventNames=e(function(){return this._eventsCount>0?f(this._events):[]},"eventNames");function _(A,x){for(var U=new Array(x),M=0;M<x;++M)U[M]=A[M];return U}l(_,"v"),e(_,"arrayClone");function S(A,x){for(;x+1<A.length;x++)A[x]=A[x+1];A.pop()}l(S,"_"),e(S,"spliceOne");function T(A){for(var x=new Array(A.length),U=0;U<x.length;++U)x[U]=A[U].listener||A[U];return x}l(T,"b"),e(T,"unwrapListeners");function O(A,x){return new Promise(function(U,M){function ee(q){A.removeListener(x,V),M(q)}l(ee,"N"),e(ee,"errorListener");function V(){typeof A.removeListener=="function"&&A.removeListener("error",ee),U([].slice.call(arguments))}l(V,"L"),e(V,"resolver"),P(A,x,V,{once:!0}),x!=="error"&&E(A,ee,{once:!0})})}l(O,"E"),e(O,"once3");function E(A,x,U){typeof A.on=="function"&&P(A,"error",x,U)}l(E,"R"),e(E,"addErrorHandlerIfEventEmitter");function P(A,x,U,M){if(typeof A.on=="function")M.once?A.once(x,U):A.on(x,U);else if(typeof A.addEventListener=="function")A.addEventListener(x,e(l(function ee(V){M.once&&A.removeEventListener(x,ee),U(V)},"N"),"wrapListener"));else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof A)}return l(P,"T"),e(P,"eventTargetAgnosticAddListener"),Fl}l(Ek,"J4");function nd(a){throw new Error("Node.js process "+a+" is not supported by JSPM core outside of Node.js")}l(nd,"Dg");function C6(){!ya||!aa||(ya=!1,aa.length?Pn=aa.concat(Pn):Hl=-1,Pn.length&&kE())}l(C6,"Z4");function kE(){if(!ya){var a=setTimeout(C6,0);ya=!0;for(var i=Pn.length;i;){for(aa=Pn,Pn=[];++Hl<i;)aa&&aa[Hl].run();Hl=-1,i=Pn.length}aa=null,ya=!1,clearTimeout(a)}}l(kE,"Q2");function Sk(a){var i=new Array(arguments.length-1);if(arguments.length>1)for(var f=1;f<arguments.length;f++)i[f-1]=arguments[f];Pn.push(new Sb(a,i)),Pn.length===1&&!ya&&setTimeout(kE,0)}l(Sk,"Q4");function Sb(a,i){this.fun=a,this.array=i}l(Sb,"eR");function br(){}l(br,"Jt");function Ak(a){nd("_linkedBinding")}l(Ak,"mH");function Rk(a){nd("dlopen")}l(Rk,"bH");function Ok(){return[]}l(Ok,"_H");function kk(){return[]}l(kk,"EH");function Tk(a,i){if(!a)throw new Error(i||"assertion error")}l(Tk,"IH");function Fk(){return!1}l(Fk,"LH");function Bk(){return fi.now()/1e3}l(Bk,"ZH");function tu(a){var i=Math.floor((Date.now()-fi.now())*.001),f=fi.now()*.001,g=Math.floor(f)+i,o=Math.floor(f%1*1e9);return a&&(g=g-a[0],o=o-a[1],o<0&&(g--,o+=Qu)),[g,o]}l(tu,"Lg");function Yn(){return Mn}l(Yn,"zi");function xk(a){return[]}l(xk,"uW");function L6(){if(Tb)return bs;Tb=!0;var a=mi(),i=a.Buffer;function f(o,n){for(var r in o)n[r]=o[r]}l(f,"r"),e(f,"copyProps"),i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?bs=a:(f(a,bs),bs.Buffer=g);function g(o,n,r){return i(o,n,r)}return l(g,"n"),e(g,"SafeBuffer"),g.prototype=Object.create(i.prototype),f(i,g),g.from=function(o,n,r){if(typeof o=="number")throw new TypeError("Argument must not be a number");return i(o,n,r)},g.alloc=function(o,n,r){if(typeof o!="number")throw new TypeError("Argument must be a number");var u=i(o);return n!==void 0?typeof r=="string"?u.fill(n,r):u.fill(n):u.fill(0),u},g.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return i(o)},g.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return a.SlowBuffer(o)},bs}l(L6,"cW");function Ik(){if(Fb)return Xu;Fb=!0;var a=L6().Buffer,i=a.isEncoding||function(O){switch(O=""+O,O&&O.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 f(O){if(!O)return"utf8";for(var E;;)switch(O){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 O;default:if(E)return;O=(""+O).toLowerCase(),E=!0}}l(f,"r"),e(f,"_normalizeEncoding");function g(O){var E=f(O);if(typeof E!="string"&&(a.isEncoding===i||!i(O)))throw new Error("Unknown encoding: "+O);return E||O}l(g,"n"),e(g,"normalizeEncoding"),Xu.StringDecoder=o;function o(O){this.encoding=g(O);var E;switch(this.encoding){case"utf16le":this.text=m,this.end=y,E=4;break;case"utf8":this.fillLast=p,E=4;break;case"base64":this.text=w,this.end=_,E=3;break;default:this.write=S,this.end=T;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=a.allocUnsafe(E)}l(o,"a"),e(o,"StringDecoder2"),o.prototype.write=function(O){if(O.length===0)return"";var E,P;if(this.lastNeed){if(E=this.fillLast(O),E===void 0)return"";P=this.lastNeed,this.lastNeed=0}else P=0;return P<O.length?E?E+this.text(O,P):this.text(O,P):E||""},o.prototype.end=d,o.prototype.text=h,o.prototype.fillLast=function(O){if(this.lastNeed<=O.length)return O.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);O.copy(this.lastChar,this.lastTotal-this.lastNeed,0,O.length),this.lastNeed-=O.length};function n(O){return O<=127?0:O>>5===6?2:O>>4===14?3:O>>3===30?4:O>>6===2?-1:-2}l(n,"s"),e(n,"utf8CheckByte");function r(O,E,P){var A=E.length-1;if(A<P)return 0;var x=n(E[A]);return x>=0?(x>0&&(O.lastNeed=x-1),x):--A<P||x===-2?0:(x=n(E[A]),x>=0?(x>0&&(O.lastNeed=x-2),x):--A<P||x===-2?0:(x=n(E[A]),x>=0?(x>0&&(x===2?x=0:O.lastNeed=x-3),x):0))}l(r,"i"),e(r,"utf8CheckIncomplete");function u(O,E,P){if((E[0]&192)!==128)return O.lastNeed=0,"\uFFFD";if(O.lastNeed>1&&E.length>1){if((E[1]&192)!==128)return O.lastNeed=1,"\uFFFD";if(O.lastNeed>2&&E.length>2&&(E[2]&192)!==128)return O.lastNeed=2,"\uFFFD"}}l(u,"f"),e(u,"utf8CheckExtraBytes");function p(O){var E=this.lastTotal-this.lastNeed,P=u(this,O);if(P!==void 0)return P;if(this.lastNeed<=O.length)return O.copy(this.lastChar,E,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);O.copy(this.lastChar,E,0,O.length),this.lastNeed-=O.length}l(p,"h"),e(p,"utf8FillLast");function h(O,E){var P=r(this,O,E);if(!this.lastNeed)return O.toString("utf8",E);this.lastTotal=P;var A=O.length-(P-this.lastNeed);return O.copy(this.lastChar,0,A),O.toString("utf8",E,A)}l(h,"c"),e(h,"utf8Text");function d(O){var E=O&&O.length?this.write(O):"";return this.lastNeed?E+"\uFFFD":E}l(d,"d"),e(d,"utf8End");function m(O,E){if((O.length-E)%2===0){var P=O.toString("utf16le",E);if(P){var A=P.charCodeAt(P.length-1);if(A>=55296&&A<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=O[O.length-2],this.lastChar[1]=O[O.length-1],P.slice(0,-1)}return P}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=O[O.length-1],O.toString("utf16le",E,O.length-1)}l(m,"y"),e(m,"utf16Text");function y(O){var E=O&&O.length?this.write(O):"";if(this.lastNeed){var P=this.lastTotal-this.lastNeed;return E+this.lastChar.toString("utf16le",0,P)}return E}l(y,"m"),e(y,"utf16End");function w(O,E){var P=(O.length-E)%3;return P===0?O.toString("base64",E):(this.lastNeed=3-P,this.lastTotal=3,P===1?this.lastChar[0]=O[O.length-1]:(this.lastChar[0]=O[O.length-2],this.lastChar[1]=O[O.length-1]),O.toString("base64",E,O.length-P))}l(w,"g"),e(w,"base64Text");function _(O){var E=O&&O.length?this.write(O):"";return this.lastNeed?E+this.lastChar.toString("base64",0,3-this.lastNeed):E}l(_,"v"),e(_,"base64End");function S(O){return O.toString(this.encoding)}l(S,"_"),e(S,"simpleWrite");function T(O){return O&&O.length?this.write(O):""}return l(T,"b"),e(T,"simpleEnd"),Xu}l(Ik,"hW");function TE(){return xb||(xb=!0,Bb=e(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var a={},i=Symbol("test"),f=Object(i);if(typeof i=="string"||Object.prototype.toString.call(i)!=="[object Symbol]"||Object.prototype.toString.call(f)!=="[object Symbol]")return!1;var g=42;a[i]=g;for(i in a)return!1;if(typeof Object.keys=="function"&&Object.keys(a).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(a).length!==0)return!1;var o=Object.getOwnPropertySymbols(a);if(o.length!==1||o[0]!==i||!Object.prototype.propertyIsEnumerable.call(a,i))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var n=Object.getOwnPropertyDescriptor(a,i);if(n.value!==g||n.enumerable!==!0)return!1}return!0},"hasSymbols")),Bb}l(TE,"tR");function N6(){return Pb||(Pb=!0,Ib=Error),Ib}l(N6,"dW");function D6(){return Cb||(Cb=!0,jb=EvalError),jb}l(D6,"pW");function U6(){return Nb||(Nb=!0,Lb=RangeError),Lb}l(U6,"yW");function M6(){return Ub||(Ub=!0,Db=ReferenceError),Db}l(M6,"mW");function FE(){return $b||($b=!0,Mb=SyntaxError),Mb}l(FE,"rR");function yf(){return zb||(zb=!0,Wb=TypeError),Wb}l(yf,"vc");function $6(){return qb||(qb=!0,Hb=URIError),Hb}l($6,"gW");function W6(){if(Gb)return tc;Gb=!0;var a=typeof Symbol<"u"&&Symbol,i=TE();return tc=e(function(){return typeof a!="function"||typeof Symbol!="function"||typeof a("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:i()},"hasNativeSymbols"),tc}l(W6,"wW");function z6(){if(Vb)return rc;Vb=!0;var a={__proto__:null,foo:{}},i=Object;return rc=e(function(){return{__proto__:a}.foo===a.foo&&!(a instanceof i)},"hasProto"),rc}l(z6,"vW");function H6(){if(Kb)return nc;Kb=!0;var a="Function.prototype.bind called on incompatible ",i=Object.prototype.toString,f=Math.max,g="[object Function]",o=e(function(u,p){for(var h=[],d=0;d<u.length;d+=1)h[d]=u[d];for(var m=0;m<p.length;m+=1)h[m+u.length]=p[m];return h},"concatty2"),n=e(function(u,p){for(var h=[],d=p,m=0;d<u.length;d+=1,m+=1)h[m]=u[d];return h},"slicy2"),r=e(function(u,p){for(var h="",d=0;d<u.length;d+=1)h+=u[d],d+1<u.length&&(h+=p);return h},"joiny");return nc=e(function(u){var p=this;if(typeof p!="function"||i.apply(p)!==g)throw new TypeError(a+p);for(var h=n(arguments,1),d,m=e(function(){if(this instanceof d){var T=p.apply(this,o(h,arguments));return Object(T)===T?T:this}return p.apply(u,o(h,arguments))},"binder"),y=f(0,p.length-h.length),w=[],_=0;_<y;_++)w[_]="$"+_;if(d=Function("binder","return function ("+r(w,",")+"){ return binder.apply(this,arguments); }")(m),p.prototype){var S=e(function(){},"Empty2");S.prototype=p.prototype,d.prototype=new S,S.prototype=null}return d},"bind"),nc}l(H6,"bW");function _d(){if(Jb)return ic;Jb=!0;var a=H6();return ic=Function.prototype.bind||a,ic}l(_d,"Ug");function q6(){if(Yb)return oc;Yb=!0;var a=Function.prototype.call,i=Object.prototype.hasOwnProperty,f=_d();return oc=f.call(a,i),oc}l(q6,"_W");function Ks(){if(Zb)return ac;Zb=!0;var a,i=N6(),f=D6(),g=U6(),o=M6(),n=FE(),r=yf(),u=$6(),p=Function,h=e(function(Pe){try{return p('"use strict"; return ('+Pe+").constructor;")()}catch{}},"getEvalledConstructor"),d=Object.getOwnPropertyDescriptor;if(d)try{d({},"")}catch{d=null}var m=e(function(){throw new r},"throwTypeError"),y=d?function(){try{return arguments.callee,m}catch{try{return d(arguments,"callee").get}catch{return m}}}():m,w=W6()(),_=z6()(),S=Object.getPrototypeOf||(_?function(Pe){return Pe.__proto__}:null),T={},O=typeof Uint8Array>"u"||!S?a:S(Uint8Array),E={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?a:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?a:ArrayBuffer,"%ArrayIteratorPrototype%":w&&S?S([][Symbol.iterator]()):a,"%AsyncFromSyncIteratorPrototype%":a,"%AsyncFunction%":T,"%AsyncGenerator%":T,"%AsyncGeneratorFunction%":T,"%AsyncIteratorPrototype%":T,"%Atomics%":typeof Atomics>"u"?a:Atomics,"%BigInt%":typeof BigInt>"u"?a:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?a:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?a:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?a:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":f,"%Float32Array%":typeof Float32Array>"u"?a:Float32Array,"%Float64Array%":typeof Float64Array>"u"?a:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?a:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":T,"%Int8Array%":typeof Int8Array>"u"?a:Int8Array,"%Int16Array%":typeof Int16Array>"u"?a:Int16Array,"%Int32Array%":typeof Int32Array>"u"?a:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w&&S?S(S([][Symbol.iterator]())):a,"%JSON%":typeof JSON=="object"?JSON:a,"%Map%":typeof Map>"u"?a:Map,"%MapIteratorPrototype%":typeof Map>"u"||!w||!S?a:S(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?a:Promise,"%Proxy%":typeof Proxy>"u"?a:Proxy,"%RangeError%":g,"%ReferenceError%":o,"%Reflect%":typeof Reflect>"u"?a:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?a:Set,"%SetIteratorPrototype%":typeof Set>"u"||!w||!S?a:S(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?a:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w&&S?S(""[Symbol.iterator]()):a,"%Symbol%":w?Symbol:a,"%SyntaxError%":n,"%ThrowTypeError%":y,"%TypedArray%":O,"%TypeError%":r,"%Uint8Array%":typeof Uint8Array>"u"?a:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?a:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?a:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?a:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?a:WeakMap,"%WeakRef%":typeof WeakRef>"u"?a:WeakRef,"%WeakSet%":typeof WeakSet>"u"?a:WeakSet};if(S)try{null.error}catch(Pe){var P=S(S(Pe));E["%Error.prototype%"]=P}var A=e(l(function Pe(se){var Te;if(se==="%AsyncFunction%")Te=h("async function () {}");else if(se==="%GeneratorFunction%")Te=h("function* () {}");else if(se==="%AsyncGeneratorFunction%")Te=h("async function* () {}");else if(se==="%AsyncGenerator%"){var J=Pe("%AsyncGeneratorFunction%");J&&(Te=J.prototype)}else if(se==="%AsyncIteratorPrototype%"){var ue=Pe("%AsyncGenerator%");ue&&S&&(Te=S(ue.prototype))}return E[se]=Te,Te},"pe"),"doEval2"),x={__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"]},U=_d(),M=q6(),ee=U.call(Function.call,Array.prototype.concat),V=U.call(Function.apply,Array.prototype.splice),q=U.call(Function.call,String.prototype.replace),G=U.call(Function.call,String.prototype.slice),re=U.call(Function.call,RegExp.prototype.exec),ae=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,de=/\\(\\)?/g,we=e(function(Pe){var se=G(Pe,0,1),Te=G(Pe,-1);if(se==="%"&&Te!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(Te==="%"&&se!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var J=[];return q(Pe,ae,function(ue,te,X,ye){J[J.length]=X?q(ye,de,"$1"):te||ue}),J},"stringToPath2"),xe=e(function(Pe,se){var Te=Pe,J;if(M(x,Te)&&(J=x[Te],Te="%"+J[0]+"%"),M(E,Te)){var ue=E[Te];if(ue===T&&(ue=A(Te)),typeof ue>"u"&&!se)throw new r("intrinsic "+Pe+" exists, but is not available. Please file an issue!");return{alias:J,name:Te,value:ue}}throw new n("intrinsic "+Pe+" does not exist!")},"getBaseIntrinsic2");return ac=e(function(Pe,se){if(typeof Pe!="string"||Pe.length===0)throw new r("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof se!="boolean")throw new r('"allowMissing" argument must be a boolean');if(re(/^%?[^%]*%?$/,Pe)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Te=we(Pe),J=Te.length>0?Te[0]:"",ue=xe("%"+J+"%",se),te=ue.name,X=ue.value,ye=!1,Re=ue.alias;Re&&(J=Re[0],V(Te,ee([0,1],Re)));for(var De=1,Y=!0;De<Te.length;De+=1){var H=Te[De],Q=G(H,0,1),fe=G(H,-1);if((Q==='"'||Q==="'"||Q==="`"||fe==='"'||fe==="'"||fe==="`")&&Q!==fe)throw new n("property names with quotes must have matching quotes");if((H==="constructor"||!Y)&&(ye=!0),J+="."+H,te="%"+J+"%",M(E,te))X=E[te];else if(X!=null){if(!(H in X)){if(!se)throw new r("base intrinsic for "+Pe+" exists, but the property is not available.");return}if(d&&De+1>=Te.length){var ve=d(X,H);Y=!!ve,Y&&"get"in ve&&!("originalValue"in ve.get)?X=ve.get:X=X[H]}else Y=M(X,H),X=X[H];Y&&!ye&&(E[te]=X)}}return X},"GetIntrinsic"),ac}l(Ks,"Gl");function Ed(){if(Qb)return sc;Qb=!0;var a=Ks(),i=a("%Object.defineProperty%",!0)||!1;if(i)try{i({},"a",{value:1})}catch{i=!1}return sc=i,sc}l(Ed,"jg");function Sd(){if(Xb)return lc;Xb=!0;var a=Ks(),i=a("%Object.getOwnPropertyDescriptor%",!0);if(i)try{i([],"length")}catch{i=null}return lc=i,lc}l(Sd,"Hg");function G6(){if(e1)return fc;e1=!0;var a=Ed(),i=FE(),f=yf(),g=Sd();return fc=e(function(o,n,r){if(!o||typeof o!="object"&&typeof o!="function")throw new f("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new f("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new f("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new f("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new f("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new f("`loose`, if provided, must be a boolean");var u=arguments.length>3?arguments[3]:null,p=arguments.length>4?arguments[4]:null,h=arguments.length>5?arguments[5]:null,d=arguments.length>6?arguments[6]:!1,m=!!g&&g(o,n);if(a)a(o,n,{configurable:h===null&&m?m.configurable:!h,enumerable:u===null&&m?m.enumerable:!u,value:r,writable:p===null&&m?m.writable:!p});else if(d||!u&&!p&&!h)o[n]=r;else throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},"defineDataProperty"),fc}l(G6,"EW");function V6(){if(t1)return uc;t1=!0;var a=Ed(),i=e(function(){return!!a},"hasPropertyDescriptors2");return i.hasArrayLengthDefineBug=e(function(){if(!a)return null;try{return a([],"length",{value:1}).length!==1}catch{return!0}},"hasArrayLengthDefineBug"),uc=i,uc}l(V6,"SW");function K6(){if(r1)return cc;r1=!0;var a=Ks(),i=G6(),f=V6()(),g=Sd(),o=yf(),n=a("%Math.floor%");return cc=e(function(r,u){if(typeof r!="function")throw new o("`fn` is not a function");if(typeof u!="number"||u<0||u>4294967295||n(u)!==u)throw new o("`length` must be a positive 32-bit integer");var p=arguments.length>2&&!!arguments[2],h=!0,d=!0;if("length"in r&&g){var m=g(r,"length");m&&!m.configurable&&(h=!1),m&&!m.writable&&(d=!1)}return(h||d||!p)&&(f?i(r,"length",u,!0,!0):i(r,"length",u)),r},"setFunctionLength"),cc}l(K6,"AW");function BE(){if(n1)return vs;n1=!0;var a=_d(),i=Ks(),f=K6(),g=yf(),o=i("%Function.prototype.apply%"),n=i("%Function.prototype.call%"),r=i("%Reflect.apply%",!0)||a.call(n,o),u=Ed(),p=i("%Math.max%");vs=e(function(d){if(typeof d!="function")throw new g("a function is required");var m=r(a,n,arguments);return f(m,1+p(0,d.length-(arguments.length-1)),!0)},"callBind");var h=e(function(){return r(a,o,arguments)},"applyBind2");return u?u(vs,"apply",{value:h}):vs.apply=h,vs}l(BE,"nR");function xE(){if(i1)return hc;i1=!0;var a=Ks(),i=BE(),f=i(a("String.prototype.indexOf"));return hc=e(function(g,o){var n=a(g,!!o);return typeof n=="function"&&f(g,".prototype.")>-1?i(n):n},"callBoundIntrinsic"),hc}l(xE,"iR");function J6(){return o1||(o1=!0,typeof Object.create=="function"?dc=e(function(a,i){i&&(a.super_=i,a.prototype=Object.create(i.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}))},"inherits2"):dc=e(function(a,i){if(i){a.super_=i;var f=e(function(){},"TempCtor");f.prototype=i.prototype,a.prototype=new f,a.prototype.constructor=a}},"inherits2")),dc}l(J6,"RW");function Ad(){if(a1)return pc;a1=!0;var a=TE();return pc=e(function(){return a()&&!!Symbol.toStringTag},"hasToStringTagShams"),pc}l(Ad,"Wg");function Y6(){if(s1)return gc;s1=!0;var a=Ad()(),i=xE(),f=i("Object.prototype.toString"),g=e(function(r){return a&&r&&typeof r=="object"&&Symbol.toStringTag in r?!1:f(r)==="[object Arguments]"},"isArguments"),o=e(function(r){return g(r)?!0:r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&f(r)!=="[object Array]"&&f(r.callee)==="[object Function]"},"isArguments"),n=function(){return g(arguments)}();return g.isLegacyArguments=o,gc=n?g:o,gc}l(Y6,"TW");function Z6(){if(l1)return yc;l1=!0;var a=Object.prototype.toString,i=Function.prototype.toString,f=/^\s*(?:function)?\*/,g=Ad()(),o=Object.getPrototypeOf,n=e(function(){if(!g)return!1;try{return Function("return function*() {}")()}catch{}},"getGeneratorFunc"),r;return yc=e(function(u){if(typeof u!="function")return!1;if(f.test(i.call(u)))return!0;if(!g){var p=a.call(u);return p==="[object GeneratorFunction]"}if(!o)return!1;if(typeof r>"u"){var h=n();r=h?o(h):!1}return o(u)===r},"isGeneratorFunction"),yc}l(Z6,"FW");function Q6(){if(f1)return mc;f1=!0;var a=Function.prototype.toString,i=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,f,g;if(typeof i=="function"&&typeof Object.defineProperty=="function")try{f=Object.defineProperty({},"length",{get:e(function(){throw g},"get")}),g={},i(function(){throw 42},null,f)}catch(E){E!==g&&(i=null)}else i=null;var o=/^\s*class\b/,n=e(function(E){try{var P=a.call(E);return o.test(P)}catch{return!1}},"isES6ClassFunction"),r=e(function(E){try{return n(E)?!1:(a.call(E),!0)}catch{return!1}},"tryFunctionToStr"),u=Object.prototype.toString,p="[object Object]",h="[object Function]",d="[object GeneratorFunction]",m="[object HTMLAllCollection]",y="[object HTML document.all class]",w="[object HTMLCollection]",_=typeof Symbol=="function"&&!!Symbol.toStringTag,S=!(0 in[,]),T=e(function(){return!1},"isDocumentDotAll");if(typeof document=="object"){var O=document.all;u.call(O)===u.call(document.all)&&(T=e(function(E){if((S||!E)&&(typeof E>"u"||typeof E=="object"))try{var P=u.call(E);return(P===m||P===y||P===w||P===p)&&E("")==null}catch{}return!1},"isDocumentDotAll"))}return mc=e(i?function(E){if(T(E))return!0;if(!E||typeof E!="function"&&typeof E!="object")return!1;try{i(E,null,f)}catch(P){if(P!==g)return!1}return!n(E)&&r(E)}:function(E){if(T(E))return!0;if(!E||typeof E!="function"&&typeof E!="object")return!1;if(_)return r(E);if(n(E))return!1;var P=u.call(E);return P!==h&&P!==d&&!/^\[object HTML/.test(P)?!1:r(E)},"isCallable"),mc}l(Q6,"xW");function X6(){if(u1)return wc;u1=!0;var a=Q6(),i=Object.prototype.toString,f=Object.prototype.hasOwnProperty,g=e(function(u,p,h){for(var d=0,m=u.length;d<m;d++)f.call(u,d)&&(h==null?p(u[d],d,u):p.call(h,u[d],d,u))},"forEachArray2"),o=e(function(u,p,h){for(var d=0,m=u.length;d<m;d++)h==null?p(u.charAt(d),d,u):p.call(h,u.charAt(d),d,u)},"forEachString2"),n=e(function(u,p,h){for(var d in u)f.call(u,d)&&(h==null?p(u[d],d,u):p.call(h,u[d],d,u))},"forEachObject2"),r=e(function(u,p,h){if(!a(p))throw new TypeError("iterator must be a function");var d;arguments.length>=3&&(d=h),i.call(u)==="[object Array]"?g(u,p,d):typeof u=="string"?o(u,p,d):n(u,p,d)},"forEach2");return wc=r,wc}l(X6,"OW");function eP(){return h1||(h1=!0,c1=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),c1}l(eP,"PW");function tP(){if(d1)return bc;d1=!0;var a=eP(),i=typeof globalThis>"u"?lP:globalThis;return bc=e(function(){for(var f=[],g=0;g<a.length;g++)typeof i[a[g]]=="function"&&(f[f.length]=a[g]);return f},"availableTypedArrays"),bc}l(tP,"kW");function IE(){if(p1)return vc;p1=!0;var a=X6(),i=tP(),f=BE(),g=xE(),o=Sd(),n=g("Object.prototype.toString"),r=Ad()(),u=typeof globalThis>"u"?fP:globalThis,p=i(),h=g("String.prototype.slice"),d=Object.getPrototypeOf,m=g("Array.prototype.indexOf",!0)||e(function(S,T){for(var O=0;O<S.length;O+=1)if(S[O]===T)return O;return-1},"indexOf"),y={__proto__:null};r&&o&&d?a(p,function(S){var T=new u[S];if(Symbol.toStringTag in T){var O=d(T),E=o(O,Symbol.toStringTag);if(!E){var P=d(O);E=o(P,Symbol.toStringTag)}y["$"+S]=f(E.get)}}):a(p,function(S){var T=new u[S],O=T.slice||T.set;O&&(y["$"+S]=f(O))});var w=e(function(S){var T=!1;return a(y,function(O,E){if(!T)try{"$"+O(S)===E&&(T=h(E,1))}catch{}}),T},"tryAllTypedArrays"),_=e(function(S){var T=!1;return a(y,function(O,E){if(!T)try{O(S),T=h(E,1)}catch{}}),T},"tryAllSlices");return vc=e(function(S){if(!S||typeof S!="object")return!1;if(!r){var T=h(n(S),8,-1);return m(p,T)>-1?T:T!=="Object"?!1:_(S)}return o?w(S):null},"whichTypedArray"),vc}l(IE,"oR");function rP(){if(g1)return _c;g1=!0;var a=IE();return _c=e(function(i){return!!a(i)},"isTypedArray"),_c}l(rP,"CW");function nP(){if(y1)return Et;y1=!0;var a=Y6(),i=Z6(),f=IE(),g=rP();function o(be){return be.call.bind(be)}l(o,"a"),e(o,"uncurryThis");var n=typeof BigInt<"u",r=typeof Symbol<"u",u=o(Object.prototype.toString),p=o(Number.prototype.valueOf),h=o(String.prototype.valueOf),d=o(Boolean.prototype.valueOf);if(n)var m=o(BigInt.prototype.valueOf);if(r)var y=o(Symbol.prototype.valueOf);function w(be,ge){if(typeof be!="object")return!1;try{return ge(be),!0}catch{return!1}}l(w,"g"),e(w,"checkBoxedPrimitive"),Et.isArgumentsObject=a,Et.isGeneratorFunction=i,Et.isTypedArray=g;function _(be){return typeof Promise<"u"&&be instanceof Promise||be!==null&&typeof be=="object"&&typeof be.then=="function"&&typeof be.catch=="function"}l(_,"v"),e(_,"isPromise"),Et.isPromise=_;function S(be){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(be):g(be)||te(be)}l(S,"_"),e(S,"isArrayBufferView"),Et.isArrayBufferView=S;function T(be){return f(be)==="Uint8Array"}l(T,"b"),e(T,"isUint8Array"),Et.isUint8Array=T;function O(be){return f(be)==="Uint8ClampedArray"}l(O,"E"),e(O,"isUint8ClampedArray"),Et.isUint8ClampedArray=O;function E(be){return f(be)==="Uint16Array"}l(E,"R"),e(E,"isUint16Array"),Et.isUint16Array=E;function P(be){return f(be)==="Uint32Array"}l(P,"T"),e(P,"isUint32Array"),Et.isUint32Array=P;function A(be){return f(be)==="Int8Array"}l(A,"F"),e(A,"isInt8Array"),Et.isInt8Array=A;function x(be){return f(be)==="Int16Array"}l(x,"S"),e(x,"isInt16Array"),Et.isInt16Array=x;function U(be){return f(be)==="Int32Array"}l(U,"B"),e(U,"isInt32Array"),Et.isInt32Array=U;function M(be){return f(be)==="Float32Array"}l(M,"P"),e(M,"isFloat32Array"),Et.isFloat32Array=M;function ee(be){return f(be)==="Float64Array"}l(ee,"N"),e(ee,"isFloat64Array"),Et.isFloat64Array=ee;function V(be){return f(be)==="BigInt64Array"}l(V,"L"),e(V,"isBigInt64Array"),Et.isBigInt64Array=V;function q(be){return f(be)==="BigUint64Array"}l(q,"C"),e(q,"isBigUint64Array"),Et.isBigUint64Array=q;function G(be){return u(be)==="[object Map]"}l(G,"j"),e(G,"isMapToString"),G.working=typeof Map<"u"&&G(new Map);function re(be){return typeof Map>"u"?!1:G.working?G(be):be instanceof Map}l(re,"q"),e(re,"isMap"),Et.isMap=re;function ae(be){return u(be)==="[object Set]"}l(ae,"Z"),e(ae,"isSetToString"),ae.working=typeof Set<"u"&&ae(new Set);function de(be){return typeof Set>"u"?!1:ae.working?ae(be):be instanceof Set}l(de,"K"),e(de,"isSet"),Et.isSet=de;function we(be){return u(be)==="[object WeakMap]"}l(we,"se"),e(we,"isWeakMapToString"),we.working=typeof WeakMap<"u"&&we(new WeakMap);function xe(be){return typeof WeakMap>"u"?!1:we.working?we(be):be instanceof WeakMap}l(xe,"_e"),e(xe,"isWeakMap"),Et.isWeakMap=xe;function Pe(be){return u(be)==="[object WeakSet]"}l(Pe,"pe"),e(Pe,"isWeakSetToString"),Pe.working=typeof WeakSet<"u"&&Pe(new WeakSet);function se(be){return Pe(be)}l(se,"Q"),e(se,"isWeakSet"),Et.isWeakSet=se;function Te(be){return u(be)==="[object ArrayBuffer]"}l(Te,"he"),e(Te,"isArrayBufferToString"),Te.working=typeof ArrayBuffer<"u"&&Te(new ArrayBuffer);function J(be){return typeof ArrayBuffer>"u"?!1:Te.working?Te(be):be instanceof ArrayBuffer}l(J,"U"),e(J,"isArrayBuffer"),Et.isArrayBuffer=J;function ue(be){return u(be)==="[object DataView]"}l(ue,"J"),e(ue,"isDataViewToString"),ue.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&ue(new DataView(new ArrayBuffer(1),0,1));function te(be){return typeof DataView>"u"?!1:ue.working?ue(be):be instanceof DataView}l(te,"z"),e(te,"isDataView"),Et.isDataView=te;var X=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ye(be){return u(be)==="[object SharedArrayBuffer]"}l(ye,"G"),e(ye,"isSharedArrayBufferToString");function Re(be){return typeof X>"u"?!1:(typeof ye.working>"u"&&(ye.working=ye(new X)),ye.working?ye(be):be instanceof X)}l(Re,"fe"),e(Re,"isSharedArrayBuffer"),Et.isSharedArrayBuffer=Re;function De(be){return u(be)==="[object AsyncFunction]"}l(De,"be"),e(De,"isAsyncFunction"),Et.isAsyncFunction=De;function Y(be){return u(be)==="[object Map Iterator]"}l(Y,"D"),e(Y,"isMapIterator"),Et.isMapIterator=Y;function H(be){return u(be)==="[object Set Iterator]"}l(H,"$"),e(H,"isSetIterator"),Et.isSetIterator=H;function Q(be){return u(be)==="[object Generator]"}l(Q,"H"),e(Q,"isGeneratorObject"),Et.isGeneratorObject=Q;function fe(be){return u(be)==="[object WebAssembly.Module]"}l(fe,"te"),e(fe,"isWebAssemblyCompiledModule"),Et.isWebAssemblyCompiledModule=fe;function ve(be){return w(be,p)}l(ve,"oe"),e(ve,"isNumberObject"),Et.isNumberObject=ve;function N(be){return w(be,h)}l(N,"I"),e(N,"isStringObject"),Et.isStringObject=N;function I(be){return w(be,d)}l(I,"x"),e(I,"isBooleanObject"),Et.isBooleanObject=I;function D(be){return n&&w(be,m)}l(D,"M"),e(D,"isBigIntObject"),Et.isBigIntObject=D;function z(be){return r&&w(be,y)}l(z,"Y"),e(z,"isSymbolObject"),Et.isSymbolObject=z;function Ee(be){return ve(be)||N(be)||I(be)||D(be)||z(be)}l(Ee,"ue"),e(Ee,"isBoxedPrimitive"),Et.isBoxedPrimitive=Ee;function Oe(be){return typeof Uint8Array<"u"&&(J(be)||Re(be))}return l(Oe,"le"),e(Oe,"isAnyArrayBuffer"),Et.isAnyArrayBuffer=Oe,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(be){Object.defineProperty(Et,be,{enumerable:!1,value:e(function(){throw new Error(be+" is not supported in userland")},"value")})}),Et}l(nP,"LW");function iP(){return w1||(w1=!0,m1=e(function(a){return a&&typeof a=="object"&&typeof a.copy=="function"&&typeof a.fill=="function"&&typeof a.readUInt8=="function"},"isBuffer2")),m1}l(iP,"NW");function Pk(){if(b1)return St;b1=!0;var a=Mn,i=Object.getOwnPropertyDescriptors||e(function(te){for(var X=Object.keys(te),ye={},Re=0;Re<X.length;Re++)ye[X[Re]]=Object.getOwnPropertyDescriptor(te,X[Re]);return ye},"getOwnPropertyDescriptors2"),f=/%[sdj%]/g;St.format=function(te){if(!x(te)){for(var X=[],ye=0;ye<arguments.length;ye++)X.push(r(arguments[ye]));return X.join(" ")}for(var ye=1,Re=arguments,De=Re.length,Y=String(te).replace(f,function(fe){if(fe==="%%")return"%";if(ye>=De)return fe;switch(fe){case"%s":return String(Re[ye++]);case"%d":return Number(Re[ye++]);case"%j":try{return JSON.stringify(Re[ye++])}catch{return"[Circular]"}default:return fe}}),H=Re[ye];ye<De;H=Re[++ye])E(H)||!V(H)?Y+=" "+H:Y+=" "+r(H);return Y},St.deprecate=function(te,X){if(typeof a<"u"&&a.noDeprecation===!0)return te;if(typeof a>"u")return function(){return St.deprecate(te,X).apply(this||_s,arguments)};var ye=!1;function Re(){if(!ye){if(a.throwDeprecation)throw new Error(X);a.traceDeprecation?console.trace(X):console.error(X),ye=!0}return te.apply(this||_s,arguments)}return l(Re,"fe"),e(Re,"deprecated"),Re};var g={},o=/^$/;if(a.env.NODE_DEBUG){var n=a.env.NODE_DEBUG;n=n.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),o=new RegExp("^"+n+"$","i")}St.debuglog=function(te){if(te=te.toUpperCase(),!g[te])if(o.test(te)){var X=a.pid;g[te]=function(){var ye=St.format.apply(St,arguments);console.error("%s %d: %s",te,X,ye)}}else g[te]=function(){};return g[te]};function r(te,X){var ye={seen:[],stylize:p};return arguments.length>=3&&(ye.depth=arguments[2]),arguments.length>=4&&(ye.colors=arguments[3]),O(X)?ye.showHidden=X:X&&St._extend(ye,X),M(ye.showHidden)&&(ye.showHidden=!1),M(ye.depth)&&(ye.depth=2),M(ye.colors)&&(ye.colors=!1),M(ye.customInspect)&&(ye.customInspect=!0),ye.colors&&(ye.stylize=u),d(ye,te,ye.depth)}l(r,"i"),e(r,"inspect2"),St.inspect=r,r.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]},r.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function u(te,X){var ye=r.styles[X];return ye?"\x1B["+r.colors[ye][0]+"m"+te+"\x1B["+r.colors[ye][1]+"m":te}l(u,"f"),e(u,"stylizeWithColor");function p(te,X){return te}l(p,"h"),e(p,"stylizeNoColor");function h(te){var X={};return te.forEach(function(ye,Re){X[ye]=!0}),X}l(h,"c"),e(h,"arrayToHash");function d(te,X,ye){if(te.customInspect&&X&&re(X.inspect)&&X.inspect!==St.inspect&&!(X.constructor&&X.constructor.prototype===X)){var Re=X.inspect(ye,te);return x(Re)||(Re=d(te,Re,ye)),Re}var De=m(te,X);if(De)return De;var Y=Object.keys(X),H=h(Y);if(te.showHidden&&(Y=Object.getOwnPropertyNames(X)),G(X)&&(Y.indexOf("message")>=0||Y.indexOf("description")>=0))return y(X);if(Y.length===0){if(re(X)){var Q=X.name?": "+X.name:"";return te.stylize("[Function"+Q+"]","special")}if(ee(X))return te.stylize(RegExp.prototype.toString.call(X),"regexp");if(q(X))return te.stylize(Date.prototype.toString.call(X),"date");if(G(X))return y(X)}var fe="",ve=!1,N=["{","}"];if(T(X)&&(ve=!0,N=["[","]"]),re(X)){var I=X.name?": "+X.name:"";fe=" [Function"+I+"]"}if(ee(X)&&(fe=" "+RegExp.prototype.toString.call(X)),q(X)&&(fe=" "+Date.prototype.toUTCString.call(X)),G(X)&&(fe=" "+y(X)),Y.length===0&&(!ve||X.length==0))return N[0]+fe+N[1];if(ye<0)return ee(X)?te.stylize(RegExp.prototype.toString.call(X),"regexp"):te.stylize("[Object]","special");te.seen.push(X);var D;return ve?D=w(te,X,ye,H,Y):D=Y.map(function(z){return _(te,X,ye,H,z,ve)}),te.seen.pop(),S(D,fe,N)}l(d,"d"),e(d,"formatValue");function m(te,X){if(M(X))return te.stylize("undefined","undefined");if(x(X)){var ye="'"+JSON.stringify(X).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return te.stylize(ye,"string")}if(A(X))return te.stylize(""+X,"number");if(O(X))return te.stylize(""+X,"boolean");if(E(X))return te.stylize("null","null")}l(m,"y"),e(m,"formatPrimitive");function y(te){return"["+Error.prototype.toString.call(te)+"]"}l(y,"m"),e(y,"formatError");function w(te,X,ye,Re,De){for(var Y=[],H=0,Q=X.length;H<Q;++H)se(X,String(H))?Y.push(_(te,X,ye,Re,String(H),!0)):Y.push("");return De.forEach(function(fe){fe.match(/^\d+$/)||Y.push(_(te,X,ye,Re,fe,!0))}),Y}l(w,"g"),e(w,"formatArray");function _(te,X,ye,Re,De,Y){var H,Q,fe;if(fe=Object.getOwnPropertyDescriptor(X,De)||{value:X[De]},fe.get?fe.set?Q=te.stylize("[Getter/Setter]","special"):Q=te.stylize("[Getter]","special"):fe.set&&(Q=te.stylize("[Setter]","special")),se(Re,De)||(H="["+De+"]"),Q||(te.seen.indexOf(fe.value)<0?(E(ye)?Q=d(te,fe.value,null):Q=d(te,fe.value,ye-1),Q.indexOf(`
|
|
9
|
-
`)>-1&&(Y?Q=Q.split(`
|
|
10
|
-
`).map(function(ve){return" "+ve}).join(`
|
|
11
|
-
`).slice(2):Q=`
|
|
12
|
-
`+Q.split(`
|
|
13
|
-
`).map(function(ve){return" "+ve}).join(`
|
|
14
|
-
`))):Q=te.stylize("[Circular]","special")),M(H)){if(Y&&De.match(/^\d+$/))return Q;H=JSON.stringify(""+De),H.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(H=H.slice(1,-1),H=te.stylize(H,"name")):(H=H.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),H=te.stylize(H,"string"))}return H+": "+Q}l(_,"v"),e(_,"formatProperty");function S(te,X,ye){var Re=te.reduce(function(De,Y){return Y.indexOf(`
|
|
15
|
-
`)>=0,De+Y.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Re>60?ye[0]+(X===""?"":X+`
|
|
16
|
-
`)+" "+te.join(`,
|
|
17
|
-
`)+" "+ye[1]:ye[0]+X+" "+te.join(", ")+" "+ye[1]}l(S,"_"),e(S,"reduceToSingleString"),St.types=nP();function T(te){return Array.isArray(te)}l(T,"b"),e(T,"isArray2"),St.isArray=T;function O(te){return typeof te=="boolean"}l(O,"E"),e(O,"isBoolean2"),St.isBoolean=O;function E(te){return te===null}l(E,"R"),e(E,"isNull2"),St.isNull=E;function P(te){return te==null}l(P,"T"),e(P,"isNullOrUndefined2"),St.isNullOrUndefined=P;function A(te){return typeof te=="number"}l(A,"F"),e(A,"isNumber2"),St.isNumber=A;function x(te){return typeof te=="string"}l(x,"S"),e(x,"isString2"),St.isString=x;function U(te){return typeof te=="symbol"}l(U,"B"),e(U,"isSymbol2"),St.isSymbol=U;function M(te){return te===void 0}l(M,"P"),e(M,"isUndefined2"),St.isUndefined=M;function ee(te){return V(te)&&de(te)==="[object RegExp]"}l(ee,"N"),e(ee,"isRegExp2"),St.isRegExp=ee,St.types.isRegExp=ee;function V(te){return typeof te=="object"&&te!==null}l(V,"L"),e(V,"isObject2"),St.isObject=V;function q(te){return V(te)&&de(te)==="[object Date]"}l(q,"C"),e(q,"isDate2"),St.isDate=q,St.types.isDate=q;function G(te){return V(te)&&(de(te)==="[object Error]"||te instanceof Error)}l(G,"j"),e(G,"isError2"),St.isError=G,St.types.isNativeError=G;function re(te){return typeof te=="function"}l(re,"q"),e(re,"isFunction2"),St.isFunction=re;function ae(te){return te===null||typeof te=="boolean"||typeof te=="number"||typeof te=="string"||typeof te=="symbol"||typeof te>"u"}l(ae,"Z"),e(ae,"isPrimitive2"),St.isPrimitive=ae,St.isBuffer=iP();function de(te){return Object.prototype.toString.call(te)}l(de,"K"),e(de,"objectToString");function we(te){return te<10?"0"+te.toString(10):te.toString(10)}l(we,"se"),e(we,"pad");var xe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Pe(){var te=new Date,X=[we(te.getHours()),we(te.getMinutes()),we(te.getSeconds())].join(":");return[te.getDate(),xe[te.getMonth()],X].join(" ")}l(Pe,"pe"),e(Pe,"timestamp"),St.log=function(){console.log("%s - %s",Pe(),St.format.apply(St,arguments))},St.inherits=J6(),St._extend=function(te,X){if(!X||!V(X))return te;for(var ye=Object.keys(X),Re=ye.length;Re--;)te[ye[Re]]=X[ye[Re]];return te};function se(te,X){return Object.prototype.hasOwnProperty.call(te,X)}l(se,"Q"),e(se,"hasOwnProperty");var Te=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;St.promisify=e(function(te){if(typeof te!="function")throw new TypeError('The "original" argument must be of type Function');if(Te&&te[Te]){if(X=te[Te],typeof X!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(X,Te,{value:X,enumerable:!1,writable:!1,configurable:!0}),X}function X(){for(var ye,Re,De=new Promise(function(Q,fe){ye=Q,Re=fe}),Y=[],H=0;H<arguments.length;H++)Y.push(arguments[H]);Y.push(function(Q,fe){Q?Re(Q):ye(fe)});try{te.apply(this||_s,Y)}catch(Q){Re(Q)}return De}return l(X,"G"),e(X,"fn"),Object.setPrototypeOf(X,Object.getPrototypeOf(te)),Te&&Object.defineProperty(X,Te,{value:X,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(X,i(te))},"promisify2"),St.promisify.custom=Te;function J(te,X){if(!te){var ye=new Error("Promise was rejected with a falsy value");ye.reason=te,te=ye}return X(te)}l(J,"U"),e(J,"callbackifyOnRejected");function ue(te){if(typeof te!="function")throw new TypeError('The "original" argument must be of type Function');function X(){for(var ye=[],Re=0;Re<arguments.length;Re++)ye.push(arguments[Re]);var De=ye.pop();if(typeof De!="function")throw new TypeError("The last argument must be of type Function");var Y=this||_s,H=e(function(){return De.apply(Y,arguments)},"cb");te.apply(this||_s,ye).then(function(Q){a.nextTick(H.bind(null,null,Q))},function(Q){a.nextTick(J.bind(null,Q,H))})}return l(X,"V"),e(X,"callbackified"),Object.setPrototypeOf(X,Object.getPrototypeOf(te)),Object.defineProperties(X,i(te)),X}return l(ue,"J"),e(ue,"callbackify2"),St.callbackify=ue,St}l(Pk,"DW");function Zt(){return _1||(_1=!0,v1={ArrayIsArray(a){return Array.isArray(a)},ArrayPrototypeIncludes(a,i){return a.includes(i)},ArrayPrototypeIndexOf(a,i){return a.indexOf(i)},ArrayPrototypeJoin(a,i){return a.join(i)},ArrayPrototypeMap(a,i){return a.map(i)},ArrayPrototypePop(a,i){return a.pop(i)},ArrayPrototypePush(a,i){return a.push(i)},ArrayPrototypeSlice(a,i,f){return a.slice(i,f)},Error,FunctionPrototypeCall(a,i,...f){return a.call(i,...f)},FunctionPrototypeSymbolHasInstance(a,i){return Function.prototype[Symbol.hasInstance].call(a,i)},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(a,i){return Object.defineProperties(a,i)},ObjectDefineProperty(a,i,f){return Object.defineProperty(a,i,f)},ObjectGetOwnPropertyDescriptor(a,i){return Object.getOwnPropertyDescriptor(a,i)},ObjectKeys(a){return Object.keys(a)},ObjectSetPrototypeOf(a,i){return Object.setPrototypeOf(a,i)},Promise,PromisePrototypeCatch(a,i){return a.catch(i)},PromisePrototypeThen(a,i,f){return a.then(i,f)},PromiseReject(a){return Promise.reject(a)},PromiseResolve(a){return Promise.resolve(a)},ReflectApply:Reflect.apply,RegExpPrototypeTest(a,i){return a.test(i)},SafeSet:Set,String,StringPrototypeSlice(a,i,f){return a.slice(i,f)},StringPrototypeToLowerCase(a){return a.toLowerCase()},StringPrototypeToUpperCase(a){return a.toUpperCase()},StringPrototypeTrim(a){return a.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(a,i,f){return a.set(i,f)},Boolean,Uint8Array}),v1}l(Zt,"_t");function Hs(){if(E1)return Es;E1=!0;let{AbortController:a,AbortSignal:i}=typeof self<"u"?self:typeof window<"u"?window:void 0;return Es=a,Es.AbortSignal=i,Es.default=a,Es}l(Hs,"Vl");function Sr(){var y;if(S1)return Bl;S1=!0;let a=mi(),{kResistStopPropagation:i,SymbolDispose:f}=Zt(),g=globalThis.AbortSignal||Hs().AbortSignal,o=globalThis.AbortController||Hs().AbortController,n=Object.getPrototypeOf(async function(){}).constructor,r=globalThis.Blob||a.Blob,u=e(typeof r<"u"?function(w){return w instanceof r}:function(w){return!1},"isBlob2"),p=e((w,_)=>{if(w!==void 0&&(w===null||typeof w!="object"||!("aborted"in w)))throw new ERR_INVALID_ARG_TYPE(_,"AbortSignal",w)},"validateAbortSignal"),h=e((w,_)=>{if(typeof w!="function")throw new ERR_INVALID_ARG_TYPE(_,"Function",w)},"validateFunction"),d=(y=class extends Error{constructor(_){if(!Array.isArray(_))throw new TypeError(`Expected input to be an Array, got ${typeof _}`);let S="";for(let T=0;T<_.length;T++)S+=` ${_[T].stack}
|
|
18
|
-
`;super(S),this.name="AggregateError",this.errors=_}},l(y,"y"),y);return e(d,"AggregateError2"),Bl={AggregateError:d,kEmptyObject:Object.freeze({}),once(w){let _=!1;return function(...S){_||(_=!0,w.apply(this,S))}},createDeferredPromise:e(function(){let w,_;return{promise:new Promise((S,T)=>{w=S,_=T}),resolve:w,reject:_}},"createDeferredPromise"),promisify(w){return new Promise((_,S)=>{w((T,...O)=>T?S(T):_(...O))})},debuglog(){return function(){}},format(w,..._){return w.replace(/%([sdifj])/g,function(...[S,T]){let O=_.shift();return T==="f"?O.toFixed(6):T==="j"?JSON.stringify(O):T==="s"&&typeof O=="object"?`${O.constructor!==Object?O.constructor.name:""} {}`.trim():O.toString()})},inspect(w){switch(typeof w){case"string":if(w.includes("'"))if(w.includes('"')){if(!w.includes("`")&&!w.includes("${"))return`\`${w}\``}else return`"${w}"`;return`'${w}'`;case"number":return isNaN(w)?"NaN":Object.is(w,-0)?String(w):w;case"bigint":return`${String(w)}n`;case"boolean":case"undefined":return String(w);case"object":return"{}"}},types:{isAsyncFunction(w){return w instanceof n},isArrayBufferView(w){return ArrayBuffer.isView(w)}},isBlob:u,deprecate(w,_){return w},addAbortListener:di.addAbortListener||e(function(w,_){if(w===void 0)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",w);p(w,"signal"),h(_,"listener");let S;return w.aborted?queueMicrotask(()=>_()):(w.addEventListener("abort",_,{__proto__:null,once:!0,[i]:!0}),S=e(()=>{w.removeEventListener("abort",_)},"removeEventListener")),{__proto__:null,[f](){var T;(T=S)===null||T===void 0||T()}}},"addAbortListener"),AbortSignalAny:g.any||e(function(w){if(w.length===1)return w[0];let _=new o,S=e(()=>_.abort(),"abort2");return w.forEach(T=>{p(T,"signals"),T.addEventListener("abort",S,{once:!0})}),_.signal.addEventListener("abort",()=>{w.forEach(T=>T.removeEventListener("abort",S))},{once:!0}),_.signal},"AbortSignalAny")},Bl.promisify.custom=Symbol.for("nodejs.util.promisify.custom"),Bl}l(Sr,"ar");function Pr(){var O;if(A1)return Ec;A1=!0;let{format:a,inspect:i,AggregateError:f}=Sr(),g=globalThis.AggregateError||f,o=Symbol("kIsNodeError"),n=["string","function","number","object","Function","Object","boolean","bigint","symbol"],r=/^([A-Z][a-z0-9]*)+$/,u="__node_internal_",p={};function h(E,P){if(!E)throw new p.ERR_INTERNAL_ASSERTION(P)}l(h,"c"),e(h,"assert2");function d(E){let P="",A=E.length,x=E[0]==="-"?1:0;for(;A>=x+4;A-=3)P=`_${E.slice(A-3,A)}${P}`;return`${E.slice(0,A)}${P}`}l(d,"d"),e(d,"addNumericalSeparator");function m(E,P,A){if(typeof P=="function")return h(P.length<=A.length,`Code: ${E}; The provided arguments length (${A.length}) does not match the required ones (${P.length}).`),P(...A);let x=(P.match(/%[dfijoOs]/g)||[]).length;return h(x===A.length,`Code: ${E}; The provided arguments length (${A.length}) does not match the required ones (${x}).`),A.length===0?P:a(P,...A)}l(m,"y"),e(m,"getMessage");function y(E,P,A){var M;A||(A=Error);let x=(M=class extends A{constructor(...V){super(m(E,P,V))}toString(){return`${this.name} [${E}]: ${this.message}`}},l(M,"S"),M);e(x,"NodeError");let U=x;Object.defineProperties(U.prototype,{name:{value:A.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${E}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),U.prototype.code=E,U.prototype[o]=!0,p[E]=U}l(y,"m"),e(y,"E");function w(E){let P=u+E.name;return Object.defineProperty(E,"name",{value:P}),E}l(w,"g"),e(w,"hideStackFrames");function _(E,P){if(E&&P&&E!==P){if(Array.isArray(P.errors))return P.errors.push(E),P;let A=new g([P,E],P.message);return A.code=P.code,A}return E||P}l(_,"v"),e(_,"aggregateTwoErrors");let S=(O=class extends Error{constructor(P="The operation was aborted",A=void 0){if(A!==void 0&&typeof A!="object")throw new p.ERR_INVALID_ARG_TYPE("options","Object",A);super(P,A),this.code="ABORT_ERR",this.name="AbortError"}},l(O,"b"),O);e(S,"AbortError");let T=S;return y("ERR_ASSERTION","%s",Error),y("ERR_INVALID_ARG_TYPE",(E,P,A)=>{h(typeof E=="string","'name' must be a string"),Array.isArray(P)||(P=[P]);let x="The ";E.endsWith(" argument")?x+=`${E} `:x+=`"${E}" ${E.includes(".")?"property":"argument"} `,x+="must be ";let U=[],M=[],ee=[];for(let q of P)h(typeof q=="string","All expected entries have to be of type string"),n.includes(q)?U.push(q.toLowerCase()):r.test(q)?M.push(q):(h(q!=="object",'The value "object" should be written as "Object"'),ee.push(q));if(M.length>0){let q=U.indexOf("object");q!==-1&&(U.splice(U,q,1),M.push("Object"))}if(U.length>0){switch(U.length){case 1:x+=`of type ${U[0]}`;break;case 2:x+=`one of type ${U[0]} or ${U[1]}`;break;default:{let q=U.pop();x+=`one of type ${U.join(", ")}, or ${q}`}}(M.length>0||ee.length>0)&&(x+=" or ")}if(M.length>0){switch(M.length){case 1:x+=`an instance of ${M[0]}`;break;case 2:x+=`an instance of ${M[0]} or ${M[1]}`;break;default:{let q=M.pop();x+=`an instance of ${M.join(", ")}, or ${q}`}}ee.length>0&&(x+=" or ")}switch(ee.length){case 0:break;case 1:ee[0].toLowerCase()!==ee[0]&&(x+="an "),x+=`${ee[0]}`;break;case 2:x+=`one of ${ee[0]} or ${ee[1]}`;break;default:{let q=ee.pop();x+=`one of ${ee.join(", ")}, or ${q}`}}if(A==null)x+=`. Received ${A}`;else if(typeof A=="function"&&A.name)x+=`. Received function ${A.name}`;else if(typeof A=="object"){var V;if((V=A.constructor)!==null&&V!==void 0&&V.name)x+=`. Received an instance of ${A.constructor.name}`;else{let q=i(A,{depth:-1});x+=`. Received ${q}`}}else{let q=i(A,{colors:!1});q.length>25&&(q=`${q.slice(0,25)}...`),x+=`. Received type ${typeof A} (${q})`}return x},TypeError),y("ERR_INVALID_ARG_VALUE",(E,P,A="is invalid")=>{let x=i(P);return x.length>128&&(x=x.slice(0,128)+"..."),`The ${E.includes(".")?"property":"argument"} '${E}' ${A}. Received ${x}`},TypeError),y("ERR_INVALID_RETURN_VALUE",(E,P,A)=>{var x;let U=A!=null&&(x=A.constructor)!==null&&x!==void 0&&x.name?`instance of ${A.constructor.name}`:`type ${typeof A}`;return`Expected ${E} to be returned from the "${P}" function but got ${U}.`},TypeError),y("ERR_MISSING_ARGS",(...E)=>{h(E.length>0,"At least one arg needs to be specified");let P,A=E.length;switch(E=(Array.isArray(E)?E:[E]).map(x=>`"${x}"`).join(" or "),A){case 1:P+=`The ${E[0]} argument`;break;case 2:P+=`The ${E[0]} and ${E[1]} arguments`;break;default:{let x=E.pop();P+=`The ${E.join(", ")}, and ${x} arguments`}break}return`${P} must be specified`},TypeError),y("ERR_OUT_OF_RANGE",(E,P,A)=>{h(P,'Missing "range" argument');let x;return Number.isInteger(A)&&Math.abs(A)>2**32?x=d(String(A)):typeof A=="bigint"?(x=String(A),(A>2n**32n||A<-(2n**32n))&&(x=d(x)),x+="n"):x=i(A),`The value of "${E}" is out of range. It must be ${P}. Received ${x}`},RangeError),y("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),y("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),y("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),y("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),y("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),y("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),y("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),y("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),y("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),y("ERR_STREAM_WRITE_AFTER_END","write after end",Error),y("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),Ec={AbortError:T,aggregateTwoErrors:w(_),hideStackFrames:w,codes:p},Ec}l(Pr,"dr");function Js(){if(R1)return Sc;R1=!0;let{ArrayIsArray:a,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:f,ArrayPrototypeMap:g,NumberIsInteger:o,NumberIsNaN:n,NumberMAX_SAFE_INTEGER:r,NumberMIN_SAFE_INTEGER:u,NumberParseInt:p,ObjectPrototypeHasOwnProperty:h,RegExpPrototypeExec:d,String:m,StringPrototypeToUpperCase:y,StringPrototypeTrim:w}=Zt(),{hideStackFrames:_,codes:{ERR_SOCKET_BAD_PORT:S,ERR_INVALID_ARG_TYPE:T,ERR_INVALID_ARG_VALUE:O,ERR_OUT_OF_RANGE:E,ERR_UNKNOWN_SIGNAL:P}}=Pr(),{normalizeEncoding:A}=Sr(),{isAsyncFunction:x,isArrayBufferView:U}=Sr().types,M={};function ee(ge){return ge===(ge|0)}l(ee,"N"),e(ee,"isInt32");function V(ge){return ge===ge>>>0}l(V,"L"),e(V,"isUint32");let q=/^[0-7]+$/,G="must be a 32-bit unsigned integer or an octal string";function re(ge,Ne,Ie){if(typeof ge>"u"&&(ge=Ie),typeof ge=="string"){if(d(q,ge)===null)throw new O(Ne,ge,G);ge=p(ge,8)}return we(ge,Ne),ge}l(re,"q"),e(re,"parseFileMode");let ae=_((ge,Ne,Ie=u,ke=r)=>{if(typeof ge!="number")throw new T(Ne,"number",ge);if(!o(ge))throw new E(Ne,"an integer",ge);if(ge<Ie||ge>ke)throw new E(Ne,`>= ${Ie} && <= ${ke}`,ge)}),de=_((ge,Ne,Ie=-2147483648,ke=2147483647)=>{if(typeof ge!="number")throw new T(Ne,"number",ge);if(!o(ge))throw new E(Ne,"an integer",ge);if(ge<Ie||ge>ke)throw new E(Ne,`>= ${Ie} && <= ${ke}`,ge)}),we=_((ge,Ne,Ie=!1)=>{if(typeof ge!="number")throw new T(Ne,"number",ge);if(!o(ge))throw new E(Ne,"an integer",ge);let ke=Ie?1:0,Ce=4294967295;if(ge<ke||ge>Ce)throw new E(Ne,`>= ${ke} && <= ${Ce}`,ge)});function xe(ge,Ne){if(typeof ge!="string")throw new T(Ne,"string",ge)}l(xe,"_e"),e(xe,"validateString");function Pe(ge,Ne,Ie=void 0,ke){if(typeof ge!="number")throw new T(Ne,"number",ge);if(Ie!=null&&ge<Ie||ke!=null&&ge>ke||(Ie!=null||ke!=null)&&n(ge))throw new E(Ne,`${Ie!=null?`>= ${Ie}`:""}${Ie!=null&&ke!=null?" && ":""}${ke!=null?`<= ${ke}`:""}`,ge)}l(Pe,"pe"),e(Pe,"validateNumber");let se=_((ge,Ne,Ie)=>{if(!i(Ie,ge)){let ke="must be one of: "+f(g(Ie,Ce=>typeof Ce=="string"?`'${Ce}'`:m(Ce)),", ");throw new O(Ne,ge,ke)}});function Te(ge,Ne){if(typeof ge!="boolean")throw new T(Ne,"boolean",ge)}l(Te,"he"),e(Te,"validateBoolean");function J(ge,Ne,Ie){return ge==null||!h(ge,Ne)?Ie:ge[Ne]}l(J,"U"),e(J,"getOwnPropertyValueOrDefault");let ue=_((ge,Ne,Ie=null)=>{let ke=J(Ie,"allowArray",!1),Ce=J(Ie,"allowFunction",!1);if(!J(Ie,"nullable",!1)&&ge===null||!ke&&a(ge)||typeof ge!="object"&&(!Ce||typeof ge!="function"))throw new T(Ne,"Object",ge)}),te=_((ge,Ne)=>{if(ge!=null&&typeof ge!="object"&&typeof ge!="function")throw new T(Ne,"a dictionary",ge)}),X=_((ge,Ne,Ie=0)=>{if(!a(ge))throw new T(Ne,"Array",ge);if(ge.length<Ie){let ke=`must be longer than ${Ie}`;throw new O(Ne,ge,ke)}});function ye(ge,Ne){X(ge,Ne);for(let Ie=0;Ie<ge.length;Ie++)xe(ge[Ie],`${Ne}[${Ie}]`)}l(ye,"G"),e(ye,"validateStringArray");function Re(ge,Ne){X(ge,Ne);for(let Ie=0;Ie<ge.length;Ie++)Te(ge[Ie],`${Ne}[${Ie}]`)}l(Re,"fe"),e(Re,"validateBooleanArray");function De(ge,Ne){X(ge,Ne);for(let Ie=0;Ie<ge.length;Ie++){let ke=ge[Ie],Ce=`${Ne}[${Ie}]`;if(ke==null)throw new T(Ce,"AbortSignal",ke);ve(ke,Ce)}}l(De,"be"),e(De,"validateAbortSignalArray");function Y(ge,Ne="signal"){if(xe(ge,Ne),M[ge]===void 0)throw M[y(ge)]!==void 0?new P(ge+" (signals must use all capital letters)"):new P(ge)}l(Y,"D"),e(Y,"validateSignalName");let H=_((ge,Ne="buffer")=>{if(!U(ge))throw new T(Ne,["Buffer","TypedArray","DataView"],ge)});function Q(ge,Ne){let Ie=A(Ne),ke=ge.length;if(Ie==="hex"&&ke%2!==0)throw new O("encoding",Ne,`is invalid for data of length ${ke}`)}l(Q,"H"),e(Q,"validateEncoding");function fe(ge,Ne="Port",Ie=!0){if(typeof ge!="number"&&typeof ge!="string"||typeof ge=="string"&&w(ge).length===0||+ge!==+ge>>>0||ge>65535||ge===0&&!Ie)throw new S(Ne,ge,Ie);return ge|0}l(fe,"te"),e(fe,"validatePort");let ve=_((ge,Ne)=>{if(ge!==void 0&&(ge===null||typeof ge!="object"||!("aborted"in ge)))throw new T(Ne,"AbortSignal",ge)}),N=_((ge,Ne)=>{if(typeof ge!="function")throw new T(Ne,"Function",ge)}),I=_((ge,Ne)=>{if(typeof ge!="function"||x(ge))throw new T(Ne,"Function",ge)}),D=_((ge,Ne)=>{if(ge!==void 0)throw new T(Ne,"undefined",ge)});function z(ge,Ne,Ie){if(!i(Ie,ge))throw new T(Ne,`('${f(Ie,"|")}')`,ge)}l(z,"Y"),e(z,"validateUnion");let Ee=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function Oe(ge,Ne){if(typeof ge>"u"||!d(Ee,ge))throw new O(Ne,ge,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}l(Oe,"le"),e(Oe,"validateLinkHeaderFormat");function be(ge){if(typeof ge=="string")return Oe(ge,"hints"),ge;if(a(ge)){let Ne=ge.length,Ie="";if(Ne===0)return Ie;for(let ke=0;ke<Ne;ke++){let Ce=ge[ke];Oe(Ce,"hints"),Ie+=Ce,ke!==Ne-1&&(Ie+=", ")}return Ie}throw new O("hints",ge,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}return l(be,"ee"),e(be,"validateLinkHeaderValue"),Sc={isInt32:ee,isUint32:V,parseFileMode:re,validateArray:X,validateStringArray:ye,validateBooleanArray:Re,validateAbortSignalArray:De,validateBoolean:Te,validateBuffer:H,validateDictionary:te,validateEncoding:Q,validateFunction:N,validateInt32:de,validateInteger:ae,validateNumber:Pe,validateObject:ue,validateOneOf:se,validatePlainFunction:I,validatePort:fe,validateSignalName:Y,validateString:xe,validateUint32:we,validateUndefined:D,validateUnion:z,validateAbortSignal:ve,validateLinkHeaderValue:be},Sc}l(Js,"Yl");function Un(){if(O1)return Ac;O1=!0;let{SymbolAsyncIterator:a,SymbolIterator:i,SymbolFor:f}=Zt(),g=f("nodejs.stream.destroyed"),o=f("nodejs.stream.errored"),n=f("nodejs.stream.readable"),r=f("nodejs.stream.writable"),u=f("nodejs.stream.disturbed"),p=f("nodejs.webstream.isClosedPromise"),h=f("nodejs.webstream.controllerErrorFunction");function d(J,ue=!1){var te;return!!(J&&typeof J.pipe=="function"&&typeof J.on=="function"&&(!ue||typeof J.pause=="function"&&typeof J.resume=="function")&&(!J._writableState||((te=J._readableState)===null||te===void 0?void 0:te.readable)!==!1)&&(!J._writableState||J._readableState))}l(d,"d"),e(d,"isReadableNodeStream");function m(J){var ue;return!!(J&&typeof J.write=="function"&&typeof J.on=="function"&&(!J._readableState||((ue=J._writableState)===null||ue===void 0?void 0:ue.writable)!==!1))}l(m,"y"),e(m,"isWritableNodeStream");function y(J){return!!(J&&typeof J.pipe=="function"&&J._readableState&&typeof J.on=="function"&&typeof J.write=="function")}l(y,"m"),e(y,"isDuplexNodeStream");function w(J){return J&&(J._readableState||J._writableState||typeof J.write=="function"&&typeof J.on=="function"||typeof J.pipe=="function"&&typeof J.on=="function")}l(w,"g"),e(w,"isNodeStream");function _(J){return!!(J&&!w(J)&&typeof J.pipeThrough=="function"&&typeof J.getReader=="function"&&typeof J.cancel=="function")}l(_,"v"),e(_,"isReadableStream");function S(J){return!!(J&&!w(J)&&typeof J.getWriter=="function"&&typeof J.abort=="function")}l(S,"_"),e(S,"isWritableStream");function T(J){return!!(J&&!w(J)&&typeof J.readable=="object"&&typeof J.writable=="object")}l(T,"b"),e(T,"isTransformStream");function O(J){return _(J)||S(J)||T(J)}l(O,"E"),e(O,"isWebStream");function E(J,ue){return J==null?!1:ue===!0?typeof J[a]=="function":ue===!1?typeof J[i]=="function":typeof J[a]=="function"||typeof J[i]=="function"}l(E,"R"),e(E,"isIterable");function P(J){if(!w(J))return null;let ue=J._writableState,te=J._readableState,X=ue||te;return!!(J.destroyed||J[g]||X!=null&&X.destroyed)}l(P,"T"),e(P,"isDestroyed");function A(J){if(!m(J))return null;if(J.writableEnded===!0)return!0;let ue=J._writableState;return ue!=null&&ue.errored?!1:typeof ue?.ended!="boolean"?null:ue.ended}l(A,"F"),e(A,"isWritableEnded");function x(J,ue){if(!m(J))return null;if(J.writableFinished===!0)return!0;let te=J._writableState;return te!=null&&te.errored?!1:typeof te?.finished!="boolean"?null:!!(te.finished||ue===!1&&te.ended===!0&&te.length===0)}l(x,"S"),e(x,"isWritableFinished");function U(J){if(!d(J))return null;if(J.readableEnded===!0)return!0;let ue=J._readableState;return!ue||ue.errored?!1:typeof ue?.ended!="boolean"?null:ue.ended}l(U,"B"),e(U,"isReadableEnded");function M(J,ue){if(!d(J))return null;let te=J._readableState;return te!=null&&te.errored?!1:typeof te?.endEmitted!="boolean"?null:!!(te.endEmitted||ue===!1&&te.ended===!0&&te.length===0)}l(M,"P"),e(M,"isReadableFinished");function ee(J){return J&&J[n]!=null?J[n]:typeof J?.readable!="boolean"?null:P(J)?!1:d(J)&&J.readable&&!M(J)}l(ee,"N"),e(ee,"isReadable");function V(J){return J&&J[r]!=null?J[r]:typeof J?.writable!="boolean"?null:P(J)?!1:m(J)&&J.writable&&!A(J)}l(V,"L"),e(V,"isWritable");function q(J,ue){return w(J)?P(J)?!0:!(ue?.readable!==!1&&ee(J)||ue?.writable!==!1&&V(J)):null}l(q,"C"),e(q,"isFinished");function G(J){var ue,te;return w(J)?J.writableErrored?J.writableErrored:(ue=(te=J._writableState)===null||te===void 0?void 0:te.errored)!==null&&ue!==void 0?ue:null:null}l(G,"j"),e(G,"isWritableErrored");function re(J){var ue,te;return w(J)?J.readableErrored?J.readableErrored:(ue=(te=J._readableState)===null||te===void 0?void 0:te.errored)!==null&&ue!==void 0?ue:null:null}l(re,"q"),e(re,"isReadableErrored");function ae(J){if(!w(J))return null;if(typeof J.closed=="boolean")return J.closed;let ue=J._writableState,te=J._readableState;return typeof ue?.closed=="boolean"||typeof te?.closed=="boolean"?ue?.closed||te?.closed:typeof J._closed=="boolean"&&de(J)?J._closed:null}l(ae,"Z"),e(ae,"isClosed");function de(J){return typeof J._closed=="boolean"&&typeof J._defaultKeepAlive=="boolean"&&typeof J._removedConnection=="boolean"&&typeof J._removedContLen=="boolean"}l(de,"K"),e(de,"isOutgoingMessage");function we(J){return typeof J._sent100=="boolean"&&de(J)}l(we,"se"),e(we,"isServerResponse");function xe(J){var ue;return typeof J._consuming=="boolean"&&typeof J._dumped=="boolean"&&((ue=J.req)===null||ue===void 0?void 0:ue.upgradeOrConnect)===void 0}l(xe,"_e"),e(xe,"isServerRequest");function Pe(J){if(!w(J))return null;let ue=J._writableState,te=J._readableState,X=ue||te;return!X&&we(J)||!!(X&&X.autoDestroy&&X.emitClose&&X.closed===!1)}l(Pe,"pe"),e(Pe,"willEmitClose");function se(J){var ue;return!!(J&&((ue=J[u])!==null&&ue!==void 0?ue:J.readableDidRead||J.readableAborted))}l(se,"Q"),e(se,"isDisturbed");function Te(J){var ue,te,X,ye,Re,De,Y,H,Q,fe;return!!(J&&((ue=(te=(X=(ye=(Re=(De=J[o])!==null&&De!==void 0?De:J.readableErrored)!==null&&Re!==void 0?Re:J.writableErrored)!==null&&ye!==void 0?ye:(Y=J._readableState)===null||Y===void 0?void 0:Y.errorEmitted)!==null&&X!==void 0?X:(H=J._writableState)===null||H===void 0?void 0:H.errorEmitted)!==null&&te!==void 0?te:(Q=J._readableState)===null||Q===void 0?void 0:Q.errored)!==null&&ue!==void 0?ue:!((fe=J._writableState)===null||fe===void 0)&&fe.errored))}return l(Te,"he"),e(Te,"isErrored"),Ac={isDestroyed:P,kIsDestroyed:g,isDisturbed:se,kIsDisturbed:u,isErrored:Te,kIsErrored:o,isReadable:ee,kIsReadable:n,kIsClosedPromise:p,kControllerErrorFunction:h,kIsWritable:r,isClosed:ae,isDuplexNodeStream:y,isFinished:q,isIterable:E,isReadableNodeStream:d,isReadableStream:_,isReadableEnded:U,isReadableFinished:M,isReadableErrored:re,isNodeStream:w,isWebStream:O,isWritable:V,isWritableNodeStream:m,isWritableStream:S,isWritableEnded:A,isWritableFinished:x,isWritableErrored:G,isServerRequest:xe,isServerResponse:we,willEmitClose:Pe,isTransformStream:T},Ac}l(Un,"Zn");function wi(){if(k1)return xl;k1=!0;let a=Mn,{AbortError:i,codes:f}=Pr(),{ERR_INVALID_ARG_TYPE:g,ERR_STREAM_PREMATURE_CLOSE:o}=f,{kEmptyObject:n,once:r}=Sr(),{validateAbortSignal:u,validateFunction:p,validateObject:h,validateBoolean:d}=Js(),{Promise:m,PromisePrototypeThen:y,SymbolDispose:w}=Zt(),{isClosed:_,isReadable:S,isReadableNodeStream:T,isReadableStream:O,isReadableFinished:E,isReadableErrored:P,isWritable:A,isWritableNodeStream:x,isWritableStream:U,isWritableFinished:M,isWritableErrored:ee,isNodeStream:V,willEmitClose:q,kIsClosedPromise:G}=Un(),re;function ae(se){return se.setHeader&&typeof se.abort=="function"}l(ae,"Z"),e(ae,"isRequest");let de=e(()=>{},"nop");function we(se,Te,J){var ue,te;if(arguments.length===2?(J=Te,Te=n):Te==null?Te=n:h(Te,"options"),p(J,"callback"),u(Te.signal,"options.signal"),J=r(J),O(se)||U(se))return xe(se,Te,J);if(!V(se))throw new g("stream",["ReadableStream","WritableStream","Stream"],se);let X=(ue=Te.readable)!==null&&ue!==void 0?ue:T(se),ye=(te=Te.writable)!==null&&te!==void 0?te:x(se),Re=se._writableState,De=se._readableState,Y=e(()=>{se.writable||fe()},"onlegacyfinish"),H=q(se)&&T(se)===X&&x(se)===ye,Q=M(se,!1),fe=e(()=>{Q=!0,se.destroyed&&(H=!1),!(H&&(!se.readable||X))&&(!X||ve)&&J.call(se)},"onfinish"),ve=E(se,!1),N=e(()=>{ve=!0,se.destroyed&&(H=!1),!(H&&(!se.writable||ye))&&(!ye||Q)&&J.call(se)},"onend"),I=e(ge=>{J.call(se,ge)},"onerror"),D=_(se),z=e(()=>{D=!0;let ge=ee(se)||P(se);if(ge&&typeof ge!="boolean")return J.call(se,ge);if(X&&!ve&&T(se,!0)&&!E(se,!1))return J.call(se,new o);if(ye&&!Q&&!M(se,!1))return J.call(se,new o);J.call(se)},"onclose"),Ee=e(()=>{D=!0;let ge=ee(se)||P(se);if(ge&&typeof ge!="boolean")return J.call(se,ge);J.call(se)},"onclosed"),Oe=e(()=>{se.req.on("finish",fe)},"onrequest");ae(se)?(se.on("complete",fe),H||se.on("abort",z),se.req?Oe():se.on("request",Oe)):ye&&!Re&&(se.on("end",Y),se.on("close",Y)),!H&&typeof se.aborted=="boolean"&&se.on("aborted",z),se.on("end",N),se.on("finish",fe),Te.error!==!1&&se.on("error",I),se.on("close",z),D?a.nextTick(z):Re!=null&&Re.errorEmitted||De!=null&&De.errorEmitted?H||a.nextTick(Ee):(!X&&(!H||S(se))&&(Q||A(se)===!1)||!ye&&(!H||A(se))&&(ve||S(se)===!1)||De&&se.req&&se.aborted)&&a.nextTick(Ee);let be=e(()=>{J=de,se.removeListener("aborted",z),se.removeListener("complete",fe),se.removeListener("abort",z),se.removeListener("request",Oe),se.req&&se.req.removeListener("finish",fe),se.removeListener("end",Y),se.removeListener("close",Y),se.removeListener("finish",fe),se.removeListener("end",N),se.removeListener("error",I),se.removeListener("close",z)},"cleanup");if(Te.signal&&!D){let ge=e(()=>{let Ne=J;be(),Ne.call(se,new i(void 0,{cause:Te.signal.reason}))},"abort2");if(Te.signal.aborted)a.nextTick(ge);else{re=re||Sr().addAbortListener;let Ne=re(Te.signal,ge),Ie=J;J=r((...ke)=>{Ne[w](),Ie.apply(se,ke)})}}return be}l(we,"se"),e(we,"eos");function xe(se,Te,J){let ue=!1,te=de;if(Te.signal)if(te=e(()=>{ue=!0,J.call(se,new i(void 0,{cause:Te.signal.reason}))},"abort2"),Te.signal.aborted)a.nextTick(te);else{re=re||Sr().addAbortListener;let ye=re(Te.signal,te),Re=J;J=r((...De)=>{ye[w](),Re.apply(se,De)})}let X=e((...ye)=>{ue||a.nextTick(()=>J.apply(se,ye))},"resolverFn");return y(se[G].promise,X,X),de}l(xe,"_e"),e(xe,"eosWeb");function Pe(se,Te){var J;let ue=!1;return Te===null&&(Te=n),(J=Te)!==null&&J!==void 0&&J.cleanup&&(d(Te.cleanup,"cleanup"),ue=Te.cleanup),new m((te,X)=>{let ye=we(se,Te,Re=>{ue&&ye(),Re?X(Re):te()})})}return l(Pe,"pe"),e(Pe,"finished2"),xl=we,xl.finished=Pe,xl}l(wi,"Vi");function Ba(){if(T1)return Rc;T1=!0;let a=Mn,{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:f},AbortError:g}=Pr(),{Symbol:o}=Zt(),{kIsDestroyed:n,isDestroyed:r,isFinished:u,isServerRequest:p}=Un(),h=o("kDestroy"),d=o("kConstruct");function m(q,G,re){q&&(q.stack,G&&!G.errored&&(G.errored=q),re&&!re.errored&&(re.errored=q))}l(m,"y"),e(m,"checkError");function y(q,G){let re=this._readableState,ae=this._writableState,de=ae||re;return ae!=null&&ae.destroyed||re!=null&&re.destroyed?(typeof G=="function"&&G(),this):(m(q,ae,re),ae&&(ae.destroyed=!0),re&&(re.destroyed=!0),de.constructed?w(this,q,G):this.once(h,function(we){w(this,i(we,q),G)}),this)}l(y,"m"),e(y,"destroy");function w(q,G,re){let ae=!1;function de(we){if(ae)return;ae=!0;let xe=q._readableState,Pe=q._writableState;m(we,Pe,xe),Pe&&(Pe.closed=!0),xe&&(xe.closed=!0),typeof re=="function"&&re(we),we?a.nextTick(_,q,we):a.nextTick(S,q)}l(de,"K"),e(de,"onDestroy");try{q._destroy(G||null,de)}catch(we){de(we)}}l(w,"g"),e(w,"_destroy");function _(q,G){T(q,G),S(q)}l(_,"v"),e(_,"emitErrorCloseNT");function S(q){let G=q._readableState,re=q._writableState;re&&(re.closeEmitted=!0),G&&(G.closeEmitted=!0),(re!=null&&re.emitClose||G!=null&&G.emitClose)&&q.emit("close")}l(S,"_"),e(S,"emitCloseNT");function T(q,G){let re=q._readableState,ae=q._writableState;ae!=null&&ae.errorEmitted||re!=null&&re.errorEmitted||(ae&&(ae.errorEmitted=!0),re&&(re.errorEmitted=!0),q.emit("error",G))}l(T,"b"),e(T,"emitErrorNT");function O(){let q=this._readableState,G=this._writableState;q&&(q.constructed=!0,q.closed=!1,q.closeEmitted=!1,q.destroyed=!1,q.errored=null,q.errorEmitted=!1,q.reading=!1,q.ended=q.readable===!1,q.endEmitted=q.readable===!1),G&&(G.constructed=!0,G.destroyed=!1,G.closed=!1,G.closeEmitted=!1,G.errored=null,G.errorEmitted=!1,G.finalCalled=!1,G.prefinished=!1,G.ended=G.writable===!1,G.ending=G.writable===!1,G.finished=G.writable===!1)}l(O,"E"),e(O,"undestroy");function E(q,G,re){let ae=q._readableState,de=q._writableState;if(de!=null&&de.destroyed||ae!=null&&ae.destroyed)return this;ae!=null&&ae.autoDestroy||de!=null&&de.autoDestroy?q.destroy(G):G&&(G.stack,de&&!de.errored&&(de.errored=G),ae&&!ae.errored&&(ae.errored=G),re?a.nextTick(T,q,G):T(q,G))}l(E,"R"),e(E,"errorOrDestroy");function P(q,G){if(typeof q._construct!="function")return;let re=q._readableState,ae=q._writableState;re&&(re.constructed=!1),ae&&(ae.constructed=!1),q.once(d,G),!(q.listenerCount(d)>1)&&a.nextTick(A,q)}l(P,"T"),e(P,"construct");function A(q){let G=!1;function re(ae){if(G){E(q,ae??new f);return}G=!0;let de=q._readableState,we=q._writableState,xe=we||de;de&&(de.constructed=!0),we&&(we.constructed=!0),xe.destroyed?q.emit(h,ae):ae?E(q,ae,!0):a.nextTick(x,q)}l(re,"q"),e(re,"onConstruct");try{q._construct(ae=>{a.nextTick(re,ae)})}catch(ae){a.nextTick(re,ae)}}l(A,"F"),e(A,"constructNT");function x(q){q.emit(d)}l(x,"S"),e(x,"emitConstructNT");function U(q){return q?.setHeader&&typeof q.abort=="function"}l(U,"B"),e(U,"isRequest");function M(q){q.emit("close")}l(M,"P"),e(M,"emitCloseLegacy");function ee(q,G){q.emit("error",G),a.nextTick(M,q)}l(ee,"N"),e(ee,"emitErrorCloseLegacy");function V(q,G){!q||r(q)||(!G&&!u(q)&&(G=new g),p(q)?(q.socket=null,q.destroy(G)):U(q)?q.abort():U(q.req)?q.req.abort():typeof q.destroy=="function"?q.destroy(G):typeof q.close=="function"?q.close():G?a.nextTick(ee,q,G):a.nextTick(M,q),q.destroyed||(q[n]=!0))}return l(V,"L"),e(V,"destroyer"),Rc={construct:P,destroyer:V,destroy:y,undestroy:O,errorOrDestroy:E},Rc}l(Ba,"ts");function Rd(){if(F1)return Oc;F1=!0;let{ArrayIsArray:a,ObjectSetPrototypeOf:i}=Zt(),{EventEmitter:f}=di;function g(n){f.call(this,n)}l(g,"n"),e(g,"Stream2"),i(g.prototype,f.prototype),i(g,f),g.prototype.pipe=function(n,r){let u=this;function p(S){n.writable&&n.write(S)===!1&&u.pause&&u.pause()}l(p,"h"),e(p,"ondata"),u.on("data",p);function h(){u.readable&&u.resume&&u.resume()}l(h,"c"),e(h,"ondrain"),n.on("drain",h),!n._isStdio&&(!r||r.end!==!1)&&(u.on("end",m),u.on("close",y));let d=!1;function m(){d||(d=!0,n.end())}l(m,"y"),e(m,"onend");function y(){d||(d=!0,typeof n.destroy=="function"&&n.destroy())}l(y,"m"),e(y,"onclose");function w(S){_(),f.listenerCount(this,"error")===0&&this.emit("error",S)}l(w,"g"),e(w,"onerror"),o(u,"error",w),o(n,"error",w);function _(){u.removeListener("data",p),n.removeListener("drain",h),u.removeListener("end",m),u.removeListener("close",y),u.removeListener("error",w),n.removeListener("error",w),u.removeListener("end",_),u.removeListener("close",_),n.removeListener("close",_)}return l(_,"v"),e(_,"cleanup"),u.on("end",_),u.on("close",_),n.on("close",_),n.emit("pipe",u),n};function o(n,r,u){if(typeof n.prependListener=="function")return n.prependListener(r,u);!n._events||!n._events[r]?n.on(r,u):a(n._events[r])?n._events[r].unshift(u):n._events[r]=[u,n._events[r]]}return l(o,"a"),e(o,"prependListener2"),Oc={Stream:g,prependListener:o},Oc}l(Rd,"qg");function mf(){if(B1)return Ss;B1=!0;let{SymbolDispose:a}=Zt(),{AbortError:i,codes:f}=Pr(),{isNodeStream:g,isWebStream:o,kControllerErrorFunction:n}=Un(),r=wi(),{ERR_INVALID_ARG_TYPE:u}=f,p,h=e((d,m)=>{if(typeof d!="object"||!("aborted"in d))throw new u(m,"AbortSignal",d)},"validateAbortSignal");return Ss.addAbortSignal=e(function(d,m){if(h(d,"signal"),!g(m)&&!o(m))throw new u("stream",["ReadableStream","WritableStream","Stream"],m);return Ss.addAbortSignalNoValidate(d,m)},"addAbortSignal"),Ss.addAbortSignalNoValidate=function(d,m){if(typeof d!="object"||!("aborted"in d))return m;let y=g(m)?()=>{m.destroy(new i(void 0,{cause:d.reason}))}:()=>{m[n](new i(void 0,{cause:d.reason}))};if(d.aborted)y();else{p=p||Sr().addAbortListener;let w=p(d,y);r(m,w[a])}return m},Ss}l(mf,"bc");function oP(){var u;var a;if(x1)return kc;x1=!0;let{StringPrototypeSlice:i,SymbolIterator:f,TypedArrayPrototypeSet:g,Uint8Array:o}=Zt(),{Buffer:n}=mi(),{inspect:r}=Sr();return kc=(a=(u=class{constructor(){this.head=null,this.tail=null,this.length=0}push(h){let d={data:h,next:null};this.length>0?this.tail.next=d:this.head=d,this.tail=d,++this.length}unshift(h){let d={data:h,next:this.head};this.length===0&&(this.tail=d),this.head=d,++this.length}shift(){if(this.length===0)return;let h=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,h}clear(){this.head=this.tail=null,this.length=0}join(h){if(this.length===0)return"";let d=this.head,m=""+d.data;for(;(d=d.next)!==null;)m+=h+d.data;return m}concat(h){if(this.length===0)return n.alloc(0);let d=n.allocUnsafe(h>>>0),m=this.head,y=0;for(;m;)g(d,m.data,y),y+=m.data.length,m=m.next;return d}consume(h,d){let m=this.head.data;if(h<m.length){let y=m.slice(0,h);return this.head.data=m.slice(h),y}return h===m.length?this.shift():d?this._getString(h):this._getBuffer(h)}first(){return this.head.data}*[f](){for(let h=this.head;h;h=h.next)yield h.data}_getString(h){let d="",m=this.head,y=0;do{let w=m.data;if(h>w.length)d+=w,h-=w.length;else{h===w.length?(d+=w,++y,m.next?this.head=m.next:this.head=this.tail=null):(d+=i(w,0,h),this.head=m,m.data=i(w,h));break}++y}while((m=m.next)!==null);return this.length-=y,d}_getBuffer(h){let d=n.allocUnsafe(h),m=h,y=this.head,w=0;do{let _=y.data;if(h>_.length)g(d,_,m-h),h-=_.length;else{h===_.length?(g(d,_,m-h),++w,y.next?this.head=y.next:this.head=this.tail=null):(g(d,new o(_.buffer,_.byteOffset,h),m-h),this.head=y,y.data=_.slice(h));break}++w}while((y=y.next)!==null);return this.length-=w,d}[Symbol.for("nodejs.util.inspect.custom")](h,d){return r(this,{...d,depth:0,customInspect:!1})}},l(u,"i"),u),e(a,"BufferList"),a),kc}l(oP,"$W");function wf(){if(I1)return Tc;I1=!0;let{MathFloor:a,NumberIsInteger:i}=Zt(),{validateInteger:f}=Js(),{ERR_INVALID_ARG_VALUE:g}=Pr().codes,o=16*1024,n=16;function r(d,m,y){return d.highWaterMark!=null?d.highWaterMark:m?d[y]:null}l(r,"i"),e(r,"highWaterMarkFrom");function u(d){return d?n:o}l(u,"f"),e(u,"getDefaultHighWaterMark");function p(d,m){f(m,"value",0),d?n=m:o=m}l(p,"h"),e(p,"setDefaultHighWaterMark");function h(d,m,y,w){let _=r(m,w,y);if(_!=null){if(!i(_)||_<0){let S=w?`options.${y}`:"options.highWaterMark";throw new g(S,_)}return a(_)}return u(d.objectMode)}return l(h,"c"),e(h,"getHighWaterMark"),Tc={getHighWaterMark:h,getDefaultHighWaterMark:u,setDefaultHighWaterMark:p},Tc}l(wf,"_c");function PE(){if(P1)return Fc;P1=!0;let a=Mn,{PromisePrototypeThen:i,SymbolAsyncIterator:f,SymbolIterator:g}=Zt(),{Buffer:o}=mi(),{ERR_INVALID_ARG_TYPE:n,ERR_STREAM_NULL_VALUES:r}=Pr().codes;function u(p,h,d){let m;if(typeof h=="string"||h instanceof o)return new p({objectMode:!0,...d,read(){this.push(h),this.push(null)}});let y;if(h&&h[f])y=!0,m=h[f]();else if(h&&h[g])y=!1,m=h[g]();else throw new n("iterable",["Iterable"],h);let w=new p({objectMode:!0,highWaterMark:1,...d}),_=!1;w._read=function(){_||(_=!0,T())},w._destroy=function(O,E){i(S(O),()=>a.nextTick(E,O),P=>a.nextTick(E,P||O))};async function S(O){let E=O!=null,P=typeof m.throw=="function";if(E&&P){let{value:A,done:x}=await m.throw(O);if(await A,x)return}if(typeof m.return=="function"){let{value:A}=await m.return();await A}}l(S,"_"),e(S,"close");async function T(){for(;;){try{let{value:O,done:E}=y?await m.next():m.next();if(E)w.push(null);else{let P=O&&typeof O.then=="function"?await O:O;if(P===null)throw _=!1,new r;if(w.push(P))continue;_=!1}}catch(O){w.destroy(O)}break}}return l(T,"b"),e(T,"next"),w}return l(u,"f"),e(u,"from"),Fc=u,Fc}l(PE,"aR");function bf(){if(j1)return Bc;j1=!0;let a=Mn,{ArrayPrototypeIndexOf:i,NumberIsInteger:f,NumberIsNaN:g,NumberParseInt:o,ObjectDefineProperties:n,ObjectKeys:r,ObjectSetPrototypeOf:u,Promise:p,SafeSet:h,SymbolAsyncDispose:d,SymbolAsyncIterator:m,Symbol:y}=Zt();Bc=ke,ke.ReadableState=Ie;let{EventEmitter:w}=di,{Stream:_,prependListener:S}=Rd(),{Buffer:T}=mi(),{addAbortSignal:O}=mf(),E=wi(),P=Sr().debuglog("stream",me=>{P=me}),A=oP(),x=Ba(),{getHighWaterMark:U,getDefaultHighWaterMark:M}=wf(),{aggregateTwoErrors:ee,codes:{ERR_INVALID_ARG_TYPE:V,ERR_METHOD_NOT_IMPLEMENTED:q,ERR_OUT_OF_RANGE:G,ERR_STREAM_PUSH_AFTER_EOF:re,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:ae},AbortError:de}=Pr(),{validateObject:we}=Js(),xe=y("kPaused"),{StringDecoder:Pe}=ec,se=PE();u(ke.prototype,_.prototype),u(ke,_);let Te=e(()=>{},"nop"),{errorOrDestroy:J}=x,ue=1,te=2,X=4,ye=8,Re=16,De=32,Y=64,H=128,Q=256,fe=512,ve=1024,N=2048,I=4096,D=8192,z=16384,Ee=32768,Oe=65536,be=1<<17,ge=1<<18;function Ne(me){return{enumerable:!1,get(){return((this||Ze).state&me)!==0},set(Se){Se?(this||Ze).state|=me:(this||Ze).state&=~me}}}l(Ne,"me"),e(Ne,"makeBitMapDescriptor"),n(Ie.prototype,{objectMode:Ne(ue),ended:Ne(te),endEmitted:Ne(X),reading:Ne(ye),constructed:Ne(Re),sync:Ne(De),needReadable:Ne(Y),emittedReadable:Ne(H),readableListening:Ne(Q),resumeScheduled:Ne(fe),errorEmitted:Ne(ve),emitClose:Ne(N),autoDestroy:Ne(I),destroyed:Ne(D),closed:Ne(z),closeEmitted:Ne(Ee),multiAwaitDrain:Ne(Oe),readingMore:Ne(be),dataEmitted:Ne(ge)});function Ie(me,Se,We){typeof We!="boolean"&&(We=Se instanceof Nn()),(this||Ze).state=N|I|Re|De,me&&me.objectMode&&((this||Ze).state|=ue),We&&me&&me.readableObjectMode&&((this||Ze).state|=ue),(this||Ze).highWaterMark=me?U(this||Ze,me,"readableHighWaterMark",We):M(!1),(this||Ze).buffer=new A,(this||Ze).length=0,(this||Ze).pipes=[],(this||Ze).flowing=null,(this||Ze)[xe]=null,me&&me.emitClose===!1&&((this||Ze).state&=~N),me&&me.autoDestroy===!1&&((this||Ze).state&=~I),(this||Ze).errored=null,(this||Ze).defaultEncoding=me&&me.defaultEncoding||"utf8",(this||Ze).awaitDrainWriters=null,(this||Ze).decoder=null,(this||Ze).encoding=null,me&&me.encoding&&((this||Ze).decoder=new Pe(me.encoding),(this||Ze).encoding=me.encoding)}l(Ie,"ye"),e(Ie,"ReadableState");function ke(me){if(!((this||Ze)instanceof ke))return new ke(me);let Se=(this||Ze)instanceof Nn();(this||Ze)._readableState=new Ie(me,this||Ze,Se),me&&(typeof me.read=="function"&&((this||Ze)._read=me.read),typeof me.destroy=="function"&&((this||Ze)._destroy=me.destroy),typeof me.construct=="function"&&((this||Ze)._construct=me.construct),me.signal&&!Se&&O(me.signal,this||Ze)),_.call(this||Ze,me),x.construct(this||Ze,()=>{(this||Ze)._readableState.needReadable&&C(this||Ze,(this||Ze)._readableState)})}l(ke,"ve"),e(ke,"Readable2"),ke.prototype.destroy=x.destroy,ke.prototype._undestroy=x.undestroy,ke.prototype._destroy=function(me,Se){Se(me)},ke.prototype[w.captureRejectionSymbol]=function(me){this.destroy(me)},ke.prototype[d]=function(){let me;return(this||Ze).destroyed||(me=(this||Ze).readableEnded?null:new de,this.destroy(me)),new p((Se,We)=>E(this||Ze,Qe=>Qe&&Qe!==me?We(Qe):Se(null)))},ke.prototype.push=function(me,Se){return Ce(this||Ze,me,Se,!1)},ke.prototype.unshift=function(me,Se){return Ce(this||Ze,me,Se,!0)};function Ce(me,Se,We,Qe){P("readableAddChunk",Se);let lt=me._readableState,bt;if(lt.state&ue||(typeof Se=="string"?(We=We||lt.defaultEncoding,lt.encoding!==We&&(Qe&<.encoding?Se=T.from(Se,We).toString(lt.encoding):(Se=T.from(Se,We),We=""))):Se instanceof T?We="":_._isUint8Array(Se)?(Se=_._uint8ArrayToBuffer(Se),We=""):Se!=null&&(bt=new V("chunk",["string","Buffer","Uint8Array"],Se))),bt)J(me,bt);else if(Se===null)lt.state&=~ye,c(me,lt);else if(lt.state&ue||Se&&Se.length>0)if(Qe)if(lt.state&X)J(me,new ae);else{if(lt.destroyed||lt.errored)return!1;$e(me,lt,Se,!0)}else if(lt.ended)J(me,new re);else{if(lt.destroyed||lt.errored)return!1;lt.state&=~ye,lt.decoder&&!We?(Se=lt.decoder.write(Se),lt.objectMode||Se.length!==0?$e(me,lt,Se,!1):C(me,lt)):$e(me,lt,Se,!1)}else Qe||(lt.state&=~ye,C(me,lt));return!lt.ended&&(lt.length<lt.highWaterMark||lt.length===0)}l(Ce,"Me"),e(Ce,"readableAddChunk");function $e(me,Se,We,Qe){Se.flowing&&Se.length===0&&!Se.sync&&me.listenerCount("data")>0?(Se.state&Oe?Se.awaitDrainWriters.clear():Se.awaitDrainWriters=null,Se.dataEmitted=!0,me.emit("data",We)):(Se.length+=Se.objectMode?1:We.length,Qe?Se.buffer.unshift(We):Se.buffer.push(We),Se.state&Y&&v(me)),C(me,Se)}l($e,"Be"),e($e,"addChunk"),ke.prototype.isPaused=function(){let me=(this||Ze)._readableState;return me[xe]===!0||me.flowing===!1},ke.prototype.setEncoding=function(me){let Se=new Pe(me);(this||Ze)._readableState.decoder=Se,(this||Ze)._readableState.encoding=(this||Ze)._readableState.decoder.encoding;let We=(this||Ze)._readableState.buffer,Qe="";for(let lt of We)Qe+=Se.write(lt);return We.clear(),Qe!==""&&We.push(Qe),(this||Ze)._readableState.length=Qe.length,this||Ze};let Ke=1073741824;function t(me){if(me>Ke)throw new G("size","<= 1GiB",me);return me--,me|=me>>>1,me|=me>>>2,me|=me>>>4,me|=me>>>8,me|=me>>>16,me++,me}l(t,"p"),e(t,"computeNewHighWaterMark");function s(me,Se){return me<=0||Se.length===0&&Se.ended?0:Se.state&ue?1:g(me)?Se.flowing&&Se.length?Se.buffer.first().length:Se.length:me<=Se.length?me:Se.ended?Se.length:0}l(s,"l"),e(s,"howMuchToRead"),ke.prototype.read=function(me){P("read",me),me===void 0?me=NaN:f(me)||(me=o(me,10));let Se=(this||Ze)._readableState,We=me;if(me>Se.highWaterMark&&(Se.highWaterMark=t(me)),me!==0&&(Se.state&=~H),me===0&&Se.needReadable&&((Se.highWaterMark!==0?Se.length>=Se.highWaterMark:Se.length>0)||Se.ended))return P("read: emitReadable",Se.length,Se.ended),Se.length===0&&Se.ended?qe(this||Ze):v(this||Ze),null;if(me=s(me,Se),me===0&&Se.ended)return Se.length===0&&qe(this||Ze),null;let Qe=(Se.state&Y)!==0;if(P("need readable",Qe),(Se.length===0||Se.length-me<Se.highWaterMark)&&(Qe=!0,P("length less than watermark",Qe)),Se.ended||Se.reading||Se.destroyed||Se.errored||!Se.constructed)Qe=!1,P("reading, ended or constructing",Qe);else if(Qe){P("do read"),Se.state|=ye|De,Se.length===0&&(Se.state|=Y);try{this._read(Se.highWaterMark)}catch(bt){J(this||Ze,bt)}Se.state&=~De,Se.reading||(me=s(We,Se))}let lt;return me>0?lt=W(me,Se):lt=null,lt===null?(Se.needReadable=Se.length<=Se.highWaterMark,me=0):(Se.length-=me,Se.multiAwaitDrain?Se.awaitDrainWriters.clear():Se.awaitDrainWriters=null),Se.length===0&&(Se.ended||(Se.needReadable=!0),We!==me&&Se.ended&&qe(this||Ze)),lt!==null&&!Se.errorEmitted&&!Se.closeEmitted&&(Se.dataEmitted=!0,this.emit("data",lt)),lt};function c(me,Se){if(P("onEofChunk"),!Se.ended){if(Se.decoder){let We=Se.decoder.end();We&&We.length&&(Se.buffer.push(We),Se.length+=Se.objectMode?1:We.length)}Se.ended=!0,Se.sync?v(me):(Se.needReadable=!1,Se.emittedReadable=!0,R(me))}}l(c,"u"),e(c,"onEofChunk");function v(me){let Se=me._readableState;P("emitReadable",Se.needReadable,Se.emittedReadable),Se.needReadable=!1,Se.emittedReadable||(P("emitReadable",Se.flowing),Se.emittedReadable=!0,a.nextTick(R,me))}l(v,"w"),e(v,"emitReadable");function R(me){let Se=me._readableState;P("emitReadable_",Se.destroyed,Se.length,Se.ended),!Se.destroyed&&!Se.errored&&(Se.length||Se.ended)&&(me.emit("readable"),Se.emittedReadable=!1),Se.needReadable=!Se.flowing&&!Se.ended&&Se.length<=Se.highWaterMark,ie(me)}l(R,"A"),e(R,"emitReadable_");function C(me,Se){!Se.readingMore&&Se.constructed&&(Se.readingMore=!0,a.nextTick(j,me,Se))}l(C,"O"),e(C,"maybeReadMore");function j(me,Se){for(;!Se.reading&&!Se.ended&&(Se.length<Se.highWaterMark||Se.flowing&&Se.length===0);){let We=Se.length;if(P("maybeReadMore read 0"),me.read(0),We===Se.length)break}Se.readingMore=!1}l(j,"k"),e(j,"maybeReadMore_"),ke.prototype._read=function(me){throw new q("_read()")},ke.prototype.pipe=function(me,Se){let We=this||Ze,Qe=(this||Ze)._readableState;Qe.pipes.length===1&&(Qe.multiAwaitDrain||(Qe.multiAwaitDrain=!0,Qe.awaitDrainWriters=new h(Qe.awaitDrainWriters?[Qe.awaitDrainWriters]:[]))),Qe.pipes.push(me),P("pipe count=%d opts=%j",Qe.pipes.length,Se);let lt=(!Se||Se.end!==!1)&&me!==a.stdout&&me!==a.stderr?ht:Nt;Qe.endEmitted?a.nextTick(lt):We.once("end",lt),me.on("unpipe",bt);function bt(Ut,dr){P("onunpipe"),Ut===We&&dr&&dr.hasUnpiped===!1&&(dr.hasUnpiped=!0,Wt())}l(bt,"zt"),e(bt,"onunpipe");function ht(){P("onend"),me.end()}l(ht,"Rl"),e(ht,"onend");let Ot,zt=!1;function Wt(){P("cleanup"),me.removeListener("close",Xt),me.removeListener("finish",Ft),Ot&&me.removeListener("drain",Ot),me.removeListener("error",et),me.removeListener("unpipe",bt),We.removeListener("end",ht),We.removeListener("end",Nt),We.removeListener("data",Ar),zt=!0,Ot&&Qe.awaitDrainWriters&&(!me._writableState||me._writableState.needDrain)&&Ot()}l(Wt,"Eu"),e(Wt,"cleanup");function nr(){zt||(Qe.pipes.length===1&&Qe.pipes[0]===me?(P("false write response, pause",0),Qe.awaitDrainWriters=me,Qe.multiAwaitDrain=!1):Qe.pipes.length>1&&Qe.pipes.includes(me)&&(P("false write response, pause",Qe.awaitDrainWriters.size),Qe.awaitDrainWriters.add(me)),We.pause()),Ot||(Ot=Z(We,me),me.on("drain",Ot))}l(nr,"Da"),e(nr,"pause"),We.on("data",Ar);function Ar(Ut){P("ondata");let dr=me.write(Ut);P("dest.write",dr),dr===!1&&nr()}l(Ar,"Tl"),e(Ar,"ondata");function et(Ut){if(P("onerror",Ut),Nt(),me.removeListener("error",et),me.listenerCount("error")===0){let dr=me._writableState||me._readableState;dr&&!dr.errorEmitted?J(me,Ut):me.emit("error",Ut)}}l(et,"Fl"),e(et,"onerror"),S(me,"error",et);function Xt(){me.removeListener("finish",Ft),Nt()}l(Xt,"Ro"),e(Xt,"onclose"),me.once("close",Xt);function Ft(){P("onfinish"),me.removeListener("close",Xt),Nt()}l(Ft,"gn"),e(Ft,"onfinish"),me.once("finish",Ft);function Nt(){P("unpipe"),We.unpipe(me)}return l(Nt,"wn"),e(Nt,"unpipe"),me.emit("pipe",We),me.writableNeedDrain===!0?nr():Qe.flowing||(P("pipe resume"),We.resume()),me};function Z(me,Se){return e(function(){let We=me._readableState;We.awaitDrainWriters===Se?(P("pipeOnDrain",1),We.awaitDrainWriters=null):We.multiAwaitDrain&&(P("pipeOnDrain",We.awaitDrainWriters.size),We.awaitDrainWriters.delete(Se)),(!We.awaitDrainWriters||We.awaitDrainWriters.size===0)&&me.listenerCount("data")&&me.resume()},"pipeOnDrainFunctionResult")}l(Z,"W"),e(Z,"pipeOnDrain"),ke.prototype.unpipe=function(me){let Se=(this||Ze)._readableState,We={hasUnpiped:!1};if(Se.pipes.length===0)return this||Ze;if(!me){let lt=Se.pipes;Se.pipes=[],this.pause();for(let bt=0;bt<lt.length;bt++)lt[bt].emit("unpipe",this||Ze,{hasUnpiped:!1});return this||Ze}let Qe=i(Se.pipes,me);return Qe===-1?this||Ze:(Se.pipes.splice(Qe,1),Se.pipes.length===0&&this.pause(),me.emit("unpipe",this||Ze,We),this||Ze)},ke.prototype.on=function(me,Se){let We=_.prototype.on.call(this||Ze,me,Se),Qe=(this||Ze)._readableState;return me==="data"?(Qe.readableListening=this.listenerCount("readable")>0,Qe.flowing!==!1&&this.resume()):me==="readable"&&!Qe.endEmitted&&!Qe.readableListening&&(Qe.readableListening=Qe.needReadable=!0,Qe.flowing=!1,Qe.emittedReadable=!1,P("on readable",Qe.length,Qe.reading),Qe.length?v(this||Ze):Qe.reading||a.nextTick(Ae,this||Ze)),We},ke.prototype.addListener=ke.prototype.on,ke.prototype.removeListener=function(me,Se){let We=_.prototype.removeListener.call(this||Ze,me,Se);return me==="readable"&&a.nextTick(oe,this||Ze),We},ke.prototype.off=ke.prototype.removeListener,ke.prototype.removeAllListeners=function(me){let Se=_.prototype.removeAllListeners.apply(this||Ze,arguments);return(me==="readable"||me===void 0)&&a.nextTick(oe,this||Ze),Se};function oe(me){let Se=me._readableState;Se.readableListening=me.listenerCount("readable")>0,Se.resumeScheduled&&Se[xe]===!1?Se.flowing=!0:me.listenerCount("data")>0?me.resume():Se.readableListening||(Se.flowing=null)}l(oe,"re"),e(oe,"updateReadableListening");function Ae(me){P("readable nexttick read 0"),me.read(0)}l(Ae,"de"),e(Ae,"nReadingNextTick"),ke.prototype.resume=function(){let me=(this||Ze)._readableState;return me.flowing||(P("resume"),me.flowing=!me.readableListening,le(this||Ze,me)),me[xe]=!1,this||Ze};function le(me,Se){Se.resumeScheduled||(Se.resumeScheduled=!0,a.nextTick(Fe,me,Se))}l(le,"we"),e(le,"resume");function Fe(me,Se){P("resume",Se.reading),Se.reading||me.read(0),Se.resumeScheduled=!1,me.emit("resume"),ie(me),Se.flowing&&!Se.reading&&me.read(0)}l(Fe,"ce"),e(Fe,"resume_"),ke.prototype.pause=function(){return P("call pause flowing=%j",(this||Ze)._readableState.flowing),(this||Ze)._readableState.flowing!==!1&&(P("pause"),(this||Ze)._readableState.flowing=!1,this.emit("pause")),(this||Ze)._readableState[xe]=!0,this||Ze};function ie(me){let Se=me._readableState;for(P("flow",Se.flowing);Se.flowing&&me.read()!==null;);}l(ie,"je"),e(ie,"flow"),ke.prototype.wrap=function(me){let Se=!1;me.on("data",Qe=>{!this.push(Qe)&&me.pause&&(Se=!0,me.pause())}),me.on("end",()=>{this.push(null)}),me.on("error",Qe=>{J(this||Ze,Qe)}),me.on("close",()=>{this.destroy()}),me.on("destroy",()=>{this.destroy()}),(this||Ze)._read=()=>{Se&&me.resume&&(Se=!1,me.resume())};let We=r(me);for(let Qe=1;Qe<We.length;Qe++){let lt=We[Qe];(this||Ze)[lt]===void 0&&typeof me[lt]=="function"&&((this||Ze)[lt]=me[lt].bind(me))}return this||Ze},ke.prototype[m]=function(){return Je(this||Ze)},ke.prototype.iterator=function(me){return me!==void 0&&we(me,"options"),Je(this||Ze,me)};function Je(me,Se){typeof me.read!="function"&&(me=ke.wrap(me,{objectMode:!0}));let We=dt(me,Se);return We.stream=me,We}l(Je,"nn"),e(Je,"streamToAsyncIterator");async function*dt(me,Se){let We=Te;function Qe(ht){(this||Ze)===me?(We(),We=Te):We=ht}l(Qe,"Pe"),e(Qe,"next"),me.on("readable",Qe);let lt,bt=E(me,{writable:!1},ht=>{lt=ht?ee(lt,ht):null,We(),We=Te});try{for(;;){let ht=me.destroyed?null:me.read();if(ht!==null)yield ht;else{if(lt)throw lt;if(lt===null)return;await new p(Qe)}}}catch(ht){throw lt=ee(lt,ht),lt}finally{(lt||Se?.destroyOnReturn!==!1)&&(lt===void 0||me._readableState.autoDestroy)?x.destroyer(me,null):(me.off("readable",Qe),bt())}}l(dt,"Un"),e(dt,"createAsyncIterator"),n(ke.prototype,{readable:{__proto__:null,get(){let me=(this||Ze)._readableState;return!!me&&me.readable!==!1&&!me.destroyed&&!me.errorEmitted&&!me.endEmitted},set(me){(this||Ze)._readableState&&((this||Ze)._readableState.readable=!!me)}},readableDidRead:{__proto__:null,enumerable:!1,get:e(function(){return(this||Ze)._readableState.dataEmitted},"get")},readableAborted:{__proto__:null,enumerable:!1,get:e(function(){return!!((this||Ze)._readableState.readable!==!1&&((this||Ze)._readableState.destroyed||(this||Ze)._readableState.errored)&&!(this||Ze)._readableState.endEmitted)},"get")},readableHighWaterMark:{__proto__:null,enumerable:!1,get:e(function(){return(this||Ze)._readableState.highWaterMark},"get")},readableBuffer:{__proto__:null,enumerable:!1,get:e(function(){return(this||Ze)._readableState&&(this||Ze)._readableState.buffer},"get")},readableFlowing:{__proto__:null,enumerable:!1,get:e(function(){return(this||Ze)._readableState.flowing},"get"),set:e(function(me){(this||Ze)._readableState&&((this||Ze)._readableState.flowing=me)},"set")},readableLength:{__proto__:null,enumerable:!1,get(){return(this||Ze)._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return(this||Ze)._readableState?(this||Ze)._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return(this||Ze)._readableState?(this||Ze)._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return(this||Ze)._readableState?(this||Ze)._readableState.errored:null}},closed:{__proto__:null,get(){return(this||Ze)._readableState?(this||Ze)._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return(this||Ze)._readableState?(this||Ze)._readableState.destroyed:!1},set(me){(this||Ze)._readableState&&((this||Ze)._readableState.destroyed=me)}},readableEnded:{__proto__:null,enumerable:!1,get(){return(this||Ze)._readableState?(this||Ze)._readableState.endEmitted:!1}}}),n(Ie.prototype,{pipesCount:{__proto__:null,get(){return(this||Ze).pipes.length}},paused:{__proto__:null,get(){return(this||Ze)[xe]!==!1},set(me){(this||Ze)[xe]=!!me}}}),ke._fromList=W;function W(me,Se){if(Se.length===0)return null;let We;return Se.objectMode?We=Se.buffer.shift():!me||me>=Se.length?(Se.decoder?We=Se.buffer.join(""):Se.buffer.length===1?We=Se.buffer.first():We=Se.buffer.concat(Se.length),Se.buffer.clear()):We=Se.buffer.consume(me,Se.decoder),We}l(W,"qt"),e(W,"fromList");function qe(me){let Se=me._readableState;P("endReadable",Se.endEmitted),Se.endEmitted||(Se.ended=!0,a.nextTick(Ve,Se,me))}l(qe,"$r"),e(qe,"endReadable");function Ve(me,Se){if(P("endReadableNT",me.endEmitted,me.length),!me.errored&&!me.closeEmitted&&!me.endEmitted&&me.length===0){if(me.endEmitted=!0,Se.emit("end"),Se.writable&&Se.allowHalfOpen===!1)a.nextTick(pe,Se);else if(me.autoDestroy){let We=Se._writableState;(!We||We.autoDestroy&&(We.finished||We.writable===!1))&&Se.destroy()}}}l(Ve,"Sl"),e(Ve,"endReadableNT");function pe(me){me.writable&&!me.writableEnded&&!me.destroyed&&me.end()}l(pe,"Oi"),e(pe,"endWritableNT"),ke.from=function(me,Se){return se(ke,me,Se)};let Le;function He(){return Le===void 0&&(Le={}),Le}return l(He,"Al"),e(He,"lazyWebStreams"),ke.fromWeb=function(me,Se){return He().newStreamReadableFromReadableStream(me,Se)},ke.toWeb=function(me,Se){return He().newReadableStreamFromStreamReadable(me,Se)},ke.wrap=function(me,Se){var We,Qe;return new ke({objectMode:(We=(Qe=me.readableObjectMode)!==null&&Qe!==void 0?Qe:me.objectMode)!==null&&We!==void 0?We:!0,...Se,destroy(lt,bt){x.destroyer(me,lt),bt(lt)}}).wrap(me)},Bc}l(bf,"Ec");function Od(){if(C1)return xc;C1=!0;let a=Mn,{ArrayPrototypeSlice:i,Error:f,FunctionPrototypeSymbolHasInstance:g,ObjectDefineProperty:o,ObjectDefineProperties:n,ObjectSetPrototypeOf:r,StringPrototypeToLowerCase:u,Symbol:p,SymbolHasInstance:h}=Zt();xc=we,we.WritableState=ae;let{EventEmitter:d}=di,m=Rd().Stream,{Buffer:y}=mi(),w=Ba(),{addAbortSignal:_}=mf(),{getHighWaterMark:S,getDefaultHighWaterMark:T}=wf(),{ERR_INVALID_ARG_TYPE:O,ERR_METHOD_NOT_IMPLEMENTED:E,ERR_MULTIPLE_CALLBACK:P,ERR_STREAM_CANNOT_PIPE:A,ERR_STREAM_DESTROYED:x,ERR_STREAM_ALREADY_FINISHED:U,ERR_STREAM_NULL_VALUES:M,ERR_STREAM_WRITE_AFTER_END:ee,ERR_UNKNOWN_ENCODING:V}=Pr().codes,{errorOrDestroy:q}=w;r(we.prototype,m.prototype),r(we,m);function G(){}l(G,"j"),e(G,"nop");let re=p("kOnFinished");function ae(I,D,z){typeof z!="boolean"&&(z=D instanceof Nn()),(this||nt).objectMode=!!(I&&I.objectMode),z&&((this||nt).objectMode=(this||nt).objectMode||!!(I&&I.writableObjectMode)),(this||nt).highWaterMark=I?S(this||nt,I,"writableHighWaterMark",z):T(!1),(this||nt).finalCalled=!1,(this||nt).needDrain=!1,(this||nt).ending=!1,(this||nt).ended=!1,(this||nt).finished=!1,(this||nt).destroyed=!1;let Ee=!!(I&&I.decodeStrings===!1);(this||nt).decodeStrings=!Ee,(this||nt).defaultEncoding=I&&I.defaultEncoding||"utf8",(this||nt).length=0,(this||nt).writing=!1,(this||nt).corked=0,(this||nt).sync=!0,(this||nt).bufferProcessing=!1,(this||nt).onwrite=J.bind(void 0,D),(this||nt).writecb=null,(this||nt).writelen=0,(this||nt).afterWriteTickInfo=null,de(this||nt),(this||nt).pendingcb=0,(this||nt).constructed=!0,(this||nt).prefinished=!1,(this||nt).errorEmitted=!1,(this||nt).emitClose=!I||I.emitClose!==!1,(this||nt).autoDestroy=!I||I.autoDestroy!==!1,(this||nt).errored=null,(this||nt).closed=!1,(this||nt).closeEmitted=!1,(this||nt)[re]=[]}l(ae,"Z"),e(ae,"WritableState");function de(I){I.buffered=[],I.bufferedIndex=0,I.allBuffers=!0,I.allNoop=!0}l(de,"K"),e(de,"resetBuffer"),ae.prototype.getBuffer=e(function(){return i((this||nt).buffered,(this||nt).bufferedIndex)},"getBuffer"),o(ae.prototype,"bufferedRequestCount",{__proto__:null,get(){return(this||nt).buffered.length-(this||nt).bufferedIndex}});function we(I){let D=(this||nt)instanceof Nn();if(!D&&!g(we,this||nt))return new we(I);(this||nt)._writableState=new ae(I,this||nt,D),I&&(typeof I.write=="function"&&((this||nt)._write=I.write),typeof I.writev=="function"&&((this||nt)._writev=I.writev),typeof I.destroy=="function"&&((this||nt)._destroy=I.destroy),typeof I.final=="function"&&((this||nt)._final=I.final),typeof I.construct=="function"&&((this||nt)._construct=I.construct),I.signal&&_(I.signal,this||nt)),m.call(this||nt,I),w.construct(this||nt,()=>{let z=(this||nt)._writableState;z.writing||ye(this||nt,z),H(this||nt,z)})}l(we,"se"),e(we,"Writable2"),o(we,h,{__proto__:null,value:e(function(I){return g(this||nt,I)?!0:(this||nt)!==we?!1:I&&I._writableState instanceof ae},"value")}),we.prototype.pipe=function(){q(this||nt,new A)};function xe(I,D,z,Ee){let Oe=I._writableState;if(typeof z=="function")Ee=z,z=Oe.defaultEncoding;else{if(!z)z=Oe.defaultEncoding;else if(z!=="buffer"&&!y.isEncoding(z))throw new V(z);typeof Ee!="function"&&(Ee=G)}if(D===null)throw new M;if(!Oe.objectMode)if(typeof D=="string")Oe.decodeStrings!==!1&&(D=y.from(D,z),z="buffer");else if(D instanceof y)z="buffer";else if(m._isUint8Array(D))D=m._uint8ArrayToBuffer(D),z="buffer";else throw new O("chunk",["string","Buffer","Uint8Array"],D);let be;return Oe.ending?be=new ee:Oe.destroyed&&(be=new x("write")),be?(a.nextTick(Ee,be),q(I,be,!0),be):(Oe.pendingcb++,Pe(I,Oe,D,z,Ee))}l(xe,"_e"),e(xe,"_write"),we.prototype.write=function(I,D,z){return xe(this||nt,I,D,z)===!0},we.prototype.cork=function(){(this||nt)._writableState.corked++},we.prototype.uncork=function(){let I=(this||nt)._writableState;I.corked&&(I.corked--,I.writing||ye(this||nt,I))},we.prototype.setDefaultEncoding=e(function(I){if(typeof I=="string"&&(I=u(I)),!y.isEncoding(I))throw new V(I);return(this||nt)._writableState.defaultEncoding=I,this||nt},"setDefaultEncoding");function Pe(I,D,z,Ee,Oe){let be=D.objectMode?1:z.length;D.length+=be;let ge=D.length<D.highWaterMark;return ge||(D.needDrain=!0),D.writing||D.corked||D.errored||!D.constructed?(D.buffered.push({chunk:z,encoding:Ee,callback:Oe}),D.allBuffers&&Ee!=="buffer"&&(D.allBuffers=!1),D.allNoop&&Oe!==G&&(D.allNoop=!1)):(D.writelen=be,D.writecb=Oe,D.writing=!0,D.sync=!0,I._write(z,Ee,D.onwrite),D.sync=!1),ge&&!D.errored&&!D.destroyed}l(Pe,"pe"),e(Pe,"writeOrBuffer");function se(I,D,z,Ee,Oe,be,ge){D.writelen=Ee,D.writecb=ge,D.writing=!0,D.sync=!0,D.destroyed?D.onwrite(new x("write")):z?I._writev(Oe,D.onwrite):I._write(Oe,be,D.onwrite),D.sync=!1}l(se,"Q"),e(se,"doWrite");function Te(I,D,z,Ee){--D.pendingcb,Ee(z),X(D),q(I,z)}l(Te,"he"),e(Te,"onwriteError");function J(I,D){let z=I._writableState,Ee=z.sync,Oe=z.writecb;if(typeof Oe!="function"){q(I,new P);return}z.writing=!1,z.writecb=null,z.length-=z.writelen,z.writelen=0,D?(D.stack,z.errored||(z.errored=D),I._readableState&&!I._readableState.errored&&(I._readableState.errored=D),Ee?a.nextTick(Te,I,z,D,Oe):Te(I,z,D,Oe)):(z.buffered.length>z.bufferedIndex&&ye(I,z),Ee?z.afterWriteTickInfo!==null&&z.afterWriteTickInfo.cb===Oe?z.afterWriteTickInfo.count++:(z.afterWriteTickInfo={count:1,cb:Oe,stream:I,state:z},a.nextTick(ue,z.afterWriteTickInfo)):te(I,z,1,Oe))}l(J,"U"),e(J,"onwrite");function ue({stream:I,state:D,count:z,cb:Ee}){return D.afterWriteTickInfo=null,te(I,D,z,Ee)}l(ue,"J"),e(ue,"afterWriteTick");function te(I,D,z,Ee){for(!D.ending&&!I.destroyed&&D.length===0&&D.needDrain&&(D.needDrain=!1,I.emit("drain"));z-- >0;)D.pendingcb--,Ee();D.destroyed&&X(D),H(I,D)}l(te,"z"),e(te,"afterWrite");function X(I){if(I.writing)return;for(let Oe=I.bufferedIndex;Oe<I.buffered.length;++Oe){var D;let{chunk:be,callback:ge}=I.buffered[Oe],Ne=I.objectMode?1:be.length;I.length-=Ne,ge((D=I.errored)!==null&&D!==void 0?D:new x("write"))}let z=I[re].splice(0);for(let Oe=0;Oe<z.length;Oe++){var Ee;z[Oe]((Ee=I.errored)!==null&&Ee!==void 0?Ee:new x("end"))}de(I)}l(X,"V"),e(X,"errorBuffer");function ye(I,D){if(D.corked||D.bufferProcessing||D.destroyed||!D.constructed)return;let{buffered:z,bufferedIndex:Ee,objectMode:Oe}=D,be=z.length-Ee;if(!be)return;let ge=Ee;if(D.bufferProcessing=!0,be>1&&I._writev){D.pendingcb-=be-1;let Ne=D.allNoop?G:ke=>{for(let Ce=ge;Ce<z.length;++Ce)z[Ce].callback(ke)},Ie=D.allNoop&&ge===0?z:i(z,ge);Ie.allBuffers=D.allBuffers,se(I,D,!0,D.length,Ie,"",Ne),de(D)}else{do{let{chunk:Ne,encoding:Ie,callback:ke}=z[ge];z[ge++]=null;let Ce=Oe?1:Ne.length;se(I,D,!1,Ce,Ne,Ie,ke)}while(ge<z.length&&!D.writing);ge===z.length?de(D):ge>256?(z.splice(0,ge),D.bufferedIndex=0):D.bufferedIndex=ge}D.bufferProcessing=!1}l(ye,"G"),e(ye,"clearBuffer"),we.prototype._write=function(I,D,z){if((this||nt)._writev)this._writev([{chunk:I,encoding:D}],z);else throw new E("_write()")},we.prototype._writev=null,we.prototype.end=function(I,D,z){let Ee=(this||nt)._writableState;typeof I=="function"?(z=I,I=null,D=null):typeof D=="function"&&(z=D,D=null);let Oe;if(I!=null){let be=xe(this||nt,I,D);be instanceof f&&(Oe=be)}return Ee.corked&&(Ee.corked=1,this.uncork()),Oe||(!Ee.errored&&!Ee.ending?(Ee.ending=!0,H(this||nt,Ee,!0),Ee.ended=!0):Ee.finished?Oe=new U("end"):Ee.destroyed&&(Oe=new x("end"))),typeof z=="function"&&(Oe||Ee.finished?a.nextTick(z,Oe):Ee[re].push(z)),this||nt};function Re(I){return I.ending&&!I.destroyed&&I.constructed&&I.length===0&&!I.errored&&I.buffered.length===0&&!I.finished&&!I.writing&&!I.errorEmitted&&!I.closeEmitted}l(Re,"fe"),e(Re,"needFinish");function De(I,D){let z=!1;function Ee(Oe){if(z){q(I,Oe??P());return}if(z=!0,D.pendingcb--,Oe){let be=D[re].splice(0);for(let ge=0;ge<be.length;ge++)be[ge](Oe);q(I,Oe,D.sync)}else Re(D)&&(D.prefinished=!0,I.emit("prefinish"),D.pendingcb++,a.nextTick(Q,I,D))}l(Ee,"ue"),e(Ee,"onFinish"),D.sync=!0,D.pendingcb++;try{I._final(Ee)}catch(Oe){Ee(Oe)}D.sync=!1}l(De,"be"),e(De,"callFinal");function Y(I,D){!D.prefinished&&!D.finalCalled&&(typeof I._final=="function"&&!D.destroyed?(D.finalCalled=!0,De(I,D)):(D.prefinished=!0,I.emit("prefinish")))}l(Y,"D"),e(Y,"prefinish");function H(I,D,z){Re(D)&&(Y(I,D),D.pendingcb===0&&(z?(D.pendingcb++,a.nextTick((Ee,Oe)=>{Re(Oe)?Q(Ee,Oe):Oe.pendingcb--},I,D)):Re(D)&&(D.pendingcb++,Q(I,D))))}l(H,"$"),e(H,"finishMaybe");function Q(I,D){D.pendingcb--,D.finished=!0;let z=D[re].splice(0);for(let Ee=0;Ee<z.length;Ee++)z[Ee]();if(I.emit("finish"),D.autoDestroy){let Ee=I._readableState;(!Ee||Ee.autoDestroy&&(Ee.endEmitted||Ee.readable===!1))&&I.destroy()}}l(Q,"H"),e(Q,"finish"),n(we.prototype,{closed:{__proto__:null,get(){return(this||nt)._writableState?(this||nt)._writableState.closed:!1}},destroyed:{__proto__:null,get(){return(this||nt)._writableState?(this||nt)._writableState.destroyed:!1},set(I){(this||nt)._writableState&&((this||nt)._writableState.destroyed=I)}},writable:{__proto__:null,get(){let I=(this||nt)._writableState;return!!I&&I.writable!==!1&&!I.destroyed&&!I.errored&&!I.ending&&!I.ended},set(I){(this||nt)._writableState&&((this||nt)._writableState.writable=!!I)}},writableFinished:{__proto__:null,get(){return(this||nt)._writableState?(this||nt)._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return(this||nt)._writableState?(this||nt)._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return(this||nt)._writableState&&(this||nt)._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return(this||nt)._writableState?(this||nt)._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let I=(this||nt)._writableState;return I?!I.destroyed&&!I.ending&&I.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return(this||nt)._writableState&&(this||nt)._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return(this||nt)._writableState?(this||nt)._writableState.corked:0}},writableLength:{__proto__:null,get(){return(this||nt)._writableState&&(this||nt)._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return(this||nt)._writableState?(this||nt)._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:e(function(){return!!((this||nt)._writableState.writable!==!1&&((this||nt)._writableState.destroyed||(this||nt)._writableState.errored)&&!(this||nt)._writableState.finished)},"get")}});let fe=w.destroy;we.prototype.destroy=function(I,D){let z=(this||nt)._writableState;return!z.destroyed&&(z.bufferedIndex<z.buffered.length||z[re].length)&&a.nextTick(X,z),fe.call(this||nt,I,D),this||nt},we.prototype._undestroy=w.undestroy,we.prototype._destroy=function(I,D){D(I)},we.prototype[d.captureRejectionSymbol]=function(I){this.destroy(I)};let ve;function N(){return ve===void 0&&(ve={}),ve}return l(N,"I"),e(N,"lazyWebStreams"),we.fromWeb=function(I,D){return N().newStreamWritableFromWritableStream(I,D)},we.toWeb=function(I){return N().newWritableStreamFromStreamWritable(I)},xc}l(Od,"zg");function aP(){var ae;if(L1)return Ic;L1=!0;let a=Mn,i=mi(),{isReadable:f,isWritable:g,isIterable:o,isNodeStream:n,isReadableNodeStream:r,isWritableNodeStream:u,isDuplexNodeStream:p,isReadableStream:h,isWritableStream:d}=Un(),m=wi(),{AbortError:y,codes:{ERR_INVALID_ARG_TYPE:w,ERR_INVALID_RETURN_VALUE:_}}=Pr(),{destroyer:S}=Ba(),T=Nn(),O=bf(),E=Od(),{createDeferredPromise:P}=Sr(),A=PE(),x=globalThis.Blob||i.Blob,U=e(typeof x<"u"?function(de){return de instanceof x}:function(de){return!1},"isBlob2"),M=globalThis.AbortController||Hs().AbortController,{FunctionPrototypeCall:ee}=Zt(),V=(ae=class extends T{constructor(we){super(we),we?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),we?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}},l(ae,"q"),ae);e(V,"Duplexify");let q=V;Ic=e(l(function de(we,xe){if(p(we))return we;if(r(we))return re({readable:we});if(u(we))return re({writable:we});if(n(we))return re({writable:!1,readable:!1});if(h(we))return re({readable:O.fromWeb(we)});if(d(we))return re({writable:E.fromWeb(we)});if(typeof we=="function"){let{value:se,write:Te,final:J,destroy:ue}=G(we);if(o(se))return A(q,se,{objectMode:!0,write:Te,final:J,destroy:ue});let te=se?.then;if(typeof te=="function"){let X,ye=ee(te,se,Re=>{if(Re!=null)throw new _("nully","body",Re)},Re=>{S(X,Re)});return X=new q({objectMode:!0,readable:!1,write:Te,final(Re){J(async()=>{try{await ye,a.nextTick(Re,null)}catch(De){a.nextTick(Re,De)}})},destroy:ue})}throw new _("Iterable, AsyncIterable or AsyncFunction",xe,se)}if(U(we))return de(we.arrayBuffer());if(o(we))return A(q,we,{objectMode:!0,writable:!1});if(h(we?.readable)&&d(we?.writable))return q.fromWeb(we);if(typeof we?.writable=="object"||typeof we?.readable=="object"){let se=we!=null&&we.readable?r(we?.readable)?we?.readable:de(we.readable):void 0,Te=we!=null&&we.writable?u(we?.writable)?we?.writable:de(we.writable):void 0;return re({readable:se,writable:Te})}let Pe=we?.then;if(typeof Pe=="function"){let se;return ee(Pe,we,Te=>{Te!=null&&se.push(Te),se.push(null)},Te=>{S(se,Te)}),se=new q({objectMode:!0,writable:!1,read(){}})}throw new w(xe,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],we)},"Z"),"duplexify");function G(de){let{promise:we,resolve:xe}=P(),Pe=new M,se=Pe.signal;return{value:de(async function*(){for(;;){let Te=we;we=null;let{chunk:J,done:ue,cb:te}=await Te;if(a.nextTick(te),ue)return;if(se.aborted)throw new y(void 0,{cause:se.reason});({promise:we,resolve:xe}=P()),yield J}}(),{signal:se}),write(Te,J,ue){let te=xe;xe=null,te({chunk:Te,done:!1,cb:ue})},final(Te){let J=xe;xe=null,J({done:!0,cb:Te})},destroy(Te,J){Pe.abort(),J(Te)}}}l(G,"C"),e(G,"fromAsyncGen");function re(de){let we=de.readable&&typeof de.readable.read!="function"?O.wrap(de.readable):de.readable,xe=de.writable,Pe=!!f(we),se=!!g(xe),Te,J,ue,te,X;function ye(Re){let De=te;te=null,De?De(Re):Re&&X.destroy(Re)}return l(ye,"V"),e(ye,"onfinished"),X=new q({readableObjectMode:!!(we!=null&&we.readableObjectMode),writableObjectMode:!!(xe!=null&&xe.writableObjectMode),readable:Pe,writable:se}),se&&(m(xe,Re=>{se=!1,Re&&S(we,Re),ye(Re)}),X._write=function(Re,De,Y){xe.write(Re,De)?Y():Te=Y},X._final=function(Re){xe.end(),J=Re},xe.on("drain",function(){if(Te){let Re=Te;Te=null,Re()}}),xe.on("finish",function(){if(J){let Re=J;J=null,Re()}})),Pe&&(m(we,Re=>{Pe=!1,Re&&S(we,Re),ye(Re)}),we.on("readable",function(){if(ue){let Re=ue;ue=null,Re()}}),we.on("end",function(){X.push(null)}),X._read=function(){for(;;){let Re=we.read();if(Re===null){ue=X._read;return}if(!X.push(Re))return}}),X._destroy=function(Re,De){!Re&&te!==null&&(Re=new y),ue=null,Te=null,J=null,te===null?De(Re):(te=De,S(xe,Re),S(we,Re))},X}return l(re,"j"),e(re,"_duplexify"),Ic}l(aP,"MW");function Nn(){if(N1)return Pc;N1=!0;let{ObjectDefineProperties:a,ObjectGetOwnPropertyDescriptor:i,ObjectKeys:f,ObjectSetPrototypeOf:g}=Zt();Pc=r;let o=bf(),n=Od();g(r.prototype,o.prototype),g(r,o);{let d=f(n.prototype);for(let m=0;m<d.length;m++){let y=d[m];r.prototype[y]||(r.prototype[y]=n.prototype[y])}}function r(d){if(!(this instanceof r))return new r(d);o.call(this,d),n.call(this,d),d?(this.allowHalfOpen=d.allowHalfOpen!==!1,d.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),d.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}l(r,"i"),e(r,"Duplex2"),a(r.prototype,{writable:{__proto__:null,...i(n.prototype,"writable")},writableHighWaterMark:{__proto__:null,...i(n.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...i(n.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...i(n.prototype,"writableBuffer")},writableLength:{__proto__:null,...i(n.prototype,"writableLength")},writableFinished:{__proto__:null,...i(n.prototype,"writableFinished")},writableCorked:{__proto__:null,...i(n.prototype,"writableCorked")},writableEnded:{__proto__:null,...i(n.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...i(n.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(d){this._readableState&&this._writableState&&(this._readableState.destroyed=d,this._writableState.destroyed=d)}}});let u;function p(){return u===void 0&&(u={}),u}l(p,"h"),e(p,"lazyWebStreams"),r.fromWeb=function(d,m){return p().newStreamDuplexFromReadableWritablePair(d,m)},r.toWeb=function(d){return p().newReadableWritablePairFromDuplex(d)};let h;return r.from=function(d){return h||(h=aP()),h(d,"body")},Pc}l(Nn,"Xn");function jE(){if(D1)return jc;D1=!0;let{ObjectSetPrototypeOf:a,Symbol:i}=Zt();jc=r;let{ERR_METHOD_NOT_IMPLEMENTED:f}=Pr().codes,g=Nn(),{getHighWaterMark:o}=wf();a(r.prototype,g.prototype),a(r,g);let n=i("kCallback");function r(h){if(!(this instanceof r))return new r(h);let d=h?o(this,h,"readableHighWaterMark",!0):null;d===0&&(h={...h,highWaterMark:null,readableHighWaterMark:d,writableHighWaterMark:h.writableHighWaterMark||0}),g.call(this,h),this._readableState.sync=!1,this[n]=null,h&&(typeof h.transform=="function"&&(this._transform=h.transform),typeof h.flush=="function"&&(this._flush=h.flush)),this.on("prefinish",p)}l(r,"i"),e(r,"Transform2");function u(h){typeof this._flush=="function"&&!this.destroyed?this._flush((d,m)=>{if(d){h?h(d):this.destroy(d);return}m!=null&&this.push(m),this.push(null),h&&h()}):(this.push(null),h&&h())}l(u,"f"),e(u,"final");function p(){this._final!==u&&u.call(this)}return l(p,"h"),e(p,"prefinish"),r.prototype._final=u,r.prototype._transform=function(h,d,m){throw new f("_transform()")},r.prototype._write=function(h,d,m){let y=this._readableState,w=this._writableState,_=y.length;this._transform(h,d,(S,T)=>{if(S){m(S);return}T!=null&&this.push(T),w.ended||_===y.length||y.length<y.highWaterMark?m():this[n]=m})},r.prototype._read=function(){if(this[n]){let h=this[n];this[n]=null,h()}},jc}l(jE,"sR");function CE(){if(U1)return Cc;U1=!0;let{ObjectSetPrototypeOf:a}=Zt();Cc=f;let i=jE();a(f.prototype,i.prototype),a(f,i);function f(g){if(!(this instanceof f))return new f(g);i.call(this,g)}return l(f,"r"),e(f,"PassThrough2"),f.prototype._transform=function(g,o,n){n(null,g)},Cc}l(CE,"lR");function kd(){if(M1)return Lc;M1=!0;let a=Mn,{ArrayIsArray:i,Promise:f,SymbolAsyncIterator:g,SymbolDispose:o}=Zt(),n=wi(),{once:r}=Sr(),u=Ba(),p=Nn(),{aggregateTwoErrors:h,codes:{ERR_INVALID_ARG_TYPE:d,ERR_INVALID_RETURN_VALUE:m,ERR_MISSING_ARGS:y,ERR_STREAM_DESTROYED:w,ERR_STREAM_PREMATURE_CLOSE:_},AbortError:S}=Pr(),{validateFunction:T,validateAbortSignal:O}=Js(),{isIterable:E,isReadable:P,isReadableNodeStream:A,isNodeStream:x,isTransformStream:U,isWebStream:M,isReadableStream:ee,isReadableFinished:V}=Un(),q=globalThis.AbortController||Hs().AbortController,G,re,ae;function de(X,ye,Re){let De=!1;X.on("close",()=>{De=!0});let Y=n(X,{readable:ye,writable:Re},H=>{De=!H});return{destroy:e(H=>{De||(De=!0,u.destroyer(X,H||new w("pipe")))},"destroy"),cleanup:Y}}l(de,"K"),e(de,"destroyer");function we(X){return T(X[X.length-1],"streams[stream.length - 1]"),X.pop()}l(we,"se"),e(we,"popCallback");function xe(X){if(E(X))return X;if(A(X))return Pe(X);throw new d("val",["Readable","Iterable","AsyncIterable"],X)}l(xe,"_e"),e(xe,"makeAsyncIterable");async function*Pe(X){re||(re=bf()),yield*re.prototype[g].call(X)}l(Pe,"pe"),e(Pe,"fromReadable");async function se(X,ye,Re,{end:De}){let Y,H=null,Q=e(N=>{if(N&&(Y=N),H){let I=H;H=null,I()}},"resume"),fe=e(()=>new f((N,I)=>{Y?I(Y):H=e(()=>{Y?I(Y):N()},"onresolve")}),"wait");ye.on("drain",Q);let ve=n(ye,{readable:!1},Q);try{ye.writableNeedDrain&&await fe();for await(let N of X)ye.write(N)||await fe();De&&(ye.end(),await fe()),Re()}catch(N){Re(Y!==N?h(Y,N):N)}finally{ve(),ye.off("drain",Q)}}l(se,"Q"),e(se,"pumpToNode");async function Te(X,ye,Re,{end:De}){U(ye)&&(ye=ye.writable);let Y=ye.getWriter();try{for await(let H of X)await Y.ready,Y.write(H).catch(()=>{});await Y.ready,De&&await Y.close(),Re()}catch(H){try{await Y.abort(H),Re(H)}catch(Q){Re(Q)}}}l(Te,"he"),e(Te,"pumpToWeb");function J(...X){return ue(X,r(we(X)))}l(J,"U"),e(J,"pipeline2");function ue(X,ye,Re){if(X.length===1&&i(X[0])&&(X=X[0]),X.length<2)throw new y("streams");let De=new q,Y=De.signal,H=Re?.signal,Q=[];O(H,"options.signal");function fe(){Oe(new S)}l(fe,"te"),e(fe,"abort2"),ae=ae||Sr().addAbortListener;let ve;H&&(ve=ae(H,fe));let N,I,D=[],z=0;function Ee(Ie){Oe(Ie,--z===0)}l(Ee,"ue"),e(Ee,"finish");function Oe(Ie,ke){var Ce;if(Ie&&(!N||N.code==="ERR_STREAM_PREMATURE_CLOSE")&&(N=Ie),!(!N&&!ke)){for(;D.length;)D.shift()(N);(Ce=ve)===null||Ce===void 0||Ce[o](),De.abort(),ke&&(N||Q.forEach($e=>$e()),a.nextTick(ye,N,I))}}l(Oe,"le"),e(Oe,"finishImpl");let be;for(let Ie=0;Ie<X.length;Ie++){let ke=X[Ie],Ce=Ie<X.length-1,$e=Ie>0,Ke=Ce||Re?.end!==!1,t=Ie===X.length-1;if(x(ke)){let s=e(function(c){c&&c.name!=="AbortError"&&c.code!=="ERR_STREAM_PREMATURE_CLOSE"&&Ee(c)},"onError");if(Ke){let{destroy:c,cleanup:v}=de(ke,Ce,$e);D.push(c),P(ke)&&t&&Q.push(v)}ke.on("error",s),P(ke)&&t&&Q.push(()=>{ke.removeListener("error",s)})}if(Ie===0)if(typeof ke=="function"){if(be=ke({signal:Y}),!E(be))throw new m("Iterable, AsyncIterable or Stream","source",be)}else E(ke)||A(ke)||U(ke)?be=ke:be=p.from(ke);else if(typeof ke=="function"){if(U(be)){var ge;be=xe((ge=be)===null||ge===void 0?void 0:ge.readable)}else be=xe(be);if(be=ke(be,{signal:Y}),Ce){if(!E(be,!0))throw new m("AsyncIterable",`transform[${Ie-1}]`,be)}else{var Ne;G||(G=CE());let s=new G({objectMode:!0}),c=(Ne=be)===null||Ne===void 0?void 0:Ne.then;if(typeof c=="function")z++,c.call(be,C=>{I=C,C!=null&&s.write(C),Ke&&s.end(),a.nextTick(Ee)},C=>{s.destroy(C),a.nextTick(Ee,C)});else if(E(be,!0))z++,se(be,s,Ee,{end:Ke});else if(ee(be)||U(be)){let C=be.readable||be;z++,se(C,s,Ee,{end:Ke})}else throw new m("AsyncIterable or Promise","destination",be);be=s;let{destroy:v,cleanup:R}=de(be,!1,!0);D.push(v),t&&Q.push(R)}}else if(x(ke)){if(A(be)){z+=2;let s=te(be,ke,Ee,{end:Ke});P(ke)&&t&&Q.push(s)}else if(U(be)||ee(be)){let s=be.readable||be;z++,se(s,ke,Ee,{end:Ke})}else if(E(be))z++,se(be,ke,Ee,{end:Ke});else throw new d("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],be);be=ke}else if(M(ke)){if(A(be))z++,Te(xe(be),ke,Ee,{end:Ke});else if(ee(be)||E(be))z++,Te(be,ke,Ee,{end:Ke});else if(U(be))z++,Te(be.readable,ke,Ee,{end:Ke});else throw new d("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],be);be=ke}else be=p.from(ke)}return(Y!=null&&Y.aborted||H!=null&&H.aborted)&&a.nextTick(fe),be}l(ue,"J"),e(ue,"pipelineImpl");function te(X,ye,Re,{end:De}){let Y=!1;if(ye.on("close",()=>{Y||Re(new _)}),X.pipe(ye,{end:!1}),De){let H=e(function(){Y=!0,ye.end()},"endFn");V(X)?a.nextTick(H):X.once("end",H)}else Re();return n(X,{readable:!0,writable:!1},H=>{let Q=X._readableState;H&&H.code==="ERR_STREAM_PREMATURE_CLOSE"&&Q&&Q.ended&&!Q.errored&&!Q.errorEmitted?X.once("end",Re).once("error",Re):Re(H)}),n(ye,{readable:!1,writable:!0},Re)}return l(te,"z"),e(te,"pipe"),Lc={pipelineImpl:ue,pipeline:J},Lc}l(kd,"Vg");function LE(){if($1)return Nc;$1=!0;let{pipeline:a}=kd(),i=Nn(),{destroyer:f}=Ba(),{isNodeStream:g,isReadable:o,isWritable:n,isWebStream:r,isTransformStream:u,isWritableStream:p,isReadableStream:h}=Un(),{AbortError:d,codes:{ERR_INVALID_ARG_VALUE:m,ERR_MISSING_ARGS:y}}=Pr(),w=wi();return Nc=e(function(..._){if(_.length===0)throw new y("streams");if(_.length===1)return i.from(_[0]);let S=[..._];if(typeof _[0]=="function"&&(_[0]=i.from(_[0])),typeof _[_.length-1]=="function"){let q=_.length-1;_[q]=i.from(_[q])}for(let q=0;q<_.length;++q)if(!(!g(_[q])&&!r(_[q]))){if(q<_.length-1&&!(o(_[q])||h(_[q])||u(_[q])))throw new m(`streams[${q}]`,S[q],"must be readable");if(q>0&&!(n(_[q])||p(_[q])||u(_[q])))throw new m(`streams[${q}]`,S[q],"must be writable")}let T,O,E,P,A;function x(q){let G=P;P=null,G?G(q):q?A.destroy(q):!V&&!ee&&A.destroy()}l(x,"B"),e(x,"onfinished");let U=_[0],M=a(_,x),ee=!!(n(U)||p(U)||u(U)),V=!!(o(M)||h(M)||u(M));if(A=new i({writableObjectMode:!!(U!=null&&U.writableObjectMode),readableObjectMode:!!(M!=null&&M.readableObjectMode),writable:ee,readable:V}),ee){if(g(U))A._write=function(G,re,ae){U.write(G,re)?ae():T=ae},A._final=function(G){U.end(),O=G},U.on("drain",function(){if(T){let G=T;T=null,G()}});else if(r(U)){let G=(u(U)?U.writable:U).getWriter();A._write=async function(re,ae,de){try{await G.ready,G.write(re).catch(()=>{}),de()}catch(we){de(we)}},A._final=async function(re){try{await G.ready,G.close().catch(()=>{}),O=re}catch(ae){re(ae)}}}let q=u(M)?M.readable:M;w(q,()=>{if(O){let G=O;O=null,G()}})}if(V){if(g(M))M.on("readable",function(){if(E){let q=E;E=null,q()}}),M.on("end",function(){A.push(null)}),A._read=function(){for(;;){let q=M.read();if(q===null){E=A._read;return}if(!A.push(q))return}};else if(r(M)){let q=(u(M)?M.readable:M).getReader();A._read=async function(){for(;;)try{let{value:G,done:re}=await q.read();if(!A.push(G))return;if(re){A.push(null);return}}catch{return}}}}return A._destroy=function(q,G){!q&&P!==null&&(q=new d),E=null,T=null,O=null,P===null?G(q):(P=G,g(M)&&f(M,q))},A},"compose"),Nc}l(LE,"fR");function sP(){var Q;if(W1)return Il;W1=!0;let a=globalThis.AbortController||Hs().AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:f,ERR_MISSING_ARGS:g,ERR_OUT_OF_RANGE:o},AbortError:n}=Pr(),{validateAbortSignal:r,validateInteger:u,validateObject:p}=Js(),h=Zt().Symbol("kWeak"),d=Zt().Symbol("kResistStopPropagation"),{finished:m}=wi(),y=LE(),{addAbortSignalNoValidate:w}=mf(),{isWritable:_,isNodeStream:S}=Un(),{deprecate:T}=Sr(),{ArrayPrototypePush:O,Boolean:E,MathFloor:P,Number:A,NumberIsNaN:x,Promise:U,PromiseReject:M,PromiseResolve:ee,PromisePrototypeThen:V,Symbol:q}=Zt(),G=q("kEmpty"),re=q("kEof");function ae(fe,ve){if(ve!=null&&p(ve,"options"),ve?.signal!=null&&r(ve.signal,"options.signal"),S(fe)&&!_(fe))throw new i("stream",fe,"must be writable");let N=y(this,fe);return ve!=null&&ve.signal&&w(ve.signal,N),N}l(ae,"Z"),e(ae,"compose");function de(fe,ve){if(typeof fe!="function")throw new f("fn",["Function","AsyncFunction"],fe);ve!=null&&p(ve,"options"),ve?.signal!=null&&r(ve.signal,"options.signal");let N=1;ve?.concurrency!=null&&(N=P(ve.concurrency));let I=N-1;return ve?.highWaterMark!=null&&(I=P(ve.highWaterMark)),u(N,"options.concurrency",1),u(I,"options.highWaterMark",0),I+=N,e(async function*(){let D=Sr().AbortSignalAny([ve?.signal].filter(E)),z=this,Ee=[],Oe={signal:D},be,ge,Ne=!1,Ie=0;function ke(){Ne=!0,Ce()}l(ke,"ve"),e(ke,"onCatch");function Ce(){Ie-=1,$e()}l(Ce,"Me"),e(Ce,"afterItemProcessed");function $e(){ge&&!Ne&&Ie<N&&Ee.length<I&&(ge(),ge=null)}l($e,"Be"),e($e,"maybeResume");async function Ke(){try{for await(let t of z){if(Ne)return;if(D.aborted)throw new n;try{if(t=fe(t,Oe),t===G)continue;t=ee(t)}catch(s){t=M(s)}Ie+=1,V(t,Ce,ke),Ee.push(t),be&&(be(),be=null),!Ne&&(Ee.length>=I||Ie>=N)&&await new U(s=>{ge=s})}Ee.push(re)}catch(t){let s=M(t);V(s,Ce,ke),Ee.push(s)}finally{Ne=!0,be&&(be(),be=null)}}l(Ke,"Je"),e(Ke,"pump"),Ke();try{for(;;){for(;Ee.length>0;){let t=await Ee[0];if(t===re)return;if(D.aborted)throw new n;t!==G&&(yield t),Ee.shift(),$e()}await new U(t=>{be=t})}}finally{Ne=!0,ge&&(ge(),ge=null)}},"map2").call(this)}l(de,"K"),e(de,"map");function we(fe=void 0){return fe!=null&&p(fe,"options"),fe?.signal!=null&&r(fe.signal,"options.signal"),e(async function*(){let ve=0;for await(let I of this){var N;if(fe!=null&&(N=fe.signal)!==null&&N!==void 0&&N.aborted)throw new n({cause:fe.signal.reason});yield[ve++,I]}},"asIndexedPairs2").call(this)}l(we,"se"),e(we,"asIndexedPairs");async function xe(fe,ve=void 0){for await(let N of J.call(this,fe,ve))return!0;return!1}l(xe,"_e"),e(xe,"some");async function Pe(fe,ve=void 0){if(typeof fe!="function")throw new f("fn",["Function","AsyncFunction"],fe);return!await xe.call(this,async(...N)=>!await fe(...N),ve)}l(Pe,"pe"),e(Pe,"every");async function se(fe,ve){for await(let N of J.call(this,fe,ve))return N}l(se,"Q"),e(se,"find");async function Te(fe,ve){if(typeof fe!="function")throw new f("fn",["Function","AsyncFunction"],fe);async function N(I,D){return await fe(I,D),G}l(N,"oe"),e(N,"forEachFn");for await(let I of de.call(this,N,ve));}l(Te,"he"),e(Te,"forEach");function J(fe,ve){if(typeof fe!="function")throw new f("fn",["Function","AsyncFunction"],fe);async function N(I,D){return await fe(I,D)?I:G}return l(N,"oe"),e(N,"filterFn"),de.call(this,N,ve)}l(J,"U"),e(J,"filter");let ue=(Q=class extends g{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}},l(Q,"$"),Q);e(ue,"ReduceAwareErrMissingArgs");let te=ue;async function X(fe,ve,N){var I;if(typeof fe!="function")throw new f("reducer",["Function","AsyncFunction"],fe);N!=null&&p(N,"options"),N?.signal!=null&&r(N.signal,"options.signal");let D=arguments.length>1;if(N!=null&&(I=N.signal)!==null&&I!==void 0&&I.aborted){let ge=new n(void 0,{cause:N.signal.reason});throw this.once("error",()=>{}),await m(this.destroy(ge)),ge}let z=new a,Ee=z.signal;if(N!=null&&N.signal){let ge={once:!0,[h]:this,[d]:!0};N.signal.addEventListener("abort",()=>z.abort(),ge)}let Oe=!1;try{for await(let ge of this){var be;if(Oe=!0,N!=null&&(be=N.signal)!==null&&be!==void 0&&be.aborted)throw new n;D?ve=await fe(ve,ge,{signal:Ee}):(ve=ge,D=!0)}if(!Oe&&!D)throw new te}finally{z.abort()}return ve}l(X,"z"),e(X,"reduce");async function ye(fe){fe!=null&&p(fe,"options"),fe?.signal!=null&&r(fe.signal,"options.signal");let ve=[];for await(let I of this){var N;if(fe!=null&&(N=fe.signal)!==null&&N!==void 0&&N.aborted)throw new n(void 0,{cause:fe.signal.reason});O(ve,I)}return ve}l(ye,"V"),e(ye,"toArray");function Re(fe,ve){let N=de.call(this,fe,ve);return e(async function*(){for await(let I of N)yield*I},"flatMap2").call(this)}l(Re,"G"),e(Re,"flatMap");function De(fe){if(fe=A(fe),x(fe))return 0;if(fe<0)throw new o("number",">= 0",fe);return fe}l(De,"fe"),e(De,"toIntegerOrInfinity");function Y(fe,ve=void 0){return ve!=null&&p(ve,"options"),ve?.signal!=null&&r(ve.signal,"options.signal"),fe=De(fe),e(async function*(){var N;if(ve!=null&&(N=ve.signal)!==null&&N!==void 0&&N.aborted)throw new n;for await(let D of this){var I;if(ve!=null&&(I=ve.signal)!==null&&I!==void 0&&I.aborted)throw new n;fe--<=0&&(yield D)}},"drop2").call(this)}l(Y,"be"),e(Y,"drop");function H(fe,ve=void 0){return ve!=null&&p(ve,"options"),ve?.signal!=null&&r(ve.signal,"options.signal"),fe=De(fe),e(async function*(){var N;if(ve!=null&&(N=ve.signal)!==null&&N!==void 0&&N.aborted)throw new n;for await(let D of this){var I;if(ve!=null&&(I=ve.signal)!==null&&I!==void 0&&I.aborted)throw new n;if(fe-- >0&&(yield D),fe<=0)return}},"take2").call(this)}return l(H,"D"),e(H,"take"),Il.streamReturningOperators={asIndexedPairs:T(we,"readable.asIndexedPairs will be removed in a future version."),drop:Y,filter:J,flatMap:Re,map:de,take:H,compose:ae},Il.promiseReturningOperators={every:Pe,forEach:Te,reduce:X,toArray:ye,some:xe,find:se},Il}l(sP,"UW");function NE(){if(z1)return Dc;z1=!0;let{ArrayPrototypePop:a,Promise:i}=Zt(),{isIterable:f,isNodeStream:g,isWebStream:o}=Un(),{pipelineImpl:n}=kd(),{finished:r}=wi();DE();function u(...p){return new i((h,d)=>{let m,y,w=p[p.length-1];if(w&&typeof w=="object"&&!g(w)&&!f(w)&&!o(w)){let _=a(p);m=_.signal,y=_.end}n(p,(_,S)=>{_?d(_):h(S)},{signal:m,end:y})})}return l(u,"f"),e(u,"pipeline2"),Dc={finished:r,pipeline:u},Dc}l(NE,"uR");function DE(){if(H1)return Uc;H1=!0;let{Buffer:a}=mi(),{ObjectDefineProperty:i,ObjectKeys:f,ReflectApply:g}=Zt(),{promisify:{custom:o}}=Sr(),{streamReturningOperators:n,promiseReturningOperators:r}=sP(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:u}}=Pr(),p=LE(),{setDefaultHighWaterMark:h,getDefaultHighWaterMark:d}=wf(),{pipeline:m}=kd(),{destroyer:y}=Ba(),w=wi(),_=NE(),S=Un(),T=Uc=Rd().Stream;T.isDestroyed=S.isDestroyed,T.isDisturbed=S.isDisturbed,T.isErrored=S.isErrored,T.isReadable=S.isReadable,T.isWritable=S.isWritable,T.Readable=bf();for(let E of f(n)){let P=e(function(...x){if(new.target)throw u();return T.Readable.from(g(A,this||q1,x))},"fn"),A=n[E];i(P,"name",{__proto__:null,value:A.name}),i(P,"length",{__proto__:null,value:A.length}),i(T.Readable.prototype,E,{__proto__:null,value:P,enumerable:!1,configurable:!0,writable:!0})}for(let E of f(r)){let P=e(function(...x){if(new.target)throw u();return g(A,this||q1,x)},"fn"),A=r[E];i(P,"name",{__proto__:null,value:A.name}),i(P,"length",{__proto__:null,value:A.length}),i(T.Readable.prototype,E,{__proto__:null,value:P,enumerable:!1,configurable:!0,writable:!0})}T.Writable=Od(),T.Duplex=Nn(),T.Transform=jE(),T.PassThrough=CE(),T.pipeline=m;let{addAbortSignal:O}=mf();return T.addAbortSignal=O,T.finished=w,T.destroy=y,T.compose=p,T.setDefaultHighWaterMark=h,T.getDefaultHighWaterMark=d,i(T,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return _}}),i(m,o,{__proto__:null,enumerable:!0,get(){return _.pipeline}}),i(w,o,{__proto__:null,enumerable:!0,get(){return _.finished}}),T.Stream=T,T._isUint8Array=e(function(E){return E instanceof Uint8Array},"isUint8Array"),T._uint8ArrayToBuffer=e(function(E){return a.from(E.buffer,E.byteOffset,E.byteLength)},"_uint8ArrayToBuffer"),Uc}l(DE,"cR");function jk(){if(G1)return Yt;G1=!0;let a=DE(),i=NE(),f=a.Readable.destroy;return Yt=a.Readable,Yt._uint8ArrayToBuffer=a._uint8ArrayToBuffer,Yt._isUint8Array=a._isUint8Array,Yt.isDisturbed=a.isDisturbed,Yt.isErrored=a.isErrored,Yt.isReadable=a.isReadable,Yt.Readable=a.Readable,Yt.Writable=a.Writable,Yt.Duplex=a.Duplex,Yt.Transform=a.Transform,Yt.PassThrough=a.PassThrough,Yt.addAbortSignal=a.addAbortSignal,Yt.finished=a.finished,Yt.destroy=a.destroy,Yt.destroy=f,Yt.pipeline=a.pipeline,Yt.compose=a.compose,Object.defineProperty(a,"promises",{configurable:!0,enumerable:!0,get(){return i}}),Yt.Stream=a.Stream,Yt.default=Yt,Yt}l(jk,"jW");var ws,Ab,Zu,Rb,Di,Ob,Fl,kb,di,sL,lL,fL,uL,cL,hL,Pn,ya,aa,Hl,Ck,Lk,Nk,Dk,Uk,Mk,$k,Wk,zk,Hk,qk,Gk,Vk,Kk,Jk,Yk,Zk,Qk,Xk,eT,tT,ru,rT,nT,iT,oT,aT,sT,lT,fT,uT,cT,hT,dT,pT,gT,yT,mT,wT,bT,vT,_T,ET,ST,AT,RT,OT,fi,cy,Qu,kT,TT,FT,BT,xT,IT,PT,jT,CT,LT,NT,Mn,bs,Tb,Xu,Fb,ec,dL,Bb,xb,Ib,Pb,jb,Cb,Lb,Nb,Db,Ub,Mb,$b,Wb,zb,Hb,qb,tc,Gb,rc,Vb,nc,Kb,ic,Jb,oc,Yb,ac,Zb,sc,Qb,lc,Xb,fc,e1,uc,t1,cc,r1,vs,n1,hc,i1,dc,o1,pc,a1,gc,s1,yc,l1,mc,f1,wc,u1,c1,h1,bc,d1,lP,vc,p1,fP,_c,g1,Et,y1,m1,w1,St,b1,_s,wt,pL,gL,yL,mL,wL,bL,vL,_L,EL,SL,AL,RL,OL,kL,TL,FL,BL,xL,IL,PL,jL,CL,LL,hy,NL,DL,UL,v1,_1,Es,E1,Bl,S1,Ec,A1,Sc,R1,Ac,O1,xl,k1,Rc,T1,Oc,F1,Ss,B1,kc,x1,Tc,I1,Fc,P1,Bc,j1,Ze,xc,C1,nt,Ic,L1,Pc,N1,jc,D1,Cc,U1,Lc,M1,Nc,$1,Il,W1,Dc,z1,Uc,H1,q1,Yt,G1,Dt,Mc,uP,cP,hP,dP,pP,gP,yP,mP,ML=Qt(()=>{ws={},Ab=!1,e(P6,"dew$2"),Zu={},Rb=!1,e(j6,"dew$1"),Di={},Ob=!1,e(mi,"dew"),Fl={},kb=!1,e(Ek,"dew2"),di=Ek(),di.once,di.once=function(a,i){return new Promise((f,g)=>{function o(...r){n!==void 0&&a.removeListener("error",n),f(r)}l(o,"a"),e(o,"eventListener");let n;i!=="error"&&(n=e(r=>{a.removeListener(name,o),g(r)},"errorListener"),a.once("error",n)),a.once(i,o)})},di.on=function(a,i){let f=[],g=[],o=null,n=!1,r={async next(){let h=f.shift();if(h)return createIterResult(h,!1);if(o){let d=Promise.reject(o);return o=null,d}return n?createIterResult(void 0,!0):new Promise((d,m)=>g.push({resolve:d,reject:m}))},async return(){a.removeListener(i,u),a.removeListener("error",p),n=!0;for(let h of g)h.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(h){o=h,a.removeListener(i,u),a.removeListener("error",p)},[Symbol.asyncIterator](){return this}};return a.on(i,u),a.on("error",p),r;function u(...h){let d=g.shift();d?d.resolve(createIterResult(h,!1)):f.push(h)}function p(h){n=!0;let d=g.shift();d?d.reject(h):o=h,r.return()}},{EventEmitter:sL,defaultMaxListeners:lL,init:fL,listenerCount:uL,on:cL,once:hL}=di,e(nd,"unimplemented"),Pn=[],ya=!1,Hl=-1,e(C6,"cleanUpNextTick"),e(kE,"drainQueue"),e(Sk,"nextTick"),e(Sb,"Item"),Sb.prototype.run=function(){this.fun.apply(null,this.array)},Ck="browser",Lk="x64",Nk="browser",Dk={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},Uk=["/usr/bin/node"],Mk=[],$k="v16.8.0",Wk={},zk=e(function(a,i){console.warn((i?i+": ":"")+a)},"emitWarning"),Hk=e(function(a){nd("binding")},"binding"),qk=e(function(a){return 0},"umask"),Gk=e(function(){return"/"},"cwd"),Vk=e(function(a){},"chdir"),Kk={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},e(br,"noop"),Jk=br,Yk=[],e(Ak,"_linkedBinding"),Zk={},Qk=!1,Xk={},e(Rk,"dlopen"),e(Ok,"_getActiveRequests"),e(kk,"_getActiveHandles"),eT=br,tT=br,ru=e(function(){return{}},"cpuUsage"),rT=ru,nT=ru,iT=br,oT=br,aT=br,sT={},e(Tk,"assert"),lT={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},fT=br,uT=br,e(Fk,"hasUncaughtExceptionCaptureCallback"),cT=br,hT=br,dT=br,pT=br,gT=br,yT=void 0,mT=void 0,wT=void 0,bT=br,vT=2,_T=1,ET="/bin/usr/node",ST=9229,AT="node",RT=[],OT=br,fi={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},fi.now===void 0&&(cy=Date.now(),fi.timing&&fi.timing.navigationStart&&(cy=fi.timing.navigationStart),fi.now=()=>Date.now()-cy),e(Bk,"uptime"),Qu=1e9,e(tu,"hrtime"),tu.bigint=function(a){var i=tu(a);return typeof BigInt>"u"?i[0]*Qu+i[1]:BigInt(i[0]*Qu)+BigInt(i[1])},kT=10,TT={},FT=0,e(Yn,"on2"),BT=Yn,xT=Yn,IT=Yn,PT=Yn,jT=Yn,CT=br,LT=Yn,NT=Yn,e(xk,"listeners"),Mn={version:$k,versions:Wk,arch:Lk,platform:Nk,release:Kk,_rawDebug:Jk,moduleLoadList:Yk,binding:Hk,_linkedBinding:Ak,_events:TT,_eventsCount:FT,_maxListeners:kT,on:Yn,addListener:BT,once:xT,off:IT,removeListener:PT,removeAllListeners:jT,emit:CT,prependListener:LT,prependOnceListener:NT,listeners:xk,domain:Zk,_exiting:Qk,config:Xk,dlopen:Rk,uptime:Bk,_getActiveRequests:Ok,_getActiveHandles:kk,reallyExit:eT,_kill:tT,cpuUsage:ru,resourceUsage:rT,memoryUsage:nT,kill:iT,exit:oT,openStdin:aT,allowedNodeEnvironmentFlags:sT,assert:Tk,features:lT,_fatalExceptions:fT,setUncaughtExceptionCaptureCallback:uT,hasUncaughtExceptionCaptureCallback:Fk,emitWarning:zk,nextTick:Sk,_tickCallback:cT,_debugProcess:hT,_debugEnd:dT,_startProfilerIdleNotifier:pT,_stopProfilerIdleNotifier:gT,stdout:yT,stdin:wT,stderr:mT,abort:bT,umask:qk,chdir:Vk,cwd:Gk,env:Dk,title:Ck,argv:Uk,execArgv:Mk,pid:vT,ppid:_T,execPath:ET,debugPort:ST,hrtime:tu,argv0:AT,_preload_modules:RT,setSourceMapsEnabled:OT},bs={},Tb=!1,e(L6,"dew$12"),Xu={},Fb=!1,e(Ik,"dew3"),ec=Ik(),ec.StringDecoder,dL=ec.StringDecoder,Bb={},xb=!1,e(TE,"dew$k"),Ib={},Pb=!1,e(N6,"dew$j"),jb={},Cb=!1,e(D6,"dew$i"),Lb={},Nb=!1,e(U6,"dew$h"),Db={},Ub=!1,e(M6,"dew$g"),Mb={},$b=!1,e(FE,"dew$f"),Wb={},zb=!1,e(yf,"dew$e"),Hb={},qb=!1,e($6,"dew$d"),tc={},Gb=!1,e(W6,"dew$c"),rc={},Vb=!1,e(z6,"dew$b"),nc={},Kb=!1,e(H6,"dew$a"),ic={},Jb=!1,e(_d,"dew$9"),oc={},Yb=!1,e(q6,"dew$8"),ac={},Zb=!1,e(Ks,"dew$7"),sc={},Qb=!1,e(Ed,"dew$6"),lc={},Xb=!1,e(Sd,"dew$5"),fc={},e1=!1,e(G6,"dew$4"),uc={},t1=!1,e(V6,"dew$3"),cc={},r1=!1,e(K6,"dew$22"),vs={},n1=!1,e(BE,"dew$13"),hc={},i1=!1,e(xE,"dew4"),dc={},o1=!1,e(J6,"dew5"),pc={},a1=!1,e(Ad,"dew$b2"),gc={},s1=!1,e(Y6,"dew$a2"),yc={},l1=!1,e(Z6,"dew$92"),mc={},f1=!1,e(Q6,"dew$82"),wc={},u1=!1,e(X6,"dew$72"),c1={},h1=!1,e(eP,"dew$62"),bc={},d1=!1,lP=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(tP,"dew$52"),vc={},p1=!1,fP=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(IE,"dew$42"),_c={},g1=!1,e(rP,"dew$32"),Et={},y1=!1,e(nP,"dew$23"),m1={},w1=!1,e(iP,"dew$14"),St={},b1=!1,_s=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(Pk,"dew6"),wt=Pk(),wt.format,wt.deprecate,wt.debuglog,wt.inspect,wt.types,wt.isArray,wt.isBoolean,wt.isNull,wt.isNullOrUndefined,wt.isNumber,wt.isString,wt.isSymbol,wt.isUndefined,wt.isRegExp,wt.isObject,wt.isDate,wt.isError,wt.isFunction,wt.isPrimitive,wt.isBuffer,wt.log,wt.inherits,wt._extend,wt.promisify,wt.callbackify,pL=wt._extend,gL=wt.callbackify,yL=wt.debuglog,mL=wt.deprecate,wL=wt.format,bL=wt.inherits,vL=wt.inspect,_L=wt.isArray,EL=wt.isBoolean,SL=wt.isBuffer,AL=wt.isDate,RL=wt.isError,OL=wt.isFunction,kL=wt.isNull,TL=wt.isNullOrUndefined,FL=wt.isNumber,BL=wt.isObject,xL=wt.isPrimitive,IL=wt.isRegExp,PL=wt.isString,jL=wt.isSymbol,CL=wt.isUndefined,LL=wt.log,hy=wt.promisify,NL=wt.types,DL=wt.TextEncoder=globalThis.TextEncoder,UL=wt.TextDecoder=globalThis.TextDecoder,v1={},_1=!1,e(Zt,"dew$o"),Es={},E1=!1,e(Hs,"dew$n"),Bl={},S1=!1,e(Sr,"dew$m"),Ec={},A1=!1,e(Pr,"dew$l"),Sc={},R1=!1,e(Js,"dew$k2"),Ac={},O1=!1,e(Un,"dew$j2"),xl={},k1=!1,e(wi,"dew$i2"),Rc={},T1=!1,e(Ba,"dew$h2"),Oc={},F1=!1,e(Rd,"dew$g2"),Ss={},B1=!1,e(mf,"dew$f2"),kc={},x1=!1,e(oP,"dew$e2"),Tc={},I1=!1,e(wf,"dew$d2"),Fc={},P1=!1,e(PE,"dew$c2"),Bc={},j1=!1,Ze=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(bf,"dew$b3"),xc={},C1=!1,nt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(Od,"dew$a3"),Ic={},L1=!1,e(aP,"dew$93"),Pc={},N1=!1,e(Nn,"dew$83"),jc={},D1=!1,e(jE,"dew$73"),Cc={},U1=!1,e(CE,"dew$63"),Lc={},M1=!1,e(kd,"dew$53"),Nc={},$1=!1,e(LE,"dew$43"),Il={},W1=!1,e(sP,"dew$33"),Dc={},z1=!1,e(NE,"dew$24"),Uc={},H1=!1,q1=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(DE,"dew$15"),Yt={},G1=!1,e(jk,"dew7"),Dt=jk(),Dt._uint8ArrayToBuffer,Dt._isUint8Array,Dt.isDisturbed,Dt.isErrored,Dt.isReadable,Dt.Readable,Dt.Writable,Dt.Duplex,Dt.Transform,Dt.PassThrough,Dt.addAbortSignal,Dt.finished,Dt.destroy,Dt.pipeline,Dt.compose,Dt.Stream,Mc=Dt.Readable,Mc.wrap=function(a,i){return i=Object.assign({objectMode:a.readableObjectMode!=null||a.objectMode!=null||!0},i),i.destroy=function(f,g){a.destroy(f),g(f)},new Mc(i).wrap(a)},uP=Dt.Writable,cP=Dt.Duplex,hP=Dt.Transform,dP=Dt.PassThrough,pP=Dt.finished,gP=Dt.pipeline,yP=Dt.Stream,mP={finished:hy(Dt.finished),pipeline:hy(Dt.pipeline)}}),wP={};nn(wP,{Duplex:l(()=>cP,"Duplex"),PassThrough:l(()=>dP,"PassThrough"),Readable:l(()=>Mc,"Readable"),Stream:l(()=>yP,"Stream"),Transform:l(()=>hP,"Transform"),Writable:l(()=>uP,"Writable"),finished:l(()=>pP,"finished"),pipeline:l(()=>gP,"pipeline"),promises:l(()=>mP,"promises")});var $L=Qt(()=>{ML()}),WL=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Writable=a.Readable=void 0;var i=($L(),cr(wP));Object.defineProperty(a,"Readable",{enumerable:!0,get:e(function(){return i.Readable},"get")}),Object.defineProperty(a,"Writable",{enumerable:!0,get:e(function(){return i.Writable},"get")})});function DT(){if(V1)return Pl;V1=!0;var a=typeof Reflect=="object"?Reflect:null,i=a&&typeof a.apply=="function"?a.apply:e(function(A,x,U){return Function.prototype.apply.call(A,x,U)},"ReflectApply2"),f;a&&typeof a.ownKeys=="function"?f=a.ownKeys:Object.getOwnPropertySymbols?f=e(function(A){return Object.getOwnPropertyNames(A).concat(Object.getOwnPropertySymbols(A))},"ReflectOwnKeys2"):f=e(function(A){return Object.getOwnPropertyNames(A)},"ReflectOwnKeys2");function g(A){console&&console.warn&&console.warn(A)}l(g,"n"),e(g,"ProcessEmitWarning");var o=Number.isNaN||e(function(A){return A!==A},"NumberIsNaN2");function n(){n.init.call(this)}l(n,"s"),e(n,"EventEmitter2"),Pl=n,Pl.once=O,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._eventsCount=0,n.prototype._maxListeners=void 0;var r=10;function u(A){if(typeof A!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}l(u,"f"),e(u,"checkListener"),Object.defineProperty(n,"defaultMaxListeners",{enumerable:!0,get:e(function(){return r},"get"),set:e(function(A){if(typeof A!="number"||A<0||o(A))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+A+".");r=A},"set")}),n.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},n.prototype.setMaxListeners=e(function(A){if(typeof A!="number"||A<0||o(A))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+A+".");return this._maxListeners=A,this},"setMaxListeners");function p(A){return A._maxListeners===void 0?n.defaultMaxListeners:A._maxListeners}l(p,"h"),e(p,"_getMaxListeners"),n.prototype.getMaxListeners=e(function(){return p(this)},"getMaxListeners"),n.prototype.emit=e(function(A){for(var x=[],U=1;U<arguments.length;U++)x.push(arguments[U]);var M=A==="error",ee=this._events;if(ee!==void 0)M=M&&ee.error===void 0;else if(!M)return!1;if(M){var V;if(x.length>0&&(V=x[0]),V instanceof Error)throw V;var q=new Error("Unhandled error."+(V?" ("+V.message+")":""));throw q.context=V,q}var G=ee[A];if(G===void 0)return!1;if(typeof G=="function")i(G,this,x);else for(var re=G.length,ae=_(G,re),U=0;U<re;++U)i(ae[U],this,x);return!0},"emit");function h(A,x,U,M){var ee,V,q;if(u(U),V=A._events,V===void 0?(V=A._events=Object.create(null),A._eventsCount=0):(V.newListener!==void 0&&(A.emit("newListener",x,U.listener?U.listener:U),V=A._events),q=V[x]),q===void 0)q=V[x]=U,++A._eventsCount;else if(typeof q=="function"?q=V[x]=M?[U,q]:[q,U]:M?q.unshift(U):q.push(U),ee=p(A),ee>0&&q.length>ee&&!q.warned){q.warned=!0;var G=new Error("Possible EventEmitter memory leak detected. "+q.length+" "+String(x)+" listeners added. Use emitter.setMaxListeners() to increase limit");G.name="MaxListenersExceededWarning",G.emitter=A,G.type=x,G.count=q.length,g(G)}return A}l(h,"c"),e(h,"_addListener"),n.prototype.addListener=e(function(A,x){return h(this,A,x,!1)},"addListener"),n.prototype.on=n.prototype.addListener,n.prototype.prependListener=e(function(A,x){return h(this,A,x,!0)},"prependListener");function d(){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)}l(d,"d"),e(d,"onceWrapper");function m(A,x,U){var M={fired:!1,wrapFn:void 0,target:A,type:x,listener:U},ee=d.bind(M);return ee.listener=U,M.wrapFn=ee,ee}l(m,"y"),e(m,"_onceWrap"),n.prototype.once=e(function(A,x){return u(x),this.on(A,m(this,A,x)),this},"once3"),n.prototype.prependOnceListener=e(function(A,x){return u(x),this.prependListener(A,m(this,A,x)),this},"prependOnceListener"),n.prototype.removeListener=e(function(A,x){var U,M,ee,V,q;if(u(x),M=this._events,M===void 0)return this;if(U=M[A],U===void 0)return this;if(U===x||U.listener===x)--this._eventsCount===0?this._events=Object.create(null):(delete M[A],M.removeListener&&this.emit("removeListener",A,U.listener||x));else if(typeof U!="function"){for(ee=-1,V=U.length-1;V>=0;V--)if(U[V]===x||U[V].listener===x){q=U[V].listener,ee=V;break}if(ee<0)return this;ee===0?U.shift():S(U,ee),U.length===1&&(M[A]=U[0]),M.removeListener!==void 0&&this.emit("removeListener",A,q||x)}return this},"removeListener"),n.prototype.off=n.prototype.removeListener,n.prototype.removeAllListeners=e(function(A){var x,U,M;if(U=this._events,U===void 0)return this;if(U.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):U[A]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete U[A]),this;if(arguments.length===0){var ee=Object.keys(U),V;for(M=0;M<ee.length;++M)V=ee[M],V!=="removeListener"&&this.removeAllListeners(V);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(x=U[A],typeof x=="function")this.removeListener(A,x);else if(x!==void 0)for(M=x.length-1;M>=0;M--)this.removeListener(A,x[M]);return this},"removeAllListeners");function y(A,x,U){var M=A._events;if(M===void 0)return[];var ee=M[x];return ee===void 0?[]:typeof ee=="function"?U?[ee.listener||ee]:[ee]:U?T(ee):_(ee,ee.length)}l(y,"m"),e(y,"_listeners"),n.prototype.listeners=e(function(A){return y(this,A,!0)},"listeners"),n.prototype.rawListeners=e(function(A){return y(this,A,!1)},"rawListeners"),n.listenerCount=function(A,x){return typeof A.listenerCount=="function"?A.listenerCount(x):w.call(A,x)},n.prototype.listenerCount=w;function w(A){var x=this._events;if(x!==void 0){var U=x[A];if(typeof U=="function")return 1;if(U!==void 0)return U.length}return 0}l(w,"g"),e(w,"listenerCount2"),n.prototype.eventNames=e(function(){return this._eventsCount>0?f(this._events):[]},"eventNames");function _(A,x){for(var U=new Array(x),M=0;M<x;++M)U[M]=A[M];return U}l(_,"v"),e(_,"arrayClone");function S(A,x){for(;x+1<A.length;x++)A[x]=A[x+1];A.pop()}l(S,"_"),e(S,"spliceOne");function T(A){for(var x=new Array(A.length),U=0;U<x.length;++U)x[U]=A[U].listener||A[U];return x}l(T,"b"),e(T,"unwrapListeners");function O(A,x){return new Promise(function(U,M){function ee(q){A.removeListener(x,V),M(q)}l(ee,"N"),e(ee,"errorListener");function V(){typeof A.removeListener=="function"&&A.removeListener("error",ee),U([].slice.call(arguments))}l(V,"L"),e(V,"resolver"),P(A,x,V,{once:!0}),x!=="error"&&E(A,ee,{once:!0})})}l(O,"E"),e(O,"once2");function E(A,x,U){typeof A.on=="function"&&P(A,"error",x,U)}l(E,"R"),e(E,"addErrorHandlerIfEventEmitter");function P(A,x,U,M){if(typeof A.on=="function")M.once?A.once(x,U):A.on(x,U);else if(typeof A.addEventListener=="function")A.addEventListener(x,e(l(function ee(V){M.once&&A.removeEventListener(x,ee),U(V)},"N"),"wrapListener"));else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof A)}return l(P,"T"),e(P,"eventTargetAgnosticAddListener"),Pl}l(DT,"XW");var Pl,V1,ul,bP,vP,_P,EP,SP,AP,zL=Qt(()=>{Pl={},V1=!1,e(DT,"dew"),ul=DT(),ul.once,ul.once=function(a,i){return new Promise((f,g)=>{function o(...r){n!==void 0&&a.removeListener("error",n),f(r)}l(o,"a"),e(o,"eventListener");let n;i!=="error"&&(n=e(r=>{a.removeListener(name,o),g(r)},"errorListener"),a.once("error",n)),a.once(i,o)})},ul.on=function(a,i){let f=[],g=[],o=null,n=!1,r={async next(){let h=f.shift();if(h)return createIterResult(h,!1);if(o){let d=Promise.reject(o);return o=null,d}return n?createIterResult(void 0,!0):new Promise((d,m)=>g.push({resolve:d,reject:m}))},async return(){a.removeListener(i,u),a.removeListener("error",p),n=!0;for(let h of g)h.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(h){o=h,a.removeListener(i,u),a.removeListener("error",p)},[Symbol.asyncIterator](){return this}};return a.on(i,u),a.on("error",p),r;function u(...h){let d=g.shift();d?d.resolve(createIterResult(h,!1)):f.push(h)}function p(h){n=!0;let d=g.shift();d?d.reject(h):o=h,r.return()}},{EventEmitter:bP,defaultMaxListeners:vP,init:_P,listenerCount:EP,on:SP,once:AP}=ul}),RP={};nn(RP,{EventEmitter:l(()=>bP,"EventEmitter"),defaultMaxListeners:l(()=>vP,"defaultMaxListeners"),init:l(()=>_P,"init"),listenerCount:l(()=>EP,"listenerCount"),on:l(()=>SP,"on"),once:l(()=>AP,"once")});var HL=Qt(()=>{zL()}),OP=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.EventEmitter=void 0;var i=(HL(),cr(RP));Object.defineProperty(a,"EventEmitter",{enumerable:!0,get:e(function(){return i.EventEmitter},"get")})}),qL=Ge(a=>{"use strict";var n;Object.defineProperty(a,"__esModule",{value:!0}),a.FileHandle=void 0;var i=Fa(),f=OP(),g=(n=class extends f.EventEmitter{constructor(u,p){super(),this.refs=1,this.closePromise=null,this.position=0,this.readableWebStreamLocked=!1,this.fs=u,this.fd=p}getAsyncId(){return this.fd}appendFile(u,p){return(0,i.promisify)(this.fs,"appendFile")(this.fd,u,p)}chmod(u){return(0,i.promisify)(this.fs,"fchmod")(this.fd,u)}chown(u,p){return(0,i.promisify)(this.fs,"fchown")(this.fd,u,p)}close(){if(this.fd===-1)return Promise.resolve();if(this.closePromise)return this.closePromise;if(this.refs--,this.refs===0){let u=this.fd;this.fd=-1,this.closePromise=(0,i.promisify)(this.fs,"close")(u).finally(()=>{this.closePromise=null})}else this.closePromise=new Promise((u,p)=>{this.closeResolve=u,this.closeReject=p}).finally(()=>{this.closePromise=null,this.closeReject=void 0,this.closeResolve=void 0});return this.emit("close"),this.closePromise}datasync(){return(0,i.promisify)(this.fs,"fdatasync")(this.fd)}createReadStream(u){return this.fs.createReadStream("",{...u,fd:this})}createWriteStream(u){return this.fs.createWriteStream("",{...u,fd:this})}readableWebStream(u={}){let{type:p="bytes",autoClose:h=!1}=u,d=0;if(this.fd===-1)throw new Error("The FileHandle is closed");if(this.closePromise)throw new Error("The FileHandle is closing");if(this.readableWebStreamLocked)throw new Error("An error will be thrown if this method is called more than once or is called after the FileHandle is closed or closing.");this.readableWebStreamLocked=!0,this.ref();let m=e(()=>{this.readableWebStreamLocked=!1,this.unref(),h&&this.close().catch(()=>{})},"unlockAndCleanup");return new ReadableStream({type:p==="bytes"?"bytes":void 0,autoAllocateChunkSize:16384,pull:e(async y=>{try{let w=y.byobRequest?.view;if(!w){let S=new Uint8Array(16384),T=await this.read(S,0,S.length,d);if(T.bytesRead===0){y.close(),m();return}d+=T.bytesRead,y.enqueue(S.slice(0,T.bytesRead));return}let _=await this.read(w,w.byteOffset,w.byteLength,d);if(_.bytesRead===0){y.close(),m();return}d+=_.bytesRead,y.byobRequest.respond(_.bytesRead)}catch(w){y.error(w),m()}},"pull"),cancel:e(async()=>{m()},"cancel")})}async read(u,p,h,d){let m=d??this.position,y=await(0,i.promisify)(this.fs,"read",w=>({bytesRead:w,buffer:u}))(this.fd,u,p,h,m);return d==null&&(this.position+=y.bytesRead),y}readv(u,p){return(0,i.promisify)(this.fs,"readv",h=>({bytesRead:h,buffers:u}))(this.fd,u,p)}readFile(u){return(0,i.promisify)(this.fs,"readFile")(this.fd,u)}stat(u){return(0,i.promisify)(this.fs,"fstat")(this.fd,u)}sync(){return(0,i.promisify)(this.fs,"fsync")(this.fd)}truncate(u){return(0,i.promisify)(this.fs,"ftruncate")(this.fd,u)}utimes(u,p){return(0,i.promisify)(this.fs,"futimes")(this.fd,u,p)}async write(u,p,h,d){let m=typeof d!="number",y=m?this.position:d,w=await(0,i.promisify)(this.fs,"write",_=>({bytesWritten:_,buffer:u}))(this.fd,u,p,h,y);return m&&(this.position+=w.bytesWritten),w}writev(u,p){return(0,i.promisify)(this.fs,"writev",h=>({bytesWritten:h,buffers:u}))(this.fd,u,p)}writeFile(u,p){return(0,i.promisify)(this.fs,"writeFile")(this.fd,u,p)}async[Symbol.asyncDispose](){await this.close()}ref(){this.refs++}unref(){this.refs--,this.refs===0&&(this.fd=-1,this.closeResolve&&(0,i.promisify)(this.fs,"close")(this.fd).then(this.closeResolve,this.closeReject))}},l(n,"Kg"),n);e(g,"FileHandle");var o=g;a.FileHandle=o}),GL=Ge(a=>{"use strict";var u,p;Object.defineProperty(a,"__esModule",{value:!0}),a.FsPromises=void 0;var i=Fa(),f=Dn(),g=(u=class{constructor(d,m,y={}){if(this.fs=d,this.path=m,this.options=y,this.eventQueue=[],this.resolveQueue=[],this.finished=!1,this.maxQueue=y.maxQueue||2048,this.overflow=y.overflow||"ignore",this.startWatching(),y.signal){if(y.signal.aborted){this.finish();return}y.signal.addEventListener("abort",()=>{this.finish()})}}startWatching(){try{this.watcher=this.fs.watch(this.path,this.options,(d,m)=>{this.enqueueEvent({eventType:d,filename:m})})}catch(d){throw this.finish(),d}}enqueueEvent(d){if(!this.finished){if(this.eventQueue.length>=this.maxQueue)if(this.overflow==="throw"){let m=new Error(`Watch queue overflow: more than ${this.maxQueue} events queued`);this.finish(m);return}else this.eventQueue.shift(),console.warn(`Watch queue overflow: dropping event due to exceeding maxQueue of ${this.maxQueue}`);if(this.eventQueue.push(d),this.resolveQueue.length>0){let{resolve:m}=this.resolveQueue.shift(),y=this.eventQueue.shift();m({value:y,done:!1})}}}finish(d){if(!this.finished)for(this.finished=!0,this.watcher&&(this.watcher.close(),this.watcher=null);this.resolveQueue.length>0;){let{resolve:m,reject:y}=this.resolveQueue.shift();d?y(d):m({value:void 0,done:!0})}}async next(){return this.finished?{value:void 0,done:!0}:this.eventQueue.length>0?{value:this.eventQueue.shift(),done:!1}:new Promise((d,m)=>{this.resolveQueue.push({resolve:d,reject:m})})}async return(){return this.finish(),{value:void 0,done:!0}}async throw(d){throw this.finish(d),d}[Symbol.asyncIterator](){return this}},l(u,"Zg"),u);e(g,"FSWatchAsyncIterator");var o=g,n=(p=class{constructor(d,m){this.fs=d,this.FileHandle=m,this.constants=f.constants,this.cp=(0,i.promisify)(this.fs,"cp"),this.opendir=(0,i.promisify)(this.fs,"opendir"),this.statfs=(0,i.promisify)(this.fs,"statfs"),this.lutimes=(0,i.promisify)(this.fs,"lutimes"),this.glob=(0,i.promisify)(this.fs,"glob"),this.access=(0,i.promisify)(this.fs,"access"),this.chmod=(0,i.promisify)(this.fs,"chmod"),this.chown=(0,i.promisify)(this.fs,"chown"),this.copyFile=(0,i.promisify)(this.fs,"copyFile"),this.lchmod=(0,i.promisify)(this.fs,"lchmod"),this.lchown=(0,i.promisify)(this.fs,"lchown"),this.link=(0,i.promisify)(this.fs,"link"),this.lstat=(0,i.promisify)(this.fs,"lstat"),this.mkdir=(0,i.promisify)(this.fs,"mkdir"),this.mkdtemp=(0,i.promisify)(this.fs,"mkdtemp"),this.readdir=(0,i.promisify)(this.fs,"readdir"),this.readlink=(0,i.promisify)(this.fs,"readlink"),this.realpath=(0,i.promisify)(this.fs,"realpath"),this.rename=(0,i.promisify)(this.fs,"rename"),this.rmdir=(0,i.promisify)(this.fs,"rmdir"),this.rm=(0,i.promisify)(this.fs,"rm"),this.stat=(0,i.promisify)(this.fs,"stat"),this.symlink=(0,i.promisify)(this.fs,"symlink"),this.truncate=(0,i.promisify)(this.fs,"truncate"),this.unlink=(0,i.promisify)(this.fs,"unlink"),this.utimes=(0,i.promisify)(this.fs,"utimes"),this.readFile=(y,w)=>(0,i.promisify)(this.fs,"readFile")(y instanceof this.FileHandle?y.fd:y,w),this.appendFile=(y,w,_)=>(0,i.promisify)(this.fs,"appendFile")(y instanceof this.FileHandle?y.fd:y,w,_),this.open=(y,w="r",_)=>(0,i.promisify)(this.fs,"open",S=>new this.FileHandle(this.fs,S))(y,w,_),this.writeFile=(y,w,_)=>((0,i.isReadableStream)(w)?(0,i.streamToBuffer)(w):Promise.resolve(w)).then(S=>(0,i.promisify)(this.fs,"writeFile")(y instanceof this.FileHandle?y.fd:y,S,_)),this.watch=(y,w)=>{let _=typeof w=="string"?{encoding:w}:w||{};return new o(this.fs,y,_)}}},l(p,"Qg"),p);e(n,"FsPromises");var r=n;a.FsPromises=r}),VL=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.printTree=void 0;var i=e((f="",g)=>{let o="",n=g.length-1;for(;n>=0&&!g[n];n--);for(let r=0;r<=n;r++){let u=g[r];if(!u)continue;let p=r===n,h=u(f+(p?" ":"\u2502")+" "),d=h?p?"\u2514\u2500":"\u251C\u2500":"\u2502";o+=`
|
|
19
|
-
`+f+d+(h?" "+h:"")}return o},"printTree");a.printTree=i}),KL=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.printBinary=void 0;var i=e((f="",g)=>{let o=g[0],n=g[1],r="";return o&&(r+=`
|
|
20
|
-
`+f+"\u2190 "+o(f+" ")),n&&(r+=`
|
|
21
|
-
`+f+"\u2192 "+n(f+" ")),r},"printBinary");a.printBinary=i}),JL=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.printJson=void 0;var i=e((f="",g,o=2)=>(JSON.stringify(g,null,o)||"nil").split(`
|
|
22
|
-
`).join(`
|
|
23
|
-
`+f),"printJson");a.printJson=i}),YL=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var i=(LI(),cr(mE));i.__exportStar(VL(),a),i.__exportStar(KL(),a),i.__exportStar(JL(),a)}),ZL=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.newNotAllowedError=a.newTypeMismatchError=a.newNotFoundError=a.assertCanWrite=a.assertName=a.basename=a.ctx=void 0;var i=e((h={})=>({separator:"/",syncHandleAllowed:!1,mode:"read",...h}),"ctx");a.ctx=i;var f=e((h,d)=>{h[h.length-1]===d&&(h=h.slice(0,-1));let m=h.lastIndexOf(d);return m===-1?h:h.slice(m+1)},"basename");a.basename=f;var g=/^(\.{1,2})$|^(.*([\/\\]).*)$/,o=e((h,d,m)=>{if(!h||g.test(h))throw new TypeError(`Failed to execute '${d}' on '${m}': Name is not allowed.`)},"assertName");a.assertName=o;var n=e(h=>{if(h!=="readwrite")throw new DOMException("The request is not allowed by the user agent or the platform in the current context.","NotAllowedError")},"assertCanWrite");a.assertCanWrite=n;var r=e(()=>new DOMException("A requested file or directory could not be found at the time an operation was processed.","NotFoundError"),"newNotFoundError");a.newNotFoundError=r;var u=e(()=>new DOMException("The path supplied exists, but was not an entry of requested type.","TypeMismatchError"),"newTypeMismatchError");a.newTypeMismatchError=u;var p=e(()=>new DOMException("Permission not granted.","NotAllowedError"),"newNotAllowedError");a.newNotAllowedError=p}),QL=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.toTreeSync=void 0;var i=YL(),f=ZL(),g=e((o,n={})=>{let r=n.separator||"/",u=n.dir||r;u[u.length-1]!==r&&(u+=r);let p=n.tab||"",h=n.depth??10,d=" (...)";if(h>0){let m=o.readdirSync(u,{withFileTypes:!0});d=(0,i.printTree)(p,m.map(y=>w=>y.isDirectory()?(0,a.toTreeSync)(o,{dir:u+y.name,depth:h-1,tab:w}):y.isSymbolicLink()?""+y.name+" \u2192 "+o.readlinkSync(u+y.name):""+y.name))}return(0,f.basename)(u,r)+r+d},"toTreeSync");a.toTreeSync=g}),XL=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.getWriteFileOptions=a.writeFileDefaults=a.getRealpathOptsAndCb=a.getRealpathOptions=a.getStatfsOptsAndCb=a.getStatfsOptions=a.getStatOptsAndCb=a.getStatOptions=a.getAppendFileOptsAndCb=a.getAppendFileOpts=a.getOpendirOptsAndCb=a.getOpendirOptions=a.getReaddirOptsAndCb=a.getReaddirOptions=a.getReadFileOptions=a.getRmOptsAndCb=a.getRmdirOptions=a.getDefaultOptsAndCb=a.getDefaultOpts=a.optsDefaults=a.getMkdirOptions=void 0,a.getOptions=u,a.optsGenerator=p,a.optsAndCbGenerator=h;var i=gf(),f=md(),g=Fa(),o={mode:511,recursive:!1},n=e(ee=>typeof ee=="number"?Object.assign({},o,{mode:ee}):Object.assign({},o,ee),"getMkdirOptions");a.getMkdirOptions=n;var r=e(ee=>`Expected options to be either an object or a string, but got ${ee} instead`,"ERRSTR_OPTS");function u(ee,V){let q;if(V){let G=typeof V;switch(G){case"string":q=Object.assign({},ee,{encoding:V});break;case"object":q=Object.assign({},ee,V);break;default:throw TypeError(r(G))}}else return ee;return q.encoding!=="buffer"&&(0,f.assertEncoding)(q.encoding),q}l(u,"PR"),e(u,"getOptions");function p(ee){return V=>u(ee,V)}l(p,"Qn"),e(p,"optsGenerator");function h(ee){return(V,q)=>typeof V=="function"?[ee(),V]:[ee(V),(0,g.validateCallback)(q)]}l(h,"Uo"),e(h,"optsAndCbGenerator"),a.optsDefaults={encoding:"utf8"},a.getDefaultOpts=p(a.optsDefaults),a.getDefaultOptsAndCb=h(a.getDefaultOpts);var d={recursive:!1},m=e(ee=>Object.assign({},d,ee),"getRmdirOptions");a.getRmdirOptions=m;var y=p(a.optsDefaults);a.getRmOptsAndCb=h(y);var w={flag:"r"};a.getReadFileOptions=p(w);var _={encoding:"utf8",recursive:!1,withFileTypes:!1};a.getReaddirOptions=p(_),a.getReaddirOptsAndCb=h(a.getReaddirOptions);var S={encoding:"utf8",bufferSize:32,recursive:!1};a.getOpendirOptions=p(S),a.getOpendirOptsAndCb=h(a.getOpendirOptions);var T={encoding:"utf8",mode:438,flag:i.FLAGS[i.FLAGS.a]};a.getAppendFileOpts=p(T),a.getAppendFileOptsAndCb=h(a.getAppendFileOpts);var O={bigint:!1},E=e((ee={})=>Object.assign({},O,ee),"getStatOptions");a.getStatOptions=E;var P=e((ee,V)=>typeof ee=="function"?[(0,a.getStatOptions)(),ee]:[(0,a.getStatOptions)(ee),(0,g.validateCallback)(V)],"getStatOptsAndCb");a.getStatOptsAndCb=P;var A={bigint:!1},x=e((ee={})=>Object.assign({},A,ee),"getStatfsOptions");a.getStatfsOptions=x;var U=e((ee,V)=>typeof ee=="function"?[(0,a.getStatfsOptions)(),ee]:[(0,a.getStatfsOptions)(ee),(0,g.validateCallback)(V)],"getStatfsOptsAndCb");a.getStatfsOptsAndCb=U;var M=a.optsDefaults;a.getRealpathOptions=p(M),a.getRealpathOptsAndCb=h(a.getRealpathOptions),a.writeFileDefaults={encoding:"utf8",mode:438,flag:i.FLAGS[i.FLAGS.w]},a.getWriteFileOptions=p(a.writeFileDefaults)}),eN=Ge(a=>{"use strict";var r;Object.defineProperty(a,"__esModule",{value:!0}),a.Dir=void 0;var i=Fa(),f=pE(),g=yd(),o=(r=class{constructor(p,h){this.link=p,this.options=h,this.iteratorInfo=[],this.closed=!1,this.operationQueue=null,this.path=p.getPath(),this.iteratorInfo.push(p.children[Symbol.iterator]())}closeBase(){}readBase(p){let h,d,m,y;do{do if({done:h,value:d}=p[p.length-1].next(),!h)[m,y]=d;else break;while(m==="."||m==="..");if(h){if(p.pop(),p.length===0)break;h=!1}else return this.options.recursive&&y.children.size&&p.push(y.children[Symbol.iterator]()),f.default.build(y,this.options.encoding)}while(!h);return null}close(p){if(p===void 0)return this.closed?Promise.reject(new g.Error("ERR_DIR_CLOSED")):new Promise((h,d)=>{this.close(m=>{m?d(m):h()})});if((0,i.validateCallback)(p),this.closed){process.nextTick(p,new g.Error("ERR_DIR_CLOSED"));return}if(this.operationQueue!==null){this.operationQueue.push(()=>{this.close(p)});return}this.closed=!0;try{this.closeBase(),process.nextTick(p)}catch(h){process.nextTick(p,h)}}closeSync(){if(this.closed)throw new g.Error("ERR_DIR_CLOSED");if(this.operationQueue!==null)throw new g.Error("ERR_DIR_CONCURRENT_OPERATION");this.closed=!0,this.closeBase()}read(p){if(p===void 0)return new Promise((h,d)=>{this.read((m,y)=>{m?d(m):h(y??null)})});if((0,i.validateCallback)(p),this.closed){process.nextTick(p,new g.Error("ERR_DIR_CLOSED"));return}if(this.operationQueue!==null){this.operationQueue.push(()=>{this.read(p)});return}this.operationQueue=[];try{let h=this.readBase(this.iteratorInfo);process.nextTick(()=>{let d=this.operationQueue;this.operationQueue=null;for(let m of d)m();p(null,h)})}catch(h){process.nextTick(()=>{let d=this.operationQueue;this.operationQueue=null;for(let m of d)m();p(h)})}}readSync(){if(this.closed)throw new g.Error("ERR_DIR_CLOSED");if(this.operationQueue!==null)throw new g.Error("ERR_DIR_CONCURRENT_OPERATION");return this.readBase(this.iteratorInfo)}[Symbol.asyncIterator](){return{next:e(async()=>{try{let p=await this.read();return p!==null?{done:!1,value:p}:{done:!0,value:void 0}}catch(p){throw p}},"next"),[Symbol.asyncIterator](){return this}}}},l(r,"nw"),r);e(o,"Dir");var n=o;a.Dir=n}),tN=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.toMatcher=a.toRegex=void 0;var i=e(r=>/[.^$+{}()|\\]/.test(r)?`\\${r}`:r,"escapeRe"),f=e((r,u,p,h)=>{let d=u,m=[],y="",w=1;for(;d<r.length&&w>0;){let T=r[d];if(T==="(")w++,y+=T,d++;else if(T===")")if(w--,w===0){m.push(y),d++;break}else y+=T,d++;else T==="|"&&w===1?(m.push(y),y="",d++):(y+=T,d++)}if(w!==0)return;let _="",S=m.length;for(let T=0;T<S;T++)_+=(_?"|":"")+(0,a.toRegex)(m[T],h).source.replace(/^\^/,"").replace(/\$$/,"");switch(p){case"?":return[`(?:${_})?`,d];case"*":return[`(?:${_})*`,d];case"+":return[`(?:${_})+`,d];case"@":return[`(?:${_})`,d];case"!":return[`(?!${_})[^/]*`,d]}},"parseExtGlob"),g=e((r,u)=>{let p="",h=0,d=e(()=>{h++;let w=[],_="",S=!1;for(;h<r.length;){let T=r[h];if(T==="}"){w.push(_),h++,S=!0;break}if(T===","){w.push(_),_="",h++;continue}_+=T,h++}return S?`(?:${w.map(T=>(0,a.toRegex)(T,u).source.replace(/^\^/,"").replace(/\$$/,"")).join("|")})`:"\\{"+i(_)},"parseBraceGroup"),m=!!u?.extglob;for(;h<r.length;){let w=r[h];if(m&&r[h+1]==="("&&(w==="?"||w==="*"||w==="+"||w==="@"||w==="!")){let _=f(r,h+2,w,u);if(_){p+=_[0],h=_[1];continue}}switch(w){case"*":{if(r[h+1]==="*"){let _=h+2;for(;r[_]==="*";)_++;r[_]==="/"?(p+="(?:.*/)?",h=_+1):(p+=".*",h=_)}else p+="[^/]*",h++;break}case"?":p+="[^/]",h++;break;case"[":{let _="[";for(h++,h<r.length&&r[h]==="!"&&(_+="^",h++),h<r.length&&r[h]==="]"&&(_+="]",h++);h<r.length&&r[h]!=="]";){let S=r[h];_+=S==="\\"?"\\\\":S,h++}if(h<r.length&&r[h]==="]")_+="]",h++;else{p+="\\[";continue}p+=_;break}case"{":{p+=d();break}case"/":p+="/",h++;break;case".":case"^":case"$":case"+":case"(":case")":case"|":case"\\":p+=`\\${w}`,h++;break;default:p+=w,h++;break}}let y=u?.nocase?"i":"";return new RegExp("^"+p+"$",y)},"toRegex");a.toRegex=g;var o=/^\/(.{1,4096})\/([gimsuy]{0,6})$/,n=e((r,u)=>{let p=[],h=Array.isArray(r)?r:[r];for(let d of h)if(typeof d=="string"){let m=o.exec(d);if(m){let[,y,w]=m;p.push(new RegExp(y,w))}else p.push((0,a.toRegex)(d,u))}else p.push(d);return p.length?new Function("p","return "+p.map(d=>d+".test(p)").join("||")):()=>!1},"toMatcher");a.toMatcher=n}),rN=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.globSync=d;var i=pf(),f=tN(),g=Fa(),o=i.posix.join,n=i.posix.relative,r=i.posix.resolve;function u(m,y){return(0,f.toRegex)(y).test(m)}l(u,"NR"),e(u,"matchesPattern");function p(m,y){return y?typeof y=="function"?y(m):(Array.isArray(y)?y:[y]).some(w=>u(m,w)):!1}l(p,"G7"),e(p,"isExcluded");function h(m,y,w,_,S=0){let T=[],O=_.maxdepth??1/0,E=_.cwd?(0,g.pathToFilename)(_.cwd):process.cwd();if(S>O)return T;try{let P=m.readdirSync(y,{withFileTypes:!0});for(let A of P){let x=o(y,A.name.toString()),U=n(E,x);if(!p(U,_.exclude)&&(w.some(M=>u(U,M))&&T.push(U),A.isDirectory()&&S<O)){let M=h(m,x,w,_,S+1);T.push(...M)}}}catch{}return T}l(h,"iw"),e(h,"walkDirectory");function d(m,y,w={}){let _=w.cwd?(0,g.pathToFilename)(w.cwd):process.cwd(),S=r(_),T={cwd:S,exclude:w.exclude,maxdepth:w.maxdepth,withFileTypes:w.withFileTypes||!1},O=[];if(i.posix.isAbsolute(y)){let E=i.posix.dirname(y),P=i.posix.basename(y),A=h(m,E,[P],{...T,cwd:E});O.push(...A.map(x=>i.posix.resolve(E,x)))}else{let E=h(m,S,[y],T);O.push(...E)}return O=[...new Set(O)].sort(),O}l(d,"Y7"),e(d,"globSync")}),nN=Ge(a=>{"use strict";var be,ge,Ne;Object.defineProperty(a,"__esModule",{value:!0}),a.FSWatcher=a.StatWatcher=a.Volume=void 0,a.pathToSteps=ue,a.dataToStr=te,a.toUnixTimestamp=X;var i=pf(),f=iL(),g=lI(),o=pE(),n=oL(),r=ka(),u=qI(),p=aL(),h=WL(),d=Dn(),m=OP(),y=md(),w=qL(),_=gI(),S=GL(),T=QL(),O=gf(),E=yd(),P=XL(),A=Fa(),x=eN(),U=vE(),M=i.resolve,{O_SYMLINK:ee,F_OK:V,R_OK:q,W_OK:G,X_OK:re,COPYFILE_EXCL:ae,COPYFILE_FICLONE_FORCE:de}=d.constants,we=i.posix?i.posix.sep:i.sep,xe=i.posix?i.posix.relative:i.relative,Pe=i.posix?i.posix.join:i.join,se=i.posix?i.posix.dirname:i.dirname,Te=i.posix?i.posix.normalize:i.normalize,J=128;function ue(Ie){return(0,U.filenameToSteps)((0,A.pathToFilename)(Ie))}l(ue,"cq"),e(ue,"pathToSteps");function te(Ie,ke=y.ENCODING_UTF8){return r.Buffer.isBuffer(Ie)?Ie.toString(ke):Ie instanceof Uint8Array?(0,r.bufferFrom)(Ie).toString(ke):String(Ie)}l(te,"hq"),e(te,"dataToStr");function X(Ie){if(typeof Ie=="string"&&+Ie==Ie)return+Ie;if(Ie instanceof Date)return Ie.getTime()/1e3;if(isFinite(Ie))return Ie<0?Date.now()/1e3:Ie;throw new Error("Cannot parse time: "+Ie)}l(X,"Tr"),e(X,"toUnixTimestamp");function ye(Ie){if(typeof Ie!="number")throw TypeError(O.ERRSTR.UID)}l(ye,"ns"),e(ye,"validateUid");function Re(Ie){if(typeof Ie!="number")throw TypeError(O.ERRSTR.GID)}l(Re,"is"),e(Re,"validateGid");var De=(be=class{get promises(){if(this.promisesApi===null)throw new Error("Promise is not supported in this environment.");return this.promisesApi}constructor(ke=new f.Superblock){this._core=ke,this.promisesApi=new S.FsPromises(this,w.FileHandle),this.openSync=(v,R,C=438)=>{let j=(0,A.modeToNumber)(C),Z=(0,A.pathToFilename)(v),oe=(0,A.flagsToNumber)(R);return this._core.open(Z,oe,j,!(oe&ee))},this.open=(v,R,C,j)=>{let Z=C,oe=j;typeof C=="function"&&(Z=438,oe=C),Z=Z||438;let Ae=(0,A.modeToNumber)(Z),le=(0,A.pathToFilename)(v),Fe=(0,A.flagsToNumber)(R);this.wrapAsync(this._core.open,[le,Fe,Ae,!(Fe&ee)],oe)},this.closeSync=v=>{this._core.close(v)},this.close=(v,R)=>{(0,U.validateFd)(v);let C=this._core.getFileByFdOrThrow(v,"close");this.wrapAsync(this._core.close,[C.fd],R)},this.readSync=(v,R,C,j,Z)=>((0,U.validateFd)(v),this._core.read(v,R,C,j,Z)),this.read=(v,R,C,j,Z,oe)=>{if((0,A.validateCallback)(oe),j===0)return(0,u.default)(()=>{oe&&oe(null,0,R)});Promise.resolve().then(()=>{try{let Ae=this._core.read(v,R,C,j,Z);oe(null,Ae,R)}catch(Ae){oe(Ae)}})},this.readv=(v,R,C,j)=>{let Z=C,oe=j;typeof C=="function"&&([Z,oe]=[null,C]),(0,A.validateCallback)(oe),Promise.resolve().then(()=>{try{let Ae=this._core.readv(v,R,Z);oe(null,Ae,R)}catch(Ae){oe(Ae)}})},this.readvSync=(v,R,C)=>((0,U.validateFd)(v),this._core.readv(v,R,C??null)),this._readfile=(v,R,C)=>{let j,Z=typeof v=="number"&&(0,U.isFd)(v),oe;if(Z)oe=v;else{let Ae=(0,A.pathToFilename)(v),le=String(v),Fe=le.length>1&&le.endsWith("/"),ie=this._core.getResolvedLinkOrThrow(Ae,"open"),Je=ie.getNode();if(Je.isDirectory())throw(0,A.createError)("EISDIR","open",ie.getPath());if(Fe&&Je.isFile())throw(0,A.createError)("ENOTDIR","open",le);oe=this.openSync(v,R)}try{j=(0,A.bufferToEncoding)(this._core.getFileByFdOrThrow(oe).getBuffer(),C)}finally{Z||this.closeSync(oe)}return j},this.readFileSync=(v,R)=>{let C=(0,P.getReadFileOptions)(R),j=(0,A.flagsToNumber)(C.flag);return this._readfile(v,j,C.encoding)},this.readFile=(v,R,C)=>{let[j,Z]=(0,P.optsAndCbGenerator)(P.getReadFileOptions)(R,C),oe=(0,A.flagsToNumber)(j.flag);this.wrapAsync(this._readfile,[v,oe,j.encoding],Z)},this.writeSync=(v,R,C,j,Z)=>{let[,oe,Ae,le,Fe]=(0,A.getWriteSyncArgs)(v,R,C,j,Z);return this._write(v,oe,Ae,le,Fe)},this.write=(v,R,C,j,Z,oe)=>{let[,Ae,le,Fe,ie,Je,dt]=(0,A.getWriteArgs)(v,R,C,j,Z,oe);Promise.resolve().then(()=>{try{let W=this._write(v,le,Fe,ie,Je);Ae?dt(null,W,R):dt(null,W,le)}catch(W){dt(W)}})},this.writev=(v,R,C,j)=>{let Z=C,oe=j;typeof C=="function"&&([Z,oe]=[null,C]),(0,A.validateCallback)(oe),Promise.resolve().then(()=>{try{let Ae=this.writevBase(v,R,Z);oe(null,Ae,R)}catch(Ae){oe(Ae)}})},this.writevSync=(v,R,C)=>((0,U.validateFd)(v),this.writevBase(v,R,C??null)),this.writeFileSync=(v,R,C)=>{let j=(0,P.getWriteFileOptions)(C),Z=(0,A.flagsToNumber)(j.flag),oe=(0,A.modeToNumber)(j.mode),Ae=(0,U.dataToBuffer)(R,j.encoding);this._core.writeFile(v,Ae,Z,oe)},this.writeFile=(v,R,C,j)=>{let Z=C,oe=j;typeof C=="function"&&([Z,oe]=[P.writeFileDefaults,C]);let Ae=(0,A.validateCallback)(oe),le=(0,P.getWriteFileOptions)(Z),Fe=(0,A.flagsToNumber)(le.flag),ie=(0,A.modeToNumber)(le.mode),Je=(0,U.dataToBuffer)(R,le.encoding);this.wrapAsync(this._core.writeFile,[v,Je,Fe,ie],Ae)},this.copyFileSync=(v,R,C)=>{let j=(0,A.pathToFilename)(v),Z=(0,A.pathToFilename)(R);return this._copyFile(j,Z,(C||0)|0)},this.copyFile=(v,R,C,j)=>{let Z=(0,A.pathToFilename)(v),oe=(0,A.pathToFilename)(R),Ae,le;typeof C=="function"?[Ae,le]=[0,C]:[Ae,le]=[C,j],(0,A.validateCallback)(le),this.wrapAsync(this._copyFile,[Z,oe,Ae],le)},this._cp=(v,R,C)=>{if(C.filter&&!C.filter(v,R))return;let j=C.dereference?this.statSync(v):this.lstatSync(v),Z=null;try{Z=this.lstatSync(R)}catch(oe){if(oe.code!=="ENOENT")throw oe}if(Z&&j.ino===Z.ino&&j.dev===Z.dev)throw(0,A.createError)("EINVAL","cp",v,R);if(Z){if(j.isDirectory()&&!Z.isDirectory())throw(0,A.createError)("EISDIR","cp",v,R);if(!j.isDirectory()&&Z.isDirectory())throw(0,A.createError)("ENOTDIR","cp",v,R)}if(j.isDirectory()&&this.isSrcSubdir(v,R))throw(0,A.createError)("EINVAL","cp",v,R);{let oe=se(R);this.existsSync(oe)||this.mkdirSync(oe,{recursive:!0})}if(j.isDirectory()){if(!C.recursive)throw(0,A.createError)("EISDIR","cp",v);this.cpDirSync(j,Z,v,R,C)}else if(j.isFile()||j.isCharacterDevice()||j.isBlockDevice())this.cpFileSync(j,Z,v,R,C);else if(j.isSymbolicLink()&&!C.dereference)this.cpSymlinkSync(Z,v,R,C);else throw(0,A.createError)("EINVAL","cp",v)},this.linkSync=(v,R)=>{let C=(0,A.pathToFilename)(v),j=(0,A.pathToFilename)(R);this._core.link(C,j)},this.link=(v,R,C)=>{let j=(0,A.pathToFilename)(v),Z=(0,A.pathToFilename)(R);this.wrapAsync(this._core.link,[j,Z],C)},this.unlinkSync=v=>{let R=(0,A.pathToFilename)(v);this._core.unlink(R)},this.unlink=(v,R)=>{let C=(0,A.pathToFilename)(v);this.wrapAsync(this._core.unlink,[C],R)},this.symlinkSync=(v,R,C)=>{let j=(0,A.pathToFilename)(v),Z=(0,A.pathToFilename)(R);this._core.symlink(j,Z)},this.symlink=(v,R,C,j)=>{let Z=(0,A.validateCallback)(typeof C=="function"?C:j),oe=(0,A.pathToFilename)(v),Ae=(0,A.pathToFilename)(R);this.wrapAsync(this._core.symlink,[oe,Ae],Z)},this._lstat=(v,R=!1,C=!1)=>{let j;try{j=this._core.getLinkOrThrow(v,"lstat")}catch(Z){if(Z.code==="ENOENT"&&!C)return;throw Z}return g.default.build(j.getNode(),R)},this.lstatSync=(v,R)=>{let{throwIfNoEntry:C=!0,bigint:j=!1}=(0,P.getStatOptions)(R);return this._lstat((0,A.pathToFilename)(v),j,C)},this.renameSync=(v,R)=>{let C=(0,A.pathToFilename)(v),j=(0,A.pathToFilename)(R);this._core.rename(C,j)},this.rename=(v,R,C)=>{let j=(0,A.pathToFilename)(v),Z=(0,A.pathToFilename)(R);this.wrapAsync(this._core.rename,[j,Z],C)},this.existsSync=v=>{try{return this._exists((0,A.pathToFilename)(v))}catch{return!1}},this.exists=(v,R)=>{let C=(0,A.pathToFilename)(v);if(typeof R!="function")throw Error(O.ERRSTR.CB);Promise.resolve().then(()=>{try{R(this._exists(C))}catch{R(!1)}})},this.accessSync=(v,R=V)=>{let C=(0,A.pathToFilename)(v);R=R|0,this._access(C,R)},this.access=(v,R,C)=>{let j=V,Z;typeof R!="function"?[j,Z]=[R|0,(0,A.validateCallback)(C)]:Z=R;let oe=(0,A.pathToFilename)(v);this.wrapAsync(this._access,[oe,j],Z)},this.appendFileSync=(v,R,C)=>{let j=(0,P.getAppendFileOpts)(C);(!j.flag||(0,U.isFd)(v))&&(j.flag="a"),this.writeFileSync(v,R,j)},this.appendFile=(v,R,C,j)=>{let[Z,oe]=(0,P.getAppendFileOptsAndCb)(C,j);(!Z.flag||(0,U.isFd)(v))&&(Z.flag="a"),this.writeFile(v,R,Z,oe)},this._readdir=(v,R)=>{let C=(0,U.filenameToSteps)(v),j=this._core.getResolvedLinkOrThrow(v,"scandir"),Z=j.getNode();if(!Z.isDirectory())throw(0,A.createError)("ENOTDIR","scandir",v);if(!Z.canRead())throw(0,A.createError)("EACCES","scandir",v);let oe=[];for(let le of j.children.keys()){let Fe=j.getChild(le);if(!(!Fe||le==="."||le==="..")&&(oe.push(o.default.build(Fe,R.encoding)),R.recursive&&Fe.children.size)){let ie={...R,recursive:!0,withFileTypes:!0},Je=this._readdir(Fe.getPath(),ie);oe.push(...Je)}}if(!U.isWin&&R.encoding!=="buffer"&&oe.sort((le,Fe)=>le.name<Fe.name?-1:le.name>Fe.name?1:0),R.withFileTypes)return oe;let Ae=v;return U.isWin&&(Ae=Ae.replace(/\\/g,"/")),oe.map(le=>{if(R.recursive){let Fe=Pe(le.parentPath,le.name.toString());return U.isWin&&(Fe=Fe.replace(/\\/g,"/")),Fe.replace(Ae+i.posix.sep,"")}return le.name})},this.readdirSync=(v,R)=>{let C=(0,P.getReaddirOptions)(R),j=(0,A.pathToFilename)(v);return this._readdir(j,C)},this.readdir=(v,R,C)=>{let[j,Z]=(0,P.getReaddirOptsAndCb)(R,C),oe=(0,A.pathToFilename)(v);this.wrapAsync(this._readdir,[oe,j],Z)},this._readlink=(v,R)=>{let C=this._core.getLinkOrThrow(v,"readlink").getNode();if(!C.isSymlink())throw(0,A.createError)("EINVAL","readlink",v);return(0,y.strToEncoding)(C.symlink,R)},this.readlinkSync=(v,R)=>{let C=(0,P.getDefaultOpts)(R),j=(0,A.pathToFilename)(v);return this._readlink(j,C.encoding)},this.readlink=(v,R,C)=>{let[j,Z]=(0,P.getDefaultOptsAndCb)(R,C),oe=(0,A.pathToFilename)(v);this.wrapAsync(this._readlink,[oe,j.encoding],Z)},this._fsync=v=>{this._core.getFileByFdOrThrow(v,"fsync")},this.fsyncSync=v=>{this._fsync(v)},this.fsync=(v,R)=>{this.wrapAsync(this._fsync,[v],R)},this._fdatasync=v=>{this._core.getFileByFdOrThrow(v,"fdatasync")},this.fdatasyncSync=v=>{this._fdatasync(v)},this.fdatasync=(v,R)=>{this.wrapAsync(this._fdatasync,[v],R)},this._ftruncate=(v,R)=>{this._core.getFileByFdOrThrow(v,"ftruncate").truncate(R)},this.ftruncateSync=(v,R)=>{this._ftruncate(v,R)},this.ftruncate=(v,R,C)=>{let j=typeof R=="number"?R:0,Z=(0,A.validateCallback)(typeof R=="number"?C:R);this.wrapAsync(this._ftruncate,[v,j],Z)},this._truncate=(v,R)=>{let C=this.openSync(v,"r+");try{this.ftruncateSync(C,R)}finally{this.closeSync(C)}},this.truncateSync=(v,R)=>{if((0,U.isFd)(v))return this.ftruncateSync(v,R);this._truncate(v,R)},this.truncate=(v,R,C)=>{let j=typeof R=="number"?R:0,Z=(0,A.validateCallback)(typeof R=="number"?C:R);if((0,U.isFd)(v))return this.ftruncate(v,j,Z);this.wrapAsync(this._truncate,[v,j],Z)},this._futimes=(v,R,C)=>{let j=this._core.getFileByFdOrThrow(v,"futimes").node;j.atime=new Date(R*1e3),j.mtime=new Date(C*1e3)},this.futimesSync=(v,R,C)=>{this._futimes(v,X(R),X(C))},this.futimes=(v,R,C,j)=>{this.wrapAsync(this._futimes,[v,X(R),X(C)],j)},this._utimes=(v,R,C,j=!0)=>{let Z=this._core,oe=(j?Z.getResolvedLinkOrThrow(v,"utimes"):Z.getLinkOrThrow(v,"lutimes")).getNode();oe.atime=new Date(R*1e3),oe.mtime=new Date(C*1e3)},this.utimesSync=(v,R,C)=>{this._utimes((0,A.pathToFilename)(v),X(R),X(C),!0)},this.utimes=(v,R,C,j)=>{this.wrapAsync(this._utimes,[(0,A.pathToFilename)(v),X(R),X(C),!0],j)},this.lutimesSync=(v,R,C)=>{this._utimes((0,A.pathToFilename)(v),X(R),X(C),!1)},this.lutimes=(v,R,C,j)=>{this.wrapAsync(this._utimes,[(0,A.pathToFilename)(v),X(R),X(C),!1],j)},this.mkdirSync=(v,R)=>{let C=(0,P.getMkdirOptions)(R),j=(0,A.modeToNumber)(C.mode,511),Z=(0,A.pathToFilename)(v);if(C.recursive)return this._core.mkdirp(Z,j);this._core.mkdir(Z,j)},this.mkdir=(v,R,C)=>{let j=(0,P.getMkdirOptions)(R),Z=(0,A.validateCallback)(typeof R=="function"?R:C),oe=(0,A.modeToNumber)(j.mode,511),Ae=(0,A.pathToFilename)(v);j.recursive?this.wrapAsync(this._core.mkdirp,[Ae,oe],Z):this.wrapAsync(this._core.mkdir,[Ae,oe],Z)},this._mkdtemp=(v,R,C=5)=>{let j=v+(0,A.genRndStr6)();try{return this._core.mkdir(j,511),(0,y.strToEncoding)(j,R)}catch(Z){if(Z.code==="EEXIST"){if(C>1)return this._mkdtemp(v,R,C-1);throw Error("Could not create temp dir.")}else throw Z}},this.mkdtempSync=(v,R)=>{let{encoding:C}=(0,P.getDefaultOpts)(R);if(!v||typeof v!="string")throw new TypeError("filename prefix is required");return(0,A.nullCheck)(v),this._mkdtemp(v,C)},this.mkdtemp=(v,R,C)=>{let[{encoding:j},Z]=(0,P.getDefaultOptsAndCb)(R,C);if(!v||typeof v!="string")throw new TypeError("filename prefix is required");(0,A.nullCheck)(v)&&this.wrapAsync(this._mkdtemp,[v,j],Z)},this.rmdirSync=(v,R)=>{let C=(0,P.getRmdirOptions)(R);this._core.rmdir((0,A.pathToFilename)(v),C.recursive)},this.rmdir=(v,R,C)=>{let j=(0,P.getRmdirOptions)(R),Z=(0,A.validateCallback)(typeof R=="function"?R:C);this.wrapAsync(this._core.rmdir,[(0,A.pathToFilename)(v),j.recursive],Z)},this.rmSync=(v,R)=>{this._core.rm((0,A.pathToFilename)(v),R?.force,R?.recursive)},this.rm=(v,R,C)=>{let[j,Z]=(0,P.getRmOptsAndCb)(R,C);this.wrapAsync(this._core.rm,[(0,A.pathToFilename)(v),j?.force,j?.recursive],Z)},this._fchmod=(v,R)=>{this._core.getFileByFdOrThrow(v,"fchmod").chmod(R)},this.fchmodSync=(v,R)=>{this._fchmod(v,(0,A.modeToNumber)(R))},this.fchmod=(v,R,C)=>{this.wrapAsync(this._fchmod,[v,(0,A.modeToNumber)(R)],C)},this._chmod=(v,R,C=!0)=>{(C?this._core.getResolvedLinkOrThrow(v,"chmod"):this._core.getLinkOrThrow(v,"chmod")).getNode().chmod(R)},this.chmodSync=(v,R)=>{let C=(0,A.modeToNumber)(R),j=(0,A.pathToFilename)(v);this._chmod(j,C,!0)},this.chmod=(v,R,C)=>{let j=(0,A.modeToNumber)(R),Z=(0,A.pathToFilename)(v);this.wrapAsync(this._chmod,[Z,j],C)},this._lchmod=(v,R)=>{this._chmod(v,R,!1)},this.lchmodSync=(v,R)=>{let C=(0,A.modeToNumber)(R),j=(0,A.pathToFilename)(v);this._lchmod(j,C)},this.lchmod=(v,R,C)=>{let j=(0,A.modeToNumber)(R),Z=(0,A.pathToFilename)(v);this.wrapAsync(this._lchmod,[Z,j],C)},this._fchown=(v,R,C)=>{this._core.getFileByFdOrThrow(v,"fchown").chown(R,C)},this.fchownSync=(v,R,C)=>{ye(R),Re(C),this._fchown(v,R,C)},this.fchown=(v,R,C,j)=>{ye(R),Re(C),this.wrapAsync(this._fchown,[v,R,C],j)},this._chown=(v,R,C)=>{this._core.getResolvedLinkOrThrow(v,"chown").getNode().chown(R,C)},this.chownSync=(v,R,C)=>{ye(R),Re(C),this._chown((0,A.pathToFilename)(v),R,C)},this.chown=(v,R,C,j)=>{ye(R),Re(C),this.wrapAsync(this._chown,[(0,A.pathToFilename)(v),R,C],j)},this._lchown=(v,R,C)=>{this._core.getLinkOrThrow(v,"lchown").getNode().chown(R,C)},this.lchownSync=(v,R,C)=>{ye(R),Re(C),this._lchown((0,A.pathToFilename)(v),R,C)},this.lchown=(v,R,C,j)=>{ye(R),Re(C),this.wrapAsync(this._lchown,[(0,A.pathToFilename)(v),R,C],j)},this.statWatchers={},this.cpSync=(v,R,C)=>{let j=(0,A.pathToFilename)(v),Z=(0,A.pathToFilename)(R),oe={dereference:C?.dereference??!1,errorOnExist:C?.errorOnExist??!1,filter:C?.filter,force:C?.force??!0,mode:C?.mode??0,preserveTimestamps:C?.preserveTimestamps??!1,recursive:C?.recursive??!1,verbatimSymlinks:C?.verbatimSymlinks??!1};return this._cp(j,Z,oe)},this.cp=(v,R,C,j)=>{let Z=(0,A.pathToFilename)(v),oe=(0,A.pathToFilename)(R),Ae,le;typeof C=="function"?[Ae,le]=[{},C]:[Ae,le]=[C||{},j],(0,A.validateCallback)(le);let Fe={dereference:Ae?.dereference??!1,errorOnExist:Ae?.errorOnExist??!1,filter:Ae?.filter,force:Ae?.force??!0,mode:Ae?.mode??0,preserveTimestamps:Ae?.preserveTimestamps??!1,recursive:Ae?.recursive??!1,verbatimSymlinks:Ae?.verbatimSymlinks??!1};this.wrapAsync(this._cp,[Z,oe,Fe],le)},this.openAsBlob=async(v,R)=>{let C=(0,A.pathToFilename)(v),j;try{j=this._core.getResolvedLinkOrThrow(C,"open")}catch(Ae){throw Ae&&typeof Ae=="object"&&Ae.code==="ENOENT"?new E.TypeError("ERR_INVALID_ARG_VALUE"):Ae}let Z=j.getNode().getBuffer(),oe=R?.type||"";return new Blob([Z],{type:oe})},this.glob=(v,...R)=>{let[C,j]=R.length===1?[{},R[0]]:[R[0],R[1]];this.wrapAsync(this._globSync,[v,C||{}],j)},this.globSync=(v,R={})=>this._globSync(v,R),this._globSync=(v,R={})=>{let{globSync:C}=rN();return C(this,v,R)},this._opendir=(v,R)=>{let C=this._core.getResolvedLinkOrThrow(v,"scandir");if(!C.getNode().isDirectory())throw(0,A.createError)("ENOTDIR","scandir",v);return new x.Dir(C,R)},this.opendirSync=(v,R)=>{let C=(0,P.getOpendirOptions)(R),j=(0,A.pathToFilename)(v);return this._opendir(j,C)},this.opendir=(v,R,C)=>{let[j,Z]=(0,P.getOpendirOptsAndCb)(R,C),oe=(0,A.pathToFilename)(v);this.wrapAsync(this._opendir,[oe,j],Z)};let Ce=this;this.StatWatcher=class extends fe{constructor(){super(Ce)}};let $e=I;this.ReadStream=class extends $e{constructor(...v){super(Ce,...v)}};let Ke=z;this.WriteStream=class extends Ke{constructor(...v){super(Ce,...v)}},this.FSWatcher=class extends Oe{constructor(){super(Ce)}};let t=e((v,R)=>{let C=this._core.getResolvedLinkOrThrow(v,"realpath");return(0,y.strToEncoding)(C.getPath()||"/",R)},"_realpath"),s=e((v,R,C)=>{let[j,Z]=(0,P.getRealpathOptsAndCb)(R,C),oe=(0,A.pathToFilename)(v);Ce.wrapAsync(t,[oe,j.encoding],Z)},"realpathImpl"),c=e((v,R)=>t((0,A.pathToFilename)(v),(0,P.getRealpathOptions)(R).encoding),"realpathSyncImpl");this.realpath=s,this.realpath.native=s,this.realpathSync=c,this.realpathSync.native=c}wrapAsync(ke,Ce,$e){(0,A.validateCallback)($e),Promise.resolve().then(()=>{let Ke;try{Ke=ke.apply(this,Ce)}catch(t){$e(t);return}$e(null,Ke)})}toTree(ke={separator:i.sep}){return(0,T.toTreeSync)(this,ke)}reset(){this._core.reset()}toJSON(ke,Ce={},$e=!1,Ke=!1){return this._core.toJSON(ke,Ce,$e,Ke)}fromJSON(ke,Ce){return this._core.fromJSON(ke,Ce)}fromNestedJSON(ke,Ce){return this._core.fromNestedJSON(ke,Ce)}mountSync(ke,Ce){this._core.fromJSON(Ce,ke)}_write(ke,Ce,$e,Ke,t){let s=this._core.getFileByFdOrThrow(ke,"write");if(s.node.isSymlink())throw(0,A.createError)("EBADF","write",s.link.getPath());return s.write(Ce,$e,Ke,t===-1||typeof t!="number"?void 0:t)}writevBase(ke,Ce,$e){let Ke=this._core.getFileByFdOrThrow(ke),t=$e??void 0;t===-1&&(t=void 0);let s=0;for(let c of Ce){let v=r.Buffer.from(c.buffer,c.byteOffset,c.byteLength),R=Ke.write(v,0,v.byteLength,t);if(t=void 0,s+=R,R<v.byteLength)break}return s}_copyFile(ke,Ce,$e){let Ke=this.readFileSync(ke);if($e&ae&&this.existsSync(Ce))throw(0,A.createError)("EEXIST","copyFile",ke,Ce);if($e&de)throw(0,A.createError)("ENOSYS","copyFile",ke,Ce);this._core.writeFile(Ce,Ke,O.FLAGS.w,438)}isSrcSubdir(ke,Ce){try{let $e=Te(ke.startsWith("/")?ke:"/"+ke),Ke=Te(Ce.startsWith("/")?Ce:"/"+Ce);if($e===Ke)return!0;let t=xe($e,Ke);return t===""||!t.startsWith("..")&&!(0,i.isAbsolute)(t)}catch{return!1}}cpFileSync(ke,Ce,$e,Ke,t){if(Ce){if(t.errorOnExist)throw(0,A.createError)("EEXIST","cp",Ke);if(!t.force)return;this.unlinkSync(Ke)}this.copyFileSync($e,Ke,t.mode),t.preserveTimestamps&&this.utimesSync(Ke,ke.atime,ke.mtime),this.chmodSync(Ke,Number(ke.mode))}cpDirSync(ke,Ce,$e,Ke,t){Ce||this.mkdirSync(Ke);let s=this.readdirSync($e);for(let c of s){let v=Pe($e,String(c)),R=Pe(Ke,String(c));t.filter&&!t.filter(v,R)||this._cp(v,R,t)}this.chmodSync(Ke,Number(ke.mode))}cpSymlinkSync(ke,Ce,$e,Ke){let t=String(this.readlinkSync(Ce));!Ke.verbatimSymlinks&&!(0,i.isAbsolute)(t)&&(t=M(se(Ce),t)),ke&&this.unlinkSync($e),this.symlinkSync(t,$e)}lstat(ke,Ce,$e){let[{throwIfNoEntry:Ke=!0,bigint:t=!1},s]=(0,P.getStatOptsAndCb)(Ce,$e);this.wrapAsync(this._lstat,[(0,A.pathToFilename)(ke),t,Ke],s)}_stat(ke,Ce=!1,$e=!0){let Ke;try{Ke=this._core.getResolvedLinkOrThrow(ke,"stat")}catch(t){if(t.code==="ENOENT"&&!$e)return;throw t}return g.default.build(Ke.getNode(),Ce)}statSync(ke,Ce){let{bigint:$e=!0,throwIfNoEntry:Ke=!0}=(0,P.getStatOptions)(Ce);return this._stat((0,A.pathToFilename)(ke),$e,Ke)}stat(ke,Ce,$e){let[{bigint:Ke=!1,throwIfNoEntry:t=!0},s]=(0,P.getStatOptsAndCb)(Ce,$e);this.wrapAsync(this._stat,[(0,A.pathToFilename)(ke),Ke,t],s)}fstatBase(ke,Ce=!1){let $e=this._core.getFileByFd(ke);if(!$e)throw(0,A.createError)("EBADF","fstat");return g.default.build($e.node,Ce)}fstatSync(ke,Ce){return this.fstatBase(ke,(0,P.getStatOptions)(Ce).bigint)}fstat(ke,Ce,$e){let[Ke,t]=(0,P.getStatOptsAndCb)(Ce,$e);this.wrapAsync(this.fstatBase,[ke,Ke.bigint],t)}_exists(ke){return!!this._stat(ke)}_access(ke,Ce){let $e=this._core.getLinkOrThrow(ke,"access").getNode();if(Ce!==V&&(Ce&q&&!$e.canRead()||Ce&G&&!$e.canWrite()||Ce&re&&!$e.canExecute()))throw(0,A.createError)("EACCES","access",ke)}watchFile(ke,Ce,$e){let Ke=(0,A.pathToFilename)(ke),t=Ce,s=$e;if(typeof t=="function"&&(s=Ce,t=null),typeof s!="function")throw Error('"watchFile()" requires a listener function');let c=5007,v=!0;t&&typeof t=="object"&&(typeof t.interval=="number"&&(c=t.interval),typeof t.persistent=="boolean"&&(v=t.persistent));let R=this.statWatchers[Ke];return R||(R=new this.StatWatcher,R.start(Ke,v,c),this.statWatchers[Ke]=R),R.addListener("change",s),R}unwatchFile(ke,Ce){let $e=(0,A.pathToFilename)(ke),Ke=this.statWatchers[$e];Ke&&(typeof Ce=="function"?Ke.removeListener("change",Ce):Ke.removeAllListeners("change"),Ke.listenerCount("change")===0&&(Ke.stop(),delete this.statWatchers[$e]))}createReadStream(ke,Ce){return new this.ReadStream(ke,Ce)}createWriteStream(ke,Ce){return new this.WriteStream(ke,Ce)}watch(ke,Ce,$e){let Ke=(0,A.pathToFilename)(ke),t=Ce;typeof Ce=="function"&&($e=Ce,t=null);let{persistent:s,recursive:c,encoding:v}=(0,P.getDefaultOpts)(t);s===void 0&&(s=!0),c===void 0&&(c=!1);let R=new this.FSWatcher;return R.start(Ke,s,c,v),$e&&R.addListener("change",$e),R}_statfs(ke,Ce=!1){return this._core.getResolvedLinkOrThrow(ke,"statfs"),n.default.build(this._core,Ce)}statfsSync(ke,Ce){let{bigint:$e=!1}=(0,P.getStatfsOptions)(Ce);return this._statfs((0,A.pathToFilename)(ke),$e)}statfs(ke,Ce,$e){let[{bigint:Ke=!1},t]=(0,P.getStatfsOptsAndCb)(Ce,$e);this.wrapAsync(this._statfs,[(0,A.pathToFilename)(ke),Ke],t)}},l(be,"uw"),be);e(De,"Volume");var Y=De;a.Volume=Y,Y.fromJSON=(Ie,ke)=>new Y(f.Superblock.fromJSON(Ie,ke)),Y.fromNestedJSON=(Ie,ke)=>new Y(f.Superblock.fromNestedJSON(Ie,ke));function H(Ie){Ie.emit("stop")}l(H,"dq"),e(H,"emitStop");var Q=(ge=class extends m.EventEmitter{constructor(ke){super(),this.onInterval=()=>{try{let Ce=this.vol.statSync(this.filename);this.hasChanged(Ce)&&(this.emit("change",Ce,this.prev),this.prev=Ce)}finally{this.loop()}},this.vol=ke}loop(){this.timeoutRef=this.setTimeout(this.onInterval,this.interval)}hasChanged(ke){return ke.mtimeMs>this.prev.mtimeMs||ke.nlink!==this.prev.nlink}start(ke,Ce=!0,$e=5007){this.filename=(0,A.pathToFilename)(ke),this.setTimeout=Ce?setTimeout.bind(globalThis):p.default,this.interval=$e,this.prev=this.vol.statSync(this.filename),this.loop()}stop(){clearTimeout(this.timeoutRef),(0,u.default)(()=>{H.call(this,this)})}},l(ge,"cw"),ge);e(Q,"StatWatcher");var fe=Q;a.StatWatcher=fe;var ve;function N(Ie){ve=(0,r.bufferAllocUnsafe)(Ie),ve.used=0}l(N,"pq"),e(N,"allocNewPool"),(0,_.inherits)(I,h.Readable),a.ReadStream=I;function I(Ie,ke,Ce){if(!(this instanceof I))return new I(Ie,ke,Ce);if(this._vol=Ie,Ce=Object.assign({},(0,P.getOptions)(Ce,{})),Ce.highWaterMark===void 0&&(Ce.highWaterMark=64*1024),h.Readable.call(this,Ce),this.path=(0,A.pathToFilename)(ke),this.fd=Ce.fd===void 0?null:typeof Ce.fd!="number"?Ce.fd.fd:Ce.fd,this.flags=Ce.flags===void 0?"r":Ce.flags,this.mode=Ce.mode===void 0?438:Ce.mode,this.start=Ce.start,this.end=Ce.end,this.autoClose=Ce.autoClose===void 0?!0:Ce.autoClose,this.pos=void 0,this.bytesRead=0,this.start!==void 0){if(typeof this.start!="number")throw new TypeError('"start" option must be a Number');if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw new TypeError('"end" option must be a Number');if(this.start>this.end)throw new Error('"start" option must be <= "end" option');this.pos=this.start}typeof this.fd!="number"&&this.open(),this.on("end",function(){this.autoClose&&this.destroy&&this.destroy()})}l(I,"bn"),e(I,"FsReadStream"),I.prototype.open=function(){var Ie=this;this._vol.open(this.path,this.flags,this.mode,(ke,Ce)=>{if(ke){Ie.autoClose&&Ie.destroy&&Ie.destroy(),Ie.emit("error",ke);return}Ie.fd=Ce,Ie.emit("open",Ce),Ie.read()})},I.prototype._read=function(Ie){if(typeof this.fd!="number")return this.once("open",function(){this._read(Ie)});if(this.destroyed)return;(!ve||ve.length-ve.used<J)&&N(this._readableState.highWaterMark);var ke=ve,Ce=Math.min(ve.length-ve.used,Ie),$e=ve.used;if(this.pos!==void 0&&(Ce=Math.min(this.end-this.pos+1,Ce)),Ce<=0)return this.push(null);var Ke=this;this._vol.read(this.fd,ve,ve.used,Ce,this.pos,t),this.pos!==void 0&&(this.pos+=Ce),ve.used+=Ce;function t(s,c){if(s)Ke.autoClose&&Ke.destroy&&Ke.destroy(),Ke.emit("error",s);else{var v=null;c>0&&(Ke.bytesRead+=c,v=ke.slice($e,$e+c)),Ke.push(v)}}l(t,"s"),e(t,"onread")},I.prototype._destroy=function(Ie,ke){this.close(Ce=>{ke(Ie||Ce)})},I.prototype.close=function(Ie){if(Ie&&this.once("close",Ie),this.closed||typeof this.fd!="number"){if(typeof this.fd!="number"){this.once("open",D);return}return(0,u.default)(()=>this.emit("close"))}typeof this._readableState?.closed=="boolean"?this._readableState.closed=!0:this.closed=!0,this._vol.close(this.fd,ke=>{ke?this.emit("error",ke):this.emit("close")}),this.fd=null};function D(Ie){this.close()}l(D,"WR"),e(D,"closeOnOpen"),(0,_.inherits)(z,h.Writable),a.WriteStream=z;function z(Ie,ke,Ce){if(!(this instanceof z))return new z(Ie,ke,Ce);if(this._vol=Ie,Ce=Object.assign({},(0,P.getOptions)(Ce,{})),h.Writable.call(this,Ce),this.path=(0,A.pathToFilename)(ke),this.fd=Ce.fd===void 0?null:typeof Ce.fd!="number"?Ce.fd.fd:Ce.fd,this.flags=Ce.flags===void 0?"w":Ce.flags,this.mode=Ce.mode===void 0?438:Ce.mode,this.start=Ce.start,this.autoClose=Ce.autoClose===void 0?!0:!!Ce.autoClose,this.pos=void 0,this.bytesWritten=0,this.pending=!0,this.start!==void 0){if(typeof this.start!="number")throw new TypeError('"start" option must be a Number');if(this.start<0)throw new Error('"start" must be >= zero');this.pos=this.start}Ce.encoding&&this.setDefaultEncoding(Ce.encoding),typeof this.fd!="number"&&this.open(),this.once("finish",function(){this.autoClose&&this.close()})}l(z,"qr"),e(z,"FsWriteStream"),z.prototype.open=function(){this._vol.open(this.path,this.flags,this.mode,function(Ie,ke){if(Ie){this.autoClose&&this.destroy&&this.destroy(),this.emit("error",Ie);return}this.fd=ke,this.pending=!1,this.emit("open",ke)}.bind(this))},z.prototype._write=function(Ie,ke,Ce){if(!(Ie instanceof r.Buffer||Ie instanceof Uint8Array))return this.emit("error",new Error("Invalid data"));if(typeof this.fd!="number")return this.once("open",function(){this._write(Ie,ke,Ce)});var $e=this;this._vol.write(this.fd,Ie,0,Ie.length,this.pos,(Ke,t)=>{if(Ke)return $e.autoClose&&$e.destroy&&$e.destroy(),Ce(Ke);$e.bytesWritten+=t,Ce()}),this.pos!==void 0&&(this.pos+=Ie.length)},z.prototype._writev=function(Ie,ke){if(typeof this.fd!="number")return this.once("open",function(){this._writev(Ie,ke)});let Ce=this,$e=Ie.length,Ke=new Array($e);for(var t=0,s=0;s<$e;s++){var c=Ie[s].chunk;Ke[s]=c,t+=c.length}let v=r.Buffer.concat(Ke);this._vol.write(this.fd,v,0,v.length,this.pos,(R,C)=>{if(R)return Ce.destroy&&Ce.destroy(),ke(R);Ce.bytesWritten+=C,ke()}),this.pos!==void 0&&(this.pos+=t)},z.prototype.close=function(Ie){if(Ie&&this.once("close",Ie),this.closed||typeof this.fd!="number"){if(typeof this.fd!="number"){this.once("open",D);return}return(0,u.default)(()=>this.emit("close"))}typeof this._writableState?.closed=="boolean"?this._writableState.closed=!0:this.closed=!0,this._vol.close(this.fd,ke=>{ke?this.emit("error",ke):this.emit("close")}),this.fd=null},z.prototype._destroy=I.prototype._destroy,z.prototype.destroySoon=z.prototype.end;var Ee=(Ne=class extends m.EventEmitter{constructor(ke){super(),this._filename="",this._filenameEncoded="",this._recursive=!1,this._encoding=y.ENCODING_UTF8,this._listenerRemovers=new Map,this._onParentChild=Ce=>{Ce.getName()===this._getName()&&this._emit("rename")},this._emit=Ce=>{this.emit("change",Ce,this._filenameEncoded)},this._persist=()=>{this._timer=setTimeout(this._persist,1e6)},this._vol=ke}_getName(){return this._steps[this._steps.length-1]}start(ke,Ce=!0,$e=!1,Ke=y.ENCODING_UTF8){this._filename=(0,A.pathToFilename)(ke),this._steps=(0,U.filenameToSteps)(this._filename),this._filenameEncoded=(0,y.strToEncoding)(this._filename),this._recursive=$e,this._encoding=Ke;try{this._link=this._vol._core.getLinkOrThrow(this._filename,"FSWatcher")}catch(v){let R=new Error(`watch ${this._filename} ${v.code}`);throw R.code=v.code,R.errno=v.code,R}let t=e(v=>{let R=v.getPath(),C=v.getNode(),j=e(()=>{let Ae=xe(this._filename,R);return Ae||(Ae=this._getName()),this.emit("change","change",Ae)},"onNodeChange"),Z=C.changes.listen(([Ae])=>{Ae==="modify"&&j()}),oe=this._listenerRemovers.get(C.ino)??[];oe.push(()=>Z()),this._listenerRemovers.set(C.ino,oe)},"watchLinkNodeChanged"),s=e(v=>{let R=v.getNode(),C=e(oe=>{this.emit("change","rename",xe(this._filename,oe.getPath())),t(oe),s(oe)},"onLinkChildAdd"),j=e(oe=>{let Ae=e(le=>{let Fe=le.getNode().ino,ie=this._listenerRemovers.get(Fe);ie&&(ie.forEach(Je=>Je()),this._listenerRemovers.delete(Fe));for(let[Je,dt]of le.children.entries())dt&&Je!=="."&&Je!==".."&&Ae(dt)},"removeLinkNodeListeners");Ae(oe),this.emit("change","rename",xe(this._filename,oe.getPath()))},"onLinkChildDelete");for(let[oe,Ae]of v.children.entries())Ae&&oe!=="."&&oe!==".."&&t(Ae);let Z=v.changes.listen(([oe,Ae])=>{oe==="child:add"?C(Ae):oe==="child:del"&&j(Ae)});if((this._listenerRemovers.get(R.ino)??[]).push(()=>{Z()}),$e)for(let[oe,Ae]of v.children.entries())Ae&&oe!=="."&&oe!==".."&&s(Ae)},"watchLinkChildrenChanged");t(this._link),s(this._link);let c=this._link.parent;c&&c.changes.listen(([v,R])=>{v==="child:del"&&this._onParentChild(R)}),Ce&&this._persist()}close(){clearTimeout(this._timer),this._listenerRemovers.forEach(ke=>{ke.forEach(Ce=>Ce())}),this._listenerRemovers.clear(),this._parentChangesUnsub?.()}},l(Ne,"hw"),Ne);e(Ee,"FSWatcher");var Oe=Ee;a.FSWatcher=Oe}),iN=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.fsSynchronousApiList=void 0,a.fsSynchronousApiList=["accessSync","appendFileSync","chmodSync","chownSync","closeSync","copyFileSync","existsSync","fchmodSync","fchownSync","fdatasyncSync","fstatSync","fsyncSync","ftruncateSync","futimesSync","lchmodSync","lchownSync","linkSync","lstatSync","mkdirSync","mkdtempSync","openSync","opendirSync","readdirSync","readFileSync","readlinkSync","readSync","readvSync","realpathSync","renameSync","rmdirSync","rmSync","statSync","symlinkSync","truncateSync","unlinkSync","utimesSync","lutimesSync","writeFileSync","writeSync","writevSync"]}),oN=Ge(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.fsCallbackApiList=void 0,a.fsCallbackApiList=["access","appendFile","chmod","chown","close","copyFile","cp","createReadStream","createWriteStream","exists","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","openAsBlob","opendir","read","readv","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","unwatchFile","utimes","lutimes","watch","watchFile","write","writev","writeFile"]}),vf=Ge((a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.memfs=a.fs=a.vol=a.Volume=void 0,a.createFsFromVolume=y;var f=lI(),g=pE(),o=nN();Object.defineProperty(a,"Volume",{enumerable:!0,get:e(function(){return o.Volume},"get")});var n=Dn(),r=iN(),u=oN(),{F_OK:p,R_OK:h,W_OK:d,X_OK:m}=n.constants;a.vol=new o.Volume;function y(_){let S={F_OK:p,R_OK:h,W_OK:d,X_OK:m,constants:n.constants,Stats:f.default,Dirent:g.default};for(let T of r.fsSynchronousApiList)typeof _[T]=="function"&&(S[T]=_[T].bind(_));for(let T of u.fsCallbackApiList)typeof _[T]=="function"&&(S[T]=_[T].bind(_));return S.StatWatcher=_.StatWatcher,S.FSWatcher=_.FSWatcher,S.WriteStream=_.WriteStream,S.ReadStream=_.ReadStream,S.promises=_.promises,typeof _.realpath=="function"&&(S.realpath=_.realpath.bind(_),typeof _.realpath.native=="function"&&(S.realpath.native=_.realpath.native.bind(_))),typeof _.realpathSync=="function"&&(S.realpathSync=_.realpathSync.bind(_),typeof _.realpathSync.native=="function"&&(S.realpathSync.native=_.realpathSync.native.bind(_))),S._toUnixTimestamp=o.toUnixTimestamp,S.__vol=_,S}l(y,"dw"),e(y,"createFsFromVolume"),a.fs=y(a.vol);var w=e((_={},S="/")=>{let T=o.Volume.fromNestedJSON(_,S);return{fs:y(T),vol:T}},"memfs");a.memfs=w,i.exports={...i.exports,...a.fs},i.exports.semantic=!0}),kP=Ge((a,i)=>{var Q,fe,ve;function f(N){return Array.isArray(N)?N:[N]}l(f,"XR"),e(f,"makeArray");var g=void 0,o="",n=" ",r="\\",u=/^\s+$/,p=/(?:[^\\]|^)\\$/,h=/^\\!/,d=/^\\#/,m=/\r?\n/g,y=/^\.{0,2}\/|^\.{1,2}$/,w=/\/$/,_="/",S="node-ignore";typeof Symbol<"u"&&(S=Symbol.for("node-ignore"));var T=S,O=e((N,I,D)=>(Object.defineProperty(N,I,{value:D}),D),"define"),E=/([0-z])-([0-z])/g,P=e(()=>!1,"RETURN_FALSE"),A=e(N=>N.replace(E,(I,D,z)=>D.charCodeAt(0)<=z.charCodeAt(0)?I:o),"sanitizeRange"),x=e(N=>{let{length:I}=N;return N.slice(0,I-I%2)},"cleanRangeBackSlash"),U=[[/^\uFEFF/,()=>o],[/((?:\\\\)*?)(\\?\s+)$/,(N,I,D)=>I+(D.indexOf("\\")===0?n:o)],[/(\\+?)\s/g,(N,I)=>{let{length:D}=I;return I.slice(0,D-D%2)+n}],[/[\\$.|*+(){^]/g,N=>`\\${N}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,e(function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"},"startingReplacer")],[/\\\/\\\*\\\*(?=\\\/|$)/g,(N,I,D)=>I+6<D.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(N,I,D)=>{let z=D.replace(/\\\*/g,"[^\\/]*");return I+z}],[/\\\\\\(?=[$.|*+(){^])/g,()=>r],[/\\\\/g,()=>r],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(N,I,D,z,Ee)=>I===r?`\\[${D}${x(z)}${Ee}`:Ee==="]"&&z.length%2===0?`[${A(D)}${z}]`:"[]"],[/(?:[^*])$/,N=>/\/$/.test(N)?`${N}$`:`${N}(?=$|\\/$)`]],M=/(^|\\\/)?\\\*$/,ee="regex",V="checkRegex",q="_",G={[ee](N,I){return`${I?`${I}[^/]+`:"[^/]*"}(?=$|\\/$)`},[V](N,I){return`${I?`${I}[^/]*`:"[^/]*"}(?=$|\\/$)`}},re=e(N=>U.reduce((I,[D,z])=>I.replace(D,z.bind(N)),N),"makeRegexPrefix"),ae=e(N=>typeof N=="string","isString"),de=e(N=>N&&ae(N)&&!u.test(N)&&!p.test(N)&&N.indexOf("#")!==0,"checkPattern"),we=e(N=>N.split(m).filter(Boolean),"splitPattern"),xe=(Q=class{constructor(I,D,z,Ee,Oe,be){this.pattern=I,this.mark=D,this.negative=Oe,O(this,"body",z),O(this,"ignoreCase",Ee),O(this,"regexPrefix",be)}get regex(){let I=q+ee;return this[I]?this[I]:this._make(ee,I)}get checkRegex(){let I=q+V;return this[I]?this[I]:this._make(V,I)}_make(I,D){let z=this.regexPrefix.replace(M,G[I]),Ee=this.ignoreCase?new RegExp(z,"i"):new RegExp(z);return O(this,D,Ee)}},l(Q,"Aw"),Q);e(xe,"IgnoreRule");var Pe=xe,se=e(({pattern:N,mark:I},D)=>{let z=!1,Ee=N;Ee.indexOf("!")===0&&(z=!0,Ee=Ee.substr(1)),Ee=Ee.replace(h,"!").replace(d,"#");let Oe=re(Ee);return new Pe(N,I,Ee,D,z,Oe)},"createRule"),Te=(fe=class{constructor(I){this._ignoreCase=I,this._rules=[]}_add(I){if(I&&I[T]){this._rules=this._rules.concat(I._rules._rules),this._added=!0;return}if(ae(I)&&(I={pattern:I}),de(I.pattern)){let D=se(I,this._ignoreCase);this._added=!0,this._rules.push(D)}}add(I){return this._added=!1,f(ae(I)?we(I):I).forEach(this._add,this),this._added}test(I,D,z){let Ee=!1,Oe=!1,be;this._rules.forEach(Ne=>{let{negative:Ie}=Ne;Oe===Ie&&Ee!==Oe||Ie&&!Ee&&!Oe&&!D||!Ne[z].test(I)||(Ee=!Ie,Oe=Ie,be=Ie?g:Ne)});let ge={ignored:Ee,unignored:Oe};return be&&(ge.rule=be),ge}},l(fe,"Rw"),fe);e(Te,"RuleManager");var J=Te,ue=e((N,I)=>{throw new I(N)},"throwError"),te=e((N,I,D)=>ae(N)?N?te.isNotRelative(N)?D(`path should be a \`path.relative()\`d string, but got "${I}"`,RangeError):!0:D("path must not be empty",TypeError):D(`path must be a string, but got \`${I}\``,TypeError),"checkPath"),X=e(N=>y.test(N),"isNotRelative");te.isNotRelative=X,te.convert=N=>N;var ye=(ve=class{constructor({ignorecase:I=!0,ignoreCase:D=I,allowRelativePaths:z=!1}={}){O(this,T,!0),this._rules=new J(D),this._strictPathCheck=!z,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add(I){return this._rules.add(I)&&this._initCache(),this}addPattern(I){return this.add(I)}_test(I,D,z,Ee){let Oe=I&&te.convert(I);return te(Oe,I,this._strictPathCheck?ue:P),this._t(Oe,D,z,Ee)}checkIgnore(I){if(!w.test(I))return this.test(I);let D=I.split(_).filter(Boolean);if(D.pop(),D.length){let z=this._t(D.join(_)+_,this._testCache,!0,D);if(z.ignored)return z}return this._rules.test(I,!1,V)}_t(I,D,z,Ee){if(I in D)return D[I];if(Ee||(Ee=I.split(_).filter(Boolean)),Ee.pop(),!Ee.length)return D[I]=this._rules.test(I,z,ee);let Oe=this._t(Ee.join(_)+_,D,z,Ee);return D[I]=Oe.ignored?Oe:this._rules.test(I,z,ee)}ignores(I){return this._test(I,this._ignoreCache,!1).ignored}createFilter(){return I=>!this.ignores(I)}filter(I){return f(I).filter(this.createFilter())}test(I){return this._test(I,this._testCache,!0)}},l(ve,"Tw"),ve);e(ye,"Ignore");var Re=ye,De=e(N=>new Re(N),"factory"),Y=e(N=>te(N&&te.convert(N),N,P),"isPathValid"),H=e(()=>{let N=e(D=>/^\\\\\?\\/.test(D)||/["<>|\u0000-\u001F]+/u.test(D)?D:D.replace(/\\/g,"/"),"makePosix");te.convert=N;let I=/^[a-z]:\//i;te.isNotRelative=D=>I.test(D)||X(D)},"setupWindows");typeof process<"u"&&process.platform==="win32"&&H(),i.exports=De,De.default=De,i.exports.isPathValid=Y,O(i.exports,Symbol.for("setupWindows"),H)}),aN=Ge((a,i)=>{"use strict";var f=e(function(g){if(g=g||{},this.Promise=g.Promise||Promise,this.queues=Object.create(null),this.domainReentrant=g.domainReentrant||!1,this.domainReentrant){if(typeof process>"u"||typeof process.domain>"u")throw new Error("Domain-reentrant locks require `process.domain` to exist. Please flip `opts.domainReentrant = false`, use a NodeJS version that still implements Domain, or install a browser polyfill.");this.domains=Object.create(null)}this.timeout=g.timeout||f.DEFAULT_TIMEOUT,this.maxOccupationTime=g.maxOccupationTime||f.DEFAULT_MAX_OCCUPATION_TIME,this.maxExecutionTime=g.maxExecutionTime||f.DEFAULT_MAX_EXECUTION_TIME,g.maxPending===1/0||Number.isInteger(g.maxPending)&&g.maxPending>=0?this.maxPending=g.maxPending:this.maxPending=f.DEFAULT_MAX_PENDING},"AsyncLock");f.DEFAULT_TIMEOUT=0,f.DEFAULT_MAX_OCCUPATION_TIME=0,f.DEFAULT_MAX_EXECUTION_TIME=0,f.DEFAULT_MAX_PENDING=1e3,f.prototype.acquire=function(g,o,n,r){if(Array.isArray(g))return this._acquireBatch(g,o,n,r);if(typeof o!="function")throw new Error("You must pass a function to execute");var u=null,p=null,h=null;typeof n!="function"&&(r=n,n=null,h=new this.Promise(function(x,U){u=x,p=U})),r=r||{};var d=!1,m=null,y=null,w=null,_=this,S=e(function(x,U,M){y&&(clearTimeout(y),y=null),w&&(clearTimeout(w),w=null),x&&(_.queues[g]&&_.queues[g].length===0&&delete _.queues[g],_.domainReentrant&&delete _.domains[g]),d||(h?U?p(U):u(M):typeof n=="function"&&n(U,M),d=!0),x&&_.queues[g]&&_.queues[g].length>0&&_.queues[g].shift()()},"done"),T=e(function(x){if(d)return S(x);m&&(clearTimeout(m),m=null),_.domainReentrant&&x&&(_.domains[g]=process.domain);var U=r.maxExecutionTime||_.maxExecutionTime;if(U&&(w=setTimeout(function(){_.queues[g]&&S(x,new Error("Maximum execution time is exceeded "+g))},U)),o.length===1){var M=!1;try{o(function(ee,V){M||(M=!0,S(x,ee,V))})}catch(ee){M||(M=!0,S(x,ee))}}else _._promiseTry(function(){return o()}).then(function(ee){S(x,void 0,ee)},function(ee){S(x,ee)})},"exec");_.domainReentrant&&process.domain&&(T=process.domain.bind(T));var O=r.maxPending||_.maxPending;if(!_.queues[g])_.queues[g]=[],T(!0);else if(_.domainReentrant&&process.domain&&process.domain===_.domains[g])T(!1);else if(_.queues[g].length>=O)S(!1,new Error("Too many pending tasks in queue "+g));else{var E=e(function(){T(!0)},"taskFn");r.skipQueue?_.queues[g].unshift(E):_.queues[g].push(E);var P=r.timeout||_.timeout;P&&(m=setTimeout(function(){m=null,S(!1,new Error("async-lock timed out in queue "+g))},P))}var A=r.maxOccupationTime||_.maxOccupationTime;if(A&&(y=setTimeout(function(){_.queues[g]&&S(!1,new Error("Maximum occupation time is exceeded in queue "+g))},A)),h)return h},f.prototype._acquireBatch=function(g,o,n,r){typeof n!="function"&&(r=n,n=null);var u=this,p=e(function(d,m){return function(y){u.acquire(d,m,y,r)}},"getFn"),h=g.reduceRight(function(d,m){return p(m,d)},o);if(typeof n=="function")h(n);else return new this.Promise(function(d,m){h.length===1?h(function(y,w){y?m(y):d(w)}):d(h())})},f.prototype.isBusy=function(g){return g?!!this.queues[g]:Object.keys(this.queues).length>0},f.prototype._promiseTry=function(g){try{return this.Promise.resolve(g())}catch(o){return this.Promise.reject(o)}},i.exports=f}),sN=Ge((a,i)=>{"use strict";i.exports=aN()}),Ys=Ge((a,i)=>{typeof Object.create=="function"?i.exports=e(function(f,g){g&&(f.super_=g,f.prototype=Object.create(g.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}))},"inherits"):i.exports=e(function(f,g){if(g){f.super_=g;var o=e(function(){},"TempCtor");o.prototype=g.prototype,f.prototype=new o,f.prototype.constructor=f}},"inherits")}),_f={};nn(_f,{Buffer:l(()=>zs,"Buffer"),INSPECT_MAX_BYTES:l(()=>aI,"INSPECT_MAX_BYTES"),kMaxLength:l(()=>sI,"kMaxLength")});var Td=Qt(()=>{dE()}),Fd=Ge((a,i)=>{var f=(Td(),cr(_f)),g=f.Buffer;function o(r,u){for(var p in r)u[p]=r[p]}l(o,"lT"),e(o,"copyProps"),g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?i.exports=f:(o(f,a),a.Buffer=n);function n(r,u,p){return g(r,u,p)}l(n,"Vo"),e(n,"SafeBuffer"),n.prototype=Object.create(g.prototype),o(g,n),n.from=function(r,u,p){if(typeof r=="number")throw new TypeError("Argument must not be a number");return g(r,u,p)},n.alloc=function(r,u,p){if(typeof r!="number")throw new TypeError("Argument must be a number");var h=g(r);return u!==void 0?typeof p=="string"?h.fill(u,p):h.fill(u):h.fill(0),h},n.allocUnsafe=function(r){if(typeof r!="number")throw new TypeError("Argument must be a number");return g(r)},n.allocUnsafeSlow=function(r){if(typeof r!="number")throw new TypeError("Argument must be a number");return f.SlowBuffer(r)}}),lN=Ge((a,i)=>{var f={}.toString;i.exports=Array.isArray||function(g){return f.call(g)=="[object Array]"}}),Ef=Ge((a,i)=>{"use strict";i.exports=TypeError}),TP=Ge((a,i)=>{"use strict";i.exports=Object}),fN=Ge((a,i)=>{"use strict";i.exports=Error}),uN=Ge((a,i)=>{"use strict";i.exports=EvalError}),cN=Ge((a,i)=>{"use strict";i.exports=RangeError}),hN=Ge((a,i)=>{"use strict";i.exports=ReferenceError}),FP=Ge((a,i)=>{"use strict";i.exports=SyntaxError}),dN=Ge((a,i)=>{"use strict";i.exports=URIError}),pN=Ge((a,i)=>{"use strict";i.exports=Math.abs}),gN=Ge((a,i)=>{"use strict";i.exports=Math.floor}),yN=Ge((a,i)=>{"use strict";i.exports=Math.max}),mN=Ge((a,i)=>{"use strict";i.exports=Math.min}),wN=Ge((a,i)=>{"use strict";i.exports=Math.pow}),bN=Ge((a,i)=>{"use strict";i.exports=Math.round}),vN=Ge((a,i)=>{"use strict";i.exports=Number.isNaN||e(function(f){return f!==f},"isNaN")}),_N=Ge((a,i)=>{"use strict";var f=vN();i.exports=e(function(g){return f(g)||g===0?g:g<0?-1:1},"sign")}),EN=Ge((a,i)=>{"use strict";i.exports=Object.getOwnPropertyDescriptor}),Sf=Ge((a,i)=>{"use strict";var f=EN();if(f)try{f([],"length")}catch{f=null}i.exports=f}),Bd=Ge((a,i)=>{"use strict";var f=Object.defineProperty||!1;if(f)try{f({},"a",{value:1})}catch{f=!1}i.exports=f}),BP=Ge((a,i)=>{"use strict";i.exports=e(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var f={},g=Symbol("test"),o=Object(g);if(typeof g=="string"||Object.prototype.toString.call(g)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var n=42;f[g]=n;for(var r in f)return!1;if(typeof Object.keys=="function"&&Object.keys(f).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(f).length!==0)return!1;var u=Object.getOwnPropertySymbols(f);if(u.length!==1||u[0]!==g||!Object.prototype.propertyIsEnumerable.call(f,g))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var p=Object.getOwnPropertyDescriptor(f,g);if(p.value!==n||p.enumerable!==!0)return!1}return!0},"hasSymbols")}),SN=Ge((a,i)=>{"use strict";var f=typeof Symbol<"u"&&Symbol,g=BP();i.exports=e(function(){return typeof f!="function"||typeof Symbol!="function"||typeof f("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:g()},"hasNativeSymbols")}),xP=Ge((a,i)=>{"use strict";i.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}),IP=Ge((a,i)=>{"use strict";var f=TP();i.exports=f.getPrototypeOf||null}),AN=Ge((a,i)=>{"use strict";var f="Function.prototype.bind called on incompatible ",g=Object.prototype.toString,o=Math.max,n="[object Function]",r=e(function(h,d){for(var m=[],y=0;y<h.length;y+=1)m[y]=h[y];for(var w=0;w<d.length;w+=1)m[w+h.length]=d[w];return m},"concatty"),u=e(function(h,d){for(var m=[],y=d||0,w=0;y<h.length;y+=1,w+=1)m[w]=h[y];return m},"slicy"),p=e(function(h,d){for(var m="",y=0;y<h.length;y+=1)m+=h[y],y+1<h.length&&(m+=d);return m},"joiny");i.exports=e(function(h){var d=this;if(typeof d!="function"||g.apply(d)!==n)throw new TypeError(f+d);for(var m=u(arguments,1),y,w=e(function(){if(this instanceof y){var E=d.apply(this,r(m,arguments));return Object(E)===E?E:this}return d.apply(h,r(m,arguments))},"binder"),_=o(0,d.length-m.length),S=[],T=0;T<_;T++)S[T]="$"+T;if(y=Function("binder","return function ("+p(S,",")+"){ return binder.apply(this,arguments); }")(w),d.prototype){var O=e(function(){},"Empty");O.prototype=d.prototype,y.prototype=new O,O.prototype=null}return y},"bind")}),Af=Ge((a,i)=>{"use strict";var f=AN();i.exports=Function.prototype.bind||f}),UE=Ge((a,i)=>{"use strict";i.exports=Function.prototype.call}),ME=Ge((a,i)=>{"use strict";i.exports=Function.prototype.apply}),RN=Ge((a,i)=>{"use strict";i.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}),PP=Ge((a,i)=>{"use strict";var f=Af(),g=ME(),o=UE(),n=RN();i.exports=n||f.call(o,g)}),$E=Ge((a,i)=>{"use strict";var f=Af(),g=Ef(),o=UE(),n=PP();i.exports=e(function(r){if(r.length<1||typeof r[0]!="function")throw new g("a function is required");return n(f,o,r)},"callBindBasic")}),ON=Ge((a,i)=>{"use strict";var f=$E(),g=Sf(),o;try{o=[].__proto__===Array.prototype}catch(p){if(!p||typeof p!="object"||!("code"in p)||p.code!=="ERR_PROTO_ACCESS")throw p}var n=!!o&&g&&g(Object.prototype,"__proto__"),r=Object,u=r.getPrototypeOf;i.exports=n&&typeof n.get=="function"?f([n.get]):typeof u=="function"?e(function(p){return u(p==null?p:r(p))},"getDunder"):!1}),jP=Ge((a,i)=>{"use strict";var f=xP(),g=IP(),o=ON();i.exports=f?e(function(n){return f(n)},"getProto"):g?e(function(n){if(!n||typeof n!="object"&&typeof n!="function")throw new TypeError("getProto: not an object");return g(n)},"getProto"):o?e(function(n){return o(n)},"getProto"):null}),kN=Ge((a,i)=>{"use strict";var f=Function.prototype.call,g=Object.prototype.hasOwnProperty,o=Af();i.exports=o.call(f,g)}),CP=Ge((a,i)=>{"use strict";var f,g=TP(),o=fN(),n=uN(),r=cN(),u=hN(),p=FP(),h=Ef(),d=dN(),m=pN(),y=gN(),w=yN(),_=mN(),S=wN(),T=bN(),O=_N(),E=Function,P=e(function(ve){try{return E('"use strict"; return ('+ve+").constructor;")()}catch{}},"getEvalledConstructor"),A=Sf(),x=Bd(),U=e(function(){throw new h},"throwTypeError"),M=A?function(){try{return arguments.callee,U}catch{try{return A(arguments,"callee").get}catch{return U}}}():U,ee=SN()(),V=jP(),q=IP(),G=xP(),re=ME(),ae=UE(),de={},we=typeof Uint8Array>"u"||!V?f:V(Uint8Array),xe={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?f:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?f:ArrayBuffer,"%ArrayIteratorPrototype%":ee&&V?V([][Symbol.iterator]()):f,"%AsyncFromSyncIteratorPrototype%":f,"%AsyncFunction%":de,"%AsyncGenerator%":de,"%AsyncGeneratorFunction%":de,"%AsyncIteratorPrototype%":de,"%Atomics%":typeof Atomics>"u"?f:Atomics,"%BigInt%":typeof BigInt>"u"?f:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?f:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?f:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?f:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":n,"%Float16Array%":typeof Float16Array>"u"?f:Float16Array,"%Float32Array%":typeof Float32Array>"u"?f:Float32Array,"%Float64Array%":typeof Float64Array>"u"?f:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?f:FinalizationRegistry,"%Function%":E,"%GeneratorFunction%":de,"%Int8Array%":typeof Int8Array>"u"?f:Int8Array,"%Int16Array%":typeof Int16Array>"u"?f:Int16Array,"%Int32Array%":typeof Int32Array>"u"?f:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ee&&V?V(V([][Symbol.iterator]())):f,"%JSON%":typeof JSON=="object"?JSON:f,"%Map%":typeof Map>"u"?f:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ee||!V?f:V(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":g,"%Object.getOwnPropertyDescriptor%":A,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?f:Promise,"%Proxy%":typeof Proxy>"u"?f:Proxy,"%RangeError%":r,"%ReferenceError%":u,"%Reflect%":typeof Reflect>"u"?f:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?f:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ee||!V?f:V(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?f:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ee&&V?V(""[Symbol.iterator]()):f,"%Symbol%":ee?Symbol:f,"%SyntaxError%":p,"%ThrowTypeError%":M,"%TypedArray%":we,"%TypeError%":h,"%Uint8Array%":typeof Uint8Array>"u"?f:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?f:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?f:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?f:Uint32Array,"%URIError%":d,"%WeakMap%":typeof WeakMap>"u"?f:WeakMap,"%WeakRef%":typeof WeakRef>"u"?f:WeakRef,"%WeakSet%":typeof WeakSet>"u"?f:WeakSet,"%Function.prototype.call%":ae,"%Function.prototype.apply%":re,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":q,"%Math.abs%":m,"%Math.floor%":y,"%Math.max%":w,"%Math.min%":_,"%Math.pow%":S,"%Math.round%":T,"%Math.sign%":O,"%Reflect.getPrototypeOf%":G};if(V)try{null.error}catch(ve){Pe=V(V(ve)),xe["%Error.prototype%"]=Pe}var Pe,se=e(l(function ve(N){var I;if(N==="%AsyncFunction%")I=P("async function () {}");else if(N==="%GeneratorFunction%")I=P("function* () {}");else if(N==="%AsyncGeneratorFunction%")I=P("async function* () {}");else if(N==="%AsyncGenerator%"){var D=ve("%AsyncGeneratorFunction%");D&&(I=D.prototype)}else if(N==="%AsyncIteratorPrototype%"){var z=ve("%AsyncGenerator%");z&&V&&(I=V(z.prototype))}return xe[N]=I,I},"e"),"doEval"),Te={__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"]},J=Af(),ue=kN(),te=J.call(ae,Array.prototype.concat),X=J.call(re,Array.prototype.splice),ye=J.call(ae,String.prototype.replace),Re=J.call(ae,String.prototype.slice),De=J.call(ae,RegExp.prototype.exec),Y=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,Q=e(function(ve){var N=Re(ve,0,1),I=Re(ve,-1);if(N==="%"&&I!=="%")throw new p("invalid intrinsic syntax, expected closing `%`");if(I==="%"&&N!=="%")throw new p("invalid intrinsic syntax, expected opening `%`");var D=[];return ye(ve,Y,function(z,Ee,Oe,be){D[D.length]=Oe?ye(be,H,"$1"):Ee||z}),D},"stringToPath"),fe=e(function(ve,N){var I=ve,D;if(ue(Te,I)&&(D=Te[I],I="%"+D[0]+"%"),ue(xe,I)){var z=xe[I];if(z===de&&(z=se(I)),typeof z>"u"&&!N)throw new h("intrinsic "+ve+" exists, but is not available. Please file an issue!");return{alias:D,name:I,value:z}}throw new p("intrinsic "+ve+" does not exist!")},"getBaseIntrinsic");i.exports=e(function(ve,N){if(typeof ve!="string"||ve.length===0)throw new h("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof N!="boolean")throw new h('"allowMissing" argument must be a boolean');if(De(/^%?[^%]*%?$/,ve)===null)throw new p("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var I=Q(ve),D=I.length>0?I[0]:"",z=fe("%"+D+"%",N),Ee=z.name,Oe=z.value,be=!1,ge=z.alias;ge&&(D=ge[0],X(I,te([0,1],ge)));for(var Ne=1,Ie=!0;Ne<I.length;Ne+=1){var ke=I[Ne],Ce=Re(ke,0,1),$e=Re(ke,-1);if((Ce==='"'||Ce==="'"||Ce==="`"||$e==='"'||$e==="'"||$e==="`")&&Ce!==$e)throw new p("property names with quotes must have matching quotes");if((ke==="constructor"||!Ie)&&(be=!0),D+="."+ke,Ee="%"+D+"%",ue(xe,Ee))Oe=xe[Ee];else if(Oe!=null){if(!(ke in Oe)){if(!N)throw new h("base intrinsic for "+ve+" exists, but the property is not available.");return}if(A&&Ne+1>=I.length){var Ke=A(Oe,ke);Ie=!!Ke,Ie&&"get"in Ke&&!("originalValue"in Ke.get)?Oe=Ke.get:Oe=Oe[ke]}else Ie=ue(Oe,ke),Oe=Oe[ke];Ie&&!be&&(xe[Ee]=Oe)}}return Oe},"GetIntrinsic")}),LP=Ge((a,i)=>{"use strict";var f=CP(),g=$E(),o=g([f("%String.prototype.indexOf%")]);i.exports=e(function(n,r){var u=f(n,!!r);return typeof u=="function"&&o(n,".prototype.")>-1?g([u]):u},"callBoundIntrinsic")}),TN=Ge((a,i)=>{"use strict";var f=Function.prototype.toString,g=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,o,n;if(typeof g=="function"&&typeof Object.defineProperty=="function")try{o=Object.defineProperty({},"length",{get:e(function(){throw n},"get")}),n={},g(function(){throw 42},null,o)}catch(A){A!==n&&(g=null)}else g=null;var r=/^\s*class\b/,u=e(function(A){try{var x=f.call(A);return r.test(x)}catch{return!1}},"isES6ClassFunction"),p=e(function(A){try{return u(A)?!1:(f.call(A),!0)}catch{return!1}},"tryFunctionToStr"),h=Object.prototype.toString,d="[object Object]",m="[object Function]",y="[object GeneratorFunction]",w="[object HTMLAllCollection]",_="[object HTML document.all class]",S="[object HTMLCollection]",T=typeof Symbol=="function"&&!!Symbol.toStringTag,O=!(0 in[,]),E=e(function(){return!1},"isDocumentDotAll");typeof document=="object"&&(P=document.all,h.call(P)===h.call(document.all)&&(E=e(function(A){if((O||!A)&&(typeof A>"u"||typeof A=="object"))try{var x=h.call(A);return(x===w||x===_||x===S||x===d)&&A("")==null}catch{}return!1},"isDocumentDotAll")));var P;i.exports=e(g?function(A){if(E(A))return!0;if(!A||typeof A!="function"&&typeof A!="object")return!1;try{g(A,null,o)}catch(x){if(x!==n)return!1}return!u(A)&&p(A)}:function(A){if(E(A))return!0;if(!A||typeof A!="function"&&typeof A!="object")return!1;if(T)return p(A);if(u(A))return!1;var x=h.call(A);return x!==m&&x!==y&&!/^\[object HTML/.test(x)?!1:p(A)},"isCallable")}),FN=Ge((a,i)=>{"use strict";var f=TN(),g=Object.prototype.toString,o=Object.prototype.hasOwnProperty,n=e(function(h,d,m){for(var y=0,w=h.length;y<w;y++)o.call(h,y)&&(m==null?d(h[y],y,h):d.call(m,h[y],y,h))},"forEachArray"),r=e(function(h,d,m){for(var y=0,w=h.length;y<w;y++)m==null?d(h.charAt(y),y,h):d.call(m,h.charAt(y),y,h)},"forEachString"),u=e(function(h,d,m){for(var y in h)o.call(h,y)&&(m==null?d(h[y],y,h):d.call(m,h[y],y,h))},"forEachObject");function p(h){return g.call(h)==="[object Array]"}l(p,"ez"),e(p,"isArray"),i.exports=e(function(h,d,m){if(!f(d))throw new TypeError("iterator must be a function");var y;arguments.length>=3&&(y=m),p(h)?n(h,d,y):typeof h=="string"?r(h,d,y):u(h,d,y)},"forEach")}),BN=Ge((a,i)=>{"use strict";i.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}),xN=Ge((a,i)=>{"use strict";var f=BN(),g=globalThis;i.exports=e(function(){for(var o=[],n=0;n<f.length;n++)typeof g[f[n]]=="function"&&(o[o.length]=f[n]);return o},"availableTypedArrays")}),IN=Ge((a,i)=>{"use strict";var f=Bd(),g=FP(),o=Ef(),n=Sf();i.exports=e(function(r,u,p){if(!r||typeof r!="object"&&typeof r!="function")throw new o("`obj` must be an object or a function`");if(typeof u!="string"&&typeof u!="symbol")throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new o("`loose`, if provided, must be a boolean");var h=arguments.length>3?arguments[3]:null,d=arguments.length>4?arguments[4]:null,m=arguments.length>5?arguments[5]:null,y=arguments.length>6?arguments[6]:!1,w=!!n&&n(r,u);if(f)f(r,u,{configurable:m===null&&w?w.configurable:!m,enumerable:h===null&&w?w.enumerable:!h,value:p,writable:d===null&&w?w.writable:!d});else if(y||!h&&!d&&!m)r[u]=p;else throw new g("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},"defineDataProperty")}),PN=Ge((a,i)=>{"use strict";var f=Bd(),g=e(function(){return!!f},"hasPropertyDescriptors");g.hasArrayLengthDefineBug=e(function(){if(!f)return null;try{return f([],"length",{value:1}).length!==1}catch{return!0}},"hasArrayLengthDefineBug"),i.exports=g}),jN=Ge((a,i)=>{"use strict";var f=CP(),g=IN(),o=PN()(),n=Sf(),r=Ef(),u=f("%Math.floor%");i.exports=e(function(p,h){if(typeof p!="function")throw new r("`fn` is not a function");if(typeof h!="number"||h<0||h>4294967295||u(h)!==h)throw new r("`length` must be a positive 32-bit integer");var d=arguments.length>2&&!!arguments[2],m=!0,y=!0;if("length"in p&&n){var w=n(p,"length");w&&!w.configurable&&(m=!1),w&&!w.writable&&(y=!1)}return(m||y||!d)&&(o?g(p,"length",h,!0,!0):g(p,"length",h)),p},"setFunctionLength")}),CN=Ge((a,i)=>{"use strict";var f=Af(),g=ME(),o=PP();i.exports=e(function(){return o(f,g,arguments)},"applyBind")}),LN=Ge((a,i)=>{"use strict";var f=jN(),g=Bd(),o=$E(),n=CN();i.exports=e(function(r){var u=o(arguments),p=r.length-(arguments.length-1);return f(u,1+(p>0?p:0),!0)},"callBind"),g?g(i.exports,"apply",{value:n}):i.exports.apply=n}),NN=Ge((a,i)=>{"use strict";var f=BP();i.exports=e(function(){return f()&&!!Symbol.toStringTag},"hasToStringTagShams")}),DN=Ge((a,i)=>{"use strict";var f=FN(),g=xN(),o=LN(),n=LP(),r=Sf(),u=jP(),p=n("Object.prototype.toString"),h=NN()(),d=globalThis,m=g(),y=n("String.prototype.slice"),w=n("Array.prototype.indexOf",!0)||e(function(O,E){for(var P=0;P<O.length;P+=1)if(O[P]===E)return P;return-1},"indexOf"),_={__proto__:null};h&&r&&u?f(m,function(O){var E=new d[O];if(Symbol.toStringTag in E&&u){var P=u(E),A=r(P,Symbol.toStringTag);if(!A&&P){var x=u(P);A=r(x,Symbol.toStringTag)}_["$"+O]=o(A.get)}}):f(m,function(O){var E=new d[O],P=E.slice||E.set;P&&(_["$"+O]=o(P))});var S=e(function(O){var E=!1;return f(_,function(P,A){if(!E)try{"$"+P(O)===A&&(E=y(A,1))}catch{}}),E},"tryAllTypedArrays"),T=e(function(O){var E=!1;return f(_,function(P,A){if(!E)try{P(O),E=y(A,1)}catch{}}),E},"tryAllSlices");i.exports=e(function(O){if(!O||typeof O!="object")return!1;if(!h){var E=y(p(O),8,-1);return w(m,E)>-1?E:E!=="Object"?!1:T(O)}return r?S(O):null},"whichTypedArray")}),UN=Ge((a,i)=>{"use strict";var f=DN();i.exports=e(function(g){return!!f(g)},"isTypedArray")}),MN=Ge((a,i)=>{"use strict";var f=Ef(),g=LP(),o=g("TypedArray.prototype.buffer",!0),n=UN();i.exports=o||e(function(r){if(!n(r))throw new f("Not a Typed Array");return r.buffer},"typedArrayBuffer")}),$N=Ge((a,i)=>{"use strict";var f=Fd().Buffer,g=lN(),o=MN(),n=ArrayBuffer.isView||e(function(h){try{return o(h),!0}catch{return!1}},"isView"),r=typeof Uint8Array<"u",u=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",p=u&&(f.prototype instanceof Uint8Array||f.TYPED_ARRAY_SUPPORT);i.exports=e(function(h,d){if(f.isBuffer(h))return h.constructor&&!("isBuffer"in h)?f.from(h):h;if(typeof h=="string")return f.from(h,d);if(u&&n(h)){if(h.byteLength===0)return f.alloc(0);if(p){var m=f.from(h.buffer,h.byteOffset,h.byteLength);if(m.byteLength===h.byteLength)return m}var y=h instanceof Uint8Array?h:new Uint8Array(h.buffer,h.byteOffset,h.byteLength),w=f.from(y);if(w.length===h.byteLength)return w}if(r&&h instanceof Uint8Array)return f.from(h);var _=g(h);if(_)for(var S=0;S<h.length;S+=1){var T=h[S];if(typeof T!="number"||T<0||T>255||~~T!==T)throw new RangeError("Array items must be numbers in the range 0-255.")}if(_||f.isBuffer(h)&&h.constructor&&typeof h.constructor.isBuffer=="function"&&h.constructor.isBuffer(h))return f.from(h);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')},"toBuffer")}),WN=Ge((a,i)=>{"use strict";var f=Fd().Buffer,g=$N();function o(n,r){this._block=f.alloc(n),this._finalSize=r,this._blockSize=n,this._len=0}l(o,"hh"),e(o,"Hash"),o.prototype.update=function(n,r){n=g(n,r||"utf8");for(var u=this._block,p=this._blockSize,h=n.length,d=this._len,m=0;m<h;){for(var y=d%p,w=Math.min(h-m,p-y),_=0;_<w;_++)u[y+_]=n[m+_];d+=w,m+=w,d%p===0&&this._update(u)}return this._len+=h,this},o.prototype.digest=function(n){var r=this._len%this._blockSize;this._block[r]=128,this._block.fill(0,r+1),r>=this._finalSize&&(this._update(this._block),this._block.fill(0));var u=this._len*8;if(u<=4294967295)this._block.writeUInt32BE(u,this._blockSize-4);else{var p=(u&4294967295)>>>0,h=(u-p)/4294967296;this._block.writeUInt32BE(h,this._blockSize-8),this._block.writeUInt32BE(p,this._blockSize-4)}this._update(this._block);var d=this._hash();return n?d.toString(n):d},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},i.exports=o}),zN=Ge((a,i)=>{"use strict";var f=Ys(),g=WN(),o=Fd().Buffer,n=[1518500249,1859775393,-1894007588,-899497514],r=new Array(80);function u(){this.init(),this._w=r,g.call(this,64,56)}l(u,"ff"),e(u,"Sha1"),f(u,g),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function p(y){return y<<1|y>>>31}l(p,"Bz"),e(p,"rotl1");function h(y){return y<<5|y>>>27}l(h,"Cz"),e(h,"rotl5");function d(y){return y<<30|y>>>2}l(d,"Lz"),e(d,"rotl30");function m(y,w,_,S){return y===0?w&_|~w&S:y===2?w&_|w&S|_&S:w^_^S}l(m,"Nz"),e(m,"ft"),u.prototype._update=function(y){for(var w=this._w,_=this._a|0,S=this._b|0,T=this._c|0,O=this._d|0,E=this._e|0,P=0;P<16;++P)w[P]=y.readInt32BE(P*4);for(;P<80;++P)w[P]=p(w[P-3]^w[P-8]^w[P-14]^w[P-16]);for(var A=0;A<80;++A){var x=~~(A/20),U=h(_)+m(x,S,T,O)+E+w[A]+n[x]|0;E=O,O=T,T=d(S),S=_,_=U}this._a=_+this._a|0,this._b=S+this._b|0,this._c=T+this._c|0,this._d=O+this._d|0,this._e=E+this._e|0},u.prototype._hash=function(){var y=o.allocUnsafe(20);return y.writeInt32BE(this._a|0,0),y.writeInt32BE(this._b|0,4),y.writeInt32BE(this._c|0,8),y.writeInt32BE(this._d|0,12),y.writeInt32BE(this._e|0,16),y},i.exports=u}),HN=Ge((a,i)=>{"use strict";function f(r){if(typeof r!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(r))}l(f,"En"),e(f,"assertPath");function g(r,u){for(var p="",h=0,d=-1,m=0,y,w=0;w<=r.length;++w){if(w<r.length)y=r.charCodeAt(w);else{if(y===47)break;y=47}if(y===47){if(!(d===w-1||m===1))if(d!==w-1&&m===2){if(p.length<2||h!==2||p.charCodeAt(p.length-1)!==46||p.charCodeAt(p.length-2)!==46){if(p.length>2){var _=p.lastIndexOf("/");if(_!==p.length-1){_===-1?(p="",h=0):(p=p.slice(0,_),h=p.length-1-p.lastIndexOf("/")),d=w,m=0;continue}}else if(p.length===2||p.length===1){p="",h=0,d=w,m=0;continue}}u&&(p.length>0?p+="/..":p="..",h=2)}else p.length>0?p+="/"+r.slice(d+1,w):p=r.slice(d+1,w),h=w-d-1;d=w,m=0}else y===46&&m!==-1?++m:m=-1}return p}l(g,"_x"),e(g,"normalizeStringPosix");function o(r,u){var p=u.dir||u.root,h=u.base||(u.name||"")+(u.ext||"");return p?p===u.root?p+h:p+r+h:h}l(o,"Dz"),e(o,"_format");var n={resolve:e(function(){for(var r="",u=!1,p,h=arguments.length-1;h>=-1&&!u;h--){var d;h>=0?d=arguments[h]:(p===void 0&&(p=process.cwd()),d=p),f(d),d.length!==0&&(r=d+"/"+r,u=d.charCodeAt(0)===47)}return r=g(r,!u),u?r.length>0?"/"+r:"/":r.length>0?r:"."},"resolve"),normalize:e(function(r){if(f(r),r.length===0)return".";var u=r.charCodeAt(0)===47,p=r.charCodeAt(r.length-1)===47;return r=g(r,!u),r.length===0&&!u&&(r="."),r.length>0&&p&&(r+="/"),u?"/"+r:r},"normalize"),isAbsolute:e(function(r){return f(r),r.length>0&&r.charCodeAt(0)===47},"isAbsolute"),join:e(function(){if(arguments.length===0)return".";for(var r,u=0;u<arguments.length;++u){var p=arguments[u];f(p),p.length>0&&(r===void 0?r=p:r+="/"+p)}return r===void 0?".":n.normalize(r)},"join"),relative:e(function(r,u){if(f(r),f(u),r===u||(r=n.resolve(r),u=n.resolve(u),r===u))return"";for(var p=1;p<r.length&&r.charCodeAt(p)===47;++p);for(var h=r.length,d=h-p,m=1;m<u.length&&u.charCodeAt(m)===47;++m);for(var y=u.length,w=y-m,_=d<w?d:w,S=-1,T=0;T<=_;++T){if(T===_){if(w>_){if(u.charCodeAt(m+T)===47)return u.slice(m+T+1);if(T===0)return u.slice(m+T)}else d>_&&(r.charCodeAt(p+T)===47?S=T:T===0&&(S=0));break}var O=r.charCodeAt(p+T),E=u.charCodeAt(m+T);if(O!==E)break;O===47&&(S=T)}var P="";for(T=p+S+1;T<=h;++T)(T===h||r.charCodeAt(T)===47)&&(P.length===0?P+="..":P+="/..");return P.length>0?P+u.slice(m+S):(m+=S,u.charCodeAt(m)===47&&++m,u.slice(m))},"relative"),_makeLong:e(function(r){return r},"_makeLong"),dirname:e(function(r){if(f(r),r.length===0)return".";for(var u=r.charCodeAt(0),p=u===47,h=-1,d=!0,m=r.length-1;m>=1;--m)if(u=r.charCodeAt(m),u===47){if(!d){h=m;break}}else d=!1;return h===-1?p?"/":".":p&&h===1?"//":r.slice(0,h)},"dirname"),basename:e(function(r,u){if(u!==void 0&&typeof u!="string")throw new TypeError('"ext" argument must be a string');f(r);var p=0,h=-1,d=!0,m;if(u!==void 0&&u.length>0&&u.length<=r.length){if(u.length===r.length&&u===r)return"";var y=u.length-1,w=-1;for(m=r.length-1;m>=0;--m){var _=r.charCodeAt(m);if(_===47){if(!d){p=m+1;break}}else w===-1&&(d=!1,w=m+1),y>=0&&(_===u.charCodeAt(y)?--y===-1&&(h=m):(y=-1,h=w))}return p===h?h=w:h===-1&&(h=r.length),r.slice(p,h)}else{for(m=r.length-1;m>=0;--m)if(r.charCodeAt(m)===47){if(!d){p=m+1;break}}else h===-1&&(d=!1,h=m+1);return h===-1?"":r.slice(p,h)}},"basename"),extname:e(function(r){f(r);for(var u=-1,p=0,h=-1,d=!0,m=0,y=r.length-1;y>=0;--y){var w=r.charCodeAt(y);if(w===47){if(!d){p=y+1;break}continue}h===-1&&(d=!1,h=y+1),w===46?u===-1?u=y:m!==1&&(m=1):u!==-1&&(m=-1)}return u===-1||h===-1||m===0||m===1&&u===h-1&&u===p+1?"":r.slice(u,h)},"extname"),format:e(function(r){if(r===null||typeof r!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof r);return o("/",r)},"format"),parse:e(function(r){f(r);var u={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return u;var p=r.charCodeAt(0),h=p===47,d;h?(u.root="/",d=1):d=0;for(var m=-1,y=0,w=-1,_=!0,S=r.length-1,T=0;S>=d;--S){if(p=r.charCodeAt(S),p===47){if(!_){y=S+1;break}continue}w===-1&&(_=!1,w=S+1),p===46?m===-1?m=S:T!==1&&(T=1):m!==-1&&(T=-1)}return m===-1||w===-1||T===0||T===1&&m===w-1&&m===y+1?w!==-1&&(y===0&&h?u.base=u.name=r.slice(1,w):u.base=u.name=r.slice(y,w)):(y===0&&h?(u.name=r.slice(1,m),u.base=r.slice(1,w)):(u.name=r.slice(y,m),u.base=r.slice(y,w)),u.ext=r.slice(m,w)),y>0?u.dir=r.slice(0,y-1):h&&(u.dir="/"),u},"parse"),sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,i.exports=n}),qN=Ge(a=>{var i;(function(f){typeof DO_NOT_EXPORT_CRC>"u"?typeof a=="object"?f(a):typeof define=="function"&&define.amd?define(function(){var g={};return f(g),g}):f(i={}):f(i={})})(function(f){f.version="1.2.2";function g(){for(var V=0,q=new Array(256),G=0;G!=256;++G)V=G,V=V&1?-306674912^V>>>1:V>>>1,V=V&1?-306674912^V>>>1:V>>>1,V=V&1?-306674912^V>>>1:V>>>1,V=V&1?-306674912^V>>>1:V>>>1,V=V&1?-306674912^V>>>1:V>>>1,V=V&1?-306674912^V>>>1:V>>>1,V=V&1?-306674912^V>>>1:V>>>1,V=V&1?-306674912^V>>>1:V>>>1,q[G]=V;return typeof Int32Array<"u"?new Int32Array(q):q}l(g,"t"),e(g,"signed_crc_table");var o=g();function n(V){var q=0,G=0,re=0,ae=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(re=0;re!=256;++re)ae[re]=V[re];for(re=0;re!=256;++re)for(G=V[re],q=256+re;q<4096;q+=256)G=ae[q]=G>>>8^V[G&255];var de=[];for(re=1;re!=16;++re)de[re-1]=typeof Int32Array<"u"?ae.subarray(re*256,re*256+256):ae.slice(re*256,re*256+256);return de}l(n,"n"),e(n,"slice_by_16_tables");var r=n(o),u=r[0],p=r[1],h=r[2],d=r[3],m=r[4],y=r[5],w=r[6],_=r[7],S=r[8],T=r[9],O=r[10],E=r[11],P=r[12],A=r[13],x=r[14];function U(V,q){for(var G=q^-1,re=0,ae=V.length;re<ae;)G=G>>>8^o[(G^V.charCodeAt(re++))&255];return~G}l(U,"F"),e(U,"crc32_bstr");function M(V,q){for(var G=q^-1,re=V.length-15,ae=0;ae<re;)G=x[V[ae++]^G&255]^A[V[ae++]^G>>8&255]^P[V[ae++]^G>>16&255]^E[V[ae++]^G>>>24]^O[V[ae++]]^T[V[ae++]]^S[V[ae++]]^_[V[ae++]]^w[V[ae++]]^y[V[ae++]]^m[V[ae++]]^d[V[ae++]]^h[V[ae++]]^p[V[ae++]]^u[V[ae++]]^o[V[ae++]];for(re+=15;ae<re;)G=G>>>8^o[(G^V[ae++])&255];return~G}l(M,"S"),e(M,"crc32_buf");function ee(V,q){for(var G=q^-1,re=0,ae=V.length,de=0,we=0;re<ae;)de=V.charCodeAt(re++),de<128?G=G>>>8^o[(G^de)&255]:de<2048?(G=G>>>8^o[(G^(192|de>>6&31))&255],G=G>>>8^o[(G^(128|de&63))&255]):de>=55296&&de<57344?(de=(de&1023)+64,we=V.charCodeAt(re++)&1023,G=G>>>8^o[(G^(240|de>>8&7))&255],G=G>>>8^o[(G^(128|de>>2&63))&255],G=G>>>8^o[(G^(128|we>>6&15|(de&3)<<4))&255],G=G>>>8^o[(G^(128|we&63))&255]):(G=G>>>8^o[(G^(224|de>>12&15))&255],G=G>>>8^o[(G^(128|de>>6&63))&255],G=G>>>8^o[(G^(128|de&63))&255]);return~G}l(ee,"B"),e(ee,"crc32_str"),f.table=o,f.bstr=U,f.buf=M,f.str=ee})}),Vi=Ge(a=>{"use strict";var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function f(n,r){return Object.prototype.hasOwnProperty.call(n,r)}l(f,"Mz"),e(f,"_has"),a.assign=function(n){for(var r=Array.prototype.slice.call(arguments,1);r.length;){var u=r.shift();if(u){if(typeof u!="object")throw new TypeError(u+"must be non-object");for(var p in u)f(u,p)&&(n[p]=u[p])}}return n},a.shrinkBuf=function(n,r){return n.length===r?n:n.subarray?n.subarray(0,r):(n.length=r,n)};var g={arraySet:e(function(n,r,u,p,h){if(r.subarray&&n.subarray){n.set(r.subarray(u,u+p),h);return}for(var d=0;d<p;d++)n[h+d]=r[u+d]},"arraySet"),flattenChunks:e(function(n){var r,u,p,h,d,m;for(p=0,r=0,u=n.length;r<u;r++)p+=n[r].length;for(m=new Uint8Array(p),h=0,r=0,u=n.length;r<u;r++)d=n[r],m.set(d,h),h+=d.length;return m},"flattenChunks")},o={arraySet:e(function(n,r,u,p,h){for(var d=0;d<p;d++)n[h+d]=r[u+d]},"arraySet"),flattenChunks:e(function(n){return[].concat.apply([],n)},"flattenChunks")};a.setTyped=function(n){n?(a.Buf8=Uint8Array,a.Buf16=Uint16Array,a.Buf32=Int32Array,a.assign(a,g)):(a.Buf8=Array,a.Buf16=Array,a.Buf32=Array,a.assign(a,o))},a.setTyped(i)}),GN=Ge(a=>{"use strict";var i=Vi(),f=4,g=0,o=1,n=2;function r(j){for(var Z=j.length;--Z>=0;)j[Z]=0}l(r,"bs"),e(r,"zero");var u=0,p=1,h=2,d=3,m=258,y=29,w=256,_=w+1+y,S=30,T=19,O=2*_+1,E=15,P=16,A=7,x=256,U=16,M=17,ee=18,V=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],q=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],G=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],re=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ae=512,de=new Array((_+2)*2);r(de);var we=new Array(S*2);r(we);var xe=new Array(ae);r(xe);var Pe=new Array(m-d+1);r(Pe);var se=new Array(y);r(se);var Te=new Array(S);r(Te);function J(j,Z,oe,Ae,le){this.static_tree=j,this.extra_bits=Z,this.extra_base=oe,this.elems=Ae,this.max_length=le,this.has_stree=j&&j.length}l(J,"t0"),e(J,"StaticTreeDesc");var ue,te,X;function ye(j,Z){this.dyn_tree=j,this.max_code=0,this.stat_desc=Z}l(ye,"r0"),e(ye,"TreeDesc");function Re(j){return j<256?xe[j]:xe[256+(j>>>7)]}l(Re,"Hx"),e(Re,"d_code");function De(j,Z){j.pending_buf[j.pending++]=Z&255,j.pending_buf[j.pending++]=Z>>>8&255}l(De,"pf"),e(De,"put_short");function Y(j,Z,oe){j.bi_valid>P-oe?(j.bi_buf|=Z<<j.bi_valid&65535,De(j,j.bi_buf),j.bi_buf=Z>>P-j.bi_valid,j.bi_valid+=oe-P):(j.bi_buf|=Z<<j.bi_valid&65535,j.bi_valid+=oe)}l(Y,"pr"),e(Y,"send_bits");function H(j,Z,oe){Y(j,oe[Z*2],oe[Z*2+1])}l(H,"Sn"),e(H,"send_code");function Q(j,Z){var oe=0;do oe|=j&1,j>>>=1,oe<<=1;while(--Z>0);return oe>>>1}l(Q,"Wx"),e(Q,"bi_reverse");function fe(j){j.bi_valid===16?(De(j,j.bi_buf),j.bi_buf=0,j.bi_valid=0):j.bi_valid>=8&&(j.pending_buf[j.pending++]=j.bi_buf&255,j.bi_buf>>=8,j.bi_valid-=8)}l(fe,"Zz"),e(fe,"bi_flush");function ve(j,Z){var oe=Z.dyn_tree,Ae=Z.max_code,le=Z.stat_desc.static_tree,Fe=Z.stat_desc.has_stree,ie=Z.stat_desc.extra_bits,Je=Z.stat_desc.extra_base,dt=Z.stat_desc.max_length,W,qe,Ve,pe,Le,He,me=0;for(pe=0;pe<=E;pe++)j.bl_count[pe]=0;for(oe[j.heap[j.heap_max]*2+1]=0,W=j.heap_max+1;W<O;W++)qe=j.heap[W],pe=oe[oe[qe*2+1]*2+1]+1,pe>dt&&(pe=dt,me++),oe[qe*2+1]=pe,!(qe>Ae)&&(j.bl_count[pe]++,Le=0,qe>=Je&&(Le=ie[qe-Je]),He=oe[qe*2],j.opt_len+=He*(pe+Le),Fe&&(j.static_len+=He*(le[qe*2+1]+Le)));if(me!==0){do{for(pe=dt-1;j.bl_count[pe]===0;)pe--;j.bl_count[pe]--,j.bl_count[pe+1]+=2,j.bl_count[dt]--,me-=2}while(me>0);for(pe=dt;pe!==0;pe--)for(qe=j.bl_count[pe];qe!==0;)Ve=j.heap[--W],!(Ve>Ae)&&(oe[Ve*2+1]!==pe&&(j.opt_len+=(pe-oe[Ve*2+1])*oe[Ve*2],oe[Ve*2+1]=pe),qe--)}}l(ve,"Qz"),e(ve,"gen_bitlen");function N(j,Z,oe){var Ae=new Array(E+1),le=0,Fe,ie;for(Fe=1;Fe<=E;Fe++)Ae[Fe]=le=le+oe[Fe-1]<<1;for(ie=0;ie<=Z;ie++){var Je=j[ie*2+1];Je!==0&&(j[ie*2]=Q(Ae[Je]++,Je))}}l(N,"qx"),e(N,"gen_codes");function I(){var j,Z,oe,Ae,le,Fe=new Array(E+1);for(oe=0,Ae=0;Ae<y-1;Ae++)for(se[Ae]=oe,j=0;j<1<<V[Ae];j++)Pe[oe++]=Ae;for(Pe[oe-1]=Ae,le=0,Ae=0;Ae<16;Ae++)for(Te[Ae]=le,j=0;j<1<<q[Ae];j++)xe[le++]=Ae;for(le>>=7;Ae<S;Ae++)for(Te[Ae]=le<<7,j=0;j<1<<q[Ae]-7;j++)xe[256+le++]=Ae;for(Z=0;Z<=E;Z++)Fe[Z]=0;for(j=0;j<=143;)de[j*2+1]=8,j++,Fe[8]++;for(;j<=255;)de[j*2+1]=9,j++,Fe[9]++;for(;j<=279;)de[j*2+1]=7,j++,Fe[7]++;for(;j<=287;)de[j*2+1]=8,j++,Fe[8]++;for(N(de,_+1,Fe),j=0;j<S;j++)we[j*2+1]=5,we[j*2]=Q(j,5);ue=new J(de,V,w+1,_,E),te=new J(we,q,0,S,E),X=new J(new Array(0),G,0,T,A)}l(I,"eV"),e(I,"tr_static_init");function D(j){var Z;for(Z=0;Z<_;Z++)j.dyn_ltree[Z*2]=0;for(Z=0;Z<S;Z++)j.dyn_dtree[Z*2]=0;for(Z=0;Z<T;Z++)j.bl_tree[Z*2]=0;j.dyn_ltree[x*2]=1,j.opt_len=j.static_len=0,j.last_lit=j.matches=0}l(D,"zx"),e(D,"init_block");function z(j){j.bi_valid>8?De(j,j.bi_buf):j.bi_valid>0&&(j.pending_buf[j.pending++]=j.bi_buf),j.bi_buf=0,j.bi_valid=0}l(z,"Vx"),e(z,"bi_windup");function Ee(j,Z,oe,Ae){z(j),Ae&&(De(j,oe),De(j,~oe)),i.arraySet(j.pending_buf,j.window,Z,oe,j.pending),j.pending+=oe}l(Ee,"tV"),e(Ee,"copy_block");function Oe(j,Z,oe,Ae){var le=Z*2,Fe=oe*2;return j[le]<j[Fe]||j[le]===j[Fe]&&Ae[Z]<=Ae[oe]}l(Oe,"xx"),e(Oe,"smaller");function be(j,Z,oe){for(var Ae=j.heap[oe],le=oe<<1;le<=j.heap_len&&(le<j.heap_len&&Oe(Z,j.heap[le+1],j.heap[le],j.depth)&&le++,!Oe(Z,Ae,j.heap[le],j.depth));)j.heap[oe]=j.heap[le],oe=le,le<<=1;j.heap[oe]=Ae}l(be,"n0"),e(be,"pqdownheap");function ge(j,Z,oe){var Ae,le,Fe=0,ie,Je;if(j.last_lit!==0)do Ae=j.pending_buf[j.d_buf+Fe*2]<<8|j.pending_buf[j.d_buf+Fe*2+1],le=j.pending_buf[j.l_buf+Fe],Fe++,Ae===0?H(j,le,Z):(ie=Pe[le],H(j,ie+w+1,Z),Je=V[ie],Je!==0&&(le-=se[ie],Y(j,le,Je)),Ae--,ie=Re(Ae),H(j,ie,oe),Je=q[ie],Je!==0&&(Ae-=Te[ie],Y(j,Ae,Je)));while(Fe<j.last_lit);H(j,x,Z)}l(ge,"Ox"),e(ge,"compress_block");function Ne(j,Z){var oe=Z.dyn_tree,Ae=Z.stat_desc.static_tree,le=Z.stat_desc.has_stree,Fe=Z.stat_desc.elems,ie,Je,dt=-1,W;for(j.heap_len=0,j.heap_max=O,ie=0;ie<Fe;ie++)oe[ie*2]!==0?(j.heap[++j.heap_len]=dt=ie,j.depth[ie]=0):oe[ie*2+1]=0;for(;j.heap_len<2;)W=j.heap[++j.heap_len]=dt<2?++dt:0,oe[W*2]=1,j.depth[W]=0,j.opt_len--,le&&(j.static_len-=Ae[W*2+1]);for(Z.max_code=dt,ie=j.heap_len>>1;ie>=1;ie--)be(j,oe,ie);W=Fe;do ie=j.heap[1],j.heap[1]=j.heap[j.heap_len--],be(j,oe,1),Je=j.heap[1],j.heap[--j.heap_max]=ie,j.heap[--j.heap_max]=Je,oe[W*2]=oe[ie*2]+oe[Je*2],j.depth[W]=(j.depth[ie]>=j.depth[Je]?j.depth[ie]:j.depth[Je])+1,oe[ie*2+1]=oe[Je*2+1]=W,j.heap[1]=W++,be(j,oe,1);while(j.heap_len>=2);j.heap[--j.heap_max]=j.heap[1],ve(j,Z),N(oe,dt,j.bl_count)}l(Ne,"o0"),e(Ne,"build_tree");function Ie(j,Z,oe){var Ae,le=-1,Fe,ie=Z[0*2+1],Je=0,dt=7,W=4;for(ie===0&&(dt=138,W=3),Z[(oe+1)*2+1]=65535,Ae=0;Ae<=oe;Ae++)Fe=ie,ie=Z[(Ae+1)*2+1],!(++Je<dt&&Fe===ie)&&(Je<W?j.bl_tree[Fe*2]+=Je:Fe!==0?(Fe!==le&&j.bl_tree[Fe*2]++,j.bl_tree[U*2]++):Je<=10?j.bl_tree[M*2]++:j.bl_tree[ee*2]++,Je=0,le=Fe,ie===0?(dt=138,W=3):Fe===ie?(dt=6,W=3):(dt=7,W=4))}l(Ie,"Px"),e(Ie,"scan_tree");function ke(j,Z,oe){var Ae,le=-1,Fe,ie=Z[0*2+1],Je=0,dt=7,W=4;for(ie===0&&(dt=138,W=3),Ae=0;Ae<=oe;Ae++)if(Fe=ie,ie=Z[(Ae+1)*2+1],!(++Je<dt&&Fe===ie)){if(Je<W)do H(j,Fe,j.bl_tree);while(--Je!==0);else Fe!==0?(Fe!==le&&(H(j,Fe,j.bl_tree),Je--),H(j,U,j.bl_tree),Y(j,Je-3,2)):Je<=10?(H(j,M,j.bl_tree),Y(j,Je-3,3)):(H(j,ee,j.bl_tree),Y(j,Je-11,7));Je=0,le=Fe,ie===0?(dt=138,W=3):Fe===ie?(dt=6,W=3):(dt=7,W=4)}}l(ke,"Ix"),e(ke,"send_tree");function Ce(j){var Z;for(Ie(j,j.dyn_ltree,j.l_desc.max_code),Ie(j,j.dyn_dtree,j.d_desc.max_code),Ne(j,j.bl_desc),Z=T-1;Z>=3&&j.bl_tree[re[Z]*2+1]===0;Z--);return j.opt_len+=3*(Z+1)+5+5+4,Z}l(Ce,"rV"),e(Ce,"build_bl_tree");function $e(j,Z,oe,Ae){var le;for(Y(j,Z-257,5),Y(j,oe-1,5),Y(j,Ae-4,4),le=0;le<Ae;le++)Y(j,j.bl_tree[re[le]*2+1],3);ke(j,j.dyn_ltree,Z-1),ke(j,j.dyn_dtree,oe-1)}l($e,"nV"),e($e,"send_all_trees");function Ke(j){var Z=4093624447,oe;for(oe=0;oe<=31;oe++,Z>>>=1)if(Z&1&&j.dyn_ltree[oe*2]!==0)return g;if(j.dyn_ltree[9*2]!==0||j.dyn_ltree[10*2]!==0||j.dyn_ltree[13*2]!==0)return o;for(oe=32;oe<w;oe++)if(j.dyn_ltree[oe*2]!==0)return o;return g}l(Ke,"iV"),e(Ke,"detect_data_type");var t=!1;function s(j){t||(I(),t=!0),j.l_desc=new ye(j.dyn_ltree,ue),j.d_desc=new ye(j.dyn_dtree,te),j.bl_desc=new ye(j.bl_tree,X),j.bi_buf=0,j.bi_valid=0,D(j)}l(s,"oV"),e(s,"_tr_init");function c(j,Z,oe,Ae){Y(j,(u<<1)+(Ae?1:0),3),Ee(j,Z,oe,!0)}l(c,"Gx"),e(c,"_tr_stored_block");function v(j){Y(j,p<<1,3),H(j,x,de),fe(j)}l(v,"aV"),e(v,"_tr_align");function R(j,Z,oe,Ae){var le,Fe,ie=0;j.level>0?(j.strm.data_type===n&&(j.strm.data_type=Ke(j)),Ne(j,j.l_desc),Ne(j,j.d_desc),ie=Ce(j),le=j.opt_len+3+7>>>3,Fe=j.static_len+3+7>>>3,Fe<=le&&(le=Fe)):le=Fe=oe+5,oe+4<=le&&Z!==-1?c(j,Z,oe,Ae):j.strategy===f||Fe===le?(Y(j,(p<<1)+(Ae?1:0),3),ge(j,de,we)):(Y(j,(h<<1)+(Ae?1:0),3),$e(j,j.l_desc.max_code+1,j.d_desc.max_code+1,ie+1),ge(j,j.dyn_ltree,j.dyn_dtree)),D(j),Ae&&z(j)}l(R,"sV"),e(R,"_tr_flush_block");function C(j,Z,oe){return j.pending_buf[j.d_buf+j.last_lit*2]=Z>>>8&255,j.pending_buf[j.d_buf+j.last_lit*2+1]=Z&255,j.pending_buf[j.l_buf+j.last_lit]=oe&255,j.last_lit++,Z===0?j.dyn_ltree[oe*2]++:(j.matches++,Z--,j.dyn_ltree[(Pe[oe]+w+1)*2]++,j.dyn_dtree[Re(Z)*2]++),j.last_lit===j.lit_bufsize-1}l(C,"lV"),e(C,"_tr_tally"),a._tr_init=s,a._tr_stored_block=c,a._tr_flush_block=R,a._tr_tally=C,a._tr_align=v}),NP=Ge((a,i)=>{"use strict";function f(g,o,n,r){for(var u=g&65535|0,p=g>>>16&65535|0,h=0;n!==0;){h=n>2e3?2e3:n,n-=h;do u=u+o[r++]|0,p=p+u|0;while(--h);u%=65521,p%=65521}return u|p<<16|0}l(f,"fV"),e(f,"adler32"),i.exports=f}),DP=Ge((a,i)=>{"use strict";function f(){for(var n,r=[],u=0;u<256;u++){n=u;for(var p=0;p<8;p++)n=n&1?3988292384^n>>>1:n>>>1;r[u]=n}return r}l(f,"uV"),e(f,"makeTable");var g=f();function o(n,r,u,p){var h=g,d=p+u;n^=-1;for(var m=p;m<d;m++)n=n>>>8^h[(n^r[m])&255];return n^-1}l(o,"hV"),e(o,"crc32"),i.exports=o}),WE=Ge((a,i)=>{"use strict";i.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}}),VN=Ge(a=>{"use strict";var i=Vi(),f=GN(),g=NP(),o=DP(),n=WE(),r=0,u=1,p=3,h=4,d=5,m=0,y=1,w=-2,_=-3,S=-5,T=-1,O=1,E=2,P=3,A=4,x=0,U=2,M=8,ee=9,V=15,q=8,G=29,re=256,ae=re+1+G,de=30,we=19,xe=2*ae+1,Pe=15,se=3,Te=258,J=Te+se+1,ue=32,te=42,X=69,ye=73,Re=91,De=103,Y=113,H=666,Q=1,fe=2,ve=3,N=4,I=3;function D(W,qe){return W.msg=n[qe],qe}l(D,"Ji"),e(D,"err");function z(W){return(W<<1)-(W>4?9:0)}l(z,"eO"),e(z,"rank");function Ee(W){for(var qe=W.length;--qe>=0;)W[qe]=0}l(Ee,"Ki"),e(Ee,"zero");function Oe(W){var qe=W.state,Ve=qe.pending;Ve>W.avail_out&&(Ve=W.avail_out),Ve!==0&&(i.arraySet(W.output,qe.pending_buf,qe.pending_out,Ve,W.next_out),W.next_out+=Ve,qe.pending_out+=Ve,W.total_out+=Ve,W.avail_out-=Ve,qe.pending-=Ve,qe.pending===0&&(qe.pending_out=0))}l(Oe,"Yi"),e(Oe,"flush_pending");function be(W,qe){f._tr_flush_block(W,W.block_start>=0?W.block_start:-1,W.strstart-W.block_start,qe),W.block_start=W.strstart,Oe(W.strm)}l(be,"Wt"),e(be,"flush_block_only");function ge(W,qe){W.pending_buf[W.pending++]=qe}l(ge,"rt"),e(ge,"put_byte");function Ne(W,qe){W.pending_buf[W.pending++]=qe>>>8&255,W.pending_buf[W.pending++]=qe&255}l(Ne,"mf"),e(Ne,"putShortMSB");function Ie(W,qe,Ve,pe){var Le=W.avail_in;return Le>pe&&(Le=pe),Le===0?0:(W.avail_in-=Le,i.arraySet(qe,W.input,W.next_in,Le,Ve),W.state.wrap===1?W.adler=g(W.adler,qe,Le,Ve):W.state.wrap===2&&(W.adler=o(W.adler,qe,Le,Ve)),W.next_in+=Le,W.total_in+=Le,Le)}l(Ie,"CV"),e(Ie,"read_buf");function ke(W,qe){var Ve=W.max_chain_length,pe=W.strstart,Le,He,me=W.prev_length,Se=W.nice_match,We=W.strstart>W.w_size-J?W.strstart-(W.w_size-J):0,Qe=W.window,lt=W.w_mask,bt=W.prev,ht=W.strstart+Te,Ot=Qe[pe+me-1],zt=Qe[pe+me];W.prev_length>=W.good_match&&(Ve>>=2),Se>W.lookahead&&(Se=W.lookahead);do if(Le=qe,!(Qe[Le+me]!==zt||Qe[Le+me-1]!==Ot||Qe[Le]!==Qe[pe]||Qe[++Le]!==Qe[pe+1])){pe+=2,Le++;do;while(Qe[++pe]===Qe[++Le]&&Qe[++pe]===Qe[++Le]&&Qe[++pe]===Qe[++Le]&&Qe[++pe]===Qe[++Le]&&Qe[++pe]===Qe[++Le]&&Qe[++pe]===Qe[++Le]&&Qe[++pe]===Qe[++Le]&&Qe[++pe]===Qe[++Le]&&pe<ht);if(He=Te-(ht-pe),pe=ht-Te,He>me){if(W.match_start=qe,me=He,He>=Se)break;Ot=Qe[pe+me-1],zt=Qe[pe+me]}}while((qe=bt[qe<])>We&&--Ve!==0);return me<=W.lookahead?me:W.lookahead}l(ke,"rO"),e(ke,"longest_match");function Ce(W){var qe=W.w_size,Ve,pe,Le,He,me;do{if(He=W.window_size-W.lookahead-W.strstart,W.strstart>=qe+(qe-J)){i.arraySet(W.window,W.window,qe,qe,0),W.match_start-=qe,W.strstart-=qe,W.block_start-=qe,pe=W.hash_size,Ve=pe;do Le=W.head[--Ve],W.head[Ve]=Le>=qe?Le-qe:0;while(--pe);pe=qe,Ve=pe;do Le=W.prev[--Ve],W.prev[Ve]=Le>=qe?Le-qe:0;while(--pe);He+=qe}if(W.strm.avail_in===0)break;if(pe=Ie(W.strm,W.window,W.strstart+W.lookahead,He),W.lookahead+=pe,W.lookahead+W.insert>=se)for(me=W.strstart-W.insert,W.ins_h=W.window[me],W.ins_h=(W.ins_h<<W.hash_shift^W.window[me+1])&W.hash_mask;W.insert&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[me+se-1])&W.hash_mask,W.prev[me&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=me,me++,W.insert--,!(W.lookahead+W.insert<se)););}while(W.lookahead<J&&W.strm.avail_in!==0)}l(Ce,"Jo"),e(Ce,"fill_window");function $e(W,qe){var Ve=65535;for(Ve>W.pending_buf_size-5&&(Ve=W.pending_buf_size-5);;){if(W.lookahead<=1){if(Ce(W),W.lookahead===0&&qe===r)return Q;if(W.lookahead===0)break}W.strstart+=W.lookahead,W.lookahead=0;var pe=W.block_start+Ve;if((W.strstart===0||W.strstart>=pe)&&(W.lookahead=W.strstart-pe,W.strstart=pe,be(W,!1),W.strm.avail_out===0)||W.strstart-W.block_start>=W.w_size-J&&(be(W,!1),W.strm.avail_out===0))return Q}return W.insert=0,qe===h?(be(W,!0),W.strm.avail_out===0?ve:N):(W.strstart>W.block_start&&(be(W,!1),W.strm.avail_out),Q)}l($e,"LV"),e($e,"deflate_stored");function Ke(W,qe){for(var Ve,pe;;){if(W.lookahead<J){if(Ce(W),W.lookahead<J&&qe===r)return Q;if(W.lookahead===0)break}if(Ve=0,W.lookahead>=se&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+se-1])&W.hash_mask,Ve=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart),Ve!==0&&W.strstart-Ve<=W.w_size-J&&(W.match_length=ke(W,Ve)),W.match_length>=se)if(pe=f._tr_tally(W,W.strstart-W.match_start,W.match_length-se),W.lookahead-=W.match_length,W.match_length<=W.max_lazy_match&&W.lookahead>=se){W.match_length--;do W.strstart++,W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+se-1])&W.hash_mask,Ve=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart;while(--W.match_length!==0);W.strstart++}else W.strstart+=W.match_length,W.match_length=0,W.ins_h=W.window[W.strstart],W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+1])&W.hash_mask;else pe=f._tr_tally(W,0,W.window[W.strstart]),W.lookahead--,W.strstart++;if(pe&&(be(W,!1),W.strm.avail_out===0))return Q}return W.insert=W.strstart<se-1?W.strstart:se-1,qe===h?(be(W,!0),W.strm.avail_out===0?ve:N):W.last_lit&&(be(W,!1),W.strm.avail_out===0)?Q:fe}l(Ke,"d0"),e(Ke,"deflate_fast");function t(W,qe){for(var Ve,pe,Le;;){if(W.lookahead<J){if(Ce(W),W.lookahead<J&&qe===r)return Q;if(W.lookahead===0)break}if(Ve=0,W.lookahead>=se&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+se-1])&W.hash_mask,Ve=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart),W.prev_length=W.match_length,W.prev_match=W.match_start,W.match_length=se-1,Ve!==0&&W.prev_length<W.max_lazy_match&&W.strstart-Ve<=W.w_size-J&&(W.match_length=ke(W,Ve),W.match_length<=5&&(W.strategy===O||W.match_length===se&&W.strstart-W.match_start>4096)&&(W.match_length=se-1)),W.prev_length>=se&&W.match_length<=W.prev_length){Le=W.strstart+W.lookahead-se,pe=f._tr_tally(W,W.strstart-1-W.prev_match,W.prev_length-se),W.lookahead-=W.prev_length-1,W.prev_length-=2;do++W.strstart<=Le&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+se-1])&W.hash_mask,Ve=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart);while(--W.prev_length!==0);if(W.match_available=0,W.match_length=se-1,W.strstart++,pe&&(be(W,!1),W.strm.avail_out===0))return Q}else if(W.match_available){if(pe=f._tr_tally(W,0,W.window[W.strstart-1]),pe&&be(W,!1),W.strstart++,W.lookahead--,W.strm.avail_out===0)return Q}else W.match_available=1,W.strstart++,W.lookahead--}return W.match_available&&(pe=f._tr_tally(W,0,W.window[W.strstart-1]),W.match_available=0),W.insert=W.strstart<se-1?W.strstart:se-1,qe===h?(be(W,!0),W.strm.avail_out===0?ve:N):W.last_lit&&(be(W,!1),W.strm.avail_out===0)?Q:fe}l(t,"Es"),e(t,"deflate_slow");function s(W,qe){for(var Ve,pe,Le,He,me=W.window;;){if(W.lookahead<=Te){if(Ce(W),W.lookahead<=Te&&qe===r)return Q;if(W.lookahead===0)break}if(W.match_length=0,W.lookahead>=se&&W.strstart>0&&(Le=W.strstart-1,pe=me[Le],pe===me[++Le]&&pe===me[++Le]&&pe===me[++Le])){He=W.strstart+Te;do;while(pe===me[++Le]&&pe===me[++Le]&&pe===me[++Le]&&pe===me[++Le]&&pe===me[++Le]&&pe===me[++Le]&&pe===me[++Le]&&pe===me[++Le]&&Le<He);W.match_length=Te-(He-Le),W.match_length>W.lookahead&&(W.match_length=W.lookahead)}if(W.match_length>=se?(Ve=f._tr_tally(W,1,W.match_length-se),W.lookahead-=W.match_length,W.strstart+=W.match_length,W.match_length=0):(Ve=f._tr_tally(W,0,W.window[W.strstart]),W.lookahead--,W.strstart++),Ve&&(be(W,!1),W.strm.avail_out===0))return Q}return W.insert=0,qe===h?(be(W,!0),W.strm.avail_out===0?ve:N):W.last_lit&&(be(W,!1),W.strm.avail_out===0)?Q:fe}l(s,"NV"),e(s,"deflate_rle");function c(W,qe){for(var Ve;;){if(W.lookahead===0&&(Ce(W),W.lookahead===0)){if(qe===r)return Q;break}if(W.match_length=0,Ve=f._tr_tally(W,0,W.window[W.strstart]),W.lookahead--,W.strstart++,Ve&&(be(W,!1),W.strm.avail_out===0))return Q}return W.insert=0,qe===h?(be(W,!0),W.strm.avail_out===0?ve:N):W.last_lit&&(be(W,!1),W.strm.avail_out===0)?Q:fe}l(c,"DV"),e(c,"deflate_huff");function v(W,qe,Ve,pe,Le){this.good_length=W,this.max_lazy=qe,this.nice_length=Ve,this.max_chain=pe,this.func=Le}l(v,"An"),e(v,"Config");var R;R=[new v(0,0,0,0,$e),new v(4,4,8,4,Ke),new v(4,5,16,8,Ke),new v(4,6,32,32,Ke),new v(4,4,16,16,t),new v(8,16,32,32,t),new v(8,16,128,128,t),new v(8,32,128,256,t),new v(32,128,258,1024,t),new v(32,258,258,4096,t)];function C(W){W.window_size=2*W.w_size,Ee(W.head),W.max_lazy_match=R[W.level].max_lazy,W.good_match=R[W.level].good_length,W.nice_match=R[W.level].nice_length,W.max_chain_length=R[W.level].max_chain,W.strstart=0,W.block_start=0,W.lookahead=0,W.insert=0,W.match_length=W.prev_length=se-1,W.match_available=0,W.ins_h=0}l(C,"$V"),e(C,"lm_init");function j(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=M,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(xe*2),this.dyn_dtree=new i.Buf16((2*de+1)*2),this.bl_tree=new i.Buf16((2*we+1)*2),Ee(this.dyn_ltree),Ee(this.dyn_dtree),Ee(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(Pe+1),this.heap=new i.Buf16(2*ae+1),Ee(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*ae+1),Ee(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}l(j,"MV"),e(j,"DeflateState");function Z(W){var qe;return!W||!W.state?D(W,w):(W.total_in=W.total_out=0,W.data_type=U,qe=W.state,qe.pending=0,qe.pending_out=0,qe.wrap<0&&(qe.wrap=-qe.wrap),qe.status=qe.wrap?te:Y,W.adler=qe.wrap===2?0:1,qe.last_flush=r,f._tr_init(qe),m)}l(Z,"nO"),e(Z,"deflateResetKeep");function oe(W){var qe=Z(W);return qe===m&&C(W.state),qe}l(oe,"iO"),e(oe,"deflateReset");function Ae(W,qe){return!W||!W.state||W.state.wrap!==2?w:(W.state.gzhead=qe,m)}l(Ae,"UV"),e(Ae,"deflateSetHeader");function le(W,qe,Ve,pe,Le,He){if(!W)return w;var me=1;if(qe===T&&(qe=6),pe<0?(me=0,pe=-pe):pe>15&&(me=2,pe-=16),Le<1||Le>ee||Ve!==M||pe<8||pe>15||qe<0||qe>9||He<0||He>A)return D(W,w);pe===8&&(pe=9);var Se=new j;return W.state=Se,Se.strm=W,Se.wrap=me,Se.gzhead=null,Se.w_bits=pe,Se.w_size=1<<Se.w_bits,Se.w_mask=Se.w_size-1,Se.hash_bits=Le+7,Se.hash_size=1<<Se.hash_bits,Se.hash_mask=Se.hash_size-1,Se.hash_shift=~~((Se.hash_bits+se-1)/se),Se.window=new i.Buf8(Se.w_size*2),Se.head=new i.Buf16(Se.hash_size),Se.prev=new i.Buf16(Se.w_size),Se.lit_bufsize=1<<Le+6,Se.pending_buf_size=Se.lit_bufsize*4,Se.pending_buf=new i.Buf8(Se.pending_buf_size),Se.d_buf=1*Se.lit_bufsize,Se.l_buf=3*Se.lit_bufsize,Se.level=qe,Se.strategy=He,Se.method=Ve,oe(W)}l(le,"oO"),e(le,"deflateInit2");function Fe(W,qe){return le(W,qe,M,V,q,x)}l(Fe,"jV"),e(Fe,"deflateInit");function ie(W,qe){var Ve,pe,Le,He;if(!W||!W.state||qe>d||qe<0)return W?D(W,w):w;if(pe=W.state,!W.output||!W.input&&W.avail_in!==0||pe.status===H&&qe!==h)return D(W,W.avail_out===0?S:w);if(pe.strm=W,Ve=pe.last_flush,pe.last_flush=qe,pe.status===te)if(pe.wrap===2)W.adler=0,ge(pe,31),ge(pe,139),ge(pe,8),pe.gzhead?(ge(pe,(pe.gzhead.text?1:0)+(pe.gzhead.hcrc?2:0)+(pe.gzhead.extra?4:0)+(pe.gzhead.name?8:0)+(pe.gzhead.comment?16:0)),ge(pe,pe.gzhead.time&255),ge(pe,pe.gzhead.time>>8&255),ge(pe,pe.gzhead.time>>16&255),ge(pe,pe.gzhead.time>>24&255),ge(pe,pe.level===9?2:pe.strategy>=E||pe.level<2?4:0),ge(pe,pe.gzhead.os&255),pe.gzhead.extra&&pe.gzhead.extra.length&&(ge(pe,pe.gzhead.extra.length&255),ge(pe,pe.gzhead.extra.length>>8&255)),pe.gzhead.hcrc&&(W.adler=o(W.adler,pe.pending_buf,pe.pending,0)),pe.gzindex=0,pe.status=X):(ge(pe,0),ge(pe,0),ge(pe,0),ge(pe,0),ge(pe,0),ge(pe,pe.level===9?2:pe.strategy>=E||pe.level<2?4:0),ge(pe,I),pe.status=Y);else{var me=M+(pe.w_bits-8<<4)<<8,Se=-1;pe.strategy>=E||pe.level<2?Se=0:pe.level<6?Se=1:pe.level===6?Se=2:Se=3,me|=Se<<6,pe.strstart!==0&&(me|=ue),me+=31-me%31,pe.status=Y,Ne(pe,me),pe.strstart!==0&&(Ne(pe,W.adler>>>16),Ne(pe,W.adler&65535)),W.adler=1}if(pe.status===X)if(pe.gzhead.extra){for(Le=pe.pending;pe.gzindex<(pe.gzhead.extra.length&65535)&&!(pe.pending===pe.pending_buf_size&&(pe.gzhead.hcrc&&pe.pending>Le&&(W.adler=o(W.adler,pe.pending_buf,pe.pending-Le,Le)),Oe(W),Le=pe.pending,pe.pending===pe.pending_buf_size));)ge(pe,pe.gzhead.extra[pe.gzindex]&255),pe.gzindex++;pe.gzhead.hcrc&&pe.pending>Le&&(W.adler=o(W.adler,pe.pending_buf,pe.pending-Le,Le)),pe.gzindex===pe.gzhead.extra.length&&(pe.gzindex=0,pe.status=ye)}else pe.status=ye;if(pe.status===ye)if(pe.gzhead.name){Le=pe.pending;do{if(pe.pending===pe.pending_buf_size&&(pe.gzhead.hcrc&&pe.pending>Le&&(W.adler=o(W.adler,pe.pending_buf,pe.pending-Le,Le)),Oe(W),Le=pe.pending,pe.pending===pe.pending_buf_size)){He=1;break}pe.gzindex<pe.gzhead.name.length?He=pe.gzhead.name.charCodeAt(pe.gzindex++)&255:He=0,ge(pe,He)}while(He!==0);pe.gzhead.hcrc&&pe.pending>Le&&(W.adler=o(W.adler,pe.pending_buf,pe.pending-Le,Le)),He===0&&(pe.gzindex=0,pe.status=Re)}else pe.status=Re;if(pe.status===Re)if(pe.gzhead.comment){Le=pe.pending;do{if(pe.pending===pe.pending_buf_size&&(pe.gzhead.hcrc&&pe.pending>Le&&(W.adler=o(W.adler,pe.pending_buf,pe.pending-Le,Le)),Oe(W),Le=pe.pending,pe.pending===pe.pending_buf_size)){He=1;break}pe.gzindex<pe.gzhead.comment.length?He=pe.gzhead.comment.charCodeAt(pe.gzindex++)&255:He=0,ge(pe,He)}while(He!==0);pe.gzhead.hcrc&&pe.pending>Le&&(W.adler=o(W.adler,pe.pending_buf,pe.pending-Le,Le)),He===0&&(pe.status=De)}else pe.status=De;if(pe.status===De&&(pe.gzhead.hcrc?(pe.pending+2>pe.pending_buf_size&&Oe(W),pe.pending+2<=pe.pending_buf_size&&(ge(pe,W.adler&255),ge(pe,W.adler>>8&255),W.adler=0,pe.status=Y)):pe.status=Y),pe.pending!==0){if(Oe(W),W.avail_out===0)return pe.last_flush=-1,m}else if(W.avail_in===0&&z(qe)<=z(Ve)&&qe!==h)return D(W,S);if(pe.status===H&&W.avail_in!==0)return D(W,S);if(W.avail_in!==0||pe.lookahead!==0||qe!==r&&pe.status!==H){var We=pe.strategy===E?c(pe,qe):pe.strategy===P?s(pe,qe):R[pe.level].func(pe,qe);if((We===ve||We===N)&&(pe.status=H),We===Q||We===ve)return W.avail_out===0&&(pe.last_flush=-1),m;if(We===fe&&(qe===u?f._tr_align(pe):qe!==d&&(f._tr_stored_block(pe,0,0,!1),qe===p&&(Ee(pe.head),pe.lookahead===0&&(pe.strstart=0,pe.block_start=0,pe.insert=0))),Oe(W),W.avail_out===0))return pe.last_flush=-1,m}return qe!==h?m:pe.wrap<=0?y:(pe.wrap===2?(ge(pe,W.adler&255),ge(pe,W.adler>>8&255),ge(pe,W.adler>>16&255),ge(pe,W.adler>>24&255),ge(pe,W.total_in&255),ge(pe,W.total_in>>8&255),ge(pe,W.total_in>>16&255),ge(pe,W.total_in>>24&255)):(Ne(pe,W.adler>>>16),Ne(pe,W.adler&65535)),Oe(W),pe.wrap>0&&(pe.wrap=-pe.wrap),pe.pending!==0?m:y)}l(ie,"HV"),e(ie,"deflate");function Je(W){var qe;return!W||!W.state?w:(qe=W.state.status,qe!==te&&qe!==X&&qe!==ye&&qe!==Re&&qe!==De&&qe!==Y&&qe!==H?D(W,w):(W.state=null,qe===Y?D(W,_):m))}l(Je,"WV"),e(Je,"deflateEnd");function dt(W,qe){var Ve=qe.length,pe,Le,He,me,Se,We,Qe,lt;if(!W||!W.state||(pe=W.state,me=pe.wrap,me===2||me===1&&pe.status!==te||pe.lookahead))return w;for(me===1&&(W.adler=g(W.adler,qe,Ve,0)),pe.wrap=0,Ve>=pe.w_size&&(me===0&&(Ee(pe.head),pe.strstart=0,pe.block_start=0,pe.insert=0),lt=new i.Buf8(pe.w_size),i.arraySet(lt,qe,Ve-pe.w_size,pe.w_size,0),qe=lt,Ve=pe.w_size),Se=W.avail_in,We=W.next_in,Qe=W.input,W.avail_in=Ve,W.next_in=0,W.input=qe,Ce(pe);pe.lookahead>=se;){Le=pe.strstart,He=pe.lookahead-(se-1);do pe.ins_h=(pe.ins_h<<pe.hash_shift^pe.window[Le+se-1])&pe.hash_mask,pe.prev[Le&pe.w_mask]=pe.head[pe.ins_h],pe.head[pe.ins_h]=Le,Le++;while(--He);pe.strstart=Le,pe.lookahead=se-1,Ce(pe)}return pe.strstart+=pe.lookahead,pe.block_start=pe.strstart,pe.insert=pe.lookahead,pe.lookahead=0,pe.match_length=pe.prev_length=se-1,pe.match_available=0,W.next_in=We,W.input=Qe,W.avail_in=Se,pe.wrap=me,m}l(dt,"qV"),e(dt,"deflateSetDictionary"),a.deflateInit=Fe,a.deflateInit2=le,a.deflateReset=oe,a.deflateResetKeep=Z,a.deflateSetHeader=Ae,a.deflate=ie,a.deflateEnd=Je,a.deflateSetDictionary=dt,a.deflateInfo="pako deflate (from Nodeca project)"}),UP=Ge(a=>{"use strict";var i=Vi(),f=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch{f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{g=!1}var o=new i.Buf8(256);for(n=0;n<256;n++)o[n]=n>=252?6:n>=248?5:n>=240?4:n>=224?3:n>=192?2:1;var n;o[254]=o[254]=1,a.string2buf=function(u){var p,h,d,m,y,w=u.length,_=0;for(m=0;m<w;m++)h=u.charCodeAt(m),(h&64512)===55296&&m+1<w&&(d=u.charCodeAt(m+1),(d&64512)===56320&&(h=65536+(h-55296<<10)+(d-56320),m++)),_+=h<128?1:h<2048?2:h<65536?3:4;for(p=new i.Buf8(_),y=0,m=0;y<_;m++)h=u.charCodeAt(m),(h&64512)===55296&&m+1<w&&(d=u.charCodeAt(m+1),(d&64512)===56320&&(h=65536+(h-55296<<10)+(d-56320),m++)),h<128?p[y++]=h:h<2048?(p[y++]=192|h>>>6,p[y++]=128|h&63):h<65536?(p[y++]=224|h>>>12,p[y++]=128|h>>>6&63,p[y++]=128|h&63):(p[y++]=240|h>>>18,p[y++]=128|h>>>12&63,p[y++]=128|h>>>6&63,p[y++]=128|h&63);return p};function r(u,p){if(p<65534&&(u.subarray&&g||!u.subarray&&f))return String.fromCharCode.apply(null,i.shrinkBuf(u,p));for(var h="",d=0;d<p;d++)h+=String.fromCharCode(u[d]);return h}l(r,"fO"),e(r,"buf2binstring"),a.buf2binstring=function(u){return r(u,u.length)},a.binstring2buf=function(u){for(var p=new i.Buf8(u.length),h=0,d=p.length;h<d;h++)p[h]=u.charCodeAt(h);return p},a.buf2string=function(u,p){var h,d,m,y,w=p||u.length,_=new Array(w*2);for(d=0,h=0;h<w;){if(m=u[h++],m<128){_[d++]=m;continue}if(y=o[m],y>4){_[d++]=65533,h+=y-1;continue}for(m&=y===2?31:y===3?15:7;y>1&&h<w;)m=m<<6|u[h++]&63,y--;if(y>1){_[d++]=65533;continue}m<65536?_[d++]=m:(m-=65536,_[d++]=55296|m>>10&1023,_[d++]=56320|m&1023)}return r(_,d)},a.utf8border=function(u,p){var h;for(p=p||u.length,p>u.length&&(p=u.length),h=p-1;h>=0&&(u[h]&192)===128;)h--;return h<0||h===0?p:h+o[u[h]]>p?h:p}}),MP=Ge((a,i)=>{"use strict";function f(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}l(f,"zV"),e(f,"ZStream"),i.exports=f}),KN=Ge(a=>{"use strict";var i=VN(),f=Vi(),g=UP(),o=WE(),n=MP(),r=Object.prototype.toString,u=0,p=4,h=0,d=1,m=2,y=-1,w=0,_=8;function S(P){if(!(this instanceof S))return new S(P);this.options=f.assign({level:y,method:_,chunkSize:16384,windowBits:15,memLevel:8,strategy:w,to:""},P||{});var A=this.options;A.raw&&A.windowBits>0?A.windowBits=-A.windowBits:A.gzip&&A.windowBits>0&&A.windowBits<16&&(A.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new n,this.strm.avail_out=0;var x=i.deflateInit2(this.strm,A.level,A.method,A.windowBits,A.memLevel,A.strategy);if(x!==h)throw new Error(o[x]);if(A.header&&i.deflateSetHeader(this.strm,A.header),A.dictionary){var U;if(typeof A.dictionary=="string"?U=g.string2buf(A.dictionary):r.call(A.dictionary)==="[object ArrayBuffer]"?U=new Uint8Array(A.dictionary):U=A.dictionary,x=i.deflateSetDictionary(this.strm,U),x!==h)throw new Error(o[x]);this._dict_set=!0}}l(S,"Qo"),e(S,"Deflate"),S.prototype.push=function(P,A){var x=this.strm,U=this.options.chunkSize,M,ee;if(this.ended)return!1;ee=A===~~A?A:A===!0?p:u,typeof P=="string"?x.input=g.string2buf(P):r.call(P)==="[object ArrayBuffer]"?x.input=new Uint8Array(P):x.input=P,x.next_in=0,x.avail_in=x.input.length;do{if(x.avail_out===0&&(x.output=new f.Buf8(U),x.next_out=0,x.avail_out=U),M=i.deflate(x,ee),M!==d&&M!==h)return this.onEnd(M),this.ended=!0,!1;(x.avail_out===0||x.avail_in===0&&(ee===p||ee===m))&&(this.options.to==="string"?this.onData(g.buf2binstring(f.shrinkBuf(x.output,x.next_out))):this.onData(f.shrinkBuf(x.output,x.next_out)))}while((x.avail_in>0||x.avail_out===0)&&M!==d);return ee===p?(M=i.deflateEnd(this.strm),this.onEnd(M),this.ended=!0,M===h):(ee===m&&(this.onEnd(h),x.avail_out=0),!0)},S.prototype.onData=function(P){this.chunks.push(P)},S.prototype.onEnd=function(P){P===h&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=f.flattenChunks(this.chunks)),this.chunks=[],this.err=P,this.msg=this.strm.msg};function T(P,A){var x=new S(A);if(x.push(P,!0),x.err)throw x.msg||o[x.err];return x.result}l(T,"_0"),e(T,"deflate");function O(P,A){return A=A||{},A.raw=!0,T(P,A)}l(O,"JV"),e(O,"deflateRaw");function E(P,A){return A=A||{},A.gzip=!0,T(P,A)}l(E,"ZV"),e(E,"gzip"),a.Deflate=S,a.deflate=T,a.deflateRaw=O,a.gzip=E}),JN=Ge((a,i)=>{"use strict";var f=30,g=12;i.exports=e(function(o,n){var r,u,p,h,d,m,y,w,_,S,T,O,E,P,A,x,U,M,ee,V,q,G,re,ae,de;r=o.state,u=o.next_in,ae=o.input,p=u+(o.avail_in-5),h=o.next_out,de=o.output,d=h-(n-o.avail_out),m=h+(o.avail_out-257),y=r.dmax,w=r.wsize,_=r.whave,S=r.wnext,T=r.window,O=r.hold,E=r.bits,P=r.lencode,A=r.distcode,x=(1<<r.lenbits)-1,U=(1<<r.distbits)-1;e:do{E<15&&(O+=ae[u++]<<E,E+=8,O+=ae[u++]<<E,E+=8),M=P[O&x];t:for(;;){if(ee=M>>>24,O>>>=ee,E-=ee,ee=M>>>16&255,ee===0)de[h++]=M&65535;else if(ee&16){V=M&65535,ee&=15,ee&&(E<ee&&(O+=ae[u++]<<E,E+=8),V+=O&(1<<ee)-1,O>>>=ee,E-=ee),E<15&&(O+=ae[u++]<<E,E+=8,O+=ae[u++]<<E,E+=8),M=A[O&U];r:for(;;){if(ee=M>>>24,O>>>=ee,E-=ee,ee=M>>>16&255,ee&16){if(q=M&65535,ee&=15,E<ee&&(O+=ae[u++]<<E,E+=8,E<ee&&(O+=ae[u++]<<E,E+=8)),q+=O&(1<<ee)-1,q>y){o.msg="invalid distance too far back",r.mode=f;break e}if(O>>>=ee,E-=ee,ee=h-d,q>ee){if(ee=q-ee,ee>_&&r.sane){o.msg="invalid distance too far back",r.mode=f;break e}if(G=0,re=T,S===0){if(G+=w-ee,ee<V){V-=ee;do de[h++]=T[G++];while(--ee);G=h-q,re=de}}else if(S<ee){if(G+=w+S-ee,ee-=S,ee<V){V-=ee;do de[h++]=T[G++];while(--ee);if(G=0,S<V){ee=S,V-=ee;do de[h++]=T[G++];while(--ee);G=h-q,re=de}}}else if(G+=S-ee,ee<V){V-=ee;do de[h++]=T[G++];while(--ee);G=h-q,re=de}for(;V>2;)de[h++]=re[G++],de[h++]=re[G++],de[h++]=re[G++],V-=3;V&&(de[h++]=re[G++],V>1&&(de[h++]=re[G++]))}else{G=h-q;do de[h++]=de[G++],de[h++]=de[G++],de[h++]=de[G++],V-=3;while(V>2);V&&(de[h++]=de[G++],V>1&&(de[h++]=de[G++]))}}else if(ee&64){o.msg="invalid distance code",r.mode=f;break e}else{M=A[(M&65535)+(O&(1<<ee)-1)];continue r}break}}else if(ee&64)if(ee&32){r.mode=g;break e}else{o.msg="invalid literal/length code",r.mode=f;break e}else{M=P[(M&65535)+(O&(1<<ee)-1)];continue t}break}}while(u<p&&h<m);V=E>>3,u-=V,E-=V<<3,O&=(1<<E)-1,o.next_in=u,o.next_out=h,o.avail_in=u<p?5+(p-u):5-(u-p),o.avail_out=h<m?257+(m-h):257-(h-m),r.hold=O,r.bits=E},"inflate_fast")}),YN=Ge((a,i)=>{"use strict";var f=Vi(),g=15,o=852,n=592,r=0,u=1,p=2,h=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],d=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],y=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];i.exports=e(function(w,_,S,T,O,E,P,A){var x=A.bits,U=0,M=0,ee=0,V=0,q=0,G=0,re=0,ae=0,de=0,we=0,xe,Pe,se,Te,J,ue=null,te=0,X,ye=new f.Buf16(g+1),Re=new f.Buf16(g+1),De=null,Y=0,H,Q,fe;for(U=0;U<=g;U++)ye[U]=0;for(M=0;M<T;M++)ye[_[S+M]]++;for(q=x,V=g;V>=1&&ye[V]===0;V--);if(q>V&&(q=V),V===0)return O[E++]=1<<24|64<<16|0,O[E++]=1<<24|64<<16|0,A.bits=1,0;for(ee=1;ee<V&&ye[ee]===0;ee++);for(q<ee&&(q=ee),ae=1,U=1;U<=g;U++)if(ae<<=1,ae-=ye[U],ae<0)return-1;if(ae>0&&(w===r||V!==1))return-1;for(Re[1]=0,U=1;U<g;U++)Re[U+1]=Re[U]+ye[U];for(M=0;M<T;M++)_[S+M]!==0&&(P[Re[_[S+M]]++]=M);if(w===r?(ue=De=P,X=19):w===u?(ue=h,te-=257,De=d,Y-=257,X=256):(ue=m,De=y,X=-1),we=0,M=0,U=ee,J=E,G=q,re=0,se=-1,de=1<<q,Te=de-1,w===u&&de>o||w===p&&de>n)return 1;for(;;){H=U-re,P[M]<X?(Q=0,fe=P[M]):P[M]>X?(Q=De[Y+P[M]],fe=ue[te+P[M]]):(Q=96,fe=0),xe=1<<U-re,Pe=1<<G,ee=Pe;do Pe-=xe,O[J+(we>>re)+Pe]=H<<24|Q<<16|fe|0;while(Pe!==0);for(xe=1<<U-1;we&xe;)xe>>=1;if(xe!==0?(we&=xe-1,we+=xe):we=0,M++,--ye[U]===0){if(U===V)break;U=_[S+P[M]]}if(U>q&&(we&Te)!==se){for(re===0&&(re=q),J+=ee,G=U-re,ae=1<<G;G+re<V&&(ae-=ye[G+re],!(ae<=0));)G++,ae<<=1;if(de+=1<<G,w===u&&de>o||w===p&&de>n)return 1;se=we&Te,O[se]=q<<24|G<<16|J-E|0}}return we!==0&&(O[J+we]=U-re<<24|64<<16|0),A.bits=q,0},"inflate_table")}),ZN=Ge(a=>{"use strict";var i=Vi(),f=NP(),g=DP(),o=JN(),n=YN(),r=0,u=1,p=2,h=4,d=5,m=6,y=0,w=1,_=2,S=-2,T=-3,O=-4,E=-5,P=8,A=1,x=2,U=3,M=4,ee=5,V=6,q=7,G=8,re=9,ae=10,de=11,we=12,xe=13,Pe=14,se=15,Te=16,J=17,ue=18,te=19,X=20,ye=21,Re=22,De=23,Y=24,H=25,Q=26,fe=27,ve=28,N=29,I=30,D=31,z=32,Ee=852,Oe=592,be=15,ge=be;function Ne(le){return(le>>>24&255)+(le>>>8&65280)+((le&65280)<<8)+((le&255)<<24)}l(Ne,"GO"),e(Ne,"zswap32");function Ie(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}l(Ie,"yG"),e(Ie,"InflateState");function ke(le){var Fe;return!le||!le.state?S:(Fe=le.state,le.total_in=le.total_out=Fe.total=0,le.msg="",Fe.wrap&&(le.adler=Fe.wrap&1),Fe.mode=A,Fe.last=0,Fe.havedict=0,Fe.dmax=32768,Fe.head=null,Fe.hold=0,Fe.bits=0,Fe.lencode=Fe.lendyn=new i.Buf32(Ee),Fe.distcode=Fe.distdyn=new i.Buf32(Oe),Fe.sane=1,Fe.back=-1,y)}l(ke,"QO"),e(ke,"inflateResetKeep");function Ce(le){var Fe;return!le||!le.state?S:(Fe=le.state,Fe.wsize=0,Fe.whave=0,Fe.wnext=0,ke(le))}l(Ce,"eP"),e(Ce,"inflateReset");function $e(le,Fe){var ie,Je;return!le||!le.state||(Je=le.state,Fe<0?(ie=0,Fe=-Fe):(ie=(Fe>>4)+1,Fe<48&&(Fe&=15)),Fe&&(Fe<8||Fe>15))?S:(Je.window!==null&&Je.wbits!==Fe&&(Je.window=null),Je.wrap=ie,Je.wbits=Fe,Ce(le))}l($e,"tP"),e($e,"inflateReset2");function Ke(le,Fe){var ie,Je;return le?(Je=new Ie,le.state=Je,Je.window=null,ie=$e(le,Fe),ie!==y&&(le.state=null),ie):S}l(Ke,"rP"),e(Ke,"inflateInit2");function t(le){return Ke(le,ge)}l(t,"mG"),e(t,"inflateInit");var s=!0,c,v;function R(le){if(s){var Fe;for(c=new i.Buf32(512),v=new i.Buf32(32),Fe=0;Fe<144;)le.lens[Fe++]=8;for(;Fe<256;)le.lens[Fe++]=9;for(;Fe<280;)le.lens[Fe++]=7;for(;Fe<288;)le.lens[Fe++]=8;for(n(u,le.lens,0,288,c,0,le.work,{bits:9}),Fe=0;Fe<32;)le.lens[Fe++]=5;n(p,le.lens,0,32,v,0,le.work,{bits:5}),s=!1}le.lencode=c,le.lenbits=9,le.distcode=v,le.distbits=5}l(R,"gG"),e(R,"fixedtables");function C(le,Fe,ie,Je){var dt,W=le.state;return W.window===null&&(W.wsize=1<<W.wbits,W.wnext=0,W.whave=0,W.window=new i.Buf8(W.wsize)),Je>=W.wsize?(i.arraySet(W.window,Fe,ie-W.wsize,W.wsize,0),W.wnext=0,W.whave=W.wsize):(dt=W.wsize-W.wnext,dt>Je&&(dt=Je),i.arraySet(W.window,Fe,ie-Je,dt,W.wnext),Je-=dt,Je?(i.arraySet(W.window,Fe,ie-Je,Je,0),W.wnext=Je,W.whave=W.wsize):(W.wnext+=dt,W.wnext===W.wsize&&(W.wnext=0),W.whave<W.wsize&&(W.whave+=dt))),0}l(C,"nP"),e(C,"updatewindow");function j(le,Fe){var ie,Je,dt,W,qe,Ve,pe,Le,He,me,Se,We,Qe,lt,bt=0,ht,Ot,zt,Wt,nr,Ar,et,Xt,Ft=new i.Buf8(4),Nt,Ut,dr=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!le||!le.state||!le.output||!le.input&&le.avail_in!==0)return S;ie=le.state,ie.mode===we&&(ie.mode=xe),qe=le.next_out,dt=le.output,pe=le.avail_out,W=le.next_in,Je=le.input,Ve=le.avail_in,Le=ie.hold,He=ie.bits,me=Ve,Se=pe,Xt=y;e:for(;;)switch(ie.mode){case A:if(ie.wrap===0){ie.mode=xe;break}for(;He<16;){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}if(ie.wrap&2&&Le===35615){ie.check=0,Ft[0]=Le&255,Ft[1]=Le>>>8&255,ie.check=g(ie.check,Ft,2,0),Le=0,He=0,ie.mode=x;break}if(ie.flags=0,ie.head&&(ie.head.done=!1),!(ie.wrap&1)||(((Le&255)<<8)+(Le>>8))%31){le.msg="incorrect header check",ie.mode=I;break}if((Le&15)!==P){le.msg="unknown compression method",ie.mode=I;break}if(Le>>>=4,He-=4,et=(Le&15)+8,ie.wbits===0)ie.wbits=et;else if(et>ie.wbits){le.msg="invalid window size",ie.mode=I;break}ie.dmax=1<<et,le.adler=ie.check=1,ie.mode=Le&512?ae:we,Le=0,He=0;break;case x:for(;He<16;){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}if(ie.flags=Le,(ie.flags&255)!==P){le.msg="unknown compression method",ie.mode=I;break}if(ie.flags&57344){le.msg="unknown header flags set",ie.mode=I;break}ie.head&&(ie.head.text=Le>>8&1),ie.flags&512&&(Ft[0]=Le&255,Ft[1]=Le>>>8&255,ie.check=g(ie.check,Ft,2,0)),Le=0,He=0,ie.mode=U;case U:for(;He<32;){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}ie.head&&(ie.head.time=Le),ie.flags&512&&(Ft[0]=Le&255,Ft[1]=Le>>>8&255,Ft[2]=Le>>>16&255,Ft[3]=Le>>>24&255,ie.check=g(ie.check,Ft,4,0)),Le=0,He=0,ie.mode=M;case M:for(;He<16;){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}ie.head&&(ie.head.xflags=Le&255,ie.head.os=Le>>8),ie.flags&512&&(Ft[0]=Le&255,Ft[1]=Le>>>8&255,ie.check=g(ie.check,Ft,2,0)),Le=0,He=0,ie.mode=ee;case ee:if(ie.flags&1024){for(;He<16;){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}ie.length=Le,ie.head&&(ie.head.extra_len=Le),ie.flags&512&&(Ft[0]=Le&255,Ft[1]=Le>>>8&255,ie.check=g(ie.check,Ft,2,0)),Le=0,He=0}else ie.head&&(ie.head.extra=null);ie.mode=V;case V:if(ie.flags&1024&&(We=ie.length,We>Ve&&(We=Ve),We&&(ie.head&&(et=ie.head.extra_len-ie.length,ie.head.extra||(ie.head.extra=new Array(ie.head.extra_len)),i.arraySet(ie.head.extra,Je,W,We,et)),ie.flags&512&&(ie.check=g(ie.check,Je,We,W)),Ve-=We,W+=We,ie.length-=We),ie.length))break e;ie.length=0,ie.mode=q;case q:if(ie.flags&2048){if(Ve===0)break e;We=0;do et=Je[W+We++],ie.head&&et&&ie.length<65536&&(ie.head.name+=String.fromCharCode(et));while(et&&We<Ve);if(ie.flags&512&&(ie.check=g(ie.check,Je,We,W)),Ve-=We,W+=We,et)break e}else ie.head&&(ie.head.name=null);ie.length=0,ie.mode=G;case G:if(ie.flags&4096){if(Ve===0)break e;We=0;do et=Je[W+We++],ie.head&&et&&ie.length<65536&&(ie.head.comment+=String.fromCharCode(et));while(et&&We<Ve);if(ie.flags&512&&(ie.check=g(ie.check,Je,We,W)),Ve-=We,W+=We,et)break e}else ie.head&&(ie.head.comment=null);ie.mode=re;case re:if(ie.flags&512){for(;He<16;){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}if(Le!==(ie.check&65535)){le.msg="header crc mismatch",ie.mode=I;break}Le=0,He=0}ie.head&&(ie.head.hcrc=ie.flags>>9&1,ie.head.done=!0),le.adler=ie.check=0,ie.mode=we;break;case ae:for(;He<32;){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}le.adler=ie.check=Ne(Le),Le=0,He=0,ie.mode=de;case de:if(ie.havedict===0)return le.next_out=qe,le.avail_out=pe,le.next_in=W,le.avail_in=Ve,ie.hold=Le,ie.bits=He,_;le.adler=ie.check=1,ie.mode=we;case we:if(Fe===d||Fe===m)break e;case xe:if(ie.last){Le>>>=He&7,He-=He&7,ie.mode=fe;break}for(;He<3;){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}switch(ie.last=Le&1,Le>>>=1,He-=1,Le&3){case 0:ie.mode=Pe;break;case 1:if(R(ie),ie.mode=X,Fe===m){Le>>>=2,He-=2;break e}break;case 2:ie.mode=J;break;case 3:le.msg="invalid block type",ie.mode=I}Le>>>=2,He-=2;break;case Pe:for(Le>>>=He&7,He-=He&7;He<32;){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}if((Le&65535)!==(Le>>>16^65535)){le.msg="invalid stored block lengths",ie.mode=I;break}if(ie.length=Le&65535,Le=0,He=0,ie.mode=se,Fe===m)break e;case se:ie.mode=Te;case Te:if(We=ie.length,We){if(We>Ve&&(We=Ve),We>pe&&(We=pe),We===0)break e;i.arraySet(dt,Je,W,We,qe),Ve-=We,W+=We,pe-=We,qe+=We,ie.length-=We;break}ie.mode=we;break;case J:for(;He<14;){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}if(ie.nlen=(Le&31)+257,Le>>>=5,He-=5,ie.ndist=(Le&31)+1,Le>>>=5,He-=5,ie.ncode=(Le&15)+4,Le>>>=4,He-=4,ie.nlen>286||ie.ndist>30){le.msg="too many length or distance symbols",ie.mode=I;break}ie.have=0,ie.mode=ue;case ue:for(;ie.have<ie.ncode;){for(;He<3;){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}ie.lens[dr[ie.have++]]=Le&7,Le>>>=3,He-=3}for(;ie.have<19;)ie.lens[dr[ie.have++]]=0;if(ie.lencode=ie.lendyn,ie.lenbits=7,Nt={bits:ie.lenbits},Xt=n(r,ie.lens,0,19,ie.lencode,0,ie.work,Nt),ie.lenbits=Nt.bits,Xt){le.msg="invalid code lengths set",ie.mode=I;break}ie.have=0,ie.mode=te;case te:for(;ie.have<ie.nlen+ie.ndist;){for(;bt=ie.lencode[Le&(1<<ie.lenbits)-1],ht=bt>>>24,Ot=bt>>>16&255,zt=bt&65535,!(ht<=He);){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}if(zt<16)Le>>>=ht,He-=ht,ie.lens[ie.have++]=zt;else{if(zt===16){for(Ut=ht+2;He<Ut;){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}if(Le>>>=ht,He-=ht,ie.have===0){le.msg="invalid bit length repeat",ie.mode=I;break}et=ie.lens[ie.have-1],We=3+(Le&3),Le>>>=2,He-=2}else if(zt===17){for(Ut=ht+3;He<Ut;){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}Le>>>=ht,He-=ht,et=0,We=3+(Le&7),Le>>>=3,He-=3}else{for(Ut=ht+7;He<Ut;){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}Le>>>=ht,He-=ht,et=0,We=11+(Le&127),Le>>>=7,He-=7}if(ie.have+We>ie.nlen+ie.ndist){le.msg="invalid bit length repeat",ie.mode=I;break}for(;We--;)ie.lens[ie.have++]=et}}if(ie.mode===I)break;if(ie.lens[256]===0){le.msg="invalid code -- missing end-of-block",ie.mode=I;break}if(ie.lenbits=9,Nt={bits:ie.lenbits},Xt=n(u,ie.lens,0,ie.nlen,ie.lencode,0,ie.work,Nt),ie.lenbits=Nt.bits,Xt){le.msg="invalid literal/lengths set",ie.mode=I;break}if(ie.distbits=6,ie.distcode=ie.distdyn,Nt={bits:ie.distbits},Xt=n(p,ie.lens,ie.nlen,ie.ndist,ie.distcode,0,ie.work,Nt),ie.distbits=Nt.bits,Xt){le.msg="invalid distances set",ie.mode=I;break}if(ie.mode=X,Fe===m)break e;case X:ie.mode=ye;case ye:if(Ve>=6&&pe>=258){le.next_out=qe,le.avail_out=pe,le.next_in=W,le.avail_in=Ve,ie.hold=Le,ie.bits=He,o(le,Se),qe=le.next_out,dt=le.output,pe=le.avail_out,W=le.next_in,Je=le.input,Ve=le.avail_in,Le=ie.hold,He=ie.bits,ie.mode===we&&(ie.back=-1);break}for(ie.back=0;bt=ie.lencode[Le&(1<<ie.lenbits)-1],ht=bt>>>24,Ot=bt>>>16&255,zt=bt&65535,!(ht<=He);){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}if(Ot&&!(Ot&240)){for(Wt=ht,nr=Ot,Ar=zt;bt=ie.lencode[Ar+((Le&(1<<Wt+nr)-1)>>Wt)],ht=bt>>>24,Ot=bt>>>16&255,zt=bt&65535,!(Wt+ht<=He);){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}Le>>>=Wt,He-=Wt,ie.back+=Wt}if(Le>>>=ht,He-=ht,ie.back+=ht,ie.length=zt,Ot===0){ie.mode=Q;break}if(Ot&32){ie.back=-1,ie.mode=we;break}if(Ot&64){le.msg="invalid literal/length code",ie.mode=I;break}ie.extra=Ot&15,ie.mode=Re;case Re:if(ie.extra){for(Ut=ie.extra;He<Ut;){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}ie.length+=Le&(1<<ie.extra)-1,Le>>>=ie.extra,He-=ie.extra,ie.back+=ie.extra}ie.was=ie.length,ie.mode=De;case De:for(;bt=ie.distcode[Le&(1<<ie.distbits)-1],ht=bt>>>24,Ot=bt>>>16&255,zt=bt&65535,!(ht<=He);){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}if(!(Ot&240)){for(Wt=ht,nr=Ot,Ar=zt;bt=ie.distcode[Ar+((Le&(1<<Wt+nr)-1)>>Wt)],ht=bt>>>24,Ot=bt>>>16&255,zt=bt&65535,!(Wt+ht<=He);){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}Le>>>=Wt,He-=Wt,ie.back+=Wt}if(Le>>>=ht,He-=ht,ie.back+=ht,Ot&64){le.msg="invalid distance code",ie.mode=I;break}ie.offset=zt,ie.extra=Ot&15,ie.mode=Y;case Y:if(ie.extra){for(Ut=ie.extra;He<Ut;){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}ie.offset+=Le&(1<<ie.extra)-1,Le>>>=ie.extra,He-=ie.extra,ie.back+=ie.extra}if(ie.offset>ie.dmax){le.msg="invalid distance too far back",ie.mode=I;break}ie.mode=H;case H:if(pe===0)break e;if(We=Se-pe,ie.offset>We){if(We=ie.offset-We,We>ie.whave&&ie.sane){le.msg="invalid distance too far back",ie.mode=I;break}We>ie.wnext?(We-=ie.wnext,Qe=ie.wsize-We):Qe=ie.wnext-We,We>ie.length&&(We=ie.length),lt=ie.window}else lt=dt,Qe=qe-ie.offset,We=ie.length;We>pe&&(We=pe),pe-=We,ie.length-=We;do dt[qe++]=lt[Qe++];while(--We);ie.length===0&&(ie.mode=ye);break;case Q:if(pe===0)break e;dt[qe++]=ie.length,pe--,ie.mode=ye;break;case fe:if(ie.wrap){for(;He<32;){if(Ve===0)break e;Ve--,Le|=Je[W++]<<He,He+=8}if(Se-=pe,le.total_out+=Se,ie.total+=Se,Se&&(le.adler=ie.check=ie.flags?g(ie.check,dt,Se,qe-Se):f(ie.check,dt,Se,qe-Se)),Se=pe,(ie.flags?Le:Ne(Le))!==ie.check){le.msg="incorrect data check",ie.mode=I;break}Le=0,He=0}ie.mode=ve;case ve:if(ie.wrap&&ie.flags){for(;He<32;){if(Ve===0)break e;Ve--,Le+=Je[W++]<<He,He+=8}if(Le!==(ie.total&4294967295)){le.msg="incorrect length check",ie.mode=I;break}Le=0,He=0}ie.mode=N;case N:Xt=w;break e;case I:Xt=T;break e;case D:return O;case z:default:return S}return le.next_out=qe,le.avail_out=pe,le.next_in=W,le.avail_in=Ve,ie.hold=Le,ie.bits=He,(ie.wsize||Se!==le.avail_out&&ie.mode<I&&(ie.mode<fe||Fe!==h))&&C(le,le.output,le.next_out,Se-le.avail_out)?(ie.mode=D,O):(me-=le.avail_in,Se-=le.avail_out,le.total_in+=me,le.total_out+=Se,ie.total+=Se,ie.wrap&&Se&&(le.adler=ie.check=ie.flags?g(ie.check,dt,Se,le.next_out-Se):f(ie.check,dt,Se,le.next_out-Se)),le.data_type=ie.bits+(ie.last?64:0)+(ie.mode===we?128:0)+(ie.mode===X||ie.mode===se?256:0),(me===0&&Se===0||Fe===h)&&Xt===y&&(Xt=E),Xt)}l(j,"wG"),e(j,"inflate");function Z(le){if(!le||!le.state)return S;var Fe=le.state;return Fe.window&&(Fe.window=null),le.state=null,y}l(Z,"vG"),e(Z,"inflateEnd");function oe(le,Fe){var ie;return!le||!le.state||(ie=le.state,!(ie.wrap&2))?S:(ie.head=Fe,Fe.done=!1,y)}l(oe,"bG"),e(oe,"inflateGetHeader");function Ae(le,Fe){var ie=Fe.length,Je,dt,W;return!le||!le.state||(Je=le.state,Je.wrap!==0&&Je.mode!==de)?S:Je.mode===de&&(dt=1,dt=f(dt,Fe,ie,0),dt!==Je.check)?T:(W=C(le,Fe,ie,ie),W?(Je.mode=D,O):(Je.havedict=1,y))}l(Ae,"_G"),e(Ae,"inflateSetDictionary"),a.inflateReset=Ce,a.inflateReset2=$e,a.inflateResetKeep=ke,a.inflateInit=t,a.inflateInit2=Ke,a.inflate=j,a.inflateEnd=Z,a.inflateGetHeader=oe,a.inflateSetDictionary=Ae,a.inflateInfo="pako inflate (from Nodeca project)"}),$P=Ge((a,i)=>{"use strict";i.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}}),QN=Ge((a,i)=>{"use strict";function f(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}l(f,"EG"),e(f,"GZheader"),i.exports=f}),XN=Ge(a=>{"use strict";var i=ZN(),f=Vi(),g=UP(),o=$P(),n=WE(),r=MP(),u=QN(),p=Object.prototype.toString;function h(y){if(!(this instanceof h))return new h(y);this.options=f.assign({chunkSize:16384,windowBits:0,to:""},y||{});var w=this.options;w.raw&&w.windowBits>=0&&w.windowBits<16&&(w.windowBits=-w.windowBits,w.windowBits===0&&(w.windowBits=-15)),w.windowBits>=0&&w.windowBits<16&&!(y&&y.windowBits)&&(w.windowBits+=32),w.windowBits>15&&w.windowBits<48&&(w.windowBits&15||(w.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new r,this.strm.avail_out=0;var _=i.inflateInit2(this.strm,w.windowBits);if(_!==o.Z_OK)throw new Error(n[_]);if(this.header=new u,i.inflateGetHeader(this.strm,this.header),w.dictionary&&(typeof w.dictionary=="string"?w.dictionary=g.string2buf(w.dictionary):p.call(w.dictionary)==="[object ArrayBuffer]"&&(w.dictionary=new Uint8Array(w.dictionary)),w.raw&&(_=i.inflateSetDictionary(this.strm,w.dictionary),_!==o.Z_OK)))throw new Error(n[_])}l(h,"ta"),e(h,"Inflate"),h.prototype.push=function(y,w){var _=this.strm,S=this.options.chunkSize,T=this.options.dictionary,O,E,P,A,x,U=!1;if(this.ended)return!1;E=w===~~w?w:w===!0?o.Z_FINISH:o.Z_NO_FLUSH,typeof y=="string"?_.input=g.binstring2buf(y):p.call(y)==="[object ArrayBuffer]"?_.input=new Uint8Array(y):_.input=y,_.next_in=0,_.avail_in=_.input.length;do{if(_.avail_out===0&&(_.output=new f.Buf8(S),_.next_out=0,_.avail_out=S),O=i.inflate(_,o.Z_NO_FLUSH),O===o.Z_NEED_DICT&&T&&(O=i.inflateSetDictionary(this.strm,T)),O===o.Z_BUF_ERROR&&U===!0&&(O=o.Z_OK,U=!1),O!==o.Z_STREAM_END&&O!==o.Z_OK)return this.onEnd(O),this.ended=!0,!1;_.next_out&&(_.avail_out===0||O===o.Z_STREAM_END||_.avail_in===0&&(E===o.Z_FINISH||E===o.Z_SYNC_FLUSH))&&(this.options.to==="string"?(P=g.utf8border(_.output,_.next_out),A=_.next_out-P,x=g.buf2string(_.output,P),_.next_out=A,_.avail_out=S-A,A&&f.arraySet(_.output,_.output,P,A,0),this.onData(x)):this.onData(f.shrinkBuf(_.output,_.next_out))),_.avail_in===0&&_.avail_out===0&&(U=!0)}while((_.avail_in>0||_.avail_out===0)&&O!==o.Z_STREAM_END);return O===o.Z_STREAM_END&&(E=o.Z_FINISH),E===o.Z_FINISH?(O=i.inflateEnd(this.strm),this.onEnd(O),this.ended=!0,O===o.Z_OK):(E===o.Z_SYNC_FLUSH&&(this.onEnd(o.Z_OK),_.avail_out=0),!0)},h.prototype.onData=function(y){this.chunks.push(y)},h.prototype.onEnd=function(y){y===o.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=f.flattenChunks(this.chunks)),this.chunks=[],this.err=y,this.msg=this.strm.msg};function d(y,w){var _=new h(w);if(_.push(y,!0),_.err)throw _.msg||n[_.err];return _.result}l(d,"B0"),e(d,"inflate");function m(y,w){return w=w||{},w.raw=!0,d(y,w)}l(m,"RG"),e(m,"inflateRaw"),a.Inflate=h,a.inflate=d,a.inflateRaw=m,a.ungzip=d}),e3=Ge((a,i)=>{"use strict";var f=Vi().assign,g=KN(),o=XN(),n=$P(),r={};f(r,g,o,n),i.exports=r}),t3=Ge((a,i)=>{"use strict";var f=e((g,o)=>function(...n){let r=o.promiseModule;return new r((u,p)=>{o.multiArgs?n.push((...h)=>{o.errorFirst?h[0]?p(h):(h.shift(),u(h)):u(h)}):o.errorFirst?n.push((h,d)=>{h?p(h):u(d)}):n.push(u),g.apply(this,n)})},"processFn");i.exports=(g,o)=>{o=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},o);let n=typeof g;if(!(g!==null&&(n==="object"||n==="function")))throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${g===null?"null":n}\``);let r=e(p=>{let h=e(d=>typeof d=="string"?p===d:d.test(p),"match");return o.include?o.include.some(h):!o.exclude.some(h)},"filter"),u;n==="function"?u=e(function(...p){return o.excludeMain?g(...p):f(g,o).apply(this,p)},"ret"):u=Object.create(Object.getPrototypeOf(g));for(let p in g){let h=g[p];u[p]=typeof h=="function"&&r(p)?f(h,o):h}return u}}),r3=Ge((a,i)=>{var J,ue;function f(te){return Array.isArray(te)?te:[te]}l(f,"mP"),e(f,"makeArray");var g="",o=" ",n="\\",r=/^\s+$/,u=/(?:[^\\]|^)\\$/,p=/^\\!/,h=/^\\#/,d=/\r?\n/g,m=/^\.*\/|^\.+$/,y="/",w="node-ignore";typeof Symbol<"u"&&(w=Symbol.for("node-ignore"));var _=w,S=e((te,X,ye)=>Object.defineProperty(te,X,{value:ye}),"define"),T=/([0-z])-([0-z])/g,O=e(()=>!1,"RETURN_FALSE"),E=e(te=>te.replace(T,(X,ye,Re)=>ye.charCodeAt(0)<=Re.charCodeAt(0)?X:g),"sanitizeRange"),P=e(te=>{let{length:X}=te;return te.slice(0,X-X%2)},"cleanRangeBackSlash"),A=[[/^\uFEFF/,()=>g],[/((?:\\\\)*?)(\\?\s+)$/,(te,X,ye)=>X+(ye.indexOf("\\")===0?o:g)],[/(\\+?)\s/g,(te,X)=>{let{length:ye}=X;return X.slice(0,ye-ye%2)+o}],[/[\\$.|*+(){^]/g,te=>`\\${te}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,e(function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"},"startingReplacer")],[/\\\/\\\*\\\*(?=\\\/|$)/g,(te,X,ye)=>X+6<ye.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(te,X,ye)=>{let Re=ye.replace(/\\\*/g,"[^\\/]*");return X+Re}],[/\\\\\\(?=[$.|*+(){^])/g,()=>n],[/\\\\/g,()=>n],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(te,X,ye,Re,De)=>X===n?`\\[${ye}${P(Re)}${De}`:De==="]"&&Re.length%2===0?`[${E(ye)}${Re}]`:"[]"],[/(?:[^*])$/,te=>/\/$/.test(te)?`${te}$`:`${te}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(te,X)=>`${X?`${X}[^/]+`:"[^/]*"}(?=$|\\/$)`]],x=Object.create(null),U=e((te,X)=>{let ye=x[te];return ye||(ye=A.reduce((Re,[De,Y])=>Re.replace(De,Y.bind(te)),te),x[te]=ye),X?new RegExp(ye,"i"):new RegExp(ye)},"makeRegex"),M=e(te=>typeof te=="string","isString"),ee=e(te=>te&&M(te)&&!r.test(te)&&!u.test(te)&&te.indexOf("#")!==0,"checkPattern"),V=e(te=>te.split(d),"splitPattern"),q=(J=class{constructor(X,ye,Re,De){this.origin=X,this.pattern=ye,this.negative=Re,this.regex=De}},l(J,"U0"),J);e(q,"IgnoreRule");var G=q,re=e((te,X)=>{let ye=te,Re=!1;te.indexOf("!")===0&&(Re=!0,te=te.substr(1)),te=te.replace(p,"!").replace(h,"#");let De=U(te,X);return new G(ye,te,Re,De)},"createRule"),ae=e((te,X)=>{throw new X(te)},"throwError"),de=e((te,X,ye)=>M(te)?te?de.isNotRelative(te)?ye(`path should be a \`path.relative()\`d string, but got "${X}"`,RangeError):!0:ye("path must not be empty",TypeError):ye(`path must be a string, but got \`${X}\``,TypeError),"checkPath"),we=e(te=>m.test(te),"isNotRelative");de.isNotRelative=we,de.convert=te=>te;var xe=(ue=class{constructor({ignorecase:X=!0,ignoreCase:ye=X,allowRelativePaths:Re=!1}={}){S(this,_,!0),this._rules=[],this._ignoreCase=ye,this._allowRelativePaths=Re,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(X){if(X&&X[_]){this._rules=this._rules.concat(X._rules),this._added=!0;return}if(ee(X)){let ye=re(X,this._ignoreCase);this._added=!0,this._rules.push(ye)}}add(X){return this._added=!1,f(M(X)?V(X):X).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(X){return this.add(X)}_testOne(X,ye){let Re=!1,De=!1;return this._rules.forEach(Y=>{let{negative:H}=Y;De===H&&Re!==De||H&&!Re&&!De&&!ye||Y.regex.test(X)&&(Re=!H,De=H)}),{ignored:Re,unignored:De}}_test(X,ye,Re,De){let Y=X&&de.convert(X);return de(Y,X,this._allowRelativePaths?O:ae),this._t(Y,ye,Re,De)}_t(X,ye,Re,De){if(X in ye)return ye[X];if(De||(De=X.split(y)),De.pop(),!De.length)return ye[X]=this._testOne(X,Re);let Y=this._t(De.join(y)+y,ye,Re,De);return ye[X]=Y.ignored?Y:this._testOne(X,Re)}ignores(X){return this._test(X,this._ignoreCache,!1).ignored}createFilter(){return X=>!this.ignores(X)}filter(X){return f(X).filter(this.createFilter())}test(X){return this._test(X,this._testCache,!0)}},l(ue,"j0"),ue);e(xe,"Ignore");var Pe=xe,se=e(te=>new Pe(te),"factory"),Te=e(te=>de(te&&de.convert(te),te,O),"isPathValid");if(se.isPathValid=Te,se.default=se,i.exports=se,typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let te=e(ye=>/^\\\\\?\\/.test(ye)||/["<>|\u0000-\u001F]+/u.test(ye)?ye:ye.replace(/\\/g,"/"),"makePosix");de.convert=te;let X=/^[a-z]:\//i;de.isNotRelative=ye=>X.test(ye)||we(ye)}}),n3=Ge((a,i)=>{"use strict";function f(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}l(f,"GG"),e(f,"escapeRegExp");function g(n,r,u){return r=r instanceof RegExp?r:new RegExp(f(r),"g"),n.replace(r,u)}l(g,"xn"),e(g,"replaceAll");var o={clean:e(function(n){if(typeof n!="string")throw new Error("Expected a string, received: "+n);return n=g(n,"./","/"),n=g(n,"..","."),n=g(n," ","-"),n=g(n,/^[~^:?*\\\-]/g,""),n=g(n,/[~^:?*\\]/g,"-"),n=g(n,/[~^:?*\\\-]$/g,""),n=g(n,"@{","-"),n=g(n,/\.$/g,""),n=g(n,/\/$/g,""),n=g(n,/\.lock$/g,""),n},"clean")};i.exports=o}),i3=Ge((a,i)=>{"use strict";var f=/(^|[/.])([/.]|$)|^@$|@{|[\x00-\x20\x7f~^:?*[\\]|\.lock(\/|$)/;i.exports=e(function(g,o){if(typeof g!="string")throw new TypeError("Reference name must be a string");return!f.test(g)&&(!!o||g.includes("/"))},"validRef")}),o3=Ge((a,i)=>{i.exports=function(f,g){var o=f,n=g,r=o.length,u=n.length,p=!1,h=null,d=r+1,m=[],y=[],w=[],_="",S=-1,T=0,O=1,E,P,A=e(function(){r>=u&&(E=o,P=r,o=n,n=E,r=u,u=P,p=!0,d=r+1)},"init"),x=e(function(V,q,G){return{x:V,y:q,k:G}},"P"),U=e(function(V,q){return{elem:V,t:q}},"seselem"),M=e(function(V,q,G){var re,ae,de;for(q>G?re=m[V-1+d]:re=m[V+1+d],de=Math.max(q,G),ae=de-V;ae<r&&de<u&&o[ae]===n[de];)++ae,++de;return m[V+d]=y.length,y[y.length]=new x(ae,de,re),de},"snake"),ee=e(function(V){var q,G,re,ae,de;for(q=G=1,re=ae=0,de=V.length-1;de>=0;--de)for(;re<V[de].x||ae<V[de].y;)V[de].y-V[de].x>ae-re?(p?w[w.length]=new U(n[ae],S):w[w.length]=new U(n[ae],O),++G,++ae):V[de].y-V[de].x<ae-re?(p?w[w.length]=new U(o[re],O):w[w.length]=new U(o[re],S),++q,++re):(w[w.length]=new U(o[re],T),_+=o[re],++q,++G,++re,++ae)},"recordseq");return A(),{SES_DELETE:-1,SES_COMMON:0,SES_ADD:1,editdistance:e(function(){return h},"editdistance"),getlcs:e(function(){return _},"getlcs"),getses:e(function(){return w},"getses"),compose:e(function(){var V,q,G,re,ae,de,we,xe;for(V=u-r,q=r+u+3,G={},we=0;we<q;++we)G[we]=-1,m[we]=-1;re=-1;do{for(++re,xe=-re;xe<=V-1;++xe)G[xe+d]=M(xe,G[xe-1+d]+1,G[xe+1+d]);for(xe=V+re;xe>=V+1;--xe)G[xe+d]=M(xe,G[xe-1+d]+1,G[xe+1+d]);G[V+d]=M(V,G[V-1+d]+1,G[V+1+d])}while(G[V+d]!==u);for(h=V+2*re,ae=m[V+d],de=[];ae!==-1;)de[de.length]=new x(y[ae].x,y[ae].y,null),ae=y[ae].k;ee(de)},"compose")}}}),a3=Ge((a,i)=>{var f=o3();function g(u,p){var h=new f(u,p);h.compose();for(var d=h.getses(),m,y,w=u.length-1,_=p.length-1,S=d.length-1;S>=0;--S)d[S].t===h.SES_COMMON?(y?(y.chain={file1index:w,file2index:_,chain:null},y=y.chain):(m={file1index:w,file2index:_,chain:null},y=m),w--,_--):d[S].t===h.SES_DELETE?w--:d[S].t===h.SES_ADD&&_--;var T={file1index:-1,file2index:-1,chain:null};return y?(y.chain=T,m):T}l(g,"JG"),e(g,"longestCommonSubsequence");function o(u,p){for(var h=[],d=u.length,m=p.length,y=g(u,p);y!==null;y=y.chain){var w=d-y.file1index-1,_=m-y.file2index-1;d=y.file1index,m=y.file2index,(w||_)&&h.push({file1:[d+1,w],file2:[m+1,_]})}return h.reverse(),h}l(o,"IP"),e(o,"diffIndices");function n(u,p,h){var d,m=o(p,u),y=o(p,h),w=[];function _(J,ue){w.push([J.file1[0],ue,J.file1[1],J.file2[0],J.file2[1]])}for(l(_,"f"),e(_,"addHunk"),d=0;d<m.length;d++)_(m[d],0);for(d=0;d<y.length;d++)_(y[d],2);w.sort(function(J,ue){return J[0]-ue[0]});var S=[],T=0;function O(J){J>T&&(S.push([1,T,J-T]),T=J)}l(O,"d"),e(O,"copyCommon");for(var E=0;E<w.length;E++){for(var P=E,A=w[E],x=A[0],U=x+A[2];E<w.length-1;){var M=w[E+1],ee=M[0];if(ee>U)break;U=Math.max(U,ee+M[2]),E++}if(O(x),P==E)A[4]>0&&S.push([A[1],A[3],A[4]]);else{var V={0:[u.length,-1,p.length,-1],2:[h.length,-1,p.length,-1]};for(d=P;d<=E;d++){A=w[d];var q=A[1],G=V[q],re=A[0],ae=re+A[2],de=A[3],we=de+A[4];G[0]=Math.min(de,G[0]),G[1]=Math.max(we,G[1]),G[2]=Math.min(re,G[2]),G[3]=Math.max(ae,G[3])}var xe=V[0][0]+(x-V[0][2]),Pe=V[0][1]+(U-V[0][3]),se=V[2][0]+(x-V[2][2]),Te=V[2][1]+(U-V[2][3]);S.push([-1,xe,Pe-xe,x,U-x,se,Te-se])}T=U}return O(p.length),S}l(n,"ZG"),e(n,"diff3MergeIndices");function r(u,p,h){var d=[],m=[u,p,h],y=n(u,p,h),w=[];function _(){w.length&&d.push({ok:w}),w=[]}l(_,"f"),e(_,"flushOk");function S(A){for(var x=0;x<A.length;x++)w.push(A[x])}l(S,"h"),e(S,"pushOk");function T(A){if(A[2]!=A[6])return!0;for(var x=A[1],U=A[5],M=0;M<A[2];M++)if(u[M+x]!=h[M+U])return!0;return!1}l(T,"c"),e(T,"isTrueConflict");for(var O=0;O<y.length;O++){var E=y[O],P=E[0];P==-1?T(E)?(_(),d.push({conflict:{a:u.slice(E[1],E[1]+E[2]),aIndex:E[1],o:p.slice(E[3],E[3]+E[4]),oIndex:E[3],b:h.slice(E[5],E[5]+E[6]),bIndex:E[5]}})):S(m[0].slice(E[1],E[1]+E[2])):S(m[P].slice(E[1],E[1]+E[2]))}return _(),d}l(r,"QG"),e(r,"diff3Merge"),i.exports=r}),hr=Ge(a=>{"use strict";var no,io,oo,ao,Wa,an,za,Ha,so,lo,fo,uo,co,ho,po,go,qa,Jt,yo,Ga,Va,Ei,mo,wo,bo,vo,_o,Eo,So,Ao,Ro,Oo,ko,To,Fo,Bo,xo,Io,Po,jo,Co,Lo,No,Do,Uo,Mo,$o,Gn,pr,Ka,Ja,Ya,Za,Qa,Xa,es,ts,rs,ns,is,Wo,Vn;Object.defineProperty(a,"__esModule",{value:!0});function i(B){return B&&typeof B=="object"&&"default"in B?B.default:B}l(i,"fi"),e(i,"_interopDefault");var f=i(sN()),g=i(zN()),o=HN(),n=i(qN()),r=i(e3()),u=i(t3()),p=i(r3()),h=i(n3()),d=i(i3()),m=i(a3()),y=(no=class extends Error{constructor(b){super(b),this.caller=""}toJSON(){return{code:this.code,data:this.data,caller:this.caller,message:this.message,stack:this.stack}}fromJSON(b){let k=new no(b.message);return k.code=b.code,k.data=b.data,k.caller=b.caller,k.stack=b.stack,k}get isIsomorphicGitError(){return!0}},l(no,"Hh"),no);e(y,"BaseError");var w=y,_=(io=class extends w{constructor(b){super(`Modifying the index is not possible because you have unmerged files: ${b.toString}. Fix them up in the work tree, and then use 'git add/rm as appropriate to mark resolution and make a commit.`),this.code=this.name=io.code,this.data={filepaths:b}}},l(io,"Wh"),io);e(_,"UnmergedPathsError");var S=_;S.code="UnmergedPathsError";var T=(oo=class extends w{constructor(b){super(`An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: ${b}`),this.code=this.name=oo.code,this.data={message:b}}},l(oo,"qh"),oo);e(T,"InternalError");var O=T;O.code="InternalError";var E=(ao=class extends w{constructor(b){super(`The filepath "${b}" contains unsafe character sequences`),this.code=this.name=ao.code,this.data={filepath:b}}},l(ao,"zh"),ao);e(E,"UnsafeFilepathError");var P=E;P.code="UnsafeFilepathError";var A=(Wa=class{constructor(b){this.buffer=b,this._start=0}eof(){return this._start>=this.buffer.length}tell(){return this._start}seek(b){this._start=b}slice(b){let k=this.buffer.slice(this._start,this._start+b);return this._start+=b,k}toString(b,k){let F=this.buffer.toString(b,this._start,this._start+k);return this._start+=k,F}write(b,k,F){let L=this.buffer.write(b,this._start,k,F);return this._start+=k,L}copy(b,k,F){let L=b.copy(this.buffer,this._start,k,F);return this._start+=L,L}readUInt8(){let b=this.buffer.readUInt8(this._start);return this._start+=1,b}writeUInt8(b){let k=this.buffer.writeUInt8(b,this._start);return this._start+=1,k}readUInt16BE(){let b=this.buffer.readUInt16BE(this._start);return this._start+=2,b}writeUInt16BE(b){let k=this.buffer.writeUInt16BE(b,this._start);return this._start+=2,k}readUInt32BE(){let b=this.buffer.readUInt32BE(this._start);return this._start+=4,b}writeUInt32BE(b){let k=this.buffer.writeUInt32BE(b,this._start);return this._start+=4,k}},l(Wa,"bv"),Wa);e(A,"BufferCursor");var x=A;function U(B,b){return-(B<b)||+(B>b)}l(U,"Fd"),e(U,"compareStrings");function M(B,b){return U(B.path,b.path)}l(M,"nI"),e(M,"comparePath");function ee(B){let b=B>0?B>>12:0;b!==4&&b!==8&&b!==10&&b!==14&&(b=8);let k=B&511;return k&73?k=493:k=420,b!==8&&(k=0),(b<<12)+k}l(ee,"iI"),e(ee,"normalizeMode");var V=2**32;function q(B,b,k,F){if(B!==void 0&&b!==void 0)return[B,b];k===void 0&&(k=F.valueOf());let L=Math.floor(k/1e3),$=(k-L*1e3)*1e6;return[L,$]}l(q,"CP"),e(q,"SecondsNanoseconds");function G(B){let[b,k]=q(B.ctimeSeconds,B.ctimeNanoseconds,B.ctimeMs,B.ctime),[F,L]=q(B.mtimeSeconds,B.mtimeNanoseconds,B.mtimeMs,B.mtime);return{ctimeSeconds:b%V,ctimeNanoseconds:k%V,mtimeSeconds:F%V,mtimeNanoseconds:L%V,dev:B.dev%V,ino:B.ino%V,mode:ee(B.mode%V),uid:B.uid%V,gid:B.gid%V,size:B.size>-1?B.size%V:0}}l(G,"Bs"),e(G,"normalizeStats");function re(B){let b="";for(let k of new Uint8Array(B))k<16&&(b+="0"),b+=k.toString(16);return b}l(re,"nY"),e(re,"toHex");var ae=null;async function de(B){return ae===null&&(ae=await Pe()),ae?xe(B):we(B)}l(de,"li"),e(de,"shasum");function we(B){return new g().update(B).digest("hex")}l(we,"iY"),e(we,"shasumSync");async function xe(B){let b=await crypto.subtle.digest("SHA-1",B);return re(b)}l(xe,"oI"),e(xe,"subtleSHA1");async function Pe(){try{return await xe(new Uint8Array([]))==="da39a3ee5e6b4b0d3255bfef95601890afd80709"}catch{}return!1}l(Pe,"oY"),e(Pe,"testSubtleSHA1");function se(B){return{assumeValid:!!(B&32768),extended:!!(B&16384),stage:(B&12288)>>12,nameLength:B&4095}}l(se,"aY"),e(se,"parseCacheEntryFlags");function Te(B){let b=B.flags;return b.extended=!1,b.nameLength=Math.min(Buffer.from(B.path).length,4095),(b.assumeValid?32768:0)+(b.extended?16384:0)+((b.stage&3)<<12)+(b.nameLength&4095)}l(Te,"sY"),e(Te,"renderCacheEntryFlags");var J=(an=class{constructor(b,k){this._dirty=!1,this._unmergedPaths=k||new Set,this._entries=b||new Map}_addEntry(b){if(b.flags.stage===0)b.stages=[b],this._entries.set(b.path,b),this._unmergedPaths.delete(b.path);else{let k=this._entries.get(b.path);k||(this._entries.set(b.path,b),k=b),k.stages[b.flags.stage]=b,this._unmergedPaths.add(b.path)}}static async from(b){if(Buffer.isBuffer(b))return an.fromBuffer(b);if(b===null)return new an(null);throw new O("invalid type passed to GitIndex.from")}static async fromBuffer(b){if(b.length===0)throw new O("Index file is empty (.git/index)");let k=new an,F=new x(b),L=F.toString("utf8",4);if(L!=="DIRC")throw new O(`Invalid dircache magic file number: ${L}`);let $=await de(b.slice(0,-20)),K=b.slice(-20).toString("hex");if(K!==$)throw new O(`Invalid checksum in GitIndex buffer: expected ${K} but saw ${$}`);let ne=F.readUInt32BE();if(ne!==2)throw new O(`Unsupported dircache version: ${ne}`);let _e=F.readUInt32BE(),ce=0;for(;!F.eof()&&ce<_e;){let he={};he.ctimeSeconds=F.readUInt32BE(),he.ctimeNanoseconds=F.readUInt32BE(),he.mtimeSeconds=F.readUInt32BE(),he.mtimeNanoseconds=F.readUInt32BE(),he.dev=F.readUInt32BE(),he.ino=F.readUInt32BE(),he.mode=F.readUInt32BE(),he.uid=F.readUInt32BE(),he.gid=F.readUInt32BE(),he.size=F.readUInt32BE(),he.oid=F.slice(20).toString("hex");let Be=F.readUInt16BE();he.flags=se(Be);let je=b.indexOf(0,F.tell()+1)-F.tell();if(je<1)throw new O(`Got a path length of: ${je}`);if(he.path=F.toString("utf8",je),he.path.includes("..\\")||he.path.includes("../"))throw new P(he.path);let Me=8-(F.tell()-12)%8;for(Me===0&&(Me=8);Me--;){let ze=F.readUInt8();if(ze!==0)throw new O(`Expected 1-8 null characters but got '${ze}' after ${he.path}`);if(F.eof())throw new O("Unexpected end of file")}he.stages=[],k._addEntry(he),ce++}return k}get unmergedPaths(){return[...this._unmergedPaths]}get entries(){return[...this._entries.values()].sort(M)}get entriesMap(){return this._entries}get entriesFlat(){return[...this.entries].flatMap(b=>b.stages.length>1?b.stages.filter(k=>k):b)}*[Symbol.iterator](){for(let b of this.entries)yield b}insert({filepath:b,stats:k,oid:F,stage:L=0}){k||(k={ctimeSeconds:0,ctimeNanoseconds:0,mtimeSeconds:0,mtimeNanoseconds:0,dev:0,ino:0,mode:0,uid:0,gid:0,size:0}),k=G(k);let $=Buffer.from(b),K={ctimeSeconds:k.ctimeSeconds,ctimeNanoseconds:k.ctimeNanoseconds,mtimeSeconds:k.mtimeSeconds,mtimeNanoseconds:k.mtimeNanoseconds,dev:k.dev,ino:k.ino,mode:k.mode||33188,uid:k.uid,gid:k.gid,size:k.size,path:b,oid:F,flags:{assumeValid:!1,extended:!1,stage:L,nameLength:$.length<4095?$.length:4095},stages:[]};this._addEntry(K),this._dirty=!0}delete({filepath:b}){if(this._entries.has(b))this._entries.delete(b);else for(let k of this._entries.keys())k.startsWith(b+"/")&&this._entries.delete(k);this._unmergedPaths.has(b)&&this._unmergedPaths.delete(b),this._dirty=!0}clear(){this._entries.clear(),this._dirty=!0}has({filepath:b}){return this._entries.has(b)}render(){return this.entries.map(b=>`${b.mode.toString(8)} ${b.oid} ${b.path}`).join(`
|
|
24
|
-
`)}static async _entryToBuffer(b){let k=Buffer.from(b.path),F=Math.ceil((62+k.length+1)/8)*8,L=Buffer.alloc(F),$=new x(L),K=G(b);return $.writeUInt32BE(K.ctimeSeconds),$.writeUInt32BE(K.ctimeNanoseconds),$.writeUInt32BE(K.mtimeSeconds),$.writeUInt32BE(K.mtimeNanoseconds),$.writeUInt32BE(K.dev),$.writeUInt32BE(K.ino),$.writeUInt32BE(K.mode),$.writeUInt32BE(K.uid),$.writeUInt32BE(K.gid),$.writeUInt32BE(K.size),$.write(b.oid,20,"hex"),$.writeUInt16BE(Te(b)),$.write(b.path,k.length,"utf8"),L}async toObject(){let b=Buffer.alloc(12),k=new x(b);k.write("DIRC",4,"utf8"),k.writeUInt32BE(2),k.writeUInt32BE(this.entriesFlat.length);let F=[];for(let ne of this.entries)if(F.push(an._entryToBuffer(ne)),ne.stages.length>1)for(let _e of ne.stages)_e&&_e!==ne&&F.push(an._entryToBuffer(_e));F=await Promise.all(F);let L=Buffer.concat(F),$=Buffer.concat([b,L]),K=await de($);return Buffer.concat([$,Buffer.from(K,"hex")])}},l(an,"eo"),an);e(J,"GitIndex");var ue=J;function te(B,b,k=!0,F=!0){let L=G(B),$=G(b);return k&&L.mode!==$.mode||L.mtimeSeconds!==$.mtimeSeconds||L.ctimeSeconds!==$.ctimeSeconds||L.uid!==$.uid||L.gid!==$.gid||F&&L.ino!==$.ino||L.size!==$.size}l(te,"kh"),e(te,"compareStats");var X=null,ye=Symbol("IndexCache");function Re(){return{map:new Map,stats:new Map}}l(Re,"lY"),e(Re,"createCache");async function De(B,b,k){let[F,L]=await Promise.all([B.lstat(b),B.read(b)]),$=await ue.from(L);k.map.set(b,$),k.stats.set(b,F)}l(De,"fY"),e(De,"updateCachedIndexFile");async function Y(B,b,k){let F=k.stats.get(b);if(F===void 0)return!0;if(F===null)return!1;let L=await B.lstat(b);return L===null?!1:te(F,L)}l(Y,"uY"),e(Y,"isIndexStale");var H=(za=class{static async acquire({fs:b,gitdir:k,cache:F,allowUnmerged:L=!0},$){F[ye]||(F[ye]=Re());let K=`${k}/index`;X===null&&(X=new f({maxPending:1/0}));let ne,_e=[];return await X.acquire(K,async()=>{let ce=F[ye];await Y(b,K,ce)&&await De(b,K,ce);let he=ce.map.get(K);if(_e=he.unmergedPaths,_e.length&&!L)throw new S(_e);if(ne=await $(he),he._dirty){let Be=await he.toObject();await b.write(K,Be),ce.stats.set(K,await b.lstat(K)),he._dirty=!1}}),ne}},l(za,"_v"),za);e(H,"GitIndexManager");var Q=H;function fe(B){let b=Math.max(B.lastIndexOf("/"),B.lastIndexOf("\\"));return b>-1&&(B=B.slice(b+1)),B}l(fe,"Bh"),e(fe,"basename");function ve(B){let b=Math.max(B.lastIndexOf("/"),B.lastIndexOf("\\"));return b===-1?".":b===0?"/":B.slice(0,b)}l(ve,"Cs"),e(ve,"dirname");function N(B){let b=new Map,k=e(function(L){if(!b.has(L)){let $={type:"tree",fullpath:L,basename:fe(L),metadata:{},children:[]};b.set(L,$),$.parent=k(ve(L)),$.parent&&$.parent!==$&&$.parent.children.push($)}return b.get(L)},"mkdir"),F=e(function(L,$){if(!b.has(L)){let K={type:"blob",fullpath:L,basename:fe(L),metadata:$,parent:k(ve(L)),children:[]};K.parent&&K.parent.children.push(K),b.set(L,K)}return b.get(L)},"mkfile");k(".");for(let L of B)F(L.path,L);return b}l(N,"aI"),e(N,"flatFileListToDirectoryStructure");function I(B){switch(B){case 16384:return"tree";case 33188:return"blob";case 33261:return"blob";case 40960:return"blob";case 57344:return"commit"}throw new O(`Unexpected GitTree entry mode: ${B.toString(8)}`)}l(I,"cY"),e(I,"mode2type");var D=(Ha=class{constructor({fs:b,gitdir:k,cache:F}){var K;var L;this.treePromise=Q.acquire({fs:b,gitdir:k,cache:F},async function(ne){return N(ne.entries)});let $=this;this.ConstructEntry=(L=(K=class{constructor(_e){this._fullpath=_e,this._type=!1,this._mode=!1,this._stat=!1,this._oid=!1}async type(){return $.type(this)}async mode(){return $.mode(this)}async stat(){return $.stat(this)}async content(){return $.content(this)}async oid(){return $.oid(this)}},l(K,"s"),K),e(L,"StageEntry"),L)}async readdir(b){let k=b._fullpath,F=(await this.treePromise).get(k);if(!F||F.type==="blob")return null;if(F.type!=="tree")throw new Error(`ENOTDIR: not a directory, scandir '${k}'`);let L=F.children.map($=>$.fullpath);return L.sort(U),L}async type(b){return b._type===!1&&await b.stat(),b._type}async mode(b){return b._mode===!1&&await b.stat(),b._mode}async stat(b){if(b._stat===!1){let k=(await this.treePromise).get(b._fullpath);if(!k)throw new Error(`ENOENT: no such file or directory, lstat '${b._fullpath}'`);let F=k.type==="tree"?{}:G(k.metadata);b._type=k.type==="tree"?"tree":I(F.mode),b._mode=F.mode,k.type==="tree"?b._stat=void 0:b._stat=F}return b._stat}async content(b){}async oid(b){if(b._oid===!1){let k=(await this.treePromise).get(b._fullpath);b._oid=k.metadata.oid}return b._oid}},l(Ha,"Ev"),Ha);e(D,"GitWalkerIndex");var z=D,Ee=Symbol("GitWalkSymbol");function Oe(){let B=Object.create(null);return Object.defineProperty(B,Ee,{value:e(function({fs:b,gitdir:k,cache:F}){return new z({fs:b,gitdir:k,cache:F})},"value")}),Object.freeze(B),B}l(Oe,"sa"),e(Oe,"STAGE");var be=(so=class extends w{constructor(b){super(`Could not find ${b}.`),this.code=this.name=so.code,this.data={what:b}}},l(so,"Vh"),so);e(be,"NotFoundError");var ge=be;ge.code="NotFoundError";var Ne=(lo=class extends w{constructor(b,k,F,L){super(`Object ${b} ${L?`at ${L}`:""}was anticipated to be a ${F} but it is a ${k}.`),this.code=this.name=lo.code,this.data={oid:b,actual:k,expected:F,filepath:L}}},l(lo,"Gh"),lo);e(Ne,"ObjectTypeError");var Ie=Ne;Ie.code="ObjectTypeError";var ke=(fo=class extends w{constructor(b){super(`Expected a 40-char hex object id but saw "${b}".`),this.code=this.name=fo.code,this.data={value:b}}},l(fo,"Yh"),fo);e(ke,"InvalidOidError");var Ce=ke;Ce.code="InvalidOidError";var $e=(uo=class extends w{constructor(b){super(`Could not find a fetch refspec for remote "${b}". Make sure the config file has an entry like the following:
|
|
25
|
-
[remote "${b}"]
|
|
26
|
-
fetch = +refs/heads/*:refs/remotes/origin/*
|
|
27
|
-
`),this.code=this.name=uo.code,this.data={remote:b}}},l(uo,"Kh"),uo);e($e,"NoRefspecError");var Ke=$e;Ke.code="NoRefspecError";var t=(co=class{constructor(b){if(this.refs=new Map,this.parsedConfig=[],b){let k=null;this.parsedConfig=b.trim().split(`
|
|
28
|
-
`).map(F=>{if(/^\s*#/.test(F))return{line:F,comment:!0};let L=F.indexOf(" ");if(F.startsWith("^")){let $=F.slice(1);return this.refs.set(k+"^{}",$),{line:F,ref:k,peeled:$}}else{let $=F.slice(0,L);return k=F.slice(L+1),this.refs.set(k,$),{line:F,ref:k,oid:$}}})}return this}static from(b){return new co(b)}delete(b){this.parsedConfig=this.parsedConfig.filter(k=>k.ref!==b),this.refs.delete(b)}toString(){return this.parsedConfig.map(({line:b})=>b).join(`
|
|
29
|
-
`)+`
|
|
30
|
-
`}},l(co,"Xh"),co);e(t,"GitPackedRefs");var s=t,c=(ho=class{constructor({remotePath:b,localPath:k,force:F,matchPrefix:L}){Object.assign(this,{remotePath:b,localPath:k,force:F,matchPrefix:L})}static from(b){let[k,F,L,$,K]=b.match(/^(\+?)(.*?)(\*?):(.*?)(\*?)$/).slice(1),ne=k==="+",_e=L==="*";if(_e!==(K==="*"))throw new O("Invalid refspec");return new ho({remotePath:F,localPath:$,force:ne,matchPrefix:_e})}translate(b){if(this.matchPrefix){if(b.startsWith(this.remotePath))return this.localPath+b.replace(this.remotePath,"")}else if(b===this.remotePath)return this.localPath;return null}reverseTranslate(b){if(this.matchPrefix){if(b.startsWith(this.localPath))return this.remotePath+b.replace(this.localPath,"")}else if(b===this.localPath)return this.remotePath;return null}},l(ho,"Jh"),ho);e(c,"GitRefSpec");var v=c,R=(po=class{constructor(b=[]){this.rules=b}static from(b){let k=[];for(let F of b)k.push(v.from(F));return new po(k)}add(b){let k=v.from(b);this.rules.push(k)}translate(b){let k=[];for(let F of this.rules)for(let L of b){let $=F.translate(L);$&&k.push([L,$])}return k}translateOne(b){let k=null;for(let F of this.rules){let L=F.translate(b);L&&(k=L)}return k}localNamespaces(){return this.rules.filter(b=>b.matchPrefix).map(b=>b.localPath.replace(/\/$/,""))}},l(po,"Zh"),po);e(R,"GitRefSpecSet");var C=R;function j(B,b){let k=B.replace(/\^\{\}$/,""),F=b.replace(/\^\{\}$/,""),L=-(k<F)||+(k>F);return L===0?B.endsWith("^{}")?1:-1:L}l(j,"hY"),e(j,"compareRefNames");var Z=e(B=>{if(typeof B=="number")return B;B=B.toLowerCase();let b=parseInt(B);return B.endsWith("k")&&(b*=1024),B.endsWith("m")&&(b*=1024*1024),B.endsWith("g")&&(b*=1024*1024*1024),b},"num"),oe=e(B=>{if(typeof B=="boolean")return B;if(B=B.trim().toLowerCase(),B==="true"||B==="yes"||B==="on")return!0;if(B==="false"||B==="no"||B==="off")return!1;throw Error(`Expected 'true', 'false', 'yes', 'no', 'on', or 'off', but got ${B}`)},"bool"),Ae={core:{filemode:oe,bare:oe,logallrefupdates:oe,symlinks:oe,ignorecase:oe,bigFileThreshold:Z}},le=/^\[([A-Za-z0-9-.]+)(?: "(.*)")?\]$/,Fe=/^[A-Za-z0-9-.]+$/,ie=/^([A-Za-z][A-Za-z-]*)(?: *= *(.*))?$/,Je=/^[A-Za-z][A-Za-z-]*$/,dt=/^(.*?)( *[#;].*)$/,W=e(B=>{let b=le.exec(B);if(b!=null){let[k,F]=b.slice(1);return[k,F]}return null},"extractSectionLine"),qe=e(B=>{let b=ie.exec(B);if(b!=null){let[k,F="true"]=b.slice(1),L=Ve(F),$=Le(L);return[k,$]}return null},"extractVariableLine"),Ve=e(B=>{let b=dt.exec(B);if(b==null)return B;let[k,F]=b.slice(1);return pe(k)&&pe(F)?`${k}${F}`:k},"removeComments"),pe=e(B=>(B.match(/(?:^|[^\\])"/g)||[]).length%2!==0,"hasOddNumberOfQuotes"),Le=e(B=>B.split("").reduce((b,k,F,L)=>{let $=k==='"'&&L[F-1]!=="\\",K=k==="\\"&&L[F+1]==='"';return $||K?b:b+k},""),"removeQuotes"),He=e(B=>B!=null?B.toLowerCase():null,"lower"),me=e((B,b,k)=>[He(B),b,He(k)].filter(F=>F!=null).join("."),"getPath"),Se=e(B=>{let b=B.split("."),k=b.shift(),F=b.pop(),L=b.length?b.join("."):void 0;return{section:k,subsection:L,name:F,path:me(k,L,F),sectionPath:me(k,L,null),isSection:!!k}},"normalizePath"),We=e((B,b)=>B.reduce((k,F,L)=>b(F)?L:k,-1),"findLastIndex"),Qe=(go=class{constructor(b){let k=null,F=null;this.parsedConfig=b?b.split(`
|
|
31
|
-
`).map(L=>{let $=null,K=null,ne=L.trim(),_e=W(ne),ce=_e!=null;if(ce)[k,F]=_e;else{let Be=qe(ne);Be!=null&&([$,K]=Be)}let he=me(k,F,$);return{line:L,isSection:ce,section:k,subsection:F,name:$,value:K,path:he}}):[]}static from(b){return new go(b)}async get(b,k=!1){let F=Se(b).path,L=this.parsedConfig.filter($=>$.path===F).map(({section:$,name:K,value:ne})=>{let _e=Ae[$]&&Ae[$][K];return _e?_e(ne):ne});return k?L:L.pop()}async getall(b){return this.get(b,!0)}async getSubsections(b){return this.parsedConfig.filter(k=>k.isSection&&k.section===b).map(k=>k.subsection)}async deleteSection(b,k){this.parsedConfig=this.parsedConfig.filter(F=>!(F.section===b&&F.subsection===k))}async append(b,k){return this.set(b,k,!0)}async set(b,k,F=!1){let{section:L,subsection:$,name:K,path:ne,sectionPath:_e,isSection:ce}=Se(b),he=We(this.parsedConfig,Be=>Be.path===ne);if(k==null)he!==-1&&this.parsedConfig.splice(he,1);else if(he!==-1){let Be=this.parsedConfig[he],je=Object.assign({},Be,{name:K,value:k,modified:!0});F?this.parsedConfig.splice(he+1,0,je):this.parsedConfig[he]=je}else{let Be=this.parsedConfig.findIndex(Me=>Me.path===_e),je={section:L,subsection:$,name:K,value:k,modified:!0,path:ne};if(Fe.test(L)&&Je.test(K))if(Be>=0)this.parsedConfig.splice(Be+1,0,je);else{let Me={isSection:ce,section:L,subsection:$,modified:!0,path:_e};this.parsedConfig.push(Me,je)}}}toString(){return this.parsedConfig.map(({line:b,section:k,subsection:F,name:L,value:$,modified:K=!1})=>K?L!=null&&$!=null?typeof $=="string"&&/[#;]/.test($)?` ${L} = "${$}"`:` ${L} = ${$}`:F!=null?`[${k} "${F}"]`:`[${k}]`:b).join(`
|
|
32
|
-
`)}},l(go,"Qh"),go);e(Qe,"GitConfig");var lt=Qe,bt=(qa=class{static async get({fs:b,gitdir:k}){let F=await b.read(`${k}/config`,{encoding:"utf8"});return lt.from(F)}static async save({fs:b,gitdir:k,config:F}){await b.write(`${k}/config`,F.toString(),{encoding:"utf8"})}},l(qa,"Sv"),qa);e(bt,"GitConfigManager");var ht=bt,Ot=e(B=>[`${B}`,`refs/${B}`,`refs/tags/${B}`,`refs/heads/${B}`,`refs/remotes/${B}`,`refs/remotes/${B}/HEAD`],"refpaths"),zt=["config","description","index","shallow","commondir"],Wt;async function nr(B,b){return Wt===void 0&&(Wt=new f),Wt.acquire(B,b)}l(nr,"Qi"),e(nr,"acquireLock");var Ar=(Jt=class{static async updateRemoteRefs({fs:b,gitdir:k,remote:F,refs:L,symrefs:$,tags:K,refspecs:ne=void 0,prune:_e=!1,pruneTags:ce=!1}){for(let rt of L.values())if(!rt.match(/[0-9a-f]{40}/))throw new Ce(rt);let he=await ht.get({fs:b,gitdir:k});if(!ne){if(ne=await he.getall(`remote.${F}.fetch`),ne.length===0)throw new Ke(F);ne.unshift(`+HEAD:refs/remotes/${F}/HEAD`)}let Be=C.from(ne),je=new Map;if(ce){let rt=await Jt.listRefs({fs:b,gitdir:k,filepath:"refs/tags"});await Jt.deleteRefs({fs:b,gitdir:k,refs:rt.map(ot=>`refs/tags/${ot}`)})}if(K){for(let rt of L.keys())if(rt.startsWith("refs/tags")&&!rt.endsWith("^{}")&&!await Jt.exists({fs:b,gitdir:k,ref:rt})){let ot=L.get(rt);je.set(rt,ot)}}let Me=Be.translate([...L.keys()]);for(let[rt,ot]of Me){let it=L.get(rt);je.set(ot,it)}let ze=Be.translate([...$.keys()]);for(let[rt,ot]of ze){let it=$.get(rt),ft=Be.translateOne(it);ft&&je.set(ot,`ref: ${ft}`)}let Ye=[];if(_e){for(let rt of Be.localNamespaces()){let ot=(await Jt.listRefs({fs:b,gitdir:k,filepath:rt})).map(it=>`${rt}/${it}`);for(let it of ot)je.has(it)||Ye.push(it)}Ye.length>0&&await Jt.deleteRefs({fs:b,gitdir:k,refs:Ye})}for(let[rt,ot]of je)await nr(rt,async()=>b.write(o.join(k,rt),`${ot.trim()}
|
|
33
|
-
`,"utf8"));return{pruned:Ye}}static async writeRef({fs:b,gitdir:k,ref:F,value:L}){if(!L.match(/[0-9a-f]{40}/))throw new Ce(L);await nr(F,async()=>b.write(o.join(k,F),`${L.trim()}
|
|
34
|
-
`,"utf8"))}static async writeSymbolicRef({fs:b,gitdir:k,ref:F,value:L}){await nr(F,async()=>b.write(o.join(k,F),`ref: ${L.trim()}
|
|
35
|
-
`,"utf8"))}static async deleteRef({fs:b,gitdir:k,ref:F}){return Jt.deleteRefs({fs:b,gitdir:k,refs:[F]})}static async deleteRefs({fs:b,gitdir:k,refs:F}){await Promise.all(F.map(ne=>b.rm(o.join(k,ne))));let L=await nr("packed-refs",async()=>b.read(`${k}/packed-refs`,{encoding:"utf8"})),$=s.from(L),K=$.refs.size;for(let ne of F)$.refs.has(ne)&&$.delete(ne);$.refs.size<K&&(L=$.toString(),await nr("packed-refs",async()=>b.write(`${k}/packed-refs`,L,{encoding:"utf8"})))}static async resolve({fs:b,gitdir:k,ref:F,depth:L=void 0}){if(L!==void 0&&(L--,L===-1))return F;if(F.startsWith("ref: "))return F=F.slice(5),Jt.resolve({fs:b,gitdir:k,ref:F,depth:L});if(F.length===40&&/[0-9a-f]{40}/.test(F))return F;let $=await Jt.packedRefs({fs:b,gitdir:k}),K=Ot(F).filter(ne=>!zt.includes(ne));for(let ne of K){let _e=await nr(ne,async()=>await b.read(`${k}/${ne}`,{encoding:"utf8"})||$.get(ne));if(_e)return Jt.resolve({fs:b,gitdir:k,ref:_e.trim(),depth:L})}throw new ge(F)}static async exists({fs:b,gitdir:k,ref:F}){try{return await Jt.expand({fs:b,gitdir:k,ref:F}),!0}catch{return!1}}static async expand({fs:b,gitdir:k,ref:F}){if(F.length===40&&/[0-9a-f]{40}/.test(F))return F;let L=await Jt.packedRefs({fs:b,gitdir:k}),$=Ot(F);for(let K of $)if(await nr(K,async()=>b.exists(`${k}/${K}`))||L.has(K))return K;throw new ge(F)}static async expandAgainstMap({ref:b,map:k}){let F=Ot(b);for(let L of F)if(await k.has(L))return L;throw new ge(b)}static resolveAgainstMap({ref:b,fullref:k=b,depth:F=void 0,map:L}){if(F!==void 0&&(F--,F===-1))return{fullref:k,oid:b};if(b.startsWith("ref: "))return b=b.slice(5),Jt.resolveAgainstMap({ref:b,fullref:k,depth:F,map:L});if(b.length===40&&/[0-9a-f]{40}/.test(b))return{fullref:k,oid:b};let $=Ot(b);for(let K of $){let ne=L.get(K);if(ne)return Jt.resolveAgainstMap({ref:ne.trim(),fullref:K,depth:F,map:L})}throw new ge(b)}static async packedRefs({fs:b,gitdir:k}){let F=await nr("packed-refs",async()=>b.read(`${k}/packed-refs`,{encoding:"utf8"}));return s.from(F).refs}static async listRefs({fs:b,gitdir:k,filepath:F}){let L=Jt.packedRefs({fs:b,gitdir:k}),$=null;try{$=await b.readdirDeep(`${k}/${F}`),$=$.map(K=>K.replace(`${k}/${F}/`,""))}catch{$=[]}for(let K of(await L).keys())K.startsWith(F)&&(K=K.replace(F+"/",""),$.includes(K)||$.push(K));return $.sort(j),$}static async listBranches({fs:b,gitdir:k,remote:F}){return F?Jt.listRefs({fs:b,gitdir:k,filepath:`refs/remotes/${F}`}):Jt.listRefs({fs:b,gitdir:k,filepath:"refs/heads"})}static async listTags({fs:b,gitdir:k}){return(await Jt.listRefs({fs:b,gitdir:k,filepath:"refs/tags"})).filter(F=>!F.endsWith("^{}"))}},l(Jt,"It"),Jt);e(Ar,"GitRefManager");var et=Ar;function Xt(B,b){return U(Ft(B),Ft(b))}l(Xt,"RY"),e(Xt,"compareTreeEntryPath");function Ft(B){return B.mode==="040000"?B.path+"/":B.path}l(Ft,"MP"),e(Ft,"appendSlashIfDir");function Nt(B){switch(B){case"040000":return"tree";case"100644":return"blob";case"100755":return"blob";case"120000":return"blob";case"160000":return"commit"}throw new O(`Unexpected GitTree entry mode: ${B}`)}l(Nt,"sI"),e(Nt,"mode2type$1");function Ut(B){let b=[],k=0;for(;k<B.length;){let F=B.indexOf(32,k);if(F===-1)throw new O(`GitTree: Error parsing buffer at byte location ${k}: Could not find the next space character.`);let L=B.indexOf(0,k);if(L===-1)throw new O(`GitTree: Error parsing buffer at byte location ${k}: Could not find the next null character.`);let $=B.slice(k,F).toString("utf8");$==="40000"&&($="040000");let K=Nt($),ne=B.slice(F+1,L).toString("utf8");if(ne.includes("\\")||ne.includes("/"))throw new P(ne);let _e=B.slice(L+1,L+21).toString("hex");k=L+21,b.push({mode:$,path:ne,oid:_e,type:K})}return b}l(Ut,"TY"),e(Ut,"parseBuffer");function dr(B){if(typeof B=="number"&&(B=B.toString(8)),B.match(/^0?4.*/))return"040000";if(B.match(/^1006.*/))return"100644";if(B.match(/^1007.*/))return"100755";if(B.match(/^120.*/))return"120000";if(B.match(/^160.*/))return"160000";throw new O(`Could not understand file mode: ${B}`)}l(dr,"FY"),e(dr,"limitModeToAllowed");function el(B){return!B.oid&&B.sha&&(B.oid=B.sha),B.mode=dr(B.mode),B.type||(B.type=Nt(B.mode)),B}l(el,"xY"),e(el,"nudgeIntoShape");var E2=(yo=class{constructor(b){if(Buffer.isBuffer(b))this._entries=Ut(b);else if(Array.isArray(b))this._entries=b.map(el);else throw new O("invalid type passed to GitTree constructor");this._entries.sort(M)}static from(b){return new yo(b)}render(){return this._entries.map(b=>`${b.mode} ${b.type} ${b.oid} ${b.path}`).join(`
|
|
36
|
-
`)}toObject(){let b=[...this._entries];return b.sort(Xt),Buffer.concat(b.map(k=>{let F=Buffer.from(k.mode.replace(/^0/,"")),L=Buffer.from(" "),$=Buffer.from(k.path,"utf8"),K=Buffer.from([0]),ne=Buffer.from(k.oid,"hex");return Buffer.concat([F,L,$,K,ne])}))}entries(){return this._entries}*[Symbol.iterator](){for(let b of this._entries)yield b}},l(yo,"ed"),yo);e(E2,"GitTree");var Yr=E2,S2=(Ga=class{static wrap({type:b,object:k}){let F=`${b} ${k.length}\0`,L=F.length,$=L+k.length,K=new Uint8Array($);for(let ne=0;ne<L;ne++)K[ne]=F.charCodeAt(ne);return K.set(k,L),K}static unwrap(b){let k=b.indexOf(32),F=b.indexOf(0),L=b.slice(0,k).toString("utf8"),$=b.slice(k+1,F).toString("utf8"),K=b.length-(F+1);if(parseInt($)!==K)throw new O(`Length mismatch: expected ${$} bytes but got ${K} instead.`);return{type:L,object:Buffer.from(b.slice(F+1))}}},l(Ga,"Av"),Ga);e(S2,"GitObject");var ja=S2;async function $d({fs:B,gitdir:b,oid:k}){let F=`objects/${k.slice(0,2)}/${k.slice(2)}`,L=await B.read(`${b}/${F}`);return L?{object:L,format:"deflated",source:F}:null}l($d,"lI"),e($d,"readObjectLoose");function A2(B,b){let k=new x(B),F=Wd(k);if(F!==b.byteLength)throw new O(`applyDelta expected source buffer to be ${F} bytes but the provided buffer was ${b.length} bytes`);let L=Wd(k),$,K=Hd(k,b);if(K.byteLength===L)$=K;else{$=Buffer.alloc(L);let ne=new x($);for(ne.copy(K);!k.eof();)ne.copy(Hd(k,b));let _e=ne.tell();if(L!==_e)throw new O(`applyDelta expected target buffer to be ${L} bytes but the resulting buffer was ${_e} bytes`)}return $}l(A2,"OY"),e(A2,"applyDelta");function Wd(B){let b=0,k=0,F=null;do F=B.readUInt8(),b|=(F&127)<<k,k+=7;while(F&128);return b}l(Wd,"UP"),e(Wd,"readVarIntLE");function zd(B,b,k){let F=0,L=0;for(;k--;)b&1&&(F|=B.readUInt8()<<L),b>>=1,L+=8;return F}l(zd,"jP"),e(zd,"readCompactLE");function Hd(B,b){let k=B.readUInt8(),F=128,L=15,$=112;if(k&F){let K=zd(B,k&L,4),ne=zd(B,(k&$)>>4,3);return ne===0&&(ne=65536),b.slice(K,K+ne)}else return B.slice(k)}l(Hd,"HP"),e(Hd,"readOp");function R2(B){let b=[B];return{next(){return Promise.resolve({done:b.length===0,value:b.pop()})},return(){return b=[],{}},[Symbol.asyncIterator](){return this}}}l(R2,"PY"),e(R2,"fromValue");function qd(B){return B[Symbol.asyncIterator]?B[Symbol.asyncIterator]():B[Symbol.iterator]?B[Symbol.iterator]():B.next?B:R2(B)}l(qd,"fI"),e(qd,"getIterator");var O2=(Va=class{constructor(b){if(typeof Buffer>"u")throw new Error("Missing Buffer dependency");this.stream=qd(b),this.buffer=null,this.cursor=0,this.undoCursor=0,this.started=!1,this._ended=!1,this._discardedBytes=0}eof(){return this._ended&&this.cursor===this.buffer.length}tell(){return this._discardedBytes+this.cursor}async byte(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(1),this.buffer[this.undoCursor]}async chunk(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(this.buffer.length),this.buffer.slice(this.undoCursor,this.cursor)}async read(b){if(!this.eof())return this.started||await this._init(),this.cursor+b>this.buffer.length&&(this._trim(),await this._accumulate(b)),this._moveCursor(b),this.buffer.slice(this.undoCursor,this.cursor)}async skip(b){this.eof()||(this.started||await this._init(),this.cursor+b>this.buffer.length&&(this._trim(),await this._accumulate(b)),this._moveCursor(b))}async undo(){this.cursor=this.undoCursor}async _next(){this.started=!0;let{done:b,value:k}=await this.stream.next();return b&&(this._ended=!0,!k)?Buffer.alloc(0):(k&&(k=Buffer.from(k)),k)}_trim(){this.buffer=this.buffer.slice(this.undoCursor),this.cursor-=this.undoCursor,this._discardedBytes+=this.undoCursor,this.undoCursor=0}_moveCursor(b){this.undoCursor=this.cursor,this.cursor+=b,this.cursor>this.buffer.length&&(this.cursor=this.buffer.length)}async _accumulate(b){if(this._ended)return;let k=[this.buffer];for(;this.cursor+b>T2(k);){let F=await this._next();if(this._ended)break;k.push(F)}this.buffer=Buffer.concat(k)}async _loadnext(){this._discardedBytes+=this.buffer.length,this.undoCursor=0,this.cursor=0,this.buffer=await this._next()}async _init(){this.buffer=await this._next()}},l(Va,"Rv"),Va);e(O2,"StreamReader");var k2=O2;function T2(B){return B.reduce((b,k)=>b+k.length,0)}l(T2,"IY"),e(T2,"lengthBuffers");async function F2(B,b){let k=new k2(B),F=await k.read(4);if(F=F.toString("utf8"),F!=="PACK")throw new O(`Invalid PACK header '${F}'`);let L=await k.read(4);if(L=L.readUInt32BE(0),L!==2)throw new O(`Invalid packfile version: ${L}`);let $=await k.read(4);if($=$.readUInt32BE(0),!($<1))for(;!k.eof()&&$--;){let K=k.tell(),{type:ne,length:_e,ofs:ce,reference:he}=await B2(k),Be=new r.Inflate;for(;!Be.result;){let je=await k.chunk();if(!je)break;if(Be.push(je,!1),Be.err)throw new O(`Pako error: ${Be.msg}`);if(Be.result){if(Be.result.length!==_e)throw new O("Inflated object size is different from that stated in packfile.");await k.undo(),await k.read(je.length-Be.strm.avail_in);let Me=k.tell();await b({data:Be.result,type:ne,num:$,offset:K,end:Me,reference:he,ofs:ce})}}}}l(F2,"kY"),e(F2,"listpack");async function B2(B){let b=await B.byte(),k=b>>4&7,F=b&15;if(b&128){let K=4;do b=await B.byte(),F|=(b&127)<<K,K+=7;while(b&128)}let L,$;if(k===6){let K=0;L=0;let ne=[];do b=await B.byte(),L|=(b&127)<<K,K+=7,ne.push(b);while(b&128);$=Buffer.from(ne)}return k===7&&($=await B.read(20)),{type:k,length:F,ofs:L,reference:$}}l(B2,"BY"),e(B2,"parseHeader");var Gd=!1;async function Vd(B){return Gd===null&&(Gd=I2()),Gd?x2(B):r.inflate(B)}l(Vd,"uI"),e(Vd,"inflate");async function x2(B){let b=new DecompressionStream("deflate"),k=new Blob([B]).stream().pipeThrough(b);return new Uint8Array(await new Response(k).arrayBuffer())}l(x2,"CY"),e(x2,"browserInflate");function I2(){try{if(new DecompressionStream("deflate"))return!0}catch{}return!1}l(I2,"LY"),e(I2,"testDecompressionStream");function P2(B){let b=[],k=0,F=0;do{k=B.readUInt8();let L=k&127;b.push(L),F=k&128}while(F);return b.reduce((L,$)=>L+1<<7|$,-1)}l(P2,"NY"),e(P2,"decodeVarInt");function j2(B,b){let k=b,F=4,L=null;do L=B.readUInt8(),k|=(L&127)<<F,F+=7;while(L&128);return k}l(j2,"DY"),e(j2,"otherVarIntDecode");var C2=(Ei=class{constructor(b){Object.assign(this,b),this.offsetCache={}}static async fromIdx({idx:b,getExternalRefDelta:k}){let F=new x(b);if(F.slice(4).toString("hex")!=="ff744f63")return;let L=F.readUInt32BE();if(L!==2)throw new O(`Unable to read version ${L} packfile IDX. (Only version 2 supported)`);if(b.byteLength>2048*1024*1024)throw new O("To keep implementation simple, I haven't implemented the layer 5 feature needed to support packfiles > 2GB in size.");F.seek(F.tell()+4*255);let $=F.readUInt32BE(),K=[];for(let ce=0;ce<$;ce++){let he=F.slice(20).toString("hex");K[ce]=he}F.seek(F.tell()+4*$);let ne=new Map;for(let ce=0;ce<$;ce++)ne.set(K[ce],F.readUInt32BE());let _e=F.slice(20).toString("hex");return new Ei({hashes:K,crcs:{},offsets:ne,packfileSha:_e,getExternalRefDelta:k})}static async fromPack({pack:b,getExternalRefDelta:k,onProgress:F}){let L={1:"commit",2:"tree",3:"blob",4:"tag",6:"ofs-delta",7:"ref-delta"},$={},K=b.slice(-20).toString("hex"),ne=[],_e={},ce=new Map,he=null,Be=null;await F2([b],async({data:rt,type:ot,reference:it,offset:ft,num:gt})=>{he===null&&(he=gt);let yt=Math.floor((he-gt)*100/he);yt!==Be&&F&&await F({phase:"Receiving objects",loaded:he-gt,total:he}),Be=yt,ot=L[ot],["commit","tree","blob","tag"].includes(ot)?$[ft]={type:ot,offset:ft}:ot==="ofs-delta"?$[ft]={type:ot,offset:ft}:ot==="ref-delta"&&($[ft]={type:ot,offset:ft})});let je=Object.keys($).map(Number);for(let[rt,ot]of je.entries()){let it=rt+1===je.length?b.byteLength-20:je[rt+1],ft=$[ot],gt=n.buf(b.slice(ot,it))>>>0;ft.end=it,ft.crc=gt}let Me=new Ei({pack:Promise.resolve(b),packfileSha:K,crcs:_e,hashes:ne,offsets:ce,getExternalRefDelta:k});Be=null;let ze=0,Ye=[0,0,0,0,0,0,0,0,0,0,0,0];for(let rt in $){rt=Number(rt);let ot=Math.floor(ze*100/he);ot!==Be&&F&&await F({phase:"Resolving deltas",loaded:ze,total:he}),ze++,Be=ot;let it=$[rt];if(!it.oid)try{Me.readDepth=0,Me.externalReadDepth=0;let{type:ft,object:gt}=await Me.readSlice({start:rt});Ye[Me.readDepth]+=1;let yt=await de(ja.wrap({type:ft,object:gt}));it.oid=yt,ne.push(yt),ce.set(yt,rt),_e[yt]=it.crc}catch{continue}}return ne.sort(),Me}async toBuffer(){let b=[],k=e((ce,he)=>{b.push(Buffer.from(ce,he))},"write");k("ff744f63","hex"),k("00000002","hex");let F=new x(Buffer.alloc(256*4));for(let ce=0;ce<256;ce++){let he=0;for(let Be of this.hashes)parseInt(Be.slice(0,2),16)<=ce&&he++;F.writeUInt32BE(he)}b.push(F.buffer);for(let ce of this.hashes)k(ce,"hex");let L=new x(Buffer.alloc(this.hashes.length*4));for(let ce of this.hashes)L.writeUInt32BE(this.crcs[ce]);b.push(L.buffer);let $=new x(Buffer.alloc(this.hashes.length*4));for(let ce of this.hashes)$.writeUInt32BE(this.offsets.get(ce));b.push($.buffer),k(this.packfileSha,"hex");let K=Buffer.concat(b),ne=await de(K),_e=Buffer.alloc(20);return _e.write(ne,"hex"),Buffer.concat([K,_e])}async load({pack:b}){this.pack=b}async unload(){this.pack=null}async read({oid:b}){if(!this.offsets.get(b)){if(this.getExternalRefDelta)return this.externalReadDepth++,this.getExternalRefDelta(b);throw new O(`Could not read object ${b} from packfile`)}let k=this.offsets.get(b);return this.readSlice({start:k})}async readSlice({start:b}){if(this.offsetCache[b])return Object.assign({},this.offsetCache[b]);this.readDepth++;let k={16:"commit",32:"tree",48:"blob",64:"tag",96:"ofs_delta",112:"ref_delta"};if(!this.pack)throw new O("Tried to read from a GitPackIndex with no packfile loaded into memory");let F=(await this.pack).slice(b),L=new x(F),$=L.readUInt8(),K=$&112,ne=k[K];if(ne===void 0)throw new O("Unrecognized type: 0b"+K.toString(2));let _e=$&15,ce=_e;$&128&&(ce=j2(L,_e));let he=null,Be=null;if(ne==="ofs_delta"){let Me=P2(L),ze=b-Me;({object:he,type:ne}=await this.readSlice({start:ze}))}if(ne==="ref_delta"){let Me=L.slice(20).toString("hex");({object:he,type:ne}=await this.read({oid:Me}))}let je=F.slice(L.tell());if(Be=Buffer.from(await Vd(je)),Be.byteLength!==ce)throw new O(`Packfile told us object would have length ${ce} but it had length ${Be.byteLength}`);return he&&(Be=Buffer.from(A2(Be,he))),this.readDepth>3&&(this.offsetCache[b]={type:ne,object:Be}),{type:ne,format:"content",object:Be}}},l(Ei,"Ff"),Ei);e(C2,"GitPackIndex");var Kd=C2,kf=Symbol("PackfileCache");async function L2({fs:B,filename:b,getExternalRefDelta:k,emitter:F,emitterPrefix:L}){let $=await B.read(b);return Kd.fromIdx({idx:$,getExternalRefDelta:k})}l(L2,"$Y"),e(L2,"loadPackIndex");function Tf({fs:B,cache:b,filename:k,getExternalRefDelta:F,emitter:L,emitterPrefix:$}){b[kf]||(b[kf]=new Map);let K=b[kf].get(k);return K||(K=L2({fs:B,filename:k,getExternalRefDelta:F,emitter:L,emitterPrefix:$}),b[kf].set(k,K)),K}l(Tf,"pv"),e(Tf,"readPackIndex");async function N2({fs:B,cache:b,gitdir:k,oid:F,format:L="content",getExternalRefDelta:$}){let K=await B.readdir(o.join(k,"objects/pack"));K=K.filter(ne=>ne.endsWith(".idx"));for(let ne of K){let _e=`${k}/objects/pack/${ne}`,ce=await Tf({fs:B,cache:b,filename:_e,getExternalRefDelta:$});if(ce.error)throw new O(ce.error);if(ce.offsets.has(F)){if(!ce.pack){let Be=_e.replace(/idx$/,"pack");ce.pack=B.read(Be)}let he=await ce.read({oid:F,getExternalRefDelta:$});return he.format="content",he.source=`objects/pack/${ne.replace(/idx$/,"pack")}`,he}}return null}l(N2,"MY"),e(N2,"readObjectPacked");async function Mt({fs:B,cache:b,gitdir:k,oid:F,format:L="content"}){let $=e(he=>Mt({fs:B,cache:b,gitdir:k,oid:he}),"getExternalRefDelta"),K;if(F==="4b825dc642cb6eb9a060e54bf8d69288fbee4904"&&(K={format:"wrapped",object:Buffer.from("tree 0\0")}),K||(K=await $d({fs:B,gitdir:k,oid:F})),!K){if(K=await N2({fs:B,cache:b,gitdir:k,oid:F,getExternalRefDelta:$}),!K)throw new ge(F);return K}if(L==="deflated"||(K.format==="deflated"&&(K.object=Buffer.from(await Vd(K.object)),K.format="wrapped"),L==="wrapped"))return K;let ne=await de(K.object);if(ne!==F)throw new O(`SHA check failed! Expected ${F}, computed ${ne}`);let{object:_e,type:ce}=ja.unwrap(K.object);if(K.type=ce,K.object=_e,K.format="content",L==="content")return K;throw new O(`invalid requested format "${L}"`)}l(Mt,"ct"),e(Mt,"_readObject");var D2=(mo=class extends w{constructor(b,k,F=!0){super(`Failed to create ${b} at ${k} because it already exists.${F?` (Hint: use 'force: true' parameter to overwrite existing ${b}.)`:""}`),this.code=this.name=mo.code,this.data={noun:b,where:k,canForce:F}}},l(mo,"td"),mo);e(D2,"AlreadyExistsError");var $n=D2;$n.code="AlreadyExistsError";var U2=(wo=class extends w{constructor(b,k,F){super(`Found multiple ${b} matching "${k}" (${F.join(", ")}). Use a longer abbreviation length to disambiguate them.`),this.code=this.name=wo.code,this.data={nouns:b,short:k,matches:F}}},l(wo,"rd"),wo);e(U2,"AmbiguousError");var Jd=U2;Jd.code="AmbiguousError";var M2=(bo=class extends w{constructor(b){super(`Your local changes to the following files would be overwritten by checkout: ${b.join(", ")}`),this.code=this.name=bo.code,this.data={filepaths:b}}},l(bo,"nd"),bo);e(M2,"CheckoutConflictError");var Yd=M2;Yd.code="CheckoutConflictError";var $2=(vo=class extends w{constructor(b,k){super(`Failed to checkout "${b}" because commit ${k} is not available locally. Do a git fetch to make the branch available locally.`),this.code=this.name=vo.code,this.data={ref:b,oid:k}}},l(vo,"id"),vo);e($2,"CommitNotFetchedError");var Zd=$2;Zd.code="CommitNotFetchedError";var W2=(_o=class extends w{constructor(){super("Empty response from git server."),this.code=this.name=_o.code,this.data={}}},l(_o,"od"),_o);e(W2,"EmptyServerResponseError");var Qd=W2;Qd.code="EmptyServerResponseError";var z2=(Eo=class extends w{constructor(){super("A simple fast-forward merge was not possible."),this.code=this.name=Eo.code,this.data={}}},l(Eo,"ad"),Eo);e(z2,"FastForwardError");var Xd=z2;Xd.code="FastForwardError";var H2=(So=class extends w{constructor(b,k){super(`One or more branches were not updated: ${b}`),this.code=this.name=So.code,this.data={prettyDetails:b,result:k}}},l(So,"sd"),So);e(H2,"GitPushError");var ep=H2;ep.code="GitPushError";var q2=(Ao=class extends w{constructor(b,k,F){super(`HTTP Error: ${b} ${k}`),this.code=this.name=Ao.code,this.data={statusCode:b,statusMessage:k,response:F}}},l(Ao,"ld"),Ao);e(q2,"HttpError");var Ff=q2;Ff.code="HttpError";var G2=(Ro=class extends w{constructor(b){let k="invalid filepath";b==="leading-slash"||b==="trailing-slash"?k='"filepath" parameter should not include leading or trailing directory separators because these can cause problems on some platforms.':b==="directory"&&(k='"filepath" should not be a directory.'),super(k),this.code=this.name=Ro.code,this.data={reason:b}}},l(Ro,"fd"),Ro);e(G2,"InvalidFilepathError");var Ca=G2;Ca.code="InvalidFilepathError";var V2=(Oo=class extends w{constructor(b,k){super(`"${b}" would be an invalid git reference. (Hint: a valid alternative would be "${k}".)`),this.code=this.name=Oo.code,this.data={ref:b,suggestion:k}}},l(Oo,"ud"),Oo);e(V2,"InvalidRefNameError");var Wn=V2;Wn.code="InvalidRefNameError";var K2=(ko=class extends w{constructor(b){super(`Maximum search depth of ${b} exceeded.`),this.code=this.name=ko.code,this.data={depth:b}}},l(ko,"cd"),ko);e(K2,"MaxDepthError");var tp=K2;tp.code="MaxDepthError";var J2=(To=class extends w{constructor(){super("Merges with conflicts are not supported yet."),this.code=this.name=To.code,this.data={}}},l(To,"hd"),To);e(J2,"MergeNotSupportedError");var Bf=J2;Bf.code="MergeNotSupportedError";var Y2=(Fo=class extends w{constructor(b,k,F,L){super(`Automatic merge failed with one or more merge conflicts in the following files: ${b.toString()}. Fix conflicts then commit the result.`),this.code=this.name=Fo.code,this.data={filepaths:b,bothModified:k,deleteByUs:F,deleteByTheirs:L}}},l(Fo,"dd"),Fo);e(Y2,"MergeConflictError");var xf=Y2;xf.code="MergeConflictError";var Z2=(Bo=class extends w{constructor(b){super(`No name was provided for ${b} in the argument or in the .git/config file.`),this.code=this.name=Bo.code,this.data={role:b}}},l(Bo,"pd"),Bo);e(Z2,"MissingNameError");var Cr=Z2;Cr.code="MissingNameError";var Q2=(xo=class extends w{constructor(b){super(`The function requires a "${b}" parameter but none was provided.`),this.code=this.name=xo.code,this.data={parameter:b}}},l(xo,"yd"),xo);e(Q2,"MissingParameterError");var Qr=Q2;Qr.code="MissingParameterError";var X2=(Io=class extends w{constructor(b){super('There are multiple errors that were thrown by the method. Please refer to the "errors" property to see more'),this.code=this.name=Io.code,this.data={errors:b},this.errors=b}},l(Io,"md"),Io);e(X2,"MultipleGitError");var rp=X2;rp.code="MultipleGitError";var eS=(Po=class extends w{constructor(b,k){super(`Expected "${b}" but received "${k}".`),this.code=this.name=Po.code,this.data={expected:b,actual:k}}},l(Po,"gd"),Po);e(eS,"ParseError");var tl=eS;tl.code="ParseError";var tS=(jo=class extends w{constructor(b){let k="";b==="not-fast-forward"?k=" because it was not a simple fast-forward":b==="tag-exists"&&(k=" because tag already exists"),super(`Push rejected${k}. Use "force: true" to override.`),this.code=this.name=jo.code,this.data={reason:b}}},l(jo,"wd"),jo);e(tS,"PushRejectedError");var If=tS;If.code="PushRejectedError";var rS=(Co=class extends w{constructor(b,k){super(`Remote does not support the "${b}" so the "${k}" parameter cannot be used.`),this.code=this.name=Co.code,this.data={capability:b,parameter:k}}},l(Co,"vd"),Co);e(rS,"RemoteCapabilityError");var La=rS;La.code="RemoteCapabilityError";var nS=(Lo=class extends w{constructor(b,k){super(`Remote did not reply using the "smart" HTTP protocol. Expected "001e# service=git-upload-pack" but received: ${b}`),this.code=this.name=Lo.code,this.data={preview:b,response:k}}},l(Lo,"bd"),Lo);e(nS,"SmartHttpError");var np=nS;np.code="SmartHttpError";var iS=(No=class extends w{constructor(b,k,F){super(`Git remote "${b}" uses an unrecognized transport protocol: "${k}"`),this.code=this.name=No.code,this.data={url:b,transport:k,suggestion:F}}},l(No,"_d"),No);e(iS,"UnknownTransportError");var ip=iS;ip.code="UnknownTransportError";var oS=(Do=class extends w{constructor(b){super(`Cannot parse remote URL: "${b}"`),this.code=this.name=Do.code,this.data={url:b}}},l(Do,"Ed"),Do);e(oS,"UrlParseError");var op=oS;op.code="UrlParseError";var aS=(Uo=class extends w{constructor(){super("The operation was canceled."),this.code=this.name=Uo.code,this.data={}}},l(Uo,"Sd"),Uo);e(aS,"UserCanceledError");var Pf=aS;Pf.code="UserCanceledError";var sS=(Mo=class extends w{constructor(b){super(`Could not merge index: Entry for '${b}' is not up to date. Either reset the index entry to HEAD, or stage your unstaged changes.`),this.code=this.name=Mo.code,this.data={filepath:b}}},l(Mo,"Ad"),Mo);e(sS,"IndexResetError");var ap=sS;ap.code="IndexResetError";var lS=($o=class extends w{constructor(b){super(`"${b}" does not point to any commit. You're maybe working on a repository with no commits yet. `),this.code=this.name=$o.code,this.data={ref:b}}},l($o,"Rd"),$o);e(lS,"NoCommitError");var sp=lS;sp.code="NoCommitError";var fS=Object.freeze({__proto__:null,AlreadyExistsError:$n,AmbiguousError:Jd,CheckoutConflictError:Yd,CommitNotFetchedError:Zd,EmptyServerResponseError:Qd,FastForwardError:Xd,GitPushError:ep,HttpError:Ff,InternalError:O,InvalidFilepathError:Ca,InvalidOidError:Ce,InvalidRefNameError:Wn,MaxDepthError:tp,MergeNotSupportedError:Bf,MergeConflictError:xf,MissingNameError:Cr,MissingParameterError:Qr,MultipleGitError:rp,NoRefspecError:Ke,NotFoundError:ge,ObjectTypeError:Ie,ParseError:tl,PushRejectedError:If,RemoteCapabilityError:La,SmartHttpError:np,UnknownTransportError:ip,UnsafeFilepathError:P,UrlParseError:op,UserCanceledError:Pf,UnmergedPathsError:S,IndexResetError:ap,NoCommitError:sp});function jf({name:B,email:b,timestamp:k,timezoneOffset:F}){return F=uS(F),`${B} <${b}> ${k} ${F}`}l(jf,"av"),e(jf,"formatAuthor");function uS(B){let b=cS(hS(B));B=Math.abs(B);let k=Math.floor(B/60);B-=k*60;let F=String(k),L=String(B);return F.length<2&&(F="0"+F),L.length<2&&(L="0"+L),(b===-1?"-":"+")+F+L}l(uS,"UY"),e(uS,"formatTimezoneOffset");function cS(B){return Math.sign(B)||(Object.is(B,-0)?-1:1)}l(cS,"jY"),e(cS,"simpleSign");function hS(B){return B===0?B:-B}l(hS,"HY"),e(hS,"negateExceptForZero");function yn(B){return B=B.replace(/\r/g,""),B=B.replace(/^\n+/,""),B=B.replace(/\n+$/,"")+`
|
|
37
|
-
`,B}l(yn,"si"),e(yn,"normalizeNewlines");function rl(B){let[,b,k,F,L]=B.match(/^(.*) <(.*)> (.*) (.*)$/);return{name:b,email:k,timestamp:Number(F),timezoneOffset:dS(L)}}l(rl,"Dh"),e(rl,"parseAuthor");function dS(B){let[,b,k,F]=B.match(/(\+|-)(\d\d)(\d\d)/);return F=(b==="+"?1:-1)*(Number(k)*60+Number(F)),pS(F)}l(dS,"WY"),e(dS,"parseTimezoneOffset");function pS(B){return B===0?B:-B}l(pS,"qY"),e(pS,"negateExceptForZero$1");var gS=(Gn=class{constructor(b){if(typeof b=="string")this._tag=b;else if(Buffer.isBuffer(b))this._tag=b.toString("utf8");else if(typeof b=="object")this._tag=Gn.render(b);else throw new O("invalid type passed to GitAnnotatedTag constructor")}static from(b){return new Gn(b)}static render(b){return`object ${b.object}
|
|
38
|
-
type ${b.type}
|
|
39
|
-
tag ${b.tag}
|
|
40
|
-
tagger ${jf(b.tagger)}
|
|
3
|
+
var lt=Object.defineProperty;var g=(a,e)=>lt(a,"name",{value:e,configurable:!0});import{createContext as Mt,useContext as _t,useEffect as it,useState as ae,useRef as Ht}from"react";import*as fe from"path";import*as Ie from"path";import{createFsFromVolume as ct,Volume as dt}from"memfs";import*as xe from"path";import{createFsFromVolume as ft,Volume as pt}from"memfs";import ut from"ignore";import*as re from"path";import{createFsFromVolume as Ft,Volume as gt}from"memfs";import yt from"ignore";import ke from"isomorphic-git";import*as pe from"path";import{createFsFromVolume as bt,Volume as vt}from"memfs";import le from"isomorphic-git";import b from"isomorphic-git";import O from"isomorphic-git";import x from"isomorphic-git";import Et from"isomorphic-git";import he from"isomorphic-git";import ce from"isomorphic-git";import de from"isomorphic-git";import N from"isomorphic-git";import Rt from"isomorphic-git";import M from"isomorphic-git";import X from"isomorphic-git";import Y from"isomorphic-git";import C from"isomorphic-git";import R from"isomorphic-git";import me from"isomorphic-git/http/node";import P from"isomorphic-git";import{createFsFromVolume as At,Volume as xt}from"memfs";import Ne from"isomorphic-git";var Oe=Object.defineProperty,ht=g((a,e,t)=>e in a?Oe(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,"Ze"),n=g((a,e)=>Oe(a,"name",{value:e,configurable:!0}),"n"),u=g((a,e,t)=>ht(a,typeof e!="symbol"?e+"":e,t),"p"),H,Be=(H=class{constructor(e,t){u(this,"entries",[]),u(this,"currentIndex",0),u(this,"closed",!1),u(this,"compositFs"),u(this,"dirPath"),u(this,"initialized",!1),this.compositFs=e,this.dirPath=t}async initialize(){if(this.initialized)return;let e=new Set;for(let t of[...this.compositFs.subFilesystems].reverse()){let r=await t.readdir(this.dirPath);for(let i of r)e.add(i)}for(let t of Array.from(e)){let r=this.dirPath+"/"+t;await this.compositFs.hiddenFilesFileSystem?.responsible(r)||this.entries.push({name:t,path:r})}this.initialized=!0}async*[Symbol.asyncIterator](){for(await this.initialize();this.currentIndex<this.entries.length&&!this.closed;){let e=this.entries[this.currentIndex++];try{let t=await this.compositFs.stat(e.path);yield{name:e.name,isFile:n(()=>t.isFile(),"isFile"),isDirectory:n(()=>t.isDirectory(),"isDirectory"),isBlockDevice:n(()=>t.isBlockDevice(),"isBlockDevice"),isCharacterDevice:n(()=>t.isCharacterDevice(),"isCharacterDevice"),isSymbolicLink:n(()=>t.isSymbolicLink(),"isSymbolicLink"),isFIFO:n(()=>t.isFIFO(),"isFIFO"),isSocket:n(()=>t.isSocket(),"isSocket")}}catch(t){console.debug(`Failed to stat ${e.path}:`,t)}}}async read(){if(this.closed)throw new Error("Directory handle is closed");if(await this.initialize(),this.currentIndex>=this.entries.length)return null;let e=this.entries[this.currentIndex++];try{let t=await this.compositFs.stat(e.path);return{name:e.name,isFile:n(()=>t.isFile(),"isFile"),isDirectory:n(()=>t.isDirectory(),"isDirectory"),isBlockDevice:n(()=>t.isBlockDevice(),"isBlockDevice"),isCharacterDevice:n(()=>t.isCharacterDevice(),"isCharacterDevice"),isSymbolicLink:n(()=>t.isSymbolicLink(),"isSymbolicLink"),isFIFO:n(()=>t.isFIFO(),"isFIFO"),isSocket:n(()=>t.isSocket(),"isSocket")}}catch{return this.read()}}async close(){this.closed=!0,this.entries=[]}get path(){return this.dirPath}},g(H,"de"),H);n(Be,"CompositeFsDir");var Ce=Be,U,Te=(U=class{constructor(e){u(this,"delegate"),u(this,"compositeFs"),u(this,"_subFsFileDescriptor"),u(this,"handleType","file"),u(this,"_compositFsFileDescriptor",-1),this.delegate=e.fs,this._subFsFileDescriptor=e.subFsFileDescriptor,this._compositFsFileDescriptor=-1,this.compositeFs=e.compositeFs;let t=this._subFsFileDescriptor}get fsType(){return this.delegate.fileType()}get subFsFileDescriptor(){return this._subFsFileDescriptor}get fd(){return this._compositFsFileDescriptor}realize(e){if(this._compositFsFileDescriptor!==-1)throw new Error("was already realized");this._compositFsFileDescriptor=e}readableWebStream(e){throw new Error("Method not implemented.")}async appendFile(e,t){return await this.compositeFs.logOperationOnFileDescsriptor(this,"appendFile",{data:e,options:t}),await this.delegate.appendFile(this,e,t)}async chmod(e){return await this.compositeFs.logOperationOnFileDescsriptor(this,"chmod",{mode:e}),this.delegate.fchmod(this,e)}async chown(e,t){return await this.compositeFs.logOperationOnFileDescsriptor(this,"chown",{uid:e,gid:t}),this.delegate.fchown(this,e,t)}async close(){return await this.compositeFs.logOperationOnFileDescsriptor(this,"close",{}),this.compositeFs.close(this)}async datasync(){return await this.compositeFs.logOperationOnFileDescsriptor(this,"datasync",{}),this.delegate.dataSync(this)}async read(e,t,r,i){return await this.compositeFs.logOperationOnFileDescsriptor(this,"read",{targetBufferLength:e.length,offset:t,length:r,position:i}),await this.delegate.read(this,e,t,r,i)}async readv(e,t){return await this.compositeFs.logOperationOnFileDescsriptor(this,"readv",{buffers:e,position:t}),this.delegate.readv(this,e,t)}async stat(e){return await this.compositeFs.logOperationOnFileDescsriptor(this,"stat",{options:e}),this.delegate.fstat(this,e)}async truncate(e){return await this.compositeFs.logOperationOnFileDescsriptor(this,"truncate",{len:e}),this.delegate.ftruncate(this,e)}async utimes(e,t){return await this.compositeFs.logOperationOnFileDescsriptor(this,"utimes",{atime:e,mtime:t}),this.delegate.futimes(this,e,t)}async write(e,t,r,i){return await this.compositeFs.logOperationOnFileDescsriptor(this,"write",{buffer:e,offset:t,length:r,position:i}),this.delegate.write(this,e,t,r,i)}async writev(e,t){return await this.compositeFs.logOperationOnFileDescsriptor(this,"writev",{buffers:e,position:t}),this.delegate.writev(this,e,t)}async sync(){return await this.compositeFs.logOperationOnFileDescsriptor(this,"sync",{}),this.delegate.dataSync(this)}},g(U,"me"),U);n(Te,"CompositFsFileHandle");var se=Te,j,Le=(j=class{constructor({name:e,parentFs:t,gitRoot:r}){u(this,"compositFs"),u(this,"gitRoot"),u(this,"name"),this.name=e,this.compositFs=t,this.gitRoot=r}toStr(e){return typeof e=="string"?e:Buffer.isBuffer(e)?e.toString():e&&typeof e=="object"&&"fd"in e?`FileHandle(fd=${e.fd})`:String(e)}async open(e,t,r){throw new Error(`open not implemented for: ${this.toStr(e)}`)}async access(e,t){throw new Error(`access not implemented for: ${this.toStr(e)}`)}async stat(e,t){throw new Error(`lstat not implemented for: ${this.toStr(e)}`)}async lstat(e,t){throw new Error(`lstat not implemented for: ${this.toStr(e)}`)}async opendir(e,t){throw new Error(`opendir not implemented for: ${this.toStr(e)}`)}async link(e,t){throw new Error(`link not implemented for: ${this.toStr(e)}`)}async mkdir(e,t){throw new Error(`mkdir not implemented for: ${this.toStr(e)}`)}async readdir(e,t){throw new Error(`readdir not implemented for: ${this.toStr(e)}`)}async readlink(e,...t){throw new Error(`readlink not implemented for: ${this.toStr(e)}`)}async unlink(e){throw new Error(`unlink not implemented for: ${this.toStr(e)}`)}async rename(e,t){throw new Error(`rename not implemented for: ${this.toStr(e)}`)}async rmdir(e,...t){throw new Error(`rmdir not implemented for: ${this.toStr(e)}`)}async symlink(e,t,r){throw new Error(`symlink not implemented for: ${this.toStr(t)}`)}async lookup(e){throw new Error(`lookup not implemented for: ${this.toStr(e)}`)}resolvePath(e){throw new Error(`resolvePath not implemented for fd: ${e}`)}async close(e){this.compositFs.close(e)}async dataSync(e){throw new Error(`dataSync not implemented for: ${e.subFsFileDescriptor}`)}async read(e,t,r,i,s){throw new Error(`read not implemented for: ${e.subFsFileDescriptor}`)}async appendFile(e,t,r){throw new Error(`appendFile not implemented for: ${e.subFsFileDescriptor}`)}async fchmod(e,t){throw new Error(`fchmod not implemented for: ${e.subFsFileDescriptor}`)}async fchown(e,t,r){throw new Error(`fchown not implemented for: ${e.subFsFileDescriptor}`)}async ftruncate(e,t){throw new Error(`ftruncate not implemented for: ${e.subFsFileDescriptor}`)}async fstat(e,t){throw new Error(`fstat not implemented for: ${e.subFsFileDescriptor}`)}async futimes(e,t,r){throw new Error(`futimes not implemented for: ${e.subFsFileDescriptor}`)}async write(e,t,r,i,s){throw new Error(`write not implemented for: ${e.subFsFileDescriptor}`)}async writev(e,t,r){throw new Error(`writev not implemented for: ${e.subFsFileDescriptor}`)}async readv(e,t,r){throw new Error(`readv not implemented for: ${e.subFsFileDescriptor}`)}async readFile(e,t){throw new Error(`readFile not implemented for: ${this.toStr(e)}`)}async writeFile(e,t,r){throw new Error(`writeFile not implemented for: ${this.toStr(e)}`)}},g(j,"ce"),j);n(Le,"BaseCompositeSubFs");var Q=Le,V,Ae=(V=class extends Q{constructor({name:e,parentFs:t,gitRoot:r}){if(super({name:e,parentFs:t,gitRoot:r}),u(this,"openFh",new Map),u(this,"memFs",ct(new dt)),u(this,"targetFs"),this.compositFs=t,this.gitRoot=r,this.compositFs.parentFs===void 0)throw new Error("PassThroughSubFs not allowed in root fs");this.targetFs=this.compositFs.parentFs}async responsible(e){return!0}fileType(){return 4}async open(e,t,r){let i=Ie.dirname(e),s=await this.targetFs.promises.open(e,t,r);return this.openFh.set(s.fd,s),new se({fs:this,compositeFs:this.compositFs,subFsFileDescriptor:s.fd,parentFsFileDescriptors:[s.fd]})}async access(e,t){return await this.targetFs.promises.access(e,t)}async stat(e,t){return this.targetFs.promises.stat(e,{bigint:!1})}async lstat(e,t){return this.targetFs.promises.lstat(e,{bigint:!1})}async opendir(e,t){return await this.targetFs.promises.opendir(e,t)}async link(e,t){return await this.targetFs.promises.link(e,t)}async mkdir(e,t){let r=typeof e=="string"?e:e.toString();return await this.targetFs.promises.mkdir(r,t)}async readdir(e,...t){return this.targetFs.promises.readdir(e,...t)}async readlink(e,...t){throw new Error("not implemented")}async unlink(e){return await this.targetFs.promises.unlink(e)}async rename(e,t){return await this.targetFs.promises.rename(e,t)}async rmdir(e,t){return await this.targetFs.promises.rmdir(e,t)}async symlink(e,t,r){return await this.targetFs.promises.symlink(e,t,r)}async lookup(e){throw new Error(`lookup is not implemented for: ${this.toStr(e)}`)}async close(e){let t=this.openFh.get(e.subFsFileDescriptor);t&&(await t.close(),this.openFh.delete(e.subFsFileDescriptor))}async dataSync(e){let t=this.openFh.get(e.subFsFileDescriptor);if(t)return await t.sync()}async read(e,t,r,i,s){let o=this.openFh.get(e.subFsFileDescriptor);if(o)return await o.read(t,r,i,s);throw new Error(`File handle not found: ${e.subFsFileDescriptor}`)}async fchmod(e,t){let r=this.openFh.get(e.subFsFileDescriptor);if(r)return await r.chmod(t)}async fchown(e,t,r){let i=this.openFh.get(e.subFsFileDescriptor);if(i)return await i.chown(t,r)}async write(e,t,r,i,s){let o=this.openFh.get(e.subFsFileDescriptor);if(o)return await o.write(t,r,i,s);throw new Error(`File handle not found: ${e.subFsFileDescriptor}`)}async ftruncate(e,t){let r=this.openFh.get(e.subFsFileDescriptor);if(r)return await r.truncate(t)}resolvePath(e){throw new Error(`resolvePath is not implemented: resolvePath(${e})`)}async fstat(e,t){let r=this.openFh.get(e.subFsFileDescriptor);if(r)return await r.stat(t);throw new Error(`File handle not found: ${e.subFsFileDescriptor}`)}async futimes(e,t,r){let i=this.openFh.get(e.subFsFileDescriptor);if(i)return await i.utimes(t,r)}async writev(e,t,r){let i=this.openFh.get(e.subFsFileDescriptor);if(i)return await i.writev(t,r??void 0);throw new Error(`File handle not found: ${e.subFsFileDescriptor}`)}async readv(e,t,r){let i=this.openFh.get(e.subFsFileDescriptor);if(i)return await i.readv(t,r??void 0);throw new Error(`File handle not found: ${e.subFsFileDescriptor}`)}async readFile(e,t){return typeof e=="string"||Buffer.isBuffer(e)?this.targetFs.readFile(e.toString(),t):super.readFile(e,t)}async writeFile(e,t,r){let i=typeof r=="object"&&r.flag?r.flag:"w",s=await this.targetFs.open(e,i);try{let o;if(typeof t=="string"){let l=typeof r=="object"&&r.encoding?r.encoding:"utf8";o=Buffer.from(t,l)}else Buffer.isBuffer(t)?o=t:o=Buffer.from(t);await s.write(o,0,o.length,0)}finally{await this.targetFs.close(s)}}},g(V,"he"),V);n(Ae,"PassThroughSubFs");var mt=Ae,W,ze=(W=class extends Q{constructor({name:e,parentFs:t,gitRoot:r,passThroughFs:i}){super({name:e,parentFs:t,gitRoot:r}),u(this,"openFh",new Map),u(this,"memFs",ft(new pt)),u(this,"targetFs"),this.compositFs=t,this.gitRoot=r,this.targetFs=i}async responsible(e){return!0}fileType(){return 4}async open(e,t,r){let i=xe.dirname(e),s=await this.targetFs.promises.open(e,t,r);return this.openFh.set(s.fd,s),new se({fs:this,compositeFs:this.compositFs,subFsFileDescriptor:s.fd,parentFsFileDescriptors:[]})}async access(e,t){return await this.targetFs.promises.access(e,t)}async stat(e,...t){return this.targetFs.promises.stat(e,{bigint:!1})}async lstat(e,...t){return this.targetFs.promises.lstat(e,{bigint:!1})}async opendir(e,t){let r=await this.targetFs.promises.opendir(e,t);return new Ce(this.compositFs,e.toString())}async link(e,t){return await this.targetFs.promises.link(e,t)}async mkdir(e,t){await this.targetFs.promises.mkdir(e,t)}async readdir(e,...t){return this.targetFs.promises.readdir(e,...t)}async readlink(e,...t){throw new Error("not implemented")}async unlink(e){return await this.targetFs.promises.unlink(e)}async rename(e,t){return await this.targetFs.promises.rename(e,t)}async rmdir(e,t){return await this.targetFs.promises.rmdir(e,t)}async symlink(e,t,r){return await this.targetFs.promises.symlink(e,t,r)}async lookup(e){throw new Error(`lookup is not implemented for: ${this.toStr(e)}`)}async close(e){let t=this.openFh.get(e.subFsFileDescriptor);t&&(this.openFh.delete(e.subFsFileDescriptor),await t.close())}async dataSync(e){let t=this.openFh.get(e.subFsFileDescriptor);if(t)return await t.sync()}async read(e,t,r,i,s){let o=this.openFh.get(e.subFsFileDescriptor);if(o)return await o.read(t,r,i,s);throw new Error(`File handle not found: ${e.subFsFileDescriptor}`)}async fchmod(e,t){let r=this.openFh.get(e.subFsFileDescriptor);if(r)return await r.chmod(t)}async fchown(e,t,r){let i=this.openFh.get(e.subFsFileDescriptor);if(i)return await i.chown(t,r)}async write(e,t,r,i,s){let o=this.openFh.get(e.subFsFileDescriptor);if(o)return await o.write(t,r,i,s);throw new Error(`File handle not found: ${e.subFsFileDescriptor}`)}async ftruncate(e,t){let r=this.openFh.get(e.subFsFileDescriptor);if(r)return await r.truncate(t)}resolvePath(e){throw new Error(`resolvePath is not implemented: resolvePath(${e})`)}async fstat(e,t){let r=this.openFh.get(e.subFsFileDescriptor);if(r)return await r.stat(t);throw new Error(`File handle not found: ${e.subFsFileDescriptor}`)}async futimes(e,t,r){let i=this.openFh.get(e.subFsFileDescriptor);if(i)return await i.utimes(t,r)}async writev(e,t,r){let i=this.openFh.get(e.subFsFileDescriptor);if(i)return await i.writev(t,r??void 0);throw new Error(`File handle not found: ${e.subFsFileDescriptor}`)}async readv(e,t,r){let i=this.openFh.get(e.subFsFileDescriptor);if(i)return await i.readv(t,r??void 0);throw new Error(`File handle not found: ${e.subFsFileDescriptor}`)}async readFile(e,t){return this.targetFs.promises.readFile(e,t)}async writeFile(e,t,r){return this.targetFs.promises.writeFile(e,t,r)}},g(W,"fe"),W);n(ze,"PassThroughToAsyncFsSubFs");var wt=ze,K,Me=(K=class{constructor({name:e,parentFs:t,storageFs:r,gitRoot:i,defaultBranch:s="main"}){if(u(this,"promises"),u(this,"gitRoot"),u(this,"ephemeralFilesFileSystem"),u(this,"hiddenFilesFileSystem"),u(this,"passThroughFileSystem"),u(this,"subFilesystems",[]),u(this,"parentFs"),u(this,"name"),u(this,"defaultBranch"),u(this,"pathToFileDescriptors",new Map),u(this,"openFileHandles",new Map),u(this,"logOperation"),this.name=e,this.parentFs=t,this.gitRoot=i,this.defaultBranch=s,this.promises={access:this.access.bind(this),opendir:this.opendir.bind(this),mkdir:this.mkdir.bind(this),readdir:this.readdir.bind(this),open:this.open.bind(this),stat:this.stat.bind(this),lstat:this.lstat.bind(this),link:this.link.bind(this),readlink:this.readlink.bind(this),unlink:this.unlink.bind(this),rename:this.rename.bind(this),rmdir:this.rmdir.bind(this),symlink:this.symlink.bind(this),readFile:this.readFile.bind(this),writeFile:this.writeFile.bind(this),getFilehandle:this.getFilehandle.bind(this)},!t&&r){this.passThroughFileSystem=new wt({name:e+"-passthrough",passThroughFs:r,gitRoot:i,parentFs:this});return}if(!r&&t){this.passThroughFileSystem=new mt({name:e+"-passthrough",parentFs:this,gitRoot:i});return}throw new Error("invalid configuration")}getNextFileDescriptor(){let e=Array.from(this.openFileHandles.keys());return e.length===0?1:Math.max(...e)+1}setLoggger(e){this.logOperation=e}async logOperationOnFileDescsriptor(e,t,r){if(!this.logOperation)return;let i=[];for(let[s,o]of this.pathToFileDescriptors.entries())o.includes(e.fd)&&i.push(s);if(i.length!==0)return this.logOperation?.({fsName:e.delegate.name,fd:e,path:i[0],operation:t,operationArgs:r})}getFilehandle(e){return this.openFileHandles.get(e)}setEphemeralFilesSubFs(e){this.ephemeralFilesFileSystem=e}setHiddenFilesSubFs(e){this.hiddenFilesFileSystem=e}addSubFs(e){this.subFilesystems.push(e)}async getResponsibleFs(e){if(!e.toString().startsWith(this.gitRoot)&&this.gitRoot!=="./")throw new Error("tried to access a file ("+e+") outside of the legit folder: "+this.gitRoot);if(!this.hiddenFilesFileSystem)throw new Error(this.name+" intialize hidden fs first!");if(!this.ephemeralFilesFileSystem)throw new Error(this.name+" intialize ephemeral fs first!");if(await this.hiddenFilesFileSystem.responsible(e.toString()))return this.hiddenFilesFileSystem;if(await this.ephemeralFilesFileSystem.responsible(e.toString()))return this.ephemeralFilesFileSystem;for(let t of this.subFilesystems)if(await t.responsible(e.toString()))return t;return this.passThroughFileSystem}async access(e,t){let r=await this.getResponsibleFs(e);return await this.logOperation?.({fsName:r.name,path:e,operation:"access",operationArgs:{mode:t}}),r.access(e,t)}async opendir(e,t){await this.logOperation?.({fsName:this.name,path:e.toString(),operation:"opendir",operationArgs:{options:t}});let r=e.toString();if(!r.startsWith(this.gitRoot))throw new Error("tried to access a directory ("+r+") outside of the legit folder: "+this.gitRoot);return new Ce(this,r)}async mkdir(e,t){let r=await this.getResponsibleFs(e);return await this.logOperation?.({fsName:r.name,path:e.toString(),operation:"mkdir",operationArgs:{options:t}}),r.mkdir(e,t)}async readdir(e,t){await this.logOperation?.({fsName:this.name,path:e.toString(),operation:"readdir",operationArgs:{options:t}});let r=new Set;for(let i of[...this.subFilesystems].reverse()){let s=await i.readdir(e,t);for(let o of s)await this.ephemeralFilesFileSystem?.responsible((e=="/"?"":e)+"/"+o)||r.add(o)}try{let i=await this.passThroughFileSystem.readdir(e,t);for(let s of i)await this.ephemeralFilesFileSystem?.responsible((e=="/"?"":e)+"/"+s)||r.add(s)}catch(i){if(i.code!=="ENOENT")throw new Error("error reading ephemeral fs: "+i)}try{let i=await this.ephemeralFilesFileSystem.readdir(e,t);for(let s of i)r.add(s)}catch(i){if(i.code!=="ENOENT")throw new Error("error reading ephemeral fs: "+i)}for(let i of r){let s=(e=="/"?"":e)+"/"+i;await this.hiddenFilesFileSystem.responsible(s)&&r.delete(i)}return Array.from(r)}async open(e,t,r){let i=await this.getResponsibleFs(e);await this.logOperation?.({fsName:i.name,path:e,operation:"open",operationArgs:{flags:t,mode:r}});let s=await i.open(e,t,r),o=this.getNextFileDescriptor();return s.realize(o),this.openFileHandles.set(o,s),this.pathToFileDescriptors.get(e)||this.pathToFileDescriptors.set(e,[]),this.pathToFileDescriptors.get(e).push(o),s}async close(e){try{await e.delegate.close(e)}catch(t){throw t}finally{for(let[t,r]of this.pathToFileDescriptors.entries()){let i=r.indexOf(e.fd);if(i!==-1){r.splice(i,1),r.length===0&&this.pathToFileDescriptors.delete(t);break}}this.openFileHandles.delete(e.fd)}}async stat(e,t){let r=e.toString(),i=await this.getResponsibleFs(e);return await this.logOperation?.({fsName:i.name,path:r,operation:"stat",operationArgs:{opts:t}}),i.stat(e)}async lstat(e,t){let r=await this.getResponsibleFs(e);return await this.logOperation?.({fsName:r.name,path:e.toString(),operation:"lstat",operationArgs:{opts:t}}),r.lstat(e,t)}async link(e,t){throw new Error("not implemented")}async readlink(e,t){throw new Error("not implemented")}async unlink(e){return(await this.getResponsibleFs(e)).unlink(e)}async rename(e,t){if(this.hiddenFilesFileSystem){if(await this.hiddenFilesFileSystem.responsible(fe.basename(e.toString())))throw new Error("Renaming of hidden Files is not allowed "+e);if(await this.hiddenFilesFileSystem.responsible(fe.basename(t.toString())))throw new Error("Renaming to hidden Files is not allowed "+t)}let r=await this.getResponsibleFs(e),i=await this.getResponsibleFs(t);if(r===i)return await this.logOperation?.({fsName:r.name,path:e.toString(),operation:"rename",operationArgs:{oldPath:e,newPath:t}}),r.rename(e,t);let s=await r.open(e.toString(),"r");try{let o=await r.fstat(s),l=Buffer.alloc(o.size);await r.read(s,l,0,o.size,0),await r.close(s),await i.writeFile(t.toString(),l,"utf8"),await r.unlink(e)}catch(o){try{await r.close(s)}catch{}throw o}}async rmdir(e,t){let r=await this.getResponsibleFs(e);return await this.logOperation?.({fsName:r.name,path:e.toString(),operation:"rmdir",operationArgs:{dirPath:e,options:t}}),r.rmdir(e,t)}async symlink(e,t,r){throw new Error("not implemented")}async readFile(e,t){await this.logOperation?.({fsName:this.name,path:e.toString(),operation:"readFile",operationArgs:{path:e,options:t}});let r=!0,i;if(typeof e=="number"){r=!1;let s=this.getFilehandle(e);if(!s)throw new Error("Invalid file descriptor");i=s}else if(typeof e=="string")i=await this.open(e,"r");else throw new Error("only filehandle and path are supported atm");try{let s=(await i.stat()).size;if(typeof s=="bigint"){if(s>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("File too large to read into buffer");s=Number(s)}let o=Buffer.alloc(s),{bytesRead:l}=await i.read(o,0,s,0);if(t&&typeof t.encoding=="string")return o.slice(0,l).toString(t.encoding);if(typeof t=="string"){if(t==="utf8"||t==="utf-8")return o.slice(0,l).toString(t);throw new Error("Unsupported encoding: "+t)}return o.slice(0,l)}finally{i&&r&&await i.close()}}async writeFile(e,t,r){await this.logOperation?.({fsName:this.name,path:e.toString(),operation:"writeFile",operationArgs:{data:t,options:r}});let i=typeof e!="number",s,o,l,h="w";if(typeof r=="string"?o=r:r&&typeof r=="object"&&(o=r.encoding,l=r.mode,h=r.flag||"w"),typeof e=="number"){let c=this.getFilehandle(e);if(!c)throw new Error("Invalid file descriptor");s=c}else if(typeof e=="string")s=await this.open(e,h,l);else throw new Error("only filehandle and path are supported atm");try{let c;if(typeof t=="string")c=Buffer.from(t,o||"utf8");else if(t instanceof Buffer)c=t;else if(t instanceof Uint8Array)c=Buffer.from(t);else throw new Error("Invalid data type for writeFile");let d=0;for(;d<c.length;){let{bytesWritten:m}=await s.write(c,d,c.length-d,d);d+=m}}finally{s&&i&&await s.close()}}},g(K,"ue"),K);n(Me,"CompositeFs");var Se=Me,J,_e=(J=class extends Q{constructor({name:e,parentFs:t,gitRoot:r,hiddenFiles:i}){super({name:e,parentFs:t,gitRoot:r}),u(this,"ig"),this.ig=ut(),this.ig.add(i)}async responsible(e){let t=e.replace(/\\/g,"/"),r=t.startsWith("./")?t.slice(2):t;return r=r.startsWith("/")?r.slice(1):r,r===""||r==="."?!1:this.ig.ignores(r)}fileType(){return 255}error(e){return new Error(`Access to hidden file is not allowed: ${this.toStr(e)}`)}async open(e,t,r){throw this.error(e)}async access(e){throw this.error(e)}async stat(e){throw this.error(e)}async lstat(e){throw this.error(e)}async opendir(e){throw this.error(e)}async link(e){throw this.error(e)}async mkdir(e){throw this.error(e)}async readdir(e){throw this.error(e)}async readlink(e){throw this.error(e)}async unlink(e){throw this.error(e)}async rename(e){throw this.error(e)}async rmdir(e){throw this.error(e)}async symlink(e,t){throw this.error(t)}async lookup(e){throw this.error(e)}resolvePath(e){throw new Error(`Access to hidden file is not allowed: resolvePath(${e})`)}async close(e){throw new Error("Access to hidden file is not allowed: close: "+e.subFsFileDescriptor)}async dataSync(e){throw new Error("Access to hidden file is not allowed: dataSync: "+e.subFsFileDescriptor)}async read(e,t,r,i,s){throw new Error("Access to hidden file is not allowed: readFileHandle: "+e.subFsFileDescriptor)}},g(J,"Fe"),J);n(_e,"HiddenFileSubFs");var De=_e,G,He=(G=class extends Q{constructor({name:e,parentFs:t,gitRoot:r,ephemeralPatterns:i}){super({name:e,parentFs:t,gitRoot:r}),u(this,"openFh",new Map),u(this,"memFs",Ft(new gt)),u(this,"ig"),u(this,"patterns"),this.compositFs=t,this.gitRoot=r,this.ig=yt(),this.ig.add(i),this.patterns=i}normalizePath(e){let t=typeof e=="string"?e:e.toString();return t.startsWith("/")?t:"/"+t}async responsible(e){let t=e.replace(/\\/g,"/"),r=t.startsWith("./")?t.slice(2):t;return r=r.startsWith("/")?r.slice(1):r,r===""||r==="."?!1:this.ig.ignores(r)}fileType(){return 5}async open(e,t,r){let i=this.normalizePath(e),s=re.dirname(i);s&&s!=="/"&&s!=="."&&await this.memFs.promises.mkdir(s,{recursive:!0});let o=await this.memFs.promises.open(i,t,r);return this.openFh.set(o.fd,o),new se({fs:this,compositeFs:this.compositFs,subFsFileDescriptor:o.fd,parentFsFileDescriptors:[o.fd]})}async access(e,t){let r=this.normalizePath(e);return await this.memFs.promises.access(r,t)}async stat(e,t){let r=this.normalizePath(e);return this.memFs.promises.stat(r,{bigint:!1})}async lstat(e,t){let r=this.normalizePath(e);return this.memFs.promises.lstat(r,{bigint:!1})}async opendir(e,t){let r=this.normalizePath(e);return await this.memFs.promises.opendir(r,t)}async link(e,t){let r=this.normalizePath(e),i=this.normalizePath(t);return await this.memFs.promises.link(r,i)}async mkdir(e,t){let r=this.normalizePath(e);if(!(typeof t=="object"&&t&&"recursive"in t&&t.recursive)){let i=re.dirname(r);if(i&&i!=="/"&&i!==".")try{await this.memFs.promises.stat(i)}catch{await this.memFs.promises.mkdir(i,{recursive:!0})}}await this.memFs.promises.mkdir(r,t)}async readdir(e,...t){let r=this.normalizePath(e),i=await this.memFs.promises.readdir(r,...t);return console.log("EPHEMERAL: READDIR: ",i),i}async readlink(e){throw new Error("readlink is not implemented for EphemeralFileSubFs")}async unlink(e){let t=this.normalizePath(e);return await this.memFs.promises.unlink(t)}async rename(e,t){let r=this.normalizePath(e),i=this.normalizePath(t);return await this.memFs.promises.rename(r,i)}async rmdir(e,t){let r=this.normalizePath(e);return await this.memFs.promises.rmdir(r,t)}async symlink(e,t,r){let i=this.normalizePath(e),s=this.normalizePath(t);return await this.memFs.promises.symlink(i,s,r)}async lookup(e){throw new Error(`lookup is not implemented for: ${this.toStr(e)}`)}async close(e){let t=this.openFh.get(e.subFsFileDescriptor);t&&(await t.close(),this.openFh.delete(e.subFsFileDescriptor))}async dataSync(e){let t=this.openFh.get(e.subFsFileDescriptor);if(t)return await t.datasync()}async read(e,t,r,i,s){let o=this.openFh.get(e.subFsFileDescriptor);if(o)return await o.read(t,r,i,s);throw new Error(`File handle not found: ${e.subFsFileDescriptor}`)}async fchmod(e,t){let r=this.openFh.get(e.subFsFileDescriptor);if(r)return await r.chmod(t)}async fchown(e,t,r){let i=this.openFh.get(e.subFsFileDescriptor);if(i)return await i.chown(t,r)}async write(e,t,r,i,s){let o=this.openFh.get(e.subFsFileDescriptor);if(o)return await o.write(t,r,i,s);throw new Error(`File handle not found: ${e.subFsFileDescriptor}`)}async ftruncate(e,t){let r=this.openFh.get(e.subFsFileDescriptor);if(r)return await r.truncate(t)}resolvePath(e){throw new Error(`resolvePath is not implemented: resolvePath(${e})`)}async fstat(e,t){let r=this.openFh.get(e.subFsFileDescriptor);if(r)return await r.stat(t);throw new Error(`File handle not found: ${e.subFsFileDescriptor}`)}async futimes(e,t,r){let i=this.openFh.get(e.subFsFileDescriptor);if(i)return await i.utimes(t,r)}async writev(e,t,r){let i=this.openFh.get(e.subFsFileDescriptor);if(i)return await i.writev(t,r??void 0);throw new Error(`File handle not found: ${e.subFsFileDescriptor}`)}async readv(e,t,r){let i=this.openFh.get(e.subFsFileDescriptor);if(i)return await i.readv(t,r??void 0);throw new Error(`File handle not found: ${e.subFsFileDescriptor}`)}async readFile(e,t){if(typeof e=="string"||Buffer.isBuffer(e)){let r=this.normalizePath(e);return this.memFs.promises.readFile(r,t)}return super.readFile(e,t)}async writeFile(e,t,r){let i=this.normalizePath(e),s=re.dirname(i);return s&&s!=="/"&&s!=="."&&await this.memFs.promises.mkdir(s,{recursive:!0}),this.memFs.promises.writeFile(i,t,r)}},g(G,"ge"),G);n(He,"EphemeralSubFs");var Pe=He,Ue={type:"gitBranchesListVirtualFile",getStats:n(async({gitRoot:a,nodeFs:e})=>{let t=a+"/.git";try{return await e.stat(t)}catch{throw new Error(`ENOENT: no such file or directory, stat '${t}'`)}},"getStats"),getFile:n(async({gitRoot:a,nodeFs:e})=>{try{let t=(await le.listBranches({fs:e,dir:a})).filter(s=>s.indexOf("/")===-1),r=await le.currentBranch({fs:e,dir:a}),i=await Promise.all(t.map(async s=>{let o=await le.resolveRef({fs:e,dir:a,ref:s});return s}));return{type:"directory",content:i,mode:493,size:i}}catch(t){throw t}},"getFile"),rename:n(async a=>{throw new Error("not implemented")},"rename"),mkdir:n(async function(a){throw new Error("not implemented")},"mkdir")};async function A(a,e,t){try{return await O.resolveRef({fs:a,dir:e,ref:`refs/heads/${t}`})}catch{return}}g(A,"R");n(A,"tryResolveRef");async function T({dir:a,fs:e,treeOid:t,deletePathParts:r,addPathParts:i,addObj:s,addKeepIfEmpty:o,deleteKeepIfNotEmpty:l,keepFilename:h=".keep"}){let[c,...d]=i??[],[m,...w]=r??[],f=[];if(t){let{tree:E}=await O.readTree({fs:e,dir:a,oid:t});f=[...E]}if(c===m){let E=c;if(E===void 0)throw new Error("illegal arguement - called with out a path part");if(d.length===0)throw new Error("can not move into it self");if(w.length===0)throw new Error("can not move from it self");let D=f.findIndex(F=>F.path===E),y=(D!==-1?f[D]:void 0)?.oid,v=await T({dir:a,fs:e,treeOid:y,addPathParts:d,deletePathParts:w,addObj:s,addKeepIfEmpty:o,deleteKeepIfNotEmpty:l});if(v===void 0)throw new Error("on the same path we expect an update - respectivly a newly created subTreeOid");let p=!1;if(v!==y){p=!0;let F={mode:"040000",path:E,oid:v,type:"tree"};D!==-1?f[D]=F:f.push(F)}if(t==null&&!p)throw new Error("Illegal state - if the currentOid is undefined - a new tree should have been created (an update should have happened)");if(p)return await O.writeTree({fs:e,dir:a,tree:f});if(t===void 0)throw new Error("currentOid should be set - since the sub tree didn't exist and ");return t}else{let E=!1,D;if(m){let y=f.findIndex(p=>p.path===m),v=y!==-1?f[y]:void 0;if(v===void 0)throw new Error("Element doesnt exist in tree");if(w.length>0){if(v&&v.type!=="tree")throw new Error("SubPart of the path for the obj to delete is not a tree");let p=await T({dir:a,fs:e,treeOid:v.oid,addPathParts:void 0,deletePathParts:w,addObj:s,addKeepIfEmpty:o,deleteKeepIfNotEmpty:l});if(p===v.oid)throw new Error("in case of a delete we expect a different subtree oid");E=!0,p===void 0?f.splice(y,1):f[y]={mode:"040000",path:m,oid:p,type:"tree"}}else if(E=!0,f.splice(y,1),f.length===0&&o){let p=new Uint8Array(0),F=await O.writeBlob({fs:e,dir:a,blob:p});f.push({mode:"100644",oid:F,path:h,type:"blob"})}D=v}if(c){let y=f.findIndex(p=>p.path===c),v=y!==-1?f[y]:void 0;if(d.length>0){if(v&&v.type!=="tree")throw new Error("SubPart of the path for the obj to add is not a tree");let p=await T({dir:a,fs:e,treeOid:v?.oid,addPathParts:d,deletePathParts:void 0,addObj:s,addKeepIfEmpty:o,deleteKeepIfNotEmpty:l});if(p===void 0)throw new Error("in case we add, we expect an update - respectivly a newly created subTreeOid");if(p!==v?.oid){E=!0;let F={mode:"040000",path:c,oid:p,type:"tree"};if(y!==-1)f[y]=F;else if(f.push(F),l&&f.length>1){let S=f.findIndex(k=>k.path===h);S!==-1&&f.splice(S,1)}}}else{if(E=!0,s){let p={mode:s.type==="tree"?"040000":"100644",path:c,oid:s.oid,type:s.type};if(y!==-1)f[y]=p;else{if(l&&f.length>0){let F=f.findIndex(S=>S.path===h);F!==-1&&f.splice(F,1)}f.push(p)}}if(o&&f.length===0){let p=new Uint8Array(0),F=await O.writeBlob({fs:e,dir:a,blob:p});f.push({mode:"100644",oid:F,path:h,type:"blob"})}}}if(f.length===0)return;if(E)return await O.writeTree({fs:e,dir:a,tree:f});if(t===void 0)throw new Error("currentOid should be set - since the sub tree didn't exist and ");return t}}g(T,"I");n(T,"buildUpdatedTree");async function _({filePath:a,gitRoot:e,nodeFs:t,commitSha:r,pathParams:i}){if(!i.filePath){let s=await O.readTree({fs:t,dir:e,oid:r});return{type:"tree",entries:s.tree.map(o=>o.path),oid:s.oid}}return(await O.walk({fs:t,dir:e,trees:[O.TREE({ref:r})],map:n(async(s,[o])=>{if(s===i.filePath&&o){let l=await o.type();if(l==="blob")return{type:"blob",oid:await o.oid()};if(l=="tree"){let h=await O.readTree({fs:t,dir:e,oid:await o.oid()});return{type:"tree",entries:h.tree.map(c=>c.path),oid:h.oid}}}},"map")})).find(s=>s!==void 0)}g(_,"V");n(_,"resolveGitObjAtPath");var z,je=(z=class extends Error{constructor(e,t){super(e),u(this,"code","ENOENT"),u(this,"path"),this.name="ENOENTError",this.path=t,Object.setPrototypeOf(this,z.prototype)}},g(z,"te"),z);n(je,"ENOENTError");var we=je,ge={type:"gitBranchFileVirtualFile",getStats:n(async({gitRoot:a,nodeFs:e,filePath:t,cacheFs:r,pathParams:i})=>{if(i.branchName===void 0)throw new Error("branchName should be in pathParams");let s=await A(e,a,i.branchName);if(!s)throw new we(`ENOENT: no such file or directory, stat '${t}'`,t);let o=await _({filePath:t,gitRoot:a,nodeFs:e,commitSha:s,pathParams:i});if(!o)throw new we(`ENOENT: no such file or directory, stat '${t}'`,t);let l=await b.readCommit({fs:e,dir:a,oid:s}),{commit:h}=l,c=await b.log({fs:e,dir:a,ref:s,filepath:i.filePath,depth:1}),d=h.committer.timestamp*1e3,m=c.length>0?c[0].commit.committer.timestamp*1e3:d;if(o.type==="tree")return{mode:420,size:0,isFile:n(()=>!0,"isFile"),isDirectory:n(()=>!0,"isDirectory"),isSymbolicLink:n(()=>!1,"isSymbolicLink"),isBlockDevice:n(()=>!1,"isBlockDevice"),isCharacterDevice:n(()=>!1,"isCharacterDevice"),isSocket:n(()=>!1,"isSocket"),isFIFO:n(()=>!1,"isFIFO"),isFileSync:n(()=>!0,"isFileSync"),isDirectorySync:n(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:0,atimeMs:m,mtimeMs:m,ctimeMs:m,birthtimeMs:d,atime:new Date(m),mtime:new Date(m),ctime:new Date(m),birthtime:new Date(m)};{let{blob:w}=await b.readBlob({fs:e,dir:a,oid:o.oid});return{mode:420,size:w.length,isFile:n(()=>!0,"isFile"),isDirectory:n(()=>!1,"isDirectory"),isSymbolicLink:n(()=>!1,"isSymbolicLink"),isBlockDevice:n(()=>!1,"isBlockDevice"),isCharacterDevice:n(()=>!1,"isCharacterDevice"),isSocket:n(()=>!1,"isSocket"),isFIFO:n(()=>!1,"isFIFO"),isFileSync:n(()=>!0,"isFileSync"),isDirectorySync:n(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:Math.ceil(w.length/4096),atimeMs:m,mtimeMs:m,ctimeMs:m,birthtimeMs:m,atime:new Date(m),mtime:new Date(m),ctime:new Date(m),birthtime:new Date(m)}}},"getStats"),getFile:n(async({filePath:a,gitRoot:e,nodeFs:t,cacheFs:r,pathParams:i})=>{if(i.branchName===void 0)throw new Error("branchName should be in pathParams");let s=[];try{let o=await A(t,e,i.branchName);if(!o){let h=await b.resolveRef({fs:t,dir:e,ref:"HEAD"});await b.branch({fs:t,dir:e,ref:i.branchName,object:h}),o=await b.resolveRef({fs:t,ref:`refs/heads/${i.branchName}`,dir:e})}let l=await _({filePath:a,gitRoot:e,nodeFs:t,commitSha:o,pathParams:i});if(!l)return;if(l.type==="blob"){let{blob:h}=await b.readBlob({fs:t,dir:e,oid:l.oid});return{type:"file",content:Buffer.from(h),mode:420,size:h.length,oid:l.oid}}else{let h=[];try{let c=await r.promises.stat(a);if(c&&c.isDirectory()){let d=await r.promises.readdir(a,{withFileTypes:!1,encoding:"utf-8"});h.push(...d)}}catch{}return{type:"directory",content:Array.from(new Set([...h,...l.entries])),mode:493}}}catch{return}},"getFile"),unlink:n(async({filePath:a,gitRoot:e,nodeFs:t,cacheFs:r,pathParams:i,author:s})=>{if(!i.branchName)throw new Error("branchName should be in pathParams");if(!i.filePath)throw new Error("filePath should be in pathParams");let o=await b.resolveRef({fs:t,dir:e,ref:i.branchName}),l=await b.readTree({fs:t,dir:e,oid:o}),h=await T({dir:e,fs:t,treeOid:l.oid,deletePathParts:i.filePath.split("/"),addPathParts:void 0,addObj:void 0,deleteKeepIfNotEmpty:!1,addKeepIfEmpty:!0,keepFilename:".keep"});if(h!==l.oid){let c=await b.commit({fs:t,dir:e,message:`Delete ${i.filePath}`,tree:h,noUpdateBranch:!0,parent:[o],author:s});await b.writeRef({fs:t,dir:e,ref:`refs/heads/${i.branchName}`,value:c,force:!0})}},"unlink"),writeFile:n(async({filePath:a,gitRoot:e,nodeFs:t,content:r,cacheFs:i,pathParams:s,author:o})=>{if(s.branchName===void 0)throw new Error("branchName should be in pathParams");if(s.filePath===void 0)throw new Error("filePath should be in pathParams");let l;typeof r=="string"?l=new TextEncoder().encode(r):l=new Uint8Array(r);let h=await b.writeBlob({fs:t,dir:e,blob:l}),c=await A(t,e,s.branchName);if(!c){let w=await b.resolveRef({fs:t,dir:e,ref:"HEAD"});await b.branch({fs:t,dir:e,ref:s.branchName,object:w}),c=await b.resolveRef({fs:t,dir:e,ref:`refs/heads/${s.branchName}`})}let d=await b.readTree({fs:t,dir:e,oid:c}),m=await T({dir:e,fs:t,treeOid:d.oid,deletePathParts:void 0,addPathParts:s.filePath.split("/"),addObj:{type:"blob",oid:h},deleteKeepIfNotEmpty:!0,addKeepIfEmpty:!1,keepFilename:".keep"});if(m!==d.oid){let w=await b.commit({fs:t,dir:e,message:`\u{1F4BE} Change '${s.filePath}'`,tree:m,noUpdateBranch:!0,parent:[c],author:o});await b.writeRef({fs:t,dir:e,ref:`refs/heads/${s.branchName}`,value:w,force:!0})}},"writeFile"),rename:n(async function({filePath:a,newPath:e,gitRoot:t,nodeFs:r,pathParams:i,newPathParams:s,author:o}){if(i.branchName===void 0)throw new Error("branchName should be in pathParams");if(i.filePath===void 0)throw new Error("filePath should be in pathParams");if(s.branchName===void 0)throw new Error("branchName should be in newPathParams");if(s.filePath===void 0)throw new Error("filePath should be in newPathParams");let l=await A(r,t,i.branchName);if(!l)throw new Error("Invalid branch file path - source branch must exist");let h=await A(r,t,s.branchName);if(!h){let w=await b.resolveRef({fs:r,dir:t,ref:"HEAD"});await b.branch({fs:r,dir:t,ref:s.branchName,object:w}),h=await b.resolveRef({fs:r,dir:t,ref:`refs/heads/${s.branchName}`})}if(s.branchName!==i.branchName)throw new Error("cross branch move not implemented yet");let c=await _({gitRoot:t,nodeFs:r,commitSha:l,filePath:a,pathParams:i});if(c===void 0)throw new Error("no obj at path exists");let d=await T({dir:t,fs:r,deletePathParts:i.filePath.split("/"),addPathParts:s.filePath.split("/"),addObj:c,treeOid:h,addKeepIfEmpty:!0,deleteKeepIfNotEmpty:!0}),m=await b.readTree({fs:r,dir:t,oid:l});if(d!==m.oid){let w=await b.commit({fs:r,dir:t,message:`\u{1F500} Rename '${i.filePath}' to '${s.filePath}'`,tree:d,noUpdateBranch:!0,parent:[h],author:o});await b.writeRef({fs:r,dir:t,ref:`refs/heads/${s.branchName}`,value:w,force:!0})}},"rename"),mkdir:n(async function(a){if(a.pathParams.branchName===void 0)throw new Error("branchName should be in pathParams");if(a.pathParams.filePath===void 0)throw new Error("filePath should be in pathParams");try{throw await ge.getStats(a),new Error("Folder exists")}catch{}a.filePath.endsWith("/")&&(a.filePath=a.filePath.replace(/\/+$/,"")),a.pathParams&&typeof a.pathParams.filePath=="string"&&(a.pathParams.filePath=a.pathParams.filePath.replace(/\/+$/,""));let e=await A(a.nodeFs,a.gitRoot,a.pathParams.branchName);if(!e){let o=await b.resolveRef({fs:a.nodeFs,dir:a.gitRoot,ref:"HEAD"});await b.branch({fs:a.nodeFs,dir:a.gitRoot,ref:a.pathParams.branchName,object:o}),e=await b.resolveRef({fs:a.nodeFs,dir:a.gitRoot,ref:`refs/heads/${a.pathParams.branchName}`})}let t=await b.readTree({fs:a.nodeFs,dir:a.gitRoot,oid:e}),r=new Uint8Array(0),i=await b.writeBlob({fs:a.nodeFs,dir:a.gitRoot,blob:r}),s=await T({dir:a.gitRoot,fs:a.nodeFs,treeOid:t.oid,deletePathParts:void 0,addPathParts:[...a.pathParams.filePath.split("/"),".keep"],addObj:{type:"blob",oid:i},deleteKeepIfNotEmpty:!0,addKeepIfEmpty:!0,keepFilename:".keep"});if(s!==t.oid){let o=await b.commit({fs:a.nodeFs,dir:a.gitRoot,message:`\u{1F4BE} Change '${a.pathParams.filePath}'`,tree:s,noUpdateBranch:!0,parent:[e],author:a.author});await b.writeRef({fs:a.nodeFs,dir:a.gitRoot,ref:`refs/heads/${a.pathParams.branchName}`,value:o,force:!0})}},"mkdir"),rmdir:n(async({filePath:a,gitRoot:e,nodeFs:t,cacheFs:r,pathParams:i,author:s})=>{if(!i.branchName)throw new Error("branchName should be in pathParams");if(!i.filePath)throw new Error("filePath should be in pathParams");let o=await b.resolveRef({fs:t,dir:e,ref:i.branchName}),l=await b.readTree({fs:t,dir:e,oid:o}),h=await T({dir:e,fs:t,treeOid:l.oid,deletePathParts:i.filePath.split("/"),addPathParts:void 0,addObj:void 0,deleteKeepIfNotEmpty:!1,addKeepIfEmpty:!0,keepFilename:".keep"});if(h!==l.oid){let c=await b.commit({fs:t,dir:e,message:`Delete ${i.filePath}`,tree:h,noUpdateBranch:!0,parent:[o],author:s});await b.writeRef({fs:t,dir:e,ref:`refs/heads/${i.branchName}`,value:c,force:!0})}},"rmdir")},Ve={type:"gitBranchHeadVirtualFile",getStats:n(async({gitRoot:a,nodeFs:e,pathParams:t})=>{if(t.branchName===void 0)throw new Error("branchName should be in pathParams");let r;try{r=await x.resolveRef({fs:e,dir:a,ref:t.branchName})}catch{r=await x.resolveRef({fs:e,dir:a,ref:`refs/heads/${t.branchName}`})}let i=await x.readCommit({fs:e,dir:a,oid:r}),{commit:s}=i,o=s.committer.timestamp*1e3;return{mode:420,size:40,isFile:n(()=>!0,"isFile"),isDirectory:n(()=>!1,"isDirectory"),isSymbolicLink:n(()=>!1,"isSymbolicLink"),isBlockDevice:n(()=>!1,"isBlockDevice"),isCharacterDevice:n(()=>!1,"isCharacterDevice"),isSocket:n(()=>!1,"isSocket"),isFIFO:n(()=>!1,"isFIFO"),isFileSync:n(()=>!0,"isFileSync"),isDirectorySync:n(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:Math.ceil(40/4096),atimeMs:o,mtimeMs:o,ctimeMs:o,birthtimeMs:o,atime:new Date(o),mtime:new Date(o),ctime:new Date(o),birthtime:new Date(o)}},"getStats"),getFile:n(async({gitRoot:a,nodeFs:e,pathParams:t})=>{if(t.branchName===void 0)throw new Error("branchName should be in pathParams");try{let r;try{r=await x.resolveRef({fs:e,dir:a,ref:t.branchName})}catch{r=await x.resolveRef({fs:e,dir:a,ref:`refs/heads/${t.branchName}`})}return{type:"file",content:r+`
|
|
4
|
+
`,mode:420,size:r.length}}catch{return}},"getFile"),writeFile:n(async({filePath:a,gitRoot:e,nodeFs:t,content:r,cacheFs:i,pathParams:s})=>{if(console.log("gitBranchHeadVirtualFile writeFile called",{pathParams:s,content:r}),s.branchName===void 0)throw new Error("branchName should be in pathParams");let o=r.toString().trim();try{await x.readCommit({fs:t,dir:e,oid:o})}catch{throw new Error(`Commit ${o} does not exist in the repository`)}await x.writeRef({fs:t,dir:e,ref:"refs/heads/"+s.branchName,value:o,force:!0})},"writeFile"),rename(a){throw new Error("not implementsd")},mkdir:n(async function(a){throw new Error("not implemented")},"mkdir")},St={type:"gitBranchTipVirtualFile",getStats:n(async a=>{let e=a.gitRoot+"/.git";try{return await a.nodeFs.stat(e)}catch{throw new Error(`ENOENT: no such file or directory, stat '${e}'`)}},"getStats"),getFile:n(async({filePath:a,gitRoot:e,nodeFs:t,pathParams:r})=>{if(!r.branchName)throw new Error("branchName should be in pathParams");try{let i=await Et.resolveRef({fs:t,dir:e,ref:`refs/heads/${r.branchName}`});return{type:"file",content:i+`
|
|
5
|
+
`,mode:420,size:i.length+1}}catch{return}},"getFile"),rename(a){throw new Error("not implementsd")},mkdir:n(async function(a){throw new Error("not implemented")},"mkdir")},We={type:"gitCommitFileVirtualFile",getStats:n(async({filePath:a,gitRoot:e,nodeFs:t,pathParams:r})=>{if(!r.sha_1_1_2)throw new Error("sha_1_1_2 should be in pathParams");if(!r.sha1_3__40)throw new Error("sha1_3__40 should be in pathParams");let i=r.sha_1_1_2+r.sha1_3__40,s=await _({filePath:a,gitRoot:e,nodeFs:t,commitSha:i,pathParams:r});if(!s)throw new we(`ENOENT: no such file or directory, stat '${a}'`,a);let o=await he.readCommit({fs:t,dir:e,oid:i}),{commit:l}=o,h=l.committer.timestamp*1e3;if(s.type==="tree")return{mode:420,size:0,isFile:n(()=>!0,"isFile"),isDirectory:n(()=>!0,"isDirectory"),isSymbolicLink:n(()=>!1,"isSymbolicLink"),isBlockDevice:n(()=>!1,"isBlockDevice"),isCharacterDevice:n(()=>!1,"isCharacterDevice"),isSocket:n(()=>!1,"isSocket"),isFIFO:n(()=>!1,"isFIFO"),isFileSync:n(()=>!0,"isFileSync"),isDirectorySync:n(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:0,atimeMs:h,mtimeMs:h,ctimeMs:h,birthtimeMs:h,atime:new Date(h),mtime:new Date(h),ctime:new Date(h),birthtime:new Date(h)};{let{blob:c}=await he.readBlob({fs:t,dir:e,oid:s.oid});return{mode:420,size:c.length,isFile:n(()=>!0,"isFile"),isDirectory:n(()=>!1,"isDirectory"),isSymbolicLink:n(()=>!1,"isSymbolicLink"),isBlockDevice:n(()=>!1,"isBlockDevice"),isCharacterDevice:n(()=>!1,"isCharacterDevice"),isSocket:n(()=>!1,"isSocket"),isFIFO:n(()=>!1,"isFIFO"),isFileSync:n(()=>!0,"isFileSync"),isDirectorySync:n(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:Math.ceil(c.length/4096),atimeMs:h,mtimeMs:h,ctimeMs:h,birthtimeMs:h,atime:new Date(h),mtime:new Date(h),ctime:new Date(h),birthtime:new Date(h)}}},"getStats"),getFile:n(async({filePath:a,gitRoot:e,nodeFs:t,pathParams:r})=>{if(!r.sha_1_1_2)throw new Error("sha_1_1_2 should be in pathParams");if(!r.sha1_3__40)throw new Error("sha1_3__40 should be in pathParams");let i=r.sha_1_1_2+r.sha1_3__40;try{let s=await _({filePath:a,gitRoot:e,nodeFs:t,commitSha:i,pathParams:r});if(!s)return;if(s.type==="blob"){let{blob:o}=await he.readBlob({fs:t,dir:e,oid:s.oid});return{type:"file",content:Buffer.from(o),mode:420,size:o.length,oid:s.oid}}else return{type:"directory",content:Array.from(new Set([...s.entries.filter(o=>o!==".keep")])),mode:493}}catch{return}},"getFile"),rename(a){throw new Error("not implementsd")},mkdir:n(async function(a){throw new Error("not implemented")},"mkdir")};function Ke(a,e,t){return a===0&&e===2&&t===0?"untracked":a===1&&e===0&&t===0?"deleted":a===1&&e===2&&t!==0?"modified":a===0&&e===2&&t===2?"added":"unknown"}g(Ke,"dt");n(Ke,"getFileStatus");var Dt={type:"gitStatusVirtualFile",getStats:n(async a=>{let e=a.gitRoot+"/.git";try{return await a.nodeFs.stat(e)}catch{throw new Error(`ENOENT: no such file or directory, stat '${e}'`)}},"getStats"),getFile:n(async({gitRoot:a,nodeFs:e})=>{try{let t=await ce.currentBranch({fs:e,dir:a})||"HEAD",r=await ce.resolveRef({fs:e,dir:a,ref:"HEAD"}),i=(await ce.statusMatrix({fs:e,dir:a})).filter(([,o,l,h])=>o!==l||l!==h).map(([o,l,h,c])=>({path:o,status:Ke(l,h,c)})),s=JSON.stringify({branch:t,commit:r,clean:i.length===0,files:i},null,2);return{type:"file",content:s,mode:33188,size:Buffer.byteLength(s)}}catch(t){throw console.error(t),t}},"getFile"),rename(a){throw new Error("not implementsd")},mkdir:n(async function(a){throw new Error("not implemented")},"mkdir")},ue={type:"legitVirtualFile",getStats:n(async({gitRoot:a,nodeFs:e})=>{let t=a+"/.git";try{return await e.stat(t)}catch{throw new Error(`ENOENT: no such file or directory, stat '${t}'`)}},"getStats"),getFile:n(async({gitRoot:a,nodeFs:e})=>({type:"directory",content:[],mode:493,size:0}),"getFile"),rename(a){throw new Error("not implementsd")},mkdir:n(async function(a){throw new Error("not implemented")},"mkdir")},Pt=[ue,Dt,We,Ue,ge,Ve,St],q,Je=(q=class{constructor(e){this.routes=e,u(this,"compiledRoutes");let t={},r=n((i,s)=>{if(typeof i.type=="string"){t[s]={handler:i,siblings:[]};let o=i}else{let o=[];for(let[l,h]of Object.entries(i))if(l==="."){if(t[s])throw new Error(`Conflict: multiple handlers for path '${s}', '.' and optional '[[parameter_name]]' defined?`);t[s]={handler:h,siblings:o}}else if(l.startsWith("[[")&&l.endsWith("]]")){if(t[s])throw new Error(`Conflict: multiple handlers for path '${s}', '.' and optional '[[parameter_name]]' defined?`);t[s]={handler:h,siblings:o},l.startsWith("[[...")?t[s?`${s}/${l}`:l]={handler:h,siblings:[]}:r(h,s?`${s}/${l}`:l)}else l.startsWith("[")&&l.endsWith("]")?l.startsWith("[...")?t[s?`${s}/${l}`:l]={handler:h,siblings:[]}:r(h,s?`${s}/${l}`:l):(o.push(l),r(h,s?`${s}/${l}`:l))}},"walk");for(let[i,s]of Object.entries(e))r(s,i);this.compiledRoutes=Object.entries(t).map(([i,s])=>{let o=[],l=i.split("/").map(h=>{if(h.startsWith("[[")&&h.endsWith("]]")){let c=h.slice(2,-2).replace(/^\.\.\./,"");return o.push(c),"(.*)"}if(h.startsWith("[")&&h.endsWith("]")){let c=h.slice(1,-1);return o.push(c),"([^/]+)"}return h.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}).join("/");return{regex:new RegExp(`^${l}$`),paramNames:o,staticSiblings:s.siblings,handler:s.handler}})}match(e){e.length>1&&e.endsWith("/")&&(e=e.replace(/\/+$/,""));for(let{regex:t,paramNames:r,handler:i,staticSiblings:s}of this.compiledRoutes){let o=e.match(t);if(!o)continue;let l={};for(let h=0;h<r.length;h++)l[r[h]]=decodeURIComponent(o[h+1]||"");return{handler:i,params:l,staticSiblings:s}}}},g(q,"Pe"),q);n(Je,"LegitPathRouter");var kt=Je,Re={type:"gitCommitVirtualFolder",getStats:n(async a=>{let e=a.gitRoot+"/.git";try{return await a.nodeFs.stat(e)}catch{throw new Error(`ENOENT: no such file or directory, stat '${e}'`)}},"getStats"),getFile:n(async({filePath:a,gitRoot:e,nodeFs:t,pathParams:r})=>{let i=await de.listBranches({fs:t,dir:e}),s=new Set,o=new Set;for(let c of i){let d=`refs/heads/${c}`;try{let m=await de.resolveRef({fs:t,dir:e,ref:d});s.add(m)}catch{}}for(let c of s){let d=await de.log({fs:t,dir:e,ref:c});for(let m of d)o.add(m.oid)}if(!r.sha_1_1_2){let c=new Set;for(let m of o)if(c.add(m.slice(0,2)),c.size>=256)break;let d=Array.from(c).sort();return{type:"directory",content:d,mode:493,size:d}}let l=new Set;for(let c of o)c.startsWith(r.sha_1_1_2)&&l.add(c.slice(2,40));let h=Array.from(l).sort();return{type:"directory",content:h,mode:493,size:h.length}},"getFile"),rename(a){throw new Error("not implementsd")},mkdir:n(async function(a){throw new Error("not implemented")},"mkdir")},Ge="-operation";async function $(a,e,t){return(await Rt.listBranches({fs:a,dir:e})).filter(r=>r.endsWith("__"+t+Ge))[0]}g($,"D");n($,"resolveOperationBranchName");var Nt={type:"gitBranchOperationVirtualFile",getStats:n(async a=>{let{gitRoot:e,nodeFs:t,pathParams:r}=a,i;try{i=await N.resolveRef({fs:t,dir:e,ref:`refs/heads/${r.branchName}`})}catch{throw new Error(`Base Branch ${r.branchName} for operations does not exis`)}let s=await $(t,e,r.branchName),o=!1;if(s)try{i=await N.resolveRef({fs:t,dir:e,ref:s}),o=!0}catch{try{i=await N.resolveRef({fs:t,dir:e,ref:`refs/heads/${s}`}),o=!0}catch{}}let l=await N.readCommit({fs:t,dir:e,oid:i}),{commit:h}=l,c=h.committer.timestamp*1e3;try{return{mode:420,size:40,atimeMs:c,mtimeMs:c,ctimeMs:c,birthtimeMs:c,atime:new Date(c),mtime:new Date(c),ctime:new Date(c),birthtime:new Date(c),isFile:n(()=>!0,"isFile"),isDirectory:n(()=>!1,"isDirectory"),isSymbolicLink:n(()=>!1,"isSymbolicLink"),isBlockDevice:n(()=>!1,"isBlockDevice"),isCharacterDevice:n(()=>!1,"isCharacterDevice"),isSocket:n(()=>!1,"isSocket"),isFIFO:n(()=>!1,"isFIFO"),isFileSync:n(()=>!0,"isFileSync"),isDirectorySync:n(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:0}}catch{throw new Error("ENOENT: no such file or directory, stat operationHistory")}},"getStats"),getFile:n(async a=>{let{gitRoot:e,nodeFs:t,pathParams:r}=a,i=await $(t,e,r.branchName),s,o=!1;return i?(s=await N.resolveRef({fs:t,dir:e,ref:`refs/heads/${i}`}),o=!0):s=await N.resolveRef({fs:t,dir:e,ref:`refs/heads/${r.branchName}`}),{type:"file",content:Buffer.from(s),mode:420,size:s.length}},"getFile"),writeFile:n(async({filePath:a,gitRoot:e,nodeFs:t,content:r,cacheFs:i,pathParams:s,author:o})=>{if(s.branchName===void 0)throw new Error("branchName should be in pathParams");let l;typeof r=="string"?l=new TextEncoder().encode(r):l=new Uint8Array(r);let h=await N.writeBlob({fs:t,dir:e,blob:l}),c=await A(t,e,s.branchName);if(!c)throw new Error("Invalid branch file path - branch doesn't exist");let d=await $(t,e,s.branchName),m=!1;d||(d="legit/__"+s.branchName+Ge,await N.branch({fs:t,dir:e,ref:d,object:c}),m=!0);let w=await N.resolveRef({fs:t,dir:e,ref:`refs/heads/${d}`}),f=await N.readTree({fs:t,dir:e,oid:c}),E;r instanceof ArrayBuffer?E=Buffer.from(r).toString("utf-8"):typeof r=="string"?E=r:r instanceof Uint8Array?E=Buffer.from(r).toString("utf-8"):E=String(r);let D=!1;if(!m){let v=await N.findMergeBase({fs:t,dir:e,oids:D?[w]:[w,c]});v.length===1&&v[0]===c&&(D=!0)}let y=await N.commit({fs:t,dir:e,message:E,tree:f.oid,noUpdateBranch:!0,author:o,parent:D?m?[c,c]:[w]:[w,c]});await N.writeRef({fs:t,dir:e,ref:`refs/heads/${d}`,value:y,force:!0})},"writeFile"),rename:n(async function({filePath:a,newPath:e,gitRoot:t,nodeFs:r,pathParams:i,newPathParams:s}){throw new Error("not implemented")},"rename"),mkdir:n(async function(a){throw new Error("not implemented")},"mkdir")},qe={type:"gitBranchOperationsVirtualFile",getStats:n(async a=>{let{gitRoot:e,nodeFs:t,pathParams:r}=a;if(r.branchName===void 0)throw new Error("branchName should be in pathParams");let i=await $(t,e,r.branchName),s,o=!1;if(i)try{s=await M.resolveRef({fs:t,dir:e,ref:i}),o=!0}catch{try{s=await M.resolveRef({fs:t,dir:e,ref:`refs/heads/${i}`}),o=!0}catch{throw new Error(`Base Branch ${r.branchName} for operations does not exis`)}}else try{s=await M.resolveRef({fs:t,dir:e,ref:`refs/heads/${r.branchName}`})}catch{throw new Error(`Base Branch ${r.branchName} for operations does not exis`)}let l=await M.readCommit({fs:t,dir:e,oid:s}),{commit:h}=l,c=h.committer.timestamp*1e3;try{return{mode:420,size:(o?await qe.getFile(a):void 0)?.content?.length??0,atimeMs:c,mtimeMs:c,ctimeMs:c,birthtimeMs:c,atime:new Date(c),mtime:new Date(c),ctime:new Date(c),birthtime:new Date(c),isFile:n(()=>!0,"isFile"),isDirectory:n(()=>!1,"isDirectory"),isSymbolicLink:n(()=>!1,"isSymbolicLink"),isBlockDevice:n(()=>!1,"isBlockDevice"),isCharacterDevice:n(()=>!1,"isCharacterDevice"),isSocket:n(()=>!1,"isSocket"),isFIFO:n(()=>!1,"isFIFO"),isFileSync:n(()=>!0,"isFileSync"),isDirectorySync:n(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:0}}catch{throw new Error("ENOENT: no such file or directory, stat operationHistory")}},"getStats"),getFile:n(async a=>{let{gitRoot:e,nodeFs:t,pathParams:r}=a,i=await $(t,e,r.branchName),s=[];if(i){let h=await M.resolveRef({fs:t,dir:e,ref:`refs/heads/${i}`}),c=!1,d=h;for(;d&&!c;){let m=await M.readCommit({fs:t,dir:e,oid:d});s.push({oid:m.oid,parentOids:m.commit.parent,message:m.commit.message,originBranchOid:"unset"}),d=m.commit.parent&&m.commit.parent.length>0?m.commit.parent[0]:null,m.commit.parent.length===2&&m.commit.parent[0]===m.commit.parent[1]&&(c=!0)}}let o;for(let h=s.length-1;h>=0;h--){let c=s[h];if(o===void 0){if(c.parentOids.length!==2&&c.parentOids[0]!==c.parentOids[1])throw new Error(`Operation commit ${c.oid} does not have two parents as expected`);o=c.parentOids[1]}c.parentOids.length===2&&(o=c.parentOids[1]),c.originBranchOid=o}let l=Buffer.from(JSON.stringify(s,null,2),"utf-8");return{type:"file",content:l,mode:420,size:l.length}},"getFile"),rename:n(async function(a){throw new Error("not implemented")},"rename"),mkdir:n(async function(a){throw new Error("not implemented")},"mkdir")},$t=new Set([" ","~","^",":","?","*","[","\\"]),Ot=[/^\/|\/$/,/\/\//,/\.$/,/\.lock$/,/^@$/,/@\{/],Ze="\u2002";function Fe(a){let e=a.codePointAt(0);return!(e>=0&&e<=31||e===127||$t.has(a))}g(Fe,"Ae");n(Fe,"isValidChar");function Xe(a){let e="";for(let t of a)t===" "?e+=Ze:Fe(t)?e+=t:e+="%"+t.codePointAt(0);for(let t of Ot)if(t.test(e))return Array.from(e).map(r=>Fe(r)?r:"%"+r.codePointAt(0)).join("");return e}g(Xe,"xe");n(Xe,"encodeName");function Ye(a){return a.replace(/%(\d+)/g,(e,t)=>String.fromCodePoint(parseInt(t,10))).replace(new RegExp(Ze,"g")," ")}g(Ye,"Ve");n(Ye,"decodeName");var Bt={type:"getThreadName",getStats:n(async a=>{let{gitRoot:e,nodeFs:t,pathParams:r}=a,i;try{i=await X.resolveRef({fs:t,dir:e,ref:`refs/heads/${r.branchName}`})}catch{throw new Error(`Base Branch ${r.branchName} for operations does not exis`)}let s=await $(t,e,r.branchName),o=!1;if(s)try{i=await X.resolveRef({fs:t,dir:e,ref:s}),o=!0}catch{try{i=await X.resolveRef({fs:t,dir:e,ref:`refs/heads/${s}`}),o=!0}catch{}}let l=await X.readCommit({fs:t,dir:e,oid:i}),{commit:h}=l,c=h.committer.timestamp*1e3;try{return{mode:420,size:40,atimeMs:c,mtimeMs:c,ctimeMs:c,birthtimeMs:c,atime:new Date(c),mtime:new Date(c),ctime:new Date(c),birthtime:new Date(c),isFile:n(()=>!0,"isFile"),isDirectory:n(()=>!1,"isDirectory"),isSymbolicLink:n(()=>!1,"isSymbolicLink"),isBlockDevice:n(()=>!1,"isBlockDevice"),isCharacterDevice:n(()=>!1,"isCharacterDevice"),isSocket:n(()=>!1,"isSocket"),isFIFO:n(()=>!1,"isFIFO"),isFileSync:n(()=>!0,"isFileSync"),isDirectorySync:n(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:0}}catch{throw new Error("ENOENT: no such file or directory, stat operationHistory")}},"getStats"),getFile:n(async a=>{let{gitRoot:e,nodeFs:t,pathParams:r}=a,i=await $(t,e,r.branchName),s;if(i){let o="legit/",l=`__${r.branchName}-operation`;return i.startsWith(o)&&i.endsWith(l)?s=i.slice(o.length,i.length-l.length):s=i,{type:"file",content:Buffer.from(Ye(s)),mode:420,size:s.length}}return{type:"file",content:Buffer.from(""),mode:420,size:0}},"getFile"),writeFile:n(async({filePath:a,gitRoot:e,nodeFs:t,content:r,cacheFs:i,pathParams:s})=>{if(s.branchName===void 0)throw new Error("branchName should be in pathParams");let o=await $(t,e,s.branchName);if(o){let l=`legit/${Xe(r.toString())}__${s.branchName}-operation`;await X.renameBranch({fs:t,dir:e,oldref:o,ref:l}),o=l}},"writeFile"),rename:n(async function({filePath:a,newPath:e,gitRoot:t,nodeFs:r,pathParams:i,newPathParams:s}){throw new Error("not implemented")},"rename"),mkdir:n(async function(a){throw new Error("not implemented")},"mkdir")},Ct={type:"gitBranchHistory",getStats:n(async({gitRoot:a,nodeFs:e,pathParams:t})=>{if(t.branchName===void 0)throw new Error("branchName should be in pathParams");let r;try{r=await Y.resolveRef({fs:e,dir:a,ref:t.branchName})}catch{r=await Y.resolveRef({fs:e,dir:a,ref:`refs/heads/${t.branchName}`})}let i=await Y.readCommit({fs:e,dir:a,oid:r}),{commit:s}=i,o=s.committer.timestamp*1e3;return{mode:420,size:1e5,isFile:n(()=>!0,"isFile"),isDirectory:n(()=>!1,"isDirectory"),isSymbolicLink:n(()=>!1,"isSymbolicLink"),isBlockDevice:n(()=>!1,"isBlockDevice"),isCharacterDevice:n(()=>!1,"isCharacterDevice"),isSocket:n(()=>!1,"isSocket"),isFIFO:n(()=>!1,"isFIFO"),isFileSync:n(()=>!0,"isFileSync"),isDirectorySync:n(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:Math.ceil(40/4096),atimeMs:o,mtimeMs:o,ctimeMs:o,birthtimeMs:o,atime:new Date(o),mtime:new Date(o),ctime:new Date(o),birthtime:new Date(o)}},"getStats"),getFile:n(async a=>{let{gitRoot:e,nodeFs:t,pathParams:r}=a,i=r.branchName,s=[];if(i){let l=await Y.resolveRef({fs:t,dir:e,ref:`refs/heads/${i}`}),h=!1,c=l;for(;c&&!h;){let d=await Y.readCommit({fs:t,dir:e,oid:c});s.push({oid:d.oid,...d.commit}),c=d.commit.parent[0]}}let o=Buffer.from(JSON.stringify(s,null,2),"utf-8");return{type:"file",content:o,mode:420,size:o.length}},"getFile"),rename:n(async a=>{throw new Error("not implemented")},"rename"),mkdir:n(async function(a){throw new Error("not implemented")},"mkdir")},Tt={type:"gitBranchOperationHeadVirtualFile",getStats:n(async({gitRoot:a,nodeFs:e,pathParams:t})=>{if(t.branchName===void 0)throw new Error("branchName should be in pathParams");let r=await $(e,a,t.branchName);if(!r){let h=new Date(0);return{mode:420,size:0,isFile:n(()=>!0,"isFile"),isDirectory:n(()=>!1,"isDirectory"),isSymbolicLink:n(()=>!1,"isSymbolicLink"),isBlockDevice:n(()=>!1,"isBlockDevice"),isCharacterDevice:n(()=>!1,"isCharacterDevice"),isSocket:n(()=>!1,"isSocket"),isFIFO:n(()=>!1,"isFIFO"),isFileSync:n(()=>!0,"isFileSync"),isDirectorySync:n(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:Math.ceil(40/4096),atimeMs:h.getTime(),mtimeMs:h.getTime(),ctimeMs:h.getTime(),birthtimeMs:h.getTime(),atime:h,mtime:h,ctime:h,birthtime:h}}let i;try{i=await C.resolveRef({fs:e,dir:a,ref:r})}catch{i=await C.resolveRef({fs:e,dir:a,ref:`refs/heads/${r}`})}let s=await C.readCommit({fs:e,dir:a,oid:i}),{commit:o}=s,l=o.committer.timestamp*1e3;return{mode:420,size:40,isFile:n(()=>!0,"isFile"),isDirectory:n(()=>!1,"isDirectory"),isSymbolicLink:n(()=>!1,"isSymbolicLink"),isBlockDevice:n(()=>!1,"isBlockDevice"),isCharacterDevice:n(()=>!1,"isCharacterDevice"),isSocket:n(()=>!1,"isSocket"),isFIFO:n(()=>!1,"isFIFO"),isFileSync:n(()=>!0,"isFileSync"),isDirectorySync:n(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:Math.ceil(40/4096),atimeMs:l,mtimeMs:l,ctimeMs:l,birthtimeMs:l,atime:new Date(l),mtime:new Date(l),ctime:new Date(l),birthtime:new Date(l)}},"getStats"),getFile:n(async({gitRoot:a,nodeFs:e,pathParams:t})=>{if(t.branchName===void 0)throw new Error("branchName should be in pathParams");let r=await $(e,a,t.branchName);if(!r)return{type:"file",content:"",mode:420,size:0};try{let i;try{i=await C.resolveRef({fs:e,dir:a,ref:r})}catch{i=await C.resolveRef({fs:e,dir:a,ref:`refs/heads/${r}`})}return{type:"file",content:i+`
|
|
6
|
+
`,mode:420,size:i.length}}catch{return}},"getFile"),writeFile:n(async({filePath:a,gitRoot:e,nodeFs:t,content:r,cacheFs:i,pathParams:s})=>{if(s.branchName===void 0)throw new Error("branchName should be in pathParams");let o=await $(t,e,s.branchName),l=await C.resolveRef({fs:t,dir:e,ref:`refs/heads/${o}`});if(!o)throw new Error(`Operation branch name could not be resolved for branch ${s.branchName}`);let h=r.toString().trim(),c,d,m=!1;if(!l)throw new Error(`Operation branch ref could not be resolved for branch ${o}`);let w=l;for(;w&&!m;){let f=await C.readCommit({fs:t,dir:e,oid:w});if(f.oid===h&&(c=f.oid),w=f.commit.parent&&f.commit.parent.length>0?f.commit.parent[0]:null,f.commit.parent.length===2){if(f.commit.parent[0]===f.commit.parent[1])m=!0;else if(c!==void 0){d=f.commit.parent[1];break}}}if(c===void 0)throw new Error(`Cant rollback to ${h} couldn't find newOperationBranchHead ${c}`);if(d===void 0)throw new Error(`Cant rollback to ${h} couldn't find newBranchHead ${d}`);await C.writeRef({fs:t,dir:e,ref:"refs/heads/"+o,value:c,force:!0}),await C.writeRef({fs:t,dir:e,ref:"refs/heads/"+s.branchName,value:d,force:!0})},"writeFile"),rename(a){throw new Error("not implementsd")},mkdir:n(async function(a){throw new Error("not implemented")},"mkdir")},B,ie=(B=class extends Q{constructor({name:e,parentFs:t,gitStorageFs:r,gitRoot:i,virtualFiles:s=Pt}){super({name:e,parentFs:t,gitRoot:i}),u(this,"memFs"),u(this,"openFh",{}),u(this,"virtualFiles"),u(this,"legitFileNames"),u(this,"storageFs"),this.gitRoot=i,this.storageFs=r,this.memFs=bt(new vt),this.virtualFiles=s,this.legitFileNames=["branches","commits"]}async getAuthor(){let e=await ke.getConfig({fs:this.storageFs,dir:this.gitRoot,path:"user.name"}),t=await ke.getConfig({fs:this.storageFs,dir:this.gitRoot,path:"user.email"}),r=Math.floor(Date.now()/1e3),i=new Date().getTimezoneOffset();return{name:e,email:t,date:r,timezoneOffset:i}}async responsible(e){return this.isLegitPath(e)}isLegitPath(e){return e.includes(`/${B.LEGIT_DIR}/`)||e.includes(`/${B.LEGIT_DIR}`)}getRouteHandler(e){let t=e.indexOf(`/${B.LEGIT_DIR}`);if(t===-1)throw new Error("Not a legit path");let r=e.slice(t+1);return B.pathRouter.match(r)}async open(e,t,r){let i=this.getRouteHandler(e);if(!i)throw new Error("Not a virtual legit file");if(i?.handler.writeFile===void 0&&(t.includes("w")||t.includes("a")))throw new Error(`Write operations not allowed for ${i?.handler.type}`);if(t.includes("x")&&i?.handler.type!=="gitBranchFileVirtualFile")throw new Error(`Exclusive operations not allowed for ${i?.handler.type}`);let s=await i.handler.getFile({cacheFs:this.memFs,filePath:e,gitRoot:this.gitRoot,nodeFs:this.storageFs,pathParams:i.params,author:await this.getAuthor()}),o=!1;for(let m of Object.values(this.openFh))m.path===e&&(o=!0);if((s||o)&&t.includes("x"))throw Object.assign(new Error(`EEXIST: file already exists, open '${e}'`),{code:"EEXIST",errno:-17,syscall:"open",path:e});if(!s&&!o&&!(t.includes("w")||t.includes("a")))throw Object.assign(new Error(`ENOENT: no such file or directory, open '${e}'`),{code:"ENOENT",errno:-2,syscall:"open",path:e});let l=pe.dirname(e);if(await this.memFs.promises.mkdir(l,{recursive:!0}),s===void 0&&!t.includes("x")||s&&s.type==="file")try{let m=await this.memFs.promises.access(e)}catch{await this.memFs.promises.writeFile(e,"")}let h=await this.memFs.promises.open(e,t,r),c=h.fd,d=new se({fs:this,compositeFs:this.compositFs,subFsFileDescriptor:c,parentFsFileDescriptors:[]});return this.openFh[c]={path:e,mode:t,fh:h,openSha:s?.oid,readSha:void 0,unflushed:[]},(t.includes("x")||t.includes("w"))&&this.openFh[c].unflushed.push({length:0,start:0}),d}async mkdir(e,t){let r=e.toString(),i=this.getRouteHandler(r),s=t?{options:t}:{};try{await i?.handler.mkdir({cacheFs:this.memFs,filePath:e.toString(),nodeFs:this.storageFs,gitRoot:this.gitRoot,pathParams:i.params,...s,author:await this.getAuthor()});let o=typeof t=="object"?{...t,recursive:!0}:{recursive:!0};await this.memFs.promises.mkdir(e,o);let l=r.split("/"),h="";for(let c=1;c<=l.length;c++){h=l.slice(0,c).join("/");try{if((await this.memFs.promises.stat(h)).isDirectory()){let d=await this.memFs.promises.open(h,"r");this.openFh[d.fd]={path:h,mode:"r",fh:d,openSha:void 0,readSha:void 0,unflushed:[]}}}catch{}}}catch(o){throw o}}async access(e,t){await this.stat(e)}async futimes(e,t,r){let i=this.openFh[e.subFsFileDescriptor];if(!i)throw new Error("Invalid file handle");return await i.fh.utimes(t,r)}async fstat(e,t){let r=this.openFh[e.subFsFileDescriptor];if(!r)throw new Error("Invalid file handle");return this.stat(r.path,t)}async ftruncate(e,t){let r=this.openFh[e.subFsFileDescriptor];if(!r)throw new Error("Invalid file handle");return r.unflushed.push({length:0,start:0}),await r.fh.truncate(t)}async stat(e,t){let r=e.toString(),i=Object.values(this.openFh).find(o=>o.path===r&&o.unflushed.length>0);if(i&&i.unflushed.length>0)return await i.fh.stat(t);let s=this.getRouteHandler(r);if(!s)throw new Error(`ENOENT: no such file or directory, stat '${r}'`);return await s.handler.getStats({cacheFs:this.memFs,filePath:r,gitRoot:this.gitRoot,nodeFs:this.storageFs,pathParams:s.params,author:await this.getAuthor()})}async lstat(e,t){return this.stat(e,t)}async readdir(e,t){let r=e.toString();if(!this.isLegitPath(r))return[".legit"];let i=this.getRouteHandler(r);if(!i)throw new Error(`ENOENT: no such file or directory, scandir '${r}'`);let s=await i?.handler.getFile({cacheFs:this.memFs,filePath:r,gitRoot:this.gitRoot,nodeFs:this.storageFs,pathParams:i.params,author:await this.getAuthor()});if(s){if(s.type!=="directory")throw new Error("not a folder");let o=i?.staticSiblings??[],l=s.content;return l&&!Array.isArray(s.content)&&(l=JSON.parse(s.content)),Array.from(new Set([...l,...o])).sort((h,c)=>h.localeCompare(c,void 0,{numeric:!0,sensitivity:"base"}))}return[]}async read(e,t,r,i,s){let o=e.subFsFileDescriptor,l=this.openFh[o];if(!l)throw new Error("Invalid file handle");if(l.unflushed.length===0){let h=this.getRouteHandler(l.path),c=await h.handler.getFile({cacheFs:this.memFs,filePath:l.path,gitRoot:this.gitRoot,nodeFs:this.storageFs,pathParams:h?.params,author:await this.getAuthor()});if(!c?.content)throw new Error("couldnt access content");if(c.type!=="file")throw new Error("not a file");let d=typeof c.content=="string"?Buffer.from(c.content):c.content,m=typeof s=="number"?s:0,w=Math.min(m+i,d.length),f=Math.max(0,w-m);return d.copy(t,r,m,m+f),{bytesRead:f,buffer:t}}return await l.fh.read(t,r,i,s)}async write(e,t,r,i,s){let o=this.openFh[e.subFsFileDescriptor];if(!o)throw new Error("Invalid file handle");let l=o.mode;if(!l.includes("w")&&!l.includes("a")&&!l.includes("+"))throw Object.assign(new Error("EBADF: bad file descriptor, write"),{code:"EBADF",errno:-9,syscall:"write"});if(o.unflushed.length===0){let m=this.getRouteHandler(o.path),w=await m.handler.getFile({cacheFs:this.memFs,filePath:o.path,gitRoot:this.gitRoot,nodeFs:this.storageFs,pathParams:m.params,author:await this.getAuthor()});w&&w.oid&&(await this.memFs.promises.writeFile(o.path,w.content),o.readSha=w.oid)}let h=await o.fh.write(t,r,i,s),c=r??0,d=s??0;return o.unflushed.push({start:d,length:i||t.byteLength-c+d}),h}async close(e){let t=e.subFsFileDescriptor,r=this.openFh[t];if(!r)throw new Error("Invalid file handle");try{await this.dataSync(e),await r.fh.close()}finally{delete this.openFh[t]}}async dataSync(e){let t=e.subFsFileDescriptor,r=this.openFh[t];if(!r)throw new Error("Invalid file handle");if(r.unflushed.length>0){let i=this.getRouteHandler(r.path);if(i&&i.handler.writeFile){let s=await this.memFs.promises.readFile(r.path);await i.handler.writeFile({cacheFs:this.memFs,filePath:r.path,gitRoot:this.gitRoot,nodeFs:this.storageFs,content:s,pathParams:i.params,author:await this.getAuthor()})}r.unflushed=[]}}async readFile(e,t){let r=typeof e=="string"?e:Buffer.isBuffer(e)?e.toString():e.fd?`FileHandle(${e.fd})`:e.toString(),i=null;typeof t=="string"?i=t:t&&typeof t=="object"&&t.encoding&&(i=t.encoding);let s=await this.open(r,"r");try{let o=(await this.fstat(s)).size,l=Buffer.alloc(o);return await this.read(s,l,0,o,0),await this.close(s),i?l.toString(i):l}catch(o){try{await this.close(s)}catch{}throw o}}async writeFile(e,t,r){let i="w",s="utf8",o;typeof r=="string"?s=r:r&&typeof r=="object"&&(r.flag&&(i=String(r.flag)),r.encoding&&(s=r.encoding),r.mode&&(o=typeof r.mode=="string"?parseInt(r.mode,8):r.mode));let l=await this.open(e,i,o);try{let h;typeof t=="string"?h=Buffer.from(t,s):Buffer.isBuffer(t)?h=t:t instanceof Uint8Array?h=Buffer.from(t):ArrayBuffer.isView(t)?h=Buffer.from(t.buffer,t.byteOffset,t.byteLength):h=Buffer.from(t),await this.write(l,h,0,h.length,0)}finally{await this.close(l)}}async rename(e,t){let r=e.toString(),i=t.toString(),s=this.getRouteHandler(r),o=this.getRouteHandler(i);if(s?.handler.type==="gitBranchFileVirtualFile"&&o?.handler.type==="gitBranchFileVirtualFile"){let l=!0;try{await this.memFs.promises.access(i)}catch{l=!1}let h=!0;try{await this.stat(i)}catch{h=!1}let c=!0;try{await this.stat(r)}catch{c=!1}let d=!0;try{await this.memFs.promises.access(r)}catch{d=!1}if(d){let f=pe.dirname(i);try{await this.memFs.promises.access(f)}catch{await this.memFs.promises.mkdir(f,{recursive:!0})}await this.memFs.promises.rename(e,t)}let m=this.getRouteHandler(r);if(!m)throw new Error("VF not found");let w=await m.handler.rename({cacheFs:this.memFs,filePath:r,gitRoot:this.gitRoot,nodeFs:this.storageFs,newPath:i,pathParams:m?.params??{},newPathParams:o?.params??{},author:await this.getAuthor()})}else throw new Error(`Unsupported rename operation from ${s?.handler.type} to ${o?.handler.type}`)}async fchmod(e,t){}async unlink(e){let t=e.toString(),r=this.getRouteHandler(t);if(r?.handler.unlink!==void 0)try{await r.handler.unlink({cacheFs:this.memFs,filePath:t,nodeFs:this.storageFs,gitRoot:this.gitRoot,pathParams:r.params,author:await this.getAuthor()})}catch(i){let s=!1;for(let[o,l]of Object.entries(this.openFh))l.path===t&&l.unflushed.length>0&&(s=!0);if(!s)throw i}finally{let i=!1;for(let[s,o]of Object.entries(this.openFh))o.path===t&&(i=!0,await o.fh.close(),delete this.openFh[Number(s)]);i&&await this.memFs.promises.unlink(t)}else throw new Error(`Cannot unlink ${r?.handler.type} files`)}async rmdir(e,...t){let r=e.toString(),i=this.getRouteHandler(r);if(i?.handler.rmdir!==void 0){await i.handler.rmdir({cacheFs:this.memFs,filePath:r,nodeFs:this.storageFs,gitRoot:this.gitRoot,pathParams:i.params,author:await this.getAuthor()});let s=!1;for(let[o,l]of Object.entries(this.openFh))l.path===r&&(s=!0,await l.fh.close(),delete this.openFh[Number(o)]);s&&await this.memFs.promises.rmdir(r,{recursive:!0})}else throw new Error(`Cannot rmdir
|
|
7
|
+
${i?.handler.type} directories`)}fileType(){return 10}},g(B,"$"),B);n(ie,"GitSubFs"),u(ie,"LEGIT_DIR",".legit"),u(ie,"pathRouter",new kt({".legit":{".":ue,branches:{".":Ue,"[branchName]":{".legit":{".":ue,operation:Nt,head:Ve,operationHead:Tt,operationHistory:qe,threadName:Bt,history:Ct},"[[...filePath]]":ge}},commits:{".":Re,"[sha_1_1_2]":{".":Re,"[sha1_3__40]":{"[[...filePath]]":We}}}}}));var It=ie,L="legit",Lt=n(({fs:a,gitRepoPath:e,serverUrl:t="https://hub.legitcontrol.com",auth:r,anonymousBranch:i,authHeaderPrefix:s="Bearer "})=>{let o=!1;async function l(y){let v=await r.getMaxAccessTokenForBranch(y);if(!v)throw new Error(`No access token for branch ${y}`);await R.fetch({fs:a,http:me,dir:e,singleBranch:!0,ref:`${y}`,remote:L,url:t,headers:{Authorization:`${s}${v}`}});let p=await R.resolveRef({fs:a,dir:e,ref:`${L}/${y}`});await R.writeRef({fs:a,dir:e,ref:`refs/heads/${y}`,value:p})}g(l,"l"),n(l,"loadBranch");let h=[];async function c(){let y=await r.getMaxAccessTokenForBranch("todo");await R.fetch({fs:a,http:me,dir:e,remote:L,url:t,headers:{Authorization:`${s}${y}`}});let v=await R.listBranches({fs:a,dir:e});for(let p of v){if(p===i)continue;let F=`${L}/${p}`,S,k;try{S=await R.resolveRef({fs:a,dir:e,ref:p})}catch(I){console.log(`Could not resolve local ref ${p}:`,I)}try{k=await R.resolveRef({fs:a,dir:e,ref:F})}catch{k=void 0}if(S&&k){if(S!==k){let I=await R.findMergeBase({fs:a,dir:e,oids:[S,k]});if(I[0]!==S&&I[0]!==k){let ee=await R.merge({fs:a,dir:e,ours:S,theirs:k,fastForwardOnly:!1,abortOnConflict:!1,author:{name:"Your Name",email:"your.email@example.com"},mergeDriver:n(async({branches:te,contents:Z,path:ne})=>{let[Gt,nt,Ee]=Z;return console.log(`Merging ${te[0]} with ${te[1]}...`),console.log("merged:"),console.log(Z),{cleanMerge:!0,mergedText:Ee===void 0?nt:Ee}},"mergeDriver")});await R.writeRef({fs:a,dir:e,ref:`refs/heads/${p}`,value:ee.oid,force:!0})}I[0]===S?(console.log(`branch ${p} differs - remote ahaed, not behind`),await R.writeRef({fs:a,dir:e,ref:`refs/heads/${p}`,value:k,force:!0})):I[0]===k?(console.log(`branch ${p} differs - local ahead, not behind`),h.push(p)):(console.log(`branch ${p} differs - both changed`),h.push(p))}}else S&&!k&&h.push(p)}}g(c,"m"),n(c,"pull");async function d(y){if((await r.getUser()).type!=="local")for(let v of y){let p=await r.getMaxAccessTokenForBranch(v);await R.push({fs:a,http:me,dir:e,remote:L,url:t,ref:v,headers:{Authorization:`Bearer ${p}`}})}}g(d,"c"),n(d,"push");let m=Promise.resolve();async function w(y){m=m.then(()=>d(y)),await m}g(w,"u"),n(w,"sequentialPush");async function f(){await R.getConfig({fs:a,dir:e,path:`remote.${L}.fetch`})||await R.setConfig({fs:a,dir:e,path:`remote.${L}.fetch`,value:`+refs/heads/*:refs/remotes/${L}/*`});try{await c();let y=[...new Set(h)].filter(v=>v.indexOf(i)===-1);await w(y),h=[]}catch(y){console.error("Error monitoring changes:",y)}finally{o&&setTimeout(f,1e3)}}g(f,"f"),n(f,"pullPushTick");function E(){o=!0,f()}g(E,"g"),n(E,"startSync");function D(){o=!1}return g(D,"O"),n(D,"stopSync"),{start:n(()=>{o||(E(),o=!0)},"start"),stop:n(()=>{D()},"stop"),isRunning:n(()=>o,"isRunning"),loadBranch:l,sequentialPush:w}},"createLegitSyncService"),zt=n((a,e)=>{let t={type:"local",id:"local",name:"Local User",email:"local@legitcontrol.com"};return{getUser:n(async()=>t,"getUser"),signInAnonymously:n(async()=>{t.type="anonymous",t.id=crypto.randomUUID(),t.email=`anonymous-sha1-${t.id}-@legitcontrol.com`},"signInAnonymously"),addAccessToken:n(async r=>{let i=await a.getUserTokens(t.id);i.accessTokens.push(r),await a.setUserTokens(t.id,i)},"addAccessToken"),getMaxAccessTokenForBranch:n(async r=>{let i=await a.getUserTokens(t.id);if(!(i.accessTokens===void 0||i.accessTokens.length===0))return i.accessTokens[0]},"getMaxAccessTokenForBranch")}},"createSessionManager");function Qe(a){let e=JSON.stringify(a),t=new TextEncoder().encode(e),r="";return typeof btoa=="function"?r=btoa(String.fromCharCode(...t)):r=Buffer.from(t).toString("base64"),r.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}g(Qe,"Ge");n(Qe,"encodeConfigJson");function et(a){let e=a.replace(/-/g,"+").replace(/_/g,"/")+"===".slice((a.length+3)%4),t;typeof atob=="function"?t=atob(e):t=Buffer.from(e,"base64").toString("binary");let r=Uint8Array.from(t,s=>s.charCodeAt(0)),i=new TextDecoder().decode(r);return JSON.parse(i)}g(et,"Je");n(et,"decodeConfigJson");var $e="user.legit-tokens";function tt({storageFs:a,gitRoot:e}){return{getUserTokens:n(async t=>{let r=await Ne.getConfig({fs:a,dir:e,path:$e});return r?et(r):{accessTokens:[]}},"getUserTokens"),setUserTokens:n(async(t,r)=>await Ne.setConfig({fs:a,dir:e,path:$e,value:Qe(r)}),"setUserTokens")}}g(tt,"Xe");n(tt,"createGitConfigTokenStore");async function ye(a){let e=new xt,t=At(e);return rt({...a,storageFs:a?.storageFs?a.storageFs:t,gitRoot:a?.gitRoot||"/"})}g(ye,"cs");n(ye,"openLegitFsWithMemoryFs");async function rt({storageFs:a,gitRoot:e,anonymousBranch:t="anonymous",showKeepFiles:r=!1,initialAuthor:i={type:"local",id:"local",name:"Local User",email:"local@legitcontrol.com"},serverUrl:s="https://sync.legitcontrol.com",publicKey:o}){await a.promises.readdir(e+"/.git").then(()=>!0).catch(()=>!1)||(await P.init({fs:a,dir:"/",defaultBranch:t}),await a.promises.writeFile(e+"/.keep",""),await P.add({fs:a,dir:"/",filepath:".keep"}),await P.commit({fs:a,dir:"/",message:"Initial commit",author:{name:"Test",email:"test@example.com"}}),await P.setConfig({fs:a,dir:e,path:"init.defaultBranch",value:t})),await P.getConfig({fs:a,dir:e,path:"user.legit_user_id"})||await P.setConfig({fs:a,dir:e,path:"user.legit_user_id",value:i.name}),await P.getConfig({fs:a,dir:e,path:"user.name"})||await P.setConfig({fs:a,dir:e,path:"user.name",value:i.name}),await P.getConfig({fs:a,dir:e,path:"user.email"})||await P.setConfig({fs:a,dir:e,path:"user.email",value:i.email});let l=new Se({name:"root",parentFs:void 0,storageFs:a,gitRoot:e}),h=new Pe({name:"root-ephemeral",parentFs:l,gitRoot:e,ephemeralPatterns:[]}),c=new De({name:"root-hidden",parentFs:l,gitRoot:e,hiddenFiles:[]});l.setHiddenFilesSubFs(c),l.setEphemeralFilesSubFs(h);let d=new Se({name:"git",parentFs:l,storageFs:void 0,gitRoot:e,defaultBranch:t}),m=new It({name:"git-subfs",parentFs:d,gitRoot:e,gitStorageFs:l}),w=r?[".git"]:[".git",".keep"],f=new De({name:"git-hidden-subfs",parentFs:d,gitRoot:e,hiddenFiles:w}),E=new Pe({name:"git-ephemeral-subfs",parentFs:d,gitRoot:e,ephemeralPatterns:["**/._*","**/.DS_Store","**/.AppleDouble/","**/.AppleDB","**/.AppleDesktop","**/.Spotlight-V100","**/.TemporaryItems","**/.Trashes","**/.fseventsd","**/.VolumeIcon.icns","**/.ql_disablethumbnails","**/.~lock.*","**/lu[0-9a-zA-Z]*.tmp","**/.metaentries.json.tmp","**/**.sb-**"]});d.addSubFs(m),d.setHiddenFilesSubFs(f),d.setEphemeralFilesSubFs(E);let D=tt({storageFs:a,gitRoot:e}),y=zt(D,o),v=Lt({fs:a,gitRepoPath:e,serverUrl:s,auth:y,anonymousBranch:t}),p=Object.assign(d,{auth:y,sync:v,setLogger(F){l.setLoggger(F),d.setLoggger(F)},push:n(async F=>{},"push"),shareCurrentBranch:n(async()=>{if((await y.getUser()).type==="local")throw new Error("login first - for example anonymously using legitfs.auth.signInAnonymously()");let F=await p.getCurrentBranch();return F===t&&(F=(await y.getUser()).id,await P.renameBranch({fs:a,dir:e,oldref:t,ref:F})),await v.sequentialPush([F]),p.setCurrentBranch(F),F},"shareCurrentBranch"),setCurrentBranch:n(async F=>{(await P.listBranches({fs:a,dir:e})).includes(F)||await v?.loadBranch(F);let S=(await P.listBranches({fs:a,dir:e})).includes(F);if(console.log("branchExistsAfter",S),!S)throw new Error(`Branch ${F} does not exist`);await P.setConfig({fs:a,dir:e,path:"init.defaultBranch",value:F})},"setCurrentBranch"),getCurrentBranch:n(async()=>{let F=await P.getConfig({fs:a,dir:e,path:"init.defaultBranch"});if(!F)throw new Error("No current branch set");return F},"getCurrentBranch")});return p}g(rt,"gt");n(rt,"openLegitFs");var Er=n(a=>async e=>{if(!e.path.includes(".legit/branches/")||(e.path.match(/\.legit/g)||[]).length>1)return;let[t,r]=e.path.split(".legit/branches/"),[i,...s]=r.split("/"),o=s.join("/"),l=t+".legit/branches/"+i+"/.legit/operation",h=JSON.stringify(e.operationArgs,(c,d)=>Buffer.isBuffer(d)?{__buffer__:d.toString("base64")}:d);await a.writeFile(l,`[${e.fsName}].${e.operation}(${e.fd?e.fd.fd+" - ":""}${e.path})
|
|
41
8
|
|
|
42
|
-
${
|
|
43
|
-
${b.gpgsig?b.gpgsig:""}`}justHeaders(){return this._tag.slice(0,this._tag.indexOf(`
|
|
9
|
+
${h}
|
|
44
10
|
|
|
45
|
-
`))}
|
|
46
|
-
|
|
47
|
-
`)+2)}parse(){return Object.assign(this.headers(),{message:this.message(),gpgsig:this.gpgsig()})}render(){return this._tag}headers(){let b=this.justHeaders().split(`
|
|
48
|
-
`),k=[];for(let L of b)L[0]===" "?k[k.length-1]+=`
|
|
49
|
-
`+L.slice(1):k.push(L);let F={};for(let L of k){let $=L.slice(0,L.indexOf(" ")),K=L.slice(L.indexOf(" ")+1);Array.isArray(F[$])?F[$].push(K):F[$]=K}return F.tagger&&(F.tagger=rl(F.tagger)),F.committer&&(F.committer=rl(F.committer)),F}withoutSignature(){let b=yn(this._tag);return b.indexOf(`
|
|
50
|
-
-----BEGIN PGP SIGNATURE-----`)===-1?b:b.slice(0,b.lastIndexOf(`
|
|
51
|
-
-----BEGIN PGP SIGNATURE-----`))}gpgsig(){if(this._tag.indexOf(`
|
|
52
|
-
-----BEGIN PGP SIGNATURE-----`)===-1)return;let b=this._tag.slice(this._tag.indexOf("-----BEGIN PGP SIGNATURE-----"),this._tag.indexOf("-----END PGP SIGNATURE-----")+27);return yn(b)}payload(){return this.withoutSignature()+`
|
|
53
|
-
`}toObject(){return Buffer.from(this._tag,"utf8")}static async sign(b,k,F){let L=b.payload(),{signature:$}=await k({payload:L,secretKey:F});$=yn($);let K=L+$;return Gn.from(K)}},l(Gn,"Os"),Gn);e(gS,"GitAnnotatedTag");var on=gS;function Cf(B){return B.trim().split(`
|
|
54
|
-
`).map(b=>" "+b).join(`
|
|
55
|
-
`)+`
|
|
56
|
-
`}l(Cf,"Y0"),e(Cf,"indent");function yS(B){return B.split(`
|
|
57
|
-
`).map(b=>b.replace(/^ /,"")).join(`
|
|
58
|
-
`)}l(yS,"zY"),e(yS,"outdent");var mS=(pr=class{constructor(b){if(typeof b=="string")this._commit=b;else if(Buffer.isBuffer(b))this._commit=b.toString("utf8");else if(typeof b=="object")this._commit=pr.render(b);else throw new O("invalid type passed to GitCommit constructor")}static fromPayloadSignature({payload:b,signature:k}){let F=pr.justHeaders(b),L=pr.justMessage(b),$=yn(F+`
|
|
59
|
-
gpgsig`+Cf(k)+`
|
|
60
|
-
`+L);return new pr($)}static from(b){return new pr(b)}toObject(){return Buffer.from(this._commit,"utf8")}headers(){return this.parseHeaders()}message(){return pr.justMessage(this._commit)}parse(){return Object.assign({message:this.message()},this.headers())}static justMessage(b){return yn(b.slice(b.indexOf(`
|
|
61
|
-
|
|
62
|
-
`)+2))}static justHeaders(b){return b.slice(0,b.indexOf(`
|
|
63
|
-
|
|
64
|
-
`))}parseHeaders(){let b=pr.justHeaders(this._commit).split(`
|
|
65
|
-
`),k=[];for(let L of b)L[0]===" "?k[k.length-1]+=`
|
|
66
|
-
`+L.slice(1):k.push(L);let F={parent:[]};for(let L of k){let $=L.slice(0,L.indexOf(" ")),K=L.slice(L.indexOf(" ")+1);Array.isArray(F[$])?F[$].push(K):F[$]=K}return F.author&&(F.author=rl(F.author)),F.committer&&(F.committer=rl(F.committer)),F}static renderHeaders(b){let k="";if(b.tree?k+=`tree ${b.tree}
|
|
67
|
-
`:k+=`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
|
|
68
|
-
`,b.parent){if(b.parent.length===void 0)throw new O("commit 'parent' property should be an array");for(let $ of b.parent)k+=`parent ${$}
|
|
69
|
-
`}let F=b.author;k+=`author ${jf(F)}
|
|
70
|
-
`;let L=b.committer||b.author;return k+=`committer ${jf(L)}
|
|
71
|
-
`,b.gpgsig&&(k+="gpgsig"+Cf(b.gpgsig)),k}static render(b){return pr.renderHeaders(b)+`
|
|
72
|
-
`+yn(b.message)}render(){return this._commit}withoutSignature(){let b=yn(this._commit);if(b.indexOf(`
|
|
73
|
-
gpgsig`)===-1)return b;let k=b.slice(0,b.indexOf(`
|
|
74
|
-
gpgsig`)),F=b.slice(b.indexOf(`-----END PGP SIGNATURE-----
|
|
75
|
-
`)+28);return yn(k+`
|
|
76
|
-
`+F)}isolateSignature(){let b=this._commit.slice(this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"),this._commit.indexOf("-----END PGP SIGNATURE-----")+27);return yS(b)}static async sign(b,k,F){let L=b.withoutSignature(),$=pr.justMessage(b._commit),{signature:K}=await k({payload:L,secretKey:F});K=yn(K);let ne=pr.justHeaders(b._commit)+`
|
|
77
|
-
gpgsig`+Cf(K)+`
|
|
78
|
-
`+$;return pr.from(ne)}},l(pr,"yr"),pr);e(mS,"GitCommit");var Xr=mS;async function Yi({fs:B,cache:b,gitdir:k,oid:F}){if(F==="4b825dc642cb6eb9a060e54bf8d69288fbee4904")return{tree:Yr.from([]),oid:F};let{type:L,object:$}=await Mt({fs:B,cache:b,gitdir:k,oid:F});if(L==="tag")return F=on.from($).parse().object,Yi({fs:B,cache:b,gitdir:k,oid:F});if(L==="commit")return F=Xr.from($).parse().tree,Yi({fs:B,cache:b,gitdir:k,oid:F});if(L!=="tree")throw new Ie(F,L,"tree");return{tree:Yr.from($),oid:F}}l(Yi,"Us"),e(Yi,"resolveTree");var wS=(Ka=class{constructor({fs:b,gitdir:k,ref:F,cache:L}){var ne;var $;this.fs=b,this.cache=L,this.gitdir=k,this.mapPromise=(async()=>{let _e=new Map,ce;try{ce=await et.resolve({fs:b,gitdir:k,ref:F})}catch(Be){Be instanceof ge&&(ce="4b825dc642cb6eb9a060e54bf8d69288fbee4904")}let he=await Yi({fs:b,cache:this.cache,gitdir:k,oid:ce});return he.type="tree",he.mode="40000",_e.set(".",he),_e})();let K=this;this.ConstructEntry=($=(ne=class{constructor(ce){this._fullpath=ce,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return K.type(this)}async mode(){return K.mode(this)}async stat(){return K.stat(this)}async content(){return K.content(this)}async oid(){return K.oid(this)}},l(ne,"i"),ne),e($,"TreeEntry"),$)}async readdir(b){let k=b._fullpath,{fs:F,cache:L,gitdir:$}=this,K=await this.mapPromise,ne=K.get(k);if(!ne)throw new Error(`No obj for ${k}`);let _e=ne.oid;if(!_e)throw new Error(`No oid for obj ${JSON.stringify(ne)}`);if(ne.type!=="tree")return null;let{type:ce,object:he}=await Mt({fs:F,cache:L,gitdir:$,oid:_e});if(ce!==ne.type)throw new Ie(_e,ce,ne.type);let Be=Yr.from(he);for(let je of Be)K.set(o.join(k,je.path),je);return Be.entries().map(je=>o.join(k,je.path))}async type(b){if(b._type===!1){let k=await this.mapPromise,{type:F}=k.get(b._fullpath);b._type=F}return b._type}async mode(b){if(b._mode===!1){let k=await this.mapPromise,{mode:F}=k.get(b._fullpath);b._mode=ee(parseInt(F,8))}return b._mode}async stat(b){}async content(b){if(b._content===!1){let k=await this.mapPromise,{fs:F,cache:L,gitdir:$}=this,K=k.get(b._fullpath).oid,{type:ne,object:_e}=await Mt({fs:F,cache:L,gitdir:$,oid:K});ne!=="blob"?b._content=void 0:b._content=new Uint8Array(_e)}return b._content}async oid(b){if(b._oid===!1){let k=(await this.mapPromise).get(b._fullpath);b._oid=k.oid}return b._oid}},l(Ka,"Tv"),Ka);e(wS,"GitWalkerRepo");var R4=wS;function Lr({ref:B="HEAD"}={}){let b=Object.create(null);return Object.defineProperty(b,Ee,{value:e(function({fs:k,gitdir:F,cache:L}){return new R4({fs:k,gitdir:F,ref:B,cache:L})},"value")}),Object.freeze(b),b}l(Lr,"Ir"),e(Lr,"TREE");var bS=(Ja=class{constructor({fs:b,dir:k,gitdir:F,cache:L}){var ne;var $;this.fs=b,this.cache=L,this.dir=k,this.gitdir=F,this.config=null;let K=this;this.ConstructEntry=($=(ne=class{constructor(ce){this._fullpath=ce,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return K.type(this)}async mode(){return K.mode(this)}async stat(){return K.stat(this)}async content(){return K.content(this)}async oid(){return K.oid(this)}},l(ne,"i"),ne),e($,"WorkdirEntry"),$)}async readdir(b){let k=b._fullpath,{fs:F,dir:L}=this,$=await F.readdir(o.join(L,k));return $===null?null:$.map(K=>o.join(k,K))}async type(b){return b._type===!1&&await b.stat(),b._type}async mode(b){return b._mode===!1&&await b.stat(),b._mode}async stat(b){if(b._stat===!1){let{fs:k,dir:F}=this,L=await k.lstat(`${F}/${b._fullpath}`);if(!L)throw new Error(`ENOENT: no such file or directory, lstat '${b._fullpath}'`);let $=L.isDirectory()?"tree":"blob";$==="blob"&&!L.isFile()&&!L.isSymbolicLink()&&($="special"),b._type=$,L=G(L),b._mode=L.mode,L.size===-1&&b._actualSize&&(L.size=b._actualSize),b._stat=L}return b._stat}async content(b){if(b._content===!1){let{fs:k,dir:F,gitdir:L}=this;if(await b.type()==="tree")b._content=void 0;else{let $=await(await this._getGitConfig(k,L)).get("core.autocrlf"),K=await k.read(`${F}/${b._fullpath}`,{autocrlf:$});b._actualSize=K.length,b._stat&&b._stat.size===-1&&(b._stat.size=b._actualSize),b._content=new Uint8Array(K)}}return b._content}async oid(b){if(b._oid===!1){let k=this,{fs:F,gitdir:L,cache:$}=this,K;await Q.acquire({fs:F,gitdir:L,cache:$},async function(ne){let _e=ne.entriesMap.get(b._fullpath),ce=await b.stat(),he=await(await k._getGitConfig(F,L)).get("core.filemode"),Be=typeof process<"u"?process.platform!=="win32":!0;if(!_e||te(ce,_e,he,Be)){let je=await b.content();je===void 0?K=void 0:(K=await de(ja.wrap({type:"blob",object:je})),_e&&K===_e.oid&&(!he||ce.mode===_e.mode)&&te(ce,_e,he,Be)&&ne.insert({filepath:b._fullpath,stats:ce,oid:K}))}else K=_e.oid}),b._oid=K}return b._oid}async _getGitConfig(b,k){return this.config?this.config:(this.config=await ht.get({fs:b,gitdir:k}),this.config)}},l(Ja,"Fv"),Ja);e(bS,"GitWalkerFs");var O4=bS;function Zi(){let B=Object.create(null);return Object.defineProperty(B,Ee,{value:e(function({fs:b,dir:k,gitdir:F,cache:L}){return new O4({fs:b,dir:k,gitdir:F,cache:L})},"value")}),Object.freeze(B),B}l(Zi,"Vs"),e(Zi,"WORKDIR");function vS(B,b){let k=b-B;return Array.from({length:k},(F,L)=>B+L)}l(vS,"VY"),e(vS,"arrayRange");var _S=typeof Array.prototype.flat>"u"?B=>B.reduce((b,k)=>b.concat(k),[]):B=>B.flat(),ES=(Ya=class{constructor(){this.value=null}consider(b){b!=null&&(this.value===null?this.value=b:b<this.value&&(this.value=b))}reset(){this.value=null}},l(Ya,"xv"),Ya);e(ES,"RunningMinimum");var k4=ES;function*SS(B){let b=new k4,k,F=[],L=B.length;for(let $=0;$<L;$++)F[$]=B[$].next().value,F[$]!==void 0&&b.consider(F[$]);if(b.value!==null)for(;;){let $=[];k=b.value,b.reset();for(let K=0;K<L;K++)F[K]!==void 0&&F[K]===k?($[K]=F[K],F[K]=B[K].next().value):$[K]=null,F[K]!==void 0&&b.consider(F[K]);if(yield $,b.value===null)return}}l(SS,"GY"),e(SS,"unionOfIterators");async function zn({fs:B,cache:b,dir:k,gitdir:F,trees:L,map:$=e(async(_e,ce)=>ce,"map"),reduce:K=e(async(_e,ce)=>{let he=_S(ce);return _e!==void 0&&he.unshift(_e),he},"reduce"),iterate:ne=e((_e,ce)=>Promise.all([...ce].map(_e)),"iterate")}){let _e=L.map(Me=>Me[Ee]({fs:B,dir:k,gitdir:F,cache:b})),ce=new Array(_e.length).fill("."),he=vS(0,_e.length),Be=e(async Me=>{he.map(Ye=>{let rt=Me[Ye];Me[Ye]=rt&&new _e[Ye].ConstructEntry(rt)});let ze=(await Promise.all(he.map(Ye=>{let rt=Me[Ye];return rt?_e[Ye].readdir(rt):[]}))).map(Ye=>(Ye===null?[]:Ye)[Symbol.iterator]());return{entries:Me,children:SS(ze)}},"unionWalkerFromReaddir"),je=e(async Me=>{let{entries:ze,children:Ye}=await Be(Me),rt=ze.find(it=>it&&it._fullpath)._fullpath,ot=await $(rt,ze);if(ot!==null){let it=await ne(je,Ye);return it=it.filter(ft=>ft!==void 0),K(ot,it)}},"walk");return je(ce)}l(zn,"oo"),e(zn,"_walk");async function Lf(B,b){let k=await B.readdir(b);k==null?await B.rm(b):k.length?await Promise.all(k.map(F=>{let L=o.join(b,F);return B.lstat(L).then($=>{if($)return $.isDirectory()?Lf(B,L):B.rm(L)})})).then(()=>B.rmdir(b)):await B.rmdir(b)}l(Lf,"uv"),e(Lf,"rmRecursive");function AS(B){return RS(B)&&lp(B.then)&&lp(B.catch)}l(AS,"YY"),e(AS,"isPromiseLike");function RS(B){return B&&typeof B=="object"}l(RS,"KY"),e(RS,"isObject");function lp(B){return typeof B=="function"}l(lp,"WP"),e(lp,"isFunction");function fp(B){return AS(e(b=>{try{return b.readFile().catch(k=>k)}catch(k){return k}},"test")(B))}l(fp,"qP"),e(fp,"isPromiseFs");var OS=["readFile","writeFile","mkdir","rmdir","unlink","stat","lstat","readdir","readlink","symlink"];function up(B,b){if(fp(b))for(let k of OS)B[`_${k}`]=b[k].bind(b);else for(let k of OS)B[`_${k}`]=u(b[k].bind(b));fp(b)?b.rm?B._rm=b.rm.bind(b):b.rmdir.length>1?B._rm=b.rmdir.bind(b):B._rm=Lf.bind(null,B):b.rm?B._rm=u(b.rm.bind(b)):b.rmdir.length>2?B._rm=u(b.rmdir.bind(b)):B._rm=Lf.bind(null,B)}l(up,"VP"),e(up,"bindFs");var kS=(Za=class{constructor(b){if(typeof b._original_unwrapped_fs<"u")return b;let k=Object.getOwnPropertyDescriptor(b,"promises");k&&k.enumerable?up(this,b.promises):up(this,b),this._original_unwrapped_fs=b}async exists(b,k={}){try{return await this._stat(b),!0}catch(F){if(F.code==="ENOENT"||F.code==="ENOTDIR"||(F.code||"").includes("ENS"))return!1;throw console.log('Unhandled error in "FileSystem.exists()" function',F),F}}async read(b,k={}){try{let F=await this._readFile(b,k);if(k.autocrlf==="true")try{F=new TextDecoder("utf8",{fatal:!0}).decode(F),F=F.replace(/\r\n/g,`
|
|
79
|
-
`),F=new TextEncoder().encode(F)}catch{}return typeof F!="string"&&(F=Buffer.from(F)),F}catch{return null}}async write(b,k,F={}){try{await this._writeFile(b,k,F);return}catch{await this.mkdir(ve(b)),await this._writeFile(b,k,F)}}async mkdir(b,k=!1){try{await this._mkdir(b);return}catch(F){if(F===null||F.code==="EEXIST")return;if(k)throw F;if(F.code==="ENOENT"){let L=ve(b);if(L==="."||L==="/"||L===b)throw F;await this.mkdir(L),await this.mkdir(b,!0)}}}async rm(b){try{await this._unlink(b)}catch(k){if(k.code!=="ENOENT")throw k}}async rmdir(b,k){try{k&&k.recursive?await this._rm(b,k):await this._rmdir(b)}catch(F){if(F.code!=="ENOENT")throw F}}async readdir(b){try{let k=await this._readdir(b);return k.sort(U),k}catch(k){return k.code==="ENOTDIR"?null:[]}}async readdirDeep(b){let k=await this._readdir(b);return(await Promise.all(k.map(async F=>{let L=b+"/"+F;return(await this._stat(L)).isDirectory()?this.readdirDeep(L):L}))).reduce((F,L)=>F.concat(L),[])}async lstat(b){try{return await this._lstat(b)}catch(k){if(k.code==="ENOENT"||(k.code||"").includes("ENS"))return null;throw k}}async readlink(b,k={encoding:"buffer"}){try{let F=await this._readlink(b,k);return Buffer.isBuffer(F)?F:Buffer.from(F)}catch(F){if(F.code==="ENOENT"||(F.code||"").includes("ENS"))return null;throw F}}async writelink(b,k){return this._symlink(k.toString("utf8"),b)}},l(Za,"Ov"),Za);e(kS,"FileSystem");var mt=kS;function Ue(B,b){if(b===void 0)throw new Qr(B)}l(Ue,"ae"),e(Ue,"assertParameter");async function nl(B,b){return!B&&!b?!1:B&&!b||!B&&b?!0:!(await B.type()==="tree"&&await b.type()==="tree"||await B.type()===await b.type()&&await B.mode()===await b.mode()&&await B.oid()===await b.oid())}l(nl,"$h"),e(nl,"modified");async function cp({fs:B,dir:b,gitdir:k=o.join(b,".git"),commit:F="HEAD",cache:L={}}){try{Ue("fs",B),Ue("dir",b),Ue("gitdir",k);let $=new mt(B),K=[Lr({ref:F}),Zi(),Oe()],ne=[];await Q.acquire({fs:$,gitdir:k,cache:L},async function(ce){ne=ce.unmergedPaths});let _e=await zn({fs:$,cache:L,dir:b,gitdir:k,trees:K,map:e(async function(ce,[he,Be,je]){let Me=!await nl(Be,je),ze=ne.includes(ce),Ye=!await nl(je,he);if(Me||ze)return he?{path:ce,mode:await he.mode(),oid:await he.oid(),type:await he.type(),content:await he.content()}:void 0;if(Ye)return!1;throw new ap(ce)},"map")});await Q.acquire({fs:$,gitdir:k,cache:L},async function(ce){for(let he of _e)if(he!==!1){if(!he){await $.rmdir(`${b}/${he.path}`,{recursive:!0}),ce.delete({filepath:he.path});continue}if(he.type==="blob"){let Be=new TextDecoder().decode(he.content);await $.write(`${b}/${he.path}`,Be,{mode:he.mode}),ce.insert({filepath:he.path,oid:he.oid,stage:0})}}})}catch($){throw $.caller="git.abortMerge",$}}l(cp,"dI"),e(cp,"abortMerge");var TS=(Qa=class{static async isIgnored({fs:b,dir:k,gitdir:F=o.join(k,".git"),filepath:L}){if(fe(L)===".git")return!0;if(L===".")return!1;let $="",K=o.join(F,"info","exclude");await b.exists(K)&&($=await b.read(K,"utf8"));let ne=[{gitignore:o.join(k,".gitignore"),filepath:L}],_e=L.split("/").filter(Boolean);for(let he=1;he<_e.length;he++){let Be=_e.slice(0,he).join("/"),je=_e.slice(he).join("/");ne.push({gitignore:o.join(k,Be,".gitignore"),filepath:je})}let ce=!1;for(let he of ne){let Be;try{Be=await b.read(he.gitignore,"utf8")}catch(ze){if(ze.code==="NOENT")continue}let je=p().add($);je.add(Be);let Me=ve(he.filepath);if(Me!=="."&&je.ignores(Me))return!0;ce?ce=!je.test(he.filepath).unignored:ce=je.test(he.filepath).ignored}return ce}},l(Qa,"Pv"),Qa);e(TS,"GitIgnoreManager");var Na=TS;async function FS({fs:B,gitdir:b,object:k,format:F,oid:L}){if(F!=="deflated")throw new O("GitObjectStoreLoose expects objects to write to be in deflated format");let $=`objects/${L.slice(0,2)}/${L.slice(2)}`,K=`${b}/${$}`;await B.exists(K)||await B.write(K,k)}l(FS,"XY"),e(FS,"writeObjectLoose");var hp=null;async function dp(B){return hp===null&&(hp=xS()),hp?BS(B):r.deflate(B)}l(dp,"pI"),e(dp,"deflate");async function BS(B){let b=new CompressionStream("deflate"),k=new Blob([B]).stream().pipeThrough(b);return new Uint8Array(await new Response(k).arrayBuffer())}l(BS,"JY"),e(BS,"browserDeflate");function xS(){try{return new CompressionStream("deflate").writable.close(),new Blob([]).stream().cancel(),!0}catch{return!1}}l(xS,"ZY"),e(xS,"testCompressionStream");async function Rr({fs:B,gitdir:b,type:k,object:F,format:L="content",oid:$=void 0,dryRun:K=!1}){return L!=="deflated"&&(L!=="wrapped"&&(F=ja.wrap({type:k,object:F})),$=await de(F),F=Buffer.from(await dp(F))),K||await FS({fs:B,gitdir:b,object:F,format:"deflated",oid:$}),$}l(Rr,"vr"),e(Rr,"_writeObject");function pp(B){let b;for(;~(b=B.indexOf(92));)B[b]=47;return B}l(pp,"yI"),e(pp,"posixifyPathBuffer");async function gp({fs:B,dir:b,gitdir:k=o.join(b,".git"),filepath:F,cache:L={},force:$=!1,parallel:K=!0}){try{Ue("fs",B),Ue("dir",b),Ue("gitdir",k),Ue("filepath",F);let ne=new mt(B);await Q.acquire({fs:ne,gitdir:k,cache:L},async _e=>{let ce=await(await ht.get({fs:ne,gitdir:k})).get("core.autocrlf");return Nf({dir:b,gitdir:k,fs:ne,filepath:F,index:_e,force:$,parallel:K,autocrlf:ce})})}catch(ne){throw ne.caller="git.add",ne}}l(gp,"mI"),e(gp,"add");async function Nf({dir:B,gitdir:b,fs:k,filepath:F,index:L,force:$,parallel:K,autocrlf:ne}){F=Array.isArray(F)?F:[F];let _e=F.map(async Be=>{if(!$&&await Na.isIgnored({fs:k,dir:B,gitdir:b,filepath:Be}))return;let je=await k.lstat(o.join(B,Be));if(!je)throw new ge(Be);if(je.isDirectory()){let Me=await k.readdir(o.join(B,Be));if(K){let ze=Me.map(Ye=>Nf({dir:B,gitdir:b,fs:k,filepath:[o.join(Be,Ye)],index:L,force:$,parallel:K,autocrlf:ne}));await Promise.all(ze)}else for(let ze of Me)await Nf({dir:B,gitdir:b,fs:k,filepath:[o.join(Be,ze)],index:L,force:$,parallel:K,autocrlf:ne})}else{let Me=je.isSymbolicLink()?await k.readlink(o.join(B,Be)).then(pp):await k.read(o.join(B,Be),{autocrlf:ne});if(Me===null)throw new ge(Be);let ze=await Rr({fs:k,gitdir:b,type:"blob",object:Me});L.insert({filepath:Be,stats:je,oid:ze})}}),ce=await Promise.allSettled(_e),he=ce.filter(Be=>Be.status==="rejected").map(Be=>Be.reason);if(he.length>1)throw new rp(he);if(he.length===1)throw he[0];return ce.filter(Be=>Be.status==="fulfilled"&&Be.value).map(Be=>Be.value)}l(Nf,"cv"),e(Nf,"addToIndex");async function Da({fs:B,gitdir:b,path:k}){return(await ht.get({fs:B,gitdir:b})).get(k)}l(Da,"Gf"),e(Da,"_getConfig");function yp(B,...b){for(let k of b)if(k)for(let F of Object.keys(k)){let L=k[F];L!==void 0&&(B[F]=L)}return B}l(yp,"gI"),e(yp,"assignDefined");async function Hn({fs:B,gitdir:b,author:k,commit:F}){let L=Math.floor(Date.now()/1e3),$={name:await Da({fs:B,gitdir:b,path:"user.name"}),email:await Da({fs:B,gitdir:b,path:"user.email"})||"",timestamp:L,timezoneOffset:new Date(L*1e3).getTimezoneOffset()},K=yp({},$,F?F.author:void 0,k);if(K.name!==void 0)return K}l(Hn,"so"),e(Hn,"normalizeAuthorObject");async function Qi({fs:B,gitdir:b,author:k,committer:F,commit:L}){let $=Math.floor(Date.now()/1e3),K={name:await Da({fs:B,gitdir:b,path:"user.name"}),email:await Da({fs:B,gitdir:b,path:"user.email"})||"",timestamp:$,timezoneOffset:new Date($*1e3).getTimezoneOffset()},ne=yp({},K,L?L.committer:void 0,k,F);if(ne.name!==void 0)return ne}l(Qi,"js"),e(Qi,"normalizeCommitterObject");async function mp({fs:B,cache:b,gitdir:k,oid:F}){let{type:L,object:$}=await Mt({fs:B,cache:b,gitdir:k,oid:F});if(L==="tag")return F=on.from($).parse().object,mp({fs:B,cache:b,gitdir:k,oid:F});if(L!=="commit")throw new Ie(F,L,"commit");return{commit:Xr.from($),oid:F}}l(mp,"wI"),e(mp,"resolveCommit");async function Xi({fs:B,cache:b,gitdir:k,oid:F}){let{commit:L,oid:$}=await mp({fs:B,cache:b,gitdir:k,oid:F});return{oid:$,commit:L.parse(),payload:L.withoutSignature()}}l(Xi,"Hs"),e(Xi,"_readCommit");async function il({fs:B,cache:b,onSign:k,gitdir:F,message:L,author:$,committer:K,signingKey:ne,amend:_e=!1,dryRun:ce=!1,noUpdateBranch:he=!1,ref:Be,parent:je,tree:Me}){let ze=!1;Be||(Be=await et.resolve({fs:B,gitdir:F,ref:"HEAD",depth:2}));let Ye,rt;try{Ye=await et.resolve({fs:B,gitdir:F,ref:Be}),rt=await Xi({fs:B,gitdir:F,oid:Ye,cache:{}})}catch{ze=!0}if(_e&&ze)throw new sp(Be);let ot=_e?await Hn({fs:B,gitdir:F,author:$,commit:rt.commit}):await Hn({fs:B,gitdir:F,author:$});if(!ot)throw new Cr("author");let it=_e?await Qi({fs:B,gitdir:F,author:ot,committer:K,commit:rt.commit}):await Qi({fs:B,gitdir:F,author:ot,committer:K});if(!it)throw new Cr("committer");return Q.acquire({fs:B,gitdir:F,cache:b,allowUnmerged:!1},async function(ft){let gt=N(ft.entries).get(".");if(Me||(Me=await wp({fs:B,gitdir:F,inode:gt,dryRun:ce})),je?je=await Promise.all(je.map(st=>et.resolve({fs:B,gitdir:F,ref:st}))):_e?je=rt.commit.parent:je=Ye?[Ye]:[],!L)if(_e)L=rt.commit.message;else throw new Qr("message");let yt=Xr.from({tree:Me,parent:je,author:ot,committer:it,message:L});ne&&(yt=await Xr.sign(yt,k,ne));let pt=await Rr({fs:B,gitdir:F,type:"commit",object:yt.toObject(),dryRun:ce});return!he&&!ce&&await et.writeRef({fs:B,gitdir:F,ref:Be,value:pt}),pt})}l(il,"Od"),e(il,"_commit");async function wp({fs:B,gitdir:b,inode:k,dryRun:F}){let L=k.children;for(let ne of L)ne.type==="tree"&&(ne.metadata.mode="040000",ne.metadata.oid=await wp({fs:B,gitdir:b,inode:ne,dryRun:F}));let $=L.map(ne=>({mode:ne.metadata.mode,path:ne.basename,oid:ne.metadata.oid,type:ne.type})),K=Yr.from($);return await Rr({fs:B,gitdir:b,type:"tree",object:K.toObject(),dryRun:F})}l(wp,"vI"),e(wp,"constructTree");async function Ua({fs:B,cache:b,gitdir:k,oid:F,filepath:L}){if(L.startsWith("/"))throw new Ca("leading-slash");if(L.endsWith("/"))throw new Ca("trailing-slash");let $=F,K=await Yi({fs:B,cache:b,gitdir:k,oid:F}),ne=K.tree;if(L==="")F=K.oid;else{let _e=L.split("/");F=await bp({fs:B,cache:b,gitdir:k,tree:ne,pathArray:_e,oid:$,filepath:L})}return F}l(Ua,"Yf"),e(Ua,"resolveFilepath");async function bp({fs:B,cache:b,gitdir:k,tree:F,pathArray:L,oid:$,filepath:K}){let ne=L.shift();for(let _e of F)if(_e.path===ne){if(L.length===0)return _e.oid;{let{type:ce,object:he}=await Mt({fs:B,cache:b,gitdir:k,oid:_e.oid});if(ce!=="tree")throw new Ie($,ce,"tree",K);return F=Yr.from(he),bp({fs:B,cache:b,gitdir:k,tree:F,pathArray:L,oid:$,filepath:K})}}throw new ge(`file or directory found at "${$}:${K}"`)}l(bp,"bI"),e(bp,"_resolveFilepath");async function eo({fs:B,cache:b,gitdir:k,oid:F,filepath:L=void 0}){L!==void 0&&(F=await Ua({fs:B,cache:b,gitdir:k,oid:F,filepath:L}));let{tree:$,oid:K}=await Yi({fs:B,cache:b,gitdir:k,oid:F});return{oid:K,tree:$.entries()}}l(eo,"Gs"),e(eo,"_readTree");async function Ma({fs:B,gitdir:b,tree:k}){let F=Yr.from(k).toObject();return await Rr({fs:B,gitdir:b,type:"tree",object:F,format:"content"})}l(Ma,"Kf"),e(Ma,"_writeTree");async function IS({fs:B,cache:b,onSign:k,gitdir:F,ref:L,oid:$,note:K,force:ne,author:_e,committer:ce,signingKey:he}){let Be;try{Be=await et.resolve({gitdir:F,fs:B,ref:L})}catch(Ye){if(!(Ye instanceof ge))throw Ye}let je=(await eo({fs:B,cache:b,gitdir:F,oid:Be||"4b825dc642cb6eb9a060e54bf8d69288fbee4904"})).tree;if(ne)je=je.filter(Ye=>Ye.path!==$);else for(let Ye of je)if(Ye.path===$)throw new $n("note",$);typeof K=="string"&&(K=Buffer.from(K,"utf8"));let Me=await Rr({fs:B,gitdir:F,type:"blob",object:K,format:"content"});je.push({mode:"100644",path:$,oid:Me,type:"blob"});let ze=await Ma({fs:B,gitdir:F,tree:je});return await il({fs:B,cache:b,onSign:k,gitdir:F,ref:L,tree:ze,parent:Be&&[Be],message:`Note added by 'isomorphic-git addNote'
|
|
80
|
-
`,author:_e,committer:ce,signingKey:he})}l(IS,"QY"),e(IS,"_addNote");async function vp({fs:B,onSign:b,dir:k,gitdir:F=o.join(k,".git"),ref:L="refs/notes/commits",oid:$,note:K,force:ne,author:_e,committer:ce,signingKey:he,cache:Be={}}){try{Ue("fs",B),Ue("gitdir",F),Ue("oid",$),Ue("note",K),he&&Ue("onSign",b);let je=new mt(B),Me=await Hn({fs:je,gitdir:F,author:_e});if(!Me)throw new Cr("author");let ze=await Qi({fs:je,gitdir:F,author:Me,committer:ce});if(!ze)throw new Cr("committer");return await IS({fs:new mt(je),cache:Be,onSign:b,gitdir:F,ref:L,oid:$,note:K,force:ne,author:Me,committer:ze,signingKey:he})}catch(je){throw je.caller="git.addNote",je}}l(vp,"_I"),e(vp,"addNote");async function _p({fs:B,gitdir:b,remote:k,url:F,force:L}){if(!d(k,!0))throw new Wn(k,h.clean(k));let $=await ht.get({fs:B,gitdir:b});if(!L&&(await $.getSubsections("remote")).includes(k)&&F!==await $.get(`remote.${k}.url`))throw new $n("remote",k);await $.set(`remote.${k}.url`,F),await $.set(`remote.${k}.fetch`,`+refs/heads/*:refs/remotes/${k}/*`),await ht.save({fs:B,gitdir:b,config:$})}l(_p,"EI"),e(_p,"_addRemote");async function Ep({fs:B,dir:b,gitdir:k=o.join(b,".git"),remote:F,url:L,force:$=!1}){try{return Ue("fs",B),Ue("gitdir",k),Ue("remote",F),Ue("url",L),await _p({fs:new mt(B),gitdir:k,remote:F,url:L,force:$})}catch(K){throw K.caller="git.addRemote",K}}l(Ep,"SI"),e(Ep,"addRemote");async function PS({fs:B,cache:b,onSign:k,gitdir:F,ref:L,tagger:$,message:K=L,gpgsig:ne,object:_e,signingKey:ce,force:he=!1}){if(L=L.startsWith("refs/tags/")?L:`refs/tags/${L}`,!he&&await et.exists({fs:B,gitdir:F,ref:L}))throw new $n("tag",L);let Be=await et.resolve({fs:B,gitdir:F,ref:_e||"HEAD"}),{type:je}=await Mt({fs:B,cache:b,gitdir:F,oid:Be}),Me=on.from({object:Be,type:je,tag:L.replace("refs/tags/",""),tagger:$,message:K,gpgsig:ne});ce&&(Me=await on.sign(Me,k,ce));let ze=await Rr({fs:B,gitdir:F,type:"tag",object:Me.toObject()});await et.writeRef({fs:B,gitdir:F,ref:L,value:ze})}l(PS,"eK"),e(PS,"_annotatedTag");async function Sp({fs:B,onSign:b,dir:k,gitdir:F=o.join(k,".git"),ref:L,tagger:$,message:K=L,gpgsig:ne,object:_e,signingKey:ce,force:he=!1,cache:Be={}}){try{Ue("fs",B),Ue("gitdir",F),Ue("ref",L),ce&&Ue("onSign",b);let je=new mt(B),Me=await Hn({fs:je,gitdir:F,author:$});if(!Me)throw new Cr("tagger");return await PS({fs:je,cache:Be,onSign:b,gitdir:F,ref:L,tagger:Me,message:K,gpgsig:ne,object:_e,signingKey:ce,force:he})}catch(je){throw je.caller="git.annotatedTag",je}}l(Sp,"AI"),e(Sp,"annotatedTag");async function jS({fs:B,gitdir:b,ref:k,object:F,checkout:L=!1,force:$=!1}){if(!d(k,!0))throw new Wn(k,h.clean(k));let K=`refs/heads/${k}`;if(!$&&await et.exists({fs:B,gitdir:b,ref:K}))throw new $n("branch",k,!1);let ne;try{ne=await et.resolve({fs:B,gitdir:b,ref:F||"HEAD"})}catch{}ne&&await et.writeRef({fs:B,gitdir:b,ref:K,value:ne}),L&&await et.writeSymbolicRef({fs:B,gitdir:b,ref:"HEAD",value:K})}l(jS,"tK"),e(jS,"_branch");async function Ap({fs:B,dir:b,gitdir:k=o.join(b,".git"),ref:F,object:L,checkout:$=!1,force:K=!1}){try{return Ue("fs",B),Ue("gitdir",k),Ue("ref",F),await jS({fs:new mt(B),gitdir:k,ref:F,object:L,checkout:$,force:K})}catch(ne){throw ne.caller="git.branch",ne}}l(Ap,"RI"),e(Ap,"branch");var CS=e((B,b)=>B==="."||b==null||b.length===0||b==="."?!0:b.length>=B.length?b.startsWith(B):B.startsWith(b),"worthWalking");async function Df({fs:B,cache:b,onProgress:k,onPostCheckout:F,dir:L,gitdir:$,remote:K,ref:ne,filepaths:_e,noCheckout:ce,noUpdateHead:he,dryRun:Be,force:je,track:Me=!0,nonBlocking:ze=!1,batchSize:Ye=100}){let rt;if(F)try{rt=await et.resolve({fs:B,gitdir:$,ref:"HEAD"})}catch{rt="0000000000000000000000000000000000000000"}let ot;try{ot=await et.resolve({fs:B,gitdir:$,ref:ne})}catch(it){if(ne==="HEAD")throw it;let ft=`${K}/${ne}`;if(ot=await et.resolve({fs:B,gitdir:$,ref:ft}),Me){let gt=await ht.get({fs:B,gitdir:$});await gt.set(`branch.${ne}.remote`,K),await gt.set(`branch.${ne}.merge`,`refs/heads/${ne}`),await ht.save({fs:B,gitdir:$,config:gt})}await et.writeRef({fs:B,gitdir:$,ref:`refs/heads/${ne}`,value:ot})}if(!ce){let it;try{it=await LS({fs:B,cache:b,onProgress:k,dir:L,gitdir:$,ref:ne,force:je,filepaths:_e})}catch(st){throw st instanceof ge&&st.data.what===ot?new Zd(ne,ot):st}let ft=it.filter(([st])=>st==="conflict").map(([st,ut])=>ut);if(ft.length>0)throw new Yd(ft);let gt=it.filter(([st])=>st==="error").map(([st,ut])=>ut);if(gt.length>0)throw new O(gt.join(", "));if(Be){F&&await F({previousHead:rt,newHead:ot,type:_e!=null&&_e.length>0?"file":"branch"});return}let yt=0,pt=it.length;if(await Q.acquire({fs:B,gitdir:$,cache:b},async function(st){await Promise.all(it.filter(([ut])=>ut==="delete"||ut==="delete-index").map(async function([ut,ct]){let _t=`${L}/${ct}`;ut==="delete"&&await B.rm(_t),st.delete({filepath:ct}),k&&await k({phase:"Updating workdir",loaded:++yt,total:pt})}))}),await Q.acquire({fs:B,gitdir:$,cache:b},async function(st){for(let[ut,ct]of it)if(ut==="rmdir"||ut==="rmdir-index"){let _t=`${L}/${ct}`;try{ut==="rmdir"&&await B.rmdir(_t),st.delete({filepath:ct}),k&&await k({phase:"Updating workdir",loaded:++yt,total:pt})}catch(jt){if(jt.code==="ENOTEMPTY")console.log(`Did not delete ${ct} because directory is not empty`);else throw jt}}}),await Promise.all(it.filter(([st])=>st==="mkdir"||st==="mkdir-index").map(async function([st,ut]){let ct=`${L}/${ut}`;await B.mkdir(ct),k&&await k({phase:"Updating workdir",loaded:++yt,total:pt})})),ze){let st=it.filter(([ct])=>ct==="create"||ct==="create-index"||ct==="update"||ct==="mkdir-index"),ut=await Rp("Update Working Dir",st.map(([ct,_t,jt,or,Bt])=>()=>DS({fs:B,cache:b,gitdir:$,dir:L},[ct,_t,jt,or,Bt])),k,Ye);await Q.acquire({fs:B,gitdir:$,cache:b,allowUnmerged:!0},async function(ct){await Rp("Update Index",ut.map(([_t,jt,or])=>()=>NS({index:ct,fullpath:_t,oid:jt,stats:or})),k,Ye)})}else await Q.acquire({fs:B,gitdir:$,cache:b,allowUnmerged:!0},async function(st){await Promise.all(it.filter(([ut])=>ut==="create"||ut==="create-index"||ut==="update"||ut==="mkdir-index").map(async function([ut,ct,_t,jt,or]){let Bt=`${L}/${ct}`;try{if(ut!=="create-index"&&ut!=="mkdir-index"){let{object:gr}=await Mt({fs:B,cache:b,gitdir:$,oid:_t});if(or&&await B.rm(Bt),jt===33188)await B.write(Bt,gr);else if(jt===33261)await B.write(Bt,gr,{mode:511});else if(jt===40960)await B.writelink(Bt,gr);else throw new O(`Invalid mode 0o${jt.toString(8)} detected in blob ${_t}`)}let ar=await B.lstat(Bt);jt===33261&&(ar.mode=493),ut==="mkdir-index"&&(ar.mode=57344),st.insert({filepath:ct,stats:ar,oid:_t}),k&&await k({phase:"Updating workdir",loaded:++yt,total:pt})}catch(ar){console.log(ar)}}))});F&&await F({previousHead:rt,newHead:ot,type:_e!=null&&_e.length>0?"file":"branch"})}if(!he){let it=await et.expand({fs:B,gitdir:$,ref:ne});it.startsWith("refs/heads")?await et.writeSymbolicRef({fs:B,gitdir:$,ref:"HEAD",value:it}):await et.writeRef({fs:B,gitdir:$,ref:"HEAD",value:ot})}}l(Df,"yv"),e(Df,"_checkout");async function LS({fs:B,cache:b,onProgress:k,dir:F,gitdir:L,ref:$,force:K,filepaths:ne}){let _e=0;return zn({fs:B,cache:b,dir:F,gitdir:L,trees:[Lr({ref:$}),Zi(),Oe()],map:e(async function(ce,[he,Be,je]){if(ce!=="."){if(ne&&!ne.some(Me=>CS(ce,Me)))return null;switch(k&&await k({phase:"Analyzing workdir",loaded:++_e}),[!!je,!!he,!!Be].map(Number).join("")){case"000":return;case"001":return K&&ne&&ne.includes(ce)?["delete",ce]:void 0;case"010":switch(await he.type()){case"tree":return["mkdir",ce];case"blob":return["create",ce,await he.oid(),await he.mode()];case"commit":return["mkdir-index",ce,await he.oid(),await he.mode()];default:return["error",`new entry Unhandled type ${await he.type()}`]}case"011":switch(`${await he.type()}-${await Be.type()}`){case"tree-tree":return;case"tree-blob":case"blob-tree":return["conflict",ce];case"blob-blob":return await he.oid()!==await Be.oid()?K?["update",ce,await he.oid(),await he.mode(),await he.mode()!==await Be.mode()]:["conflict",ce]:await he.mode()!==await Be.mode()?K?["update",ce,await he.oid(),await he.mode(),!0]:["conflict",ce]:["create-index",ce,await he.oid(),await he.mode()];case"commit-tree":return;case"commit-blob":return["conflict",ce];default:return["error",`new entry Unhandled type ${he.type}`]}case"100":return["delete-index",ce];case"101":switch(await je.type()){case"tree":return["rmdir-index",ce];case"blob":return await je.oid()!==await Be.oid()?K?["delete",ce]:["conflict",ce]:["delete",ce];case"commit":return["rmdir-index",ce];default:return["error",`delete entry Unhandled type ${await je.type()}`]}case"110":case"111":switch(`${await je.type()}-${await he.type()}`){case"tree-tree":return;case"blob-blob":{if(await je.oid()===await he.oid()&&await je.mode()===await he.mode()&&!K)return;if(Be){if(await Be.oid()!==await je.oid()&&await Be.oid()!==await he.oid())return K?["update",ce,await he.oid(),await he.mode(),await he.mode()!==await Be.mode()]:["conflict",ce]}else if(K)return["update",ce,await he.oid(),await he.mode(),await he.mode()!==await je.mode()];return await he.mode()!==await je.mode()?["update",ce,await he.oid(),await he.mode(),!0]:await he.oid()!==await je.oid()?["update",ce,await he.oid(),await he.mode(),!1]:void 0}case"tree-blob":return["update-dir-to-blob",ce,await he.oid()];case"blob-tree":return["update-blob-to-tree",ce];case"commit-commit":return["mkdir-index",ce,await he.oid(),await he.mode()];default:return["error",`update entry Unhandled type ${await je.type()}-${await he.type()}`]}}}},"map"),reduce:e(async function(ce,he){return he=_S(he),ce?ce&&ce[0]==="rmdir"?(he.push(ce),he):(he.unshift(ce),he):he},"reduce")})}l(LS,"rK"),e(LS,"analyze");async function NS({index:B,fullpath:b,stats:k,oid:F}){try{B.insert({filepath:b,stats:k,oid:F})}catch(L){console.warn(`Error inserting ${b} into index:`,L)}}l(NS,"nK"),e(NS,"updateIndex");async function DS({fs:B,cache:b,gitdir:k,dir:F},[L,$,K,ne,_e]){let ce=`${F}/${$}`;if(L!=="create-index"&&L!=="mkdir-index"){let{object:Be}=await Mt({fs:B,cache:b,gitdir:k,oid:K});if(_e&&await B.rm(ce),ne===33188)await B.write(ce,Be);else if(ne===33261)await B.write(ce,Be,{mode:511});else if(ne===40960)await B.writelink(ce,Be);else throw new O(`Invalid mode 0o${ne.toString(8)} detected in blob ${K}`)}let he=await B.lstat(ce);return ne===33261&&(he.mode=493),L==="mkdir-index"&&(he.mode=57344),[$,K,he]}l(DS,"iK"),e(DS,"updateWorkingDir");async function Rp(B,b,k,F){let L=[];try{for(let $=0;$<b.length;$+=F){let K=b.slice($,$+F).map(ne=>ne());(await Promise.allSettled(K)).forEach(ne=>{ne.status==="fulfilled"&&L.push(ne.value)}),k&&await k({phase:"Updating workdir",loaded:$+K.length,total:b.length})}return L}catch($){console.error(`Error during ${B}: ${$}`)}return L}l(Rp,"GP"),e(Rp,"batchAllSettled");async function Uf({fs:B,onProgress:b,onPostCheckout:k,dir:F,gitdir:L=o.join(F,".git"),remote:$="origin",ref:K,filepaths:ne,noCheckout:_e=!1,noUpdateHead:ce=K===void 0,dryRun:he=!1,force:Be=!1,track:je=!0,cache:Me={},nonBlocking:ze=!1,batchSize:Ye=100}){try{Ue("fs",B),Ue("dir",F),Ue("gitdir",L);let rt=K||"HEAD";return await Df({fs:new mt(B),cache:Me,onProgress:b,onPostCheckout:k,dir:F,gitdir:L,remote:$,ref:rt,filepaths:ne,noCheckout:_e,noUpdateHead:ce,dryRun:he,force:Be,track:je,nonBlocking:ze,batchSize:Ye})}catch(rt){throw rt.caller="git.checkout",rt}}l(Uf,"mv"),e(Uf,"checkout");var T4=new RegExp("^refs/(heads/|tags/|remotes/)?(.*)");function _i(B){let b=T4.exec(B);return b?b[1]==="remotes/"&&B.endsWith("/HEAD")?b[2].slice(0,-5):b[2]:B}l(_i,"na"),e(_i,"abbreviateRef");async function qn({fs:B,gitdir:b,fullname:k=!1,test:F=!1}){let L=await et.resolve({fs:B,gitdir:b,ref:"HEAD",depth:2});if(F)try{await et.resolve({fs:B,gitdir:b,ref:L})}catch{return}if(L.startsWith("refs/"))return k?L:_i(L)}l(qn,"lo"),e(qn,"_currentBranch");function US(B){return B=B.replace(/^git@([^:]+):/,"https://$1/"),B=B.replace(/^ssh:\/\//,"https://"),B}l(US,"aK"),e(US,"translateSSHtoHTTP");function Op({username:B="",password:b=""}){return`Basic ${Buffer.from(`${B}:${b}`).toString("base64")}`}l(Op,"FI"),e(Op,"calculateBasicAuthHeader");async function $a(B,b){let k=qd(B);for(;;){let{value:F,done:L}=await k.next();if(F&&await b(F),L)break}k.return&&k.return()}l($a,"Xf"),e($a,"forAwait");async function ol(B){let b=0,k=[];await $a(B,$=>{k.push($),b+=$.byteLength});let F=new Uint8Array(b),L=0;for(let $ of k)F.set($,L),L+=$.byteLength;return F}l(ol,"Mh"),e(ol,"collect");function kp(B){let b=B.match(/^https?:\/\/([^/]+)@/);if(b==null)return{url:B,auth:{}};b=b[1];let[k,F]=b.split(":");return B=B.replace(`${b}@`,""),{url:B,auth:{username:k,password:F}}}l(kp,"YP"),e(kp,"extractAuthFromUrl");function Mf(B,b){let k=b.toString(16);return"0".repeat(B-k.length)+k}l(Mf,"hv"),e(Mf,"padHex");var MS=(Xa=class{static flush(){return Buffer.from("0000","utf8")}static delim(){return Buffer.from("0001","utf8")}static encode(b){typeof b=="string"&&(b=Buffer.from(b));let k=b.length+4,F=Mf(4,k);return Buffer.concat([Buffer.from(F,"utf8"),b])}static streamReader(b){let k=new k2(b);return e(async function(){try{let F=await k.read(4);return F==null?!0:(F=parseInt(F.toString("utf8"),16),F===0||F===1?null:await k.read(F-4)??!0)}catch(F){return b.error=F,!0}},"read")}},l(Xa,"Iv"),Xa);e(MS,"GitPktLine");var ir=MS;async function Tp(B){let b={},k;for(;k=await B(),k!==!0;){if(k===null)continue;k=k.toString("utf8").replace(/\n$/,"");let F=k.indexOf("=");if(F>-1){let L=k.slice(0,F),$=k.slice(F+1);b[L]=$}else b[k]=!0}return{protocolVersion:2,capabilities2:b}}l(Tp,"KP"),e(Tp,"parseCapabilitiesV2");async function Fp(B,{service:b}){let k=new Set,F=new Map,L=new Map,$=ir.streamReader(B),K=await $();for(;K===null;)K=await $();if(K===!0)throw new Qd;if(K.includes("version 2"))return Tp($);if(K.toString("utf8").replace(/\n$/,"")!==`# service=${b}`)throw new tl(`# service=${b}\\n`,K.toString("utf8"));let ne=await $();for(;ne===null;)ne=await $();if(ne===!0)return{capabilities:k,refs:F,symrefs:L};if(ne=ne.toString("utf8"),ne.includes("version 2"))return Tp($);let[_e,ce]=$f(ne,"\0","\\x00");if(ce.split(" ").map(he=>k.add(he)),_e!=="0000000000000000000000000000000000000000 capabilities^{}"){let[he,Be]=$f(_e," "," ");for(F.set(Be,he);;){let je=await $();if(je===!0)break;if(je!==null){let[Me,ze]=$f(je.toString("utf8")," "," ");F.set(ze,Me)}}}for(let he of k)if(he.startsWith("symref=")){let Be=he.match(/symref=([^:]+):(.*)/);Be.length===3&&L.set(Be[1],Be[2])}return{protocolVersion:1,capabilities:k,refs:F,symrefs:L}}l(Fp,"XP"),e(Fp,"parseRefsAdResponse");function $f(B,b,k){let F=B.trim().split(b);if(F.length!==2)throw new tl(`Two strings separated by '${k}'`,B.toString("utf8"));return F}l($f,"X0"),e($f,"splitAndAssert");var $S=e((B,b)=>B.endsWith("?")?`${B}${b}`:`${B}/${b.replace(/^https?:\/\//,"")}`,"corsProxify"),WS=e((B,b)=>{(b.username||b.password)&&(B.Authorization=Op(b)),b.headers&&Object.assign(B,b.headers)},"updateHeaders"),Bp=e(async B=>{try{let b=Buffer.from(await ol(B.body)),k=b.toString("utf8");return{preview:k.length<256?k:k.slice(0,256)+"...",response:k,data:b}}catch{return{}}},"stringifyBody"),zS=(es=class{static async capabilities(){return["discover","connect"]}static async discover({http:b,onProgress:k,onAuth:F,onAuthSuccess:L,onAuthFailure:$,corsProxy:K,service:ne,url:_e,headers:ce,protocolVersion:he}){let{url:Be,auth:je}=kp(_e),Me=K?$S(K,Be):Be;(je.username||je.password)&&(ce.Authorization=Op(je)),he===2&&(ce["Git-Protocol"]="version=2");let ze,Ye,rt=!1;do if(ze=await b.request({onProgress:k,method:"GET",url:`${Me}/info/refs?service=${ne}`,headers:ce}),Ye=!1,ze.statusCode===401||ze.statusCode===203){let ot=rt?$:F;if(ot){if(je=await ot(Be,{...je,headers:{...ce}}),je&&je.cancel)throw new Pf;je&&(WS(ce,je),rt=!0,Ye=!0)}}else ze.statusCode===200&&rt&&L&&await L(Be,je);while(Ye);if(ze.statusCode!==200){let{response:ot}=await Bp(ze);throw new Ff(ze.statusCode,ze.statusMessage,ot)}if(ze.headers["content-type"]===`application/x-${ne}-advertisement`){let ot=await Fp(ze.body,{service:ne});return ot.auth=je,ot}else{let{preview:ot,response:it,data:ft}=await Bp(ze);try{let gt=await Fp([ft],{service:ne});return gt.auth=je,gt}catch{throw new np(ot,it)}}}static async connect({http:b,onProgress:k,corsProxy:F,service:L,url:$,auth:K,body:ne,headers:_e}){let ce=kp($);ce&&($=ce.url),F&&($=$S(F,$)),_e["content-type"]=`application/x-${L}-request`,_e.accept=`application/x-${L}-result`,WS(_e,K);let he=await b.request({onProgress:k,method:"POST",url:`${$}/${L}`,body:ne,headers:_e});if(he.statusCode!==200){let{response:Be}=Bp(he);throw new Ff(he.statusCode,he.statusMessage,Be)}return he}},l(es,"kv"),es);e(zS,"GitRemoteHTTP");var Wf=zS,HS=(ts=class{static getRemoteHelperFor({url:b}){let k=new Map;k.set("http",Wf),k.set("https",Wf);let F=qS({url:b});if(!F)throw new op(b);if(k.has(F.transport))return k.get(F.transport);throw new ip(b,F.transport,F.transport==="ssh"?US(b):void 0)}},l(ts,"Bv"),ts);e(HS,"GitRemoteManager");var zf=HS;function qS({url:B}){if(B.startsWith("git@"))return{transport:"ssh",address:B};let b=B.match(/(\w+)(:\/\/|::)(.*)/);if(b!==null){if(b[2]==="://")return{transport:b[1],address:b[0]};if(b[2]==="::")return{transport:b[1],address:b[3]}}}l(qS,"sK"),e(qS,"parseRemoteUrl");var to=null,GS=(rs=class{static async read({fs:b,gitdir:k}){to===null&&(to=new f);let F=o.join(k,"shallow"),L=new Set;return await to.acquire(F,async function(){let $=await b.read(F,{encoding:"utf8"});if($===null||$.trim()==="")return L;$.trim().split(`
|
|
81
|
-
`).map(K=>L.add(K))}),L}static async write({fs:b,gitdir:k,oids:F}){to===null&&(to=new f);let L=o.join(k,"shallow");if(F.size>0){let $=[...F].join(`
|
|
82
|
-
`)+`
|
|
83
|
-
`;await to.acquire(L,async function(){await b.write(L,$,{encoding:"utf8"})})}else await to.acquire(L,async function(){await b.rm(L)})}},l(rs,"Cv"),rs);e(GS,"GitShallowManager");var al=GS;async function VS({fs:B,gitdir:b,oid:k}){let F=`objects/${k.slice(0,2)}/${k.slice(2)}`;return B.exists(`${b}/${F}`)}l(VS,"lK"),e(VS,"hasObjectLoose");async function KS({fs:B,cache:b,gitdir:k,oid:F,getExternalRefDelta:L}){let $=await B.readdir(o.join(k,"objects/pack"));$=$.filter(K=>K.endsWith(".idx"));for(let K of $){let ne=`${k}/objects/pack/${K}`,_e=await Tf({fs:B,cache:b,filename:ne,getExternalRefDelta:L});if(_e.error)throw new O(_e.error);if(_e.offsets.has(F))return!0}return!1}l(KS,"fK"),e(KS,"hasObjectPacked");async function xp({fs:B,cache:b,gitdir:k,oid:F,format:L="content"}){let $=e(ne=>Mt({fs:B,cache:b,gitdir:k,oid:ne}),"getExternalRefDelta"),K=await VS({fs:B,gitdir:k,oid:F});return K||(K=await KS({fs:B,cache:b,gitdir:k,oid:F,getExternalRefDelta:$})),K}l(xp,"QP"),e(xp,"hasObject");function JS(B){return B.slice(0,12).toString("hex")==="5041434b0000000200000000"}l(JS,"uK"),e(JS,"emptyPackfile");function Ip(B,b){let k=B.map(F=>F.split("=",1)[0]);return b.filter(F=>{let L=F.split("=",1)[0];return k.includes(L)})}l(Ip,"xI"),e(Ip,"filterCapabilities");var Hf={name:"isomorphic-git",version:"1.34.0",agent:"git/isomorphic-git@1.34.0"},YS=(ns=class{constructor(){this._queue=[]}write(b){if(this._ended)throw Error("You cannot write to a FIFO that has already been ended!");if(this._waiting){let k=this._waiting;this._waiting=null,k({value:b})}else this._queue.push(b)}end(){if(this._ended=!0,this._waiting){let b=this._waiting;this._waiting=null,b({done:!0})}}destroy(b){this.error=b,this.end()}async next(){if(this._queue.length>0)return{value:this._queue.shift()};if(this._ended)return{done:!0};if(this._waiting)throw Error("You cannot call read until the previous call to read has returned!");return new Promise(b=>{this._waiting=b})}},l(ns,"Lv"),ns);e(YS,"FIFO");var qf=YS;function ZS(B){let b=B.indexOf("\r"),k=B.indexOf(`
|
|
84
|
-
`);return b===-1&&k===-1?-1:b===-1?k+1:k===-1?b+1:k===b+1?k+1:Math.min(b,k)+1}l(ZS,"cK"),e(ZS,"findSplit");function Pp(B){let b=new qf,k="";return(async()=>(await $a(B,F=>{for(F=F.toString("utf8"),k+=F;;){let L=ZS(k);if(L===-1)break;b.write(k.slice(0,L)),k=k.slice(L)}}),k.length>0&&b.write(k),b.end()))(),b}l(Pp,"OI"),e(Pp,"splitLines");var QS=(is=class{static demux(b){let k=ir.streamReader(b),F=new qf,L=new qf,$=new qf,K=e(async function(){let ne=await k();if(ne===null)return K();if(ne===!0){F.end(),$.end(),b.error?L.destroy(b.error):L.end();return}switch(ne[0]){case 1:{L.write(ne.slice(1));break}case 2:{$.write(ne.slice(1));break}case 3:{let _e=ne.slice(1);$.write(_e),F.end(),$.end(),L.destroy(new Error(_e.toString("utf8")));return}default:F.write(ne)}K()},"nextBit");return K(),{packetlines:F,packfile:L,progress:$}}},l(is,"Nv"),is);e(QS,"GitSideBand");var XS=QS;async function eA(B){let{packetlines:b,packfile:k,progress:F}=XS.demux(B),L=[],$=[],K=[],ne=!1,_e=!1;return new Promise((ce,he)=>{$a(b,Be=>{let je=Be.toString("utf8").trim();if(je.startsWith("shallow")){let Me=je.slice(-41).trim();Me.length!==40&&he(new Ce(Me)),L.push(Me)}else if(je.startsWith("unshallow")){let Me=je.slice(-41).trim();Me.length!==40&&he(new Ce(Me)),$.push(Me)}else if(je.startsWith("ACK")){let[,Me,ze]=je.split(" ");K.push({oid:Me,status:ze}),ze||(_e=!0)}else je.startsWith("NAK")?(ne=!0,_e=!0):(_e=!0,ne=!0);_e&&(B.error?he(B.error):ce({shallows:L,unshallows:$,acks:K,nak:ne,packfile:k,progress:F}))}).finally(()=>{_e||(B.error?he(B.error):ce({shallows:L,unshallows:$,acks:K,nak:ne,packfile:k,progress:F}))})})}l(eA,"hK"),e(eA,"parseUploadPackResponse");function tA({capabilities:B=[],wants:b=[],haves:k=[],shallows:F=[],depth:L=null,since:$=null,exclude:K=[]}){let ne=[];b=[...new Set(b)];let _e=` ${B.join(" ")}`;for(let ce of b)ne.push(ir.encode(`want ${ce}${_e}
|
|
85
|
-
`)),_e="";for(let ce of F)ne.push(ir.encode(`shallow ${ce}
|
|
86
|
-
`));L!==null&&ne.push(ir.encode(`deepen ${L}
|
|
87
|
-
`)),$!==null&&ne.push(ir.encode(`deepen-since ${Math.floor($.valueOf()/1e3)}
|
|
88
|
-
`));for(let ce of K)ne.push(ir.encode(`deepen-not ${ce}
|
|
89
|
-
`));ne.push(ir.flush());for(let ce of k)ne.push(ir.encode(`have ${ce}
|
|
90
|
-
`));return ne.push(ir.encode(`done
|
|
91
|
-
`)),ne}l(tA,"dK"),e(tA,"writeUploadPackRequest");async function Gf({fs:B,cache:b,http:k,onProgress:F,onMessage:L,onAuth:$,onAuthSuccess:K,onAuthFailure:ne,gitdir:_e,ref:ce,remoteRef:he,remote:Be,url:je,corsProxy:Me,depth:ze=null,since:Ye=null,exclude:rt=[],relative:ot=!1,tags:it=!1,singleBranch:ft=!1,headers:gt={},prune:yt=!1,pruneTags:pt=!1}){let st=ce||await qn({fs:B,gitdir:_e,test:!0}),ut=await ht.get({fs:B,gitdir:_e}),ct=Be||st&&await ut.get(`branch.${st}.remote`)||"origin",_t=je||await ut.get(`remote.${ct}.url`);if(typeof _t>"u")throw new Qr("remote OR url");let jt=he||st&&await ut.get(`branch.${st}.merge`)||ce||"HEAD";Me===void 0&&(Me=await ut.get("http.corsProxy"));let or=zf.getRemoteHelperFor({url:_t}),Bt=await or.discover({http:k,onAuth:$,onAuthSuccess:K,onAuthFailure:ne,corsProxy:Me,service:"git-upload-pack",url:_t,headers:gt,protocolVersion:1}),ar=Bt.auth,gr=Bt.refs;if(gr.size===0)return{defaultBranch:null,fetchHead:null,fetchHeadDescription:null};if(ze!==null&&!Bt.capabilities.has("shallow"))throw new La("shallow","depth");if(Ye!==null&&!Bt.capabilities.has("deepen-since"))throw new La("deepen-since","since");if(rt.length>0&&!Bt.capabilities.has("deepen-not"))throw new La("deepen-not","exclude");if(ot===!0&&!Bt.capabilities.has("deepen-relative"))throw new La("deepen-relative","relative");let{oid:zo,fullref:Ho}=et.resolveAgainstMap({ref:jt,map:gr});for(let Ct of gr.keys())Ct===Ho||Ct==="HEAD"||Ct.startsWith("refs/heads/")||it&&Ct.startsWith("refs/tags/")||gr.delete(Ct);let os=Ip([...Bt.capabilities],["multi_ack_detailed","no-done","side-band-64k","ofs-delta",`agent=${Hf.agent}`]);ot&&os.push("deepen-relative");let oy=ft?[zo]:gr.values(),ay=ft?[st]:await et.listRefs({fs:B,gitdir:_e,filepath:"refs"}),Hr=[];for(let Ct of ay)try{Ct=await et.expand({fs:B,gitdir:_e,ref:Ct});let kr=await et.resolve({fs:B,gitdir:_e,ref:Ct});await xp({fs:B,cache:b,gitdir:_e,oid:kr})&&Hr.push(kr)}catch{}Hr=[...new Set(Hr)];let er=await al.read({fs:B,gitdir:_e}),mn=Bt.capabilities.has("shallow")?[...er]:[],Or=tA({capabilities:os,wants:oy,haves:Hr,shallows:mn,depth:ze,since:Ye,exclude:rt}),ll=Buffer.from(await ol(Or)),qo=await or.connect({http:k,onProgress:F,corsProxy:Me,service:"git-upload-pack",url:_t,auth:ar,body:[ll],headers:gt}),sr=await eA(qo.body);qo.headers&&(sr.headers=qo.headers);for(let Ct of sr.shallows)if(!er.has(Ct))try{let{object:kr}=await Mt({fs:B,cache:b,gitdir:_e,oid:Ct}),tn=new Xr(kr),wn=await Promise.all(tn.headers().parent.map(as=>xp({fs:B,cache:b,gitdir:_e,oid:as})));wn.length===0||wn.every(as=>as)||er.add(Ct)}catch{er.add(Ct)}for(let Ct of sr.unshallows)er.delete(Ct);if(await al.write({fs:B,gitdir:_e,oids:er}),ft){let Ct=new Map([[Ho,zo]]),kr=new Map,tn=10,wn=Ho;for(;tn--;){let sy=Bt.symrefs.get(wn);if(sy===void 0)break;kr.set(wn,sy),wn=sy}let as=gr.get(wn);as&&Ct.set(wn,as);let{pruned:j4}=await et.updateRemoteRefs({fs:B,gitdir:_e,remote:ct,refs:Ct,symrefs:kr,tags:it,prune:yt});yt&&(sr.pruned=j4)}else{let{pruned:Ct}=await et.updateRemoteRefs({fs:B,gitdir:_e,remote:ct,refs:gr,symrefs:Bt.symrefs,tags:it,prune:yt,pruneTags:pt});yt&&(sr.pruned=Ct)}if(sr.HEAD=Bt.symrefs.get("HEAD"),sr.HEAD===void 0){let{oid:Ct}=et.resolveAgainstMap({ref:"HEAD",map:gr});for(let[kr,tn]of gr.entries())if(kr!=="HEAD"&&tn===Ct){sr.HEAD=kr;break}}let P4=Ho.startsWith("refs/tags")?"tag":"branch";if(sr.FETCH_HEAD={oid:zo,description:`${P4} '${_i(Ho)}' of ${_t}`},F||L){let Ct=Pp(sr.progress);$a(Ct,async kr=>{if(L&&await L(kr),F){let tn=kr.match(/([^:]*).*\((\d+?)\/(\d+?)\)/);tn&&await F({phase:tn[1].trim(),loaded:parseInt(tn[2],10),total:parseInt(tn[3],10)})}})}let Yf=Buffer.from(await ol(sr.packfile));if(qo.body.error)throw qo.body.error;let HA=Yf.slice(-20).toString("hex"),fl={defaultBranch:sr.HEAD,fetchHead:sr.FETCH_HEAD.oid,fetchHeadDescription:sr.FETCH_HEAD.description};if(sr.headers&&(fl.headers=sr.headers),yt&&(fl.pruned=sr.pruned),HA!==""&&!JS(Yf)){fl.packfile=`objects/pack/pack-${HA}.pack`;let Ct=o.join(_e,fl.packfile);await B.write(Ct,Yf);let kr=e(wn=>Mt({fs:B,cache:b,gitdir:_e,oid:wn}),"getExternalRefDelta"),tn=await Kd.fromPack({pack:Yf,getExternalRefDelta:kr,onProgress:F});await B.write(Ct.replace(/\.pack$/,".idx"),await tn.toBuffer())}return fl}l(Gf,"gv"),e(Gf,"_fetch");async function jp({fs:B,bare:b=!1,dir:k,gitdir:F=b?k:o.join(k,".git"),defaultBranch:L="master"}){if(await B.exists(F+"/config"))return;let $=["hooks","info","objects/info","objects/pack","refs/heads","refs/tags"];$=$.map(K=>F+"/"+K);for(let K of $)await B.mkdir(K);await B.write(F+"/config",`[core]
|
|
92
|
-
repositoryformatversion = 0
|
|
93
|
-
filemode = false
|
|
94
|
-
bare = ${b}
|
|
95
|
-
`+(b?"":` logallrefupdates = true
|
|
96
|
-
`)+` symlinks = false
|
|
97
|
-
ignorecase = true
|
|
98
|
-
`),await B.write(F+"/HEAD",`ref: refs/heads/${L}
|
|
99
|
-
`)}l(jp,"PI"),e(jp,"_init");async function rA({fs:B,cache:b,http:k,onProgress:F,onMessage:L,onAuth:$,onAuthSuccess:K,onAuthFailure:ne,onPostCheckout:_e,dir:ce,gitdir:he,url:Be,corsProxy:je,ref:Me,remote:ze,depth:Ye,since:rt,exclude:ot,relative:it,singleBranch:ft,noCheckout:gt,noTags:yt,headers:pt,nonBlocking:st,batchSize:ut=100}){try{if(await jp({fs:B,gitdir:he}),await _p({fs:B,gitdir:he,remote:ze,url:Be,force:!1}),je){let jt=await ht.get({fs:B,gitdir:he});await jt.set("http.corsProxy",je),await ht.save({fs:B,gitdir:he,config:jt})}let{defaultBranch:ct,fetchHead:_t}=await Gf({fs:B,cache:b,http:k,onProgress:F,onMessage:L,onAuth:$,onAuthSuccess:K,onAuthFailure:ne,gitdir:he,ref:Me,remote:ze,corsProxy:je,depth:Ye,since:rt,exclude:ot,relative:it,singleBranch:ft,headers:pt,tags:!yt});if(_t===null)return;Me=Me||ct,Me=Me.replace("refs/heads/",""),await Df({fs:B,cache:b,onProgress:F,onPostCheckout:_e,dir:ce,gitdir:he,ref:Me,remote:ze,noCheckout:gt,nonBlocking:st,batchSize:ut})}catch(ct){throw await B.rmdir(he,{recursive:!0,maxRetries:10}).catch(()=>{}),ct}}l(rA,"pK"),e(rA,"_clone");async function Cp({fs:B,http:b,onProgress:k,onMessage:F,onAuth:L,onAuthSuccess:$,onAuthFailure:K,onPostCheckout:ne,dir:_e,gitdir:ce=o.join(_e,".git"),url:he,corsProxy:Be=void 0,ref:je=void 0,remote:Me="origin",depth:ze=void 0,since:Ye=void 0,exclude:rt=[],relative:ot=!1,singleBranch:it=!1,noCheckout:ft=!1,noTags:gt=!1,headers:yt={},cache:pt={},nonBlocking:st=!1,batchSize:ut=100}){try{return Ue("fs",B),Ue("http",b),Ue("gitdir",ce),ft||Ue("dir",_e),Ue("url",he),await rA({fs:new mt(B),cache:pt,http:b,onProgress:k,onMessage:F,onAuth:L,onAuthSuccess:$,onAuthFailure:K,onPostCheckout:ne,dir:_e,gitdir:ce,url:he,corsProxy:Be,ref:je,remote:Me,depth:ze,since:Ye,exclude:rt,relative:ot,singleBranch:it,noCheckout:ft,noTags:gt,headers:yt,nonBlocking:st,batchSize:ut})}catch(ct){throw ct.caller="git.clone",ct}}l(Cp,"II"),e(Cp,"clone");async function Lp({fs:B,onSign:b,dir:k,gitdir:F=o.join(k,".git"),message:L,author:$,committer:K,signingKey:ne,amend:_e=!1,dryRun:ce=!1,noUpdateBranch:he=!1,ref:Be,parent:je,tree:Me,cache:ze={}}){try{Ue("fs",B),_e||Ue("message",L),ne&&Ue("onSign",b);let Ye=new mt(B);return await il({fs:Ye,cache:ze,onSign:b,gitdir:F,message:L,author:$,committer:K,signingKey:ne,amend:_e,dryRun:ce,noUpdateBranch:he,ref:Be,parent:je,tree:Me})}catch(Ye){throw Ye.caller="git.commit",Ye}}l(Lp,"kI"),e(Lp,"commit");async function Np({fs:B,dir:b,gitdir:k=o.join(b,".git"),fullname:F=!1,test:L=!1}){try{return Ue("fs",B),Ue("gitdir",k),await qn({fs:new mt(B),gitdir:k,fullname:F,test:L})}catch($){throw $.caller="git.currentBranch",$}}l(Np,"BI"),e(Np,"currentBranch");async function nA({fs:B,gitdir:b,ref:k}){if(k=k.startsWith("refs/heads/")?k:`refs/heads/${k}`,!await et.exists({fs:B,gitdir:b,ref:k}))throw new ge(k);let F=await et.expand({fs:B,gitdir:b,ref:k}),L=await qn({fs:B,gitdir:b,fullname:!0});if(F===L){let ne=await et.resolve({fs:B,gitdir:b,ref:F});await et.writeRef({fs:B,gitdir:b,ref:"HEAD",value:ne})}await et.deleteRef({fs:B,gitdir:b,ref:F});let $=_i(k),K=await ht.get({fs:B,gitdir:b});await K.deleteSection("branch",$),await ht.save({fs:B,gitdir:b,config:K})}l(nA,"yK"),e(nA,"_deleteBranch");async function Dp({fs:B,dir:b,gitdir:k=o.join(b,".git"),ref:F}){try{return Ue("fs",B),Ue("ref",F),await nA({fs:new mt(B),gitdir:k,ref:F})}catch(L){throw L.caller="git.deleteBranch",L}}l(Dp,"CI"),e(Dp,"deleteBranch");async function Up({fs:B,dir:b,gitdir:k=o.join(b,".git"),ref:F}){try{Ue("fs",B),Ue("ref",F),await et.deleteRef({fs:new mt(B),gitdir:k,ref:F})}catch(L){throw L.caller="git.deleteRef",L}}l(Up,"LI"),e(Up,"deleteRef");async function iA({fs:B,gitdir:b,remote:k}){let F=await ht.get({fs:B,gitdir:b});await F.deleteSection("remote",k),await ht.save({fs:B,gitdir:b,config:F})}l(iA,"mK"),e(iA,"_deleteRemote");async function Mp({fs:B,dir:b,gitdir:k=o.join(b,".git"),remote:F}){try{return Ue("fs",B),Ue("remote",F),await iA({fs:new mt(B),gitdir:k,remote:F})}catch(L){throw L.caller="git.deleteRemote",L}}l(Mp,"NI"),e(Mp,"deleteRemote");async function oA({fs:B,gitdir:b,ref:k}){k=k.startsWith("refs/tags/")?k:`refs/tags/${k}`,await et.deleteRef({fs:B,gitdir:b,ref:k})}l(oA,"gK"),e(oA,"_deleteTag");async function $p({fs:B,dir:b,gitdir:k=o.join(b,".git"),ref:F}){try{return Ue("fs",B),Ue("ref",F),await oA({fs:new mt(B),gitdir:k,ref:F})}catch(L){throw L.caller="git.deleteTag",L}}l($p,"DI"),e($p,"deleteTag");async function aA({fs:B,gitdir:b,oid:k}){let F=k.slice(0,2);return(await B.readdir(`${b}/objects/${F}`)).map(L=>`${F}${L}`).filter(L=>L.startsWith(k))}l(aA,"wK"),e(aA,"expandOidLoose");async function sA({fs:B,cache:b,gitdir:k,oid:F,getExternalRefDelta:L}){let $=[],K=await B.readdir(o.join(k,"objects/pack"));K=K.filter(ne=>ne.endsWith(".idx"));for(let ne of K){let _e=`${k}/objects/pack/${ne}`,ce=await Tf({fs:B,cache:b,filename:_e,getExternalRefDelta:L});if(ce.error)throw new O(ce.error);for(let he of ce.offsets.keys())he.startsWith(F)&&$.push(he)}return $}l(sA,"vK"),e(sA,"expandOidPacked");async function lA({fs:B,cache:b,gitdir:k,oid:F}){let L=e(ne=>Mt({fs:B,cache:b,gitdir:k,oid:ne}),"getExternalRefDelta"),$=await aA({fs:B,gitdir:k,oid:F}),K=await sA({fs:B,cache:b,gitdir:k,oid:F,getExternalRefDelta:L});for(let ne of K)$.indexOf(ne)===-1&&$.push(ne);if($.length===1)return $[0];throw $.length>1?new Jd("oids",F,$):new ge(`an object matching "${F}"`)}l(lA,"bK"),e(lA,"_expandOid");async function Wp({fs:B,dir:b,gitdir:k=o.join(b,".git"),oid:F,cache:L={}}){try{return Ue("fs",B),Ue("gitdir",k),Ue("oid",F),await lA({fs:new mt(B),cache:L,gitdir:k,oid:F})}catch($){throw $.caller="git.expandOid",$}}l(Wp,"$I"),e(Wp,"expandOid");async function zp({fs:B,dir:b,gitdir:k=o.join(b,".git"),ref:F}){try{return Ue("fs",B),Ue("gitdir",k),Ue("ref",F),await et.expand({fs:new mt(B),gitdir:k,ref:F})}catch(L){throw L.caller="git.expandRef",L}}l(zp,"MI"),e(zp,"expandRef");async function Vf({fs:B,cache:b,gitdir:k,oids:F}){let L={},$=F.length,K=F.map((ne,_e)=>({index:_e,oid:ne}));for(;K.length;){let ne=new Set;for(let{oid:ce,index:he}of K)L[ce]||(L[ce]=new Set),L[ce].add(he),L[ce].size===$&&ne.add(ce);if(ne.size>0)return[...ne];let _e=new Map;for(let{oid:ce,index:he}of K)try{let{object:Be}=await Mt({fs:B,cache:b,gitdir:k,oid:ce}),je=Xr.from(Be),{parent:Me}=je.parseHeaders();for(let ze of Me)(!L[ze]||!L[ze].has(he))&&_e.set(ze+":"+he,{oid:ze,index:he})}catch{}K=Array.from(_e.values())}return[]}l(Vf,"wv"),e(Vf,"_findMergeBase");var Hp=/^.*(\r?\n|$)/gm;function fA({branches:B,contents:b}){let k=B[1],F=B[2],L=b[0],$=b[1],K=b[2],ne=$.match(Hp),_e=L.match(Hp),ce=K.match(Hp),he=m(ne,_e,ce),Be=7,je="",Me=!0;for(let ze of he)ze.ok&&(je+=ze.ok.join("")),ze.conflict&&(Me=!1,je+=`${"<".repeat(Be)} ${k}
|
|
100
|
-
`,je+=ze.conflict.a.join(""),je+=`${"=".repeat(Be)}
|
|
101
|
-
`,je+=ze.conflict.b.join(""),je+=`${">".repeat(Be)} ${F}
|
|
102
|
-
`);return{cleanMerge:Me,mergedText:je}}l(fA,"_K"),e(fA,"mergeFile");async function uA({fs:B,cache:b,dir:k,gitdir:F=o.join(k,".git"),index:L,ourOid:$,baseOid:K,theirOid:ne,ourName:_e="ours",baseName:ce="base",theirName:he="theirs",dryRun:Be=!1,abortOnConflict:je=!0,mergeDriver:Me}){let ze=Lr({ref:$}),Ye=Lr({ref:K}),rt=Lr({ref:ne}),ot=[],it=[],ft=[],gt=[],yt=await zn({fs:B,cache:b,dir:k,gitdir:F,trees:[ze,Ye,rt],map:e(async function(pt,[st,ut,ct]){let _t=fe(pt),jt=await nl(st,ut),or=await nl(ct,ut);switch(`${jt}-${or}`){case"false-false":return{mode:await ut.mode(),path:_t,oid:await ut.oid(),type:await ut.type()};case"false-true":return!ct&&await st.type()==="tree"?{mode:await st.mode(),path:_t,oid:await st.oid(),type:await st.type()}:ct?{mode:await ct.mode(),path:_t,oid:await ct.oid(),type:await ct.type()}:void 0;case"true-false":return!st&&await ct.type()==="tree"?{mode:await ct.mode(),path:_t,oid:await ct.oid(),type:await ct.type()}:st?{mode:await st.mode(),path:_t,oid:await st.oid(),type:await st.type()}:void 0;case"true-true":{if(st&&ct&&await st.type()==="tree"&&await ct.type()==="tree")return{mode:await st.mode(),path:_t,oid:await st.oid(),type:"tree"};if(st&&ct&&await st.type()==="blob"&&await ct.type()==="blob")return cA({fs:B,gitdir:F,path:_t,ours:st,base:ut,theirs:ct,ourName:_e,baseName:ce,theirName:he,mergeDriver:Me}).then(async Bt=>{if(Bt.cleanMerge)je||L.insert({filepath:pt,oid:Bt.mergeResult.oid,stage:0});else if(ot.push(pt),it.push(pt),!je){let ar="";ut&&await ut.type()==="blob"&&(ar=await ut.oid());let gr=await st.oid(),zo=await ct.oid();L.delete({filepath:pt}),ar&&L.insert({filepath:pt,oid:ar,stage:1}),L.insert({filepath:pt,oid:gr,stage:2}),L.insert({filepath:pt,oid:zo,stage:3})}return Bt.mergeResult});if(ut&&!st&&ct&&await ut.type()==="blob"&&await ct.type()==="blob"){if(ot.push(pt),ft.push(pt),!je){let Bt=await ut.oid(),ar=await ct.oid();L.delete({filepath:pt}),L.insert({filepath:pt,oid:Bt,stage:1}),L.insert({filepath:pt,oid:ar,stage:3})}return{mode:await ct.mode(),oid:await ct.oid(),type:"blob",path:_t}}if(ut&&st&&!ct&&await ut.type()==="blob"&&await st.type()==="blob"){if(ot.push(pt),gt.push(pt),!je){let Bt=await ut.oid(),ar=await st.oid();L.delete({filepath:pt}),L.insert({filepath:pt,oid:Bt,stage:1}),L.insert({filepath:pt,oid:ar,stage:2})}return{mode:await st.mode(),oid:await st.oid(),type:"blob",path:_t}}if(ut&&!st&&!ct&&(await ut.type()==="blob"||await ut.type()==="tree"))return;throw new Bf}}},"map"),reduce:ot.length!==0&&(!k||je)?void 0:async(pt,st)=>{let ut=st.filter(Boolean);if(pt&&!(pt&&pt.type==="tree"&&ut.length===0&&pt.path!==".")){if(ut.length>0||pt.path==="."&&ut.length===0){let ct=new Yr(ut).toObject(),_t=await Rr({fs:B,gitdir:F,type:"tree",object:ct,dryRun:Be});pt.oid=_t}return pt}}});return ot.length!==0?(k&&!je&&await zn({fs:B,cache:b,dir:k,gitdir:F,trees:[Lr({ref:yt.oid})],map:e(async function(pt,[st]){let ut=`${k}/${pt}`;if(await st.type()==="blob"){let ct=await st.mode(),_t=new TextDecoder().decode(await st.content());await B.write(ut,_t,{mode:ct})}return!0},"map")}),new xf(ot,it,ft,gt)):yt.oid}l(uA,"EK"),e(uA,"mergeTree");async function cA({fs:B,gitdir:b,path:k,ours:F,base:L,theirs:$,ourName:K,theirName:ne,baseName:_e,dryRun:ce,mergeDriver:he=fA}){let Be="blob",je="100755",Me="",ze="";L&&await L.type()==="blob"&&(je=await L.mode(),Me=await L.oid(),ze=Buffer.from(await L.content()).toString("utf8"));let Ye=je===await F.mode()?await $.mode():await F.mode();if(await F.oid()===await $.oid())return{cleanMerge:!0,mergeResult:{mode:Ye,path:k,oid:await F.oid(),type:Be}};if(await F.oid()===Me)return{cleanMerge:!0,mergeResult:{mode:Ye,path:k,oid:await $.oid(),type:Be}};if(await $.oid()===Me)return{cleanMerge:!0,mergeResult:{mode:Ye,path:k,oid:await F.oid(),type:Be}};let rt=Buffer.from(await F.content()).toString("utf8"),ot=Buffer.from(await $.content()).toString("utf8"),{mergedText:it,cleanMerge:ft}=await he({branches:[_e,K,ne],contents:[ze,rt,ot],path:k}),gt=await Rr({fs:B,gitdir:b,type:"blob",object:Buffer.from(it,"utf8"),dryRun:ce});return{cleanMerge:ft,mergeResult:{mode:Ye,path:k,oid:gt,type:Be}}}l(cA,"SK"),e(cA,"mergeBlobs");async function qp({fs:B,cache:b,dir:k,gitdir:F,ours:L,theirs:$,fastForward:K=!0,fastForwardOnly:ne=!1,dryRun:_e=!1,noUpdateBranch:ce=!1,abortOnConflict:he=!0,message:Be,author:je,committer:Me,signingKey:ze,onSign:Ye,mergeDriver:rt,allowUnrelatedHistories:ot=!1}){L===void 0&&(L=await qn({fs:B,gitdir:F,fullname:!0})),L=await et.expand({fs:B,gitdir:F,ref:L}),$=await et.expand({fs:B,gitdir:F,ref:$});let it=await et.resolve({fs:B,gitdir:F,ref:L}),ft=await et.resolve({fs:B,gitdir:F,ref:$}),gt=await Vf({fs:B,cache:b,gitdir:F,oids:[it,ft]});if(gt.length!==1)if(gt.length===0&&ot)gt.push("4b825dc642cb6eb9a060e54bf8d69288fbee4904");else throw new Bf;let yt=gt[0];if(yt===ft)return{oid:it,alreadyMerged:!0};if(K&&yt===it)return!_e&&!ce&&await et.writeRef({fs:B,gitdir:F,ref:L,value:ft}),{oid:ft,fastForward:!0};{if(ne)throw new Xd;let pt=await Q.acquire({fs:B,gitdir:F,cache:b,allowUnmerged:!1},async st=>uA({fs:B,cache:b,dir:k,gitdir:F,index:st,ourOid:it,theirOid:ft,baseOid:yt,ourName:_i(L),baseName:"base",theirName:_i($),dryRun:_e,abortOnConflict:he,mergeDriver:rt}));if(pt instanceof xf)throw pt;return Be||(Be=`Merge branch '${_i($)}' into ${_i(L)}`),{oid:await il({fs:B,cache:b,gitdir:F,message:Be,ref:L,tree:pt,parent:[it,ft],author:je,committer:Me,signingKey:ze,onSign:Ye,dryRun:_e,noUpdateBranch:ce}),tree:pt,mergeCommit:!0}}}l(qp,"UI"),e(qp,"_merge");async function Gp({fs:B,cache:b,http:k,onProgress:F,onMessage:L,onAuth:$,onAuthSuccess:K,onAuthFailure:ne,dir:_e,gitdir:ce,ref:he,url:Be,remote:je,remoteRef:Me,prune:ze,pruneTags:Ye,fastForward:rt,fastForwardOnly:ot,corsProxy:it,singleBranch:ft,headers:gt,author:yt,committer:pt,signingKey:st}){try{if(!he){let _t=await qn({fs:B,gitdir:ce});if(!_t)throw new Qr("ref");he=_t}let{fetchHead:ut,fetchHeadDescription:ct}=await Gf({fs:B,cache:b,http:k,onProgress:F,onMessage:L,onAuth:$,onAuthSuccess:K,onAuthFailure:ne,gitdir:ce,corsProxy:it,ref:he,url:Be,remote:je,remoteRef:Me,singleBranch:ft,headers:gt,prune:ze,pruneTags:Ye});await qp({fs:B,cache:b,gitdir:ce,ours:he,theirs:ut,fastForward:rt,fastForwardOnly:ot,message:`Merge ${ct}`,author:yt,committer:pt,signingKey:st,dryRun:!1,noUpdateBranch:!1}),await Df({fs:B,cache:b,onProgress:F,dir:_e,gitdir:ce,ref:he,remote:je,noCheckout:!1})}catch(ut){throw ut.caller="git.pull",ut}}l(Gp,"jI"),e(Gp,"_pull");async function Vp({fs:B,http:b,onProgress:k,onMessage:F,onAuth:L,onAuthSuccess:$,onAuthFailure:K,dir:ne,gitdir:_e=o.join(ne,".git"),ref:ce,url:he,remote:Be,remoteRef:je,corsProxy:Me,singleBranch:ze,headers:Ye={},cache:rt={}}){try{Ue("fs",B),Ue("http",b),Ue("gitdir",_e);let ot={name:"",email:"",timestamp:Date.now(),timezoneOffset:0};return await Gp({fs:new mt(B),cache:rt,http:b,onProgress:k,onMessage:F,onAuth:L,onAuthSuccess:$,onAuthFailure:K,dir:ne,gitdir:_e,ref:ce,url:he,remote:Be,remoteRef:je,fastForwardOnly:!0,corsProxy:Me,singleBranch:ze,headers:Ye,author:ot,committer:ot})}catch(ot){throw ot.caller="git.fastForward",ot}}l(Vp,"HI"),e(Vp,"fastForward");async function Kp({fs:B,http:b,onProgress:k,onMessage:F,onAuth:L,onAuthSuccess:$,onAuthFailure:K,dir:ne,gitdir:_e=o.join(ne,".git"),ref:ce,remote:he,remoteRef:Be,url:je,corsProxy:Me,depth:ze=null,since:Ye=null,exclude:rt=[],relative:ot=!1,tags:it=!1,singleBranch:ft=!1,headers:gt={},prune:yt=!1,pruneTags:pt=!1,cache:st={}}){try{return Ue("fs",B),Ue("http",b),Ue("gitdir",_e),await Gf({fs:new mt(B),cache:st,http:b,onProgress:k,onMessage:F,onAuth:L,onAuthSuccess:$,onAuthFailure:K,gitdir:_e,ref:ce,remote:he,remoteRef:Be,url:je,corsProxy:Me,depth:ze,since:Ye,exclude:rt,relative:ot,tags:it,singleBranch:ft,headers:gt,prune:yt,pruneTags:pt})}catch(ut){throw ut.caller="git.fetch",ut}}l(Kp,"WI"),e(Kp,"fetch");async function Jp({fs:B,dir:b,gitdir:k=o.join(b,".git"),oids:F,cache:L={}}){try{return Ue("fs",B),Ue("gitdir",k),Ue("oids",F),await Vf({fs:new mt(B),cache:L,gitdir:k,oids:F})}catch($){throw $.caller="git.findMergeBase",$}}l(Jp,"qI"),e(Jp,"findMergeBase");async function Yp({fs:B,filepath:b}){if(await B.exists(o.join(b,".git")))return b;{let k=ve(b);if(k===b)throw new ge(`git root for ${b}`);return Yp({fs:B,filepath:k})}}l(Yp,"zI"),e(Yp,"_findRoot");async function Zp({fs:B,filepath:b}){try{return Ue("fs",B),Ue("filepath",b),await Yp({fs:new mt(B),filepath:b})}catch(k){throw k.caller="git.findRoot",k}}l(Zp,"VI"),e(Zp,"findRoot");async function Qp({fs:B,dir:b,gitdir:k=o.join(b,".git"),path:F}){try{return Ue("fs",B),Ue("gitdir",k),Ue("path",F),await Da({fs:new mt(B),gitdir:k,path:F})}catch(L){throw L.caller="git.getConfig",L}}l(Qp,"GI"),e(Qp,"getConfig");async function hA({fs:B,gitdir:b,path:k}){return(await ht.get({fs:B,gitdir:b})).getall(k)}l(hA,"AK"),e(hA,"_getConfigAll");async function Xp({fs:B,dir:b,gitdir:k=o.join(b,".git"),path:F}){try{return Ue("fs",B),Ue("gitdir",k),Ue("path",F),await hA({fs:new mt(B),gitdir:k,path:F})}catch(L){throw L.caller="git.getConfigAll",L}}l(Xp,"YI"),e(Xp,"getConfigAll");async function eg({http:B,onAuth:b,onAuthSuccess:k,onAuthFailure:F,corsProxy:L,url:$,headers:K={},forPush:ne=!1}){try{Ue("http",B),Ue("url",$);let _e=await zf.getRemoteHelperFor({url:$}).discover({http:B,onAuth:b,onAuthSuccess:k,onAuthFailure:F,corsProxy:L,service:ne?"git-receive-pack":"git-upload-pack",url:$,headers:K,protocolVersion:1}),ce={capabilities:[..._e.capabilities]};for(let[he,Be]of _e.refs){let je=he.split("/"),Me=je.pop(),ze=ce;for(let Ye of je)ze[Ye]=ze[Ye]||{},ze=ze[Ye];ze[Me]=Be}for(let[he,Be]of _e.symrefs){let je=he.split("/"),Me=je.pop(),ze=ce;for(let Ye of je)ze[Ye]=ze[Ye]||{},ze=ze[Ye];ze[Me]=Be}return ce}catch(_e){throw _e.caller="git.getRemoteInfo",_e}}l(eg,"KI"),e(eg,"getRemoteInfo");function tg(B,b,k,F){let L=[];for(let[$,K]of B.refs){if(b&&!$.startsWith(b))continue;if($.endsWith("^{}")){if(F){let _e=$.replace("^{}",""),ce=L[L.length-1],he=ce.ref===_e?ce:L.find(Be=>Be.ref===_e);if(he===void 0)throw new Error("I did not expect this to happen");he.peeled=K}continue}let ne={ref:$,oid:K};k&&B.symrefs.has($)&&(ne.target=B.symrefs.get($)),L.push(ne)}return L}l(tg,"XI"),e(tg,"formatInfoRefs");async function rg({http:B,onAuth:b,onAuthSuccess:k,onAuthFailure:F,corsProxy:L,url:$,headers:K={},forPush:ne=!1,protocolVersion:_e=2}){try{Ue("http",B),Ue("url",$);let ce=await zf.getRemoteHelperFor({url:$}).discover({http:B,onAuth:b,onAuthSuccess:k,onAuthFailure:F,corsProxy:L,service:ne?"git-receive-pack":"git-upload-pack",url:$,headers:K,protocolVersion:_e});if(ce.protocolVersion===2)return{protocolVersion:ce.protocolVersion,capabilities:ce.capabilities2};let he={};for(let Be of ce.capabilities){let[je,Me]=Be.split("=");Me?he[je]=Me:he[je]=!0}return{protocolVersion:1,capabilities:he,refs:tg(ce,void 0,!0,!0)}}catch(ce){throw ce.caller="git.getRemoteInfo2",ce}}l(rg,"JI"),e(rg,"getRemoteInfo2");async function dA({type:B,object:b,format:k="content",oid:F=void 0}){return k!=="deflated"&&(k!=="wrapped"&&(b=ja.wrap({type:B,object:b})),F=await de(b)),{oid:F,object:b}}l(dA,"RK"),e(dA,"hashObject");async function ng({object:B}){try{Ue("object",B),typeof B=="string"?B=Buffer.from(B,"utf8"):B instanceof Uint8Array||(B=new Uint8Array(B));let b="blob",{oid:k,object:F}=await dA({type:b,format:"content",object:B});return{oid:k,type:b,object:F,format:"wrapped"}}catch(b){throw b.caller="git.hashBlob",b}}l(ng,"ZI"),e(ng,"hashBlob");async function pA({fs:B,cache:b,onProgress:k,dir:F,gitdir:L,filepath:$}){try{$=o.join(F,$);let K=await B.read($),ne=e(ce=>Mt({fs:B,cache:b,gitdir:L,oid:ce}),"getExternalRefDelta"),_e=await Kd.fromPack({pack:K,getExternalRefDelta:ne,onProgress:k});return await B.write($.replace(/\.pack$/,".idx"),await _e.toBuffer()),{oids:[..._e.hashes]}}catch(K){throw K.caller="git.indexPack",K}}l(pA,"TK"),e(pA,"_indexPack");async function ig({fs:B,onProgress:b,dir:k,gitdir:F=o.join(k,".git"),filepath:L,cache:$={}}){try{return Ue("fs",B),Ue("dir",k),Ue("gitdir",k),Ue("filepath",L),await pA({fs:new mt(B),cache:$,onProgress:b,dir:k,gitdir:F,filepath:L})}catch(K){throw K.caller="git.indexPack",K}}l(ig,"QI"),e(ig,"indexPack");async function og({fs:B,bare:b=!1,dir:k,gitdir:F=b?k:o.join(k,".git"),defaultBranch:L="master"}){try{return Ue("fs",B),Ue("gitdir",F),b||Ue("dir",k),await jp({fs:new mt(B),bare:b,dir:k,gitdir:F,defaultBranch:L})}catch($){throw $.caller="git.init",$}}l(og,"ek"),e(og,"init");async function ag({fs:B,cache:b,gitdir:k,oid:F,ancestor:L,depth:$}){let K=await al.read({fs:B,gitdir:k});if(!F)throw new Qr("oid");if(!L)throw new Qr("ancestor");if(F===L)return!1;let ne=[F],_e=new Set,ce=0;for(;ne.length;){if(ce++===$)throw new tp($);let he=ne.shift(),{type:Be,object:je}=await Mt({fs:B,cache:b,gitdir:k,oid:he});if(Be!=="commit")throw new Ie(he,Be,"commit");let Me=Xr.from(je).parse();for(let ze of Me.parent)if(ze===L)return!0;if(!K.has(he))for(let ze of Me.parent)_e.has(ze)||(ne.push(ze),_e.add(ze))}return!1}l(ag,"tk"),e(ag,"_isDescendent");async function sg({fs:B,dir:b,gitdir:k=o.join(b,".git"),oid:F,ancestor:L,depth:$=-1,cache:K={}}){try{return Ue("fs",B),Ue("gitdir",k),Ue("oid",F),Ue("ancestor",L),await ag({fs:new mt(B),cache:K,gitdir:k,oid:F,ancestor:L,depth:$})}catch(ne){throw ne.caller="git.isDescendent",ne}}l(sg,"rk"),e(sg,"isDescendent");async function lg({fs:B,dir:b,gitdir:k=o.join(b,".git"),filepath:F}){try{return Ue("fs",B),Ue("dir",b),Ue("gitdir",k),Ue("filepath",F),Na.isIgnored({fs:new mt(B),dir:b,gitdir:k,filepath:F})}catch(L){throw L.caller="git.isIgnored",L}}l(lg,"nk"),e(lg,"isIgnored");async function fg({fs:B,dir:b,gitdir:k=o.join(b,".git"),remote:F}){try{return Ue("fs",B),Ue("gitdir",k),et.listBranches({fs:new mt(B),gitdir:k,remote:F})}catch(L){throw L.caller="git.listBranches",L}}l(fg,"ik"),e(fg,"listBranches");async function gA({fs:B,gitdir:b,ref:k,cache:F}){if(k){let L=await et.resolve({gitdir:b,fs:B,ref:k}),$=[];return await ug({fs:B,cache:F,gitdir:b,oid:L,filenames:$,prefix:""}),$}else return Q.acquire({fs:B,gitdir:b,cache:F},async function(L){return L.entries.map($=>$.path)})}l(gA,"FK"),e(gA,"_listFiles");async function ug({fs:B,cache:b,gitdir:k,oid:F,filenames:L,prefix:$}){let{tree:K}=await eo({fs:B,cache:b,gitdir:k,oid:F});for(let ne of K)ne.type==="tree"?await ug({fs:B,cache:b,gitdir:k,oid:ne.oid,filenames:L,prefix:o.join($,ne.path)}):L.push(o.join($,ne.path))}l(ug,"ok"),e(ug,"accumulateFilesFromOid");async function cg({fs:B,dir:b,gitdir:k=o.join(b,".git"),ref:F,cache:L={}}){try{return Ue("fs",B),Ue("gitdir",k),await gA({fs:new mt(B),cache:L,gitdir:k,ref:F})}catch($){throw $.caller="git.listFiles",$}}l(cg,"ak"),e(cg,"listFiles");async function yA({fs:B,cache:b,gitdir:k,ref:F}){let L;try{L=await et.resolve({gitdir:k,fs:B,ref:F})}catch($){if($ instanceof ge)return[]}return(await eo({fs:B,cache:b,gitdir:k,oid:L})).tree.map($=>({target:$.path,note:$.oid}))}l(yA,"xK"),e(yA,"_listNotes");async function hg({fs:B,dir:b,gitdir:k=o.join(b,".git"),ref:F="refs/notes/commits",cache:L={}}){try{return Ue("fs",B),Ue("gitdir",k),Ue("ref",F),await yA({fs:new mt(B),cache:L,gitdir:k,ref:F})}catch($){throw $.caller="git.listNotes",$}}l(hg,"sk"),e(hg,"listNotes");async function dg({fs:B,dir:b,gitdir:k=o.join(b,".git"),filepath:F}){try{return Ue("fs",B),Ue("gitdir",k),et.listRefs({fs:new mt(B),gitdir:k,filepath:F})}catch(L){throw L.caller="git.listRefs",L}}l(dg,"lk"),e(dg,"listRefs");async function mA({fs:B,gitdir:b}){let k=await ht.get({fs:B,gitdir:b}),F=await k.getSubsections("remote");return Promise.all(F.map(async L=>{let $=await k.get(`remote.${L}.url`);return{remote:L,url:$}}))}l(mA,"OK"),e(mA,"_listRemotes");async function pg({fs:B,dir:b,gitdir:k=o.join(b,".git")}){try{return Ue("fs",B),Ue("gitdir",k),await mA({fs:new mt(B),gitdir:k})}catch(F){throw F.caller="git.listRemotes",F}}l(pg,"fk"),e(pg,"listRemotes");async function wA(B){let b=ir.streamReader(B),k=[],F;for(;F=await b(),F!==!0;){if(F===null)continue;F=F.toString("utf8").replace(/\n$/,"");let[L,$,...K]=F.split(" "),ne={ref:$,oid:L};for(let _e of K){let[ce,he]=_e.split(":");ce==="symref-target"?ne.target=he:ce==="peeled"&&(ne.peeled=he)}k.push(ne)}return k}l(wA,"PK"),e(wA,"parseListRefsResponse");async function bA({prefix:B,symrefs:b,peelTags:k}){let F=[];return F.push(ir.encode(`command=ls-refs
|
|
103
|
-
`)),F.push(ir.encode(`agent=${Hf.agent}
|
|
104
|
-
`)),(k||b||B)&&F.push(ir.delim()),k&&F.push(ir.encode("peel")),b&&F.push(ir.encode("symrefs")),B&&F.push(ir.encode(`ref-prefix ${B}`)),F.push(ir.flush()),F}l(bA,"IK"),e(bA,"writeListRefsRequest");async function gg({http:B,onAuth:b,onAuthSuccess:k,onAuthFailure:F,corsProxy:L,url:$,headers:K={},forPush:ne=!1,protocolVersion:_e=2,prefix:ce,symrefs:he,peelTags:Be}){try{Ue("http",B),Ue("url",$);let je=await Wf.discover({http:B,onAuth:b,onAuthSuccess:k,onAuthFailure:F,corsProxy:L,service:ne?"git-receive-pack":"git-upload-pack",url:$,headers:K,protocolVersion:_e});if(je.protocolVersion===1)return tg(je,ce,he,Be);let Me=await bA({prefix:ce,symrefs:he,peelTags:Be}),ze=await Wf.connect({http:B,auth:je.auth,headers:K,corsProxy:L,service:ne?"git-receive-pack":"git-upload-pack",url:$,body:Me});return wA(ze.body)}catch(je){throw je.caller="git.listServerRefs",je}}l(gg,"uk"),e(gg,"listServerRefs");async function yg({fs:B,dir:b,gitdir:k=o.join(b,".git")}){try{return Ue("fs",B),Ue("gitdir",k),et.listTags({fs:new mt(B),gitdir:k})}catch(F){throw F.caller="git.listTags",F}}l(yg,"ck"),e(yg,"listTags");function vA(B,b){return B.committer.timestamp-b.committer.timestamp}l(vA,"kK"),e(vA,"compareAge");var F4="e69de29bb2d1d6434b8b29ae775ad8c2e48c5391";async function mg({fs:B,cache:b,gitdir:k,oid:F,fileId:L}){if(L===F4)return;let $=F,K,ne=await Yi({fs:B,cache:b,gitdir:k,oid:F}),_e=ne.tree;return L===ne.oid?K=ne.path:(K=await wg({fs:B,cache:b,gitdir:k,tree:_e,fileId:L,oid:$}),Array.isArray(K)&&(K.length===0?K=void 0:K.length===1&&(K=K[0]))),K}l(mg,"eI"),e(mg,"resolveFileIdInTree");async function wg({fs:B,cache:b,gitdir:k,tree:F,fileId:L,oid:$,filepaths:K=[],parentPath:ne=""}){let _e=F.entries().map(function(ce){let he;return ce.oid===L?(he=o.join(ne,ce.path),K.push(he)):ce.type==="tree"&&(he=Mt({fs:B,cache:b,gitdir:k,oid:ce.oid}).then(function({object:Be}){return wg({fs:B,cache:b,gitdir:k,tree:Yr.from(Be),fileId:L,oid:$,filepaths:K,parentPath:o.join(ne,ce.path)})})),he});return await Promise.all(_e),K}l(wg,"hk"),e(wg,"_resolveFileId");async function _A({fs:B,cache:b,gitdir:k,filepath:F,ref:L,depth:$,since:K,force:ne,follow:_e}){let ce=typeof K>"u"?void 0:Math.floor(K.valueOf()/1e3),he=[],Be=await al.read({fs:B,gitdir:k}),je=await et.resolve({fs:B,gitdir:k,ref:L}),Me=[await Xi({fs:B,cache:b,gitdir:k,oid:je})],ze,Ye,rt;function ot(it){rt&&F&&he.push(it)}for(l(ot,"E"),e(ot,"endCommit");Me.length>0;){let it=Me.pop();if(ce!==void 0&&it.commit.committer.timestamp<=ce)break;if(F){let ft;try{ft=await Ua({fs:B,cache:b,gitdir:k,oid:it.commit.tree,filepath:F}),Ye&&ze!==ft&&he.push(Ye),ze=ft,Ye=it,rt=!0}catch(gt){if(gt instanceof ge){let yt=_e&&ze;if(yt&&(yt=await mg({fs:B,cache:b,gitdir:k,oid:it.commit.tree,fileId:ze}),yt))if(Array.isArray(yt)){if(Ye){let pt=await mg({fs:B,cache:b,gitdir:k,oid:Ye.commit.tree,fileId:ze});if(Array.isArray(pt))if(yt=yt.filter(st=>pt.indexOf(st)===-1),yt.length===1)yt=yt[0],F=yt,Ye&&he.push(Ye);else{yt=!1,Ye&&he.push(Ye);break}}}else F=yt,Ye&&he.push(Ye);if(!yt){if(rt&&ze&&(he.push(Ye),!ne))break;if(!ne&&!_e)throw gt}Ye=it,rt=!1}else throw gt}}else he.push(it);if($!==void 0&&he.length===$){ot(it);break}if(!Be.has(it.oid))for(let ft of it.commit.parent){let gt=await Xi({fs:B,cache:b,gitdir:k,oid:ft});Me.map(yt=>yt.oid).includes(gt.oid)||Me.push(gt)}Me.length===0&&ot(it),Me.sort((ft,gt)=>vA(ft.commit,gt.commit))}return he}l(_A,"CK"),e(_A,"_log");async function bg({fs:B,dir:b,gitdir:k=o.join(b,".git"),filepath:F,ref:L="HEAD",depth:$,since:K,force:ne,follow:_e,cache:ce={}}){try{return Ue("fs",B),Ue("gitdir",k),Ue("ref",L),await _A({fs:new mt(B),cache:ce,gitdir:k,filepath:F,ref:L,depth:$,since:K,force:ne,follow:_e})}catch(he){throw he.caller="git.log",he}}l(bg,"dk"),e(bg,"log");async function vg({fs:B,onSign:b,dir:k,gitdir:F=o.join(k,".git"),ours:L,theirs:$,fastForward:K=!0,fastForwardOnly:ne=!1,dryRun:_e=!1,noUpdateBranch:ce=!1,abortOnConflict:he=!0,message:Be,author:je,committer:Me,signingKey:ze,cache:Ye={},mergeDriver:rt,allowUnrelatedHistories:ot=!1}){try{Ue("fs",B),ze&&Ue("onSign",b);let it=new mt(B),ft=await Hn({fs:it,gitdir:F,author:je});if(!ft&&(!ne||!K))throw new Cr("author");let gt=await Qi({fs:it,gitdir:F,author:ft,committer:Me});if(!gt&&(!ne||!K))throw new Cr("committer");return await qp({fs:it,cache:Ye,dir:k,gitdir:F,ours:L,theirs:$,fastForward:K,fastForwardOnly:ne,dryRun:_e,noUpdateBranch:ce,abortOnConflict:he,message:Be,author:ft,committer:gt,signingKey:ze,onSign:b,mergeDriver:rt,allowUnrelatedHistories:ot})}catch(it){throw it.caller="git.merge",it}}l(vg,"pk"),e(vg,"merge");var B4={commit:16,tree:32,blob:48,tag:64,ofs_delta:96,ref_delta:112};async function _g({fs:B,cache:b,dir:k,gitdir:F=o.join(k,".git"),oids:L}){let $=new g,K=[];function ne(he,Be){let je=Buffer.from(he,Be);K.push(je),$.update(je)}l(ne,"f"),e(ne,"write");async function _e({stype:he,object:Be}){let je=B4[he],Me=Be.length,ze=Me>15?128:0,Ye=Me&15;Me=Me>>>4;let rt=(ze|je|Ye).toString(16);for(ne(rt,"hex");ze;)ze=Me>127?128:0,rt=ze|Me&127,ne(Mf(2,rt),"hex"),Me=Me>>>7;ne(Buffer.from(await dp(Be)))}l(_e,"h"),e(_e,"writeObject"),ne("PACK"),ne("00000002","hex"),ne(Mf(8,L.length),"hex");for(let he of L){let{type:Be,object:je}=await Mt({fs:B,cache:b,gitdir:F,oid:he});await _e({write:ne,object:je,stype:Be})}let ce=$.digest();return K.push(ce),K}l(_g,"yk"),e(_g,"_pack");async function EA({fs:B,cache:b,gitdir:k,oids:F,write:L}){let $=await _g({fs:B,cache:b,gitdir:k,oids:F}),K=Buffer.from(await ol($)),ne=`pack-${K.slice(-20).toString("hex")}.pack`;return L?(await B.write(o.join(k,`objects/pack/${ne}`),K),{filename:ne}):{filename:ne,packfile:new Uint8Array(K)}}l(EA,"NK"),e(EA,"_packObjects");async function Eg({fs:B,dir:b,gitdir:k=o.join(b,".git"),oids:F,write:L=!1,cache:$={}}){try{return Ue("fs",B),Ue("gitdir",k),Ue("oids",F),await EA({fs:new mt(B),cache:$,gitdir:k,oids:F,write:L})}catch(K){throw K.caller="git.packObjects",K}}l(Eg,"mk"),e(Eg,"packObjects");async function Sg({fs:B,http:b,onProgress:k,onMessage:F,onAuth:L,onAuthSuccess:$,onAuthFailure:K,dir:ne,gitdir:_e=o.join(ne,".git"),ref:ce,url:he,remote:Be,remoteRef:je,prune:Me=!1,pruneTags:ze=!1,fastForward:Ye=!0,fastForwardOnly:rt=!1,corsProxy:ot,singleBranch:it,headers:ft={},author:gt,committer:yt,signingKey:pt,cache:st={}}){try{Ue("fs",B),Ue("gitdir",_e);let ut=new mt(B),ct=await Hn({fs:ut,gitdir:_e,author:gt});if(!ct)throw new Cr("author");let _t=await Qi({fs:ut,gitdir:_e,author:ct,committer:yt});if(!_t)throw new Cr("committer");return await Gp({fs:ut,cache:st,http:b,onProgress:k,onMessage:F,onAuth:L,onAuthSuccess:$,onAuthFailure:K,dir:ne,gitdir:_e,ref:ce,url:he,remote:Be,remoteRef:je,fastForward:Ye,fastForwardOnly:rt,corsProxy:ot,singleBranch:it,headers:ft,author:ct,committer:_t,signingKey:pt,prune:Me,pruneTags:ze})}catch(ut){throw ut.caller="git.pull",ut}}l(Sg,"gk"),e(Sg,"pull");async function SA({fs:B,cache:b,dir:k,gitdir:F=o.join(k,".git"),start:L,finish:$}){let K=await al.read({fs:B,gitdir:F}),ne=new Set,_e=new Set;for(let Be of L)ne.add(await et.resolve({fs:B,gitdir:F,ref:Be}));for(let Be of $)try{let je=await et.resolve({fs:B,gitdir:F,ref:Be});_e.add(je)}catch{}let ce=new Set;async function he(Be){ce.add(Be);let{type:je,object:Me}=await Mt({fs:B,cache:b,gitdir:F,oid:Be});if(je==="tag"){let ze=on.from(Me).headers().object;return he(ze)}if(je!=="commit")throw new Ie(Be,je,"commit");if(!K.has(Be)){let ze=Xr.from(Me).headers().parent;for(Be of ze)!_e.has(Be)&&!ce.has(Be)&&await he(Be)}}l(he,"d"),e(he,"walk");for(let Be of ne)await he(Be);return ce}l(SA,"DK"),e(SA,"listCommitsAndTags");async function Kf({fs:B,cache:b,dir:k,gitdir:F=o.join(k,".git"),oids:L}){let $=new Set;async function K(ne){if($.has(ne))return;$.add(ne);let{type:_e,object:ce}=await Mt({fs:B,cache:b,gitdir:F,oid:ne});if(_e==="tag"){let he=on.from(ce).headers().object;await K(he)}else if(_e==="commit"){let he=Xr.from(ce).headers().tree;await K(he)}else if(_e==="tree"){let he=Yr.from(ce);for(let Be of he)Be.type==="blob"&&$.add(Be.oid),Be.type==="tree"&&await K(Be.oid)}}l(K,"i"),e(K,"walk");for(let ne of L)await K(ne);return $}l(Kf,"Q0"),e(Kf,"listObjects");async function AA(B){let b={},k="",F=ir.streamReader(B),L=await F();for(;L!==!0;)L!==null&&(k+=L.toString("utf8")+`
|
|
105
|
-
`),L=await F();let $=k.toString("utf8").split(`
|
|
106
|
-
`);if(L=$.shift(),!L.startsWith("unpack "))throw new tl('unpack ok" or "unpack [error message]',L);b.ok=L==="unpack ok",b.ok||(b.error=L.slice(7)),b.refs={};for(let K of $){if(K.trim()==="")continue;let ne=K.slice(0,2),_e=K.slice(3),ce=_e.indexOf(" ");ce===-1&&(ce=_e.length);let he=_e.slice(0,ce),Be=_e.slice(ce+1);b.refs[he]={ok:ne==="ok",error:Be}}return b}l(AA,"$K"),e(AA,"parseReceivePackResponse");async function RA({capabilities:B=[],triplets:b=[]}){let k=[],F=`\0 ${B.join(" ")}`;for(let L of b)k.push(ir.encode(`${L.oldoid} ${L.oid} ${L.fullRef}${F}
|
|
107
|
-
`)),F="";return k.push(ir.flush()),k}l(RA,"MK"),e(RA,"writeReceivePackRequest");async function OA({fs:B,cache:b,http:k,onProgress:F,onMessage:L,onAuth:$,onAuthSuccess:K,onAuthFailure:ne,onPrePush:_e,gitdir:ce,ref:he,remoteRef:Be,remote:je,url:Me,force:ze=!1,delete:Ye=!1,corsProxy:rt,headers:ot={}}){let it=he||await qn({fs:B,gitdir:ce});if(typeof it>"u")throw new Qr("ref");let ft=await ht.get({fs:B,gitdir:ce});je=je||await ft.get(`branch.${it}.pushRemote`)||await ft.get("remote.pushDefault")||await ft.get(`branch.${it}.remote`)||"origin";let gt=Me||await ft.get(`remote.${je}.pushurl`)||await ft.get(`remote.${je}.url`);if(typeof gt>"u")throw new Qr("remote OR url");let yt=Be||await ft.get(`branch.${it}.merge`);if(typeof gt>"u")throw new Qr("remoteRef");rt===void 0&&(rt=await ft.get("http.corsProxy"));let pt=await et.expand({fs:B,gitdir:ce,ref:it}),st=Ye?"0000000000000000000000000000000000000000":await et.resolve({fs:B,gitdir:ce,ref:pt}),ut=zf.getRemoteHelperFor({url:gt}),ct=await ut.discover({http:k,onAuth:$,onAuthSuccess:K,onAuthFailure:ne,corsProxy:rt,service:"git-receive-pack",url:gt,headers:ot,protocolVersion:1}),_t=ct.auth,jt;if(!yt)jt=pt;else try{jt=await et.expandAgainstMap({ref:yt,map:ct.refs})}catch(er){if(er instanceof ge)jt=yt.startsWith("refs/")?yt:`refs/heads/${yt}`;else throw er}let or=ct.refs.get(jt)||"0000000000000000000000000000000000000000";if(_e&&!await _e({remote:je,url:gt,localRef:{ref:Ye?"(delete)":pt,oid:st},remoteRef:{ref:jt,oid:or}}))throw new Pf;let Bt=!ct.capabilities.has("no-thin"),ar=new Set;if(!Ye){let er=[...ct.refs.values()],mn=new Set;if(or!=="0000000000000000000000000000000000000000"){let Or=await Vf({fs:B,cache:b,gitdir:ce,oids:[st,or]});for(let ll of Or)er.push(ll);Bt&&(mn=await Kf({fs:B,cache:b,gitdir:ce,oids:Or}))}if(!er.includes(st)){let Or=await SA({fs:B,cache:b,gitdir:ce,start:[st],finish:er});ar=await Kf({fs:B,cache:b,gitdir:ce,oids:Or})}if(Bt){try{let Or=await et.resolve({fs:B,gitdir:ce,ref:`refs/remotes/${je}/HEAD`,depth:2}),{oid:ll}=await et.resolveAgainstMap({ref:Or.replace(`refs/remotes/${je}/`,""),fullref:Or,map:ct.refs}),qo=[ll];for(let sr of await Kf({fs:B,cache:b,gitdir:ce,oids:qo}))mn.add(sr)}catch{}for(let Or of mn)ar.delete(Or)}if(st===or&&(ze=!0),!ze){if(pt.startsWith("refs/tags")&&or!=="0000000000000000000000000000000000000000")throw new If("tag-exists");if(st!=="0000000000000000000000000000000000000000"&&or!=="0000000000000000000000000000000000000000"&&!await ag({fs:B,cache:b,gitdir:ce,oid:st,ancestor:or,depth:-1}))throw new If("not-fast-forward")}}let gr=Ip([...ct.capabilities],["report-status","side-band-64k",`agent=${Hf.agent}`]),zo=await RA({capabilities:gr,triplets:[{oldoid:or,oid:st,fullRef:jt}]}),Ho=Ye?[]:await _g({fs:B,cache:b,gitdir:ce,oids:[...ar]}),os=await ut.connect({http:k,onProgress:F,corsProxy:rt,service:"git-receive-pack",url:gt,auth:_t,headers:ot,body:[...zo,...Ho]}),{packfile:oy,progress:ay}=await XS.demux(os.body);if(L){let er=Pp(ay);$a(er,async mn=>{await L(mn)})}let Hr=await AA(oy);if(os.headers&&(Hr.headers=os.headers),je&&Hr.ok&&Hr.refs[jt].ok&&!pt.startsWith("refs/tags")){let er=`refs/remotes/${je}/${jt.replace("refs/heads","")}`;Ye?await et.deleteRef({fs:B,gitdir:ce,ref:er}):await et.writeRef({fs:B,gitdir:ce,ref:er,value:st})}if(Hr.ok&&Object.values(Hr.refs).every(er=>er.ok))return Hr;{let er=Object.entries(Hr.refs).filter(([mn,Or])=>!Or.ok).map(([mn,Or])=>`
|
|
108
|
-
- ${mn}: ${Or.error}`).join("");throw new ep(er,Hr)}}l(OA,"UK"),e(OA,"_push");async function Ag({fs:B,http:b,onProgress:k,onMessage:F,onAuth:L,onAuthSuccess:$,onAuthFailure:K,onPrePush:ne,dir:_e,gitdir:ce=o.join(_e,".git"),ref:he,remoteRef:Be,remote:je="origin",url:Me,force:ze=!1,delete:Ye=!1,corsProxy:rt,headers:ot={},cache:it={}}){try{return Ue("fs",B),Ue("http",b),Ue("gitdir",ce),await OA({fs:new mt(B),cache:it,http:b,onProgress:k,onMessage:F,onAuth:L,onAuthSuccess:$,onAuthFailure:K,onPrePush:ne,gitdir:ce,ref:he,remoteRef:Be,remote:je,url:Me,force:ze,delete:Ye,corsProxy:rt,headers:ot})}catch(ft){throw ft.caller="git.push",ft}}l(Ag,"wk"),e(Ag,"push");async function Rg({fs:B,cache:b,gitdir:k,oid:F}){let{type:L,object:$}=await Mt({fs:B,cache:b,gitdir:k,oid:F});if(L==="tag")return F=on.from($).parse().object,Rg({fs:B,cache:b,gitdir:k,oid:F});if(L!=="blob")throw new Ie(F,L,"blob");return{oid:F,blob:new Uint8Array($)}}l(Rg,"vk"),e(Rg,"resolveBlob");async function Og({fs:B,cache:b,gitdir:k,oid:F,filepath:L=void 0}){return L!==void 0&&(F=await Ua({fs:B,cache:b,gitdir:k,oid:F,filepath:L})),await Rg({fs:B,cache:b,gitdir:k,oid:F})}l(Og,"bk"),e(Og,"_readBlob");async function kg({fs:B,dir:b,gitdir:k=o.join(b,".git"),oid:F,filepath:L,cache:$={}}){try{return Ue("fs",B),Ue("gitdir",k),Ue("oid",F),await Og({fs:new mt(B),cache:$,gitdir:k,oid:F,filepath:L})}catch(K){throw K.caller="git.readBlob",K}}l(kg,"_k"),e(kg,"readBlob");async function Jf({fs:B,dir:b,gitdir:k=o.join(b,".git"),oid:F,cache:L={}}){try{return Ue("fs",B),Ue("gitdir",k),Ue("oid",F),await Xi({fs:new mt(B),cache:L,gitdir:k,oid:F})}catch($){throw $.caller="git.readCommit",$}}l(Jf,"vv"),e(Jf,"readCommit");async function kA({fs:B,cache:b,gitdir:k,ref:F="refs/notes/commits",oid:L}){let $=await et.resolve({gitdir:k,fs:B,ref:F}),{blob:K}=await Og({fs:B,cache:b,gitdir:k,oid:$,filepath:L});return K}l(kA,"jK"),e(kA,"_readNote");async function Tg({fs:B,dir:b,gitdir:k=o.join(b,".git"),ref:F="refs/notes/commits",oid:L,cache:$={}}){try{return Ue("fs",B),Ue("gitdir",k),Ue("ref",F),Ue("oid",L),await kA({fs:new mt(B),cache:$,gitdir:k,ref:F,oid:L})}catch(K){throw K.caller="git.readNote",K}}l(Tg,"Ek"),e(Tg,"readNote");async function Fg({fs:B,dir:b,gitdir:k=o.join(b,".git"),oid:F,format:L="parsed",filepath:$=void 0,encoding:K=void 0,cache:ne={}}){try{Ue("fs",B),Ue("gitdir",k),Ue("oid",F);let _e=new mt(B);$!==void 0&&(F=await Ua({fs:_e,cache:ne,gitdir:k,oid:F,filepath:$}));let ce=await Mt({fs:_e,cache:ne,gitdir:k,oid:F,format:L==="parsed"?"content":L});if(ce.oid=F,L==="parsed")switch(ce.format="parsed",ce.type){case"commit":ce.object=Xr.from(ce.object).parse();break;case"tree":ce.object=Yr.from(ce.object).entries();break;case"blob":K?ce.object=ce.object.toString(K):(ce.object=new Uint8Array(ce.object),ce.format="content");break;case"tag":ce.object=on.from(ce.object).parse();break;default:throw new Ie(ce.oid,ce.type,"blob|commit|tag|tree")}else(ce.format==="deflated"||ce.format==="wrapped")&&(ce.type=ce.format);return ce}catch(_e){throw _e.caller="git.readObject",_e}}l(Fg,"Sk"),e(Fg,"readObject");async function TA({fs:B,cache:b,gitdir:k,oid:F}){let{type:L,object:$}=await Mt({fs:B,cache:b,gitdir:k,oid:F,format:"content"});if(L!=="tag")throw new Ie(F,L,"tag");let K=on.from($);return{oid:F,tag:K.parse(),payload:K.payload()}}l(TA,"HK"),e(TA,"_readTag");async function Bg({fs:B,dir:b,gitdir:k=o.join(b,".git"),oid:F,cache:L={}}){try{return Ue("fs",B),Ue("gitdir",k),Ue("oid",F),await TA({fs:new mt(B),cache:L,gitdir:k,oid:F})}catch($){throw $.caller="git.readTag",$}}l(Bg,"Ak"),e(Bg,"readTag");async function xg({fs:B,dir:b,gitdir:k=o.join(b,".git"),oid:F,filepath:L=void 0,cache:$={}}){try{return Ue("fs",B),Ue("gitdir",k),Ue("oid",F),await eo({fs:new mt(B),cache:$,gitdir:k,oid:F,filepath:L})}catch(K){throw K.caller="git.readTree",K}}l(xg,"Rk"),e(xg,"readTree");async function Ig({fs:B,dir:b,gitdir:k=o.join(b,".git"),filepath:F,cache:L={}}){try{Ue("fs",B),Ue("gitdir",k),Ue("filepath",F),await Q.acquire({fs:new mt(B),gitdir:k,cache:L},async function($){$.delete({filepath:F})})}catch($){throw $.caller="git.remove",$}}l(Ig,"Tk"),e(Ig,"remove");async function FA({fs:B,cache:b,onSign:k,gitdir:F,ref:L="refs/notes/commits",oid:$,author:K,committer:ne,signingKey:_e}){let ce;try{ce=await et.resolve({gitdir:F,fs:B,ref:L})}catch(je){if(!(je instanceof ge))throw je}let he=(await eo({fs:B,gitdir:F,oid:ce||"4b825dc642cb6eb9a060e54bf8d69288fbee4904"})).tree;he=he.filter(je=>je.path!==$);let Be=await Ma({fs:B,gitdir:F,tree:he});return await il({fs:B,cache:b,onSign:k,gitdir:F,ref:L,tree:Be,parent:ce&&[ce],message:`Note removed by 'isomorphic-git removeNote'
|
|
109
|
-
`,author:K,committer:ne,signingKey:_e})}l(FA,"WK"),e(FA,"_removeNote");async function Pg({fs:B,onSign:b,dir:k,gitdir:F=o.join(k,".git"),ref:L="refs/notes/commits",oid:$,author:K,committer:ne,signingKey:_e,cache:ce={}}){try{Ue("fs",B),Ue("gitdir",F),Ue("oid",$);let he=new mt(B),Be=await Hn({fs:he,gitdir:F,author:K});if(!Be)throw new Cr("author");let je=await Qi({fs:he,gitdir:F,author:Be,committer:ne});if(!je)throw new Cr("committer");return await FA({fs:he,cache:ce,onSign:b,gitdir:F,ref:L,oid:$,author:Be,committer:je,signingKey:_e})}catch(he){throw he.caller="git.removeNote",he}}l(Pg,"Fk"),e(Pg,"removeNote");async function BA({fs:B,gitdir:b,oldref:k,ref:F,checkout:L=!1}){if(!d(F,!0))throw new Wn(F,h.clean(F));if(!d(k,!0))throw new Wn(k,h.clean(k));let $=`refs/heads/${k}`,K=`refs/heads/${F}`;if(await et.exists({fs:B,gitdir:b,ref:K}))throw new $n("branch",F,!1);let ne=await et.resolve({fs:B,gitdir:b,ref:$,depth:1});await et.writeRef({fs:B,gitdir:b,ref:K,value:ne}),await et.deleteRef({fs:B,gitdir:b,ref:$});let _e=await qn({fs:B,gitdir:b,fullname:!0})===$;(L||_e)&&await et.writeSymbolicRef({fs:B,gitdir:b,ref:"HEAD",value:K})}l(BA,"qK"),e(BA,"_renameBranch");async function jg({fs:B,dir:b,gitdir:k=o.join(b,".git"),ref:F,oldref:L,checkout:$=!1}){try{return Ue("fs",B),Ue("gitdir",k),Ue("ref",F),Ue("oldref",L),await BA({fs:new mt(B),gitdir:k,ref:F,oldref:L,checkout:$})}catch(K){throw K.caller="git.renameBranch",K}}l(jg,"xk"),e(jg,"renameBranch");async function Cg({gitdir:B,type:b,object:k}){return de(ja.wrap({type:b,object:k}))}l(Cg,"Ok"),e(Cg,"hashObject$1");async function Lg({fs:B,dir:b,gitdir:k=o.join(b,".git"),filepath:F,ref:L,cache:$={}}){try{Ue("fs",B),Ue("gitdir",k),Ue("filepath",F);let K=new mt(B),ne,_e;try{ne=await et.resolve({fs:K,gitdir:k,ref:L||"HEAD"})}catch(Be){if(L)throw Be}if(ne)try{ne=await Ua({fs:K,cache:$,gitdir:k,oid:ne,filepath:F})}catch{ne=null}let ce={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:0,uid:0,gid:0,size:0},he=b&&await K.read(o.join(b,F));he&&(_e=await Cg({gitdir:k,type:"blob",object:he}),ne===_e&&(ce=await K.lstat(o.join(b,F)))),await Q.acquire({fs:K,gitdir:k,cache:$},async function(Be){Be.delete({filepath:F}),ne&&Be.insert({filepath:F,stats:ce,oid:ne})})}catch(K){throw K.caller="git.reset",K}}l(Lg,"Pk"),e(Lg,"resetIndex");async function Ng({fs:B,dir:b,gitdir:k=o.join(b,".git"),ref:F,depth:L}){try{return Ue("fs",B),Ue("gitdir",k),Ue("ref",F),await et.resolve({fs:new mt(B),gitdir:k,ref:F,depth:L})}catch($){throw $.caller="git.resolveRef",$}}l(Ng,"Ik"),e(Ng,"resolveRef");async function Dg({fs:B,dir:b,gitdir:k=o.join(b,".git"),path:F,value:L,append:$=!1}){try{Ue("fs",B),Ue("gitdir",k),Ue("path",F);let K=new mt(B),ne=await ht.get({fs:K,gitdir:k});$?await ne.append(F,L):await ne.set(F,L),await ht.save({fs:K,gitdir:k,config:ne})}catch(K){throw K.caller="git.setConfig",K}}l(Dg,"kk"),e(Dg,"setConfig");async function Ug({fs:B,gitdir:b,commit:k}){let F=Xr.from(k).toObject();return await Rr({fs:B,gitdir:b,type:"commit",object:F,format:"content"})}l(Ug,"Bk"),e(Ug,"_writeCommit");var xA=(Wo=class{static get timezoneOffsetForRefLogEntry(){let b=new Date().getTimezoneOffset(),k=Math.abs(Math.floor(b/60)),F=Math.abs(b%60).toString().padStart(2,"0");return`${b>0?"-":"+"}${k.toString().padStart(2,"0")}${F}`}static createStashReflogEntry(b,k,F){let L=b.name.replace(/\s/g,""),$="0000000000000000000000000000000000000000",K=Math.floor(Date.now()/1e3),ne=Wo.timezoneOffsetForRefLogEntry;return`${$} ${k} ${L} ${b.email} ${K} ${ne} ${F}
|
|
110
|
-
`}static getStashReflogEntry(b,k=!1){return b.split(`
|
|
111
|
-
`).filter(F=>F).reverse().map((F,L)=>k?`stash@{${L}}: ${F.split(" ")[1]}`:F)}},l(Wo,"Td"),Wo);e(xA,"GitRefStash");var IA=xA,x4={stage:Oe,workdir:Zi},Mg;async function ro(B,b){return Mg===void 0&&(Mg=new f),Mg.acquire(B,b)}l(ro,"zs"),e(ro,"acquireLock$1");async function PA(B,b,k,F,L=null){let $=o.join(k,F),K=await B.lstat($);if(!K)throw new ge($);if(K.isDirectory())throw new O(`${$}: file expected, but found directory`);let ne=L?await $d({fs:B,gitdir:b,oid:L}):void 0,_e=ne?L:void 0;return ne||await ro({fs:B,gitdir:b,currentFilepath:$},async()=>{let ce=K.isSymbolicLink()?await B.readlink($).then(pp):await B.read($);if(ce===null)throw new ge($);_e=await Rr({fs:B,gitdir:b,type:"blob",object:ce})}),_e}l(PA,"VK"),e(PA,"checkAndWriteBlob");async function jA({fs:B,dir:b,gitdir:k,entries:F}){async function L($){if($.type==="tree"){if(!$.oid){let K=await Promise.all($.children.map(L));$.oid=await Ma({fs:B,gitdir:k,tree:K}),$.mode=16384}}else $.type==="blob"&&($.oid=await PA(B,k,b,$.path,$.oid),$.mode=33188);return $.path=$.path.split("/").pop(),$}return l(L,"a"),e(L,"processTreeEntry"),Promise.all(F.map(L))}l(jA,"GK"),e(jA,"processTreeEntries");async function $g({fs:B,dir:b,gitdir:k,treePair:F}){let L=F[1]==="stage",$=F.map(ce=>typeof ce=="string"?x4[ce]():ce),K=[],ne=await zn({fs:B,cache:{},dir:b,gitdir:k,trees:$,map:e(async(ce,[he,Be])=>{if(!(ce==="."||await Na.isIgnored({fs:B,dir:b,gitdir:k,filepath:ce}))&&Be)return(!he||await he.oid()!==await Be.oid()&&await Be.oid()!==void 0)&&K.push([he,Be]),{mode:await Be.mode(),path:ce,oid:await Be.oid(),type:await Be.type()}},"map"),reduce:e(async(ce,he)=>(he=he.filter(Boolean),ce?(ce.children=he,ce):he.length>0?he:void 0),"reduce"),iterate:e(async(ce,he)=>{let Be=[];for(let je of he){let[Me,ze]=je;L?ze&&(await B.exists(`${b}/${ze.toString()}`)?Be.push(je):K.push([null,ze])):Me&&(ze?Be.push(je):K.push([Me,null]))}return Be.length?Promise.all(Be.map(ce)):[]},"iterate")});if(K.length===0||ne.length===0)return null;let _e=(await jA({fs:B,dir:b,gitdir:k,entries:ne})).filter(Boolean).map(ce=>({mode:ce.mode,path:ce.path,oid:ce.oid,type:ce.type}));return Ma({fs:B,gitdir:k,tree:_e})}l($g,"tI"),e($g,"writeTreeChanges");async function CA({fs:B,dir:b,gitdir:k,stashCommit:F,parentCommit:L,wasStaged:$}){let K=[],ne=[],_e=await zn({fs:B,cache:{},dir:b,gitdir:k,trees:[Lr({ref:L}),Lr({ref:F})],map:e(async(ce,[he,Be])=>{if(ce==="."||await Na.isIgnored({fs:B,dir:b,gitdir:k,filepath:ce}))return;let je=Be?await Be.type():await he.type();if(je!=="tree"&&je!=="blob")return;if(!Be&&he){let ze=je==="tree"?"rmdir":"rm";return je==="tree"&&K.push(ce),je==="blob"&&$&&ne.push({filepath:ce,oid:await he.oid()}),{method:ze,filepath:ce}}let Me=await Be.oid();if(!he||await he.oid()!==Me)return je==="tree"?{method:"mkdir",filepath:ce}:($&&ne.push({filepath:ce,oid:Me,stats:await B.lstat(o.join(b,ce))}),{method:"write",filepath:ce,oid:Me})},"map")});await ro({fs:B,gitdir:k,dirRemoved:K,ops:_e},async()=>{for(let ce of _e){let he=o.join(b,ce.filepath);switch(ce.method){case"rmdir":await B.rmdir(he);break;case"mkdir":await B.mkdir(he);break;case"rm":await B.rm(he);break;case"write":if(!K.some(Be=>he.startsWith(Be))){let{object:Be}=await Mt({fs:B,cache:{},gitdir:k,oid:ce.oid});await B.exists(he)&&await B.rm(he),await B.write(he,Be)}break}}}),await Q.acquire({fs:B,gitdir:k,cache:{}},async ce=>{ne.forEach(({filepath:he,stats:Be,oid:je})=>{ce.insert({filepath:he,stats:Be,oid:je})})})}l(CA,"YK"),e(CA,"applyTreeChanges");var LA=(Vn=class{constructor({fs:b,dir:k,gitdir:F=o.join(k,".git")}){Object.assign(this,{fs:b,dir:k,gitdir:F,_author:null})}static get refStash(){return"refs/stash"}static get refLogsStash(){return"logs/refs/stash"}get refStashPath(){return o.join(this.gitdir,Vn.refStash)}get refLogsStashPath(){return o.join(this.gitdir,Vn.refLogsStash)}async getAuthor(){if(!this._author&&(this._author=await Hn({fs:this.fs,gitdir:this.gitdir,author:{}}),!this._author))throw new Cr("author");return this._author}async getStashSHA(b,k){return await this.fs.exists(this.refStashPath)?(k||await this.readStashReflogs({parsed:!1}))[b].split(" ")[1]:null}async writeStashCommit({message:b,tree:k,parent:F}){return Ug({fs:this.fs,gitdir:this.gitdir,commit:{message:b,tree:k,parent:F,author:await this.getAuthor(),committer:await this.getAuthor()}})}async readStashCommit(b){let k=await this.readStashReflogs({parsed:!1});if(b!==0&&(b<0||b>k.length-1))throw new Wn(`stash@${b}`,"number that is in range of [0, num of stash pushed]");let F=await this.getStashSHA(b,k);return F?Xi({fs:this.fs,cache:{},gitdir:this.gitdir,oid:F}):{}}async writeStashRef(b){return et.writeRef({fs:this.fs,gitdir:this.gitdir,ref:Vn.refStash,value:b})}async writeStashReflogEntry({stashCommit:b,message:k}){let F=await this.getAuthor(),L=IA.createStashReflogEntry(F,b,k),$=this.refLogsStashPath;await ro({filepath:$,entry:L},async()=>{let K=await this.fs.exists($)?await this.fs.read($,"utf8"):"";await this.fs.write($,K+L,"utf8")})}async readStashReflogs({parsed:b=!1}){if(!await this.fs.exists(this.refLogsStashPath))return[];let k=await this.fs.read(this.refLogsStashPath,"utf8");return IA.getStashReflogEntry(k,b)}},l(Vn,"Ps"),Vn);e(LA,"GitStashManager");var sl=LA;async function Wg({fs:B,dir:b,gitdir:k,message:F=""}){let L=new sl({fs:B,dir:b,gitdir:k});await L.getAuthor();let $=await qn({fs:B,gitdir:k,fullname:!1}),K=await et.resolve({fs:B,gitdir:k,ref:"HEAD"}),ne=(await Jf({fs:B,dir:b,gitdir:k,oid:K})).commit.message,_e=[K],ce=null,he=Lr({ref:"HEAD"}),Be=await $g({fs:B,dir:b,gitdir:k,treePair:[Lr({ref:"HEAD"}),"stage"]});if(Be){let ze=await L.writeStashCommit({message:`stash-Index: WIP on ${$} - ${new Date().toISOString()}`,tree:Be,parent:_e});_e.push(ze),ce=Be,he=Oe()}let je=await $g({fs:B,dir:b,gitdir:k,treePair:[he,"workdir"]});if(je){let ze=await L.writeStashCommit({message:`stash-WorkDir: WIP on ${$} - ${new Date().toISOString()}`,tree:je,parent:[_e[_e.length-1]]});_e.push(ze),ce=je}if(!ce||!Be&&!je)throw new ge("changes, nothing to stash");let Me=(F.trim()||`WIP on ${$}`)+`: ${K.substring(0,7)} ${ne}`;return{stashCommit:await L.writeStashCommit({message:Me,tree:ce,parent:_e}),stashMsg:Me,branch:$,stashMgr:L}}l(Wg,"Ck"),e(Wg,"_createStashCommit");async function NA({fs:B,dir:b,gitdir:k,message:F=""}){let{stashCommit:L,stashMsg:$,branch:K,stashMgr:ne}=await Wg({fs:B,dir:b,gitdir:k,message:F});return await ne.writeStashRef(L),await ne.writeStashReflogEntry({stashCommit:L,message:$}),await Uf({fs:B,dir:b,gitdir:k,ref:K,track:!1,force:!0}),L}l(NA,"KK"),e(NA,"_stashPush");async function DA({fs:B,dir:b,gitdir:k,message:F=""}){let{stashCommit:L}=await Wg({fs:B,dir:b,gitdir:k,message:F});return L}l(DA,"XK"),e(DA,"_stashCreate");async function zg({fs:B,dir:b,gitdir:k,refIdx:F=0}){let L=await new sl({fs:B,dir:b,gitdir:k}).readStashCommit(F),{parent:$=null}=L.commit?L.commit:{};if(!(!$||!Array.isArray($)))for(let K=0;K<$.length-1;K++){let ne=(await Xi({fs:B,cache:{},gitdir:k,oid:$[K+1]})).commit.message.startsWith("stash-Index");await CA({fs:B,dir:b,gitdir:k,stashCommit:$[K+1],parentCommit:$[K],wasStaged:ne})}}l(zg,"Lk"),e(zg,"_stashApply");async function Hg({fs:B,dir:b,gitdir:k,refIdx:F=0}){let L=new sl({fs:B,dir:b,gitdir:k});if(!(await L.readStashCommit(F)).commit)return;let $=L.refStashPath;await ro($,async()=>{await B.exists($)&&await B.rm($)});let K=await L.readStashReflogs({parsed:!1});if(!K.length)return;K.splice(F,1);let ne=L.refLogsStashPath;await ro({reflogEntries:K,stashReflogPath:ne,stashMgr:L},async()=>{if(K.length){await B.write(ne,K.reverse().join(`
|
|
112
|
-
`)+`
|
|
113
|
-
`,"utf8");let _e=K[K.length-1].split(" ")[1];await L.writeStashRef(_e)}else await B.rm(ne)})}l(Hg,"Nk"),e(Hg,"_stashDrop");async function UA({fs:B,dir:b,gitdir:k}){return new sl({fs:B,dir:b,gitdir:k}).readStashReflogs({parsed:!0})}l(UA,"JK"),e(UA,"_stashList");async function MA({fs:B,dir:b,gitdir:k}){let F=new sl({fs:B,dir:b,gitdir:k}),L=[F.refStashPath,F.refLogsStashPath];await ro(L,async()=>{await Promise.all(L.map(async $=>{if(await B.exists($))return B.rm($)}))})}l(MA,"ZK"),e(MA,"_stashClear");async function $A({fs:B,dir:b,gitdir:k,refIdx:F=0}){await zg({fs:B,dir:b,gitdir:k,refIdx:F}),await Hg({fs:B,dir:b,gitdir:k,refIdx:F})}l($A,"QK"),e($A,"_stashPop");async function qg({fs:B,dir:b,gitdir:k=o.join(b,".git"),op:F="push",message:L="",refIdx:$=0}){Ue("fs",B),Ue("dir",b),Ue("gitdir",k),Ue("op",F);let K={push:NA,apply:zg,drop:Hg,list:UA,clear:MA,pop:$A,create:DA},ne=["apply","drop","pop"];try{let _e=new mt(B);["refs","logs","logs/refs"].map(he=>o.join(k,he)).forEach(async he=>{await _e.exists(he)||await _e.mkdir(he)});let ce=K[F];if(ce){if(ne.includes(F)&&$<0)throw new Wn(`stash@${$}`,"number that is in range of [0, num of stash pushed]");return await ce({fs:_e,dir:b,gitdir:k,message:L,refIdx:$})}throw new Error(`To be implemented: ${F}`)}catch(_e){throw _e.caller="git.stash",_e}}l(qg,"Dk"),e(qg,"stash");async function Gg({fs:B,dir:b,gitdir:k=o.join(b,".git"),filepath:F,cache:L={}}){try{Ue("fs",B),Ue("gitdir",k),Ue("filepath",F);let $=new mt(B);if(await Na.isIgnored({fs:$,gitdir:k,dir:b,filepath:F}))return"ignored";let K=await WA({fs:$,cache:L,gitdir:k}),ne=await Vg({fs:$,cache:L,gitdir:k,tree:K,path:F}),_e=await Q.acquire({fs:$,gitdir:k,cache:L},async function(ze){for(let Ye of ze)if(Ye.path===F)return Ye;return null}),ce=await $.lstat(o.join(b,F)),he=ne!==null,Be=_e!==null,je=ce!==null,Me=e(async()=>{if(Be&&!te(_e,ce))return _e.oid;{let ze=await $.read(o.join(b,F)),Ye=await Cg({gitdir:k,type:"blob",object:ze});return Be&&_e.oid===Ye&&ce.size!==-1&&Q.acquire({fs:$,gitdir:k,cache:L},async function(rt){rt.insert({filepath:F,stats:ce,oid:Ye})}),Ye}},"getWorkdirOid");if(!he&&!je&&!Be)return"absent";if(!he&&!je&&Be)return"*absent";if(!he&&je&&!Be)return"*added";if(!he&&je&&Be)return await Me()===_e.oid?"added":"*added";if(he&&!je&&!Be)return"deleted";if(he&&!je&&Be)return _e.oid,"*deleted";if(he&&je&&!Be)return await Me()===ne?"*undeleted":"*undeletemodified";if(he&&je&&Be){let ze=await Me();return ze===ne?ze===_e.oid?"unmodified":"*unmodified":ze===_e.oid?"modified":"*modified"}}catch($){throw $.caller="git.status",$}}l(Gg,"$k"),e(Gg,"status");async function Vg({fs:B,cache:b,gitdir:k,tree:F,path:L}){typeof L=="string"&&(L=L.split("/"));let $=L.shift();for(let K of F)if(K.path===$){if(L.length===0)return K.oid;let{type:ne,object:_e}=await Mt({fs:B,cache:b,gitdir:k,oid:K.oid});if(ne==="tree"){let ce=Yr.from(_e);return Vg({fs:B,cache:b,gitdir:k,tree:ce,path:L})}if(ne==="blob")throw new Ie(K.oid,ne,"blob",L.join("/"))}return null}l(Vg,"Mk"),e(Vg,"getOidAtPath");async function WA({fs:B,cache:b,gitdir:k}){let F;try{F=await et.resolve({fs:B,gitdir:k,ref:"HEAD"})}catch($){if($ instanceof ge)return[]}let{tree:L}=await eo({fs:B,cache:b,gitdir:k,oid:F});return L}l(WA,"eX"),e(WA,"getHeadTree");async function Kg({fs:B,dir:b,gitdir:k=o.join(b,".git"),ref:F="HEAD",filepaths:L=["."],filter:$,cache:K={},ignored:ne=!1}){try{Ue("fs",B),Ue("gitdir",k),Ue("ref",F);let _e=new mt(B);return await zn({fs:_e,cache:K,dir:b,gitdir:k,trees:[Lr({ref:F}),Zi(),Oe()],map:e(async function(ce,[he,Be,je]){if(!he&&!je&&Be&&!ne&&await Na.isIgnored({fs:_e,dir:b,filepath:ce})||!L.some(pt=>CS(ce,pt)))return null;if($&&!$(ce))return;let[Me,ze,Ye]=await Promise.all([he&&he.type(),Be&&Be.type(),je&&je.type()]),rt=[Me,ze,Ye].includes("blob");if((Me==="tree"||Me==="special")&&!rt)return;if(Me==="commit")return null;if((ze==="tree"||ze==="special")&&!rt)return;if(Ye==="commit")return null;if((Ye==="tree"||Ye==="special")&&!rt)return;let ot=Me==="blob"?await he.oid():void 0,it=Ye==="blob"?await je.oid():void 0,ft;Me!=="blob"&&ze==="blob"&&Ye!=="blob"?ft="42":ze==="blob"&&(ft=await Be.oid());let gt=[void 0,ot,ft,it],yt=gt.map(pt=>gt.indexOf(pt));return yt.shift(),[ce,...yt]},"map")})}catch(_e){throw _e.caller="git.statusMatrix",_e}}l(Kg,"Uk"),e(Kg,"statusMatrix");async function Jg({fs:B,dir:b,gitdir:k=o.join(b,".git"),ref:F,object:L,force:$=!1}){try{Ue("fs",B),Ue("gitdir",k),Ue("ref",F);let K=new mt(B);if(F===void 0)throw new Qr("ref");F=F.startsWith("refs/tags/")?F:`refs/tags/${F}`;let ne=await et.resolve({fs:K,gitdir:k,ref:L||"HEAD"});if(!$&&await et.exists({fs:K,gitdir:k,ref:F}))throw new $n("tag",F);await et.writeRef({fs:K,gitdir:k,ref:F,value:ne})}catch(K){throw K.caller="git.tag",K}}l(Jg,"jk"),e(Jg,"tag");async function Yg({fs:B,dir:b,gitdir:k=o.join(b,".git"),cache:F={},filepath:L,oid:$,mode:K,add:ne,remove:_e,force:ce}){try{Ue("fs",B),Ue("gitdir",k),Ue("filepath",L);let he=new mt(B);if(_e)return await Q.acquire({fs:he,gitdir:k,cache:F},async function(je){if(!ce){let Me=await he.lstat(o.join(b,L));if(Me){if(Me.isDirectory())throw new Ca("directory");return}}je.has({filepath:L})&&je.delete({filepath:L})});let Be;if(!$){if(Be=await he.lstat(o.join(b,L)),!Be)throw new ge(`file at "${L}" on disk and "remove" not set`);if(Be.isDirectory())throw new Ca("directory")}return await Q.acquire({fs:he,gitdir:k,cache:F},async function(je){if(!ne&&!je.has({filepath:L}))throw new ge(`file at "${L}" in index and "add" not set`);let Me;if($)Me={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:K,uid:0,gid:0,size:0};else{Me=Be;let ze=Me.isSymbolicLink()?await he.readlink(o.join(b,L)):await he.read(o.join(b,L));$=await Rr({fs:he,gitdir:k,type:"blob",format:"content",object:ze})}return je.insert({filepath:L,oid:$,stats:Me}),$})}catch(he){throw he.caller="git.updateIndex",he}}l(Yg,"Hk"),e(Yg,"updateIndex$1");function Zg(){try{return Hf.version}catch(B){throw B.caller="git.version",B}}l(Zg,"Wk"),e(Zg,"version");async function Qg({fs:B,dir:b,gitdir:k=o.join(b,".git"),trees:F,map:L,reduce:$,iterate:K,cache:ne={}}){try{return Ue("fs",B),Ue("gitdir",k),Ue("trees",F),await zn({fs:new mt(B),cache:ne,dir:b,gitdir:k,trees:F,map:L,reduce:$,iterate:K})}catch(_e){throw _e.caller="git.walk",_e}}l(Qg,"qk"),e(Qg,"walk");async function Xg({fs:B,dir:b,gitdir:k=o.join(b,".git"),blob:F}){try{return Ue("fs",B),Ue("gitdir",k),Ue("blob",F),await Rr({fs:new mt(B),gitdir:k,type:"blob",object:F,format:"content"})}catch(L){throw L.caller="git.writeBlob",L}}l(Xg,"zk"),e(Xg,"writeBlob");async function ey({fs:B,dir:b,gitdir:k=o.join(b,".git"),commit:F}){try{return Ue("fs",B),Ue("gitdir",k),Ue("commit",F),await Ug({fs:new mt(B),gitdir:k,commit:F})}catch(L){throw L.caller="git.writeCommit",L}}l(ey,"Vk"),e(ey,"writeCommit");async function ty({fs:B,dir:b,gitdir:k=o.join(b,".git"),type:F,object:L,format:$="parsed",oid:K,encoding:ne=void 0}){try{let _e=new mt(B);if($==="parsed"){switch(F){case"commit":L=Xr.from(L).toObject();break;case"tree":L=Yr.from(L).toObject();break;case"blob":L=Buffer.from(L,ne);break;case"tag":L=on.from(L).toObject();break;default:throw new Ie(K||"",F,"blob|commit|tag|tree")}$="content"}return K=await Rr({fs:_e,gitdir:k,type:F,object:L,oid:K,format:$}),K}catch(_e){throw _e.caller="git.writeObject",_e}}l(ty,"Gk"),e(ty,"writeObject");async function ry({fs:B,dir:b,gitdir:k=o.join(b,".git"),ref:F,value:L,force:$=!1,symbolic:K=!1}){try{Ue("fs",B),Ue("gitdir",k),Ue("ref",F),Ue("value",L);let ne=new mt(B);if(!d(F,!0))throw new Wn(F,h.clean(F));if(!$&&await et.exists({fs:ne,gitdir:k,ref:F}))throw new $n("ref",F);K?await et.writeSymbolicRef({fs:ne,gitdir:k,ref:F,value:L}):(L=await et.resolve({fs:ne,gitdir:k,ref:L}),await et.writeRef({fs:ne,gitdir:k,ref:F,value:L}))}catch(ne){throw ne.caller="git.writeRef",ne}}l(ry,"Yk"),e(ry,"writeRef");async function zA({fs:B,gitdir:b,tag:k}){let F=on.from(k).toObject();return await Rr({fs:B,gitdir:b,type:"tag",object:F,format:"content"})}l(zA,"tX"),e(zA,"_writeTag");async function ny({fs:B,dir:b,gitdir:k=o.join(b,".git"),tag:F}){try{return Ue("fs",B),Ue("gitdir",k),Ue("tag",F),await zA({fs:new mt(B),gitdir:k,tag:F})}catch(L){throw L.caller="git.writeTag",L}}l(ny,"Kk"),e(ny,"writeTag");async function iy({fs:B,dir:b,gitdir:k=o.join(b,".git"),tree:F}){try{return Ue("fs",B),Ue("gitdir",k),Ue("tree",F),await Ma({fs:new mt(B),gitdir:k,tree:F})}catch(L){throw L.caller="git.writeTree",L}}l(iy,"Xk"),e(iy,"writeTree");var I4={Errors:fS,STAGE:Oe,TREE:Lr,WORKDIR:Zi,add:gp,abortMerge:cp,addNote:vp,addRemote:Ep,annotatedTag:Sp,branch:Ap,checkout:Uf,clone:Cp,commit:Lp,getConfig:Qp,getConfigAll:Xp,setConfig:Dg,currentBranch:Np,deleteBranch:Dp,deleteRef:Up,deleteRemote:Mp,deleteTag:$p,expandOid:Wp,expandRef:zp,fastForward:Vp,fetch:Kp,findMergeBase:Jp,findRoot:Zp,getRemoteInfo:eg,getRemoteInfo2:rg,hashBlob:ng,indexPack:ig,init:og,isDescendent:sg,isIgnored:lg,listBranches:fg,listFiles:cg,listNotes:hg,listRefs:dg,listRemotes:pg,listServerRefs:gg,listTags:yg,log:bg,merge:vg,packObjects:Eg,pull:Sg,push:Ag,readBlob:kg,readCommit:Jf,readNote:Tg,readObject:Fg,readTag:Bg,readTree:xg,remove:Ig,removeNote:Pg,renameBranch:jg,resetIndex:Lg,updateIndex:Yg,resolveRef:Ng,status:Gg,statusMatrix:Kg,tag:Jg,version:Zg,walk:Qg,writeBlob:Xg,writeCommit:ey,writeObject:ty,writeRef:ry,writeTag:ny,writeTree:iy,stash:qg};a.Errors=fS,a.STAGE=Oe,a.TREE=Lr,a.WORKDIR=Zi,a.abortMerge=cp,a.add=gp,a.addNote=vp,a.addRemote=Ep,a.annotatedTag=Sp,a.branch=Ap,a.checkout=Uf,a.clone=Cp,a.commit=Lp,a.currentBranch=Np,a.default=I4,a.deleteBranch=Dp,a.deleteRef=Up,a.deleteRemote=Mp,a.deleteTag=$p,a.expandOid=Wp,a.expandRef=zp,a.fastForward=Vp,a.fetch=Kp,a.findMergeBase=Jp,a.findRoot=Zp,a.getConfig=Qp,a.getConfigAll=Xp,a.getRemoteInfo=eg,a.getRemoteInfo2=rg,a.hashBlob=ng,a.indexPack=ig,a.init=og,a.isDescendent=sg,a.isIgnored=lg,a.listBranches=fg,a.listFiles=cg,a.listNotes=hg,a.listRefs=dg,a.listRemotes=pg,a.listServerRefs=gg,a.listTags=yg,a.log=bg,a.merge=vg,a.packObjects=Eg,a.pull=Sg,a.push=Ag,a.readBlob=kg,a.readCommit=Jf,a.readNote=Tg,a.readObject=Fg,a.readTag=Bg,a.readTree=xg,a.remove=Ig,a.removeNote=Pg,a.renameBranch=jg,a.resetIndex=Lg,a.resolveRef=Ng,a.setConfig=Dg,a.stash=qg,a.status=Gg,a.statusMatrix=Kg,a.tag=Jg,a.updateIndex=Yg,a.version=Zg,a.walk=Qg,a.writeBlob=Xg,a.writeCommit=ey,a.writeObject=ty,a.writeRef=ry,a.writeTag=ny,a.writeTree=iy}),s3=Ge((a,i)=>{i.exports=function(f,g){var o=[];f.on("data",function(n){o.push(n)}),f.once("end",function(){g&&g(null,Buffer.concat(o)),g=null}),f.once("error",function(n){g&&g(n),g=null})}}),l3=Ge(()=>{});function Ki(){return hv||(hv=!0,typeof Object.create=="function"?Gc=e(function(a,i){i&&(a.super_=i,a.prototype=Object.create(i.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}))},"inherits"):Gc=e(function(a,i){if(i){a.super_=i;var f=e(function(){},"TempCtor");f.prototype=i.prototype,a.prototype=new f,a.prototype.constructor=a}},"inherits")),Gc}l(Ki,"wa");function xt(){xt.init.call(this)}l(xt,"ot");function jl(a){if(typeof a!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof a)}l(jl,"Jd");function K1(a){return a._maxListeners===void 0?xt.defaultMaxListeners:a._maxListeners}l(K1,"EC");function dy(a,i,f,g){var o,n,r,u;if(jl(f),(n=a._events)===void 0?(n=a._events=Object.create(null),a._eventsCount=0):(n.newListener!==void 0&&(a.emit("newListener",i,f.listener?f.listener:f),n=a._events),r=n[i]),r===void 0)r=n[i]=f,++a._eventsCount;else if(typeof r=="function"?r=n[i]=g?[f,r]:[r,f]:g?r.unshift(f):r.push(f),(o=K1(a))>0&&r.length>o&&!r.warned){r.warned=!0;var p=new Error("Possible EventEmitter memory leak detected. "+r.length+" "+String(i)+" listeners added. Use emitter.setMaxListeners() to increase limit");p.name="MaxListenersExceededWarning",p.emitter=a,p.type=i,p.count=r.length,u=p,console&&console.warn&&console.warn(u)}return a}l(dy,"gB");function WP(){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)}l(WP,"aX");function py(a,i,f){var g={fired:!1,wrapFn:void 0,target:a,type:i,listener:f},o=WP.bind(g);return o.listener=f,g.wrapFn=o,o}l(py,"wB");function gy(a,i,f){var g=a._events;if(g===void 0)return[];var o=g[i];return o===void 0?[]:typeof o=="function"?f?[o.listener||o]:[o]:f?function(n){for(var r=new Array(n.length),u=0;u<r.length;++u)r[u]=n[u].listener||n[u];return r}(o):J1(o,o.length)}l(gy,"vB");function yy(a){var i=this._events;if(i!==void 0){var f=i[a];if(typeof f=="function")return 1;if(f!==void 0)return f.length}return 0}l(yy,"bB");function J1(a,i){for(var f=new Array(i),g=0;g<i;++g)f[g]=a[g];return f}l(J1,"SC");function zP(){if(dv)return As;dv=!0,As.byteLength=u,As.toByteArray=h,As.fromByteArray=y;for(var a=[],i=[],f=typeof Uint8Array<"u"?Uint8Array:Array,g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,n=g.length;o<n;++o)a[o]=g[o],i[g.charCodeAt(o)]=o;i[45]=62,i[95]=63;function r(w){var _=w.length;if(_%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var S=w.indexOf("=");S===-1&&(S=_);var T=S===_?0:4-S%4;return[S,T]}l(r,"i"),e(r,"getLens");function u(w){var _=r(w),S=_[0],T=_[1];return(S+T)*3/4-T}l(u,"f"),e(u,"byteLength");function p(w,_,S){return(_+S)*3/4-S}l(p,"h"),e(p,"_byteLength");function h(w){var _,S=r(w),T=S[0],O=S[1],E=new f(p(w,T,O)),P=0,A=O>0?T-4:T,x;for(x=0;x<A;x+=4)_=i[w.charCodeAt(x)]<<18|i[w.charCodeAt(x+1)]<<12|i[w.charCodeAt(x+2)]<<6|i[w.charCodeAt(x+3)],E[P++]=_>>16&255,E[P++]=_>>8&255,E[P++]=_&255;return O===2&&(_=i[w.charCodeAt(x)]<<2|i[w.charCodeAt(x+1)]>>4,E[P++]=_&255),O===1&&(_=i[w.charCodeAt(x)]<<10|i[w.charCodeAt(x+1)]<<4|i[w.charCodeAt(x+2)]>>2,E[P++]=_>>8&255,E[P++]=_&255),E}l(h,"c"),e(h,"toByteArray");function d(w){return a[w>>18&63]+a[w>>12&63]+a[w>>6&63]+a[w&63]}l(d,"d"),e(d,"tripletToBase64");function m(w,_,S){for(var T,O=[],E=_;E<S;E+=3)T=(w[E]<<16&16711680)+(w[E+1]<<8&65280)+(w[E+2]&255),O.push(d(T));return O.join("")}l(m,"y"),e(m,"encodeChunk");function y(w){for(var _,S=w.length,T=S%3,O=[],E=16383,P=0,A=S-T;P<A;P+=E)O.push(m(w,P,P+E>A?A:P+E));return T===1?(_=w[S-1],O.push(a[_>>2]+a[_<<4&63]+"==")):T===2&&(_=(w[S-2]<<8)+w[S-1],O.push(a[_>>10]+a[_>>4&63]+a[_<<2&63]+"=")),O.join("")}return l(y,"m"),e(y,"fromByteArray"),As}l(zP,"sX");function HP(){return pv||(pv=!0,Vc.read=function(a,i,f,g,o){var n,r,u=o*8-g-1,p=(1<<u)-1,h=p>>1,d=-7,m=f?o-1:0,y=f?-1:1,w=a[i+m];for(m+=y,n=w&(1<<-d)-1,w>>=-d,d+=u;d>0;n=n*256+a[i+m],m+=y,d-=8);for(r=n&(1<<-d)-1,n>>=-d,d+=g;d>0;r=r*256+a[i+m],m+=y,d-=8);if(n===0)n=1-h;else{if(n===p)return r?NaN:(w?-1:1)*(1/0);r=r+Math.pow(2,g),n=n-h}return(w?-1:1)*r*Math.pow(2,n-g)},Vc.write=function(a,i,f,g,o,n){var r,u,p,h=n*8-o-1,d=(1<<h)-1,m=d>>1,y=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=g?0:n-1,_=g?1:-1,S=i<0||i===0&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(u=isNaN(i)?1:0,r=d):(r=Math.floor(Math.log(i)/Math.LN2),i*(p=Math.pow(2,-r))<1&&(r--,p*=2),r+m>=1?i+=y/p:i+=y*Math.pow(2,1-m),i*p>=2&&(r++,p/=2),r+m>=d?(u=0,r=d):r+m>=1?(u=(i*p-1)*Math.pow(2,o),r=r+m):(u=i*Math.pow(2,m-1)*Math.pow(2,o),r=0));o>=8;a[f+w]=u&255,w+=_,u/=256,o-=8);for(r=r<<o|u,h+=o;h>0;a[f+w]=r&255,w+=_,r/=256,h-=8);a[f+w-_]|=S*128}),Vc}l(HP,"lX");function xa(){if(gv)return Ui;gv=!0;let a=zP(),i=HP(),f=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ui.Buffer=r,Ui.SlowBuffer=O,Ui.INSPECT_MAX_BYTES=50;let g=2147483647;Ui.kMaxLength=g,r.TYPED_ARRAY_SUPPORT=o(),!r.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 o(){try{let t=new Uint8Array(1),s={foo:e(function(){return 42},"foo")};return Object.setPrototypeOf(s,Uint8Array.prototype),Object.setPrototypeOf(t,s),t.foo()===42}catch{return!1}}l(o,"a"),e(o,"typedArraySupport"),Object.defineProperty(r.prototype,"parent",{enumerable:!0,get:e(function(){if(r.isBuffer(this))return this.buffer},"get")}),Object.defineProperty(r.prototype,"offset",{enumerable:!0,get:e(function(){if(r.isBuffer(this))return this.byteOffset},"get")});function n(t){if(t>g)throw new RangeError('The value "'+t+'" is invalid for option "size"');let s=new Uint8Array(t);return Object.setPrototypeOf(s,r.prototype),s}l(n,"s"),e(n,"createBuffer");function r(t,s,c){if(typeof t=="number"){if(typeof s=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(t)}return u(t,s,c)}l(r,"i"),e(r,"Buffer"),r.poolSize=8192;function u(t,s,c){if(typeof t=="string")return m(t,s);if(ArrayBuffer.isView(t))return w(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(Ie(t,ArrayBuffer)||t&&Ie(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(t,SharedArrayBuffer)||t&&Ie(t.buffer,SharedArrayBuffer)))return _(t,s,c);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let v=t.valueOf&&t.valueOf();if(v!=null&&v!==t)return r.from(v,s,c);let R=S(t);if(R)return R;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return r.from(t[Symbol.toPrimitive]("string"),s,c);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}l(u,"f"),e(u,"from"),r.from=function(t,s,c){return u(t,s,c)},Object.setPrototypeOf(r.prototype,Uint8Array.prototype),Object.setPrototypeOf(r,Uint8Array);function p(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"')}l(p,"h"),e(p,"assertSize");function h(t,s,c){return p(t),t<=0?n(t):s!==void 0?typeof c=="string"?n(t).fill(s,c):n(t).fill(s):n(t)}l(h,"c"),e(h,"alloc"),r.alloc=function(t,s,c){return h(t,s,c)};function d(t){return p(t),n(t<0?0:T(t)|0)}l(d,"d"),e(d,"allocUnsafe"),r.allocUnsafe=function(t){return d(t)},r.allocUnsafeSlow=function(t){return d(t)};function m(t,s){if((typeof s!="string"||s==="")&&(s="utf8"),!r.isEncoding(s))throw new TypeError("Unknown encoding: "+s);let c=E(t,s)|0,v=n(c),R=v.write(t,s);return R!==c&&(v=v.slice(0,R)),v}l(m,"y"),e(m,"fromString");function y(t){let s=t.length<0?0:T(t.length)|0,c=n(s);for(let v=0;v<s;v+=1)c[v]=t[v]&255;return c}l(y,"m"),e(y,"fromArrayLike");function w(t){if(Ie(t,Uint8Array)){let s=new Uint8Array(t);return _(s.buffer,s.byteOffset,s.byteLength)}return y(t)}l(w,"g"),e(w,"fromArrayView");function _(t,s,c){if(s<0||t.byteLength<s)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<s+(c||0))throw new RangeError('"length" is outside of buffer bounds');let v;return s===void 0&&c===void 0?v=new Uint8Array(t):c===void 0?v=new Uint8Array(t,s):v=new Uint8Array(t,s,c),Object.setPrototypeOf(v,r.prototype),v}l(_,"v"),e(_,"fromArrayBuffer");function S(t){if(r.isBuffer(t)){let s=T(t.length)|0,c=n(s);return c.length===0||t.copy(c,0,0,s),c}if(t.length!==void 0)return typeof t.length!="number"||ke(t.length)?n(0):y(t);if(t.type==="Buffer"&&Array.isArray(t.data))return y(t.data)}l(S,"_"),e(S,"fromObject");function T(t){if(t>=g)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+g.toString(16)+" bytes");return t|0}l(T,"b"),e(T,"checked");function O(t){return+t!=t&&(t=0),r.alloc(+t)}l(O,"E"),e(O,"SlowBuffer"),r.isBuffer=e(function(t){return t!=null&&t._isBuffer===!0&&t!==r.prototype},"isBuffer"),r.compare=e(function(t,s){if(Ie(t,Uint8Array)&&(t=r.from(t,t.offset,t.byteLength)),Ie(s,Uint8Array)&&(s=r.from(s,s.offset,s.byteLength)),!r.isBuffer(t)||!r.isBuffer(s))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===s)return 0;let c=t.length,v=s.length;for(let R=0,C=Math.min(c,v);R<C;++R)if(t[R]!==s[R]){c=t[R],v=s[R];break}return c<v?-1:v<c?1:0},"compare"),r.isEncoding=e(function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},"isEncoding"),r.concat=e(function(t,s){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return r.alloc(0);let c;if(s===void 0)for(s=0,c=0;c<t.length;++c)s+=t[c].length;let v=r.allocUnsafe(s),R=0;for(c=0;c<t.length;++c){let C=t[c];if(Ie(C,Uint8Array))R+C.length>v.length?(r.isBuffer(C)||(C=r.from(C)),C.copy(v,R)):Uint8Array.prototype.set.call(v,C,R);else if(r.isBuffer(C))C.copy(v,R);else throw new TypeError('"list" argument must be an Array of Buffers');R+=C.length}return v},"concat");function E(t,s){if(r.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Ie(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 c=t.length,v=arguments.length>2&&arguments[2]===!0;if(!v&&c===0)return 0;let R=!1;for(;;)switch(s){case"ascii":case"latin1":case"binary":return c;case"utf8":case"utf-8":return Ee(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c*2;case"hex":return c>>>1;case"base64":return ge(t).length;default:if(R)return v?-1:Ee(t).length;s=(""+s).toLowerCase(),R=!0}}l(E,"R"),e(E,"byteLength"),r.byteLength=E;function P(t,s,c){let v=!1;if((s===void 0||s<0)&&(s=0),s>this.length||((c===void 0||c>this.length)&&(c=this.length),c<=0)||(c>>>=0,s>>>=0,c<=s))return"";for(t||(t="utf8");;)switch(t){case"hex":return se(this,s,c);case"utf8":case"utf-8":return ae(this,s,c);case"ascii":return xe(this,s,c);case"latin1":case"binary":return Pe(this,s,c);case"base64":return re(this,s,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Te(this,s,c);default:if(v)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),v=!0}}l(P,"T"),e(P,"slowToString"),r.prototype._isBuffer=!0;function A(t,s,c){let v=t[s];t[s]=t[c],t[c]=v}l(A,"F"),e(A,"swap"),r.prototype.swap16=e(function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let s=0;s<t;s+=2)A(this,s,s+1);return this},"swap16"),r.prototype.swap32=e(function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let s=0;s<t;s+=4)A(this,s,s+3),A(this,s+1,s+2);return this},"swap32"),r.prototype.swap64=e(function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let s=0;s<t;s+=8)A(this,s,s+7),A(this,s+1,s+6),A(this,s+2,s+5),A(this,s+3,s+4);return this},"swap64"),r.prototype.toString=e(function(){let t=this.length;return t===0?"":arguments.length===0?ae(this,0,t):P.apply(this,arguments)},"toString"),r.prototype.toLocaleString=r.prototype.toString,r.prototype.equals=e(function(t){if(!r.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:r.compare(this,t)===0},"equals"),r.prototype.inspect=e(function(){let t="",s=Ui.INSPECT_MAX_BYTES;return t=this.toString("hex",0,s).replace(/(.{2})/g,"$1 ").trim(),this.length>s&&(t+=" ... "),"<Buffer "+t+">"},"inspect"),f&&(r.prototype[f]=r.prototype.inspect),r.prototype.compare=e(function(t,s,c,v,R){if(Ie(t,Uint8Array)&&(t=r.from(t,t.offset,t.byteLength)),!r.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(s===void 0&&(s=0),c===void 0&&(c=t?t.length:0),v===void 0&&(v=0),R===void 0&&(R=this.length),s<0||c>t.length||v<0||R>this.length)throw new RangeError("out of range index");if(v>=R&&s>=c)return 0;if(v>=R)return-1;if(s>=c)return 1;if(s>>>=0,c>>>=0,v>>>=0,R>>>=0,this===t)return 0;let C=R-v,j=c-s,Z=Math.min(C,j),oe=this.slice(v,R),Ae=t.slice(s,c);for(let le=0;le<Z;++le)if(oe[le]!==Ae[le]){C=oe[le],j=Ae[le];break}return C<j?-1:j<C?1:0},"compare");function x(t,s,c,v,R){if(t.length===0)return-1;if(typeof c=="string"?(v=c,c=0):c>2147483647?c=2147483647:c<-2147483648&&(c=-2147483648),c=+c,ke(c)&&(c=R?0:t.length-1),c<0&&(c=t.length+c),c>=t.length){if(R)return-1;c=t.length-1}else if(c<0)if(R)c=0;else return-1;if(typeof s=="string"&&(s=r.from(s,v)),r.isBuffer(s))return s.length===0?-1:U(t,s,c,v,R);if(typeof s=="number")return s=s&255,typeof Uint8Array.prototype.indexOf=="function"?R?Uint8Array.prototype.indexOf.call(t,s,c):Uint8Array.prototype.lastIndexOf.call(t,s,c):U(t,[s],c,v,R);throw new TypeError("val must be string, number or Buffer")}l(x,"S"),e(x,"bidirectionalIndexOf");function U(t,s,c,v,R){let C=1,j=t.length,Z=s.length;if(v!==void 0&&(v=String(v).toLowerCase(),v==="ucs2"||v==="ucs-2"||v==="utf16le"||v==="utf-16le")){if(t.length<2||s.length<2)return-1;C=2,j/=2,Z/=2,c/=2}function oe(le,Fe){return C===1?le[Fe]:le.readUInt16BE(Fe*C)}l(oe,"re"),e(oe,"read");let Ae;if(R){let le=-1;for(Ae=c;Ae<j;Ae++)if(oe(t,Ae)===oe(s,le===-1?0:Ae-le)){if(le===-1&&(le=Ae),Ae-le+1===Z)return le*C}else le!==-1&&(Ae-=Ae-le),le=-1}else for(c+Z>j&&(c=j-Z),Ae=c;Ae>=0;Ae--){let le=!0;for(let Fe=0;Fe<Z;Fe++)if(oe(t,Ae+Fe)!==oe(s,Fe)){le=!1;break}if(le)return Ae}return-1}l(U,"B"),e(U,"arrayIndexOf"),r.prototype.includes=e(function(t,s,c){return this.indexOf(t,s,c)!==-1},"includes"),r.prototype.indexOf=e(function(t,s,c){return x(this,t,s,c,!0)},"indexOf"),r.prototype.lastIndexOf=e(function(t,s,c){return x(this,t,s,c,!1)},"lastIndexOf");function M(t,s,c,v){c=Number(c)||0;let R=t.length-c;v?(v=Number(v),v>R&&(v=R)):v=R;let C=s.length;v>C/2&&(v=C/2);let j;for(j=0;j<v;++j){let Z=parseInt(s.substr(j*2,2),16);if(ke(Z))return j;t[c+j]=Z}return j}l(M,"P"),e(M,"hexWrite");function ee(t,s,c,v){return Ne(Ee(s,t.length-c),t,c,v)}l(ee,"N"),e(ee,"utf8Write");function V(t,s,c,v){return Ne(Oe(s),t,c,v)}l(V,"L"),e(V,"asciiWrite");function q(t,s,c,v){return Ne(ge(s),t,c,v)}l(q,"C"),e(q,"base64Write");function G(t,s,c,v){return Ne(be(s,t.length-c),t,c,v)}l(G,"j"),e(G,"ucs2Write"),r.prototype.write=e(function(t,s,c,v){if(s===void 0)v="utf8",c=this.length,s=0;else if(c===void 0&&typeof s=="string")v=s,c=this.length,s=0;else if(isFinite(s))s=s>>>0,isFinite(c)?(c=c>>>0,v===void 0&&(v="utf8")):(v=c,c=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let R=this.length-s;if((c===void 0||c>R)&&(c=R),t.length>0&&(c<0||s<0)||s>this.length)throw new RangeError("Attempt to write outside buffer bounds");v||(v="utf8");let C=!1;for(;;)switch(v){case"hex":return M(this,t,s,c);case"utf8":case"utf-8":return ee(this,t,s,c);case"ascii":case"latin1":case"binary":return V(this,t,s,c);case"base64":return q(this,t,s,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,t,s,c);default:if(C)throw new TypeError("Unknown encoding: "+v);v=(""+v).toLowerCase(),C=!0}},"write"),r.prototype.toJSON=e(function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},"toJSON");function re(t,s,c){return s===0&&c===t.length?a.fromByteArray(t):a.fromByteArray(t.slice(s,c))}l(re,"q"),e(re,"base64Slice");function ae(t,s,c){c=Math.min(t.length,c);let v=[],R=s;for(;R<c;){let C=t[R],j=null,Z=C>239?4:C>223?3:C>191?2:1;if(R+Z<=c){let oe,Ae,le,Fe;switch(Z){case 1:C<128&&(j=C);break;case 2:oe=t[R+1],(oe&192)===128&&(Fe=(C&31)<<6|oe&63,Fe>127&&(j=Fe));break;case 3:oe=t[R+1],Ae=t[R+2],(oe&192)===128&&(Ae&192)===128&&(Fe=(C&15)<<12|(oe&63)<<6|Ae&63,Fe>2047&&(Fe<55296||Fe>57343)&&(j=Fe));break;case 4:oe=t[R+1],Ae=t[R+2],le=t[R+3],(oe&192)===128&&(Ae&192)===128&&(le&192)===128&&(Fe=(C&15)<<18|(oe&63)<<12|(Ae&63)<<6|le&63,Fe>65535&&Fe<1114112&&(j=Fe))}}j===null?(j=65533,Z=1):j>65535&&(j-=65536,v.push(j>>>10&1023|55296),j=56320|j&1023),v.push(j),R+=Z}return we(v)}l(ae,"Z"),e(ae,"utf8Slice");let de=4096;function we(t){let s=t.length;if(s<=de)return String.fromCharCode.apply(String,t);let c="",v=0;for(;v<s;)c+=String.fromCharCode.apply(String,t.slice(v,v+=de));return c}l(we,"se"),e(we,"decodeCodePointsArray");function xe(t,s,c){let v="";c=Math.min(t.length,c);for(let R=s;R<c;++R)v+=String.fromCharCode(t[R]&127);return v}l(xe,"_e"),e(xe,"asciiSlice");function Pe(t,s,c){let v="";c=Math.min(t.length,c);for(let R=s;R<c;++R)v+=String.fromCharCode(t[R]);return v}l(Pe,"pe"),e(Pe,"latin1Slice");function se(t,s,c){let v=t.length;(!s||s<0)&&(s=0),(!c||c<0||c>v)&&(c=v);let R="";for(let C=s;C<c;++C)R+=Ce[t[C]];return R}l(se,"Q"),e(se,"hexSlice");function Te(t,s,c){let v=t.slice(s,c),R="";for(let C=0;C<v.length-1;C+=2)R+=String.fromCharCode(v[C]+v[C+1]*256);return R}l(Te,"he"),e(Te,"utf16leSlice"),r.prototype.slice=e(function(t,s){let c=this.length;t=~~t,s=s===void 0?c:~~s,t<0?(t+=c,t<0&&(t=0)):t>c&&(t=c),s<0?(s+=c,s<0&&(s=0)):s>c&&(s=c),s<t&&(s=t);let v=this.subarray(t,s);return Object.setPrototypeOf(v,r.prototype),v},"slice");function J(t,s,c){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+s>c)throw new RangeError("Trying to access beyond buffer length")}l(J,"U"),e(J,"checkOffset"),r.prototype.readUintLE=r.prototype.readUIntLE=e(function(t,s,c){t=t>>>0,s=s>>>0,c||J(t,s,this.length);let v=this[t],R=1,C=0;for(;++C<s&&(R*=256);)v+=this[t+C]*R;return v},"readUIntLE"),r.prototype.readUintBE=r.prototype.readUIntBE=e(function(t,s,c){t=t>>>0,s=s>>>0,c||J(t,s,this.length);let v=this[t+--s],R=1;for(;s>0&&(R*=256);)v+=this[t+--s]*R;return v},"readUIntBE"),r.prototype.readUint8=r.prototype.readUInt8=e(function(t,s){return t=t>>>0,s||J(t,1,this.length),this[t]},"readUInt8"),r.prototype.readUint16LE=r.prototype.readUInt16LE=e(function(t,s){return t=t>>>0,s||J(t,2,this.length),this[t]|this[t+1]<<8},"readUInt16LE"),r.prototype.readUint16BE=r.prototype.readUInt16BE=e(function(t,s){return t=t>>>0,s||J(t,2,this.length),this[t]<<8|this[t+1]},"readUInt16BE"),r.prototype.readUint32LE=r.prototype.readUInt32LE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},"readUInt32LE"),r.prototype.readUint32BE=r.prototype.readUInt32BE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},"readUInt32BE"),r.prototype.readBigUInt64LE=$e(e(function(t){t=t>>>0,N(t,"offset");let s=this[t],c=this[t+7];(s===void 0||c===void 0)&&I(t,this.length-8);let v=s+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,R=this[++t]+this[++t]*2**8+this[++t]*2**16+c*2**24;return BigInt(v)+(BigInt(R)<<BigInt(32))},"readBigUInt64LE")),r.prototype.readBigUInt64BE=$e(e(function(t){t=t>>>0,N(t,"offset");let s=this[t],c=this[t+7];(s===void 0||c===void 0)&&I(t,this.length-8);let v=s*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],R=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+c;return(BigInt(v)<<BigInt(32))+BigInt(R)},"readBigUInt64BE")),r.prototype.readIntLE=e(function(t,s,c){t=t>>>0,s=s>>>0,c||J(t,s,this.length);let v=this[t],R=1,C=0;for(;++C<s&&(R*=256);)v+=this[t+C]*R;return R*=128,v>=R&&(v-=Math.pow(2,8*s)),v},"readIntLE"),r.prototype.readIntBE=e(function(t,s,c){t=t>>>0,s=s>>>0,c||J(t,s,this.length);let v=s,R=1,C=this[t+--v];for(;v>0&&(R*=256);)C+=this[t+--v]*R;return R*=128,C>=R&&(C-=Math.pow(2,8*s)),C},"readIntBE"),r.prototype.readInt8=e(function(t,s){return t=t>>>0,s||J(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},"readInt8"),r.prototype.readInt16LE=e(function(t,s){t=t>>>0,s||J(t,2,this.length);let c=this[t]|this[t+1]<<8;return c&32768?c|4294901760:c},"readInt16LE"),r.prototype.readInt16BE=e(function(t,s){t=t>>>0,s||J(t,2,this.length);let c=this[t+1]|this[t]<<8;return c&32768?c|4294901760:c},"readInt16BE"),r.prototype.readInt32LE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},"readInt32LE"),r.prototype.readInt32BE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},"readInt32BE"),r.prototype.readBigInt64LE=$e(e(function(t){t=t>>>0,N(t,"offset");let s=this[t],c=this[t+7];(s===void 0||c===void 0)&&I(t,this.length-8);let v=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(c<<24);return(BigInt(v)<<BigInt(32))+BigInt(s+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)},"readBigInt64LE")),r.prototype.readBigInt64BE=$e(e(function(t){t=t>>>0,N(t,"offset");let s=this[t],c=this[t+7];(s===void 0||c===void 0)&&I(t,this.length-8);let v=(s<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(v)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+c)},"readBigInt64BE")),r.prototype.readFloatLE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),i.read(this,t,!0,23,4)},"readFloatLE"),r.prototype.readFloatBE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),i.read(this,t,!1,23,4)},"readFloatBE"),r.prototype.readDoubleLE=e(function(t,s){return t=t>>>0,s||J(t,8,this.length),i.read(this,t,!0,52,8)},"readDoubleLE"),r.prototype.readDoubleBE=e(function(t,s){return t=t>>>0,s||J(t,8,this.length),i.read(this,t,!1,52,8)},"readDoubleBE");function ue(t,s,c,v,R,C){if(!r.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(s>R||s<C)throw new RangeError('"value" argument is out of bounds');if(c+v>t.length)throw new RangeError("Index out of range")}l(ue,"J"),e(ue,"checkInt"),r.prototype.writeUintLE=r.prototype.writeUIntLE=e(function(t,s,c,v){if(t=+t,s=s>>>0,c=c>>>0,!v){let j=Math.pow(2,8*c)-1;ue(this,t,s,c,j,0)}let R=1,C=0;for(this[s]=t&255;++C<c&&(R*=256);)this[s+C]=t/R&255;return s+c},"writeUIntLE"),r.prototype.writeUintBE=r.prototype.writeUIntBE=e(function(t,s,c,v){if(t=+t,s=s>>>0,c=c>>>0,!v){let j=Math.pow(2,8*c)-1;ue(this,t,s,c,j,0)}let R=c-1,C=1;for(this[s+R]=t&255;--R>=0&&(C*=256);)this[s+R]=t/C&255;return s+c},"writeUIntBE"),r.prototype.writeUint8=r.prototype.writeUInt8=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,1,255,0),this[s]=t&255,s+1},"writeUInt8"),r.prototype.writeUint16LE=r.prototype.writeUInt16LE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,2,65535,0),this[s]=t&255,this[s+1]=t>>>8,s+2},"writeUInt16LE"),r.prototype.writeUint16BE=r.prototype.writeUInt16BE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,2,65535,0),this[s]=t>>>8,this[s+1]=t&255,s+2},"writeUInt16BE"),r.prototype.writeUint32LE=r.prototype.writeUInt32LE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,4,4294967295,0),this[s+3]=t>>>24,this[s+2]=t>>>16,this[s+1]=t>>>8,this[s]=t&255,s+4},"writeUInt32LE"),r.prototype.writeUint32BE=r.prototype.writeUInt32BE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,4,4294967295,0),this[s]=t>>>24,this[s+1]=t>>>16,this[s+2]=t>>>8,this[s+3]=t&255,s+4},"writeUInt32BE");function te(t,s,c,v,R){ve(s,v,R,t,c,7);let C=Number(s&BigInt(4294967295));t[c++]=C,C=C>>8,t[c++]=C,C=C>>8,t[c++]=C,C=C>>8,t[c++]=C;let j=Number(s>>BigInt(32)&BigInt(4294967295));return t[c++]=j,j=j>>8,t[c++]=j,j=j>>8,t[c++]=j,j=j>>8,t[c++]=j,c}l(te,"z"),e(te,"wrtBigUInt64LE");function X(t,s,c,v,R){ve(s,v,R,t,c,7);let C=Number(s&BigInt(4294967295));t[c+7]=C,C=C>>8,t[c+6]=C,C=C>>8,t[c+5]=C,C=C>>8,t[c+4]=C;let j=Number(s>>BigInt(32)&BigInt(4294967295));return t[c+3]=j,j=j>>8,t[c+2]=j,j=j>>8,t[c+1]=j,j=j>>8,t[c]=j,c+8}l(X,"V"),e(X,"wrtBigUInt64BE"),r.prototype.writeBigUInt64LE=$e(e(function(t,s=0){return te(this,t,s,BigInt(0),BigInt("0xffffffffffffffff"))},"writeBigUInt64LE")),r.prototype.writeBigUInt64BE=$e(e(function(t,s=0){return X(this,t,s,BigInt(0),BigInt("0xffffffffffffffff"))},"writeBigUInt64BE")),r.prototype.writeIntLE=e(function(t,s,c,v){if(t=+t,s=s>>>0,!v){let Z=Math.pow(2,8*c-1);ue(this,t,s,c,Z-1,-Z)}let R=0,C=1,j=0;for(this[s]=t&255;++R<c&&(C*=256);)t<0&&j===0&&this[s+R-1]!==0&&(j=1),this[s+R]=(t/C>>0)-j&255;return s+c},"writeIntLE"),r.prototype.writeIntBE=e(function(t,s,c,v){if(t=+t,s=s>>>0,!v){let Z=Math.pow(2,8*c-1);ue(this,t,s,c,Z-1,-Z)}let R=c-1,C=1,j=0;for(this[s+R]=t&255;--R>=0&&(C*=256);)t<0&&j===0&&this[s+R+1]!==0&&(j=1),this[s+R]=(t/C>>0)-j&255;return s+c},"writeIntBE"),r.prototype.writeInt8=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,1,127,-128),t<0&&(t=255+t+1),this[s]=t&255,s+1},"writeInt8"),r.prototype.writeInt16LE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,2,32767,-32768),this[s]=t&255,this[s+1]=t>>>8,s+2},"writeInt16LE"),r.prototype.writeInt16BE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,2,32767,-32768),this[s]=t>>>8,this[s+1]=t&255,s+2},"writeInt16BE"),r.prototype.writeInt32LE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,4,2147483647,-2147483648),this[s]=t&255,this[s+1]=t>>>8,this[s+2]=t>>>16,this[s+3]=t>>>24,s+4},"writeInt32LE"),r.prototype.writeInt32BE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[s]=t>>>24,this[s+1]=t>>>16,this[s+2]=t>>>8,this[s+3]=t&255,s+4},"writeInt32BE"),r.prototype.writeBigInt64LE=$e(e(function(t,s=0){return te(this,t,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))},"writeBigInt64LE")),r.prototype.writeBigInt64BE=$e(e(function(t,s=0){return X(this,t,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))},"writeBigInt64BE"));function ye(t,s,c,v,R,C){if(c+v>t.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("Index out of range")}l(ye,"G"),e(ye,"checkIEEE754");function Re(t,s,c,v,R){return s=+s,c=c>>>0,R||ye(t,s,c,4),i.write(t,s,c,v,23,4),c+4}l(Re,"fe"),e(Re,"writeFloat"),r.prototype.writeFloatLE=e(function(t,s,c){return Re(this,t,s,!0,c)},"writeFloatLE"),r.prototype.writeFloatBE=e(function(t,s,c){return Re(this,t,s,!1,c)},"writeFloatBE");function De(t,s,c,v,R){return s=+s,c=c>>>0,R||ye(t,s,c,8),i.write(t,s,c,v,52,8),c+8}l(De,"be"),e(De,"writeDouble"),r.prototype.writeDoubleLE=e(function(t,s,c){return De(this,t,s,!0,c)},"writeDoubleLE"),r.prototype.writeDoubleBE=e(function(t,s,c){return De(this,t,s,!1,c)},"writeDoubleBE"),r.prototype.copy=e(function(t,s,c,v){if(!r.isBuffer(t))throw new TypeError("argument should be a Buffer");if(c||(c=0),!v&&v!==0&&(v=this.length),s>=t.length&&(s=t.length),s||(s=0),v>0&&v<c&&(v=c),v===c||t.length===0||this.length===0)return 0;if(s<0)throw new RangeError("targetStart out of bounds");if(c<0||c>=this.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("sourceEnd out of bounds");v>this.length&&(v=this.length),t.length-s<v-c&&(v=t.length-s+c);let R=v-c;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(s,c,v):Uint8Array.prototype.set.call(t,this.subarray(c,v),s),R},"copy"),r.prototype.fill=e(function(t,s,c,v){if(typeof t=="string"){if(typeof s=="string"?(v=s,s=0,c=this.length):typeof c=="string"&&(v=c,c=this.length),v!==void 0&&typeof v!="string")throw new TypeError("encoding must be a string");if(typeof v=="string"&&!r.isEncoding(v))throw new TypeError("Unknown encoding: "+v);if(t.length===1){let C=t.charCodeAt(0);(v==="utf8"&&C<128||v==="latin1")&&(t=C)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(s<0||this.length<s||this.length<c)throw new RangeError("Out of range index");if(c<=s)return this;s=s>>>0,c=c===void 0?this.length:c>>>0,t||(t=0);let R;if(typeof t=="number")for(R=s;R<c;++R)this[R]=t;else{let C=r.isBuffer(t)?t:r.from(t,v),j=C.length;if(j===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(R=0;R<c-s;++R)this[R+s]=C[R%j]}return this},"fill");let Y={};function H(t,s,c){var R;var v;Y[t]=(v=(R=class extends c{constructor(){super(),Object.defineProperty(this,"message",{value:s.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(j){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:j,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}},l(R,"w"),R),e(v,"NodeError"),v)}l(H,"$"),e(H,"E2"),H("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),H("ERR_INVALID_ARG_TYPE",function(t,s){return`The "${t}" argument must be of type number. Received type ${typeof s}`},TypeError),H("ERR_OUT_OF_RANGE",function(t,s,c){let v=`The value of "${t}" is out of range.`,R=c;return Number.isInteger(c)&&Math.abs(c)>2**32?R=Q(String(c)):typeof c=="bigint"&&(R=String(c),(c>BigInt(2)**BigInt(32)||c<-(BigInt(2)**BigInt(32)))&&(R=Q(R)),R+="n"),v+=` It must be ${s}. Received ${R}`,v},RangeError);function Q(t){let s="",c=t.length,v=t[0]==="-"?1:0;for(;c>=v+4;c-=3)s=`_${t.slice(c-3,c)}${s}`;return`${t.slice(0,c)}${s}`}l(Q,"H"),e(Q,"addNumericalSeparator");function fe(t,s,c){N(s,"offset"),(t[s]===void 0||t[s+c]===void 0)&&I(s,t.length-(c+1))}l(fe,"te"),e(fe,"checkBounds");function ve(t,s,c,v,R,C){if(t>c||t<s){let j=typeof s=="bigint"?"n":"",Z;throw s===0||s===BigInt(0)?Z=`>= 0${j} and < 2${j} ** ${(C+1)*8}${j}`:Z=`>= -(2${j} ** ${(C+1)*8-1}${j}) and < 2 ** ${(C+1)*8-1}${j}`,new Y.ERR_OUT_OF_RANGE("value",Z,t)}fe(v,R,C)}l(ve,"oe"),e(ve,"checkIntBI");function N(t,s){if(typeof t!="number")throw new Y.ERR_INVALID_ARG_TYPE(s,"number",t)}l(N,"I"),e(N,"validateNumber");function I(t,s,c){throw Math.floor(t)!==t?(N(t,c),new Y.ERR_OUT_OF_RANGE("offset","an integer",t)):s<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${s}`,t)}l(I,"x"),e(I,"boundsError");let D=/[^+/0-9A-Za-z-_]/g;function z(t){if(t=t.split("=")[0],t=t.trim().replace(D,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}l(z,"Y"),e(z,"base64clean");function Ee(t,s){s=s||1/0;let c,v=t.length,R=null,C=[];for(let j=0;j<v;++j){if(c=t.charCodeAt(j),c>55295&&c<57344){if(!R){if(c>56319){(s-=3)>-1&&C.push(239,191,189);continue}else if(j+1===v){(s-=3)>-1&&C.push(239,191,189);continue}R=c;continue}if(c<56320){(s-=3)>-1&&C.push(239,191,189),R=c;continue}c=(R-55296<<10|c-56320)+65536}else R&&(s-=3)>-1&&C.push(239,191,189);if(R=null,c<128){if((s-=1)<0)break;C.push(c)}else if(c<2048){if((s-=2)<0)break;C.push(c>>6|192,c&63|128)}else if(c<65536){if((s-=3)<0)break;C.push(c>>12|224,c>>6&63|128,c&63|128)}else if(c<1114112){if((s-=4)<0)break;C.push(c>>18|240,c>>12&63|128,c>>6&63|128,c&63|128)}else throw new Error("Invalid code point")}return C}l(Ee,"ue"),e(Ee,"utf8ToBytes");function Oe(t){let s=[];for(let c=0;c<t.length;++c)s.push(t.charCodeAt(c)&255);return s}l(Oe,"le"),e(Oe,"asciiToBytes");function be(t,s){let c,v,R,C=[];for(let j=0;j<t.length&&!((s-=2)<0);++j)c=t.charCodeAt(j),v=c>>8,R=c%256,C.push(R),C.push(v);return C}l(be,"ee"),e(be,"utf16leToBytes");function ge(t){return a.toByteArray(z(t))}l(ge,"ie"),e(ge,"base64ToBytes");function Ne(t,s,c,v){let R;for(R=0;R<v&&!(R+c>=s.length||R>=t.length);++R)s[R+c]=t[R];return R}l(Ne,"me"),e(Ne,"blitBuffer");function Ie(t,s){return t instanceof s||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===s.name}l(Ie,"ye"),e(Ie,"isInstance");function ke(t){return t!==t}l(ke,"ve"),e(ke,"numberIsNaN");let Ce=function(){let t="0123456789abcdef",s=new Array(256);for(let c=0;c<16;++c){let v=c*16;for(let R=0;R<16;++R)s[v+R]=t[c]+t[R]}return s}();function $e(t){return typeof BigInt>"u"?Ke:t}l($e,"Be"),e($e,"defineBigIntMethod");function Ke(){throw new Error("BigInt not supported")}return l(Ke,"Je"),e(Ke,"BufferBigIntNotDefined"),Ui}l(xa,"il");function $c(){throw new Error("setTimeout has not been defined")}l($c,"bb");function Wc(){throw new Error("clearTimeout has not been defined")}l(Wc,"_b");function Y1(a){if(ri===setTimeout)return setTimeout(a,0);if((ri===$c||!ri)&&setTimeout)return ri=setTimeout,setTimeout(a,0);try{return ri(a,0)}catch{try{return ri.call(null,a,0)}catch{return ri.call(this||ma,a,0)}}}l(Y1,"RC");function qP(){wa&&la&&(wa=!1,la.length?jn=la.concat(jn):Ql=-1,jn.length&&Z1())}l(qP,"fX");function Z1(){if(!wa){var a=Y1(qP);wa=!0;for(var i=jn.length;i;){for(la=jn,jn=[];++Ql<i;)la&&la[Ql].run();Ql=-1,i=jn.length}la=null,wa=!1,function(f){if(ni===clearTimeout)return clearTimeout(f);if((ni===Wc||!ni)&&clearTimeout)return ni=clearTimeout,clearTimeout(f);try{ni(f)}catch{try{return ni.call(null,f)}catch{return ni.call(this||ma,f)}}}(a)}}l(Z1,"TC");function my(a,i){(this||ma).fun=a,(this||ma).array=i}l(my,"AB");function bn(){}l(bn,"di");function Ri(a){return a.call.bind(a)}l(Ri,"va");function Zs(a,i){if(typeof a!="object")return!1;try{return i(a),!0}catch{return!1}}l(Zs,"au");function wy(a){return xr&&Wr?Zr(a)!==void 0:Q1(a)||X1(a)||ev(a)||tv(a)||rv(a)||nv(a)||iv(a)||ov(a)||av(a)||sv(a)||lv(a)}l(wy,"TB");function Q1(a){return xr&&Wr?Zr(a)==="Uint8Array":Vt(a)==="[object Uint8Array]"||fj(a)&&a.buffer!==void 0}l(Q1,"kC");function X1(a){return xr&&Wr?Zr(a)==="Uint8ClampedArray":Vt(a)==="[object Uint8ClampedArray]"}l(X1,"BC");function ev(a){return xr&&Wr?Zr(a)==="Uint16Array":Vt(a)==="[object Uint16Array]"}l(ev,"CC");function tv(a){return xr&&Wr?Zr(a)==="Uint32Array":Vt(a)==="[object Uint32Array]"}l(tv,"LC");function rv(a){return xr&&Wr?Zr(a)==="Int8Array":Vt(a)==="[object Int8Array]"}l(rv,"NC");function nv(a){return xr&&Wr?Zr(a)==="Int16Array":Vt(a)==="[object Int16Array]"}l(nv,"DC");function iv(a){return xr&&Wr?Zr(a)==="Int32Array":Vt(a)==="[object Int32Array]"}l(iv,"$C");function ov(a){return xr&&Wr?Zr(a)==="Float32Array":Vt(a)==="[object Float32Array]"}l(ov,"MC");function av(a){return xr&&Wr?Zr(a)==="Float64Array":Vt(a)==="[object Float64Array]"}l(av,"UC");function sv(a){return xr&&Wr?Zr(a)==="BigInt64Array":Vt(a)==="[object BigInt64Array]"}l(sv,"jC");function lv(a){return xr&&Wr?Zr(a)==="BigUint64Array":Vt(a)==="[object BigUint64Array]"}l(lv,"HC");function cl(a){return Vt(a)==="[object Map]"}l(cl,"qd");function hl(a){return Vt(a)==="[object Set]"}l(hl,"zd");function dl(a){return Vt(a)==="[object WeakMap]"}l(dl,"Vd");function nu(a){return Vt(a)==="[object WeakSet]"}l(nu,"Hv");function ql(a){return Vt(a)==="[object ArrayBuffer]"}l(ql,"tp");function by(a){return typeof ArrayBuffer<"u"&&(ql.working?ql(a):a instanceof ArrayBuffer)}l(by,"FB");function Gl(a){return Vt(a)==="[object DataView]"}l(Gl,"rp");function vy(a){return typeof DataView<"u"&&(Gl.working?Gl(a):a instanceof DataView)}l(vy,"xB");function Vl(a){return Vt(a)==="[object SharedArrayBuffer]"}l(Vl,"np");function _y(a){return typeof SharedArrayBuffer<"u"&&(Vl.working?Vl(a):a instanceof SharedArrayBuffer)}l(_y,"OB");function Ey(a){return Zs(a,uj)}l(Ey,"PB");function Sy(a){return Zs(a,cj)}l(Sy,"IB");function Ay(a){return Zs(a,hj)}l(Ay,"kB");function Ry(a){return yv&&Zs(a,FX)}l(Ry,"BB");function Oy(a){return Kc&&Zs(a,xX)}l(Oy,"CB");function ui(a,i){var f={seen:[],stylize:VP};return arguments.length>=3&&(f.depth=arguments[2]),arguments.length>=4&&(f.colors=arguments[3]),id(i)?f.showHidden=i:i&&Xe._extend(f,i),qi(f.showHidden)&&(f.showHidden=!1),qi(f.depth)&&(f.depth=2),qi(f.colors)&&(f.colors=!1),qi(f.customInspect)&&(f.customInspect=!0),f.colors&&(f.stylize=GP),hf(f,a,f.depth)}l(ui,"co");function GP(a,i){var f=ui.styles[i];return f?"\x1B["+ui.colors[f][0]+"m"+a+"\x1B["+ui.colors[f][1]+"m":a}l(GP,"PX");function VP(a,i){return a}l(VP,"IX");function hf(a,i,f){if(a.customInspect&&i&&Zl(i.inspect)&&i.inspect!==Xe.inspect&&(!i.constructor||i.constructor.prototype!==i)){var g=i.inspect(f,a);return Jl(g)||(g=hf(a,g,f)),g}var o=function(y,w){if(qi(w))return y.stylize("undefined","undefined");if(Jl(w)){var _="'"+JSON.stringify(w).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return y.stylize(_,"string")}if(uv(w))return y.stylize(""+w,"number");if(id(w))return y.stylize(""+w,"boolean");if(Kl(w))return y.stylize("null","null")}(a,i);if(o)return o;var n=Object.keys(i),r=function(y){var w={};return y.forEach(function(_,S){w[_]=!0}),w}(n);if(a.showHidden&&(n=Object.getOwnPropertyNames(i)),Fs(i)&&(n.indexOf("message")>=0||n.indexOf("description")>=0))return zc(i);if(n.length===0){if(Zl(i)){var u=i.name?": "+i.name:"";return a.stylize("[Function"+u+"]","special")}if(Ts(i))return a.stylize(RegExp.prototype.toString.call(i),"regexp");if(Yl(i))return a.stylize(Date.prototype.toString.call(i),"date");if(Fs(i))return zc(i)}var p,h="",d=!1,m=["{","}"];return fv(i)&&(d=!0,m=["[","]"]),Zl(i)&&(h=" [Function"+(i.name?": "+i.name:"")+"]"),Ts(i)&&(h=" "+RegExp.prototype.toString.call(i)),Yl(i)&&(h=" "+Date.prototype.toUTCString.call(i)),Fs(i)&&(h=" "+zc(i)),n.length!==0||d&&i.length!=0?f<0?Ts(i)?a.stylize(RegExp.prototype.toString.call(i),"regexp"):a.stylize("[Object]","special"):(a.seen.push(i),p=d?function(y,w,_,S,T){for(var O=[],E=0,P=w.length;E<P;++E)zE(w,String(E))?O.push(Hc(y,w,_,S,String(E),!0)):O.push("");return T.forEach(function(A){A.match(/^\d+$/)||O.push(Hc(y,w,_,S,A,!0))}),O}(a,i,f,r,n):n.map(function(y){return Hc(a,i,f,r,y,d)}),a.seen.pop(),function(y,w,_){var S=0;return y.reduce(function(T,O){return S++,O.indexOf(`
|
|
114
|
-
`)>=0&&S++,T+O.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?_[0]+(w===""?"":w+`
|
|
115
|
-
`)+" "+y.join(`,
|
|
116
|
-
`)+" "+_[1]:_[0]+w+" "+y.join(", ")+" "+_[1]}(p,h,m)):m[0]+h+m[1]}l(hf,"ip");function zc(a){return"["+Error.prototype.toString.call(a)+"]"}l(zc,"Wv");function Hc(a,i,f,g,o,n){var r,u,p;if((p=Object.getOwnPropertyDescriptor(i,o)||{value:i[o]}).get?u=p.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):p.set&&(u=a.stylize("[Setter]","special")),zE(g,o)||(r="["+o+"]"),u||(a.seen.indexOf(p.value)<0?(u=Kl(f)?hf(a,p.value,null):hf(a,p.value,f-1)).indexOf(`
|
|
117
|
-
`)>-1&&(u=n?u.split(`
|
|
118
|
-
`).map(function(h){return" "+h}).join(`
|
|
119
|
-
`).substr(2):`
|
|
120
|
-
`+u.split(`
|
|
121
|
-
`).map(function(h){return" "+h}).join(`
|
|
122
|
-
`)):u=a.stylize("[Circular]","special")),qi(r)){if(n&&o.match(/^\d+$/))return u;(r=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(r=r.substr(1,r.length-2),r=a.stylize(r,"name")):(r=r.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),r=a.stylize(r,"string"))}return r+": "+u}l(Hc,"qv");function fv(a){return Array.isArray(a)}l(fv,"qC");function id(a){return typeof a=="boolean"}l(id,"Ob");function Kl(a){return a===null}l(Kl,"fp");function uv(a){return typeof a=="number"}l(uv,"zC");function Jl(a){return typeof a=="string"}l(Jl,"op");function qi(a){return a===void 0}l(qi,"ma");function Ts(a){return sa(a)&&xd(a)==="[object RegExp]"}l(Ts,"iu");function sa(a){return typeof a=="object"&&a!==null}l(sa,"ol");function Yl(a){return sa(a)&&xd(a)==="[object Date]"}l(Yl,"ap");function Fs(a){return sa(a)&&(xd(a)==="[object Error]"||a instanceof Error)}l(Fs,"ou");function Zl(a){return typeof a=="function"}l(Zl,"Qd");function xd(a){return Object.prototype.toString.call(a)}l(xd,"Pb");function qc(a){return a<10?"0"+a.toString(10):a.toString(10)}l(qc,"zv");function UT(){var a=new Date,i=[qc(a.getHours()),qc(a.getMinutes()),qc(a.getSeconds())].join(":");return[a.getDate(),dj[a.getMonth()],i].join(" ")}l(UT,"BX");function zE(a,i){return Object.prototype.hasOwnProperty.call(a,i)}l(zE,"VC");function MT(a,i){if(!a){var f=new Error("Promise was rejected with a falsy value");f.reason=a,a=f}return i(a)}l(MT,"CX");function od(a){throw new Error("Node.js process "+a+" is not supported by JSPM core outside of Node.js")}l(od,"Ib");function KP(){!ba||!fa||(ba=!1,fa.length?Cn=fa.concat(Cn):Xl=-1,Cn.length&&HE())}l(KP,"LX");function HE(){if(!ba){var a=setTimeout(KP,0);ba=!0;for(var i=Cn.length;i;){for(fa=Cn,Cn=[];++Xl<i;)fa&&fa[Xl].run();Xl=-1,i=Cn.length}fa=null,ba=!1,clearTimeout(a)}}l(HE,"GC");function $T(a){var i=new Array(arguments.length-1);if(arguments.length>1)for(var f=1;f<arguments.length;f++)i[f-1]=arguments[f];Cn.push(new cv(a,i)),Cn.length===1&&!ba&&setTimeout(HE,0)}l($T,"NX");function cv(a,i){this.fun=a,this.array=i}l(cv,"YC");function vr(){}l(vr,"tr");function WT(a){od("_linkedBinding")}l(WT,"QX");function zT(a){od("dlopen")}l(zT,"nJ");function HT(){return[]}l(HT,"iJ");function qT(){return[]}l(qT,"oJ");function GT(a,i){if(!a)throw new Error(i||"assertion error")}l(GT,"pJ");function VT(){return!1}l(VT,"wJ");function KT(){return ci.now()/1e3}l(KT,"LJ");function iu(a){var i=Math.floor((Date.now()-ci.now())*.001),f=ci.now()*.001,g=Math.floor(f)+i,o=Math.floor(f%1*1e9);return a&&(g=g-a[0],o=o-a[1],o<0&&(g--,o+=Jc)),[g,o]}l(iu,"Ab");function Zn(){return bi}l(Zn,"ho");function JT(a){return[]}l(JT,"GJ");function JP(){if(mv)return Yc;mv=!0,Yc=a;function a(f,g){if(i("noDeprecation"))return f;var o=!1;function n(){if(!o){if(i("throwDeprecation"))throw new Error(g);i("traceDeprecation")?console.trace(g):console.warn(g),o=!0}return f.apply(this||Zc,arguments)}return l(n,"s"),e(n,"deprecated"),n}l(a,"e"),e(a,"deprecate");function i(f){try{if(!Zc.localStorage)return!1}catch{return!1}var g=Zc.localStorage[f];return g==null?!1:String(g).toLowerCase()==="true"}return l(i,"t"),e(i,"config2"),Yc}l(JP,"YJ");function YP(){if(wv)return Rs;wv=!0;var a=xa(),i=a.Buffer;function f(o,n){for(var r in o)n[r]=o[r]}l(f,"r"),e(f,"copyProps"),i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?Rs=a:(f(a,Rs),Rs.Buffer=g);function g(o,n,r){return i(o,n,r)}return l(g,"n"),e(g,"SafeBuffer"),g.prototype=Object.create(i.prototype),f(i,g),g.from=function(o,n,r){if(typeof o=="number")throw new TypeError("Argument must not be a number");return i(o,n,r)},g.alloc=function(o,n,r){if(typeof o!="number")throw new TypeError("Argument must be a number");var u=i(o);return n!==void 0?typeof r=="string"?u.fill(n,r):u.fill(n):u.fill(0),u},g.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return i(o)},g.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return a.SlowBuffer(o)},Rs}l(YP,"KJ");function YT(){if(bv)return Qc;bv=!0;var a=YP().Buffer,i=a.isEncoding||function(O){switch(O=""+O,O&&O.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 f(O){if(!O)return"utf8";for(var E;;)switch(O){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 O;default:if(E)return;O=(""+O).toLowerCase(),E=!0}}l(f,"r"),e(f,"_normalizeEncoding");function g(O){var E=f(O);if(typeof E!="string"&&(a.isEncoding===i||!i(O)))throw new Error("Unknown encoding: "+O);return E||O}l(g,"n"),e(g,"normalizeEncoding"),Qc.StringDecoder=o;function o(O){this.encoding=g(O);var E;switch(this.encoding){case"utf16le":this.text=m,this.end=y,E=4;break;case"utf8":this.fillLast=p,E=4;break;case"base64":this.text=w,this.end=_,E=3;break;default:this.write=S,this.end=T;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=a.allocUnsafe(E)}l(o,"a"),e(o,"StringDecoder2"),o.prototype.write=function(O){if(O.length===0)return"";var E,P;if(this.lastNeed){if(E=this.fillLast(O),E===void 0)return"";P=this.lastNeed,this.lastNeed=0}else P=0;return P<O.length?E?E+this.text(O,P):this.text(O,P):E||""},o.prototype.end=d,o.prototype.text=h,o.prototype.fillLast=function(O){if(this.lastNeed<=O.length)return O.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);O.copy(this.lastChar,this.lastTotal-this.lastNeed,0,O.length),this.lastNeed-=O.length};function n(O){return O<=127?0:O>>5===6?2:O>>4===14?3:O>>3===30?4:O>>6===2?-1:-2}l(n,"s"),e(n,"utf8CheckByte");function r(O,E,P){var A=E.length-1;if(A<P)return 0;var x=n(E[A]);return x>=0?(x>0&&(O.lastNeed=x-1),x):--A<P||x===-2?0:(x=n(E[A]),x>=0?(x>0&&(O.lastNeed=x-2),x):--A<P||x===-2?0:(x=n(E[A]),x>=0?(x>0&&(x===2?x=0:O.lastNeed=x-3),x):0))}l(r,"i"),e(r,"utf8CheckIncomplete");function u(O,E,P){if((E[0]&192)!==128)return O.lastNeed=0,"\uFFFD";if(O.lastNeed>1&&E.length>1){if((E[1]&192)!==128)return O.lastNeed=1,"\uFFFD";if(O.lastNeed>2&&E.length>2&&(E[2]&192)!==128)return O.lastNeed=2,"\uFFFD"}}l(u,"f"),e(u,"utf8CheckExtraBytes");function p(O){var E=this.lastTotal-this.lastNeed,P=u(this,O);if(P!==void 0)return P;if(this.lastNeed<=O.length)return O.copy(this.lastChar,E,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);O.copy(this.lastChar,E,0,O.length),this.lastNeed-=O.length}l(p,"h"),e(p,"utf8FillLast");function h(O,E){var P=r(this,O,E);if(!this.lastNeed)return O.toString("utf8",E);this.lastTotal=P;var A=O.length-(P-this.lastNeed);return O.copy(this.lastChar,0,A),O.toString("utf8",E,A)}l(h,"c"),e(h,"utf8Text");function d(O){var E=O&&O.length?this.write(O):"";return this.lastNeed?E+"\uFFFD":E}l(d,"d"),e(d,"utf8End");function m(O,E){if((O.length-E)%2===0){var P=O.toString("utf16le",E);if(P){var A=P.charCodeAt(P.length-1);if(A>=55296&&A<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=O[O.length-2],this.lastChar[1]=O[O.length-1],P.slice(0,-1)}return P}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=O[O.length-1],O.toString("utf16le",E,O.length-1)}l(m,"y"),e(m,"utf16Text");function y(O){var E=O&&O.length?this.write(O):"";if(this.lastNeed){var P=this.lastTotal-this.lastNeed;return E+this.lastChar.toString("utf16le",0,P)}return E}l(y,"m"),e(y,"utf16End");function w(O,E){var P=(O.length-E)%3;return P===0?O.toString("base64",E):(this.lastNeed=3-P,this.lastTotal=3,P===1?this.lastChar[0]=O[O.length-1]:(this.lastChar[0]=O[O.length-2],this.lastChar[1]=O[O.length-1]),O.toString("base64",E,O.length-P))}l(w,"g"),e(w,"base64Text");function _(O){var E=O&&O.length?this.write(O):"";return this.lastNeed?E+this.lastChar.toString("base64",0,3-this.lastNeed):E}l(_,"v"),e(_,"base64End");function S(O){return O.toString(this.encoding)}l(S,"_"),e(S,"simpleWrite");function T(O){return O&&O.length?this.write(O):""}return l(T,"b"),e(T,"simpleEnd"),Qc}l(YT,"XJ");function ZT(){if(vv)return Xc;vv=!0;var a=Xc={},i,f;function g(){throw new Error("setTimeout has not been defined")}l(g,"n"),e(g,"defaultSetTimout");function o(){throw new Error("clearTimeout has not been defined")}l(o,"a"),e(o,"defaultClearTimeout"),function(){try{typeof setTimeout=="function"?i=setTimeout:i=g}catch{i=g}try{typeof clearTimeout=="function"?f=clearTimeout:f=o}catch{f=o}}();function n(S){if(i===setTimeout)return setTimeout(S,0);if((i===g||!i)&&setTimeout)return i=setTimeout,setTimeout(S,0);try{return i(S,0)}catch{try{return i.call(null,S,0)}catch{return i.call(this||ea,S,0)}}}l(n,"s"),e(n,"runTimeout");function r(S){if(f===clearTimeout)return clearTimeout(S);if((f===o||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(S);try{return f(S)}catch{try{return f.call(null,S)}catch{return f.call(this||ea,S)}}}l(r,"i"),e(r,"runClearTimeout");var u=[],p=!1,h,d=-1;function m(){!p||!h||(p=!1,h.length?u=h.concat(u):d=-1,u.length&&y())}l(m,"y"),e(m,"cleanUpNextTick2");function y(){if(!p){var S=n(m);p=!0;for(var T=u.length;T;){for(h=u,u=[];++d<T;)h&&h[d].run();d=-1,T=u.length}h=null,p=!1,r(S)}}l(y,"m"),e(y,"drainQueue2"),a.nextTick=function(S){var T=new Array(arguments.length-1);if(arguments.length>1)for(var O=1;O<arguments.length;O++)T[O-1]=arguments[O];u.push(new w(S,T)),u.length===1&&!p&&n(y)};function w(S,T){(this||ea).fun=S,(this||ea).array=T}l(w,"g"),e(w,"Item2"),w.prototype.run=function(){(this||ea).fun.apply(null,(this||ea).array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={};function _(){}return l(_,"v"),e(_,"noop2"),a.on=_,a.addListener=_,a.once=_,a.off=_,a.removeListener=_,a.removeAllListeners=_,a.emit=_,a.prependListener=_,a.prependOnceListener=_,a.listeners=function(S){return[]},a.binding=function(S){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(S){throw new Error("process.chdir is not supported")},a.umask=function(){return 0},Xc}l(ZT,"JJ");function QT(){if(_v)return eh;_v=!0;var a=qt;function i(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}l(i,"t"),e(i,"assertPath");function f(n,r){for(var u="",p=0,h=-1,d=0,m,y=0;y<=n.length;++y){if(y<n.length)m=n.charCodeAt(y);else{if(m===47)break;m=47}if(m===47){if(!(h===y-1||d===1))if(h!==y-1&&d===2){if(u.length<2||p!==2||u.charCodeAt(u.length-1)!==46||u.charCodeAt(u.length-2)!==46){if(u.length>2){var w=u.lastIndexOf("/");if(w!==u.length-1){w===-1?(u="",p=0):(u=u.slice(0,w),p=u.length-1-u.lastIndexOf("/")),h=y,d=0;continue}}else if(u.length===2||u.length===1){u="",p=0,h=y,d=0;continue}}r&&(u.length>0?u+="/..":u="..",p=2)}else u.length>0?u+="/"+n.slice(h+1,y):u=n.slice(h+1,y),p=y-h-1;h=y,d=0}else m===46&&d!==-1?++d:d=-1}return u}l(f,"r"),e(f,"normalizeStringPosix");function g(n,r){var u=r.dir||r.root,p=r.base||(r.name||"")+(r.ext||"");return u?u===r.root?u+p:u+n+p:p}l(g,"n"),e(g,"_format");var o={resolve:e(function(){for(var n="",r=!1,u,p=arguments.length-1;p>=-1&&!r;p--){var h;p>=0?h=arguments[p]:(u===void 0&&(u=a.cwd()),h=u),i(h),h.length!==0&&(n=h+"/"+n,r=h.charCodeAt(0)===47)}return n=f(n,!r),r?n.length>0?"/"+n:"/":n.length>0?n:"."},"resolve"),normalize:e(function(n){if(i(n),n.length===0)return".";var r=n.charCodeAt(0)===47,u=n.charCodeAt(n.length-1)===47;return n=f(n,!r),n.length===0&&!r&&(n="."),n.length>0&&u&&(n+="/"),r?"/"+n:n},"normalize"),isAbsolute:e(function(n){return i(n),n.length>0&&n.charCodeAt(0)===47},"isAbsolute"),join:e(function(){if(arguments.length===0)return".";for(var n,r=0;r<arguments.length;++r){var u=arguments[r];i(u),u.length>0&&(n===void 0?n=u:n+="/"+u)}return n===void 0?".":o.normalize(n)},"join"),relative:e(function(n,r){if(i(n),i(r),n===r||(n=o.resolve(n),r=o.resolve(r),n===r))return"";for(var u=1;u<n.length&&n.charCodeAt(u)===47;++u);for(var p=n.length,h=p-u,d=1;d<r.length&&r.charCodeAt(d)===47;++d);for(var m=r.length,y=m-d,w=h<y?h:y,_=-1,S=0;S<=w;++S){if(S===w){if(y>w){if(r.charCodeAt(d+S)===47)return r.slice(d+S+1);if(S===0)return r.slice(d+S)}else h>w&&(n.charCodeAt(u+S)===47?_=S:S===0&&(_=0));break}var T=n.charCodeAt(u+S),O=r.charCodeAt(d+S);if(T!==O)break;T===47&&(_=S)}var E="";for(S=u+_+1;S<=p;++S)(S===p||n.charCodeAt(S)===47)&&(E.length===0?E+="..":E+="/..");return E.length>0?E+r.slice(d+_):(d+=_,r.charCodeAt(d)===47&&++d,r.slice(d))},"relative"),_makeLong:e(function(n){return n},"_makeLong"),dirname:e(function(n){if(i(n),n.length===0)return".";for(var r=n.charCodeAt(0),u=r===47,p=-1,h=!0,d=n.length-1;d>=1;--d)if(r=n.charCodeAt(d),r===47){if(!h){p=d;break}}else h=!1;return p===-1?u?"/":".":u&&p===1?"//":n.slice(0,p)},"dirname"),basename:e(function(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');i(n);var u=0,p=-1,h=!0,d;if(r!==void 0&&r.length>0&&r.length<=n.length){if(r.length===n.length&&r===n)return"";var m=r.length-1,y=-1;for(d=n.length-1;d>=0;--d){var w=n.charCodeAt(d);if(w===47){if(!h){u=d+1;break}}else y===-1&&(h=!1,y=d+1),m>=0&&(w===r.charCodeAt(m)?--m===-1&&(p=d):(m=-1,p=y))}return u===p?p=y:p===-1&&(p=n.length),n.slice(u,p)}else{for(d=n.length-1;d>=0;--d)if(n.charCodeAt(d)===47){if(!h){u=d+1;break}}else p===-1&&(h=!1,p=d+1);return p===-1?"":n.slice(u,p)}},"basename"),extname:e(function(n){i(n);for(var r=-1,u=0,p=-1,h=!0,d=0,m=n.length-1;m>=0;--m){var y=n.charCodeAt(m);if(y===47){if(!h){u=m+1;break}continue}p===-1&&(h=!1,p=m+1),y===46?r===-1?r=m:d!==1&&(d=1):r!==-1&&(d=-1)}return r===-1||p===-1||d===0||d===1&&r===p-1&&r===u+1?"":n.slice(r,p)},"extname"),format:e(function(n){if(n===null||typeof n!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof n);return g("/",n)},"format"),parse:e(function(n){i(n);var r={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return r;var u=n.charCodeAt(0),p=u===47,h;p?(r.root="/",h=1):h=0;for(var d=-1,m=0,y=-1,w=!0,_=n.length-1,S=0;_>=h;--_){if(u=n.charCodeAt(_),u===47){if(!w){m=_+1;break}continue}y===-1&&(w=!1,y=_+1),u===46?d===-1?d=_:S!==1&&(S=1):d!==-1&&(S=-1)}return d===-1||y===-1||S===0||S===1&&d===y-1&&d===m+1?y!==-1&&(m===0&&p?r.base=r.name=n.slice(1,y):r.base=r.name=n.slice(m,y)):(m===0&&p?(r.name=n.slice(1,d),r.base=n.slice(1,y)):(r.name=n.slice(m,d),r.base=n.slice(m,y)),r.ext=n.slice(d,y)),m>0?r.dir=n.slice(0,m-1):p&&(r.dir="/"),r},"parse"),sep:"/",delimiter:":",win32:null,posix:null};return o.posix=o,eh=o,eh}l(QT,"ZJ");function Oi(a){throw new RangeError(gj[a])}l(Oi,"pa");function ky(a,i){let f=a.split("@"),g="";f.length>1&&(g=f[0]+"@",a=f[1]);let o=function(n,r){let u=[],p=n.length;for(;p--;)u[p]=r(n[p]);return u}((a=a.replace(pj,".")).split("."),i).join(".");return g+o}l(ky,"HB");function Ty(a){let i=[],f=0,g=a.length;for(;f<g;){let o=a.charCodeAt(f++);if(o>=55296&&o<=56319&&f<g){let n=a.charCodeAt(f++);(64512&n)==56320?i.push(((1023&o)<<10)+(1023&n)+65536):(i.push(o),f--)}else i.push(o)}return i}l(Ty,"KC");function XT(a,i){return Object.prototype.hasOwnProperty.call(a,i)}l(XT,"iZ");function Vr(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}l(Vr,"Xr");function ss(a,i,f){if(a&&cn.isObject(a)&&a instanceof Vr)return a;var g=new Vr;return g.parse(a,i,f),g}l(ss,"ru");function eF(){if(Sv)return th;Sv=!0;var a=Ht;function i(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}l(i,"t"),e(i,"assertPath");function f(n,r){for(var u="",p=0,h=-1,d=0,m,y=0;y<=n.length;++y){if(y<n.length)m=n.charCodeAt(y);else{if(m===47)break;m=47}if(m===47){if(!(h===y-1||d===1))if(h!==y-1&&d===2){if(u.length<2||p!==2||u.charCodeAt(u.length-1)!==46||u.charCodeAt(u.length-2)!==46){if(u.length>2){var w=u.lastIndexOf("/");if(w!==u.length-1){w===-1?(u="",p=0):(u=u.slice(0,w),p=u.length-1-u.lastIndexOf("/")),h=y,d=0;continue}}else if(u.length===2||u.length===1){u="",p=0,h=y,d=0;continue}}r&&(u.length>0?u+="/..":u="..",p=2)}else u.length>0?u+="/"+n.slice(h+1,y):u=n.slice(h+1,y),p=y-h-1;h=y,d=0}else m===46&&d!==-1?++d:d=-1}return u}l(f,"r"),e(f,"normalizeStringPosix");function g(n,r){var u=r.dir||r.root,p=r.base||(r.name||"")+(r.ext||"");return u?u===r.root?u+p:u+n+p:p}l(g,"n"),e(g,"_format");var o={resolve:e(function(){for(var n="",r=!1,u,p=arguments.length-1;p>=-1&&!r;p--){var h;p>=0?h=arguments[p]:(u===void 0&&(u=a.cwd()),h=u),i(h),h.length!==0&&(n=h+"/"+n,r=h.charCodeAt(0)===47)}return n=f(n,!r),r?n.length>0?"/"+n:"/":n.length>0?n:"."},"resolve"),normalize:e(function(n){if(i(n),n.length===0)return".";var r=n.charCodeAt(0)===47,u=n.charCodeAt(n.length-1)===47;return n=f(n,!r),n.length===0&&!r&&(n="."),n.length>0&&u&&(n+="/"),r?"/"+n:n},"normalize"),isAbsolute:e(function(n){return i(n),n.length>0&&n.charCodeAt(0)===47},"isAbsolute"),join:e(function(){if(arguments.length===0)return".";for(var n,r=0;r<arguments.length;++r){var u=arguments[r];i(u),u.length>0&&(n===void 0?n=u:n+="/"+u)}return n===void 0?".":o.normalize(n)},"join"),relative:e(function(n,r){if(i(n),i(r),n===r||(n=o.resolve(n),r=o.resolve(r),n===r))return"";for(var u=1;u<n.length&&n.charCodeAt(u)===47;++u);for(var p=n.length,h=p-u,d=1;d<r.length&&r.charCodeAt(d)===47;++d);for(var m=r.length,y=m-d,w=h<y?h:y,_=-1,S=0;S<=w;++S){if(S===w){if(y>w){if(r.charCodeAt(d+S)===47)return r.slice(d+S+1);if(S===0)return r.slice(d+S)}else h>w&&(n.charCodeAt(u+S)===47?_=S:S===0&&(_=0));break}var T=n.charCodeAt(u+S),O=r.charCodeAt(d+S);if(T!==O)break;T===47&&(_=S)}var E="";for(S=u+_+1;S<=p;++S)(S===p||n.charCodeAt(S)===47)&&(E.length===0?E+="..":E+="/..");return E.length>0?E+r.slice(d+_):(d+=_,r.charCodeAt(d)===47&&++d,r.slice(d))},"relative"),_makeLong:e(function(n){return n},"_makeLong"),dirname:e(function(n){if(i(n),n.length===0)return".";for(var r=n.charCodeAt(0),u=r===47,p=-1,h=!0,d=n.length-1;d>=1;--d)if(r=n.charCodeAt(d),r===47){if(!h){p=d;break}}else h=!1;return p===-1?u?"/":".":u&&p===1?"//":n.slice(0,p)},"dirname"),basename:e(function(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');i(n);var u=0,p=-1,h=!0,d;if(r!==void 0&&r.length>0&&r.length<=n.length){if(r.length===n.length&&r===n)return"";var m=r.length-1,y=-1;for(d=n.length-1;d>=0;--d){var w=n.charCodeAt(d);if(w===47){if(!h){u=d+1;break}}else y===-1&&(h=!1,y=d+1),m>=0&&(w===r.charCodeAt(m)?--m===-1&&(p=d):(m=-1,p=y))}return u===p?p=y:p===-1&&(p=n.length),n.slice(u,p)}else{for(d=n.length-1;d>=0;--d)if(n.charCodeAt(d)===47){if(!h){u=d+1;break}}else p===-1&&(h=!1,p=d+1);return p===-1?"":n.slice(u,p)}},"basename"),extname:e(function(n){i(n);for(var r=-1,u=0,p=-1,h=!0,d=0,m=n.length-1;m>=0;--m){var y=n.charCodeAt(m);if(y===47){if(!h){u=m+1;break}continue}p===-1&&(h=!1,p=m+1),y===46?r===-1?r=m:d!==1&&(d=1):r!==-1&&(d=-1)}return r===-1||p===-1||d===0||d===1&&r===p-1&&r===u+1?"":n.slice(r,p)},"extname"),format:e(function(n){if(n===null||typeof n!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof n);return g("/",n)},"format"),parse:e(function(n){i(n);var r={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return r;var u=n.charCodeAt(0),p=u===47,h;p?(r.root="/",h=1):h=0;for(var d=-1,m=0,y=-1,w=!0,_=n.length-1,S=0;_>=h;--_){if(u=n.charCodeAt(_),u===47){if(!w){m=_+1;break}continue}y===-1&&(w=!1,y=_+1),u===46?d===-1?d=_:S!==1&&(S=1):d!==-1&&(S=-1)}return d===-1||y===-1||S===0||S===1&&d===y-1&&d===m+1?y!==-1&&(m===0&&p?r.base=r.name=n.slice(1,y):r.base=r.name=n.slice(m,y)):(m===0&&p?(r.name=n.slice(1,d),r.base=n.slice(1,y)):(r.name=n.slice(m,d),r.base=n.slice(m,y)),r.ext=n.slice(d,y)),m>0?r.dir=n.slice(0,m-1):p&&(r.dir="/"),r},"parse"),sep:"/",delimiter:":",win32:null,posix:null};return o.posix=o,th=o,th}l(eF,"pZ");function tF(a){if(typeof a=="string")a=new URL(a);else if(!(a instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(a.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return ad?ZP(a):QP(a)}l(tF,"TZ");function ZP(a){let i=a.hostname,f=a.pathname;for(let g=0;g<f.length;g++)if(f[g]==="%"){let o=f.codePointAt(g+2)||32;if(f[g+1]==="2"&&o===102||f[g+1]==="5"&&o===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(f=f.replace(vj,"\\"),f=decodeURIComponent(f),i!=="")return`\\\\${i}${f}`;{let g=f.codePointAt(1)|32,o=f[2];if(g<wj||g>bj||o!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return f.slice(1)}}l(ZP,"FZ");function QP(a){if(a.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let i=a.pathname;for(let f=0;f<i.length;f++)if(i[f]==="%"){let g=i.codePointAt(f+2)||32;if(i[f+1]==="2"&&g===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(i)}l(QP,"xZ");function rF(a){let i=Av.resolve(a),f=a.charCodeAt(a.length-1);(f===mj||ad&&f===yj)&&i[i.length-1]!==Av.sep&&(i+="/");let g=new URL("file://");return i.includes("%")&&(i=i.replace(_j,"%25")),!ad&&i.includes("\\")&&(i=i.replace(Ej,"%5C")),i.includes(`
|
|
123
|
-
`)&&(i=i.replace(Sj,"%0A")),i.includes("\r")&&(i=i.replace(Aj,"%0D")),i.includes(" ")&&(i=i.replace(Rj,"%09")),g.pathname=i,g}l(rF,"OZ");function nF(a){if(typeof a=="string")a=new URL(a);else if(!(a instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(a.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return sd?XP(a):ej(a)}l(nF,"jZ");function XP(a){let i=a.hostname,f=a.pathname;for(let g=0;g<f.length;g++)if(f[g]==="%"){let o=f.codePointAt(g+2)||32;if(f[g+1]==="2"&&o===102||f[g+1]==="5"&&o===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(f=f.replace(Bj,"\\"),f=decodeURIComponent(f),i!=="")return`\\\\${i}${f}`;{let g=f.codePointAt(1)|32,o=f[2];if(g<Tj||g>Fj||o!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return f.slice(1)}}l(XP,"HZ");function ej(a){if(a.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let i=a.pathname;for(let f=0;f<i.length;f++)if(i[f]==="%"){let g=i.codePointAt(f+2)||32;if(i[f+1]==="2"&&g===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(i)}l(ej,"WZ");function iF(a){let i=Ev.resolve(a),f=a.charCodeAt(a.length-1);(f===kj||sd&&f===Oj)&&i[i.length-1]!==Ev.sep&&(i+="/");let g=new URL("file://");return i.includes("%")&&(i=i.replace(xj,"%25")),!sd&&i.includes("\\")&&(i=i.replace(Ij,"%5C")),i.includes(`
|
|
124
|
-
`)&&(i=i.replace(Pj,"%0A")),i.includes("\r")&&(i=i.replace(jj,"%0D")),i.includes(" ")&&(i=i.replace(Cj,"%09")),g.pathname=i,g}l(iF,"qZ");function qE(){if(Rv)return Dr;Rv=!0,Dr.fetch=g(Mi.fetch)&&g(Mi.ReadableStream),Dr.writableStream=g(Mi.WritableStream),Dr.abortController=g(Mi.AbortController);var a;function i(){if(a!==void 0)return a;if(Mi.XMLHttpRequest){a=new Mi.XMLHttpRequest;try{a.open("GET",Mi.XDomainRequest?"/":"https://example.com")}catch{a=null}}else a=null;return a}l(i,"t"),e(i,"getXHR");function f(o){var n=i();if(!n)return!1;try{return n.responseType=o,n.responseType===o}catch{}return!1}l(f,"r"),e(f,"checkTypeSupport"),Dr.arraybuffer=Dr.fetch||f("arraybuffer"),Dr.msstream=!Dr.fetch&&f("ms-stream"),Dr.mozchunkedarraybuffer=!Dr.fetch&&f("moz-chunked-arraybuffer"),Dr.overrideMimeType=Dr.fetch||(i()?g(i().overrideMimeType):!1);function g(o){return typeof o=="function"}return l(g,"n"),e(g,"isFunction"),a=null,Dr}l(qE,"JC");function GE(){return kv||(kv=!0,Ov=Kr.EventEmitter),Ov}l(GE,"ZC");function tj(){if(Tv)return rh;Tv=!0;function a(_,S){var T=Object.keys(_);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(_);S&&(O=O.filter(function(E){return Object.getOwnPropertyDescriptor(_,E).enumerable})),T.push.apply(T,O)}return T}l(a,"e"),e(a,"ownKeys");function i(_){for(var S=1;S<arguments.length;S++){var T=arguments[S]!=null?arguments[S]:{};S%2?a(Object(T),!0).forEach(function(O){f(_,O,T[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(_,Object.getOwnPropertyDescriptors(T)):a(Object(T)).forEach(function(O){Object.defineProperty(_,O,Object.getOwnPropertyDescriptor(T,O))})}return _}l(i,"t"),e(i,"_objectSpread");function f(_,S,T){return S=r(S),S in _?Object.defineProperty(_,S,{value:T,enumerable:!0,configurable:!0,writable:!0}):_[S]=T,_}l(f,"r"),e(f,"_defineProperty");function g(_,S){if(!(_ instanceof S))throw new TypeError("Cannot call a class as a function")}l(g,"n"),e(g,"_classCallCheck");function o(_,S){for(var T=0;T<S.length;T++){var O=S[T];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(_,r(O.key),O)}}l(o,"a"),e(o,"_defineProperties");function n(_,S,T){return S&&o(_.prototype,S),Object.defineProperty(_,"prototype",{writable:!1}),_}l(n,"s"),e(n,"_createClass");function r(_){var S=u(_,"string");return typeof S=="symbol"?S:String(S)}l(r,"i"),e(r,"_toPropertyKey");function u(_,S){if(typeof _!="object"||_===null)return _;var T=_[Symbol.toPrimitive];if(T!==void 0){var O=T.call(_,S||"default");if(typeof O!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(_)}l(u,"f"),e(u,"_toPrimitive");var p=xa(),h=p.Buffer,d=Xe,m=d.inspect,y=m&&m.custom||"inspect";function w(_,S,T){h.prototype.copy.call(_,S,T)}return l(w,"g"),e(w,"copyBuffer"),rh=function(){function _(){g(this,_),this.head=null,this.tail=null,this.length=0}return l(_,"v"),e(_,"BufferList"),n(_,[{key:"push",value:e(function(S){var T={data:S,next:null};this.length>0?this.tail.next=T:this.head=T,this.tail=T,++this.length},"push")},{key:"unshift",value:e(function(S){var T={data:S,next:this.head};this.length===0&&(this.tail=T),this.head=T,++this.length},"unshift")},{key:"shift",value:e(function(){if(this.length!==0){var S=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,S}},"shift")},{key:"clear",value:e(function(){this.head=this.tail=null,this.length=0},"clear")},{key:"join",value:e(function(S){if(this.length===0)return"";for(var T=this.head,O=""+T.data;T=T.next;)O+=S+T.data;return O},"join")},{key:"concat",value:e(function(S){if(this.length===0)return h.alloc(0);for(var T=h.allocUnsafe(S>>>0),O=this.head,E=0;O;)w(O.data,T,E),E+=O.data.length,O=O.next;return T},"concat")},{key:"consume",value:e(function(S,T){var O;return S<this.head.data.length?(O=this.head.data.slice(0,S),this.head.data=this.head.data.slice(S)):S===this.head.data.length?O=this.shift():O=T?this._getString(S):this._getBuffer(S),O},"consume")},{key:"first",value:e(function(){return this.head.data},"first")},{key:"_getString",value:e(function(S){var T=this.head,O=1,E=T.data;for(S-=E.length;T=T.next;){var P=T.data,A=S>P.length?P.length:S;if(A===P.length?E+=P:E+=P.slice(0,S),S-=A,S===0){A===P.length?(++O,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=P.slice(A));break}++O}return this.length-=O,E},"_getString")},{key:"_getBuffer",value:e(function(S){var T=h.allocUnsafe(S),O=this.head,E=1;for(O.data.copy(T),S-=O.data.length;O=O.next;){var P=O.data,A=S>P.length?P.length:S;if(P.copy(T,T.length-S,0,A),S-=A,S===0){A===P.length?(++E,O.next?this.head=O.next:this.head=this.tail=null):(this.head=O,O.data=P.slice(A));break}++E}return this.length-=E,T},"_getBuffer")},{key:y,value:e(function(S,T){return m(this,i(i({},T),{},{depth:0,customInspect:!1}))},"value")}]),_}(),rh}l(tj,"zZ");function VE(){if(Fv)return nh;Fv=!0;var a=bi;function i(u,p){var h=this,d=this._readableState&&this._readableState.destroyed,m=this._writableState&&this._writableState.destroyed;return d||m?(p?p(u):u&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,a.nextTick(n,this,u)):a.nextTick(n,this,u)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(u||null,function(y){!p&&y?h._writableState?h._writableState.errorEmitted?a.nextTick(g,h):(h._writableState.errorEmitted=!0,a.nextTick(f,h,y)):a.nextTick(f,h,y):p?(a.nextTick(g,h),p(y)):a.nextTick(g,h)}),this)}l(i,"t"),e(i,"destroy");function f(u,p){n(u,p),g(u)}l(f,"r"),e(f,"emitErrorAndCloseNT");function g(u){u._writableState&&!u._writableState.emitClose||u._readableState&&!u._readableState.emitClose||u.emit("close")}l(g,"n"),e(g,"emitCloseNT");function o(){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)}l(o,"a"),e(o,"undestroy");function n(u,p){u.emit("error",p)}l(n,"s"),e(n,"emitErrorNT");function r(u,p){var h=u._readableState,d=u._writableState;h&&h.autoDestroy||d&&d.autoDestroy?u.destroy(p):u.emit("error",p)}return l(r,"i"),e(r,"errorOrDestroy"),nh={destroy:i,undestroy:o,errorOrDestroy:r},nh}l(VE,"QC");function Ia(){if(Bv)return ih;Bv=!0;let a={};function i(r,u,p){var y;p||(p=Error);function h(w,_,S){return typeof u=="string"?u:u(w,_,S)}l(h,"c"),e(h,"getMessage");let d=(y=class extends p{constructor(_,S,T){super(h(_,S,T))}},l(y,"y"),y);e(d,"NodeError");let m=d;m.prototype.name=p.name,m.prototype.code=r,a[r]=m}l(i,"t"),e(i,"createErrorType");function f(r,u){if(Array.isArray(r)){let p=r.length;return r=r.map(h=>String(h)),p>2?`one of ${u} ${r.slice(0,p-1).join(", ")}, or `+r[p-1]:p===2?`one of ${u} ${r[0]} or ${r[1]}`:`of ${u} ${r[0]}`}else return`of ${u} ${String(r)}`}l(f,"r"),e(f,"oneOf");function g(r,u,p){return r.substr(0,u.length)===u}l(g,"n"),e(g,"startsWith");function o(r,u,p){return(p===void 0||p>r.length)&&(p=r.length),r.substring(p-u.length,p)===u}l(o,"a"),e(o,"endsWith");function n(r,u,p){return typeof p!="number"&&(p=0),p+u.length>r.length?!1:r.indexOf(u,p)!==-1}return l(n,"s"),e(n,"includes"),i("ERR_INVALID_OPT_VALUE",function(r,u){return'The value "'+u+'" is invalid for option "'+r+'"'},TypeError),i("ERR_INVALID_ARG_TYPE",function(r,u,p){let h;typeof u=="string"&&g(u,"not ")?(h="must not be",u=u.replace(/^not /,"")):h="must be";let d;if(o(r," argument"))d=`The ${r} ${h} ${f(u,"type")}`;else{let m=n(r,".")?"property":"argument";d=`The "${r}" ${m} ${h} ${f(u,"type")}`}return d+=`. Received type ${typeof p}`,d},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(r){return"The "+r+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(r){return"Cannot call "+r+" after a stream was destroyed"}),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",function(r){return"Unknown encoding: "+r},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),ih.codes=a,ih}l(Ia,"al");function KE(){if(xv)return oh;xv=!0;var a=Ia().codes.ERR_INVALID_OPT_VALUE;function i(g,o,n){return g.highWaterMark!=null?g.highWaterMark:o?g[n]:null}l(i,"t"),e(i,"highWaterMarkFrom");function f(g,o,n,r){var u=i(o,r,n);if(u!=null){if(!(isFinite(u)&&Math.floor(u)===u)||u<0){var p=r?n:"highWaterMark";throw new a(p,u)}return Math.floor(u)}return g.objectMode?16:16*1024}return l(f,"r"),e(f,"getHighWaterMark"),oh={getHighWaterMark:f},oh}l(KE,"eL");function JE(){if(Iv)return ah;Iv=!0;var a=bi;ah=V;function i(Y){var H=this;this.next=null,this.entry=null,this.finish=function(){De(H,Y)}}l(i,"t"),e(i,"CorkedRequest");var f;V.WritableState=M;var g={deprecate:JP()},o=GE(),n=xa().Buffer,r=(typeof Pv<"u"?Pv:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function u(Y){return n.from(Y)}l(u,"f"),e(u,"_uint8ArrayToBuffer");function p(Y){return n.isBuffer(Y)||Y instanceof r}l(p,"h"),e(p,"_isUint8Array");var h=VE(),d=KE(),m=d.getHighWaterMark,y=Ia().codes,w=y.ERR_INVALID_ARG_TYPE,_=y.ERR_METHOD_NOT_IMPLEMENTED,S=y.ERR_MULTIPLE_CALLBACK,T=y.ERR_STREAM_CANNOT_PIPE,O=y.ERR_STREAM_DESTROYED,E=y.ERR_STREAM_NULL_VALUES,P=y.ERR_STREAM_WRITE_AFTER_END,A=y.ERR_UNKNOWN_ENCODING,x=h.errorOrDestroy;Ki()(V,o);function U(){}l(U,"B"),e(U,"nop");function M(Y,H,Q){f=f||Ra(),Y=Y||{},typeof Q!="boolean"&&(Q=H instanceof f),this.objectMode=!!Y.objectMode,Q&&(this.objectMode=this.objectMode||!!Y.writableObjectMode),this.highWaterMark=m(this,Y,"writableHighWaterMark",Q),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var fe=Y.decodeStrings===!1;this.decodeStrings=!fe,this.defaultEncoding=Y.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ve){Pe(H,ve)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Y.emitClose!==!1,this.autoDestroy=!!Y.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}l(M,"P"),e(M,"WritableState"),M.prototype.getBuffer=e(function(){for(var Y=this.bufferedRequest,H=[];Y;)H.push(Y),Y=Y.next;return H},"getBuffer"),function(){try{Object.defineProperty(M.prototype,"buffer",{get:g.deprecate(e(function(){return this.getBuffer()},"writableStateBufferGetter"),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var ee;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ee=Function.prototype[Symbol.hasInstance],Object.defineProperty(V,Symbol.hasInstance,{value:e(function(Y){return ee.call(this,Y)?!0:this!==V?!1:Y&&Y._writableState instanceof M},"value")})):ee=e(function(Y){return Y instanceof this},"realHasInstance2");function V(Y){f=f||Ra();var H=this instanceof f;if(!H&&!ee.call(V,this))return new V(Y);this._writableState=new M(Y,this,H),this.writable=!0,Y&&(typeof Y.write=="function"&&(this._write=Y.write),typeof Y.writev=="function"&&(this._writev=Y.writev),typeof Y.destroy=="function"&&(this._destroy=Y.destroy),typeof Y.final=="function"&&(this._final=Y.final)),o.call(this)}l(V,"L"),e(V,"Writable"),V.prototype.pipe=function(){x(this,new T)};function q(Y,H){var Q=new P;x(Y,Q),a.nextTick(H,Q)}l(q,"C"),e(q,"writeAfterEnd");function G(Y,H,Q,fe){var ve;return Q===null?ve=new E:typeof Q!="string"&&!H.objectMode&&(ve=new w("chunk",["string","Buffer"],Q)),ve?(x(Y,ve),a.nextTick(fe,ve),!1):!0}l(G,"j"),e(G,"validChunk"),V.prototype.write=function(Y,H,Q){var fe=this._writableState,ve=!1,N=!fe.objectMode&&p(Y);return N&&!n.isBuffer(Y)&&(Y=u(Y)),typeof H=="function"&&(Q=H,H=null),N?H="buffer":H||(H=fe.defaultEncoding),typeof Q!="function"&&(Q=U),fe.ending?q(this,Q):(N||G(this,fe,Y,Q))&&(fe.pendingcb++,ve=ae(this,fe,N,Y,H,Q)),ve},V.prototype.cork=function(){this._writableState.corked++},V.prototype.uncork=function(){var Y=this._writableState;Y.corked&&(Y.corked--,!Y.writing&&!Y.corked&&!Y.bufferProcessing&&Y.bufferedRequest&&J(this,Y))},V.prototype.setDefaultEncoding=e(function(Y){if(typeof Y=="string"&&(Y=Y.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Y+"").toLowerCase())>-1))throw new A(Y);return this._writableState.defaultEncoding=Y,this},"setDefaultEncoding"),Object.defineProperty(V.prototype,"writableBuffer",{enumerable:!1,get:e(function(){return this._writableState&&this._writableState.getBuffer()},"get2")});function re(Y,H,Q){return!Y.objectMode&&Y.decodeStrings!==!1&&typeof H=="string"&&(H=n.from(H,Q)),H}l(re,"q"),e(re,"decodeChunk"),Object.defineProperty(V.prototype,"writableHighWaterMark",{enumerable:!1,get:e(function(){return this._writableState.highWaterMark},"get2")});function ae(Y,H,Q,fe,ve,N){if(!Q){var I=re(H,fe,ve);fe!==I&&(Q=!0,ve="buffer",fe=I)}var D=H.objectMode?1:fe.length;H.length+=D;var z=H.length<H.highWaterMark;if(z||(H.needDrain=!0),H.writing||H.corked){var Ee=H.lastBufferedRequest;H.lastBufferedRequest={chunk:fe,encoding:ve,isBuf:Q,callback:N,next:null},Ee?Ee.next=H.lastBufferedRequest:H.bufferedRequest=H.lastBufferedRequest,H.bufferedRequestCount+=1}else de(Y,H,!1,D,fe,ve,N);return z}l(ae,"Z"),e(ae,"writeOrBuffer");function de(Y,H,Q,fe,ve,N,I){H.writelen=fe,H.writecb=I,H.writing=!0,H.sync=!0,H.destroyed?H.onwrite(new O("write")):Q?Y._writev(ve,H.onwrite):Y._write(ve,N,H.onwrite),H.sync=!1}l(de,"K"),e(de,"doWrite");function we(Y,H,Q,fe,ve){--H.pendingcb,Q?(a.nextTick(ve,fe),a.nextTick(ye,Y,H),Y._writableState.errorEmitted=!0,x(Y,fe)):(ve(fe),Y._writableState.errorEmitted=!0,x(Y,fe),ye(Y,H))}l(we,"se"),e(we,"onwriteError");function xe(Y){Y.writing=!1,Y.writecb=null,Y.length-=Y.writelen,Y.writelen=0}l(xe,"_e"),e(xe,"onwriteStateUpdate");function Pe(Y,H){var Q=Y._writableState,fe=Q.sync,ve=Q.writecb;if(typeof ve!="function")throw new S;if(xe(Q),H)we(Y,Q,fe,H,ve);else{var N=ue(Q)||Y.destroyed;!N&&!Q.corked&&!Q.bufferProcessing&&Q.bufferedRequest&&J(Y,Q),fe?a.nextTick(se,Y,Q,N,ve):se(Y,Q,N,ve)}}l(Pe,"pe"),e(Pe,"onwrite");function se(Y,H,Q,fe){Q||Te(Y,H),H.pendingcb--,fe(),ye(Y,H)}l(se,"Q"),e(se,"afterWrite");function Te(Y,H){H.length===0&&H.needDrain&&(H.needDrain=!1,Y.emit("drain"))}l(Te,"he"),e(Te,"onwriteDrain");function J(Y,H){H.bufferProcessing=!0;var Q=H.bufferedRequest;if(Y._writev&&Q&&Q.next){var fe=H.bufferedRequestCount,ve=new Array(fe),N=H.corkedRequestsFree;N.entry=Q;for(var I=0,D=!0;Q;)ve[I]=Q,Q.isBuf||(D=!1),Q=Q.next,I+=1;ve.allBuffers=D,de(Y,H,!0,H.length,ve,"",N.finish),H.pendingcb++,H.lastBufferedRequest=null,N.next?(H.corkedRequestsFree=N.next,N.next=null):H.corkedRequestsFree=new i(H),H.bufferedRequestCount=0}else{for(;Q;){var z=Q.chunk,Ee=Q.encoding,Oe=Q.callback,be=H.objectMode?1:z.length;if(de(Y,H,!1,be,z,Ee,Oe),Q=Q.next,H.bufferedRequestCount--,H.writing)break}Q===null&&(H.lastBufferedRequest=null)}H.bufferedRequest=Q,H.bufferProcessing=!1}l(J,"U"),e(J,"clearBuffer"),V.prototype._write=function(Y,H,Q){Q(new _("_write()"))},V.prototype._writev=null,V.prototype.end=function(Y,H,Q){var fe=this._writableState;return typeof Y=="function"?(Q=Y,Y=null,H=null):typeof H=="function"&&(Q=H,H=null),Y!=null&&this.write(Y,H),fe.corked&&(fe.corked=1,this.uncork()),fe.ending||Re(this,fe,Q),this},Object.defineProperty(V.prototype,"writableLength",{enumerable:!1,get:e(function(){return this._writableState.length},"get2")});function ue(Y){return Y.ending&&Y.length===0&&Y.bufferedRequest===null&&!Y.finished&&!Y.writing}l(ue,"J"),e(ue,"needFinish");function te(Y,H){Y._final(function(Q){H.pendingcb--,Q&&x(Y,Q),H.prefinished=!0,Y.emit("prefinish"),ye(Y,H)})}l(te,"z"),e(te,"callFinal");function X(Y,H){!H.prefinished&&!H.finalCalled&&(typeof Y._final=="function"&&!H.destroyed?(H.pendingcb++,H.finalCalled=!0,a.nextTick(te,Y,H)):(H.prefinished=!0,Y.emit("prefinish")))}l(X,"V"),e(X,"prefinish");function ye(Y,H){var Q=ue(H);if(Q&&(X(Y,H),H.pendingcb===0&&(H.finished=!0,Y.emit("finish"),H.autoDestroy))){var fe=Y._readableState;(!fe||fe.autoDestroy&&fe.endEmitted)&&Y.destroy()}return Q}l(ye,"G"),e(ye,"finishMaybe");function Re(Y,H,Q){H.ending=!0,ye(Y,H),Q&&(H.finished?a.nextTick(Q):Y.once("finish",Q)),H.ended=!0,Y.writable=!1}l(Re,"fe"),e(Re,"endWritable");function De(Y,H,Q){var fe=Y.entry;for(Y.entry=null;fe;){var ve=fe.callback;H.pendingcb--,ve(Q),fe=fe.next}H.corkedRequestsFree.next=Y}return l(De,"be"),e(De,"onCorkedFinish"),Object.defineProperty(V.prototype,"destroyed",{enumerable:!1,get:e(function(){return this._writableState===void 0?!1:this._writableState.destroyed},"get2"),set:e(function(Y){this._writableState&&(this._writableState.destroyed=Y)},"set")}),V.prototype.destroy=h.destroy,V.prototype._undestroy=h.undestroy,V.prototype._destroy=function(Y,H){H(Y)},ah}l(JE,"tL");function Ra(){if(jv)return sh;jv=!0;var a=bi,i=Object.keys||function(d){var m=[];for(var y in d)m.push(y);return m};sh=u;var f=YE(),g=JE();Ki()(u,f);for(var o=i(g.prototype),n=0;n<o.length;n++){var r=o[n];u.prototype[r]||(u.prototype[r]=g.prototype[r])}function u(d){if(!(this instanceof u))return new u(d);f.call(this,d),g.call(this,d),this.allowHalfOpen=!0,d&&(d.readable===!1&&(this.readable=!1),d.writable===!1&&(this.writable=!1),d.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",p)))}l(u,"f"),e(u,"Duplex"),Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:e(function(){return this._writableState.highWaterMark},"get2")}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:e(function(){return this._writableState&&this._writableState.getBuffer()},"get2")}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:e(function(){return this._writableState.length},"get2")});function p(){this._writableState.ended||a.nextTick(h,this)}l(p,"h"),e(p,"onend");function h(d){d.end()}return l(h,"c"),e(h,"onEndNT"),Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:e(function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},"get2"),set:e(function(d){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=d,this._writableState.destroyed=d)},"set")}),sh}l(Ra,"nl");function Id(){if(Cv)return lh;Cv=!0;var a=Ia().codes.ERR_STREAM_PREMATURE_CLOSE;function i(n){var r=!1;return function(){if(!r){r=!0;for(var u=arguments.length,p=new Array(u),h=0;h<u;h++)p[h]=arguments[h];n.apply(this,p)}}}l(i,"t"),e(i,"once2");function f(){}l(f,"r"),e(f,"noop2");function g(n){return n.setHeader&&typeof n.abort=="function"}l(g,"n"),e(g,"isRequest");function o(n,r,u){if(typeof r=="function")return o(n,null,r);r||(r={}),u=i(u||f);var p=r.readable||r.readable!==!1&&n.readable,h=r.writable||r.writable!==!1&&n.writable,d=e(function(){n.writable||y()},"onlegacyfinish2"),m=n._writableState&&n._writableState.finished,y=e(function(){h=!1,m=!0,p||u.call(n)},"onfinish2"),w=n._readableState&&n._readableState.endEmitted,_=e(function(){p=!1,w=!0,h||u.call(n)},"onend2"),S=e(function(E){u.call(n,E)},"onerror2"),T=e(function(){var E;if(p&&!w)return(!n._readableState||!n._readableState.ended)&&(E=new a),u.call(n,E);if(h&&!m)return(!n._writableState||!n._writableState.ended)&&(E=new a),u.call(n,E)},"onclose2"),O=e(function(){n.req.on("finish",y)},"onrequest2");return g(n)?(n.on("complete",y),n.on("abort",T),n.req?O():n.on("request",O)):h&&!n._writableState&&(n.on("end",d),n.on("close",d)),n.on("end",_),n.on("finish",y),r.error!==!1&&n.on("error",S),n.on("close",T),function(){n.removeListener("complete",y),n.removeListener("abort",T),n.removeListener("request",O),n.req&&n.req.removeListener("finish",y),n.removeListener("end",d),n.removeListener("close",d),n.removeListener("finish",y),n.removeListener("end",_),n.removeListener("error",S),n.removeListener("close",T)}}return l(o,"a"),e(o,"eos"),lh=o,lh}l(Id,"Bb");function rj(){if(Lv)return fh;Lv=!0;var a=bi,i;function f(A,x,U){return x=g(x),x in A?Object.defineProperty(A,x,{value:U,enumerable:!0,configurable:!0,writable:!0}):A[x]=U,A}l(f,"r"),e(f,"_defineProperty");function g(A){var x=o(A,"string");return typeof x=="symbol"?x:String(x)}l(g,"n"),e(g,"_toPropertyKey");function o(A,x){if(typeof A!="object"||A===null)return A;var U=A[Symbol.toPrimitive];if(U!==void 0){var M=U.call(A,x||"default");if(typeof M!="object")return M;throw new TypeError("@@toPrimitive must return a primitive value.")}return(x==="string"?String:Number)(A)}l(o,"a"),e(o,"_toPrimitive");var n=Id(),r=Symbol("lastResolve"),u=Symbol("lastReject"),p=Symbol("error"),h=Symbol("ended"),d=Symbol("lastPromise"),m=Symbol("handlePromise"),y=Symbol("stream");function w(A,x){return{value:A,done:x}}l(w,"g"),e(w,"createIterResult2");function _(A){var x=A[r];if(x!==null){var U=A[y].read();U!==null&&(A[d]=null,A[r]=null,A[u]=null,x(w(U,!1)))}}l(_,"v"),e(_,"readAndResolve");function S(A){a.nextTick(_,A)}l(S,"_"),e(S,"onReadable");function T(A,x){return function(U,M){A.then(function(){if(x[h]){U(w(void 0,!0));return}x[m](U,M)},M)}}l(T,"b"),e(T,"wrapForNext");var O=Object.getPrototypeOf(function(){}),E=Object.setPrototypeOf((i={get stream(){return this[y]},next:e(function(){var A=this,x=this[p];if(x!==null)return Promise.reject(x);if(this[h])return Promise.resolve(w(void 0,!0));if(this[y].destroyed)return new Promise(function(V,q){a.nextTick(function(){A[p]?q(A[p]):V(w(void 0,!0))})});var U=this[d],M;if(U)M=new Promise(T(U,this));else{var ee=this[y].read();if(ee!==null)return Promise.resolve(w(ee,!1));M=new Promise(this[m])}return this[d]=M,M},"next")},f(i,Symbol.asyncIterator,function(){return this}),f(i,"return",e(function(){var A=this;return new Promise(function(x,U){A[y].destroy(null,function(M){if(M){U(M);return}x(w(void 0,!0))})})},"_return")),i),O),P=e(function(A){var x,U=Object.create(E,(x={},f(x,y,{value:A,writable:!0}),f(x,r,{value:null,writable:!0}),f(x,u,{value:null,writable:!0}),f(x,p,{value:null,writable:!0}),f(x,h,{value:A._readableState.endEmitted,writable:!0}),f(x,m,{value:e(function(M,ee){var V=U[y].read();V?(U[d]=null,U[r]=null,U[u]=null,M(w(V,!1))):(U[r]=M,U[u]=ee)},"value"),writable:!0}),x));return U[d]=null,n(A,function(M){if(M&&M.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ee=U[u];ee!==null&&(U[d]=null,U[r]=null,U[u]=null,ee(M)),U[p]=M;return}var V=U[r];V!==null&&(U[d]=null,U[r]=null,U[u]=null,V(w(void 0,!0))),U[h]=!0}),A.on("readable",S.bind(null,U)),U},"createReadableStreamAsyncIterator2");return fh=P,fh}l(rj,"VZ");function nj(){return Dv||(Dv=!0,Nv=e(function(){throw new Error("Readable.from is not available in the browser")},"exports$b")),Nv}l(nj,"GZ");function YE(){if(Uv)return uh;Uv=!0;var a=bi;uh=q;var i;q.ReadableState=V,Kr.EventEmitter;var f=e(function(N,I){return N.listeners(I).length},"EElistenerCount2"),g=GE(),o=xa().Buffer,n=(typeof Mv<"u"?Mv:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function r(N){return o.from(N)}l(r,"i"),e(r,"_uint8ArrayToBuffer");function u(N){return o.isBuffer(N)||N instanceof n}l(u,"f"),e(u,"_isUint8Array");var p=Xe,h;p&&p.debuglog?h=p.debuglog("stream"):h=e(function(){},"debug2");var d=tj(),m=VE(),y=KE(),w=y.getHighWaterMark,_=Ia().codes,S=_.ERR_INVALID_ARG_TYPE,T=_.ERR_STREAM_PUSH_AFTER_EOF,O=_.ERR_METHOD_NOT_IMPLEMENTED,E=_.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,P,A,x;Ki()(q,g);var U=m.errorOrDestroy,M=["error","close","destroy","pause","resume"];function ee(N,I,D){if(typeof N.prependListener=="function")return N.prependListener(I,D);!N._events||!N._events[I]?N.on(I,D):Array.isArray(N._events[I])?N._events[I].unshift(D):N._events[I]=[D,N._events[I]]}l(ee,"N"),e(ee,"prependListener2");function V(N,I,D){i=i||Ra(),N=N||{},typeof D!="boolean"&&(D=I instanceof i),this.objectMode=!!N.objectMode,D&&(this.objectMode=this.objectMode||!!N.readableObjectMode),this.highWaterMark=w(this,N,"readableHighWaterMark",D),this.buffer=new d,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=N.emitClose!==!1,this.autoDestroy=!!N.autoDestroy,this.destroyed=!1,this.defaultEncoding=N.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,N.encoding&&(P||(P=ef.StringDecoder),this.decoder=new P(N.encoding),this.encoding=N.encoding)}l(V,"L"),e(V,"ReadableState");function q(N){if(i=i||Ra(),!(this instanceof q))return new q(N);var I=this instanceof i;this._readableState=new V(N,this,I),this.readable=!0,N&&(typeof N.read=="function"&&(this._read=N.read),typeof N.destroy=="function"&&(this._destroy=N.destroy)),g.call(this)}l(q,"C"),e(q,"Readable"),Object.defineProperty(q.prototype,"destroyed",{enumerable:!1,get:e(function(){return this._readableState===void 0?!1:this._readableState.destroyed},"get2"),set:e(function(N){this._readableState&&(this._readableState.destroyed=N)},"set")}),q.prototype.destroy=m.destroy,q.prototype._undestroy=m.undestroy,q.prototype._destroy=function(N,I){I(N)},q.prototype.push=function(N,I){var D=this._readableState,z;return D.objectMode?z=!0:typeof N=="string"&&(I=I||D.defaultEncoding,I!==D.encoding&&(N=o.from(N,I),I=""),z=!0),G(this,N,I,!1,z)},q.prototype.unshift=function(N){return G(this,N,null,!0,!1)};function G(N,I,D,z,Ee){h("readableAddChunk",I);var Oe=N._readableState;if(I===null)Oe.reading=!1,Pe(N,Oe);else{var be;if(Ee||(be=ae(Oe,I)),be)U(N,be);else if(Oe.objectMode||I&&I.length>0)if(typeof I!="string"&&!Oe.objectMode&&Object.getPrototypeOf(I)!==o.prototype&&(I=r(I)),z)Oe.endEmitted?U(N,new E):re(N,Oe,I,!0);else if(Oe.ended)U(N,new T);else{if(Oe.destroyed)return!1;Oe.reading=!1,Oe.decoder&&!D?(I=Oe.decoder.write(I),Oe.objectMode||I.length!==0?re(N,Oe,I,!1):J(N,Oe)):re(N,Oe,I,!1)}else z||(Oe.reading=!1,J(N,Oe))}return!Oe.ended&&(Oe.length<Oe.highWaterMark||Oe.length===0)}l(G,"j"),e(G,"readableAddChunk");function re(N,I,D,z){I.flowing&&I.length===0&&!I.sync?(I.awaitDrain=0,N.emit("data",D)):(I.length+=I.objectMode?1:D.length,z?I.buffer.unshift(D):I.buffer.push(D),I.needReadable&&se(N)),J(N,I)}l(re,"q"),e(re,"addChunk");function ae(N,I){var D;return!u(I)&&typeof I!="string"&&I!==void 0&&!N.objectMode&&(D=new S("chunk",["string","Buffer","Uint8Array"],I)),D}l(ae,"Z"),e(ae,"chunkInvalid"),q.prototype.isPaused=function(){return this._readableState.flowing===!1},q.prototype.setEncoding=function(N){P||(P=ef.StringDecoder);var I=new P(N);this._readableState.decoder=I,this._readableState.encoding=this._readableState.decoder.encoding;for(var D=this._readableState.buffer.head,z="";D!==null;)z+=I.write(D.data),D=D.next;return this._readableState.buffer.clear(),z!==""&&this._readableState.buffer.push(z),this._readableState.length=z.length,this};var de=1073741824;function we(N){return N>=de?N=de:(N--,N|=N>>>1,N|=N>>>2,N|=N>>>4,N|=N>>>8,N|=N>>>16,N++),N}l(we,"se"),e(we,"computeNewHighWaterMark");function xe(N,I){return N<=0||I.length===0&&I.ended?0:I.objectMode?1:N!==N?I.flowing&&I.length?I.buffer.head.data.length:I.length:(N>I.highWaterMark&&(I.highWaterMark=we(N)),N<=I.length?N:I.ended?I.length:(I.needReadable=!0,0))}l(xe,"_e"),e(xe,"howMuchToRead"),q.prototype.read=function(N){h("read",N),N=parseInt(N,10);var I=this._readableState,D=N;if(N!==0&&(I.emittedReadable=!1),N===0&&I.needReadable&&((I.highWaterMark!==0?I.length>=I.highWaterMark:I.length>0)||I.ended))return h("read: emitReadable",I.length,I.ended),I.length===0&&I.ended?Q(this):se(this),null;if(N=xe(N,I),N===0&&I.ended)return I.length===0&&Q(this),null;var z=I.needReadable;h("need readable",z),(I.length===0||I.length-N<I.highWaterMark)&&(z=!0,h("length less than watermark",z)),I.ended||I.reading?(z=!1,h("reading or ended",z)):z&&(h("do read"),I.reading=!0,I.sync=!0,I.length===0&&(I.needReadable=!0),this._read(I.highWaterMark),I.sync=!1,I.reading||(N=xe(D,I)));var Ee;return N>0?Ee=H(N,I):Ee=null,Ee===null?(I.needReadable=I.length<=I.highWaterMark,N=0):(I.length-=N,I.awaitDrain=0),I.length===0&&(I.ended||(I.needReadable=!0),D!==N&&I.ended&&Q(this)),Ee!==null&&this.emit("data",Ee),Ee};function Pe(N,I){if(h("onEofChunk"),!I.ended){if(I.decoder){var D=I.decoder.end();D&&D.length&&(I.buffer.push(D),I.length+=I.objectMode?1:D.length)}I.ended=!0,I.sync?se(N):(I.needReadable=!1,I.emittedReadable||(I.emittedReadable=!0,Te(N)))}}l(Pe,"pe"),e(Pe,"onEofChunk");function se(N){var I=N._readableState;h("emitReadable",I.needReadable,I.emittedReadable),I.needReadable=!1,I.emittedReadable||(h("emitReadable",I.flowing),I.emittedReadable=!0,a.nextTick(Te,N))}l(se,"Q"),e(se,"emitReadable");function Te(N){var I=N._readableState;h("emitReadable_",I.destroyed,I.length,I.ended),!I.destroyed&&(I.length||I.ended)&&(N.emit("readable"),I.emittedReadable=!1),I.needReadable=!I.flowing&&!I.ended&&I.length<=I.highWaterMark,Y(N)}l(Te,"he"),e(Te,"emitReadable_");function J(N,I){I.readingMore||(I.readingMore=!0,a.nextTick(ue,N,I))}l(J,"U"),e(J,"maybeReadMore");function ue(N,I){for(;!I.reading&&!I.ended&&(I.length<I.highWaterMark||I.flowing&&I.length===0);){var D=I.length;if(h("maybeReadMore read 0"),N.read(0),D===I.length)break}I.readingMore=!1}l(ue,"J"),e(ue,"maybeReadMore_"),q.prototype._read=function(N){U(this,new O("_read()"))},q.prototype.pipe=function(N,I){var D=this,z=this._readableState;switch(z.pipesCount){case 0:z.pipes=N;break;case 1:z.pipes=[z.pipes,N];break;default:z.pipes.push(N);break}z.pipesCount+=1,h("pipe count=%d opts=%j",z.pipesCount,I);var Ee=(!I||I.end!==!1)&&N!==a.stdout&&N!==a.stderr,Oe=Ee?ge:s;z.endEmitted?a.nextTick(Oe):D.once("end",Oe),N.on("unpipe",be);function be(c,v){h("onunpipe"),c===D&&v&&v.hasUnpiped===!1&&(v.hasUnpiped=!0,ke())}l(be,"ee"),e(be,"onunpipe");function ge(){h("onend"),N.end()}l(ge,"ie"),e(ge,"onend");var Ne=te(D);N.on("drain",Ne);var Ie=!1;function ke(){h("cleanup"),N.removeListener("close",Ke),N.removeListener("finish",t),N.removeListener("drain",Ne),N.removeListener("error",$e),N.removeListener("unpipe",be),D.removeListener("end",ge),D.removeListener("end",s),D.removeListener("data",Ce),Ie=!0,z.awaitDrain&&(!N._writableState||N._writableState.needDrain)&&Ne()}l(ke,"ve"),e(ke,"cleanup"),D.on("data",Ce);function Ce(c){h("ondata");var v=N.write(c);h("dest.write",v),v===!1&&((z.pipesCount===1&&z.pipes===N||z.pipesCount>1&&ve(z.pipes,N)!==-1)&&!Ie&&(h("false write response, pause",z.awaitDrain),z.awaitDrain++),D.pause())}l(Ce,"Me"),e(Ce,"ondata");function $e(c){h("onerror",c),s(),N.removeListener("error",$e),f(N,"error")===0&&U(N,c)}l($e,"Be"),e($e,"onerror"),ee(N,"error",$e);function Ke(){N.removeListener("finish",t),s()}l(Ke,"Je"),e(Ke,"onclose"),N.once("close",Ke);function t(){h("onfinish"),N.removeListener("close",Ke),s()}l(t,"p"),e(t,"onfinish"),N.once("finish",t);function s(){h("unpipe"),D.unpipe(N)}return l(s,"l"),e(s,"unpipe"),N.emit("pipe",D),z.flowing||(h("pipe resume"),D.resume()),N};function te(N){return e(function(){var I=N._readableState;h("pipeOnDrain",I.awaitDrain),I.awaitDrain&&I.awaitDrain--,I.awaitDrain===0&&f(N,"data")&&(I.flowing=!0,Y(N))},"pipeOnDrainFunctionResult")}l(te,"z"),e(te,"pipeOnDrain"),q.prototype.unpipe=function(N){var I=this._readableState,D={hasUnpiped:!1};if(I.pipesCount===0)return this;if(I.pipesCount===1)return N&&N!==I.pipes?this:(N||(N=I.pipes),I.pipes=null,I.pipesCount=0,I.flowing=!1,N&&N.emit("unpipe",this,D),this);if(!N){var z=I.pipes,Ee=I.pipesCount;I.pipes=null,I.pipesCount=0,I.flowing=!1;for(var Oe=0;Oe<Ee;Oe++)z[Oe].emit("unpipe",this,{hasUnpiped:!1});return this}var be=ve(I.pipes,N);return be===-1?this:(I.pipes.splice(be,1),I.pipesCount-=1,I.pipesCount===1&&(I.pipes=I.pipes[0]),N.emit("unpipe",this,D),this)},q.prototype.on=function(N,I){var D=g.prototype.on.call(this,N,I),z=this._readableState;return N==="data"?(z.readableListening=this.listenerCount("readable")>0,z.flowing!==!1&&this.resume()):N==="readable"&&!z.endEmitted&&!z.readableListening&&(z.readableListening=z.needReadable=!0,z.flowing=!1,z.emittedReadable=!1,h("on readable",z.length,z.reading),z.length?se(this):z.reading||a.nextTick(ye,this)),D},q.prototype.addListener=q.prototype.on,q.prototype.removeListener=function(N,I){var D=g.prototype.removeListener.call(this,N,I);return N==="readable"&&a.nextTick(X,this),D},q.prototype.removeAllListeners=function(N){var I=g.prototype.removeAllListeners.apply(this,arguments);return(N==="readable"||N===void 0)&&a.nextTick(X,this),I};function X(N){var I=N._readableState;I.readableListening=N.listenerCount("readable")>0,I.resumeScheduled&&!I.paused?I.flowing=!0:N.listenerCount("data")>0&&N.resume()}l(X,"V"),e(X,"updateReadableListening");function ye(N){h("readable nexttick read 0"),N.read(0)}l(ye,"G"),e(ye,"nReadingNextTick"),q.prototype.resume=function(){var N=this._readableState;return N.flowing||(h("resume"),N.flowing=!N.readableListening,Re(this,N)),N.paused=!1,this};function Re(N,I){I.resumeScheduled||(I.resumeScheduled=!0,a.nextTick(De,N,I))}l(Re,"fe"),e(Re,"resume");function De(N,I){h("resume",I.reading),I.reading||N.read(0),I.resumeScheduled=!1,N.emit("resume"),Y(N),I.flowing&&!I.reading&&N.read(0)}l(De,"be"),e(De,"resume_"),q.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Y(N){var I=N._readableState;for(h("flow",I.flowing);I.flowing&&N.read()!==null;);}l(Y,"D"),e(Y,"flow"),q.prototype.wrap=function(N){var I=this,D=this._readableState,z=!1;N.on("end",function(){if(h("wrapped end"),D.decoder&&!D.ended){var be=D.decoder.end();be&&be.length&&I.push(be)}I.push(null)}),N.on("data",function(be){if(h("wrapped data"),D.decoder&&(be=D.decoder.write(be)),!(D.objectMode&&be==null)&&!(!D.objectMode&&(!be||!be.length))){var ge=I.push(be);ge||(z=!0,N.pause())}});for(var Ee in N)this[Ee]===void 0&&typeof N[Ee]=="function"&&(this[Ee]=e(function(be){return e(function(){return N[be].apply(N,arguments)},"methodWrapReturnFunction")},"methodWrap")(Ee));for(var Oe=0;Oe<M.length;Oe++)N.on(M[Oe],this.emit.bind(this,M[Oe]));return this._read=function(be){h("wrapped _read",be),z&&(z=!1,N.resume())},this},typeof Symbol=="function"&&(q.prototype[Symbol.asyncIterator]=function(){return A===void 0&&(A=rj()),A(this)}),Object.defineProperty(q.prototype,"readableHighWaterMark",{enumerable:!1,get:e(function(){return this._readableState.highWaterMark},"get2")}),Object.defineProperty(q.prototype,"readableBuffer",{enumerable:!1,get:e(function(){return this._readableState&&this._readableState.buffer},"get2")}),Object.defineProperty(q.prototype,"readableFlowing",{enumerable:!1,get:e(function(){return this._readableState.flowing},"get2"),set:e(function(N){this._readableState&&(this._readableState.flowing=N)},"set")}),q._fromList=H,Object.defineProperty(q.prototype,"readableLength",{enumerable:!1,get:e(function(){return this._readableState.length},"get2")});function H(N,I){if(I.length===0)return null;var D;return I.objectMode?D=I.buffer.shift():!N||N>=I.length?(I.decoder?D=I.buffer.join(""):I.buffer.length===1?D=I.buffer.first():D=I.buffer.concat(I.length),I.buffer.clear()):D=I.buffer.consume(N,I.decoder),D}l(H,"$"),e(H,"fromList");function Q(N){var I=N._readableState;h("endReadable",I.endEmitted),I.endEmitted||(I.ended=!0,a.nextTick(fe,I,N))}l(Q,"H"),e(Q,"endReadable");function fe(N,I){if(h("endReadableNT",N.endEmitted,N.length),!N.endEmitted&&N.length===0&&(N.endEmitted=!0,I.readable=!1,I.emit("end"),N.autoDestroy)){var D=I._writableState;(!D||D.autoDestroy&&D.finished)&&I.destroy()}}l(fe,"te"),e(fe,"endReadableNT"),typeof Symbol=="function"&&(q.from=function(N,I){return x===void 0&&(x=nj()),x(q,N,I)});function ve(N,I){for(var D=0,z=N.length;D<z;D++)if(N[D]===I)return D;return-1}return l(ve,"oe"),e(ve,"indexOf"),uh}l(YE,"rL");function ZE(){if($v)return ch;$v=!0,ch=u;var a=Ia().codes,i=a.ERR_METHOD_NOT_IMPLEMENTED,f=a.ERR_MULTIPLE_CALLBACK,g=a.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=a.ERR_TRANSFORM_WITH_LENGTH_0,n=Ra();Ki()(u,n);function r(d,m){var y=this._transformState;y.transforming=!1;var w=y.writecb;if(w===null)return this.emit("error",new f);y.writechunk=null,y.writecb=null,m!=null&&this.push(m),w(d);var _=this._readableState;_.reading=!1,(_.needReadable||_.length<_.highWaterMark)&&this._read(_.highWaterMark)}l(r,"i"),e(r,"afterTransform");function u(d){if(!(this instanceof u))return new u(d);n.call(this,d),this._transformState={afterTransform:r.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,d&&(typeof d.transform=="function"&&(this._transform=d.transform),typeof d.flush=="function"&&(this._flush=d.flush)),this.on("prefinish",p)}l(u,"f"),e(u,"Transform");function p(){var d=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(m,y){h(d,m,y)}):h(this,null,null)}l(p,"h"),e(p,"prefinish"),u.prototype.push=function(d,m){return this._transformState.needTransform=!1,n.prototype.push.call(this,d,m)},u.prototype._transform=function(d,m,y){y(new i("_transform()"))},u.prototype._write=function(d,m,y){var w=this._transformState;if(w.writecb=y,w.writechunk=d,w.writeencoding=m,!w.transforming){var _=this._readableState;(w.needTransform||_.needReadable||_.length<_.highWaterMark)&&this._read(_.highWaterMark)}},u.prototype._read=function(d){var m=this._transformState;m.writechunk!==null&&!m.transforming?(m.transforming=!0,this._transform(m.writechunk,m.writeencoding,m.afterTransform)):m.needTransform=!0},u.prototype._destroy=function(d,m){n.prototype._destroy.call(this,d,function(y){m(y)})};function h(d,m,y){if(m)return d.emit("error",m);if(y!=null&&d.push(y),d._writableState.length)throw new o;if(d._transformState.transforming)throw new g;return d.push(null)}return l(h,"c"),e(h,"done"),ch}l(ZE,"nL");function ij(){if(Wv)return hh;Wv=!0,hh=i;var a=ZE();Ki()(i,a);function i(f){if(!(this instanceof i))return new i(f);a.call(this,f)}return l(i,"t"),e(i,"PassThrough"),i.prototype._transform=function(f,g,o){o(null,f)},hh}l(ij,"YZ");function oj(){if(zv)return dh;zv=!0;var a;function i(y){var w=!1;return function(){w||(w=!0,y.apply(void 0,arguments))}}l(i,"t"),e(i,"once2");var f=Ia().codes,g=f.ERR_MISSING_ARGS,o=f.ERR_STREAM_DESTROYED;function n(y){if(y)throw y}l(n,"s"),e(n,"noop2");function r(y){return y.setHeader&&typeof y.abort=="function"}l(r,"i"),e(r,"isRequest");function u(y,w,_,S){S=i(S);var T=!1;y.on("close",function(){T=!0}),a===void 0&&(a=Id()),a(y,{readable:w,writable:_},function(E){if(E)return S(E);T=!0,S()});var O=!1;return function(E){if(!T&&!O){if(O=!0,r(y))return y.abort();if(typeof y.destroy=="function")return y.destroy();S(E||new o("pipe"))}}}l(u,"f"),e(u,"destroyer");function p(y){y()}l(p,"h"),e(p,"call");function h(y,w){return y.pipe(w)}l(h,"c"),e(h,"pipe");function d(y){return!y.length||typeof y[y.length-1]!="function"?n:y.pop()}l(d,"d"),e(d,"popCallback");function m(){for(var y=arguments.length,w=new Array(y),_=0;_<y;_++)w[_]=arguments[_];var S=d(w);if(Array.isArray(w[0])&&(w=w[0]),w.length<2)throw new g("streams");var T,O=w.map(function(E,P){var A=P<w.length-1,x=P>0;return u(E,A,x,function(U){T||(T=U),U&&O.forEach(p),!A&&(O.forEach(p),S(T))})});return w.reduce(h)}return l(m,"y"),e(m,"pipeline"),dh=m,dh}l(oj,"KZ");function QE(){return Hv||(Hv=!0,Ur=Ur=YE(),Ur.Stream=Ur,Ur.Readable=Ur,Ur.Writable=JE(),Ur.Duplex=Ra(),Ur.Transform=ZE(),Ur.PassThrough=ij(),Ur.finished=Id(),Ur.pipeline=oj()),Ur}l(QE,"iL");function XE(){if(qv)return Cl;qv=!0;var a=xa().Buffer,i=bi,f=qE(),g=Ki(),o=QE(),n=Cl.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},r=Cl.IncomingMessage=function(u,p,h,d){var m=this||Ll;if(o.Readable.call(m),m._mode=h,m.headers={},m.rawHeaders=[],m.trailers={},m.rawTrailers=[],m.on("end",function(){i.nextTick(function(){m.emit("close")})}),h==="fetch"){let O=e(function(){w.read().then(function(E){if(!m._destroyed){if(d(E.done),E.done){m.push(null);return}m.push(a.from(E.value)),O()}}).catch(function(E){d(!0),m._destroyed||m.emit("error",E)})},"read");if(m._fetchResponse=p,m.url=p.url,m.statusCode=p.status,m.statusMessage=p.statusText,p.headers.forEach(function(E,P){m.headers[P.toLowerCase()]=E,m.rawHeaders.push(P,E)}),f.writableStream){var y=new WritableStream({write:e(function(E){return d(!1),new Promise(function(P,A){m._destroyed?A():m.push(a.from(E))?P():m._resumeFetch=P})},"write"),close:e(function(){d(!0),m._destroyed||m.push(null)},"close"),abort:e(function(E){d(!0),m._destroyed||m.emit("error",E)},"abort")});try{p.body.pipeTo(y).catch(function(E){d(!0),m._destroyed||m.emit("error",E)});return}catch{}}var w=p.body.getReader();O()}else{m._xhr=u,m._pos=0,m.url=u.responseURL,m.statusCode=u.status,m.statusMessage=u.statusText;var _=u.getAllResponseHeaders().split(/\r?\n/);if(_.forEach(function(O){var E=O.match(/^([^:]+):\s*(.*)/);if(E){var P=E[1].toLowerCase();P==="set-cookie"?(m.headers[P]===void 0&&(m.headers[P]=[]),m.headers[P].push(E[2])):m.headers[P]!==void 0?m.headers[P]+=", "+E[2]:m.headers[P]=E[2],m.rawHeaders.push(E[1],E[2])}}),m._charset="x-user-defined",!f.overrideMimeType){var S=m.rawHeaders["mime-type"];if(S){var T=S.match(/;\s*charset=([^;])(;|$)/);T&&(m._charset=T[1].toLowerCase())}m._charset||(m._charset="utf-8")}}};return g(r,o.Readable),r.prototype._read=function(){var u=this||Ll,p=u._resumeFetch;p&&(u._resumeFetch=null,p())},r.prototype._onXHRProgress=function(u){var p=this||Ll,h=p._xhr,d=null;switch(p._mode){case"text":if(d=h.responseText,d.length>p._pos){var m=d.substr(p._pos);if(p._charset==="x-user-defined"){for(var y=a.alloc(m.length),w=0;w<m.length;w++)y[w]=m.charCodeAt(w)&255;p.push(y)}else p.push(m,p._charset);p._pos=d.length}break;case"arraybuffer":if(h.readyState!==n.DONE||!h.response)break;d=h.response,p.push(a.from(new Uint8Array(d)));break;case"moz-chunked-arraybuffer":if(d=h.response,h.readyState!==n.LOADING||!d)break;p.push(a.from(new Uint8Array(d)));break;case"ms-stream":if(d=h.response,h.readyState!==n.LOADING)break;var _=new Ll.MSStreamReader;_.onprogress=function(){_.result.byteLength>p._pos&&(p.push(a.from(new Uint8Array(_.result.slice(p._pos)))),p._pos=_.result.byteLength)},_.onload=function(){u(!0),p.push(null)},_.readAsArrayBuffer(d);break}p._xhr.readyState===n.DONE&&p._mode!=="ms-stream"&&(u(!0),p.push(null))},Cl}l(XE,"oL");function aj(){if(Gv)return ph;Gv=!0;var a=xa().Buffer,i=bi,f=qE(),g=Ki(),o=XE(),n=QE(),r=o.IncomingMessage,u=o.readyStates;function p(y,w){return f.fetch&&w?"fetch":f.mozchunkedarraybuffer?"moz-chunked-arraybuffer":f.msstream?"ms-stream":f.arraybuffer&&y?"arraybuffer":"text"}l(p,"h"),e(p,"decideMode");var h=ph=e(function(y){var w=this||fr;n.Writable.call(w),w._opts=y,w._body=[],w._headers={},y.auth&&w.setHeader("Authorization","Basic "+a.from(y.auth).toString("base64")),Object.keys(y.headers).forEach(function(T){w.setHeader(T,y.headers[T])});var _,S=!0;if(y.mode==="disable-fetch"||"requestTimeout"in y&&!f.abortController)S=!1,_=!0;else if(y.mode==="prefer-streaming")_=!1;else if(y.mode==="allow-wrong-content-type")_=!f.overrideMimeType;else if(!y.mode||y.mode==="default"||y.mode==="prefer-fast")_=!0;else throw new Error("Invalid value for opts.mode");w._mode=p(_,S),w._fetchTimer=null,w._socketTimeout=null,w._socketTimer=null,w.on("finish",function(){w._onFinish()})},"exports$4");g(h,n.Writable),h.prototype.setHeader=function(y,w){var _=this||fr,S=y.toLowerCase();m.indexOf(S)===-1&&(_._headers[S]={name:y,value:w})},h.prototype.getHeader=function(y){var w=(this||fr)._headers[y.toLowerCase()];return w?w.value:null},h.prototype.removeHeader=function(y){var w=this||fr;delete w._headers[y.toLowerCase()]},h.prototype._onFinish=function(){var y=this||fr;if(!y._destroyed){var w=y._opts;"timeout"in w&&w.timeout!==0&&y.setTimeout(w.timeout);var _=y._headers,S=null;w.method!=="GET"&&w.method!=="HEAD"&&(S=new Blob(y._body,{type:(_["content-type"]||{}).value||""}));var T=[];if(Object.keys(_).forEach(function(A){var x=_[A].name,U=_[A].value;Array.isArray(U)?U.forEach(function(M){T.push([x,M])}):T.push([x,U])}),y._mode==="fetch"){var O=null;if(f.abortController){var E=new AbortController;O=E.signal,y._fetchAbortController=E,"requestTimeout"in w&&w.requestTimeout!==0&&(y._fetchTimer=fr.setTimeout(function(){y.emit("requestTimeout"),y._fetchAbortController&&y._fetchAbortController.abort()},w.requestTimeout))}fr.fetch(y._opts.url,{method:y._opts.method,headers:T,body:S||void 0,mode:"cors",credentials:w.withCredentials?"include":"same-origin",signal:O}).then(function(A){y._fetchResponse=A,y._resetTimers(!1),y._connect()},function(A){y._resetTimers(!0),y._destroyed||y.emit("error",A)})}else{var P=y._xhr=new fr.XMLHttpRequest;try{P.open(y._opts.method,y._opts.url,!0)}catch(A){i.nextTick(function(){y.emit("error",A)});return}"responseType"in P&&(P.responseType=y._mode),"withCredentials"in P&&(P.withCredentials=!!w.withCredentials),y._mode==="text"&&"overrideMimeType"in P&&P.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in w&&(P.timeout=w.requestTimeout,P.ontimeout=function(){y.emit("requestTimeout")}),T.forEach(function(A){P.setRequestHeader(A[0],A[1])}),y._response=null,P.onreadystatechange=function(){switch(P.readyState){case u.LOADING:case u.DONE:y._onXHRProgress();break}},y._mode==="moz-chunked-arraybuffer"&&(P.onprogress=function(){y._onXHRProgress()}),P.onerror=function(){y._destroyed||(y._resetTimers(!0),y.emit("error",new Error("XHR error")))};try{P.send(S)}catch(A){i.nextTick(function(){y.emit("error",A)});return}}}};function d(y){try{var w=y.status;return w!==null&&w!==0}catch{return!1}}l(d,"d"),e(d,"statusValid"),h.prototype._onXHRProgress=function(){var y=this||fr;y._resetTimers(!1),!(!d(y._xhr)||y._destroyed)&&(y._response||y._connect(),y._response._onXHRProgress(y._resetTimers.bind(y)))},h.prototype._connect=function(){var y=this||fr;y._destroyed||(y._response=new r(y._xhr,y._fetchResponse,y._mode,y._resetTimers.bind(y)),y._response.on("error",function(w){y.emit("error",w)}),y.emit("response",y._response))},h.prototype._write=function(y,w,_){var S=this||fr;S._body.push(y),_()},h.prototype._resetTimers=function(y){var w=this||fr;fr.clearTimeout(w._socketTimer),w._socketTimer=null,y?(fr.clearTimeout(w._fetchTimer),w._fetchTimer=null):w._socketTimeout&&(w._socketTimer=fr.setTimeout(function(){w.emit("timeout")},w._socketTimeout))},h.prototype.abort=h.prototype.destroy=function(y){var w=this||fr;w._destroyed=!0,w._resetTimers(!0),w._response&&(w._response._destroyed=!0),w._xhr?w._xhr.abort():w._fetchAbortController&&w._fetchAbortController.abort(),y&&w.emit("error",y)},h.prototype.end=function(y,w,_){var S=this||fr;typeof y=="function"&&(_=y,y=void 0),n.Writable.prototype.end.call(S,y,w,_)},h.prototype.setTimeout=function(y,w){var _=this||fr;w&&_.once("timeout",w),_._socketTimeout=y,_._resetTimers(!1)},h.prototype.flushHeaders=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var m=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"];return ph}l(aj,"XZ");function sj(){if(Vv)return gh;Vv=!0,gh=i;var a=Object.prototype.hasOwnProperty;function i(){for(var f={},g=0;g<arguments.length;g++){var o=arguments[g];for(var n in o)a.call(o,n)&&(f[n]=o[n])}return f}return l(i,"t"),e(i,"extend"),gh}l(sj,"JZ");function lj(){return Jv||(Jv=!0,Kv={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}),Kv}l(lj,"ZZ");function oF(){if(Yv)return yh;Yv=!0;var a=aj(),i=XE(),f=sj(),g=lj(),o=Lt,n=yh;return n.request=function(r,u){typeof r=="string"?r=o.parse(r):r=f(r);var p=Lj.location.protocol.search(/^https?:$/)===-1?"http:":"",h=r.protocol||p,d=r.hostname||r.host,m=r.port,y=r.path||"/";d&&d.indexOf(":")!==-1&&(d="["+d+"]"),r.url=(d?h+"//"+d:"")+(m?":"+m:"")+y,r.method=(r.method||"GET").toUpperCase(),r.headers=r.headers||{};var w=new a(r);return u&&w.on("response",u),w},n.get=e(function(r,u){var p=n.request(r,u);return p.end(),p},"get2"),n.ClientRequest=a,n.IncomingMessage=i.IncomingMessage,n.Agent=function(){},n.Agent.defaultMaxSockets=4,n.globalAgent=new n.Agent,n.STATUS_CODES=g,n.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"],yh}l(oF,"eQ");var Gc,hv,aF,sF,Go,Fy,By,xy,Kr,As,dv,Vc,pv,Ui,gv,lF,ri,ni,ma,tr,la,jn,wa,Ql,Ht,fF,ou,pl,Iy,uF,cF,hF,dF,pF,Py,jy,Cy,gF,yF,mF,Ly,At,fj,wF,bF,yv,Kc,Wr,xr,vF,Vt,uj,cj,hj,ls,Xe,sn,Ny,_F,gl,Dy,au,dj,ki,f3,u3,Cn,ba,fa,Xl,EF,SF,AF,RF,OF,kF,TF,FF,BF,xF,IF,PF,jF,CF,LF,NF,DF,UF,MF,$F,WF,su,zF,HF,qF,GF,VF,KF,JF,YF,ZF,QF,XF,eB,tB,rB,nB,iB,oB,aB,sB,lB,fB,uB,cB,hB,dB,ci,Uy,Jc,pB,gB,yB,mB,wB,bB,vB,_B,EB,SB,AB,bi,Yc,mv,Zc,Rs,wv,Qc,bv,ef,c3,Xc,vv,ea,qt,eh,_v,Ev,Vo,RB,OB,pj,gj,ln,lu,My,$y,Wy,zy,kB,TB,fs,FB,vn,Lt,BB,cn,xB,IB,PB,jB,fu,Hy,qy,Gy,CB,LB,uu,Ko,cu,th,Sv,Av,NB,yj,mj,wj,bj,ad,vj,_j,Ej,Sj,Aj,Rj,DB,Oj,kj,Tj,Fj,sd,Bj,xj,Ij,Pj,jj,Cj,Dr,Rv,Mi,Ov,kv,rh,Tv,nh,Fv,ih,Bv,oh,xv,ah,Iv,Pv,sh,jv,lh,Cv,fh,Lv,Nv,Dv,uh,Uv,Mv,ch,$v,hh,Wv,dh,zv,Ur,Hv,Cl,qv,Ll,ph,Gv,fr,gh,Vv,Kv,Jv,yh,Yv,Lj,Qn,Nj,Dj,Uj,Mj,$j,Wj,zj,Hj,h3=Qt(()=>{if(Gc={},hv=!1,e(Ki,"dew"),Go=typeof Reflect=="object"?Reflect:null,Fy=Go&&typeof Go.apply=="function"?Go.apply:function(o,n,r){return Function.prototype.apply.call(o,n,r)},sF=Go&&typeof Go.ownKeys=="function"?Go.ownKeys:Object.getOwnPropertySymbols?function(o){return Object.getOwnPropertyNames(o).concat(Object.getOwnPropertySymbols(o))}:function(o){return Object.getOwnPropertyNames(o)},By=Number.isNaN||function(o){return o!=o},e(xt,"o"),aF=xt,xt.EventEmitter=xt,xt.prototype._events=void 0,xt.prototype._eventsCount=0,xt.prototype._maxListeners=void 0,xy=10,e(jl,"u"),e(K1,"f"),e(dy,"v"),e(WP,"a"),e(py,"l"),e(gy,"h"),e(yy,"p"),e(J1,"c"),Object.defineProperty(xt,"defaultMaxListeners",{enumerable:!0,get:e(function(){return xy},"get"),set:e(function(o){if(typeof o!="number"||o<0||By(o))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+o+".");xy=o},"set")}),xt.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},xt.prototype.setMaxListeners=function(o){if(typeof o!="number"||o<0||By(o))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+o+".");return this._maxListeners=o,this},xt.prototype.getMaxListeners=function(){return K1(this)},xt.prototype.emit=function(o){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var u=o==="error",p=this._events;if(p!==void 0)u=u&&p.error===void 0;else if(!u)return!1;if(u){var h;if(n.length>0&&(h=n[0]),h instanceof Error)throw h;var d=new Error("Unhandled error."+(h?" ("+h.message+")":""));throw d.context=h,d}var m=p[o];if(m===void 0)return!1;if(typeof m=="function")Fy(m,this,n);else{var y=m.length,w=J1(m,y);for(r=0;r<y;++r)Fy(w[r],this,n)}return!0},xt.prototype.addListener=function(o,n){return dy(this,o,n,!1)},xt.prototype.on=xt.prototype.addListener,xt.prototype.prependListener=function(o,n){return dy(this,o,n,!0)},xt.prototype.once=function(o,n){return jl(n),this.on(o,py(this,o,n)),this},xt.prototype.prependOnceListener=function(o,n){return jl(n),this.prependListener(o,py(this,o,n)),this},xt.prototype.removeListener=function(o,n){var r,u,p,h,d;if(jl(n),(u=this._events)===void 0)return this;if((r=u[o])===void 0)return this;if(r===n||r.listener===n)--this._eventsCount==0?this._events=Object.create(null):(delete u[o],u.removeListener&&this.emit("removeListener",o,r.listener||n));else if(typeof r!="function"){for(p=-1,h=r.length-1;h>=0;h--)if(r[h]===n||r[h].listener===n){d=r[h].listener,p=h;break}if(p<0)return this;p===0?r.shift():function(m,y){for(;y+1<m.length;y++)m[y]=m[y+1];m.pop()}(r,p),r.length===1&&(u[o]=r[0]),u.removeListener!==void 0&&this.emit("removeListener",o,d||n)}return this},xt.prototype.off=xt.prototype.removeListener,xt.prototype.removeAllListeners=function(o){var n,r,u;if((r=this._events)===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[o]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete r[o]),this;if(arguments.length===0){var p,h=Object.keys(r);for(u=0;u<h.length;++u)(p=h[u])!=="removeListener"&&this.removeAllListeners(p);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(n=r[o])=="function")this.removeListener(o,n);else if(n!==void 0)for(u=n.length-1;u>=0;u--)this.removeListener(o,n[u]);return this},xt.prototype.listeners=function(o){return gy(this,o,!0)},xt.prototype.rawListeners=function(o){return gy(this,o,!1)},xt.listenerCount=function(o,n){return typeof o.listenerCount=="function"?o.listenerCount(n):yy.call(o,n)},xt.prototype.listenerCount=yy,xt.prototype.eventNames=function(){return this._eventsCount>0?sF(this._events):[]},Kr=aF,Kr.EventEmitter,Kr.defaultMaxListeners,Kr.init,Kr.listenerCount,Kr.EventEmitter,Kr.defaultMaxListeners,Kr.init,Kr.listenerCount,Kr.once=function(o,n){return new Promise((r,u)=>{function p(...d){h!==void 0&&o.removeListener("error",h),r(d)}l(p,"a"),e(p,"eventListener");let h;n!=="error"&&(h=e(d=>{o.removeListener(name,p),u(d)},"errorListener"),o.once("error",h)),o.once(n,p)})},Kr.on=function(o,n){let r=[],u=[],p=null,h=!1,d={async next(){let w=r.shift();if(w)return createIterResult(w,!1);if(p){let _=Promise.reject(p);return p=null,_}return h?createIterResult(void 0,!0):new Promise((_,S)=>u.push({resolve:_,reject:S}))},async return(){o.removeListener(n,m),o.removeListener("error",y),h=!0;for(let w of u)w.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(w){p=w,o.removeListener(n,m),o.removeListener("error",y)},[Symbol.asyncIterator](){return this}};return o.on(n,m),o.on("error",y),d;function m(...w){let _=u.shift();_?_.resolve(createIterResult(w,!1)):r.push(w)}function y(w){h=!0;let _=u.shift();_?_.reject(w):p=w,d.return()}},As={},dv=!1,e(zP,"dew$2"),Vc={},pv=!1,e(HP,"dew$1"),Ui={},gv=!1,e(xa,"dew2"),ma=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,tr=lF={},e($c,"i$2"),e(Wc,"u$2"),e(Y1,"c$2"),function(){try{ri=typeof setTimeout=="function"?setTimeout:$c}catch{ri=$c}try{ni=typeof clearTimeout=="function"?clearTimeout:Wc}catch{ni=Wc}}(),jn=[],wa=!1,Ql=-1,e(qP,"h$1"),e(Z1,"d$1"),e(my,"m$1"),e(bn,"p$1"),tr.nextTick=function(o){var n=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)n[r-1]=arguments[r];jn.push(new my(o,n)),jn.length!==1||wa||Y1(Z1)},my.prototype.run=function(){(this||ma).fun.apply(null,(this||ma).array)},tr.title="browser",tr.browser=!0,tr.env={},tr.argv=[],tr.version="",tr.versions={},tr.on=bn,tr.addListener=bn,tr.once=bn,tr.off=bn,tr.removeListener=bn,tr.removeAllListeners=bn,tr.emit=bn,tr.prependListener=bn,tr.prependOnceListener=bn,tr.listeners=function(o){return[]},tr.binding=function(o){throw new Error("process.binding is not supported")},tr.cwd=function(){return"/"},tr.chdir=function(o){throw new Error("process.chdir is not supported")},tr.umask=function(){return 0},Ht=lF,Ht.addListener,Ht.argv,Ht.binding,Ht.browser,Ht.chdir,Ht.cwd,Ht.emit,Ht.env,Ht.listeners,Ht.nextTick,Ht.off,Ht.on,Ht.once,Ht.prependListener,Ht.prependOnceListener,Ht.removeAllListeners,Ht.removeListener,Ht.title,Ht.umask,Ht.version,Ht.versions,fF=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",ou=Object.prototype.toString,pl=e(function(o){return!(fF&&o&&typeof o=="object"&&Symbol.toStringTag in o)&&ou.call(o)==="[object Arguments]"},"o2"),Iy=e(function(o){return!!pl(o)||o!==null&&typeof o=="object"&&typeof o.length=="number"&&o.length>=0&&ou.call(o)!=="[object Array]"&&ou.call(o.callee)==="[object Function]"},"n2"),uF=function(){return pl(arguments)}(),pl.isLegacyArguments=Iy,cF=uF?pl:Iy,hF=Object.prototype.toString,dF=Function.prototype.toString,pF=/^\s*(?:function)?\*/,Py=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",jy=Object.getPrototypeOf,Cy=function(){if(!Py)return!1;try{return Function("return function*() {}")()}catch{}}(),gF=Cy?jy(Cy):{},yF=e(function(o){return typeof o=="function"&&(!!pF.test(dF.call(o))||(Py?jy(o)===gF:hF.call(o)==="[object GeneratorFunction]"))},"i2"),mF=typeof Object.create=="function"?function(o,n){n&&(o.super_=n,o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}))}:function(o,n){if(n){o.super_=n;var r=e(function(){},"o4");r.prototype=n.prototype,o.prototype=new r,o.prototype.constructor=o}},Ly=e(function(o){return o&&typeof o=="object"&&typeof o.copy=="function"&&typeof o.fill=="function"&&typeof o.readUInt8=="function"},"i$1"),At={},fj=Ly,wF=cF,bF=yF,e(Ri,"c$1"),yv=typeof BigInt<"u",Kc=typeof Symbol<"u",Wr=Kc&&Symbol.toStringTag!==void 0,xr=typeof Uint8Array<"u",vF=typeof ArrayBuffer<"u",xr&&Wr)var a=Object.getPrototypeOf(Uint8Array.prototype),i=Ri(Object.getOwnPropertyDescriptor(a,Symbol.toStringTag).get);if(Vt=Ri(Object.prototype.toString),uj=Ri(Number.prototype.valueOf),cj=Ri(String.prototype.valueOf),hj=Ri(Boolean.prototype.valueOf),yv)var f=Ri(BigInt.prototype.valueOf);if(Kc)var g=Ri(Symbol.prototype.valueOf);e(Zs,"O"),e(wy,"S"),e(Q1,"B"),e(X1,"k"),e(ev,"E"),e(tv,"D"),e(rv,"U"),e(nv,"P"),e(iv,"x"),e(ov,"I"),e(av,"M"),e(sv,"z"),e(lv,"F"),e(cl,"T"),e(hl,"N"),e(dl,"W"),e(nu,"$"),e(ql,"C"),e(by,"V"),e(Gl,"G"),e(vy,"R"),e(Vl,"J"),e(_y,"_"),e(Ey,"H"),e(Sy,"Z"),e(Ay,"q"),e(Ry,"K"),e(Oy,"L"),At.isArgumentsObject=wF,At.isGeneratorFunction=bF,At.isPromise=function(o){return typeof Promise<"u"&&o instanceof Promise||o!==null&&typeof o=="object"&&typeof o.then=="function"&&typeof o.catch=="function"},At.isArrayBufferView=function(o){return vF&&ArrayBuffer.isView?ArrayBuffer.isView(o):wy(o)||vy(o)},At.isTypedArray=wy,At.isUint8Array=Q1,At.isUint8ClampedArray=X1,At.isUint16Array=ev,At.isUint32Array=tv,At.isInt8Array=rv,At.isInt16Array=nv,At.isInt32Array=iv,At.isFloat32Array=ov,At.isFloat64Array=av,At.isBigInt64Array=sv,At.isBigUint64Array=lv,cl.working=typeof Map<"u"&&cl(new Map),At.isMap=function(o){return typeof Map<"u"&&(cl.working?cl(o):o instanceof Map)},hl.working=typeof Set<"u"&&hl(new Set),At.isSet=function(o){return typeof Set<"u"&&(hl.working?hl(o):o instanceof Set)},dl.working=typeof WeakMap<"u"&&dl(new WeakMap),At.isWeakMap=function(o){return typeof WeakMap<"u"&&(dl.working?dl(o):o instanceof WeakMap)},nu.working=typeof WeakSet<"u"&&nu(new WeakSet),At.isWeakSet=function(o){return nu(o)},ql.working=typeof ArrayBuffer<"u"&&ql(new ArrayBuffer),At.isArrayBuffer=by,Gl.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Gl(new DataView(new ArrayBuffer(1),0,1)),At.isDataView=vy,Vl.working=typeof SharedArrayBuffer<"u"&&Vl(new SharedArrayBuffer),At.isSharedArrayBuffer=_y,At.isAsyncFunction=function(o){return Vt(o)==="[object AsyncFunction]"},At.isMapIterator=function(o){return Vt(o)==="[object Map Iterator]"},At.isSetIterator=function(o){return Vt(o)==="[object Set Iterator]"},At.isGeneratorObject=function(o){return Vt(o)==="[object Generator]"},At.isWebAssemblyCompiledModule=function(o){return Vt(o)==="[object WebAssembly.Module]"},At.isNumberObject=Ey,At.isStringObject=Sy,At.isBooleanObject=Ay,At.isBigIntObject=Ry,At.isSymbolObject=Oy,At.isBoxedPrimitive=function(o){return Ey(o)||Sy(o)||Ay(o)||Ry(o)||Oy(o)},At.isAnyArrayBuffer=function(o){return xr&&(by(o)||_y(o))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(o){Object.defineProperty(At,o,{enumerable:!1,value:e(function(){throw new Error(o+" is not supported in userland")},"value")})}),ls=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,Xe={},sn=Ht,Ny=Object.getOwnPropertyDescriptors||function(o){for(var n=Object.keys(o),r={},u=0;u<n.length;u++)r[n[u]]=Object.getOwnPropertyDescriptor(o,n[u]);return r},_F=/%[sdj%]/g,Xe.format=function(o){if(!Jl(o)){for(var n=[],r=0;r<arguments.length;r++)n.push(ui(arguments[r]));return n.join(" ")}r=1;for(var u=arguments,p=u.length,h=String(o).replace(_F,function(m){if(m==="%%")return"%";if(r>=p)return m;switch(m){case"%s":return String(u[r++]);case"%d":return Number(u[r++]);case"%j":try{return JSON.stringify(u[r++])}catch{return"[Circular]"}default:return m}}),d=u[r];r<p;d=u[++r])Kl(d)||!sa(d)?h+=" "+d:h+=" "+ui(d);return h},Xe.deprecate=function(o,n){if(sn!==void 0&&sn.noDeprecation===!0)return o;if(sn===void 0)return function(){return Xe.deprecate(o,n).apply(this||ls,arguments)};var r=!1;return function(){if(!r){if(sn.throwDeprecation)throw new Error(n);sn.traceDeprecation?console.trace(n):console.error(n),r=!0}return o.apply(this||ls,arguments)}},gl={},Dy=/^$/,sn.env.NODE_DEBUG&&(au=sn.env.NODE_DEBUG,au=au.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),Dy=new RegExp("^"+au+"$","i")),e(ui,"oe"),e(GP,"ue"),e(VP,"fe"),e(hf,"ae"),e(zc,"ce"),e(Hc,"se"),e(fv,"pe"),e(id,"ye"),e(Kl,"le"),e(uv,"de"),e(Jl,"ge"),e(qi,"be"),e(Ts,"me"),e(sa,"he"),e(Yl,"je"),e(Fs,"Ae"),e(Zl,"we"),e(xd,"ve"),e(qc,"Oe"),Xe.debuglog=function(o){if(o=o.toUpperCase(),!gl[o])if(Dy.test(o)){var n=sn.pid;gl[o]=function(){var r=Xe.format.apply(Xe,arguments);console.error("%s %d: %s",o,n,r)}}else gl[o]=function(){};return gl[o]},Xe.inspect=ui,ui.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]},ui.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},Xe.types=At,Xe.isArray=fv,Xe.isBoolean=id,Xe.isNull=Kl,Xe.isNullOrUndefined=function(o){return o==null},Xe.isNumber=uv,Xe.isString=Jl,Xe.isSymbol=function(o){return typeof o=="symbol"},Xe.isUndefined=qi,Xe.isRegExp=Ts,Xe.types.isRegExp=Ts,Xe.isObject=sa,Xe.isDate=Yl,Xe.types.isDate=Yl,Xe.isError=Fs,Xe.types.isNativeError=Fs,Xe.isFunction=Zl,Xe.isPrimitive=function(o){return o===null||typeof o=="boolean"||typeof o=="number"||typeof o=="string"||typeof o=="symbol"||o===void 0},Xe.isBuffer=Ly,dj=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],e(UT,"Be"),e(zE,"ke"),Xe.log=function(){console.log("%s - %s",UT(),Xe.format.apply(Xe,arguments))},Xe.inherits=mF,Xe._extend=function(o,n){if(!n||!sa(n))return o;for(var r=Object.keys(n),u=r.length;u--;)o[r[u]]=n[r[u]];return o},ki=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0,e(MT,"De"),Xe.promisify=function(o){if(typeof o!="function")throw new TypeError('The "original" argument must be of type Function');if(ki&&o[ki]){var n;if(typeof(n=o[ki])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(n,ki,{value:n,enumerable:!1,writable:!1,configurable:!0}),n}function n(){for(var r,u,p=new Promise(function(m,y){r=m,u=y}),h=[],d=0;d<arguments.length;d++)h.push(arguments[d]);h.push(function(m,y){m?u(m):r(y)});try{o.apply(this||ls,h)}catch(m){u(m)}return p}return l(n,"t"),e(n,"t4"),Object.setPrototypeOf(n,Object.getPrototypeOf(o)),ki&&Object.defineProperty(n,ki,{value:n,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(n,Ny(o))},Xe.promisify.custom=ki,Xe.callbackify=function(o){if(typeof o!="function")throw new TypeError('The "original" argument must be of type Function');function n(){for(var r=[],u=0;u<arguments.length;u++)r.push(arguments[u]);var p=r.pop();if(typeof p!="function")throw new TypeError("The last argument must be of type Function");var h=this||ls,d=e(function(){return p.apply(h,arguments)},"o4");o.apply(this||ls,r).then(function(m){sn.nextTick(d.bind(null,null,m))},function(m){sn.nextTick(MT.bind(null,m,d))})}return l(n,"t"),e(n,"t4"),Object.setPrototypeOf(n,Object.getPrototypeOf(o)),Object.defineProperties(n,Ny(o)),n},Xe._extend,Xe.callbackify,Xe.debuglog,Xe.deprecate,Xe.format,Xe.inherits,Xe.inspect,Xe.isArray,Xe.isBoolean,Xe.isBuffer,Xe.isDate,Xe.isError,Xe.isFunction,Xe.isNull,Xe.isNullOrUndefined,Xe.isNumber,Xe.isObject,Xe.isPrimitive,Xe.isRegExp,Xe.isString,Xe.isSymbol,Xe.isUndefined,Xe.log,Xe.promisify,Xe._extend,Xe.callbackify,Xe.debuglog,Xe.deprecate,Xe.format,Xe.inherits,Xe.inspect,Xe.isArray,Xe.isBoolean,Xe.isBuffer,Xe.isDate,Xe.isError,Xe.isFunction,Xe.isNull,Xe.isNullOrUndefined,Xe.isNumber,Xe.isObject,Xe.isPrimitive,Xe.isRegExp,Xe.isString,Xe.isSymbol,Xe.isUndefined,Xe.log,f3=Xe.promisify,Xe.types,Xe._extend,Xe.callbackify,Xe.debuglog,Xe.deprecate,Xe.format,Xe.inherits,Xe.inspect,Xe.isArray,Xe.isBoolean,Xe.isBuffer,Xe.isDate,Xe.isError,Xe.isFunction,Xe.isNull,Xe.isNullOrUndefined,Xe.isNumber,Xe.isObject,Xe.isPrimitive,Xe.isRegExp,Xe.isString,Xe.isSymbol,Xe.isUndefined,Xe.log,u3=Xe.promisify,Xe.types,Xe.TextEncoder=globalThis.TextEncoder,Xe.TextDecoder=globalThis.TextDecoder,e(od,"unimplemented"),Cn=[],ba=!1,Xl=-1,e(KP,"cleanUpNextTick"),e(HE,"drainQueue"),e($T,"nextTick"),e(cv,"Item"),cv.prototype.run=function(){this.fun.apply(null,this.array)},EF="browser",SF="x64",AF="browser",RF={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},OF=["/usr/bin/node"],kF=[],TF="v16.8.0",FF={},BF=e(function(o,n){console.warn((n?n+": ":"")+o)},"emitWarning"),xF=e(function(o){od("binding")},"binding"),IF=e(function(o){return 0},"umask"),PF=e(function(){return"/"},"cwd"),jF=e(function(o){},"chdir"),CF={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},e(vr,"noop"),LF=vr,NF=[],e(WT,"_linkedBinding"),DF={},UF=!1,MF={},e(zT,"dlopen"),e(HT,"_getActiveRequests"),e(qT,"_getActiveHandles"),$F=vr,WF=vr,su=e(function(){return{}},"cpuUsage"),zF=su,HF=su,qF=vr,GF=vr,VF=vr,KF={},e(GT,"assert"),JF={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},YF=vr,ZF=vr,e(VT,"hasUncaughtExceptionCaptureCallback"),QF=vr,XF=vr,eB=vr,tB=vr,rB=vr,nB=void 0,iB=void 0,oB=void 0,aB=vr,sB=2,lB=1,fB="/bin/usr/node",uB=9229,cB="node",hB=[],dB=vr,ci={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},ci.now===void 0&&(Uy=Date.now(),ci.timing&&ci.timing.navigationStart&&(Uy=ci.timing.navigationStart),ci.now=()=>Date.now()-Uy),e(KT,"uptime"),Jc=1e9,e(iu,"hrtime"),iu.bigint=function(o){var n=iu(o);return typeof BigInt>"u"?n[0]*Jc+n[1]:BigInt(n[0]*Jc)+BigInt(n[1])},pB=10,gB={},yB=0,e(Zn,"on"),mB=Zn,wB=Zn,bB=Zn,vB=Zn,_B=Zn,EB=vr,SB=Zn,AB=Zn,e(JT,"listeners"),bi={version:TF,versions:FF,arch:SF,platform:AF,release:CF,_rawDebug:LF,moduleLoadList:NF,binding:xF,_linkedBinding:WT,_events:gB,_eventsCount:yB,_maxListeners:pB,on:Zn,addListener:mB,once:wB,off:bB,removeListener:vB,removeAllListeners:_B,emit:EB,prependListener:SB,prependOnceListener:AB,listeners:JT,domain:DF,_exiting:UF,config:MF,dlopen:zT,uptime:KT,_getActiveRequests:HT,_getActiveHandles:qT,reallyExit:$F,_kill:WF,cpuUsage:su,resourceUsage:zF,memoryUsage:HF,kill:qF,exit:GF,openStdin:VF,allowedNodeEnvironmentFlags:KF,assert:GT,features:JF,_fatalExceptions:YF,setUncaughtExceptionCaptureCallback:ZF,hasUncaughtExceptionCaptureCallback:VT,emitWarning:BF,nextTick:$T,_tickCallback:QF,_debugProcess:XF,_debugEnd:eB,_startProfilerIdleNotifier:tB,_stopProfilerIdleNotifier:rB,stdout:nB,stdin:oB,stderr:iB,abort:aB,umask:IF,chdir:jF,cwd:PF,env:RF,title:EF,argv:OF,execArgv:kF,pid:sB,ppid:lB,execPath:fB,debugPort:uB,hrtime:iu,argv0:cB,_preload_modules:hB,setSourceMapsEnabled:dB},Yc={},mv=!1,Zc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(JP,"dew3"),Rs={},wv=!1,e(YP,"dew$12"),Qc={},bv=!1,e(YT,"dew4"),ef=YT(),ef.StringDecoder,c3=ef.StringDecoder,Xc={},vv=!1,ea=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(ZT,"dew5"),qt=ZT(),qt.platform="browser",qt.addListener,qt.argv,qt.binding,qt.browser,qt.chdir,qt.cwd,qt.emit,qt.env,qt.listeners,qt.nextTick,qt.off,qt.on,qt.once,qt.prependListener,qt.prependOnceListener,qt.removeAllListeners,qt.removeListener,qt.title,qt.umask,qt.version,qt.versions,eh={},_v=!1,e(QT,"dew$13"),Ev=QT(),Vo=2147483647,RB=/^xn--/,OB=/[^\0-\x7E]/,pj=/[\x2E\u3002\uFF0E\uFF61]/g,gj={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ln=Math.floor,lu=String.fromCharCode,e(Oi,"i$12"),e(ky,"f$12"),e(Ty,"l$12"),My=e(function(o,n){return o+22+75*(o<26)-((n!=0)<<5)},"u$12"),$y=e(function(o,n,r){let u=0;for(o=r?ln(o/700):o>>1,o+=ln(o/n);o>455;u+=36)o=ln(o/35);return ln(u+36*o/(o+38))},"a$12"),Wy=e(function(o){let n=[],r=o.length,u=0,p=128,h=72,d=o.lastIndexOf("-");d<0&&(d=0);for(let y=0;y<d;++y)o.charCodeAt(y)>=128&&Oi("not-basic"),n.push(o.charCodeAt(y));for(let y=d>0?d+1:0;y<r;){let w=u;for(let S=1,T=36;;T+=36){y>=r&&Oi("invalid-input");let O=(m=o.charCodeAt(y++))-48<10?m-22:m-65<26?m-65:m-97<26?m-97:36;(O>=36||O>ln((Vo-u)/S))&&Oi("overflow"),u+=O*S;let E=T<=h?1:T>=h+26?26:T-h;if(O<E)break;let P=36-E;S>ln(Vo/P)&&Oi("overflow"),S*=P}let _=n.length+1;h=$y(u-w,_,w==0),ln(u/_)>Vo-p&&Oi("overflow"),p+=ln(u/_),u%=_,n.splice(u++,0,p)}var m;return String.fromCodePoint(...n)},"d2"),zy=e(function(o){let n=[],r=(o=Ty(o)).length,u=128,p=0,h=72;for(let y of o)y<128&&n.push(lu(y));let d=n.length,m=d;for(d&&n.push("-");m<r;){let y=Vo;for(let _ of o)_>=u&&_<y&&(y=_);let w=m+1;y-u>ln((Vo-p)/w)&&Oi("overflow"),p+=(y-u)*w,u=y;for(let _ of o)if(_<u&&++p>Vo&&Oi("overflow"),_==u){let S=p;for(let T=36;;T+=36){let O=T<=h?1:T>=h+26?26:T-h;if(S<O)break;let E=S-O,P=36-O;n.push(lu(My(O+E%P,0))),S=ln(E/P)}n.push(lu(My(S,0))),h=$y(p,w,m==d),p=0,++m}++p,++u}return n.join("")},"h$12"),kB={version:"2.1.0",ucs2:{decode:Ty,encode:e(o=>String.fromCodePoint(...o),"encode")},decode:Wy,encode:zy,toASCII:e(function(o){return ky(o,function(n){return OB.test(n)?"xn--"+zy(n):n})},"toASCII"),toUnicode:e(function(o){return ky(o,function(n){return RB.test(n)?Wy(n.slice(4).toLowerCase()):n})},"toUnicode")},e(XT,"e$12"),TB=e(function(o,n,r,u){n=n||"&",r=r||"=";var p={};if(typeof o!="string"||o.length===0)return p;var h=/\+/g;o=o.split(n);var d=1e3;u&&typeof u.maxKeys=="number"&&(d=u.maxKeys);var m=o.length;d>0&&m>d&&(m=d);for(var y=0;y<m;++y){var w,_,S,T,O=o[y].replace(h,"%20"),E=O.indexOf(r);E>=0?(w=O.substr(0,E),_=O.substr(E+1)):(w=O,_=""),S=decodeURIComponent(w),T=decodeURIComponent(_),XT(p,S)?Array.isArray(p[S])?p[S].push(T):p[S]=[p[S],T]:p[S]=T}return p},"n$12"),fs=e(function(o){switch(typeof o){case"string":return o;case"boolean":return o?"true":"false";case"number":return isFinite(o)?o:"";default:return""}},"r$12"),FB=e(function(o,n,r,u){return n=n||"&",r=r||"=",o===null&&(o=void 0),typeof o=="object"?Object.keys(o).map(function(p){var h=encodeURIComponent(fs(p))+r;return Array.isArray(o[p])?o[p].map(function(d){return h+encodeURIComponent(fs(d))}).join(n):h+encodeURIComponent(fs(o[p]))}).join(n):u?encodeURIComponent(fs(u))+r+encodeURIComponent(fs(o)):""},"t3"),vn={},vn.decode=vn.parse=TB,vn.encode=vn.stringify=FB,vn.decode,vn.encode,vn.parse,vn.stringify,Lt={},BB=kB,cn={isString:e(function(o){return typeof o=="string"},"isString"),isObject:e(function(o){return typeof o=="object"&&o!==null},"isObject"),isNull:e(function(o){return o===null},"isNull"),isNullOrUndefined:e(function(o){return o==null},"isNullOrUndefined")},e(Vr,"r3"),Lt.parse=ss,Lt.resolve=function(o,n){return ss(o,!1,!0).resolve(n)},Lt.resolveObject=function(o,n){return o?ss(o,!1,!0).resolveObject(n):n},Lt.format=function(o){return cn.isString(o)&&(o=ss(o)),o instanceof Vr?o.format():Vr.prototype.format.call(o)},Lt.Url=Vr,xB=/^([a-z0-9.+-]+:)/i,IB=/:[0-9]*$/,PB=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,jB=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
|
|
125
|
-
`," "]),fu=["'"].concat(jB),Hy=["%","/","?",";","#"].concat(fu),qy=["/","?","#"],Gy=/^[+a-z0-9A-Z_-]{0,63}$/,CB=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,LB={javascript:!0,"javascript:":!0},uu={javascript:!0,"javascript:":!0},Ko={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},cu=vn,e(ss,"O2"),Vr.prototype.parse=function(o,n,r){if(!cn.isString(o))throw new TypeError("Parameter 'url' must be a string, not "+typeof o);var u=o.indexOf("?"),p=u!==-1&&u<o.indexOf("#")?"?":"#",h=o.split(p);h[0]=h[0].replace(/\\/g,"/");var d=o=h.join(p);if(d=d.trim(),!r&&o.split("#").length===1){var m=PB.exec(d);if(m)return this.path=d,this.href=d,this.pathname=m[1],m[2]?(this.search=m[2],this.query=n?cu.parse(this.search.substr(1)):this.search.substr(1)):n&&(this.search="",this.query={}),this}var y=xB.exec(d);if(y){var w=(y=y[0]).toLowerCase();this.protocol=w,d=d.substr(y.length)}if(r||y||d.match(/^\/\/[^@\/]+@[^@\/]+/)){var _=d.substr(0,2)==="//";!_||y&&uu[y]||(d=d.substr(2),this.slashes=!0)}if(!uu[y]&&(_||y&&!Ko[y])){for(var S,T,O=-1,E=0;E<qy.length;E++)(P=d.indexOf(qy[E]))!==-1&&(O===-1||P<O)&&(O=P);for((T=O===-1?d.lastIndexOf("@"):d.lastIndexOf("@",O))!==-1&&(S=d.slice(0,T),d=d.slice(T+1),this.auth=decodeURIComponent(S)),O=-1,E=0;E<Hy.length;E++){var P;(P=d.indexOf(Hy[E]))!==-1&&(O===-1||P<O)&&(O=P)}O===-1&&(O=d.length),this.host=d.slice(0,O),d=d.slice(O),this.parseHost(),this.hostname=this.hostname||"";var A=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!A)for(var x=this.hostname.split(/\./),U=(E=0,x.length);E<U;E++){var M=x[E];if(M&&!M.match(Gy)){for(var ee="",V=0,q=M.length;V<q;V++)M.charCodeAt(V)>127?ee+="x":ee+=M[V];if(!ee.match(Gy)){var G=x.slice(0,E),re=x.slice(E+1),ae=M.match(CB);ae&&(G.push(ae[1]),re.unshift(ae[2])),re.length&&(d="/"+re.join(".")+d),this.hostname=G.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=BB.toASCII(this.hostname));var de=this.port?":"+this.port:"",we=this.hostname||"";this.host=we+de,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),d[0]!=="/"&&(d="/"+d))}if(!LB[w])for(E=0,U=fu.length;E<U;E++){var xe=fu[E];if(d.indexOf(xe)!==-1){var Pe=encodeURIComponent(xe);Pe===xe&&(Pe=escape(xe)),d=d.split(xe).join(Pe)}}var se=d.indexOf("#");se!==-1&&(this.hash=d.substr(se),d=d.slice(0,se));var Te=d.indexOf("?");if(Te!==-1?(this.search=d.substr(Te),this.query=d.substr(Te+1),n&&(this.query=cu.parse(this.query)),d=d.slice(0,Te)):n&&(this.search="",this.query={}),d&&(this.pathname=d),Ko[w]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){de=this.pathname||"";var J=this.search||"";this.path=de+J}return this.href=this.format(),this},Vr.prototype.format=function(){var o=this.auth||"";o&&(o=(o=encodeURIComponent(o)).replace(/%3A/i,":"),o+="@");var n=this.protocol||"",r=this.pathname||"",u=this.hash||"",p=!1,h="";this.host?p=o+this.host:this.hostname&&(p=o+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(p+=":"+this.port)),this.query&&cn.isObject(this.query)&&Object.keys(this.query).length&&(h=cu.stringify(this.query));var d=this.search||h&&"?"+h||"";return n&&n.substr(-1)!==":"&&(n+=":"),this.slashes||(!n||Ko[n])&&p!==!1?(p="//"+(p||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):p||(p=""),u&&u.charAt(0)!=="#"&&(u="#"+u),d&&d.charAt(0)!=="?"&&(d="?"+d),n+p+(r=r.replace(/[?#]/g,function(m){return encodeURIComponent(m)}))+(d=d.replace("#","%23"))+u},Vr.prototype.resolve=function(o){return this.resolveObject(ss(o,!1,!0)).format()},Vr.prototype.resolveObject=function(o){if(cn.isString(o)){var n=new Vr;n.parse(o,!1,!0),o=n}for(var r=new Vr,u=Object.keys(this),p=0;p<u.length;p++){var h=u[p];r[h]=this[h]}if(r.hash=o.hash,o.href==="")return r.href=r.format(),r;if(o.slashes&&!o.protocol){for(var d=Object.keys(o),m=0;m<d.length;m++){var y=d[m];y!=="protocol"&&(r[y]=o[y])}return Ko[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(o.protocol&&o.protocol!==r.protocol){if(!Ko[o.protocol]){for(var w=Object.keys(o),_=0;_<w.length;_++){var S=w[_];r[S]=o[S]}return r.href=r.format(),r}if(r.protocol=o.protocol,o.host||uu[o.protocol])r.pathname=o.pathname;else{for(var T=(o.pathname||"").split("/");T.length&&!(o.host=T.shift()););o.host||(o.host=""),o.hostname||(o.hostname=""),T[0]!==""&&T.unshift(""),T.length<2&&T.unshift(""),r.pathname=T.join("/")}if(r.search=o.search,r.query=o.query,r.host=o.host||"",r.auth=o.auth,r.hostname=o.hostname||o.host,r.port=o.port,r.pathname||r.search){var O=r.pathname||"",E=r.search||"";r.path=O+E}return r.slashes=r.slashes||o.slashes,r.href=r.format(),r}var P=r.pathname&&r.pathname.charAt(0)==="/",A=o.host||o.pathname&&o.pathname.charAt(0)==="/",x=A||P||r.host&&o.pathname,U=x,M=r.pathname&&r.pathname.split("/")||[],ee=(T=o.pathname&&o.pathname.split("/")||[],r.protocol&&!Ko[r.protocol]);if(ee&&(r.hostname="",r.port=null,r.host&&(M[0]===""?M[0]=r.host:M.unshift(r.host)),r.host="",o.protocol&&(o.hostname=null,o.port=null,o.host&&(T[0]===""?T[0]=o.host:T.unshift(o.host)),o.host=null),x=x&&(T[0]===""||M[0]==="")),A)r.host=o.host||o.host===""?o.host:r.host,r.hostname=o.hostname||o.hostname===""?o.hostname:r.hostname,r.search=o.search,r.query=o.query,M=T;else if(T.length)M||(M=[]),M.pop(),M=M.concat(T),r.search=o.search,r.query=o.query;else if(!cn.isNullOrUndefined(o.search))return ee&&(r.hostname=r.host=M.shift(),(ae=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=ae.shift(),r.host=r.hostname=ae.shift())),r.search=o.search,r.query=o.query,cn.isNull(r.pathname)&&cn.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!M.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var V=M.slice(-1)[0],q=(r.host||o.host||M.length>1)&&(V==="."||V==="..")||V==="",G=0,re=M.length;re>=0;re--)(V=M[re])==="."?M.splice(re,1):V===".."?(M.splice(re,1),G++):G&&(M.splice(re,1),G--);if(!x&&!U)for(;G--;G)M.unshift("..");!x||M[0]===""||M[0]&&M[0].charAt(0)==="/"||M.unshift(""),q&&M.join("/").substr(-1)!=="/"&&M.push("");var ae,de=M[0]===""||M[0]&&M[0].charAt(0)==="/";return ee&&(r.hostname=r.host=de?"":M.length?M.shift():"",(ae=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=ae.shift(),r.host=r.hostname=ae.shift())),(x=x||r.host&&M.length)&&!de&&M.unshift(""),M.length?r.pathname=M.join("/"):(r.pathname=null,r.path=null),cn.isNull(r.pathname)&&cn.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=o.auth||r.auth,r.slashes=r.slashes||o.slashes,r.href=r.format(),r},Vr.prototype.parseHost=function(){var o=this.host,n=IB.exec(o);n&&((n=n[0])!==":"&&(this.port=n.substr(1)),o=o.substr(0,o.length-n.length)),o&&(this.hostname=o)},Lt.Url,Lt.format,Lt.resolve,Lt.resolveObject,th={},Sv=!1,e(eF,"dew6"),Av=eF(),NB=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0,Lt.URL=typeof URL<"u"?URL:null,Lt.pathToFileURL=rF,Lt.fileURLToPath=tF,Lt.Url,Lt.format,Lt.resolve,Lt.resolveObject,Lt.URL,yj=92,mj=47,wj=97,bj=122,ad=NB==="win32",vj=/\//g,_j=/%/g,Ej=/\\/g,Sj=/\n/g,Aj=/\r/g,Rj=/\t/g,e(tF,"fileURLToPath$1"),e(ZP,"getPathFromURLWin$1"),e(QP,"getPathFromURLPosix$1"),e(rF,"pathToFileURL$1"),DB=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0,Lt.URL=typeof URL<"u"?URL:null,Lt.pathToFileURL=iF,Lt.fileURLToPath=nF,Lt.Url,Lt.format,Lt.resolve,Lt.resolveObject,Lt.parse,Lt.URL,Oj=92,kj=47,Tj=97,Fj=122,sd=DB==="win32",Bj=/\//g,xj=/%/g,Ij=/\\/g,Pj=/\n/g,jj=/\r/g,Cj=/\t/g,e(nF,"fileURLToPath"),e(XP,"getPathFromURLWin"),e(ej,"getPathFromURLPosix"),e(iF,"pathToFileURL"),Dr={},Rv=!1,Mi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(qE,"dew$k"),Ov={},kv=!1,e(GE,"dew$j"),rh={},Tv=!1,e(tj,"dew$i"),nh={},Fv=!1,e(VE,"dew$h"),ih={},Bv=!1,e(Ia,"dew$g"),oh={},xv=!1,e(KE,"dew$f"),ah={},Iv=!1,Pv=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(JE,"dew$e"),sh={},jv=!1,e(Ra,"dew$d"),lh={},Cv=!1,e(Id,"dew$c"),fh={},Lv=!1,e(rj,"dew$b"),Nv={},Dv=!1,e(nj,"dew$a"),uh={},Uv=!1,Mv=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(YE,"dew$9"),ch={},$v=!1,e(ZE,"dew$8"),hh={},Wv=!1,e(ij,"dew$7"),dh={},zv=!1,e(oj,"dew$6"),Ur={},Hv=!1,e(QE,"dew$5"),Cl={},qv=!1,Ll=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(XE,"dew$4"),ph={},Gv=!1,fr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(aj,"dew$3"),gh={},Vv=!1,e(sj,"dew$22"),Kv={},Jv=!1,e(lj,"dew$14"),yh={},Yv=!1,Lj=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(oF,"dew7"),Qn=oF(),Nj=Qn.Agent,Dj=Qn.ClientRequest,Uj=Qn.IncomingMessage,Mj=Qn.METHODS,$j=Qn.STATUS_CODES,Wj=Qn.get,zj=Qn.globalAgent,Hj=Qn.request}),qj={};nn(qj,{Agent:l(()=>Nj,"Agent"),ClientRequest:l(()=>Dj,"ClientRequest"),IncomingMessage:l(()=>Uj,"IncomingMessage"),METHODS:l(()=>Mj,"METHODS"),STATUS_CODES:l(()=>$j,"STATUS_CODES"),get:l(()=>Wj,"get"),globalAgent:l(()=>zj,"globalAgent"),request:l(()=>Hj,"request")});var d3=Qt(()=>{h3()});function It(){It.init.call(this)}l(It,"at");function Nl(a){if(typeof a!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof a)}l(Nl,"bp");function Zv(a){return a._maxListeners===void 0?It.defaultMaxListeners:a._maxListeners}l(Zv,"FN");function Vy(a,i,f,g){var o,n,r,u;if(Nl(f),(n=a._events)===void 0?(n=a._events=Object.create(null),a._eventsCount=0):(n.newListener!==void 0&&(a.emit("newListener",i,f.listener?f.listener:f),n=a._events),r=n[i]),r===void 0)r=n[i]=f,++a._eventsCount;else if(typeof r=="function"?r=n[i]=g?[f,r]:[r,f]:g?r.unshift(f):r.push(f),(o=Zv(a))>0&&r.length>o&&!r.warned){r.warned=!0;var p=new Error("Possible EventEmitter memory leak detected. "+r.length+" "+String(i)+" listeners added. Use emitter.setMaxListeners() to increase limit");p.name="MaxListenersExceededWarning",p.emitter=a,p.type=i,p.count=r.length,u=p,console&&console.warn&&console.warn(u)}return a}l(Vy,"hL");function Gj(){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)}l(Gj,"fQ");function Ky(a,i,f){var g={fired:!1,wrapFn:void 0,target:a,type:i,listener:f},o=Gj.bind(g);return o.listener=f,g.wrapFn=o,o}l(Ky,"dL");function Jy(a,i,f){var g=a._events;if(g===void 0)return[];var o=g[i];return o===void 0?[]:typeof o=="function"?f?[o.listener||o]:[o]:f?function(n){for(var r=new Array(n.length),u=0;u<r.length;++u)r[u]=n[u].listener||n[u];return r}(o):Qv(o,o.length)}l(Jy,"pL");function Yy(a){var i=this._events;if(i!==void 0){var f=i[a];if(typeof f=="function")return 1;if(f!==void 0)return f.length}return 0}l(Yy,"yL");function Qv(a,i){for(var f=new Array(i),g=0;g<i;++g)f[g]=a[g];return f}l(Qv,"xN");function mh(){throw new Error("setTimeout has not been defined")}l(mh,"d_");function wh(){throw new Error("clearTimeout has not been defined")}l(wh,"p_");function Xv(a){if(ii===setTimeout)return setTimeout(a,0);if((ii===mh||!ii)&&setTimeout)return ii=setTimeout,setTimeout(a,0);try{return ii(a,0)}catch{try{return ii.call(null,a,0)}catch{return ii.call(this||va,a,0)}}}l(Xv,"PN");function Vj(){_a&&ca&&(_a=!1,ca.length?Ln=ca.concat(Ln):ff=-1,Ln.length&&e_())}l(Vj,"uQ");function e_(){if(!_a){var a=Xv(Vj);_a=!0;for(var i=Ln.length;i;){for(ca=Ln,Ln=[];++ff<i;)ca&&ca[ff].run();ff=-1,i=Ln.length}ca=null,_a=!1,function(f){if(oi===clearTimeout)return clearTimeout(f);if((oi===wh||!oi)&&clearTimeout)return oi=clearTimeout,clearTimeout(f);try{oi(f)}catch{try{return oi.call(null,f)}catch{return oi.call(this||va,f)}}}(a)}}l(e_,"IN");function Zy(a,i){(this||va).fun=a,(this||va).array=i}l(Zy,"mL");function _n(){}l(_n,"vi");function Ti(a){return a.call.bind(a)}l(Ti,"Oa");function Qs(a,i){if(typeof a!="object")return!1;try{return i(a),!0}catch{return!1}}l(Qs,"pu");function Qy(a){return Ir&&zr?en(a)!==void 0:t_(a)||r_(a)||n_(a)||i_(a)||o_(a)||a_(a)||s_(a)||l_(a)||f_(a)||u_(a)||c_(a)}l(Qy,"wL");function t_(a){return Ir&&zr?en(a)==="Uint8Array":Kt(a)==="[object Uint8Array]"||A8(a)&&a.buffer!==void 0}l(t_,"DN");function r_(a){return Ir&&zr?en(a)==="Uint8ClampedArray":Kt(a)==="[object Uint8ClampedArray]"}l(r_,"$N");function n_(a){return Ir&&zr?en(a)==="Uint16Array":Kt(a)==="[object Uint16Array]"}l(n_,"MN");function i_(a){return Ir&&zr?en(a)==="Uint32Array":Kt(a)==="[object Uint32Array]"}l(i_,"UN");function o_(a){return Ir&&zr?en(a)==="Int8Array":Kt(a)==="[object Int8Array]"}l(o_,"jN");function a_(a){return Ir&&zr?en(a)==="Int16Array":Kt(a)==="[object Int16Array]"}l(a_,"HN");function s_(a){return Ir&&zr?en(a)==="Int32Array":Kt(a)==="[object Int32Array]"}l(s_,"WN");function l_(a){return Ir&&zr?en(a)==="Float32Array":Kt(a)==="[object Float32Array]"}l(l_,"qN");function f_(a){return Ir&&zr?en(a)==="Float64Array":Kt(a)==="[object Float64Array]"}l(f_,"zN");function u_(a){return Ir&&zr?en(a)==="BigInt64Array":Kt(a)==="[object BigInt64Array]"}l(u_,"VN");function c_(a){return Ir&&zr?en(a)==="BigUint64Array":Kt(a)==="[object BigUint64Array]"}l(c_,"GN");function yl(a){return Kt(a)==="[object Map]"}l(yl,"up");function ml(a){return Kt(a)==="[object Set]"}l(ml,"cp");function wl(a){return Kt(a)==="[object WeakMap]"}l(wl,"hp");function hu(a){return Kt(a)==="[object WeakSet]"}l(hu,"Cb");function tf(a){return Kt(a)==="[object ArrayBuffer]"}l(tf,"Rp");function Xy(a){return typeof ArrayBuffer<"u"&&(tf.working?tf(a):a instanceof ArrayBuffer)}l(Xy,"vL");function rf(a){return Kt(a)==="[object DataView]"}l(rf,"Tp");function em(a){return typeof DataView<"u"&&(rf.working?rf(a):a instanceof DataView)}l(em,"bL");function nf(a){return Kt(a)==="[object SharedArrayBuffer]"}l(nf,"Fp");function tm(a){return typeof SharedArrayBuffer<"u"&&(nf.working?nf(a):a instanceof SharedArrayBuffer)}l(tm,"_L");function rm(a){return Qs(a,R8)}l(rm,"EL");function nm(a){return Qs(a,O8)}l(nm,"SL");function im(a){return Qs(a,k8)}l(im,"AL");function om(a){return v_&&Qs(a,xQ)}l(om,"RL");function am(a){return Ah&&Qs(a,OQ)}l(am,"TL");function hi(a,i){var f={seen:[],stylize:Jj};return arguments.length>=3&&(f.depth=arguments[2]),arguments.length>=4&&(f.colors=arguments[3]),ld(i)?f.showHidden=i:i&&at._extend(f,i),Gi(f.showHidden)&&(f.showHidden=!1),Gi(f.depth)&&(f.depth=2),Gi(f.colors)&&(f.colors=!1),Gi(f.customInspect)&&(f.customInspect=!0),f.colors&&(f.stylize=Kj),df(f,a,f.depth)}l(hi,"mo");function Kj(a,i){var f=hi.styles[i];return f?"\x1B["+hi.colors[f][0]+"m"+a+"\x1B["+hi.colors[f][1]+"m":a}l(Kj,"IQ");function Jj(a,i){return a}l(Jj,"kQ");function df(a,i,f){if(a.customInspect&&i&&lf(i.inspect)&&i.inspect!==at.inspect&&(!i.constructor||i.constructor.prototype!==i)){var g=i.inspect(f,a);return af(g)||(g=df(a,g,f)),g}var o=function(y,w){if(Gi(w))return y.stylize("undefined","undefined");if(af(w)){var _="'"+JSON.stringify(w).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return y.stylize(_,"string")}if(d_(w))return y.stylize(""+w,"number");if(ld(w))return y.stylize(""+w,"boolean");if(of(w))return y.stylize("null","null")}(a,i);if(o)return o;var n=Object.keys(i),r=function(y){var w={};return y.forEach(function(_,S){w[_]=!0}),w}(n);if(a.showHidden&&(n=Object.getOwnPropertyNames(i)),xs(i)&&(n.indexOf("message")>=0||n.indexOf("description")>=0))return bh(i);if(n.length===0){if(lf(i)){var u=i.name?": "+i.name:"";return a.stylize("[Function"+u+"]","special")}if(Bs(i))return a.stylize(RegExp.prototype.toString.call(i),"regexp");if(sf(i))return a.stylize(Date.prototype.toString.call(i),"date");if(xs(i))return bh(i)}var p,h="",d=!1,m=["{","}"];return h_(i)&&(d=!0,m=["[","]"]),lf(i)&&(h=" [Function"+(i.name?": "+i.name:"")+"]"),Bs(i)&&(h=" "+RegExp.prototype.toString.call(i)),sf(i)&&(h=" "+Date.prototype.toUTCString.call(i)),xs(i)&&(h=" "+bh(i)),n.length!==0||d&&i.length!=0?f<0?Bs(i)?a.stylize(RegExp.prototype.toString.call(i),"regexp"):a.stylize("[Object]","special"):(a.seen.push(i),p=d?function(y,w,_,S,T){for(var O=[],E=0,P=w.length;E<P;++E)e2(w,String(E))?O.push(vh(y,w,_,S,String(E),!0)):O.push("");return T.forEach(function(A){A.match(/^\d+$/)||O.push(vh(y,w,_,S,A,!0))}),O}(a,i,f,r,n):n.map(function(y){return vh(a,i,f,r,y,d)}),a.seen.pop(),function(y,w,_){var S=0;return y.reduce(function(T,O){return S++,O.indexOf(`
|
|
126
|
-
`)>=0&&S++,T+O.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?_[0]+(w===""?"":w+`
|
|
127
|
-
`)+" "+y.join(`,
|
|
128
|
-
`)+" "+_[1]:_[0]+w+" "+y.join(", ")+" "+_[1]}(p,h,m)):m[0]+h+m[1]}l(df,"xp");function bh(a){return"["+Error.prototype.toString.call(a)+"]"}l(bh,"Lb");function vh(a,i,f,g,o,n){var r,u,p;if((p=Object.getOwnPropertyDescriptor(i,o)||{value:i[o]}).get?u=p.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):p.set&&(u=a.stylize("[Setter]","special")),e2(g,o)||(r="["+o+"]"),u||(a.seen.indexOf(p.value)<0?(u=of(f)?df(a,p.value,null):df(a,p.value,f-1)).indexOf(`
|
|
129
|
-
`)>-1&&(u=n?u.split(`
|
|
130
|
-
`).map(function(h){return" "+h}).join(`
|
|
131
|
-
`).substr(2):`
|
|
132
|
-
`+u.split(`
|
|
133
|
-
`).map(function(h){return" "+h}).join(`
|
|
134
|
-
`)):u=a.stylize("[Circular]","special")),Gi(r)){if(n&&o.match(/^\d+$/))return u;(r=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(r=r.substr(1,r.length-2),r=a.stylize(r,"name")):(r=r.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),r=a.stylize(r,"string"))}return r+": "+u}l(vh,"Nb");function h_(a){return Array.isArray(a)}l(h_,"KN");function ld(a){return typeof a=="boolean"}l(ld,"R_");function of(a){return a===null}l(of,"kp");function d_(a){return typeof a=="number"}l(d_,"XN");function af(a){return typeof a=="string"}l(af,"Op");function Gi(a){return a===void 0}l(Gi,"xa");function Bs(a){return ua(a)&&Pd(a)==="[object RegExp]"}l(Bs,"hu");function ua(a){return typeof a=="object"&&a!==null}l(ua,"yl");function sf(a){return ua(a)&&Pd(a)==="[object Date]"}l(sf,"Pp");function xs(a){return ua(a)&&(Pd(a)==="[object Error]"||a instanceof Error)}l(xs,"du");function lf(a){return typeof a=="function"}l(lf,"Ep");function Pd(a){return Object.prototype.toString.call(a)}l(Pd,"T_");function _h(a){return a<10?"0"+a.toString(10):a.toString(10)}l(_h,"Db");function UB(){var a=new Date,i=[_h(a.getHours()),_h(a.getMinutes()),_h(a.getSeconds())].join(":");return[a.getDate(),T8[a.getMonth()],i].join(" ")}l(UB,"CQ");function e2(a,i){return Object.prototype.hasOwnProperty.call(a,i)}l(e2,"JN");function MB(a,i){if(!a){var f=new Error("Promise was rejected with a falsy value");f.reason=a,a=f}return i(a)}l(MB,"LQ");function $B(){if(__)return Rh;__=!0;var a=Rh={},i,f;function g(){throw new Error("setTimeout has not been defined")}l(g,"n"),e(g,"defaultSetTimout");function o(){throw new Error("clearTimeout has not been defined")}l(o,"a"),e(o,"defaultClearTimeout"),function(){try{typeof setTimeout=="function"?i=setTimeout:i=g}catch{i=g}try{typeof clearTimeout=="function"?f=clearTimeout:f=o}catch{f=o}}();function n(S){if(i===setTimeout)return setTimeout(S,0);if((i===g||!i)&&setTimeout)return i=setTimeout,setTimeout(S,0);try{return i(S,0)}catch{try{return i.call(null,S,0)}catch{return i.call(this||ta,S,0)}}}l(n,"s"),e(n,"runTimeout");function r(S){if(f===clearTimeout)return clearTimeout(S);if((f===o||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(S);try{return f(S)}catch{try{return f.call(null,S)}catch{return f.call(this||ta,S)}}}l(r,"i"),e(r,"runClearTimeout");var u=[],p=!1,h,d=-1;function m(){!p||!h||(p=!1,h.length?u=h.concat(u):d=-1,u.length&&y())}l(m,"y"),e(m,"cleanUpNextTick");function y(){if(!p){var S=n(m);p=!0;for(var T=u.length;T;){for(h=u,u=[];++d<T;)h&&h[d].run();d=-1,T=u.length}h=null,p=!1,r(S)}}l(y,"m"),e(y,"drainQueue"),a.nextTick=function(S){var T=new Array(arguments.length-1);if(arguments.length>1)for(var O=1;O<arguments.length;O++)T[O-1]=arguments[O];u.push(new w(S,T)),u.length===1&&!p&&n(y)};function w(S,T){(this||ta).fun=S,(this||ta).array=T}l(w,"g"),e(w,"Item"),w.prototype.run=function(){(this||ta).fun.apply(null,(this||ta).array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={};function _(){}return l(_,"v"),e(_,"noop"),a.on=_,a.addListener=_,a.once=_,a.off=_,a.removeListener=_,a.removeAllListeners=_,a.emit=_,a.prependListener=_,a.prependOnceListener=_,a.listeners=function(S){return[]},a.binding=function(S){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(S){throw new Error("process.chdir is not supported")},a.umask=function(){return 0},Rh}l($B,"NQ");function sm(a){var i=a.length;if(i%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=a.indexOf("=");return f===-1&&(f=i),[f,f===i?0:4-f%4]}l(sm,"IL");function WB(a,i,f){for(var g,o,n=[],r=i;r<f;r+=3)g=(a[r]<<16&16711680)+(a[r+1]<<8&65280)+(255&a[r+2]),n.push(gn[(o=g)>>18&63]+gn[o>>12&63]+gn[o>>6&63]+gn[63&o]);return n.join("")}l(WB,"DQ");function On(a){if(a>2147483647)throw new RangeError('The value "'+a+'" is invalid for option "size"');var i=new Uint8Array(a);return Object.setPrototypeOf(i,tt.prototype),i}l(On,"Si");function tt(a,i,f){if(typeof a=="number"){if(typeof i=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Eh(a)}return p_(a,i,f)}l(tt,"Te");function p_(a,i,f){if(typeof a=="string")return function(n,r){if(typeof r=="string"&&r!==""||(r="utf8"),!tt.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var u=0|y_(n,r),p=On(u),h=p.write(n,r);return h!==u&&(p=p.slice(0,h)),p}(a,i);if(ArrayBuffer.isView(a))return Sh(a);if(a==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof a);if(kn(a,ArrayBuffer)||a&&kn(a.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(kn(a,SharedArrayBuffer)||a&&kn(a.buffer,SharedArrayBuffer)))return Yj(a,i,f);if(typeof a=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var g=a.valueOf&&a.valueOf();if(g!=null&&g!==a)return tt.from(g,i,f);var o=function(n){if(tt.isBuffer(n)){var r=0|jd(n.length),u=On(r);return u.length===0||n.copy(u,0,0,r),u}if(n.length!==void 0)return typeof n.length!="number"||Cd(n.length)?On(0):Sh(n);if(n.type==="Buffer"&&Array.isArray(n.data))return Sh(n.data)}(a);if(o)return o;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof a[Symbol.toPrimitive]=="function")return tt.from(a[Symbol.toPrimitive]("string"),i,f);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof a)}l(p_,"QN");function g_(a){if(typeof a!="number")throw new TypeError('"size" argument must be of type number');if(a<0)throw new RangeError('The value "'+a+'" is invalid for option "size"')}l(g_,"eD");function Eh(a){return g_(a),On(a<0?0:0|jd(a))}l(Eh,"g_");function Sh(a){for(var i=a.length<0?0:0|jd(a.length),f=On(i),g=0;g<i;g+=1)f[g]=255&a[g];return f}l(Sh,"Mb");function Yj(a,i,f){if(i<0||a.byteLength<i)throw new RangeError('"offset" is outside of buffer bounds');if(a.byteLength<i+(f||0))throw new RangeError('"length" is outside of buffer bounds');var g;return g=i===void 0&&f===void 0?new Uint8Array(a):f===void 0?new Uint8Array(a,i):new Uint8Array(a,i,f),Object.setPrototypeOf(g,tt.prototype),g}l(Yj,"BL");function jd(a){if(a>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|a}l(jd,"F_");function y_(a,i){if(tt.isBuffer(a))return a.length;if(ArrayBuffer.isView(a)||kn(a,ArrayBuffer))return a.byteLength;if(typeof a!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof a);var f=a.length,g=arguments.length>2&&arguments[2]===!0;if(!g&&f===0)return 0;for(var o=!1;;)switch(i){case"ascii":case"latin1":case"binary":return f;case"utf8":case"utf-8":return fd(a).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*f;case"hex":return f>>>1;case"base64":return r2(a).length;default:if(o)return g?-1:fd(a).length;i=(""+i).toLowerCase(),o=!0}}l(y_,"tD");function zB(a,i,f){var g=!1;if((i===void 0||i<0)&&(i=0),i>this.length||((f===void 0||f>this.length)&&(f=this.length),f<=0)||(f>>>=0)<=(i>>>=0))return"";for(a||(a="utf8");;)switch(a){case"hex":return e8(this,i,f);case"utf8":case"utf-8":return b_(this,i,f);case"ascii":return Qj(this,i,f);case"latin1":case"binary":return Xj(this,i,f);case"base64":return Zj(this,i,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t8(this,i,f);default:if(g)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase(),g=!0}}l(zB,"MQ");function Fi(a,i,f){var g=a[i];a[i]=a[f],a[f]=g}l(Fi,"Ea");function lm(a,i,f,g,o){if(a.length===0)return-1;if(typeof f=="string"?(g=f,f=0):f>2147483647?f=2147483647:f<-2147483648&&(f=-2147483648),Cd(f=+f)&&(f=o?0:a.length-1),f<0&&(f=a.length+f),f>=a.length){if(o)return-1;f=a.length-1}else if(f<0){if(!o)return-1;f=0}if(typeof i=="string"&&(i=tt.from(i,g)),tt.isBuffer(i))return i.length===0?-1:m_(a,i,f,g,o);if(typeof i=="number")return i&=255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(a,i,f):Uint8Array.prototype.lastIndexOf.call(a,i,f):m_(a,[i],f,g,o);throw new TypeError("val must be string, number or Buffer")}l(lm,"CL");function m_(a,i,f,g,o){var n,r=1,u=a.length,p=i.length;if(g!==void 0&&((g=String(g).toLowerCase())==="ucs2"||g==="ucs-2"||g==="utf16le"||g==="utf-16le")){if(a.length<2||i.length<2)return-1;r=2,u/=2,p/=2,f/=2}function h(w,_){return r===1?w[_]:w.readUInt16BE(_*r)}if(l(h,"c"),e(h,"h5"),o){var d=-1;for(n=f;n<u;n++)if(h(a,n)===h(i,d===-1?0:n-d)){if(d===-1&&(d=n),n-d+1===p)return d*r}else d!==-1&&(n-=n-d),d=-1}else for(f+p>u&&(f=u-p),n=f;n>=0;n--){for(var m=!0,y=0;y<p;y++)if(h(a,n+y)!==h(i,y)){m=!1;break}if(m)return n}return-1}l(m_,"LL");function HB(a,i,f,g){f=Number(f)||0;var o=a.length-f;g?(g=Number(g))>o&&(g=o):g=o;var n=i.length;g>n/2&&(g=n/2);for(var r=0;r<g;++r){var u=parseInt(i.substr(2*r,2),16);if(Cd(u))return r;a[f+r]=u}return r}l(HB,"UQ");function qB(a,i,f,g){return Rf(fd(i,a.length-f),a,f,g)}l(qB,"jQ");function w_(a,i,f,g){return Rf(function(o){for(var n=[],r=0;r<o.length;++r)n.push(255&o.charCodeAt(r));return n}(i),a,f,g)}l(w_,"rD");function GB(a,i,f,g){return w_(a,i,f,g)}l(GB,"HQ");function VB(a,i,f,g){return Rf(r2(i),a,f,g)}l(VB,"WQ");function KB(a,i,f,g){return Rf(function(o,n){for(var r,u,p,h=[],d=0;d<o.length&&!((n-=2)<0);++d)r=o.charCodeAt(d),u=r>>8,p=r%256,h.push(p),h.push(u);return h}(i,a.length-f),a,f,g)}l(KB,"qQ");function Zj(a,i,f){return i===0&&f===a.length?ud.fromByteArray(a):ud.fromByteArray(a.slice(i,f))}l(Zj,"zQ");function b_(a,i,f){f=Math.min(a.length,f);for(var g=[],o=i;o<f;){var n,r,u,p,h=a[o],d=null,m=h>239?4:h>223?3:h>191?2:1;if(o+m<=f)switch(m){case 1:h<128&&(d=h);break;case 2:(192&(n=a[o+1]))==128&&(p=(31&h)<<6|63&n)>127&&(d=p);break;case 3:n=a[o+1],r=a[o+2],(192&n)==128&&(192&r)==128&&(p=(15&h)<<12|(63&n)<<6|63&r)>2047&&(p<55296||p>57343)&&(d=p);break;case 4:n=a[o+1],r=a[o+2],u=a[o+3],(192&n)==128&&(192&r)==128&&(192&u)==128&&(p=(15&h)<<18|(63&n)<<12|(63&r)<<6|63&u)>65535&&p<1114112&&(d=p)}d===null?(d=65533,m=1):d>65535&&(d-=65536,g.push(d>>>10&1023|55296),d=56320|1023&d),g.push(d),o+=m}return function(y){var w=y.length;if(w<=4096)return String.fromCharCode.apply(String,y);for(var _="",S=0;S<w;)_+=String.fromCharCode.apply(String,y.slice(S,S+=4096));return _}(g)}l(b_,"nD");function Qj(a,i,f){var g="";f=Math.min(a.length,f);for(var o=i;o<f;++o)g+=String.fromCharCode(127&a[o]);return g}l(Qj,"VQ");function Xj(a,i,f){var g="";f=Math.min(a.length,f);for(var o=i;o<f;++o)g+=String.fromCharCode(a[o]);return g}l(Xj,"GQ");function e8(a,i,f){var g=a.length;(!i||i<0)&&(i=0),(!f||f<0||f>g)&&(f=g);for(var o="",n=i;n<f;++n)o+=B8[a[n]];return o}l(e8,"YQ");function t8(a,i,f){for(var g=a.slice(i,f),o="",n=0;n<g.length;n+=2)o+=String.fromCharCode(g[n]+256*g[n+1]);return o}l(t8,"KQ");function lr(a,i,f){if(a%1!=0||a<0)throw new RangeError("offset is not uint");if(a+i>f)throw new RangeError("Trying to access beyond buffer length")}l(lr,"Ut");function Fr(a,i,f,g,o,n){if(!tt.isBuffer(a))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>o||i<n)throw new RangeError('"value" argument is out of bounds');if(f+g>a.length)throw new RangeError("Index out of range")}l(Fr,"Sr");function t2(a,i,f,g,o,n){if(f+g>a.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("Index out of range")}l(t2,"iD");function fm(a,i,f,g,o){return i=+i,f>>>=0,o||t2(a,0,f,4),ra.write(a,i,f,g,23,4),f+4}l(fm,"NL");function um(a,i,f,g,o){return i=+i,f>>>=0,o||t2(a,0,f,8),ra.write(a,i,f,g,52,8),f+8}l(um,"DL");function fd(a,i){var f;i=i||1/0;for(var g=a.length,o=null,n=[],r=0;r<g;++r){if((f=a.charCodeAt(r))>55295&&f<57344){if(!o){if(f>56319){(i-=3)>-1&&n.push(239,191,189);continue}if(r+1===g){(i-=3)>-1&&n.push(239,191,189);continue}o=f;continue}if(f<56320){(i-=3)>-1&&n.push(239,191,189),o=f;continue}f=65536+(o-55296<<10|f-56320)}else o&&(i-=3)>-1&&n.push(239,191,189);if(o=null,f<128){if((i-=1)<0)break;n.push(f)}else if(f<2048){if((i-=2)<0)break;n.push(f>>6|192,63&f|128)}else if(f<65536){if((i-=3)<0)break;n.push(f>>12|224,f>>6&63|128,63&f|128)}else{if(!(f<1114112))throw new Error("Invalid code point");if((i-=4)<0)break;n.push(f>>18|240,f>>12&63|128,f>>6&63|128,63&f|128)}}return n}l(fd,"w_");function r2(a){return ud.toByteArray(function(i){if((i=(i=i.split("=")[0]).trim().replace(F8,"")).length<2)return"";for(;i.length%4!=0;)i+="=";return i}(a))}l(r2,"oD");function Rf(a,i,f,g){for(var o=0;o<g&&!(o+f>=i.length||o>=a.length);++o)i[o+f]=a[o];return o}l(Rf,"Bp");function kn(a,i){return a instanceof i||a!=null&&a.constructor!=null&&a.constructor.name!=null&&a.constructor.name===i.name}l(kn,"Ai");function Cd(a){return a!=a}l(Cd,"x_");function cm(a,i){for(var f in a)i[f]=a[f]}l(cm,"$L");function Bi(a,i,f){return hn(a,i,f)}l(Bi,"Sa");function us(a){var i;switch(this.encoding=function(f){var g=function(o){if(!o)return"utf8";for(var n;;)switch(o){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 o;default:if(n)return;o=(""+o).toLowerCase(),n=!0}}(f);if(typeof g!="string"&&(hd.isEncoding===E_||!E_(f)))throw new Error("Unknown encoding: "+f);return g||f}(a),this.encoding){case"utf16le":this.text=n8,this.end=i8,i=4;break;case"utf8":this.fillLast=r8,i=4;break;case"base64":this.text=o8,this.end=a8,i=3;break;default:return this.write=s8,this.end=l8,void 0}this.lastNeed=0,this.lastTotal=0,this.lastChar=hd.allocUnsafe(i)}l(us,"su");function du(a){return a<=127?0:a>>5==6?2:a>>4==14?3:a>>3==30?4:a>>6==2?-1:-2}l(du,"Ub");function r8(a){var i=this.lastTotal-this.lastNeed,f=function(g,o,n){if((192&o[0])!=128)return g.lastNeed=0,"\uFFFD";if(g.lastNeed>1&&o.length>1){if((192&o[1])!=128)return g.lastNeed=1,"\uFFFD";if(g.lastNeed>2&&o.length>2&&(192&o[2])!=128)return g.lastNeed=2,"\uFFFD"}}(this,a);return f!==void 0?f:this.lastNeed<=a.length?(a.copy(this.lastChar,i,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(a.copy(this.lastChar,i,0,a.length),this.lastNeed-=a.length,void 0)}l(r8,"QQ");function n8(a,i){if((a.length-i)%2==0){var f=a.toString("utf16le",i);if(f){var g=f.charCodeAt(f.length-1);if(g>=55296&&g<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1],f.slice(0,-1)}return f}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=a[a.length-1],a.toString("utf16le",i,a.length-1)}l(n8,"e5");function i8(a){var i=a&&a.length?this.write(a):"";if(this.lastNeed){var f=this.lastTotal-this.lastNeed;return i+this.lastChar.toString("utf16le",0,f)}return i}l(i8,"t5");function o8(a,i){var f=(a.length-i)%3;return f===0?a.toString("base64",i):(this.lastNeed=3-f,this.lastTotal=3,f===1?this.lastChar[0]=a[a.length-1]:(this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1]),a.toString("base64",i,a.length-f))}l(o8,"r5");function a8(a){var i=a&&a.length?this.write(a):"";return this.lastNeed?i+this.lastChar.toString("base64",0,3-this.lastNeed):i}l(a8,"n5");function s8(a){return a.toString(this.encoding)}l(s8,"i5");function l8(a){return a&&a.length?this.write(a):""}l(l8,"o5");function f8(){if(S_)return Os;S_=!0,Os.byteLength=u,Os.toByteArray=h,Os.fromByteArray=y;for(var a=[],i=[],f=typeof Uint8Array<"u"?Uint8Array:Array,g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,n=g.length;o<n;++o)a[o]=g[o],i[g.charCodeAt(o)]=o;i[45]=62,i[95]=63;function r(w){var _=w.length;if(_%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var S=w.indexOf("=");S===-1&&(S=_);var T=S===_?0:4-S%4;return[S,T]}l(r,"i"),e(r,"getLens");function u(w){var _=r(w),S=_[0],T=_[1];return(S+T)*3/4-T}l(u,"f"),e(u,"byteLength");function p(w,_,S){return(_+S)*3/4-S}l(p,"h"),e(p,"_byteLength");function h(w){var _,S=r(w),T=S[0],O=S[1],E=new f(p(w,T,O)),P=0,A=O>0?T-4:T,x;for(x=0;x<A;x+=4)_=i[w.charCodeAt(x)]<<18|i[w.charCodeAt(x+1)]<<12|i[w.charCodeAt(x+2)]<<6|i[w.charCodeAt(x+3)],E[P++]=_>>16&255,E[P++]=_>>8&255,E[P++]=_&255;return O===2&&(_=i[w.charCodeAt(x)]<<2|i[w.charCodeAt(x+1)]>>4,E[P++]=_&255),O===1&&(_=i[w.charCodeAt(x)]<<10|i[w.charCodeAt(x+1)]<<4|i[w.charCodeAt(x+2)]>>2,E[P++]=_>>8&255,E[P++]=_&255),E}l(h,"c"),e(h,"toByteArray");function d(w){return a[w>>18&63]+a[w>>12&63]+a[w>>6&63]+a[w&63]}l(d,"d"),e(d,"tripletToBase64");function m(w,_,S){for(var T,O=[],E=_;E<S;E+=3)T=(w[E]<<16&16711680)+(w[E+1]<<8&65280)+(w[E+2]&255),O.push(d(T));return O.join("")}l(m,"y"),e(m,"encodeChunk");function y(w){for(var _,S=w.length,T=S%3,O=[],E=16383,P=0,A=S-T;P<A;P+=E)O.push(m(w,P,P+E>A?A:P+E));return T===1?(_=w[S-1],O.push(a[_>>2]+a[_<<4&63]+"==")):T===2&&(_=(w[S-2]<<8)+w[S-1],O.push(a[_>>10]+a[_>>4&63]+a[_<<2&63]+"=")),O.join("")}return l(y,"m"),e(y,"fromByteArray"),Os}l(f8,"a5");function u8(){return A_||(A_=!0,Oh.read=function(a,i,f,g,o){var n,r,u=o*8-g-1,p=(1<<u)-1,h=p>>1,d=-7,m=f?o-1:0,y=f?-1:1,w=a[i+m];for(m+=y,n=w&(1<<-d)-1,w>>=-d,d+=u;d>0;n=n*256+a[i+m],m+=y,d-=8);for(r=n&(1<<-d)-1,n>>=-d,d+=g;d>0;r=r*256+a[i+m],m+=y,d-=8);if(n===0)n=1-h;else{if(n===p)return r?NaN:(w?-1:1)*(1/0);r=r+Math.pow(2,g),n=n-h}return(w?-1:1)*r*Math.pow(2,n-g)},Oh.write=function(a,i,f,g,o,n){var r,u,p,h=n*8-o-1,d=(1<<h)-1,m=d>>1,y=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=g?0:n-1,_=g?1:-1,S=i<0||i===0&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(u=isNaN(i)?1:0,r=d):(r=Math.floor(Math.log(i)/Math.LN2),i*(p=Math.pow(2,-r))<1&&(r--,p*=2),r+m>=1?i+=y/p:i+=y*Math.pow(2,1-m),i*p>=2&&(r++,p/=2),r+m>=d?(u=0,r=d):r+m>=1?(u=(i*p-1)*Math.pow(2,o),r=r+m):(u=i*Math.pow(2,m-1)*Math.pow(2,o),r=0));o>=8;a[f+w]=u&255,w+=_,u/=256,o-=8);for(r=r<<o|u,h+=o;h>0;a[f+w]=r&255,w+=_,r/=256,h-=8);a[f+w-_]|=S*128}),Oh}l(u8,"s5");function JB(){if(R_)return $i;R_=!0;let a=f8(),i=u8(),f=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;$i.Buffer=r,$i.SlowBuffer=O,$i.INSPECT_MAX_BYTES=50;let g=2147483647;$i.kMaxLength=g,r.TYPED_ARRAY_SUPPORT=o(),!r.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 o(){try{let t=new Uint8Array(1),s={foo:e(function(){return 42},"foo")};return Object.setPrototypeOf(s,Uint8Array.prototype),Object.setPrototypeOf(t,s),t.foo()===42}catch{return!1}}l(o,"a"),e(o,"typedArraySupport"),Object.defineProperty(r.prototype,"parent",{enumerable:!0,get:e(function(){if(r.isBuffer(this))return this.buffer},"get")}),Object.defineProperty(r.prototype,"offset",{enumerable:!0,get:e(function(){if(r.isBuffer(this))return this.byteOffset},"get")});function n(t){if(t>g)throw new RangeError('The value "'+t+'" is invalid for option "size"');let s=new Uint8Array(t);return Object.setPrototypeOf(s,r.prototype),s}l(n,"s"),e(n,"createBuffer");function r(t,s,c){if(typeof t=="number"){if(typeof s=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(t)}return u(t,s,c)}l(r,"i"),e(r,"Buffer"),r.poolSize=8192;function u(t,s,c){if(typeof t=="string")return m(t,s);if(ArrayBuffer.isView(t))return w(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(Ie(t,ArrayBuffer)||t&&Ie(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(t,SharedArrayBuffer)||t&&Ie(t.buffer,SharedArrayBuffer)))return _(t,s,c);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let v=t.valueOf&&t.valueOf();if(v!=null&&v!==t)return r.from(v,s,c);let R=S(t);if(R)return R;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return r.from(t[Symbol.toPrimitive]("string"),s,c);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}l(u,"f"),e(u,"from"),r.from=function(t,s,c){return u(t,s,c)},Object.setPrototypeOf(r.prototype,Uint8Array.prototype),Object.setPrototypeOf(r,Uint8Array);function p(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"')}l(p,"h"),e(p,"assertSize");function h(t,s,c){return p(t),t<=0?n(t):s!==void 0?typeof c=="string"?n(t).fill(s,c):n(t).fill(s):n(t)}l(h,"c"),e(h,"alloc"),r.alloc=function(t,s,c){return h(t,s,c)};function d(t){return p(t),n(t<0?0:T(t)|0)}l(d,"d"),e(d,"allocUnsafe"),r.allocUnsafe=function(t){return d(t)},r.allocUnsafeSlow=function(t){return d(t)};function m(t,s){if((typeof s!="string"||s==="")&&(s="utf8"),!r.isEncoding(s))throw new TypeError("Unknown encoding: "+s);let c=E(t,s)|0,v=n(c),R=v.write(t,s);return R!==c&&(v=v.slice(0,R)),v}l(m,"y"),e(m,"fromString");function y(t){let s=t.length<0?0:T(t.length)|0,c=n(s);for(let v=0;v<s;v+=1)c[v]=t[v]&255;return c}l(y,"m"),e(y,"fromArrayLike");function w(t){if(Ie(t,Uint8Array)){let s=new Uint8Array(t);return _(s.buffer,s.byteOffset,s.byteLength)}return y(t)}l(w,"g"),e(w,"fromArrayView");function _(t,s,c){if(s<0||t.byteLength<s)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<s+(c||0))throw new RangeError('"length" is outside of buffer bounds');let v;return s===void 0&&c===void 0?v=new Uint8Array(t):c===void 0?v=new Uint8Array(t,s):v=new Uint8Array(t,s,c),Object.setPrototypeOf(v,r.prototype),v}l(_,"v"),e(_,"fromArrayBuffer");function S(t){if(r.isBuffer(t)){let s=T(t.length)|0,c=n(s);return c.length===0||t.copy(c,0,0,s),c}if(t.length!==void 0)return typeof t.length!="number"||ke(t.length)?n(0):y(t);if(t.type==="Buffer"&&Array.isArray(t.data))return y(t.data)}l(S,"_"),e(S,"fromObject");function T(t){if(t>=g)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+g.toString(16)+" bytes");return t|0}l(T,"b"),e(T,"checked");function O(t){return+t!=t&&(t=0),r.alloc(+t)}l(O,"E"),e(O,"SlowBuffer"),r.isBuffer=e(function(t){return t!=null&&t._isBuffer===!0&&t!==r.prototype},"isBuffer"),r.compare=e(function(t,s){if(Ie(t,Uint8Array)&&(t=r.from(t,t.offset,t.byteLength)),Ie(s,Uint8Array)&&(s=r.from(s,s.offset,s.byteLength)),!r.isBuffer(t)||!r.isBuffer(s))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===s)return 0;let c=t.length,v=s.length;for(let R=0,C=Math.min(c,v);R<C;++R)if(t[R]!==s[R]){c=t[R],v=s[R];break}return c<v?-1:v<c?1:0},"compare"),r.isEncoding=e(function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},"isEncoding"),r.concat=e(function(t,s){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return r.alloc(0);let c;if(s===void 0)for(s=0,c=0;c<t.length;++c)s+=t[c].length;let v=r.allocUnsafe(s),R=0;for(c=0;c<t.length;++c){let C=t[c];if(Ie(C,Uint8Array))R+C.length>v.length?(r.isBuffer(C)||(C=r.from(C)),C.copy(v,R)):Uint8Array.prototype.set.call(v,C,R);else if(r.isBuffer(C))C.copy(v,R);else throw new TypeError('"list" argument must be an Array of Buffers');R+=C.length}return v},"concat");function E(t,s){if(r.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Ie(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 c=t.length,v=arguments.length>2&&arguments[2]===!0;if(!v&&c===0)return 0;let R=!1;for(;;)switch(s){case"ascii":case"latin1":case"binary":return c;case"utf8":case"utf-8":return Ee(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c*2;case"hex":return c>>>1;case"base64":return ge(t).length;default:if(R)return v?-1:Ee(t).length;s=(""+s).toLowerCase(),R=!0}}l(E,"R"),e(E,"byteLength"),r.byteLength=E;function P(t,s,c){let v=!1;if((s===void 0||s<0)&&(s=0),s>this.length||((c===void 0||c>this.length)&&(c=this.length),c<=0)||(c>>>=0,s>>>=0,c<=s))return"";for(t||(t="utf8");;)switch(t){case"hex":return se(this,s,c);case"utf8":case"utf-8":return ae(this,s,c);case"ascii":return xe(this,s,c);case"latin1":case"binary":return Pe(this,s,c);case"base64":return re(this,s,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Te(this,s,c);default:if(v)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),v=!0}}l(P,"T"),e(P,"slowToString"),r.prototype._isBuffer=!0;function A(t,s,c){let v=t[s];t[s]=t[c],t[c]=v}l(A,"F"),e(A,"swap"),r.prototype.swap16=e(function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let s=0;s<t;s+=2)A(this,s,s+1);return this},"swap16"),r.prototype.swap32=e(function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let s=0;s<t;s+=4)A(this,s,s+3),A(this,s+1,s+2);return this},"swap32"),r.prototype.swap64=e(function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let s=0;s<t;s+=8)A(this,s,s+7),A(this,s+1,s+6),A(this,s+2,s+5),A(this,s+3,s+4);return this},"swap64"),r.prototype.toString=e(function(){let t=this.length;return t===0?"":arguments.length===0?ae(this,0,t):P.apply(this,arguments)},"toString"),r.prototype.toLocaleString=r.prototype.toString,r.prototype.equals=e(function(t){if(!r.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:r.compare(this,t)===0},"equals"),r.prototype.inspect=e(function(){let t="",s=$i.INSPECT_MAX_BYTES;return t=this.toString("hex",0,s).replace(/(.{2})/g,"$1 ").trim(),this.length>s&&(t+=" ... "),"<Buffer "+t+">"},"inspect"),f&&(r.prototype[f]=r.prototype.inspect),r.prototype.compare=e(function(t,s,c,v,R){if(Ie(t,Uint8Array)&&(t=r.from(t,t.offset,t.byteLength)),!r.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(s===void 0&&(s=0),c===void 0&&(c=t?t.length:0),v===void 0&&(v=0),R===void 0&&(R=this.length),s<0||c>t.length||v<0||R>this.length)throw new RangeError("out of range index");if(v>=R&&s>=c)return 0;if(v>=R)return-1;if(s>=c)return 1;if(s>>>=0,c>>>=0,v>>>=0,R>>>=0,this===t)return 0;let C=R-v,j=c-s,Z=Math.min(C,j),oe=this.slice(v,R),Ae=t.slice(s,c);for(let le=0;le<Z;++le)if(oe[le]!==Ae[le]){C=oe[le],j=Ae[le];break}return C<j?-1:j<C?1:0},"compare");function x(t,s,c,v,R){if(t.length===0)return-1;if(typeof c=="string"?(v=c,c=0):c>2147483647?c=2147483647:c<-2147483648&&(c=-2147483648),c=+c,ke(c)&&(c=R?0:t.length-1),c<0&&(c=t.length+c),c>=t.length){if(R)return-1;c=t.length-1}else if(c<0)if(R)c=0;else return-1;if(typeof s=="string"&&(s=r.from(s,v)),r.isBuffer(s))return s.length===0?-1:U(t,s,c,v,R);if(typeof s=="number")return s=s&255,typeof Uint8Array.prototype.indexOf=="function"?R?Uint8Array.prototype.indexOf.call(t,s,c):Uint8Array.prototype.lastIndexOf.call(t,s,c):U(t,[s],c,v,R);throw new TypeError("val must be string, number or Buffer")}l(x,"S"),e(x,"bidirectionalIndexOf");function U(t,s,c,v,R){let C=1,j=t.length,Z=s.length;if(v!==void 0&&(v=String(v).toLowerCase(),v==="ucs2"||v==="ucs-2"||v==="utf16le"||v==="utf-16le")){if(t.length<2||s.length<2)return-1;C=2,j/=2,Z/=2,c/=2}function oe(le,Fe){return C===1?le[Fe]:le.readUInt16BE(Fe*C)}l(oe,"re"),e(oe,"read");let Ae;if(R){let le=-1;for(Ae=c;Ae<j;Ae++)if(oe(t,Ae)===oe(s,le===-1?0:Ae-le)){if(le===-1&&(le=Ae),Ae-le+1===Z)return le*C}else le!==-1&&(Ae-=Ae-le),le=-1}else for(c+Z>j&&(c=j-Z),Ae=c;Ae>=0;Ae--){let le=!0;for(let Fe=0;Fe<Z;Fe++)if(oe(t,Ae+Fe)!==oe(s,Fe)){le=!1;break}if(le)return Ae}return-1}l(U,"B"),e(U,"arrayIndexOf"),r.prototype.includes=e(function(t,s,c){return this.indexOf(t,s,c)!==-1},"includes"),r.prototype.indexOf=e(function(t,s,c){return x(this,t,s,c,!0)},"indexOf"),r.prototype.lastIndexOf=e(function(t,s,c){return x(this,t,s,c,!1)},"lastIndexOf");function M(t,s,c,v){c=Number(c)||0;let R=t.length-c;v?(v=Number(v),v>R&&(v=R)):v=R;let C=s.length;v>C/2&&(v=C/2);let j;for(j=0;j<v;++j){let Z=parseInt(s.substr(j*2,2),16);if(ke(Z))return j;t[c+j]=Z}return j}l(M,"P"),e(M,"hexWrite");function ee(t,s,c,v){return Ne(Ee(s,t.length-c),t,c,v)}l(ee,"N"),e(ee,"utf8Write");function V(t,s,c,v){return Ne(Oe(s),t,c,v)}l(V,"L"),e(V,"asciiWrite");function q(t,s,c,v){return Ne(ge(s),t,c,v)}l(q,"C"),e(q,"base64Write");function G(t,s,c,v){return Ne(be(s,t.length-c),t,c,v)}l(G,"j"),e(G,"ucs2Write"),r.prototype.write=e(function(t,s,c,v){if(s===void 0)v="utf8",c=this.length,s=0;else if(c===void 0&&typeof s=="string")v=s,c=this.length,s=0;else if(isFinite(s))s=s>>>0,isFinite(c)?(c=c>>>0,v===void 0&&(v="utf8")):(v=c,c=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let R=this.length-s;if((c===void 0||c>R)&&(c=R),t.length>0&&(c<0||s<0)||s>this.length)throw new RangeError("Attempt to write outside buffer bounds");v||(v="utf8");let C=!1;for(;;)switch(v){case"hex":return M(this,t,s,c);case"utf8":case"utf-8":return ee(this,t,s,c);case"ascii":case"latin1":case"binary":return V(this,t,s,c);case"base64":return q(this,t,s,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,t,s,c);default:if(C)throw new TypeError("Unknown encoding: "+v);v=(""+v).toLowerCase(),C=!0}},"write"),r.prototype.toJSON=e(function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},"toJSON");function re(t,s,c){return s===0&&c===t.length?a.fromByteArray(t):a.fromByteArray(t.slice(s,c))}l(re,"q"),e(re,"base64Slice");function ae(t,s,c){c=Math.min(t.length,c);let v=[],R=s;for(;R<c;){let C=t[R],j=null,Z=C>239?4:C>223?3:C>191?2:1;if(R+Z<=c){let oe,Ae,le,Fe;switch(Z){case 1:C<128&&(j=C);break;case 2:oe=t[R+1],(oe&192)===128&&(Fe=(C&31)<<6|oe&63,Fe>127&&(j=Fe));break;case 3:oe=t[R+1],Ae=t[R+2],(oe&192)===128&&(Ae&192)===128&&(Fe=(C&15)<<12|(oe&63)<<6|Ae&63,Fe>2047&&(Fe<55296||Fe>57343)&&(j=Fe));break;case 4:oe=t[R+1],Ae=t[R+2],le=t[R+3],(oe&192)===128&&(Ae&192)===128&&(le&192)===128&&(Fe=(C&15)<<18|(oe&63)<<12|(Ae&63)<<6|le&63,Fe>65535&&Fe<1114112&&(j=Fe))}}j===null?(j=65533,Z=1):j>65535&&(j-=65536,v.push(j>>>10&1023|55296),j=56320|j&1023),v.push(j),R+=Z}return we(v)}l(ae,"Z"),e(ae,"utf8Slice");let de=4096;function we(t){let s=t.length;if(s<=de)return String.fromCharCode.apply(String,t);let c="",v=0;for(;v<s;)c+=String.fromCharCode.apply(String,t.slice(v,v+=de));return c}l(we,"se"),e(we,"decodeCodePointsArray");function xe(t,s,c){let v="";c=Math.min(t.length,c);for(let R=s;R<c;++R)v+=String.fromCharCode(t[R]&127);return v}l(xe,"_e"),e(xe,"asciiSlice");function Pe(t,s,c){let v="";c=Math.min(t.length,c);for(let R=s;R<c;++R)v+=String.fromCharCode(t[R]);return v}l(Pe,"pe"),e(Pe,"latin1Slice");function se(t,s,c){let v=t.length;(!s||s<0)&&(s=0),(!c||c<0||c>v)&&(c=v);let R="";for(let C=s;C<c;++C)R+=Ce[t[C]];return R}l(se,"Q"),e(se,"hexSlice");function Te(t,s,c){let v=t.slice(s,c),R="";for(let C=0;C<v.length-1;C+=2)R+=String.fromCharCode(v[C]+v[C+1]*256);return R}l(Te,"he"),e(Te,"utf16leSlice"),r.prototype.slice=e(function(t,s){let c=this.length;t=~~t,s=s===void 0?c:~~s,t<0?(t+=c,t<0&&(t=0)):t>c&&(t=c),s<0?(s+=c,s<0&&(s=0)):s>c&&(s=c),s<t&&(s=t);let v=this.subarray(t,s);return Object.setPrototypeOf(v,r.prototype),v},"slice");function J(t,s,c){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+s>c)throw new RangeError("Trying to access beyond buffer length")}l(J,"U"),e(J,"checkOffset"),r.prototype.readUintLE=r.prototype.readUIntLE=e(function(t,s,c){t=t>>>0,s=s>>>0,c||J(t,s,this.length);let v=this[t],R=1,C=0;for(;++C<s&&(R*=256);)v+=this[t+C]*R;return v},"readUIntLE"),r.prototype.readUintBE=r.prototype.readUIntBE=e(function(t,s,c){t=t>>>0,s=s>>>0,c||J(t,s,this.length);let v=this[t+--s],R=1;for(;s>0&&(R*=256);)v+=this[t+--s]*R;return v},"readUIntBE"),r.prototype.readUint8=r.prototype.readUInt8=e(function(t,s){return t=t>>>0,s||J(t,1,this.length),this[t]},"readUInt8"),r.prototype.readUint16LE=r.prototype.readUInt16LE=e(function(t,s){return t=t>>>0,s||J(t,2,this.length),this[t]|this[t+1]<<8},"readUInt16LE"),r.prototype.readUint16BE=r.prototype.readUInt16BE=e(function(t,s){return t=t>>>0,s||J(t,2,this.length),this[t]<<8|this[t+1]},"readUInt16BE"),r.prototype.readUint32LE=r.prototype.readUInt32LE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},"readUInt32LE"),r.prototype.readUint32BE=r.prototype.readUInt32BE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},"readUInt32BE"),r.prototype.readBigUInt64LE=$e(e(function(t){t=t>>>0,N(t,"offset");let s=this[t],c=this[t+7];(s===void 0||c===void 0)&&I(t,this.length-8);let v=s+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,R=this[++t]+this[++t]*2**8+this[++t]*2**16+c*2**24;return BigInt(v)+(BigInt(R)<<BigInt(32))},"readBigUInt64LE")),r.prototype.readBigUInt64BE=$e(e(function(t){t=t>>>0,N(t,"offset");let s=this[t],c=this[t+7];(s===void 0||c===void 0)&&I(t,this.length-8);let v=s*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],R=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+c;return(BigInt(v)<<BigInt(32))+BigInt(R)},"readBigUInt64BE")),r.prototype.readIntLE=e(function(t,s,c){t=t>>>0,s=s>>>0,c||J(t,s,this.length);let v=this[t],R=1,C=0;for(;++C<s&&(R*=256);)v+=this[t+C]*R;return R*=128,v>=R&&(v-=Math.pow(2,8*s)),v},"readIntLE"),r.prototype.readIntBE=e(function(t,s,c){t=t>>>0,s=s>>>0,c||J(t,s,this.length);let v=s,R=1,C=this[t+--v];for(;v>0&&(R*=256);)C+=this[t+--v]*R;return R*=128,C>=R&&(C-=Math.pow(2,8*s)),C},"readIntBE"),r.prototype.readInt8=e(function(t,s){return t=t>>>0,s||J(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},"readInt8"),r.prototype.readInt16LE=e(function(t,s){t=t>>>0,s||J(t,2,this.length);let c=this[t]|this[t+1]<<8;return c&32768?c|4294901760:c},"readInt16LE"),r.prototype.readInt16BE=e(function(t,s){t=t>>>0,s||J(t,2,this.length);let c=this[t+1]|this[t]<<8;return c&32768?c|4294901760:c},"readInt16BE"),r.prototype.readInt32LE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},"readInt32LE"),r.prototype.readInt32BE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},"readInt32BE"),r.prototype.readBigInt64LE=$e(e(function(t){t=t>>>0,N(t,"offset");let s=this[t],c=this[t+7];(s===void 0||c===void 0)&&I(t,this.length-8);let v=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(c<<24);return(BigInt(v)<<BigInt(32))+BigInt(s+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)},"readBigInt64LE")),r.prototype.readBigInt64BE=$e(e(function(t){t=t>>>0,N(t,"offset");let s=this[t],c=this[t+7];(s===void 0||c===void 0)&&I(t,this.length-8);let v=(s<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(v)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+c)},"readBigInt64BE")),r.prototype.readFloatLE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),i.read(this,t,!0,23,4)},"readFloatLE"),r.prototype.readFloatBE=e(function(t,s){return t=t>>>0,s||J(t,4,this.length),i.read(this,t,!1,23,4)},"readFloatBE"),r.prototype.readDoubleLE=e(function(t,s){return t=t>>>0,s||J(t,8,this.length),i.read(this,t,!0,52,8)},"readDoubleLE"),r.prototype.readDoubleBE=e(function(t,s){return t=t>>>0,s||J(t,8,this.length),i.read(this,t,!1,52,8)},"readDoubleBE");function ue(t,s,c,v,R,C){if(!r.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(s>R||s<C)throw new RangeError('"value" argument is out of bounds');if(c+v>t.length)throw new RangeError("Index out of range")}l(ue,"J"),e(ue,"checkInt"),r.prototype.writeUintLE=r.prototype.writeUIntLE=e(function(t,s,c,v){if(t=+t,s=s>>>0,c=c>>>0,!v){let j=Math.pow(2,8*c)-1;ue(this,t,s,c,j,0)}let R=1,C=0;for(this[s]=t&255;++C<c&&(R*=256);)this[s+C]=t/R&255;return s+c},"writeUIntLE"),r.prototype.writeUintBE=r.prototype.writeUIntBE=e(function(t,s,c,v){if(t=+t,s=s>>>0,c=c>>>0,!v){let j=Math.pow(2,8*c)-1;ue(this,t,s,c,j,0)}let R=c-1,C=1;for(this[s+R]=t&255;--R>=0&&(C*=256);)this[s+R]=t/C&255;return s+c},"writeUIntBE"),r.prototype.writeUint8=r.prototype.writeUInt8=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,1,255,0),this[s]=t&255,s+1},"writeUInt8"),r.prototype.writeUint16LE=r.prototype.writeUInt16LE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,2,65535,0),this[s]=t&255,this[s+1]=t>>>8,s+2},"writeUInt16LE"),r.prototype.writeUint16BE=r.prototype.writeUInt16BE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,2,65535,0),this[s]=t>>>8,this[s+1]=t&255,s+2},"writeUInt16BE"),r.prototype.writeUint32LE=r.prototype.writeUInt32LE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,4,4294967295,0),this[s+3]=t>>>24,this[s+2]=t>>>16,this[s+1]=t>>>8,this[s]=t&255,s+4},"writeUInt32LE"),r.prototype.writeUint32BE=r.prototype.writeUInt32BE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,4,4294967295,0),this[s]=t>>>24,this[s+1]=t>>>16,this[s+2]=t>>>8,this[s+3]=t&255,s+4},"writeUInt32BE");function te(t,s,c,v,R){ve(s,v,R,t,c,7);let C=Number(s&BigInt(4294967295));t[c++]=C,C=C>>8,t[c++]=C,C=C>>8,t[c++]=C,C=C>>8,t[c++]=C;let j=Number(s>>BigInt(32)&BigInt(4294967295));return t[c++]=j,j=j>>8,t[c++]=j,j=j>>8,t[c++]=j,j=j>>8,t[c++]=j,c}l(te,"z"),e(te,"wrtBigUInt64LE");function X(t,s,c,v,R){ve(s,v,R,t,c,7);let C=Number(s&BigInt(4294967295));t[c+7]=C,C=C>>8,t[c+6]=C,C=C>>8,t[c+5]=C,C=C>>8,t[c+4]=C;let j=Number(s>>BigInt(32)&BigInt(4294967295));return t[c+3]=j,j=j>>8,t[c+2]=j,j=j>>8,t[c+1]=j,j=j>>8,t[c]=j,c+8}l(X,"V"),e(X,"wrtBigUInt64BE"),r.prototype.writeBigUInt64LE=$e(e(function(t,s=0){return te(this,t,s,BigInt(0),BigInt("0xffffffffffffffff"))},"writeBigUInt64LE")),r.prototype.writeBigUInt64BE=$e(e(function(t,s=0){return X(this,t,s,BigInt(0),BigInt("0xffffffffffffffff"))},"writeBigUInt64BE")),r.prototype.writeIntLE=e(function(t,s,c,v){if(t=+t,s=s>>>0,!v){let Z=Math.pow(2,8*c-1);ue(this,t,s,c,Z-1,-Z)}let R=0,C=1,j=0;for(this[s]=t&255;++R<c&&(C*=256);)t<0&&j===0&&this[s+R-1]!==0&&(j=1),this[s+R]=(t/C>>0)-j&255;return s+c},"writeIntLE"),r.prototype.writeIntBE=e(function(t,s,c,v){if(t=+t,s=s>>>0,!v){let Z=Math.pow(2,8*c-1);ue(this,t,s,c,Z-1,-Z)}let R=c-1,C=1,j=0;for(this[s+R]=t&255;--R>=0&&(C*=256);)t<0&&j===0&&this[s+R+1]!==0&&(j=1),this[s+R]=(t/C>>0)-j&255;return s+c},"writeIntBE"),r.prototype.writeInt8=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,1,127,-128),t<0&&(t=255+t+1),this[s]=t&255,s+1},"writeInt8"),r.prototype.writeInt16LE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,2,32767,-32768),this[s]=t&255,this[s+1]=t>>>8,s+2},"writeInt16LE"),r.prototype.writeInt16BE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,2,32767,-32768),this[s]=t>>>8,this[s+1]=t&255,s+2},"writeInt16BE"),r.prototype.writeInt32LE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,4,2147483647,-2147483648),this[s]=t&255,this[s+1]=t>>>8,this[s+2]=t>>>16,this[s+3]=t>>>24,s+4},"writeInt32LE"),r.prototype.writeInt32BE=e(function(t,s,c){return t=+t,s=s>>>0,c||ue(this,t,s,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[s]=t>>>24,this[s+1]=t>>>16,this[s+2]=t>>>8,this[s+3]=t&255,s+4},"writeInt32BE"),r.prototype.writeBigInt64LE=$e(e(function(t,s=0){return te(this,t,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))},"writeBigInt64LE")),r.prototype.writeBigInt64BE=$e(e(function(t,s=0){return X(this,t,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))},"writeBigInt64BE"));function ye(t,s,c,v,R,C){if(c+v>t.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("Index out of range")}l(ye,"G"),e(ye,"checkIEEE754");function Re(t,s,c,v,R){return s=+s,c=c>>>0,R||ye(t,s,c,4),i.write(t,s,c,v,23,4),c+4}l(Re,"fe"),e(Re,"writeFloat"),r.prototype.writeFloatLE=e(function(t,s,c){return Re(this,t,s,!0,c)},"writeFloatLE"),r.prototype.writeFloatBE=e(function(t,s,c){return Re(this,t,s,!1,c)},"writeFloatBE");function De(t,s,c,v,R){return s=+s,c=c>>>0,R||ye(t,s,c,8),i.write(t,s,c,v,52,8),c+8}l(De,"be"),e(De,"writeDouble"),r.prototype.writeDoubleLE=e(function(t,s,c){return De(this,t,s,!0,c)},"writeDoubleLE"),r.prototype.writeDoubleBE=e(function(t,s,c){return De(this,t,s,!1,c)},"writeDoubleBE"),r.prototype.copy=e(function(t,s,c,v){if(!r.isBuffer(t))throw new TypeError("argument should be a Buffer");if(c||(c=0),!v&&v!==0&&(v=this.length),s>=t.length&&(s=t.length),s||(s=0),v>0&&v<c&&(v=c),v===c||t.length===0||this.length===0)return 0;if(s<0)throw new RangeError("targetStart out of bounds");if(c<0||c>=this.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("sourceEnd out of bounds");v>this.length&&(v=this.length),t.length-s<v-c&&(v=t.length-s+c);let R=v-c;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(s,c,v):Uint8Array.prototype.set.call(t,this.subarray(c,v),s),R},"copy"),r.prototype.fill=e(function(t,s,c,v){if(typeof t=="string"){if(typeof s=="string"?(v=s,s=0,c=this.length):typeof c=="string"&&(v=c,c=this.length),v!==void 0&&typeof v!="string")throw new TypeError("encoding must be a string");if(typeof v=="string"&&!r.isEncoding(v))throw new TypeError("Unknown encoding: "+v);if(t.length===1){let C=t.charCodeAt(0);(v==="utf8"&&C<128||v==="latin1")&&(t=C)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(s<0||this.length<s||this.length<c)throw new RangeError("Out of range index");if(c<=s)return this;s=s>>>0,c=c===void 0?this.length:c>>>0,t||(t=0);let R;if(typeof t=="number")for(R=s;R<c;++R)this[R]=t;else{let C=r.isBuffer(t)?t:r.from(t,v),j=C.length;if(j===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(R=0;R<c-s;++R)this[R+s]=C[R%j]}return this},"fill");let Y={};function H(t,s,c){var R;var v;Y[t]=(v=(R=class extends c{constructor(){super(),Object.defineProperty(this,"message",{value:s.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(j){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:j,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}},l(R,"w"),R),e(v,"NodeError"),v)}l(H,"$"),e(H,"E3"),H("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),H("ERR_INVALID_ARG_TYPE",function(t,s){return`The "${t}" argument must be of type number. Received type ${typeof s}`},TypeError),H("ERR_OUT_OF_RANGE",function(t,s,c){let v=`The value of "${t}" is out of range.`,R=c;return Number.isInteger(c)&&Math.abs(c)>2**32?R=Q(String(c)):typeof c=="bigint"&&(R=String(c),(c>BigInt(2)**BigInt(32)||c<-(BigInt(2)**BigInt(32)))&&(R=Q(R)),R+="n"),v+=` It must be ${s}. Received ${R}`,v},RangeError);function Q(t){let s="",c=t.length,v=t[0]==="-"?1:0;for(;c>=v+4;c-=3)s=`_${t.slice(c-3,c)}${s}`;return`${t.slice(0,c)}${s}`}l(Q,"H"),e(Q,"addNumericalSeparator");function fe(t,s,c){N(s,"offset"),(t[s]===void 0||t[s+c]===void 0)&&I(s,t.length-(c+1))}l(fe,"te"),e(fe,"checkBounds");function ve(t,s,c,v,R,C){if(t>c||t<s){let j=typeof s=="bigint"?"n":"",Z;throw s===0||s===BigInt(0)?Z=`>= 0${j} and < 2${j} ** ${(C+1)*8}${j}`:Z=`>= -(2${j} ** ${(C+1)*8-1}${j}) and < 2 ** ${(C+1)*8-1}${j}`,new Y.ERR_OUT_OF_RANGE("value",Z,t)}fe(v,R,C)}l(ve,"oe"),e(ve,"checkIntBI");function N(t,s){if(typeof t!="number")throw new Y.ERR_INVALID_ARG_TYPE(s,"number",t)}l(N,"I"),e(N,"validateNumber");function I(t,s,c){throw Math.floor(t)!==t?(N(t,c),new Y.ERR_OUT_OF_RANGE("offset","an integer",t)):s<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${s}`,t)}l(I,"x"),e(I,"boundsError");let D=/[^+/0-9A-Za-z-_]/g;function z(t){if(t=t.split("=")[0],t=t.trim().replace(D,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}l(z,"Y"),e(z,"base64clean");function Ee(t,s){s=s||1/0;let c,v=t.length,R=null,C=[];for(let j=0;j<v;++j){if(c=t.charCodeAt(j),c>55295&&c<57344){if(!R){if(c>56319){(s-=3)>-1&&C.push(239,191,189);continue}else if(j+1===v){(s-=3)>-1&&C.push(239,191,189);continue}R=c;continue}if(c<56320){(s-=3)>-1&&C.push(239,191,189),R=c;continue}c=(R-55296<<10|c-56320)+65536}else R&&(s-=3)>-1&&C.push(239,191,189);if(R=null,c<128){if((s-=1)<0)break;C.push(c)}else if(c<2048){if((s-=2)<0)break;C.push(c>>6|192,c&63|128)}else if(c<65536){if((s-=3)<0)break;C.push(c>>12|224,c>>6&63|128,c&63|128)}else if(c<1114112){if((s-=4)<0)break;C.push(c>>18|240,c>>12&63|128,c>>6&63|128,c&63|128)}else throw new Error("Invalid code point")}return C}l(Ee,"ue"),e(Ee,"utf8ToBytes");function Oe(t){let s=[];for(let c=0;c<t.length;++c)s.push(t.charCodeAt(c)&255);return s}l(Oe,"le"),e(Oe,"asciiToBytes");function be(t,s){let c,v,R,C=[];for(let j=0;j<t.length&&!((s-=2)<0);++j)c=t.charCodeAt(j),v=c>>8,R=c%256,C.push(R),C.push(v);return C}l(be,"ee"),e(be,"utf16leToBytes");function ge(t){return a.toByteArray(z(t))}l(ge,"ie"),e(ge,"base64ToBytes");function Ne(t,s,c,v){let R;for(R=0;R<v&&!(R+c>=s.length||R>=t.length);++R)s[R+c]=t[R];return R}l(Ne,"me"),e(Ne,"blitBuffer");function Ie(t,s){return t instanceof s||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===s.name}l(Ie,"ye"),e(Ie,"isInstance");function ke(t){return t!==t}l(ke,"ve"),e(ke,"numberIsNaN");let Ce=function(){let t="0123456789abcdef",s=new Array(256);for(let c=0;c<16;++c){let v=c*16;for(let R=0;R<16;++R)s[v+R]=t[c]+t[R]}return s}();function $e(t){return typeof BigInt>"u"?Ke:t}l($e,"Be"),e($e,"defineBigIntMethod");function Ke(){throw new Error("BigInt not supported")}return l(Ke,"Je"),e(Ke,"BufferBigIntNotDefined"),$i}l(JB,"l5");function Ji(){return O_||(O_=!0,typeof Object.create=="function"?kh=e(function(a,i){i&&(a.super_=i,a.prototype=Object.create(i.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}))},"inherits"):kh=e(function(a,i){if(i){a.super_=i;var f=e(function(){},"TempCtor");f.prototype=i.prototype,a.prototype=new f,a.prototype.constructor=a}},"inherits")),kh}l(Ji,"Pa");function n2(){return T_||(T_=!0,k_=pn.EventEmitter),k_}l(n2,"aD");function c8(){if(F_)return Th;F_=!0;function a(y,w){var _=Object.keys(y);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(y);w&&(S=S.filter(function(T){return Object.getOwnPropertyDescriptor(y,T).enumerable})),_.push.apply(_,S)}return _}l(a,"e"),e(a,"ownKeys");function i(y){for(var w=1;w<arguments.length;w++){var _=arguments[w]!=null?arguments[w]:{};w%2?a(Object(_),!0).forEach(function(S){f(y,S,_[S])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(_)):a(Object(_)).forEach(function(S){Object.defineProperty(y,S,Object.getOwnPropertyDescriptor(_,S))})}return y}l(i,"t"),e(i,"_objectSpread");function f(y,w,_){return w in y?Object.defineProperty(y,w,{value:_,enumerable:!0,configurable:!0,writable:!0}):y[w]=_,y}l(f,"r"),e(f,"_defineProperty");function g(y,w){if(!(y instanceof w))throw new TypeError("Cannot call a class as a function")}l(g,"n"),e(g,"_classCallCheck");function o(y,w){for(var _=0;_<w.length;_++){var S=w[_];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(y,S.key,S)}}l(o,"a"),e(o,"_defineProperties");function n(y,w,_){return w&&o(y.prototype,w),y}l(n,"s"),e(n,"_createClass");var r=gi,u=r.Buffer,p=at,h=p.inspect,d=h&&h.custom||"inspect";function m(y,w,_){u.prototype.copy.call(y,w,_)}return l(m,"y"),e(m,"copyBuffer"),Th=function(){function y(){g(this,y),this.head=null,this.tail=null,this.length=0}return l(y,"m"),e(y,"BufferList"),n(y,[{key:"push",value:e(function(w){var _={data:w,next:null};this.length>0?this.tail.next=_:this.head=_,this.tail=_,++this.length},"push")},{key:"unshift",value:e(function(w){var _={data:w,next:this.head};this.length===0&&(this.tail=_),this.head=_,++this.length},"unshift")},{key:"shift",value:e(function(){if(this.length!==0){var w=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,w}},"shift")},{key:"clear",value:e(function(){this.head=this.tail=null,this.length=0},"clear")},{key:"join",value:e(function(w){if(this.length===0)return"";for(var _=this.head,S=""+_.data;_=_.next;)S+=w+_.data;return S},"join")},{key:"concat",value:e(function(w){if(this.length===0)return u.alloc(0);for(var _=u.allocUnsafe(w>>>0),S=this.head,T=0;S;)m(S.data,_,T),T+=S.data.length,S=S.next;return _},"concat")},{key:"consume",value:e(function(w,_){var S;return w<this.head.data.length?(S=this.head.data.slice(0,w),this.head.data=this.head.data.slice(w)):w===this.head.data.length?S=this.shift():S=_?this._getString(w):this._getBuffer(w),S},"consume")},{key:"first",value:e(function(){return this.head.data},"first")},{key:"_getString",value:e(function(w){var _=this.head,S=1,T=_.data;for(w-=T.length;_=_.next;){var O=_.data,E=w>O.length?O.length:w;if(E===O.length?T+=O:T+=O.slice(0,w),w-=E,w===0){E===O.length?(++S,_.next?this.head=_.next:this.head=this.tail=null):(this.head=_,_.data=O.slice(E));break}++S}return this.length-=S,T},"_getString")},{key:"_getBuffer",value:e(function(w){var _=u.allocUnsafe(w),S=this.head,T=1;for(S.data.copy(_),w-=S.data.length;S=S.next;){var O=S.data,E=w>O.length?O.length:w;if(O.copy(_,_.length-w,0,E),w-=E,w===0){E===O.length?(++T,S.next?this.head=S.next:this.head=this.tail=null):(this.head=S,S.data=O.slice(E));break}++T}return this.length-=T,_},"_getBuffer")},{key:d,value:e(function(w,_){return h(this,i({},_,{depth:0,customInspect:!1}))},"value")}]),y}(),Th}l(c8,"f5");function i2(){if(B_)return Fh;B_=!0;var a=Tt;function i(u,p){var h=this,d=this._readableState&&this._readableState.destroyed,m=this._writableState&&this._writableState.destroyed;return d||m?(p?p(u):u&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,a.nextTick(n,this,u)):a.nextTick(n,this,u)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(u||null,function(y){!p&&y?h._writableState?h._writableState.errorEmitted?a.nextTick(g,h):(h._writableState.errorEmitted=!0,a.nextTick(f,h,y)):a.nextTick(f,h,y):p?(a.nextTick(g,h),p(y)):a.nextTick(g,h)}),this)}l(i,"t"),e(i,"destroy");function f(u,p){n(u,p),g(u)}l(f,"r"),e(f,"emitErrorAndCloseNT");function g(u){u._writableState&&!u._writableState.emitClose||u._readableState&&!u._readableState.emitClose||u.emit("close")}l(g,"n"),e(g,"emitCloseNT");function o(){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)}l(o,"a"),e(o,"undestroy");function n(u,p){u.emit("error",p)}l(n,"s"),e(n,"emitErrorNT");function r(u,p){var h=u._readableState,d=u._writableState;h&&h.autoDestroy||d&&d.autoDestroy?u.destroy(p):u.emit("error",p)}return l(r,"i"),e(r,"errorOrDestroy"),Fh={destroy:i,undestroy:o,errorOrDestroy:r},Fh}l(i2,"sD");function Pa(){if(x_)return Bh;x_=!0;let a={};function i(r,u,p){var y;p||(p=Error);function h(w,_,S){return typeof u=="string"?u:u(w,_,S)}l(h,"c"),e(h,"getMessage");let d=(y=class extends p{constructor(_,S,T){super(h(_,S,T))}},l(y,"y"),y);e(d,"NodeError");let m=d;m.prototype.name=p.name,m.prototype.code=r,a[r]=m}l(i,"t"),e(i,"createErrorType");function f(r,u){if(Array.isArray(r)){let p=r.length;return r=r.map(h=>String(h)),p>2?`one of ${u} ${r.slice(0,p-1).join(", ")}, or `+r[p-1]:p===2?`one of ${u} ${r[0]} or ${r[1]}`:`of ${u} ${r[0]}`}else return`of ${u} ${String(r)}`}l(f,"r"),e(f,"oneOf");function g(r,u,p){return r.substr(0,u.length)===u}l(g,"n"),e(g,"startsWith");function o(r,u,p){return(p===void 0||p>r.length)&&(p=r.length),r.substring(p-u.length,p)===u}l(o,"a"),e(o,"endsWith");function n(r,u,p){return typeof p!="number"&&(p=0),p+u.length>r.length?!1:r.indexOf(u,p)!==-1}return l(n,"s"),e(n,"includes"),i("ERR_INVALID_OPT_VALUE",function(r,u){return'The value "'+u+'" is invalid for option "'+r+'"'},TypeError),i("ERR_INVALID_ARG_TYPE",function(r,u,p){let h;typeof u=="string"&&g(u,"not ")?(h="must not be",u=u.replace(/^not /,"")):h="must be";let d;if(o(r," argument"))d=`The ${r} ${h} ${f(u,"type")}`;else{let m=n(r,".")?"property":"argument";d=`The "${r}" ${m} ${h} ${f(u,"type")}`}return d+=`. Received type ${typeof p}`,d},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(r){return"The "+r+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(r){return"Cannot call "+r+" after a stream was destroyed"}),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",function(r){return"Unknown encoding: "+r},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Bh.codes=a,Bh}l(Pa,"ml");function o2(){if(I_)return xh;I_=!0;var a=Pa().codes.ERR_INVALID_OPT_VALUE;function i(g,o,n){return g.highWaterMark!=null?g.highWaterMark:o?g[n]:null}l(i,"t"),e(i,"highWaterMarkFrom");function f(g,o,n,r){var u=i(o,r,n);if(u!=null){if(!(isFinite(u)&&Math.floor(u)===u)||u<0){var p=r?n:"highWaterMark";throw new a(p,u)}return Math.floor(u)}return g.objectMode?16:16*1024}return l(f,"r"),e(f,"getHighWaterMark"),xh={getHighWaterMark:f},xh}l(o2,"lD");function h8(){if(P_)return Ih;P_=!0,Ih=a;function a(f,g){if(i("noDeprecation"))return f;var o=!1;function n(){if(!o){if(i("throwDeprecation"))throw new Error(g);i("traceDeprecation")?console.trace(g):console.warn(g),o=!0}return f.apply(this||Ph,arguments)}return l(n,"s"),e(n,"deprecated"),n}l(a,"e"),e(a,"deprecate");function i(f){try{if(!Ph.localStorage)return!1}catch{return!1}var g=Ph.localStorage[f];return g==null?!1:String(g).toLowerCase()==="true"}return l(i,"t"),e(i,"config"),Ih}l(h8,"u5");function a2(){if(j_)return jh;j_=!0;var a=Tt;jh=V;function i(Y){var H=this;this.next=null,this.entry=null,this.finish=function(){De(H,Y)}}l(i,"t"),e(i,"CorkedRequest");var f;V.WritableState=M;var g={deprecate:h8()},o=n2(),n=gi.Buffer,r=x8.Uint8Array||function(){};function u(Y){return n.from(Y)}l(u,"f"),e(u,"_uint8ArrayToBuffer");function p(Y){return n.isBuffer(Y)||Y instanceof r}l(p,"h"),e(p,"_isUint8Array");var h=i2(),d=o2(),m=d.getHighWaterMark,y=Pa().codes,w=y.ERR_INVALID_ARG_TYPE,_=y.ERR_METHOD_NOT_IMPLEMENTED,S=y.ERR_MULTIPLE_CALLBACK,T=y.ERR_STREAM_CANNOT_PIPE,O=y.ERR_STREAM_DESTROYED,E=y.ERR_STREAM_NULL_VALUES,P=y.ERR_STREAM_WRITE_AFTER_END,A=y.ERR_UNKNOWN_ENCODING,x=h.errorOrDestroy;Ji()(V,o);function U(){}l(U,"B"),e(U,"nop");function M(Y,H,Q){f=f||Oa(),Y=Y||{},typeof Q!="boolean"&&(Q=H instanceof f),this.objectMode=!!Y.objectMode,Q&&(this.objectMode=this.objectMode||!!Y.writableObjectMode),this.highWaterMark=m(this,Y,"writableHighWaterMark",Q),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var fe=Y.decodeStrings===!1;this.decodeStrings=!fe,this.defaultEncoding=Y.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ve){Pe(H,ve)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Y.emitClose!==!1,this.autoDestroy=!!Y.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}l(M,"P"),e(M,"WritableState"),M.prototype.getBuffer=e(function(){for(var Y=this.bufferedRequest,H=[];Y;)H.push(Y),Y=Y.next;return H},"getBuffer"),function(){try{Object.defineProperty(M.prototype,"buffer",{get:g.deprecate(e(function(){return this.getBuffer()},"writableStateBufferGetter"),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var ee;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ee=Function.prototype[Symbol.hasInstance],Object.defineProperty(V,Symbol.hasInstance,{value:e(function(Y){return ee.call(this,Y)?!0:this!==V?!1:Y&&Y._writableState instanceof M},"value")})):ee=e(function(Y){return Y instanceof this},"realHasInstance2");function V(Y){f=f||Oa();var H=this instanceof f;if(!H&&!ee.call(V,this))return new V(Y);this._writableState=new M(Y,this,H),this.writable=!0,Y&&(typeof Y.write=="function"&&(this._write=Y.write),typeof Y.writev=="function"&&(this._writev=Y.writev),typeof Y.destroy=="function"&&(this._destroy=Y.destroy),typeof Y.final=="function"&&(this._final=Y.final)),o.call(this)}l(V,"L"),e(V,"Writable"),V.prototype.pipe=function(){x(this,new T)};function q(Y,H){var Q=new P;x(Y,Q),a.nextTick(H,Q)}l(q,"C"),e(q,"writeAfterEnd");function G(Y,H,Q,fe){var ve;return Q===null?ve=new E:typeof Q!="string"&&!H.objectMode&&(ve=new w("chunk",["string","Buffer"],Q)),ve?(x(Y,ve),a.nextTick(fe,ve),!1):!0}l(G,"j"),e(G,"validChunk"),V.prototype.write=function(Y,H,Q){var fe=this._writableState,ve=!1,N=!fe.objectMode&&p(Y);return N&&!n.isBuffer(Y)&&(Y=u(Y)),typeof H=="function"&&(Q=H,H=null),N?H="buffer":H||(H=fe.defaultEncoding),typeof Q!="function"&&(Q=U),fe.ending?q(this,Q):(N||G(this,fe,Y,Q))&&(fe.pendingcb++,ve=ae(this,fe,N,Y,H,Q)),ve},V.prototype.cork=function(){this._writableState.corked++},V.prototype.uncork=function(){var Y=this._writableState;Y.corked&&(Y.corked--,!Y.writing&&!Y.corked&&!Y.bufferProcessing&&Y.bufferedRequest&&J(this,Y))},V.prototype.setDefaultEncoding=e(function(Y){if(typeof Y=="string"&&(Y=Y.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Y+"").toLowerCase())>-1))throw new A(Y);return this._writableState.defaultEncoding=Y,this},"setDefaultEncoding"),Object.defineProperty(V.prototype,"writableBuffer",{enumerable:!1,get:e(function(){return this._writableState&&this._writableState.getBuffer()},"get2")});function re(Y,H,Q){return!Y.objectMode&&Y.decodeStrings!==!1&&typeof H=="string"&&(H=n.from(H,Q)),H}l(re,"q"),e(re,"decodeChunk"),Object.defineProperty(V.prototype,"writableHighWaterMark",{enumerable:!1,get:e(function(){return this._writableState.highWaterMark},"get2")});function ae(Y,H,Q,fe,ve,N){if(!Q){var I=re(H,fe,ve);fe!==I&&(Q=!0,ve="buffer",fe=I)}var D=H.objectMode?1:fe.length;H.length+=D;var z=H.length<H.highWaterMark;if(z||(H.needDrain=!0),H.writing||H.corked){var Ee=H.lastBufferedRequest;H.lastBufferedRequest={chunk:fe,encoding:ve,isBuf:Q,callback:N,next:null},Ee?Ee.next=H.lastBufferedRequest:H.bufferedRequest=H.lastBufferedRequest,H.bufferedRequestCount+=1}else de(Y,H,!1,D,fe,ve,N);return z}l(ae,"Z"),e(ae,"writeOrBuffer");function de(Y,H,Q,fe,ve,N,I){H.writelen=fe,H.writecb=I,H.writing=!0,H.sync=!0,H.destroyed?H.onwrite(new O("write")):Q?Y._writev(ve,H.onwrite):Y._write(ve,N,H.onwrite),H.sync=!1}l(de,"K"),e(de,"doWrite");function we(Y,H,Q,fe,ve){--H.pendingcb,Q?(a.nextTick(ve,fe),a.nextTick(ye,Y,H),Y._writableState.errorEmitted=!0,x(Y,fe)):(ve(fe),Y._writableState.errorEmitted=!0,x(Y,fe),ye(Y,H))}l(we,"se"),e(we,"onwriteError");function xe(Y){Y.writing=!1,Y.writecb=null,Y.length-=Y.writelen,Y.writelen=0}l(xe,"_e"),e(xe,"onwriteStateUpdate");function Pe(Y,H){var Q=Y._writableState,fe=Q.sync,ve=Q.writecb;if(typeof ve!="function")throw new S;if(xe(Q),H)we(Y,Q,fe,H,ve);else{var N=ue(Q)||Y.destroyed;!N&&!Q.corked&&!Q.bufferProcessing&&Q.bufferedRequest&&J(Y,Q),fe?a.nextTick(se,Y,Q,N,ve):se(Y,Q,N,ve)}}l(Pe,"pe"),e(Pe,"onwrite");function se(Y,H,Q,fe){Q||Te(Y,H),H.pendingcb--,fe(),ye(Y,H)}l(se,"Q"),e(se,"afterWrite");function Te(Y,H){H.length===0&&H.needDrain&&(H.needDrain=!1,Y.emit("drain"))}l(Te,"he"),e(Te,"onwriteDrain");function J(Y,H){H.bufferProcessing=!0;var Q=H.bufferedRequest;if(Y._writev&&Q&&Q.next){var fe=H.bufferedRequestCount,ve=new Array(fe),N=H.corkedRequestsFree;N.entry=Q;for(var I=0,D=!0;Q;)ve[I]=Q,Q.isBuf||(D=!1),Q=Q.next,I+=1;ve.allBuffers=D,de(Y,H,!0,H.length,ve,"",N.finish),H.pendingcb++,H.lastBufferedRequest=null,N.next?(H.corkedRequestsFree=N.next,N.next=null):H.corkedRequestsFree=new i(H),H.bufferedRequestCount=0}else{for(;Q;){var z=Q.chunk,Ee=Q.encoding,Oe=Q.callback,be=H.objectMode?1:z.length;if(de(Y,H,!1,be,z,Ee,Oe),Q=Q.next,H.bufferedRequestCount--,H.writing)break}Q===null&&(H.lastBufferedRequest=null)}H.bufferedRequest=Q,H.bufferProcessing=!1}l(J,"U"),e(J,"clearBuffer"),V.prototype._write=function(Y,H,Q){Q(new _("_write()"))},V.prototype._writev=null,V.prototype.end=function(Y,H,Q){var fe=this._writableState;return typeof Y=="function"?(Q=Y,Y=null,H=null):typeof H=="function"&&(Q=H,H=null),Y!=null&&this.write(Y,H),fe.corked&&(fe.corked=1,this.uncork()),fe.ending||Re(this,fe,Q),this},Object.defineProperty(V.prototype,"writableLength",{enumerable:!1,get:e(function(){return this._writableState.length},"get2")});function ue(Y){return Y.ending&&Y.length===0&&Y.bufferedRequest===null&&!Y.finished&&!Y.writing}l(ue,"J"),e(ue,"needFinish");function te(Y,H){Y._final(function(Q){H.pendingcb--,Q&&x(Y,Q),H.prefinished=!0,Y.emit("prefinish"),ye(Y,H)})}l(te,"z"),e(te,"callFinal");function X(Y,H){!H.prefinished&&!H.finalCalled&&(typeof Y._final=="function"&&!H.destroyed?(H.pendingcb++,H.finalCalled=!0,a.nextTick(te,Y,H)):(H.prefinished=!0,Y.emit("prefinish")))}l(X,"V"),e(X,"prefinish");function ye(Y,H){var Q=ue(H);if(Q&&(X(Y,H),H.pendingcb===0&&(H.finished=!0,Y.emit("finish"),H.autoDestroy))){var fe=Y._readableState;(!fe||fe.autoDestroy&&fe.endEmitted)&&Y.destroy()}return Q}l(ye,"G"),e(ye,"finishMaybe");function Re(Y,H,Q){H.ending=!0,ye(Y,H),Q&&(H.finished?a.nextTick(Q):Y.once("finish",Q)),H.ended=!0,Y.writable=!1}l(Re,"fe"),e(Re,"endWritable");function De(Y,H,Q){var fe=Y.entry;for(Y.entry=null;fe;){var ve=fe.callback;H.pendingcb--,ve(Q),fe=fe.next}H.corkedRequestsFree.next=Y}return l(De,"be"),e(De,"onCorkedFinish"),Object.defineProperty(V.prototype,"destroyed",{enumerable:!1,get:e(function(){return this._writableState===void 0?!1:this._writableState.destroyed},"get2"),set:e(function(Y){this._writableState&&(this._writableState.destroyed=Y)},"set")}),V.prototype.destroy=h.destroy,V.prototype._undestroy=h.undestroy,V.prototype._destroy=function(Y,H){H(Y)},jh}l(a2,"fD");function Oa(){if(C_)return Ch;C_=!0;var a=Tt,i=Object.keys||function(d){var m=[];for(var y in d)m.push(y);return m};Ch=u;var f=s2(),g=a2();Ji()(u,f);for(var o=i(g.prototype),n=0;n<o.length;n++){var r=o[n];u.prototype[r]||(u.prototype[r]=g.prototype[r])}function u(d){if(!(this instanceof u))return new u(d);f.call(this,d),g.call(this,d),this.allowHalfOpen=!0,d&&(d.readable===!1&&(this.readable=!1),d.writable===!1&&(this.writable=!1),d.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",p)))}l(u,"f"),e(u,"Duplex"),Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:e(function(){return this._writableState.highWaterMark},"get2")}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:e(function(){return this._writableState&&this._writableState.getBuffer()},"get2")}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:e(function(){return this._writableState.length},"get2")});function p(){this._writableState.ended||a.nextTick(h,this)}l(p,"h"),e(p,"onend");function h(d){d.end()}return l(h,"c"),e(h,"onEndNT"),Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:e(function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},"get2"),set:e(function(d){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=d,this._writableState.destroyed=d)},"set")}),Ch}l(Oa,"pl");function Ld(){if(L_)return Lh;L_=!0;var a=Pa().codes.ERR_STREAM_PREMATURE_CLOSE;function i(n){var r=!1;return function(){if(!r){r=!0;for(var u=arguments.length,p=new Array(u),h=0;h<u;h++)p[h]=arguments[h];n.apply(this,p)}}}l(i,"t"),e(i,"once");function f(){}l(f,"r"),e(f,"noop");function g(n){return n.setHeader&&typeof n.abort=="function"}l(g,"n"),e(g,"isRequest");function o(n,r,u){if(typeof r=="function")return o(n,null,r);r||(r={}),u=i(u||f);var p=r.readable||r.readable!==!1&&n.readable,h=r.writable||r.writable!==!1&&n.writable,d=e(function(){n.writable||y()},"onlegacyfinish2"),m=n._writableState&&n._writableState.finished,y=e(function(){h=!1,m=!0,p||u.call(n)},"onfinish2"),w=n._readableState&&n._readableState.endEmitted,_=e(function(){p=!1,w=!0,h||u.call(n)},"onend2"),S=e(function(E){u.call(n,E)},"onerror2"),T=e(function(){var E;if(p&&!w)return(!n._readableState||!n._readableState.ended)&&(E=new a),u.call(n,E);if(h&&!m)return(!n._writableState||!n._writableState.ended)&&(E=new a),u.call(n,E)},"onclose2"),O=e(function(){n.req.on("finish",y)},"onrequest2");return g(n)?(n.on("complete",y),n.on("abort",T),n.req?O():n.on("request",O)):h&&!n._writableState&&(n.on("end",d),n.on("close",d)),n.on("end",_),n.on("finish",y),r.error!==!1&&n.on("error",S),n.on("close",T),function(){n.removeListener("complete",y),n.removeListener("abort",T),n.removeListener("request",O),n.req&&n.req.removeListener("finish",y),n.removeListener("end",d),n.removeListener("close",d),n.removeListener("finish",y),n.removeListener("end",_),n.removeListener("error",S),n.removeListener("close",T)}}return l(o,"a"),e(o,"eos"),Lh=o,Lh}l(Ld,"O_");function d8(){if(N_)return Nh;N_=!0;var a=Tt,i;function f(E,P,A){return P in E?Object.defineProperty(E,P,{value:A,enumerable:!0,configurable:!0,writable:!0}):E[P]=A,E}l(f,"r"),e(f,"_defineProperty");var g=Ld(),o=Symbol("lastResolve"),n=Symbol("lastReject"),r=Symbol("error"),u=Symbol("ended"),p=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function m(E,P){return{value:E,done:P}}l(m,"y"),e(m,"createIterResult");function y(E){var P=E[o];if(P!==null){var A=E[d].read();A!==null&&(E[p]=null,E[o]=null,E[n]=null,P(m(A,!1)))}}l(y,"m"),e(y,"readAndResolve");function w(E){a.nextTick(y,E)}l(w,"g"),e(w,"onReadable");function _(E,P){return function(A,x){E.then(function(){if(P[u]){A(m(void 0,!0));return}P[h](A,x)},x)}}l(_,"v"),e(_,"wrapForNext");var S=Object.getPrototypeOf(function(){}),T=Object.setPrototypeOf((i={get stream(){return this[d]},next:e(function(){var E=this,P=this[r];if(P!==null)return Promise.reject(P);if(this[u])return Promise.resolve(m(void 0,!0));if(this[d].destroyed)return new Promise(function(M,ee){a.nextTick(function(){E[r]?ee(E[r]):M(m(void 0,!0))})});var A=this[p],x;if(A)x=new Promise(_(A,this));else{var U=this[d].read();if(U!==null)return Promise.resolve(m(U,!1));x=new Promise(this[h])}return this[p]=x,x},"next")},f(i,Symbol.asyncIterator,function(){return this}),f(i,"return",e(function(){var E=this;return new Promise(function(P,A){E[d].destroy(null,function(x){if(x){A(x);return}P(m(void 0,!0))})})},"_return")),i),S),O=e(function(E){var P,A=Object.create(T,(P={},f(P,d,{value:E,writable:!0}),f(P,o,{value:null,writable:!0}),f(P,n,{value:null,writable:!0}),f(P,r,{value:null,writable:!0}),f(P,u,{value:E._readableState.endEmitted,writable:!0}),f(P,h,{value:e(function(x,U){var M=A[d].read();M?(A[p]=null,A[o]=null,A[n]=null,x(m(M,!1))):(A[o]=x,A[n]=U)},"value"),writable:!0}),P));return A[p]=null,g(E,function(x){if(x&&x.code!=="ERR_STREAM_PREMATURE_CLOSE"){var U=A[n];U!==null&&(A[p]=null,A[o]=null,A[n]=null,U(x)),A[r]=x;return}var M=A[o];M!==null&&(A[p]=null,A[o]=null,A[n]=null,M(m(void 0,!0))),A[u]=!0}),E.on("readable",w.bind(null,A)),A},"createReadableStreamAsyncIterator2");return Nh=O,Nh}l(d8,"h5");function p8(){return U_||(U_=!0,D_=e(function(){throw new Error("Readable.from is not available in the browser")},"exports$4")),D_}l(p8,"d5");function s2(){if(M_)return Dh;M_=!0;var a=Tt;Dh=q;var i;q.ReadableState=V,pn.EventEmitter;var f=e(function(N,I){return N.listeners(I).length},"EElistenerCount2"),g=n2(),o=gi.Buffer,n=I8.Uint8Array||function(){};function r(N){return o.from(N)}l(r,"i"),e(r,"_uint8ArrayToBuffer");function u(N){return o.isBuffer(N)||N instanceof n}l(u,"f"),e(u,"_isUint8Array");var p=at,h;p&&p.debuglog?h=p.debuglog("stream"):h=e(function(){},"debug2");var d=c8(),m=i2(),y=o2(),w=y.getHighWaterMark,_=Pa().codes,S=_.ERR_INVALID_ARG_TYPE,T=_.ERR_STREAM_PUSH_AFTER_EOF,O=_.ERR_METHOD_NOT_IMPLEMENTED,E=_.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,P,A,x;Ji()(q,g);var U=m.errorOrDestroy,M=["error","close","destroy","pause","resume"];function ee(N,I,D){if(typeof N.prependListener=="function")return N.prependListener(I,D);!N._events||!N._events[I]?N.on(I,D):Array.isArray(N._events[I])?N._events[I].unshift(D):N._events[I]=[D,N._events[I]]}l(ee,"N"),e(ee,"prependListener");function V(N,I,D){i=i||Oa(),N=N||{},typeof D!="boolean"&&(D=I instanceof i),this.objectMode=!!N.objectMode,D&&(this.objectMode=this.objectMode||!!N.readableObjectMode),this.highWaterMark=w(this,N,"readableHighWaterMark",D),this.buffer=new d,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=N.emitClose!==!1,this.autoDestroy=!!N.autoDestroy,this.destroyed=!1,this.defaultEncoding=N.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,N.encoding&&(P||(P=cd.StringDecoder),this.decoder=new P(N.encoding),this.encoding=N.encoding)}l(V,"L"),e(V,"ReadableState");function q(N){if(i=i||Oa(),!(this instanceof q))return new q(N);var I=this instanceof i;this._readableState=new V(N,this,I),this.readable=!0,N&&(typeof N.read=="function"&&(this._read=N.read),typeof N.destroy=="function"&&(this._destroy=N.destroy)),g.call(this)}l(q,"C"),e(q,"Readable"),Object.defineProperty(q.prototype,"destroyed",{enumerable:!1,get:e(function(){return this._readableState===void 0?!1:this._readableState.destroyed},"get2"),set:e(function(N){this._readableState&&(this._readableState.destroyed=N)},"set")}),q.prototype.destroy=m.destroy,q.prototype._undestroy=m.undestroy,q.prototype._destroy=function(N,I){I(N)},q.prototype.push=function(N,I){var D=this._readableState,z;return D.objectMode?z=!0:typeof N=="string"&&(I=I||D.defaultEncoding,I!==D.encoding&&(N=o.from(N,I),I=""),z=!0),G(this,N,I,!1,z)},q.prototype.unshift=function(N){return G(this,N,null,!0,!1)};function G(N,I,D,z,Ee){h("readableAddChunk",I);var Oe=N._readableState;if(I===null)Oe.reading=!1,Pe(N,Oe);else{var be;if(Ee||(be=ae(Oe,I)),be)U(N,be);else if(Oe.objectMode||I&&I.length>0)if(typeof I!="string"&&!Oe.objectMode&&Object.getPrototypeOf(I)!==o.prototype&&(I=r(I)),z)Oe.endEmitted?U(N,new E):re(N,Oe,I,!0);else if(Oe.ended)U(N,new T);else{if(Oe.destroyed)return!1;Oe.reading=!1,Oe.decoder&&!D?(I=Oe.decoder.write(I),Oe.objectMode||I.length!==0?re(N,Oe,I,!1):J(N,Oe)):re(N,Oe,I,!1)}else z||(Oe.reading=!1,J(N,Oe))}return!Oe.ended&&(Oe.length<Oe.highWaterMark||Oe.length===0)}l(G,"j"),e(G,"readableAddChunk");function re(N,I,D,z){I.flowing&&I.length===0&&!I.sync?(I.awaitDrain=0,N.emit("data",D)):(I.length+=I.objectMode?1:D.length,z?I.buffer.unshift(D):I.buffer.push(D),I.needReadable&&se(N)),J(N,I)}l(re,"q"),e(re,"addChunk");function ae(N,I){var D;return!u(I)&&typeof I!="string"&&I!==void 0&&!N.objectMode&&(D=new S("chunk",["string","Buffer","Uint8Array"],I)),D}l(ae,"Z"),e(ae,"chunkInvalid"),q.prototype.isPaused=function(){return this._readableState.flowing===!1},q.prototype.setEncoding=function(N){P||(P=cd.StringDecoder);var I=new P(N);this._readableState.decoder=I,this._readableState.encoding=this._readableState.decoder.encoding;for(var D=this._readableState.buffer.head,z="";D!==null;)z+=I.write(D.data),D=D.next;return this._readableState.buffer.clear(),z!==""&&this._readableState.buffer.push(z),this._readableState.length=z.length,this};var de=1073741824;function we(N){return N>=de?N=de:(N--,N|=N>>>1,N|=N>>>2,N|=N>>>4,N|=N>>>8,N|=N>>>16,N++),N}l(we,"se"),e(we,"computeNewHighWaterMark");function xe(N,I){return N<=0||I.length===0&&I.ended?0:I.objectMode?1:N!==N?I.flowing&&I.length?I.buffer.head.data.length:I.length:(N>I.highWaterMark&&(I.highWaterMark=we(N)),N<=I.length?N:I.ended?I.length:(I.needReadable=!0,0))}l(xe,"_e"),e(xe,"howMuchToRead"),q.prototype.read=function(N){h("read",N),N=parseInt(N,10);var I=this._readableState,D=N;if(N!==0&&(I.emittedReadable=!1),N===0&&I.needReadable&&((I.highWaterMark!==0?I.length>=I.highWaterMark:I.length>0)||I.ended))return h("read: emitReadable",I.length,I.ended),I.length===0&&I.ended?Q(this):se(this),null;if(N=xe(N,I),N===0&&I.ended)return I.length===0&&Q(this),null;var z=I.needReadable;h("need readable",z),(I.length===0||I.length-N<I.highWaterMark)&&(z=!0,h("length less than watermark",z)),I.ended||I.reading?(z=!1,h("reading or ended",z)):z&&(h("do read"),I.reading=!0,I.sync=!0,I.length===0&&(I.needReadable=!0),this._read(I.highWaterMark),I.sync=!1,I.reading||(N=xe(D,I)));var Ee;return N>0?Ee=H(N,I):Ee=null,Ee===null?(I.needReadable=I.length<=I.highWaterMark,N=0):(I.length-=N,I.awaitDrain=0),I.length===0&&(I.ended||(I.needReadable=!0),D!==N&&I.ended&&Q(this)),Ee!==null&&this.emit("data",Ee),Ee};function Pe(N,I){if(h("onEofChunk"),!I.ended){if(I.decoder){var D=I.decoder.end();D&&D.length&&(I.buffer.push(D),I.length+=I.objectMode?1:D.length)}I.ended=!0,I.sync?se(N):(I.needReadable=!1,I.emittedReadable||(I.emittedReadable=!0,Te(N)))}}l(Pe,"pe"),e(Pe,"onEofChunk");function se(N){var I=N._readableState;h("emitReadable",I.needReadable,I.emittedReadable),I.needReadable=!1,I.emittedReadable||(h("emitReadable",I.flowing),I.emittedReadable=!0,a.nextTick(Te,N))}l(se,"Q"),e(se,"emitReadable");function Te(N){var I=N._readableState;h("emitReadable_",I.destroyed,I.length,I.ended),!I.destroyed&&(I.length||I.ended)&&(N.emit("readable"),I.emittedReadable=!1),I.needReadable=!I.flowing&&!I.ended&&I.length<=I.highWaterMark,Y(N)}l(Te,"he"),e(Te,"emitReadable_");function J(N,I){I.readingMore||(I.readingMore=!0,a.nextTick(ue,N,I))}l(J,"U"),e(J,"maybeReadMore");function ue(N,I){for(;!I.reading&&!I.ended&&(I.length<I.highWaterMark||I.flowing&&I.length===0);){var D=I.length;if(h("maybeReadMore read 0"),N.read(0),D===I.length)break}I.readingMore=!1}l(ue,"J"),e(ue,"maybeReadMore_"),q.prototype._read=function(N){U(this,new O("_read()"))},q.prototype.pipe=function(N,I){var D=this,z=this._readableState;switch(z.pipesCount){case 0:z.pipes=N;break;case 1:z.pipes=[z.pipes,N];break;default:z.pipes.push(N);break}z.pipesCount+=1,h("pipe count=%d opts=%j",z.pipesCount,I);var Ee=(!I||I.end!==!1)&&N!==a.stdout&&N!==a.stderr,Oe=Ee?ge:s;z.endEmitted?a.nextTick(Oe):D.once("end",Oe),N.on("unpipe",be);function be(c,v){h("onunpipe"),c===D&&v&&v.hasUnpiped===!1&&(v.hasUnpiped=!0,ke())}l(be,"ee"),e(be,"onunpipe");function ge(){h("onend"),N.end()}l(ge,"ie"),e(ge,"onend");var Ne=te(D);N.on("drain",Ne);var Ie=!1;function ke(){h("cleanup"),N.removeListener("close",Ke),N.removeListener("finish",t),N.removeListener("drain",Ne),N.removeListener("error",$e),N.removeListener("unpipe",be),D.removeListener("end",ge),D.removeListener("end",s),D.removeListener("data",Ce),Ie=!0,z.awaitDrain&&(!N._writableState||N._writableState.needDrain)&&Ne()}l(ke,"ve"),e(ke,"cleanup"),D.on("data",Ce);function Ce(c){h("ondata");var v=N.write(c);h("dest.write",v),v===!1&&((z.pipesCount===1&&z.pipes===N||z.pipesCount>1&&ve(z.pipes,N)!==-1)&&!Ie&&(h("false write response, pause",z.awaitDrain),z.awaitDrain++),D.pause())}l(Ce,"Me"),e(Ce,"ondata");function $e(c){h("onerror",c),s(),N.removeListener("error",$e),f(N,"error")===0&&U(N,c)}l($e,"Be"),e($e,"onerror"),ee(N,"error",$e);function Ke(){N.removeListener("finish",t),s()}l(Ke,"Je"),e(Ke,"onclose"),N.once("close",Ke);function t(){h("onfinish"),N.removeListener("close",Ke),s()}l(t,"p"),e(t,"onfinish"),N.once("finish",t);function s(){h("unpipe"),D.unpipe(N)}return l(s,"l"),e(s,"unpipe"),N.emit("pipe",D),z.flowing||(h("pipe resume"),D.resume()),N};function te(N){return e(function(){var I=N._readableState;h("pipeOnDrain",I.awaitDrain),I.awaitDrain&&I.awaitDrain--,I.awaitDrain===0&&f(N,"data")&&(I.flowing=!0,Y(N))},"pipeOnDrainFunctionResult")}l(te,"z"),e(te,"pipeOnDrain"),q.prototype.unpipe=function(N){var I=this._readableState,D={hasUnpiped:!1};if(I.pipesCount===0)return this;if(I.pipesCount===1)return N&&N!==I.pipes?this:(N||(N=I.pipes),I.pipes=null,I.pipesCount=0,I.flowing=!1,N&&N.emit("unpipe",this,D),this);if(!N){var z=I.pipes,Ee=I.pipesCount;I.pipes=null,I.pipesCount=0,I.flowing=!1;for(var Oe=0;Oe<Ee;Oe++)z[Oe].emit("unpipe",this,{hasUnpiped:!1});return this}var be=ve(I.pipes,N);return be===-1?this:(I.pipes.splice(be,1),I.pipesCount-=1,I.pipesCount===1&&(I.pipes=I.pipes[0]),N.emit("unpipe",this,D),this)},q.prototype.on=function(N,I){var D=g.prototype.on.call(this,N,I),z=this._readableState;return N==="data"?(z.readableListening=this.listenerCount("readable")>0,z.flowing!==!1&&this.resume()):N==="readable"&&!z.endEmitted&&!z.readableListening&&(z.readableListening=z.needReadable=!0,z.flowing=!1,z.emittedReadable=!1,h("on readable",z.length,z.reading),z.length?se(this):z.reading||a.nextTick(ye,this)),D},q.prototype.addListener=q.prototype.on,q.prototype.removeListener=function(N,I){var D=g.prototype.removeListener.call(this,N,I);return N==="readable"&&a.nextTick(X,this),D},q.prototype.removeAllListeners=function(N){var I=g.prototype.removeAllListeners.apply(this,arguments);return(N==="readable"||N===void 0)&&a.nextTick(X,this),I};function X(N){var I=N._readableState;I.readableListening=N.listenerCount("readable")>0,I.resumeScheduled&&!I.paused?I.flowing=!0:N.listenerCount("data")>0&&N.resume()}l(X,"V"),e(X,"updateReadableListening");function ye(N){h("readable nexttick read 0"),N.read(0)}l(ye,"G"),e(ye,"nReadingNextTick"),q.prototype.resume=function(){var N=this._readableState;return N.flowing||(h("resume"),N.flowing=!N.readableListening,Re(this,N)),N.paused=!1,this};function Re(N,I){I.resumeScheduled||(I.resumeScheduled=!0,a.nextTick(De,N,I))}l(Re,"fe"),e(Re,"resume");function De(N,I){h("resume",I.reading),I.reading||N.read(0),I.resumeScheduled=!1,N.emit("resume"),Y(N),I.flowing&&!I.reading&&N.read(0)}l(De,"be"),e(De,"resume_"),q.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Y(N){var I=N._readableState;for(h("flow",I.flowing);I.flowing&&N.read()!==null;);}l(Y,"D"),e(Y,"flow"),q.prototype.wrap=function(N){var I=this,D=this._readableState,z=!1;N.on("end",function(){if(h("wrapped end"),D.decoder&&!D.ended){var be=D.decoder.end();be&&be.length&&I.push(be)}I.push(null)}),N.on("data",function(be){if(h("wrapped data"),D.decoder&&(be=D.decoder.write(be)),!(D.objectMode&&be==null)&&!(!D.objectMode&&(!be||!be.length))){var ge=I.push(be);ge||(z=!0,N.pause())}});for(var Ee in N)this[Ee]===void 0&&typeof N[Ee]=="function"&&(this[Ee]=e(function(be){return e(function(){return N[be].apply(N,arguments)},"methodWrapReturnFunction")},"methodWrap")(Ee));for(var Oe=0;Oe<M.length;Oe++)N.on(M[Oe],this.emit.bind(this,M[Oe]));return this._read=function(be){h("wrapped _read",be),z&&(z=!1,N.resume())},this},typeof Symbol=="function"&&(q.prototype[Symbol.asyncIterator]=function(){return A===void 0&&(A=d8()),A(this)}),Object.defineProperty(q.prototype,"readableHighWaterMark",{enumerable:!1,get:e(function(){return this._readableState.highWaterMark},"get2")}),Object.defineProperty(q.prototype,"readableBuffer",{enumerable:!1,get:e(function(){return this._readableState&&this._readableState.buffer},"get2")}),Object.defineProperty(q.prototype,"readableFlowing",{enumerable:!1,get:e(function(){return this._readableState.flowing},"get2"),set:e(function(N){this._readableState&&(this._readableState.flowing=N)},"set")}),q._fromList=H,Object.defineProperty(q.prototype,"readableLength",{enumerable:!1,get:e(function(){return this._readableState.length},"get2")});function H(N,I){if(I.length===0)return null;var D;return I.objectMode?D=I.buffer.shift():!N||N>=I.length?(I.decoder?D=I.buffer.join(""):I.buffer.length===1?D=I.buffer.first():D=I.buffer.concat(I.length),I.buffer.clear()):D=I.buffer.consume(N,I.decoder),D}l(H,"$"),e(H,"fromList");function Q(N){var I=N._readableState;h("endReadable",I.endEmitted),I.endEmitted||(I.ended=!0,a.nextTick(fe,I,N))}l(Q,"H"),e(Q,"endReadable");function fe(N,I){if(h("endReadableNT",N.endEmitted,N.length),!N.endEmitted&&N.length===0&&(N.endEmitted=!0,I.readable=!1,I.emit("end"),N.autoDestroy)){var D=I._writableState;(!D||D.autoDestroy&&D.finished)&&I.destroy()}}l(fe,"te"),e(fe,"endReadableNT"),typeof Symbol=="function"&&(q.from=function(N,I){return x===void 0&&(x=p8()),x(q,N,I)});function ve(N,I){for(var D=0,z=N.length;D<z;D++)if(N[D]===I)return D;return-1}return l(ve,"oe"),e(ve,"indexOf"),Dh}l(s2,"uD");function l2(){if($_)return Uh;$_=!0,Uh=u;var a=Pa().codes,i=a.ERR_METHOD_NOT_IMPLEMENTED,f=a.ERR_MULTIPLE_CALLBACK,g=a.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=a.ERR_TRANSFORM_WITH_LENGTH_0,n=Oa();Ji()(u,n);function r(d,m){var y=this._transformState;y.transforming=!1;var w=y.writecb;if(w===null)return this.emit("error",new f);y.writechunk=null,y.writecb=null,m!=null&&this.push(m),w(d);var _=this._readableState;_.reading=!1,(_.needReadable||_.length<_.highWaterMark)&&this._read(_.highWaterMark)}l(r,"i"),e(r,"afterTransform");function u(d){if(!(this instanceof u))return new u(d);n.call(this,d),this._transformState={afterTransform:r.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,d&&(typeof d.transform=="function"&&(this._transform=d.transform),typeof d.flush=="function"&&(this._flush=d.flush)),this.on("prefinish",p)}l(u,"f"),e(u,"Transform");function p(){var d=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(m,y){h(d,m,y)}):h(this,null,null)}l(p,"h"),e(p,"prefinish"),u.prototype.push=function(d,m){return this._transformState.needTransform=!1,n.prototype.push.call(this,d,m)},u.prototype._transform=function(d,m,y){y(new i("_transform()"))},u.prototype._write=function(d,m,y){var w=this._transformState;if(w.writecb=y,w.writechunk=d,w.writeencoding=m,!w.transforming){var _=this._readableState;(w.needTransform||_.needReadable||_.length<_.highWaterMark)&&this._read(_.highWaterMark)}},u.prototype._read=function(d){var m=this._transformState;m.writechunk!==null&&!m.transforming?(m.transforming=!0,this._transform(m.writechunk,m.writeencoding,m.afterTransform)):m.needTransform=!0},u.prototype._destroy=function(d,m){n.prototype._destroy.call(this,d,function(y){m(y)})};function h(d,m,y){if(m)return d.emit("error",m);if(y!=null&&d.push(y),d._writableState.length)throw new o;if(d._transformState.transforming)throw new g;return d.push(null)}return l(h,"c"),e(h,"done"),Uh}l(l2,"cD");function g8(){if(W_)return Mh;W_=!0,Mh=i;var a=l2();Ji()(i,a);function i(f){if(!(this instanceof i))return new i(f);a.call(this,f)}return l(i,"t"),e(i,"PassThrough"),i.prototype._transform=function(f,g,o){o(null,f)},Mh}l(g8,"y5");function y8(){if(z_)return $h;z_=!0;var a;function i(y){var w=!1;return function(){w||(w=!0,y.apply(void 0,arguments))}}l(i,"t"),e(i,"once");var f=Pa().codes,g=f.ERR_MISSING_ARGS,o=f.ERR_STREAM_DESTROYED;function n(y){if(y)throw y}l(n,"s"),e(n,"noop");function r(y){return y.setHeader&&typeof y.abort=="function"}l(r,"i"),e(r,"isRequest");function u(y,w,_,S){S=i(S);var T=!1;y.on("close",function(){T=!0}),a===void 0&&(a=Ld()),a(y,{readable:w,writable:_},function(E){if(E)return S(E);T=!0,S()});var O=!1;return function(E){if(!T&&!O){if(O=!0,r(y))return y.abort();if(typeof y.destroy=="function")return y.destroy();S(E||new o("pipe"))}}}l(u,"f"),e(u,"destroyer");function p(y){y()}l(p,"h"),e(p,"call");function h(y,w){return y.pipe(w)}l(h,"c"),e(h,"pipe");function d(y){return!y.length||typeof y[y.length-1]!="function"?n:y.pop()}l(d,"d"),e(d,"popCallback");function m(){for(var y=arguments.length,w=new Array(y),_=0;_<y;_++)w[_]=arguments[_];var S=d(w);if(Array.isArray(w[0])&&(w=w[0]),w.length<2)throw new g("streams");var T,O=w.map(function(E,P){var A=P<w.length-1,x=P>0;return u(E,A,x,function(U){T||(T=U),U&&O.forEach(p),!A&&(O.forEach(p),S(T))})});return w.reduce(h)}return l(m,"y"),e(m,"pipeline"),$h=m,$h}l(y8,"m5");function f2(){return H_||(H_=!0,Mr=Mr=s2(),Mr.Stream=Mr,Mr.Readable=Mr,Mr.Writable=a2(),Mr.Duplex=Oa(),Mr.Transform=l2(),Mr.PassThrough=g8(),Mr.finished=Ld(),Mr.pipeline=y8()),Mr}l(f2,"hD");function YB(){if(q_)return Wh;q_=!0;var a=Tt;function i(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}l(i,"t"),e(i,"assertPath");function f(n,r){for(var u="",p=0,h=-1,d=0,m,y=0;y<=n.length;++y){if(y<n.length)m=n.charCodeAt(y);else{if(m===47)break;m=47}if(m===47){if(!(h===y-1||d===1))if(h!==y-1&&d===2){if(u.length<2||p!==2||u.charCodeAt(u.length-1)!==46||u.charCodeAt(u.length-2)!==46){if(u.length>2){var w=u.lastIndexOf("/");if(w!==u.length-1){w===-1?(u="",p=0):(u=u.slice(0,w),p=u.length-1-u.lastIndexOf("/")),h=y,d=0;continue}}else if(u.length===2||u.length===1){u="",p=0,h=y,d=0;continue}}r&&(u.length>0?u+="/..":u="..",p=2)}else u.length>0?u+="/"+n.slice(h+1,y):u=n.slice(h+1,y),p=y-h-1;h=y,d=0}else m===46&&d!==-1?++d:d=-1}return u}l(f,"r"),e(f,"normalizeStringPosix");function g(n,r){var u=r.dir||r.root,p=r.base||(r.name||"")+(r.ext||"");return u?u===r.root?u+p:u+n+p:p}l(g,"n"),e(g,"_format");var o={resolve:e(function(){for(var n="",r=!1,u,p=arguments.length-1;p>=-1&&!r;p--){var h;p>=0?h=arguments[p]:(u===void 0&&(u=a.cwd()),h=u),i(h),h.length!==0&&(n=h+"/"+n,r=h.charCodeAt(0)===47)}return n=f(n,!r),r?n.length>0?"/"+n:"/":n.length>0?n:"."},"resolve"),normalize:e(function(n){if(i(n),n.length===0)return".";var r=n.charCodeAt(0)===47,u=n.charCodeAt(n.length-1)===47;return n=f(n,!r),n.length===0&&!r&&(n="."),n.length>0&&u&&(n+="/"),r?"/"+n:n},"normalize"),isAbsolute:e(function(n){return i(n),n.length>0&&n.charCodeAt(0)===47},"isAbsolute"),join:e(function(){if(arguments.length===0)return".";for(var n,r=0;r<arguments.length;++r){var u=arguments[r];i(u),u.length>0&&(n===void 0?n=u:n+="/"+u)}return n===void 0?".":o.normalize(n)},"join"),relative:e(function(n,r){if(i(n),i(r),n===r||(n=o.resolve(n),r=o.resolve(r),n===r))return"";for(var u=1;u<n.length&&n.charCodeAt(u)===47;++u);for(var p=n.length,h=p-u,d=1;d<r.length&&r.charCodeAt(d)===47;++d);for(var m=r.length,y=m-d,w=h<y?h:y,_=-1,S=0;S<=w;++S){if(S===w){if(y>w){if(r.charCodeAt(d+S)===47)return r.slice(d+S+1);if(S===0)return r.slice(d+S)}else h>w&&(n.charCodeAt(u+S)===47?_=S:S===0&&(_=0));break}var T=n.charCodeAt(u+S),O=r.charCodeAt(d+S);if(T!==O)break;T===47&&(_=S)}var E="";for(S=u+_+1;S<=p;++S)(S===p||n.charCodeAt(S)===47)&&(E.length===0?E+="..":E+="/..");return E.length>0?E+r.slice(d+_):(d+=_,r.charCodeAt(d)===47&&++d,r.slice(d))},"relative"),_makeLong:e(function(n){return n},"_makeLong"),dirname:e(function(n){if(i(n),n.length===0)return".";for(var r=n.charCodeAt(0),u=r===47,p=-1,h=!0,d=n.length-1;d>=1;--d)if(r=n.charCodeAt(d),r===47){if(!h){p=d;break}}else h=!1;return p===-1?u?"/":".":u&&p===1?"//":n.slice(0,p)},"dirname"),basename:e(function(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');i(n);var u=0,p=-1,h=!0,d;if(r!==void 0&&r.length>0&&r.length<=n.length){if(r.length===n.length&&r===n)return"";var m=r.length-1,y=-1;for(d=n.length-1;d>=0;--d){var w=n.charCodeAt(d);if(w===47){if(!h){u=d+1;break}}else y===-1&&(h=!1,y=d+1),m>=0&&(w===r.charCodeAt(m)?--m===-1&&(p=d):(m=-1,p=y))}return u===p?p=y:p===-1&&(p=n.length),n.slice(u,p)}else{for(d=n.length-1;d>=0;--d)if(n.charCodeAt(d)===47){if(!h){u=d+1;break}}else p===-1&&(h=!1,p=d+1);return p===-1?"":n.slice(u,p)}},"basename"),extname:e(function(n){i(n);for(var r=-1,u=0,p=-1,h=!0,d=0,m=n.length-1;m>=0;--m){var y=n.charCodeAt(m);if(y===47){if(!h){u=m+1;break}continue}p===-1&&(h=!1,p=m+1),y===46?r===-1?r=m:d!==1&&(d=1):r!==-1&&(d=-1)}return r===-1||p===-1||d===0||d===1&&r===p-1&&r===u+1?"":n.slice(r,p)},"extname"),format:e(function(n){if(n===null||typeof n!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof n);return g("/",n)},"format"),parse:e(function(n){i(n);var r={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return r;var u=n.charCodeAt(0),p=u===47,h;p?(r.root="/",h=1):h=0;for(var d=-1,m=0,y=-1,w=!0,_=n.length-1,S=0;_>=h;--_){if(u=n.charCodeAt(_),u===47){if(!w){m=_+1;break}continue}y===-1&&(w=!1,y=_+1),u===46?d===-1?d=_:S!==1&&(S=1):d!==-1&&(S=-1)}return d===-1||y===-1||S===0||S===1&&d===y-1&&d===m+1?y!==-1&&(m===0&&p?r.base=r.name=n.slice(1,y):r.base=r.name=n.slice(m,y)):(m===0&&p?(r.name=n.slice(1,d),r.base=n.slice(1,y)):(r.name=n.slice(m,d),r.base=n.slice(m,y)),r.ext=n.slice(d,y)),m>0?r.dir=n.slice(0,m-1):p&&(r.dir="/"),r},"parse"),sep:"/",delimiter:":",win32:null,posix:null};return o.posix=o,Wh=o,Wh}l(YB,"g5");function xi(a){throw new RangeError(j8[a])}l(xi,"Ta");function hm(a,i){let f=a.split("@"),g="";f.length>1&&(g=f[0]+"@",a=f[1]);let o=function(n,r){let u=[],p=n.length;for(;p--;)u[p]=r(n[p]);return u}((a=a.replace(P8,".")).split("."),i).join(".");return g+o}l(hm,"lN");function dm(a){let i=[],f=0,g=a.length;for(;f<g;){let o=a.charCodeAt(f++);if(o>=55296&&o<=56319&&f<g){let n=a.charCodeAt(f++);(64512&n)==56320?i.push(((1023&o)<<10)+(1023&n)+65536):(i.push(o),f--)}else i.push(o)}return i}l(dm,"dD");function ZB(a,i){return Object.prototype.hasOwnProperty.call(a,i)}l(ZB,"S5");function Jr(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}l(Jr,"Qr");function cs(a,i,f){if(a&&dn.isObject(a)&&a instanceof Jr)return a;var g=new Jr;return g.parse(a,i,f),g}l(cs,"uu");function QB(){if(V_)return zh;V_=!0;var a=Gt;function i(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}l(i,"t"),e(i,"assertPath");function f(n,r){for(var u="",p=0,h=-1,d=0,m,y=0;y<=n.length;++y){if(y<n.length)m=n.charCodeAt(y);else{if(m===47)break;m=47}if(m===47){if(!(h===y-1||d===1))if(h!==y-1&&d===2){if(u.length<2||p!==2||u.charCodeAt(u.length-1)!==46||u.charCodeAt(u.length-2)!==46){if(u.length>2){var w=u.lastIndexOf("/");if(w!==u.length-1){w===-1?(u="",p=0):(u=u.slice(0,w),p=u.length-1-u.lastIndexOf("/")),h=y,d=0;continue}}else if(u.length===2||u.length===1){u="",p=0,h=y,d=0;continue}}r&&(u.length>0?u+="/..":u="..",p=2)}else u.length>0?u+="/"+n.slice(h+1,y):u=n.slice(h+1,y),p=y-h-1;h=y,d=0}else m===46&&d!==-1?++d:d=-1}return u}l(f,"r"),e(f,"normalizeStringPosix");function g(n,r){var u=r.dir||r.root,p=r.base||(r.name||"")+(r.ext||"");return u?u===r.root?u+p:u+n+p:p}l(g,"n"),e(g,"_format");var o={resolve:e(function(){for(var n="",r=!1,u,p=arguments.length-1;p>=-1&&!r;p--){var h;p>=0?h=arguments[p]:(u===void 0&&(u=a.cwd()),h=u),i(h),h.length!==0&&(n=h+"/"+n,r=h.charCodeAt(0)===47)}return n=f(n,!r),r?n.length>0?"/"+n:"/":n.length>0?n:"."},"resolve"),normalize:e(function(n){if(i(n),n.length===0)return".";var r=n.charCodeAt(0)===47,u=n.charCodeAt(n.length-1)===47;return n=f(n,!r),n.length===0&&!r&&(n="."),n.length>0&&u&&(n+="/"),r?"/"+n:n},"normalize"),isAbsolute:e(function(n){return i(n),n.length>0&&n.charCodeAt(0)===47},"isAbsolute"),join:e(function(){if(arguments.length===0)return".";for(var n,r=0;r<arguments.length;++r){var u=arguments[r];i(u),u.length>0&&(n===void 0?n=u:n+="/"+u)}return n===void 0?".":o.normalize(n)},"join"),relative:e(function(n,r){if(i(n),i(r),n===r||(n=o.resolve(n),r=o.resolve(r),n===r))return"";for(var u=1;u<n.length&&n.charCodeAt(u)===47;++u);for(var p=n.length,h=p-u,d=1;d<r.length&&r.charCodeAt(d)===47;++d);for(var m=r.length,y=m-d,w=h<y?h:y,_=-1,S=0;S<=w;++S){if(S===w){if(y>w){if(r.charCodeAt(d+S)===47)return r.slice(d+S+1);if(S===0)return r.slice(d+S)}else h>w&&(n.charCodeAt(u+S)===47?_=S:S===0&&(_=0));break}var T=n.charCodeAt(u+S),O=r.charCodeAt(d+S);if(T!==O)break;T===47&&(_=S)}var E="";for(S=u+_+1;S<=p;++S)(S===p||n.charCodeAt(S)===47)&&(E.length===0?E+="..":E+="/..");return E.length>0?E+r.slice(d+_):(d+=_,r.charCodeAt(d)===47&&++d,r.slice(d))},"relative"),_makeLong:e(function(n){return n},"_makeLong"),dirname:e(function(n){if(i(n),n.length===0)return".";for(var r=n.charCodeAt(0),u=r===47,p=-1,h=!0,d=n.length-1;d>=1;--d)if(r=n.charCodeAt(d),r===47){if(!h){p=d;break}}else h=!1;return p===-1?u?"/":".":u&&p===1?"//":n.slice(0,p)},"dirname"),basename:e(function(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');i(n);var u=0,p=-1,h=!0,d;if(r!==void 0&&r.length>0&&r.length<=n.length){if(r.length===n.length&&r===n)return"";var m=r.length-1,y=-1;for(d=n.length-1;d>=0;--d){var w=n.charCodeAt(d);if(w===47){if(!h){u=d+1;break}}else y===-1&&(h=!1,y=d+1),m>=0&&(w===r.charCodeAt(m)?--m===-1&&(p=d):(m=-1,p=y))}return u===p?p=y:p===-1&&(p=n.length),n.slice(u,p)}else{for(d=n.length-1;d>=0;--d)if(n.charCodeAt(d)===47){if(!h){u=d+1;break}}else p===-1&&(h=!1,p=d+1);return p===-1?"":n.slice(u,p)}},"basename"),extname:e(function(n){i(n);for(var r=-1,u=0,p=-1,h=!0,d=0,m=n.length-1;m>=0;--m){var y=n.charCodeAt(m);if(y===47){if(!h){u=m+1;break}continue}p===-1&&(h=!1,p=m+1),y===46?r===-1?r=m:d!==1&&(d=1):r!==-1&&(d=-1)}return r===-1||p===-1||d===0||d===1&&r===p-1&&r===u+1?"":n.slice(r,p)},"extname"),format:e(function(n){if(n===null||typeof n!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof n);return g("/",n)},"format"),parse:e(function(n){i(n);var r={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return r;var u=n.charCodeAt(0),p=u===47,h;p?(r.root="/",h=1):h=0;for(var d=-1,m=0,y=-1,w=!0,_=n.length-1,S=0;_>=h;--_){if(u=n.charCodeAt(_),u===47){if(!w){m=_+1;break}continue}y===-1&&(w=!1,y=_+1),u===46?d===-1?d=_:S!==1&&(S=1):d!==-1&&(S=-1)}return d===-1||y===-1||S===0||S===1&&d===y-1&&d===m+1?y!==-1&&(m===0&&p?r.base=r.name=n.slice(1,y):r.base=r.name=n.slice(m,y)):(m===0&&p?(r.name=n.slice(1,d),r.base=n.slice(1,y)):(r.name=n.slice(m,d),r.base=n.slice(m,y)),r.ext=n.slice(d,y)),m>0?r.dir=n.slice(0,m-1):p&&(r.dir="/"),r},"parse"),sep:"/",delimiter:":",win32:null,posix:null};return o.posix=o,zh=o,zh}l(QB,"B5");function XB(a){if(typeof a=="string")a=new URL(a);else if(!(a instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(a.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return dd?m8(a):w8(a)}l(XB,"z5");function m8(a){let i=a.hostname,f=a.pathname;for(let g=0;g<f.length;g++)if(f[g]==="%"){let o=f.codePointAt(g+2)||32;if(f[g+1]==="2"&&o===102||f[g+1]==="5"&&o===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(f=f.replace(U8,"\\"),f=decodeURIComponent(f),i!=="")return`\\\\${i}${f}`;{let g=f.codePointAt(1)|32,o=f[2];if(g<N8||g>D8||o!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return f.slice(1)}}l(m8,"V5");function w8(a){if(a.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let i=a.pathname;for(let f=0;f<i.length;f++)if(i[f]==="%"){let g=i.codePointAt(f+2)||32;if(i[f+1]==="2"&&g===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(i)}l(w8,"G5");function ex(a){let i=K_.resolve(a),f=a.charCodeAt(a.length-1);(f===L8||dd&&f===C8)&&i[i.length-1]!==K_.sep&&(i+="/");let g=new URL("file://");return i.includes("%")&&(i=i.replace(M8,"%25")),!dd&&i.includes("\\")&&(i=i.replace($8,"%5C")),i.includes(`
|
|
135
|
-
`)&&(i=i.replace(W8,"%0A")),i.includes("\r")&&(i=i.replace(z8,"%0D")),i.includes(" ")&&(i=i.replace(H8,"%09")),g.pathname=i,g}l(ex,"Y5");function tx(a){if(typeof a=="string")a=new URL(a);else if(!(a instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(a.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return pd?b8(a):v8(a)}l(tx,"aee");function b8(a){let i=a.hostname,f=a.pathname;for(let g=0;g<f.length;g++)if(f[g]==="%"){let o=f.codePointAt(g+2)||32;if(f[g+1]==="2"&&o===102||f[g+1]==="5"&&o===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(f=f.replace(J8,"\\"),f=decodeURIComponent(f),i!=="")return`\\\\${i}${f}`;{let g=f.codePointAt(1)|32,o=f[2];if(g<V8||g>K8||o!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return f.slice(1)}}l(b8,"see");function v8(a){if(a.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let i=a.pathname;for(let f=0;f<i.length;f++)if(i[f]==="%"){let g=i.codePointAt(f+2)||32;if(i[f+1]==="2"&&g===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(i)}l(v8,"lee");function rx(a){let i=G_.resolve(a),f=a.charCodeAt(a.length-1);(f===G8||pd&&f===q8)&&i[i.length-1]!==G_.sep&&(i+="/");let g=new URL("file://");return i.includes("%")&&(i=i.replace(Y8,"%25")),!pd&&i.includes("\\")&&(i=i.replace(Z8,"%5C")),i.includes(`
|
|
136
|
-
`)&&(i=i.replace(Q8,"%0A")),i.includes("\r")&&(i=i.replace(X8,"%0D")),i.includes(" ")&&(i=i.replace(eC,"%09")),g.pathname=i,g}l(rx,"fee");function u2(){if(J_)return $r;J_=!0,$r.fetch=g(Wi.fetch)&&g(Wi.ReadableStream),$r.writableStream=g(Wi.WritableStream),$r.abortController=g(Wi.AbortController);var a;function i(){if(a!==void 0)return a;if(Wi.XMLHttpRequest){a=new Wi.XMLHttpRequest;try{a.open("GET",Wi.XDomainRequest?"/":"https://example.com")}catch{a=null}}else a=null;return a}l(i,"t"),e(i,"getXHR");function f(o){var n=i();if(!n)return!1;try{return n.responseType=o,n.responseType===o}catch{}return!1}l(f,"r"),e(f,"checkTypeSupport"),$r.arraybuffer=$r.fetch||f("arraybuffer"),$r.msstream=!$r.fetch&&f("ms-stream"),$r.mozchunkedarraybuffer=!$r.fetch&&f("moz-chunked-arraybuffer"),$r.overrideMimeType=$r.fetch||(i()?g(i().overrideMimeType):!1);function g(o){return typeof o=="function"}return l(g,"n"),e(g,"isFunction"),a=null,$r}l(u2,"yD");function c2(){if(Y_)return Dl;Y_=!0;var a=gi.Buffer,i=Tt,f=u2(),g=Ji(),o=f2(),n=Dl.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},r=Dl.IncomingMessage=function(u,p,h,d){var m=this||Ul;if(o.Readable.call(m),m._mode=h,m.headers={},m.rawHeaders=[],m.trailers={},m.rawTrailers=[],m.on("end",function(){i.nextTick(function(){m.emit("close")})}),h==="fetch"){let O=e(function(){w.read().then(function(E){if(!m._destroyed){if(d(E.done),E.done){m.push(null);return}m.push(a.from(E.value)),O()}}).catch(function(E){d(!0),m._destroyed||m.emit("error",E)})},"read");if(m._fetchResponse=p,m.url=p.url,m.statusCode=p.status,m.statusMessage=p.statusText,p.headers.forEach(function(E,P){m.headers[P.toLowerCase()]=E,m.rawHeaders.push(P,E)}),f.writableStream){var y=new WritableStream({write:e(function(E){return d(!1),new Promise(function(P,A){m._destroyed?A():m.push(a.from(E))?P():m._resumeFetch=P})},"write"),close:e(function(){d(!0),m._destroyed||m.push(null)},"close"),abort:e(function(E){d(!0),m._destroyed||m.emit("error",E)},"abort")});try{p.body.pipeTo(y).catch(function(E){d(!0),m._destroyed||m.emit("error",E)});return}catch{}}var w=p.body.getReader();O()}else{m._xhr=u,m._pos=0,m.url=u.responseURL,m.statusCode=u.status,m.statusMessage=u.statusText;var _=u.getAllResponseHeaders().split(/\r?\n/);if(_.forEach(function(O){var E=O.match(/^([^:]+):\s*(.*)/);if(E){var P=E[1].toLowerCase();P==="set-cookie"?(m.headers[P]===void 0&&(m.headers[P]=[]),m.headers[P].push(E[2])):m.headers[P]!==void 0?m.headers[P]+=", "+E[2]:m.headers[P]=E[2],m.rawHeaders.push(E[1],E[2])}}),m._charset="x-user-defined",!f.overrideMimeType){var S=m.rawHeaders["mime-type"];if(S){var T=S.match(/;\s*charset=([^;])(;|$)/);T&&(m._charset=T[1].toLowerCase())}m._charset||(m._charset="utf-8")}}};return g(r,o.Readable),r.prototype._read=function(){var u=this||Ul,p=u._resumeFetch;p&&(u._resumeFetch=null,p())},r.prototype._onXHRProgress=function(u){var p=this||Ul,h=p._xhr,d=null;switch(p._mode){case"text":if(d=h.responseText,d.length>p._pos){var m=d.substr(p._pos);if(p._charset==="x-user-defined"){for(var y=a.alloc(m.length),w=0;w<m.length;w++)y[w]=m.charCodeAt(w)&255;p.push(y)}else p.push(m,p._charset);p._pos=d.length}break;case"arraybuffer":if(h.readyState!==n.DONE||!h.response)break;d=h.response,p.push(a.from(new Uint8Array(d)));break;case"moz-chunked-arraybuffer":if(d=h.response,h.readyState!==n.LOADING||!d)break;p.push(a.from(new Uint8Array(d)));break;case"ms-stream":if(d=h.response,h.readyState!==n.LOADING)break;var _=new Ul.MSStreamReader;_.onprogress=function(){_.result.byteLength>p._pos&&(p.push(a.from(new Uint8Array(_.result.slice(p._pos)))),p._pos=_.result.byteLength)},_.onload=function(){u(!0),p.push(null)},_.readAsArrayBuffer(d);break}p._xhr.readyState===n.DONE&&p._mode!=="ms-stream"&&(u(!0),p.push(null))},Dl}l(c2,"mD");function _8(){if(Z_)return Hh;Z_=!0;var a=gi.Buffer,i=Tt,f=u2(),g=Ji(),o=c2(),n=f2(),r=o.IncomingMessage,u=o.readyStates;function p(y,w){return f.fetch&&w?"fetch":f.mozchunkedarraybuffer?"moz-chunked-arraybuffer":f.msstream?"ms-stream":f.arraybuffer&&y?"arraybuffer":"text"}l(p,"h"),e(p,"decideMode");var h=Hh=e(function(y){var w=this||ur;n.Writable.call(w),w._opts=y,w._body=[],w._headers={},y.auth&&w.setHeader("Authorization","Basic "+a.from(y.auth).toString("base64")),Object.keys(y.headers).forEach(function(T){w.setHeader(T,y.headers[T])});var _,S=!0;if(y.mode==="disable-fetch"||"requestTimeout"in y&&!f.abortController)S=!1,_=!0;else if(y.mode==="prefer-streaming")_=!1;else if(y.mode==="allow-wrong-content-type")_=!f.overrideMimeType;else if(!y.mode||y.mode==="default"||y.mode==="prefer-fast")_=!0;else throw new Error("Invalid value for opts.mode");w._mode=p(_,S),w._fetchTimer=null,w._socketTimeout=null,w._socketTimer=null,w.on("finish",function(){w._onFinish()})},"exports$42");g(h,n.Writable),h.prototype.setHeader=function(y,w){var _=this||ur,S=y.toLowerCase();m.indexOf(S)===-1&&(_._headers[S]={name:y,value:w})},h.prototype.getHeader=function(y){var w=(this||ur)._headers[y.toLowerCase()];return w?w.value:null},h.prototype.removeHeader=function(y){var w=this||ur;delete w._headers[y.toLowerCase()]},h.prototype._onFinish=function(){var y=this||ur;if(!y._destroyed){var w=y._opts;"timeout"in w&&w.timeout!==0&&y.setTimeout(w.timeout);var _=y._headers,S=null;w.method!=="GET"&&w.method!=="HEAD"&&(S=new Blob(y._body,{type:(_["content-type"]||{}).value||""}));var T=[];if(Object.keys(_).forEach(function(A){var x=_[A].name,U=_[A].value;Array.isArray(U)?U.forEach(function(M){T.push([x,M])}):T.push([x,U])}),y._mode==="fetch"){var O=null;if(f.abortController){var E=new AbortController;O=E.signal,y._fetchAbortController=E,"requestTimeout"in w&&w.requestTimeout!==0&&(y._fetchTimer=ur.setTimeout(function(){y.emit("requestTimeout"),y._fetchAbortController&&y._fetchAbortController.abort()},w.requestTimeout))}ur.fetch(y._opts.url,{method:y._opts.method,headers:T,body:S||void 0,mode:"cors",credentials:w.withCredentials?"include":"same-origin",signal:O}).then(function(A){y._fetchResponse=A,y._resetTimers(!1),y._connect()},function(A){y._resetTimers(!0),y._destroyed||y.emit("error",A)})}else{var P=y._xhr=new ur.XMLHttpRequest;try{P.open(y._opts.method,y._opts.url,!0)}catch(A){i.nextTick(function(){y.emit("error",A)});return}"responseType"in P&&(P.responseType=y._mode),"withCredentials"in P&&(P.withCredentials=!!w.withCredentials),y._mode==="text"&&"overrideMimeType"in P&&P.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in w&&(P.timeout=w.requestTimeout,P.ontimeout=function(){y.emit("requestTimeout")}),T.forEach(function(A){P.setRequestHeader(A[0],A[1])}),y._response=null,P.onreadystatechange=function(){switch(P.readyState){case u.LOADING:case u.DONE:y._onXHRProgress();break}},y._mode==="moz-chunked-arraybuffer"&&(P.onprogress=function(){y._onXHRProgress()}),P.onerror=function(){y._destroyed||(y._resetTimers(!0),y.emit("error",new Error("XHR error")))};try{P.send(S)}catch(A){i.nextTick(function(){y.emit("error",A)});return}}}};function d(y){try{var w=y.status;return w!==null&&w!==0}catch{return!1}}l(d,"d"),e(d,"statusValid"),h.prototype._onXHRProgress=function(){var y=this||ur;y._resetTimers(!1),!(!d(y._xhr)||y._destroyed)&&(y._response||y._connect(),y._response._onXHRProgress(y._resetTimers.bind(y)))},h.prototype._connect=function(){var y=this||ur;y._destroyed||(y._response=new r(y._xhr,y._fetchResponse,y._mode,y._resetTimers.bind(y)),y._response.on("error",function(w){y.emit("error",w)}),y.emit("response",y._response))},h.prototype._write=function(y,w,_){var S=this||ur;S._body.push(y),_()},h.prototype._resetTimers=function(y){var w=this||ur;ur.clearTimeout(w._socketTimer),w._socketTimer=null,y?(ur.clearTimeout(w._fetchTimer),w._fetchTimer=null):w._socketTimeout&&(w._socketTimer=ur.setTimeout(function(){w.emit("timeout")},w._socketTimeout))},h.prototype.abort=h.prototype.destroy=function(y){var w=this||ur;w._destroyed=!0,w._resetTimers(!0),w._response&&(w._response._destroyed=!0),w._xhr?w._xhr.abort():w._fetchAbortController&&w._fetchAbortController.abort(),y&&w.emit("error",y)},h.prototype.end=function(y,w,_){var S=this||ur;typeof y=="function"&&(_=y,y=void 0),n.Writable.prototype.end.call(S,y,w,_)},h.prototype.setTimeout=function(y,w){var _=this||ur;w&&_.once("timeout",w),_._socketTimeout=y,_._resetTimers(!1)},h.prototype.flushHeaders=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var m=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"];return Hh}l(_8,"uee");function E8(){if(Q_)return qh;Q_=!0,qh=i;var a=Object.prototype.hasOwnProperty;function i(){for(var f={},g=0;g<arguments.length;g++){var o=arguments[g];for(var n in o)a.call(o,n)&&(f[n]=o[n])}return f}return l(i,"t"),e(i,"extend"),qh}l(E8,"cee");function S8(){return eE||(eE=!0,X_={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}),X_}l(S8,"hee");function nx(){if(tE)return Gh;tE=!0;var a=_8(),i=c2(),f=E8(),g=S8(),o=Pt,n=Gh;return n.request=function(r,u){typeof r=="string"?r=o.parse(r):r=f(r);var p=tC.location.protocol.search(/^https?:$/)===-1?"http:":"",h=r.protocol||p,d=r.hostname||r.host,m=r.port,y=r.path||"/";d&&d.indexOf(":")!==-1&&(d="["+d+"]"),r.url=(d?h+"//"+d:"")+(m?":"+m:"")+y,r.method=(r.method||"GET").toUpperCase(),r.headers=r.headers||{};var w=new a(r);return u&&w.on("response",u),w},n.get=e(function(r,u){var p=n.request(r,u);return p.end(),p},"get2"),n.ClientRequest=a,n.IncomingMessage=i.IncomingMessage,n.Agent=function(){},n.Agent.defaultMaxSockets=4,n.globalAgent=new n.Agent,n.STATUS_CODES=g,n.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"],Gh}l(nx,"pee");function ix(){if(rE)return Vh;rE=!0;var a=Rn,i=Pt,f=Vh;for(var g in a)a.hasOwnProperty(g)&&(f[g]=a[g]);f.request=function(n,r){return n=o(n),a.request.call(this||nE,n,r)},f.get=function(n,r){return n=o(n),a.get.call(this||nE,n,r)};function o(n){if(typeof n=="string"&&(n=i.parse(n)),n.protocol||(n.protocol="https:"),n.protocol!=="https:")throw new Error('Protocol "'+n.protocol+'" not supported. Expected "https:"');return n}return l(o,"a"),e(o,"validateParams"),Vh}l(ix,"yee");var ox,ax,Jo,pm,gm,ym,pn,sx,ii,oi,va,rr,ca,Ln,_a,ff,Gt,lx,pu,bl,mm,fx,ux,cx,hx,dx,wm,bm,vm,px,gx,yx,_m,Rt,A8,mx,wx,v_,Ah,zr,Ir,bx,Kt,R8,O8,k8,hs,at,fn,Em,vx,vl,Sm,gu,T8,Ii,p3,Rh,__,ta,Tt,_x,gn,qr,Ex,yu,Yo,Sx,Ax,En,ud,ra,Am,F8,B8,_l,El,hn,Rx,cd,hd,E_,Os,S_,Oh,A_,$i,R_,gi,kh,O_,k_,T_,Th,F_,Fh,B_,Bh,x_,xh,I_,Ih,P_,Ph,jh,j_,x8,Ch,C_,Lh,L_,Nh,N_,D_,U_,Dh,M_,I8,Uh,$_,Mh,W_,$h,z_,Mr,H_,Wh,q_,G_,Zo,Ox,kx,P8,j8,un,mu,Rm,Om,km,Tm,Tx,Fx,ds,Bx,Sn,Pt,xx,dn,Ix,Px,jx,Cx,wu,Fm,Bm,xm,Lx,Nx,bu,Qo,vu,zh,V_,K_,Dx,C8,L8,N8,D8,dd,U8,M8,$8,W8,z8,H8,Ux,q8,G8,V8,K8,pd,J8,Y8,Z8,Q8,X8,eC,$r,J_,Wi,Dl,Y_,Ul,Hh,Z_,ur,qh,Q_,X_,eE,Gh,tE,tC,Rn,Vh,rE,nE,Xn,rC,nC,iC,oC,aC,sC,lC,fC,g3=Qt(()=>{if(Jo=typeof Reflect=="object"?Reflect:null,pm=Jo&&typeof Jo.apply=="function"?Jo.apply:function(o,n,r){return Function.prototype.apply.call(o,n,r)},ax=Jo&&typeof Jo.ownKeys=="function"?Jo.ownKeys:Object.getOwnPropertySymbols?function(o){return Object.getOwnPropertyNames(o).concat(Object.getOwnPropertySymbols(o))}:function(o){return Object.getOwnPropertyNames(o)},gm=Number.isNaN||function(o){return o!=o},e(It,"o"),ox=It,It.EventEmitter=It,It.prototype._events=void 0,It.prototype._eventsCount=0,It.prototype._maxListeners=void 0,ym=10,e(Nl,"u"),e(Zv,"f"),e(Vy,"v"),e(Gj,"a"),e(Ky,"l"),e(Jy,"h"),e(Yy,"p"),e(Qv,"c"),Object.defineProperty(It,"defaultMaxListeners",{enumerable:!0,get:e(function(){return ym},"get"),set:e(function(o){if(typeof o!="number"||o<0||gm(o))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+o+".");ym=o},"set")}),It.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},It.prototype.setMaxListeners=function(o){if(typeof o!="number"||o<0||gm(o))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+o+".");return this._maxListeners=o,this},It.prototype.getMaxListeners=function(){return Zv(this)},It.prototype.emit=function(o){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var u=o==="error",p=this._events;if(p!==void 0)u=u&&p.error===void 0;else if(!u)return!1;if(u){var h;if(n.length>0&&(h=n[0]),h instanceof Error)throw h;var d=new Error("Unhandled error."+(h?" ("+h.message+")":""));throw d.context=h,d}var m=p[o];if(m===void 0)return!1;if(typeof m=="function")pm(m,this,n);else{var y=m.length,w=Qv(m,y);for(r=0;r<y;++r)pm(w[r],this,n)}return!0},It.prototype.addListener=function(o,n){return Vy(this,o,n,!1)},It.prototype.on=It.prototype.addListener,It.prototype.prependListener=function(o,n){return Vy(this,o,n,!0)},It.prototype.once=function(o,n){return Nl(n),this.on(o,Ky(this,o,n)),this},It.prototype.prependOnceListener=function(o,n){return Nl(n),this.prependListener(o,Ky(this,o,n)),this},It.prototype.removeListener=function(o,n){var r,u,p,h,d;if(Nl(n),(u=this._events)===void 0)return this;if((r=u[o])===void 0)return this;if(r===n||r.listener===n)--this._eventsCount==0?this._events=Object.create(null):(delete u[o],u.removeListener&&this.emit("removeListener",o,r.listener||n));else if(typeof r!="function"){for(p=-1,h=r.length-1;h>=0;h--)if(r[h]===n||r[h].listener===n){d=r[h].listener,p=h;break}if(p<0)return this;p===0?r.shift():function(m,y){for(;y+1<m.length;y++)m[y]=m[y+1];m.pop()}(r,p),r.length===1&&(u[o]=r[0]),u.removeListener!==void 0&&this.emit("removeListener",o,d||n)}return this},It.prototype.off=It.prototype.removeListener,It.prototype.removeAllListeners=function(o){var n,r,u;if((r=this._events)===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[o]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete r[o]),this;if(arguments.length===0){var p,h=Object.keys(r);for(u=0;u<h.length;++u)(p=h[u])!=="removeListener"&&this.removeAllListeners(p);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(n=r[o])=="function")this.removeListener(o,n);else if(n!==void 0)for(u=n.length-1;u>=0;u--)this.removeListener(o,n[u]);return this},It.prototype.listeners=function(o){return Jy(this,o,!0)},It.prototype.rawListeners=function(o){return Jy(this,o,!1)},It.listenerCount=function(o,n){return typeof o.listenerCount=="function"?o.listenerCount(n):Yy.call(o,n)},It.prototype.listenerCount=Yy,It.prototype.eventNames=function(){return this._eventsCount>0?ax(this._events):[]},pn=ox,pn.EventEmitter,pn.defaultMaxListeners,pn.init,pn.listenerCount,pn.EventEmitter,pn.defaultMaxListeners,pn.init,pn.listenerCount,va=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,rr=sx={},e(mh,"i$2"),e(wh,"u$2"),e(Xv,"c$2"),function(){try{ii=typeof setTimeout=="function"?setTimeout:mh}catch{ii=mh}try{oi=typeof clearTimeout=="function"?clearTimeout:wh}catch{oi=wh}}(),Ln=[],_a=!1,ff=-1,e(Vj,"h$1"),e(e_,"d$1"),e(Zy,"m$1"),e(_n,"p$1"),rr.nextTick=function(o){var n=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)n[r-1]=arguments[r];Ln.push(new Zy(o,n)),Ln.length!==1||_a||Xv(e_)},Zy.prototype.run=function(){(this||va).fun.apply(null,(this||va).array)},rr.title="browser",rr.browser=!0,rr.env={},rr.argv=[],rr.version="",rr.versions={},rr.on=_n,rr.addListener=_n,rr.once=_n,rr.off=_n,rr.removeListener=_n,rr.removeAllListeners=_n,rr.emit=_n,rr.prependListener=_n,rr.prependOnceListener=_n,rr.listeners=function(o){return[]},rr.binding=function(o){throw new Error("process.binding is not supported")},rr.cwd=function(){return"/"},rr.chdir=function(o){throw new Error("process.chdir is not supported")},rr.umask=function(){return 0},Gt=sx,Gt.addListener,Gt.argv,Gt.binding,Gt.browser,Gt.chdir,Gt.cwd,Gt.emit,Gt.env,Gt.listeners,Gt.nextTick,Gt.off,Gt.on,Gt.once,Gt.prependListener,Gt.prependOnceListener,Gt.removeAllListeners,Gt.removeListener,Gt.title,Gt.umask,Gt.version,Gt.versions,lx=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",pu=Object.prototype.toString,bl=e(function(o){return!(lx&&o&&typeof o=="object"&&Symbol.toStringTag in o)&&pu.call(o)==="[object Arguments]"},"o2"),mm=e(function(o){return!!bl(o)||o!==null&&typeof o=="object"&&typeof o.length=="number"&&o.length>=0&&pu.call(o)!=="[object Array]"&&pu.call(o.callee)==="[object Function]"},"n2"),fx=function(){return bl(arguments)}(),bl.isLegacyArguments=mm,ux=fx?bl:mm,cx=Object.prototype.toString,hx=Function.prototype.toString,dx=/^\s*(?:function)?\*/,wm=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",bm=Object.getPrototypeOf,vm=function(){if(!wm)return!1;try{return Function("return function*() {}")()}catch{}}(),px=vm?bm(vm):{},gx=e(function(o){return typeof o=="function"&&(!!dx.test(hx.call(o))||(wm?bm(o)===px:cx.call(o)==="[object GeneratorFunction]"))},"i2"),yx=typeof Object.create=="function"?function(o,n){n&&(o.super_=n,o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}))}:function(o,n){if(n){o.super_=n;var r=e(function(){},"o5");r.prototype=n.prototype,o.prototype=new r,o.prototype.constructor=o}},_m=e(function(o){return o&&typeof o=="object"&&typeof o.copy=="function"&&typeof o.fill=="function"&&typeof o.readUInt8=="function"},"i$1"),Rt={},A8=_m,mx=ux,wx=gx,e(Ti,"c$1"),v_=typeof BigInt<"u",Ah=typeof Symbol<"u",zr=Ah&&Symbol.toStringTag!==void 0,Ir=typeof Uint8Array<"u",bx=typeof ArrayBuffer<"u",Ir&&zr)var a=Object.getPrototypeOf(Uint8Array.prototype),i=Ti(Object.getOwnPropertyDescriptor(a,Symbol.toStringTag).get);if(Kt=Ti(Object.prototype.toString),R8=Ti(Number.prototype.valueOf),O8=Ti(String.prototype.valueOf),k8=Ti(Boolean.prototype.valueOf),v_)var f=Ti(BigInt.prototype.valueOf);if(Ah)var g=Ti(Symbol.prototype.valueOf);for(e(Qs,"O"),e(Qy,"S"),e(t_,"B"),e(r_,"k"),e(n_,"E"),e(i_,"D"),e(o_,"U"),e(a_,"P"),e(s_,"x"),e(l_,"I"),e(f_,"M"),e(u_,"z"),e(c_,"F"),e(yl,"T"),e(ml,"N"),e(wl,"W"),e(hu,"$"),e(tf,"C"),e(Xy,"V"),e(rf,"G"),e(em,"R"),e(nf,"J"),e(tm,"_"),e(rm,"H"),e(nm,"Z"),e(im,"q"),e(om,"K"),e(am,"L"),Rt.isArgumentsObject=mx,Rt.isGeneratorFunction=wx,Rt.isPromise=function(o){return typeof Promise<"u"&&o instanceof Promise||o!==null&&typeof o=="object"&&typeof o.then=="function"&&typeof o.catch=="function"},Rt.isArrayBufferView=function(o){return bx&&ArrayBuffer.isView?ArrayBuffer.isView(o):Qy(o)||em(o)},Rt.isTypedArray=Qy,Rt.isUint8Array=t_,Rt.isUint8ClampedArray=r_,Rt.isUint16Array=n_,Rt.isUint32Array=i_,Rt.isInt8Array=o_,Rt.isInt16Array=a_,Rt.isInt32Array=s_,Rt.isFloat32Array=l_,Rt.isFloat64Array=f_,Rt.isBigInt64Array=u_,Rt.isBigUint64Array=c_,yl.working=typeof Map<"u"&&yl(new Map),Rt.isMap=function(o){return typeof Map<"u"&&(yl.working?yl(o):o instanceof Map)},ml.working=typeof Set<"u"&&ml(new Set),Rt.isSet=function(o){return typeof Set<"u"&&(ml.working?ml(o):o instanceof Set)},wl.working=typeof WeakMap<"u"&&wl(new WeakMap),Rt.isWeakMap=function(o){return typeof WeakMap<"u"&&(wl.working?wl(o):o instanceof WeakMap)},hu.working=typeof WeakSet<"u"&&hu(new WeakSet),Rt.isWeakSet=function(o){return hu(o)},tf.working=typeof ArrayBuffer<"u"&&tf(new ArrayBuffer),Rt.isArrayBuffer=Xy,rf.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&rf(new DataView(new ArrayBuffer(1),0,1)),Rt.isDataView=em,nf.working=typeof SharedArrayBuffer<"u"&&nf(new SharedArrayBuffer),Rt.isSharedArrayBuffer=tm,Rt.isAsyncFunction=function(o){return Kt(o)==="[object AsyncFunction]"},Rt.isMapIterator=function(o){return Kt(o)==="[object Map Iterator]"},Rt.isSetIterator=function(o){return Kt(o)==="[object Set Iterator]"},Rt.isGeneratorObject=function(o){return Kt(o)==="[object Generator]"},Rt.isWebAssemblyCompiledModule=function(o){return Kt(o)==="[object WebAssembly.Module]"},Rt.isNumberObject=rm,Rt.isStringObject=nm,Rt.isBooleanObject=im,Rt.isBigIntObject=om,Rt.isSymbolObject=am,Rt.isBoxedPrimitive=function(o){return rm(o)||nm(o)||im(o)||om(o)||am(o)},Rt.isAnyArrayBuffer=function(o){return Ir&&(Xy(o)||tm(o))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(o){Object.defineProperty(Rt,o,{enumerable:!1,value:e(function(){throw new Error(o+" is not supported in userland")},"value")})}),hs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,at={},fn=Gt,Em=Object.getOwnPropertyDescriptors||function(o){for(var n=Object.keys(o),r={},u=0;u<n.length;u++)r[n[u]]=Object.getOwnPropertyDescriptor(o,n[u]);return r},vx=/%[sdj%]/g,at.format=function(o){if(!af(o)){for(var n=[],r=0;r<arguments.length;r++)n.push(hi(arguments[r]));return n.join(" ")}r=1;for(var u=arguments,p=u.length,h=String(o).replace(vx,function(m){if(m==="%%")return"%";if(r>=p)return m;switch(m){case"%s":return String(u[r++]);case"%d":return Number(u[r++]);case"%j":try{return JSON.stringify(u[r++])}catch{return"[Circular]"}default:return m}}),d=u[r];r<p;d=u[++r])of(d)||!ua(d)?h+=" "+d:h+=" "+hi(d);return h},at.deprecate=function(o,n){if(fn!==void 0&&fn.noDeprecation===!0)return o;if(fn===void 0)return function(){return at.deprecate(o,n).apply(this||hs,arguments)};var r=!1;return function(){if(!r){if(fn.throwDeprecation)throw new Error(n);fn.traceDeprecation?console.trace(n):console.error(n),r=!0}return o.apply(this||hs,arguments)}},vl={},Sm=/^$/,fn.env.NODE_DEBUG&&(gu=fn.env.NODE_DEBUG,gu=gu.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),Sm=new RegExp("^"+gu+"$","i")),e(hi,"oe"),e(Kj,"ue"),e(Jj,"fe"),e(df,"ae"),e(bh,"ce"),e(vh,"se"),e(h_,"pe"),e(ld,"ye"),e(of,"le"),e(d_,"de"),e(af,"ge"),e(Gi,"be"),e(Bs,"me"),e(ua,"he"),e(sf,"je"),e(xs,"Ae"),e(lf,"we"),e(Pd,"ve"),e(_h,"Oe"),at.debuglog=function(o){if(o=o.toUpperCase(),!vl[o])if(Sm.test(o)){var n=fn.pid;vl[o]=function(){var r=at.format.apply(at,arguments);console.error("%s %d: %s",o,n,r)}}else vl[o]=function(){};return vl[o]},at.inspect=hi,hi.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]},hi.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},at.types=Rt,at.isArray=h_,at.isBoolean=ld,at.isNull=of,at.isNullOrUndefined=function(o){return o==null},at.isNumber=d_,at.isString=af,at.isSymbol=function(o){return typeof o=="symbol"},at.isUndefined=Gi,at.isRegExp=Bs,at.types.isRegExp=Bs,at.isObject=ua,at.isDate=sf,at.types.isDate=sf,at.isError=xs,at.types.isNativeError=xs,at.isFunction=lf,at.isPrimitive=function(o){return o===null||typeof o=="boolean"||typeof o=="number"||typeof o=="string"||typeof o=="symbol"||o===void 0},at.isBuffer=_m,T8=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],e(UB,"Be"),e(e2,"ke"),at.log=function(){console.log("%s - %s",UB(),at.format.apply(at,arguments))},at.inherits=yx,at._extend=function(o,n){if(!n||!ua(n))return o;for(var r=Object.keys(n),u=r.length;u--;)o[r[u]]=n[r[u]];return o},Ii=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0,e(MB,"De"),at.promisify=function(o){if(typeof o!="function")throw new TypeError('The "original" argument must be of type Function');if(Ii&&o[Ii]){var n;if(typeof(n=o[Ii])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(n,Ii,{value:n,enumerable:!1,writable:!1,configurable:!0}),n}function n(){for(var r,u,p=new Promise(function(m,y){r=m,u=y}),h=[],d=0;d<arguments.length;d++)h.push(arguments[d]);h.push(function(m,y){m?u(m):r(y)});try{o.apply(this||hs,h)}catch(m){u(m)}return p}return l(n,"t"),e(n,"t5"),Object.setPrototypeOf(n,Object.getPrototypeOf(o)),Ii&&Object.defineProperty(n,Ii,{value:n,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(n,Em(o))},at.promisify.custom=Ii,at.callbackify=function(o){if(typeof o!="function")throw new TypeError('The "original" argument must be of type Function');function n(){for(var r=[],u=0;u<arguments.length;u++)r.push(arguments[u]);var p=r.pop();if(typeof p!="function")throw new TypeError("The last argument must be of type Function");var h=this||hs,d=e(function(){return p.apply(h,arguments)},"o5");o.apply(this||hs,r).then(function(m){fn.nextTick(d.bind(null,null,m))},function(m){fn.nextTick(MB.bind(null,m,d))})}return l(n,"t"),e(n,"t5"),Object.setPrototypeOf(n,Object.getPrototypeOf(o)),Object.defineProperties(n,Em(o)),n},at._extend,at.callbackify,at.debuglog,at.deprecate,at.format,at.inherits,at.inspect,at.isArray,at.isBoolean,at.isBuffer,at.isDate,at.isError,at.isFunction,at.isNull,at.isNullOrUndefined,at.isNumber,at.isObject,at.isPrimitive,at.isRegExp,at.isString,at.isSymbol,at.isUndefined,at.log,at.promisify,at._extend,at.callbackify,at.debuglog,at.deprecate,at.format,at.inherits,at.inspect,at.isArray,at.isBoolean,at.isBuffer,at.isDate,at.isError,at.isFunction,at.isNull,at.isNullOrUndefined,at.isNumber,at.isObject,at.isPrimitive,at.isRegExp,at.isString,at.isSymbol,at.isUndefined,at.log,p3=at.promisify,at.types,Rh={},__=!1,ta=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e($B,"dew"),Tt=$B(),Tt.platform="browser",Tt.addListener,Tt.argv,Tt.binding,Tt.browser,Tt.chdir,Tt.cwd,Tt.emit,Tt.env,Tt.listeners,Tt.nextTick,Tt.off,Tt.on,Tt.once,Tt.prependListener,Tt.prependOnceListener,Tt.removeAllListeners,Tt.removeListener,Tt.title,Tt.umask,Tt.version,Tt.versions,_x={byteLength:e(function(o){var n=sm(o),r=n[0],u=n[1];return 3*(r+u)/4-u},"byteLength"),toByteArray:e(function(o){var n,r,u=sm(o),p=u[0],h=u[1],d=new Ex(function(w,_,S){return 3*(_+S)/4-S}(0,p,h)),m=0,y=h>0?p-4:p;for(r=0;r<y;r+=4)n=qr[o.charCodeAt(r)]<<18|qr[o.charCodeAt(r+1)]<<12|qr[o.charCodeAt(r+2)]<<6|qr[o.charCodeAt(r+3)],d[m++]=n>>16&255,d[m++]=n>>8&255,d[m++]=255&n;return h===2&&(n=qr[o.charCodeAt(r)]<<2|qr[o.charCodeAt(r+1)]>>4,d[m++]=255&n),h===1&&(n=qr[o.charCodeAt(r)]<<10|qr[o.charCodeAt(r+1)]<<4|qr[o.charCodeAt(r+2)]>>2,d[m++]=n>>8&255,d[m++]=255&n),d},"toByteArray"),fromByteArray:e(function(o){for(var n,r=o.length,u=r%3,p=[],h=0,d=r-u;h<d;h+=16383)p.push(WB(o,h,h+16383>d?d:h+16383));return u===1?(n=o[r-1],p.push(gn[n>>2]+gn[n<<4&63]+"==")):u===2&&(n=(o[r-2]<<8)+o[r-1],p.push(gn[n>>10]+gn[n>>4&63]+gn[n<<2&63]+"=")),p.join("")},"fromByteArray")},gn=[],qr=[],Ex=typeof Uint8Array<"u"?Uint8Array:Array,yu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Yo=0,Sx=yu.length;Yo<Sx;++Yo)gn[Yo]=yu[Yo],qr[yu.charCodeAt(Yo)]=Yo;e(sm,"u$22"),e(WB,"c$12"),qr[45]=62,qr[95]=63,Ax={read:e(function(o,n,r,u,p){var h,d,m=8*p-u-1,y=(1<<m)-1,w=y>>1,_=-7,S=r?p-1:0,T=r?-1:1,O=o[n+S];for(S+=T,h=O&(1<<-_)-1,O>>=-_,_+=m;_>0;h=256*h+o[n+S],S+=T,_-=8);for(d=h&(1<<-_)-1,h>>=-_,_+=u;_>0;d=256*d+o[n+S],S+=T,_-=8);if(h===0)h=1-w;else{if(h===y)return d?NaN:1/0*(O?-1:1);d+=Math.pow(2,u),h-=w}return(O?-1:1)*d*Math.pow(2,h-u)},"read"),write:e(function(o,n,r,u,p,h){var d,m,y,w=8*h-p-1,_=(1<<w)-1,S=_>>1,T=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,O=u?0:h-1,E=u?1:-1,P=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(m=isNaN(n)?1:0,d=_):(d=Math.floor(Math.log(n)/Math.LN2),n*(y=Math.pow(2,-d))<1&&(d--,y*=2),(n+=d+S>=1?T/y:T*Math.pow(2,1-S))*y>=2&&(d++,y/=2),d+S>=_?(m=0,d=_):d+S>=1?(m=(n*y-1)*Math.pow(2,p),d+=S):(m=n*Math.pow(2,S-1)*Math.pow(2,p),d=0));p>=8;o[r+O]=255&m,O+=E,m/=256,p-=8);for(d=d<<p|m,w+=p;w>0;o[r+O]=255&d,O+=E,d/=256,w-=8);o[r+O-E]|=128*P},"write")},En={},ud=_x,ra=Ax,Am=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null,En.Buffer=tt,En.SlowBuffer=function(o){return+o!=o&&(o=0),tt.alloc(+o)},En.INSPECT_MAX_BYTES=50,e(On,"f$2"),e(tt,"u$1$1"),e(p_,"s$12"),e(g_,"h$1$1"),e(Eh,"a$2"),e(Sh,"p3"),e(Yj,"c$1$1"),e(jd,"l$12"),e(y_,"y3"),e(zB,"g2"),e(Fi,"w2"),e(lm,"d2"),e(m_,"v3"),e(HB,"b2"),e(qB,"m2"),e(w_,"E2"),e(GB,"B2"),e(VB,"A2"),e(KB,"U2"),e(Zj,"T2"),e(b_,"I2"),En.kMaxLength=2147483647,tt.TYPED_ARRAY_SUPPORT=function(){try{var o=new Uint8Array(1),n={foo:e(function(){return 42},"foo")};return Object.setPrototypeOf(n,Uint8Array.prototype),Object.setPrototypeOf(o,n),o.foo()===42}catch{return!1}}(),tt.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."),Object.defineProperty(tt.prototype,"parent",{enumerable:!0,get:e(function(){if(tt.isBuffer(this))return this.buffer},"get")}),Object.defineProperty(tt.prototype,"offset",{enumerable:!0,get:e(function(){if(tt.isBuffer(this))return this.byteOffset},"get")}),tt.poolSize=8192,tt.from=function(o,n,r){return p_(o,n,r)},Object.setPrototypeOf(tt.prototype,Uint8Array.prototype),Object.setPrototypeOf(tt,Uint8Array),tt.alloc=function(o,n,r){return function(u,p,h){return g_(u),u<=0?On(u):p!==void 0?typeof h=="string"?On(u).fill(p,h):On(u).fill(p):On(u)}(o,n,r)},tt.allocUnsafe=function(o){return Eh(o)},tt.allocUnsafeSlow=function(o){return Eh(o)},tt.isBuffer=function(o){return o!=null&&o._isBuffer===!0&&o!==tt.prototype},tt.compare=function(o,n){if(kn(o,Uint8Array)&&(o=tt.from(o,o.offset,o.byteLength)),kn(n,Uint8Array)&&(n=tt.from(n,n.offset,n.byteLength)),!tt.isBuffer(o)||!tt.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(o===n)return 0;for(var r=o.length,u=n.length,p=0,h=Math.min(r,u);p<h;++p)if(o[p]!==n[p]){r=o[p],u=n[p];break}return r<u?-1:u<r?1:0},tt.isEncoding=function(o){switch(String(o).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}},tt.concat=function(o,n){if(!Array.isArray(o))throw new TypeError('"list" argument must be an Array of Buffers');if(o.length===0)return tt.alloc(0);var r;if(n===void 0)for(n=0,r=0;r<o.length;++r)n+=o[r].length;var u=tt.allocUnsafe(n),p=0;for(r=0;r<o.length;++r){var h=o[r];if(kn(h,Uint8Array)&&(h=tt.from(h)),!tt.isBuffer(h))throw new TypeError('"list" argument must be an Array of Buffers');h.copy(u,p),p+=h.length}return u},tt.byteLength=y_,tt.prototype._isBuffer=!0,tt.prototype.swap16=function(){var o=this.length;if(o%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var n=0;n<o;n+=2)Fi(this,n,n+1);return this},tt.prototype.swap32=function(){var o=this.length;if(o%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var n=0;n<o;n+=4)Fi(this,n,n+3),Fi(this,n+1,n+2);return this},tt.prototype.swap64=function(){var o=this.length;if(o%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var n=0;n<o;n+=8)Fi(this,n,n+7),Fi(this,n+1,n+6),Fi(this,n+2,n+5),Fi(this,n+3,n+4);return this},tt.prototype.toString=function(){var o=this.length;return o===0?"":arguments.length===0?b_(this,0,o):zB.apply(this,arguments)},tt.prototype.toLocaleString=tt.prototype.toString,tt.prototype.equals=function(o){if(!tt.isBuffer(o))throw new TypeError("Argument must be a Buffer");return this===o||tt.compare(this,o)===0},tt.prototype.inspect=function(){var o="",n=En.INSPECT_MAX_BYTES;return o=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(o+=" ... "),"<Buffer "+o+">"},Am&&(tt.prototype[Am]=tt.prototype.inspect),tt.prototype.compare=function(o,n,r,u,p){if(kn(o,Uint8Array)&&(o=tt.from(o,o.offset,o.byteLength)),!tt.isBuffer(o))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof o);if(n===void 0&&(n=0),r===void 0&&(r=o?o.length:0),u===void 0&&(u=0),p===void 0&&(p=this.length),n<0||r>o.length||u<0||p>this.length)throw new RangeError("out of range index");if(u>=p&&n>=r)return 0;if(u>=p)return-1;if(n>=r)return 1;if(this===o)return 0;for(var h=(p>>>=0)-(u>>>=0),d=(r>>>=0)-(n>>>=0),m=Math.min(h,d),y=this.slice(u,p),w=o.slice(n,r),_=0;_<m;++_)if(y[_]!==w[_]){h=y[_],d=w[_];break}return h<d?-1:d<h?1:0},tt.prototype.includes=function(o,n,r){return this.indexOf(o,n,r)!==-1},tt.prototype.indexOf=function(o,n,r){return lm(this,o,n,r,!0)},tt.prototype.lastIndexOf=function(o,n,r){return lm(this,o,n,r,!1)},tt.prototype.write=function(o,n,r,u){if(n===void 0)u="utf8",r=this.length,n=0;else if(r===void 0&&typeof n=="string")u=n,r=this.length,n=0;else{if(!isFinite(n))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");n>>>=0,isFinite(r)?(r>>>=0,u===void 0&&(u="utf8")):(u=r,r=void 0)}var p=this.length-n;if((r===void 0||r>p)&&(r=p),o.length>0&&(r<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");u||(u="utf8");for(var h=!1;;)switch(u){case"hex":return HB(this,o,n,r);case"utf8":case"utf-8":return qB(this,o,n,r);case"ascii":return w_(this,o,n,r);case"latin1":case"binary":return GB(this,o,n,r);case"base64":return VB(this,o,n,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return KB(this,o,n,r);default:if(h)throw new TypeError("Unknown encoding: "+u);u=(""+u).toLowerCase(),h=!0}},tt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},e(Qj,"S2"),e(Xj,"R2"),e(e8,"O2"),e(t8,"L2"),e(lr,"x2"),e(Fr,"C2"),e(t2,"P2"),e(fm,"k2"),e(um,"M2"),tt.prototype.slice=function(o,n){var r=this.length;(o=~~o)<0?(o+=r)<0&&(o=0):o>r&&(o=r),(n=n===void 0?r:~~n)<0?(n+=r)<0&&(n=0):n>r&&(n=r),n<o&&(n=o);var u=this.subarray(o,n);return Object.setPrototypeOf(u,tt.prototype),u},tt.prototype.readUIntLE=function(o,n,r){o>>>=0,n>>>=0,r||lr(o,n,this.length);for(var u=this[o],p=1,h=0;++h<n&&(p*=256);)u+=this[o+h]*p;return u},tt.prototype.readUIntBE=function(o,n,r){o>>>=0,n>>>=0,r||lr(o,n,this.length);for(var u=this[o+--n],p=1;n>0&&(p*=256);)u+=this[o+--n]*p;return u},tt.prototype.readUInt8=function(o,n){return o>>>=0,n||lr(o,1,this.length),this[o]},tt.prototype.readUInt16LE=function(o,n){return o>>>=0,n||lr(o,2,this.length),this[o]|this[o+1]<<8},tt.prototype.readUInt16BE=function(o,n){return o>>>=0,n||lr(o,2,this.length),this[o]<<8|this[o+1]},tt.prototype.readUInt32LE=function(o,n){return o>>>=0,n||lr(o,4,this.length),(this[o]|this[o+1]<<8|this[o+2]<<16)+16777216*this[o+3]},tt.prototype.readUInt32BE=function(o,n){return o>>>=0,n||lr(o,4,this.length),16777216*this[o]+(this[o+1]<<16|this[o+2]<<8|this[o+3])},tt.prototype.readIntLE=function(o,n,r){o>>>=0,n>>>=0,r||lr(o,n,this.length);for(var u=this[o],p=1,h=0;++h<n&&(p*=256);)u+=this[o+h]*p;return u>=(p*=128)&&(u-=Math.pow(2,8*n)),u},tt.prototype.readIntBE=function(o,n,r){o>>>=0,n>>>=0,r||lr(o,n,this.length);for(var u=n,p=1,h=this[o+--u];u>0&&(p*=256);)h+=this[o+--u]*p;return h>=(p*=128)&&(h-=Math.pow(2,8*n)),h},tt.prototype.readInt8=function(o,n){return o>>>=0,n||lr(o,1,this.length),128&this[o]?-1*(255-this[o]+1):this[o]},tt.prototype.readInt16LE=function(o,n){o>>>=0,n||lr(o,2,this.length);var r=this[o]|this[o+1]<<8;return 32768&r?4294901760|r:r},tt.prototype.readInt16BE=function(o,n){o>>>=0,n||lr(o,2,this.length);var r=this[o+1]|this[o]<<8;return 32768&r?4294901760|r:r},tt.prototype.readInt32LE=function(o,n){return o>>>=0,n||lr(o,4,this.length),this[o]|this[o+1]<<8|this[o+2]<<16|this[o+3]<<24},tt.prototype.readInt32BE=function(o,n){return o>>>=0,n||lr(o,4,this.length),this[o]<<24|this[o+1]<<16|this[o+2]<<8|this[o+3]},tt.prototype.readFloatLE=function(o,n){return o>>>=0,n||lr(o,4,this.length),ra.read(this,o,!0,23,4)},tt.prototype.readFloatBE=function(o,n){return o>>>=0,n||lr(o,4,this.length),ra.read(this,o,!1,23,4)},tt.prototype.readDoubleLE=function(o,n){return o>>>=0,n||lr(o,8,this.length),ra.read(this,o,!0,52,8)},tt.prototype.readDoubleBE=function(o,n){return o>>>=0,n||lr(o,8,this.length),ra.read(this,o,!1,52,8)},tt.prototype.writeUIntLE=function(o,n,r,u){o=+o,n>>>=0,r>>>=0,u||Fr(this,o,n,r,Math.pow(2,8*r)-1,0);var p=1,h=0;for(this[n]=255&o;++h<r&&(p*=256);)this[n+h]=o/p&255;return n+r},tt.prototype.writeUIntBE=function(o,n,r,u){o=+o,n>>>=0,r>>>=0,u||Fr(this,o,n,r,Math.pow(2,8*r)-1,0);var p=r-1,h=1;for(this[n+p]=255&o;--p>=0&&(h*=256);)this[n+p]=o/h&255;return n+r},tt.prototype.writeUInt8=function(o,n,r){return o=+o,n>>>=0,r||Fr(this,o,n,1,255,0),this[n]=255&o,n+1},tt.prototype.writeUInt16LE=function(o,n,r){return o=+o,n>>>=0,r||Fr(this,o,n,2,65535,0),this[n]=255&o,this[n+1]=o>>>8,n+2},tt.prototype.writeUInt16BE=function(o,n,r){return o=+o,n>>>=0,r||Fr(this,o,n,2,65535,0),this[n]=o>>>8,this[n+1]=255&o,n+2},tt.prototype.writeUInt32LE=function(o,n,r){return o=+o,n>>>=0,r||Fr(this,o,n,4,4294967295,0),this[n+3]=o>>>24,this[n+2]=o>>>16,this[n+1]=o>>>8,this[n]=255&o,n+4},tt.prototype.writeUInt32BE=function(o,n,r){return o=+o,n>>>=0,r||Fr(this,o,n,4,4294967295,0),this[n]=o>>>24,this[n+1]=o>>>16,this[n+2]=o>>>8,this[n+3]=255&o,n+4},tt.prototype.writeIntLE=function(o,n,r,u){if(o=+o,n>>>=0,!u){var p=Math.pow(2,8*r-1);Fr(this,o,n,r,p-1,-p)}var h=0,d=1,m=0;for(this[n]=255&o;++h<r&&(d*=256);)o<0&&m===0&&this[n+h-1]!==0&&(m=1),this[n+h]=(o/d>>0)-m&255;return n+r},tt.prototype.writeIntBE=function(o,n,r,u){if(o=+o,n>>>=0,!u){var p=Math.pow(2,8*r-1);Fr(this,o,n,r,p-1,-p)}var h=r-1,d=1,m=0;for(this[n+h]=255&o;--h>=0&&(d*=256);)o<0&&m===0&&this[n+h+1]!==0&&(m=1),this[n+h]=(o/d>>0)-m&255;return n+r},tt.prototype.writeInt8=function(o,n,r){return o=+o,n>>>=0,r||Fr(this,o,n,1,127,-128),o<0&&(o=255+o+1),this[n]=255&o,n+1},tt.prototype.writeInt16LE=function(o,n,r){return o=+o,n>>>=0,r||Fr(this,o,n,2,32767,-32768),this[n]=255&o,this[n+1]=o>>>8,n+2},tt.prototype.writeInt16BE=function(o,n,r){return o=+o,n>>>=0,r||Fr(this,o,n,2,32767,-32768),this[n]=o>>>8,this[n+1]=255&o,n+2},tt.prototype.writeInt32LE=function(o,n,r){return o=+o,n>>>=0,r||Fr(this,o,n,4,2147483647,-2147483648),this[n]=255&o,this[n+1]=o>>>8,this[n+2]=o>>>16,this[n+3]=o>>>24,n+4},tt.prototype.writeInt32BE=function(o,n,r){return o=+o,n>>>=0,r||Fr(this,o,n,4,2147483647,-2147483648),o<0&&(o=4294967295+o+1),this[n]=o>>>24,this[n+1]=o>>>16,this[n+2]=o>>>8,this[n+3]=255&o,n+4},tt.prototype.writeFloatLE=function(o,n,r){return fm(this,o,n,!0,r)},tt.prototype.writeFloatBE=function(o,n,r){return fm(this,o,n,!1,r)},tt.prototype.writeDoubleLE=function(o,n,r){return um(this,o,n,!0,r)},tt.prototype.writeDoubleBE=function(o,n,r){return um(this,o,n,!1,r)},tt.prototype.copy=function(o,n,r,u){if(!tt.isBuffer(o))throw new TypeError("argument should be a Buffer");if(r||(r=0),u||u===0||(u=this.length),n>=o.length&&(n=o.length),n||(n=0),u>0&&u<r&&(u=r),u===r||o.length===0||this.length===0)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("sourceEnd out of bounds");u>this.length&&(u=this.length),o.length-n<u-r&&(u=o.length-n+r);var p=u-r;if(this===o&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(n,r,u);else if(this===o&&r<n&&n<u)for(var h=p-1;h>=0;--h)o[h+n]=this[h+r];else Uint8Array.prototype.set.call(o,this.subarray(r,u),n);return p},tt.prototype.fill=function(o,n,r,u){if(typeof o=="string"){if(typeof n=="string"?(u=n,n=0,r=this.length):typeof r=="string"&&(u=r,r=this.length),u!==void 0&&typeof u!="string")throw new TypeError("encoding must be a string");if(typeof u=="string"&&!tt.isEncoding(u))throw new TypeError("Unknown encoding: "+u);if(o.length===1){var p=o.charCodeAt(0);(u==="utf8"&&p<128||u==="latin1")&&(o=p)}}else typeof o=="number"?o&=255:typeof o=="boolean"&&(o=Number(o));if(n<0||this.length<n||this.length<r)throw new RangeError("Out of range index");if(r<=n)return this;var h;if(n>>>=0,r=r===void 0?this.length:r>>>0,o||(o=0),typeof o=="number")for(h=n;h<r;++h)this[h]=o;else{var d=tt.isBuffer(o)?o:tt.from(o,u),m=d.length;if(m===0)throw new TypeError('The value "'+o+'" is invalid for argument "value"');for(h=0;h<r-n;++h)this[h+n]=d[h%m]}return this},F8=/[^+/0-9A-Za-z-_]/g,e(fd,"_2"),e(r2,"z2"),e(Rf,"D2"),e(kn,"F2"),e(Cd,"N2"),B8=function(){for(var o=new Array(256),n=0;n<16;++n)for(var r=16*n,u=0;u<16;++u)o[r+u]="0123456789abcdef"[n]+"0123456789abcdef"[u];return o}(),En.Buffer,En.INSPECT_MAX_BYTES,En.kMaxLength,_l={},El=En,hn=El.Buffer,e(cm,"t3"),e(Bi,"f3"),hn.from&&hn.alloc&&hn.allocUnsafe&&hn.allocUnsafeSlow?_l=El:(cm(El,_l),_l.Buffer=Bi),Bi.prototype=Object.create(hn.prototype),cm(hn,Bi),Bi.from=function(o,n,r){if(typeof o=="number")throw new TypeError("Argument must not be a number");return hn(o,n,r)},Bi.alloc=function(o,n,r){if(typeof o!="number")throw new TypeError("Argument must be a number");var u=hn(o);return n!==void 0?typeof r=="string"?u.fill(n,r):u.fill(n):u.fill(0),u},Bi.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return hn(o)},Bi.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return El.SlowBuffer(o)},Rx=_l,cd={},hd=Rx.Buffer,E_=hd.isEncoding||function(o){switch((o=""+o)&&o.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}},e(us,"a3"),e(du,"r3"),e(r8,"n$12"),e(n8,"h3"),e(i8,"l3"),e(o8,"u$12"),e(a8,"o$12"),e(s8,"f$12"),e(l8,"c3"),cd.StringDecoder=us,us.prototype.write=function(o){if(o.length===0)return"";var n,r;if(this.lastNeed){if((n=this.fillLast(o))===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<o.length?n?n+this.text(o,r):this.text(o,r):n||""},us.prototype.end=function(o){var n=o&&o.length?this.write(o):"";return this.lastNeed?n+"\uFFFD":n},us.prototype.text=function(o,n){var r=function(p,h,d){var m=h.length-1;if(m<d)return 0;var y=du(h[m]);return y>=0?(y>0&&(p.lastNeed=y-1),y):--m<d||y===-2?0:(y=du(h[m]))>=0?(y>0&&(p.lastNeed=y-2),y):--m<d||y===-2?0:(y=du(h[m]))>=0?(y>0&&(y===2?y=0:p.lastNeed=y-3),y):0}(this,o,n);if(!this.lastNeed)return o.toString("utf8",n);this.lastTotal=r;var u=o.length-(r-this.lastNeed);return o.copy(this.lastChar,0,u),o.toString("utf8",n,u)},us.prototype.fillLast=function(o){if(this.lastNeed<=o.length)return o.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);o.copy(this.lastChar,this.lastTotal-this.lastNeed,0,o.length),this.lastNeed-=o.length},Os={},S_=!1,e(f8,"dew$2$1"),Oh={},A_=!1,e(u8,"dew$1$1"),$i={},R_=!1,e(JB,"dew$g"),gi=JB(),gi.Buffer,gi.INSPECT_MAX_BYTES,gi.kMaxLength,kh={},O_=!1,e(Ji,"dew$f"),k_={},T_=!1,e(n2,"dew$e"),Th={},F_=!1,e(c8,"dew$d"),Fh={},B_=!1,e(i2,"dew$c"),Bh={},x_=!1,e(Pa,"dew$b"),xh={},I_=!1,e(o2,"dew$a"),Ih={},P_=!1,Ph=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(h8,"dew$9"),jh={},j_=!1,x8=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(a2,"dew$8"),Ch={},C_=!1,e(Oa,"dew$7"),Lh={},L_=!1,e(Ld,"dew$6"),Nh={},N_=!1,e(d8,"dew$5"),D_={},U_=!1,e(p8,"dew$4"),Dh={},M_=!1,I8=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(s2,"dew$3"),Uh={},$_=!1,e(l2,"dew$2"),Mh={},W_=!1,e(g8,"dew$1"),$h={},z_=!1,e(y8,"dew2"),Mr={},H_=!1,e(f2,"dew3"),Wh={},q_=!1,e(YB,"dew$12"),G_=YB(),Zo=2147483647,Ox=/^xn--/,kx=/[^\0-\x7E]/,P8=/[\x2E\u3002\uFF0E\uFF61]/g,j8={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},un=Math.floor,mu=String.fromCharCode,e(xi,"i$13"),e(hm,"f$13"),e(dm,"l$13"),Rm=e(function(o,n){return o+22+75*(o<26)-((n!=0)<<5)},"u$13"),Om=e(function(o,n,r){let u=0;for(o=r?un(o/700):o>>1,o+=un(o/n);o>455;u+=36)o=un(o/35);return un(u+36*o/(o+38))},"a$12"),km=e(function(o){let n=[],r=o.length,u=0,p=128,h=72,d=o.lastIndexOf("-");d<0&&(d=0);for(let y=0;y<d;++y)o.charCodeAt(y)>=128&&xi("not-basic"),n.push(o.charCodeAt(y));for(let y=d>0?d+1:0;y<r;){let w=u;for(let S=1,T=36;;T+=36){y>=r&&xi("invalid-input");let O=(m=o.charCodeAt(y++))-48<10?m-22:m-65<26?m-65:m-97<26?m-97:36;(O>=36||O>un((Zo-u)/S))&&xi("overflow"),u+=O*S;let E=T<=h?1:T>=h+26?26:T-h;if(O<E)break;let P=36-E;S>un(Zo/P)&&xi("overflow"),S*=P}let _=n.length+1;h=Om(u-w,_,w==0),un(u/_)>Zo-p&&xi("overflow"),p+=un(u/_),u%=_,n.splice(u++,0,p)}var m;return String.fromCodePoint(...n)},"d3"),Tm=e(function(o){let n=[],r=(o=dm(o)).length,u=128,p=0,h=72;for(let y of o)y<128&&n.push(mu(y));let d=n.length,m=d;for(d&&n.push("-");m<r;){let y=Zo;for(let _ of o)_>=u&&_<y&&(y=_);let w=m+1;y-u>un((Zo-p)/w)&&xi("overflow"),p+=(y-u)*w,u=y;for(let _ of o)if(_<u&&++p>Zo&&xi("overflow"),_==u){let S=p;for(let T=36;;T+=36){let O=T<=h?1:T>=h+26?26:T-h;if(S<O)break;let E=S-O,P=36-O;n.push(mu(Rm(O+E%P,0))),S=un(E/P)}n.push(mu(Rm(S,0))),h=Om(p,w,m==d),p=0,++m}++p,++u}return n.join("")},"h$12"),Tx={version:"2.1.0",ucs2:{decode:dm,encode:e(o=>String.fromCodePoint(...o),"encode")},decode:km,encode:Tm,toASCII:e(function(o){return hm(o,function(n){return kx.test(n)?"xn--"+Tm(n):n})},"toASCII"),toUnicode:e(function(o){return hm(o,function(n){return Ox.test(n)?km(n.slice(4).toLowerCase()):n})},"toUnicode")},e(ZB,"e$13"),Fx=e(function(o,n,r,u){n=n||"&",r=r||"=";var p={};if(typeof o!="string"||o.length===0)return p;var h=/\+/g;o=o.split(n);var d=1e3;u&&typeof u.maxKeys=="number"&&(d=u.maxKeys);var m=o.length;d>0&&m>d&&(m=d);for(var y=0;y<m;++y){var w,_,S,T,O=o[y].replace(h,"%20"),E=O.indexOf(r);E>=0?(w=O.substr(0,E),_=O.substr(E+1)):(w=O,_=""),S=decodeURIComponent(w),T=decodeURIComponent(_),ZB(p,S)?Array.isArray(p[S])?p[S].push(T):p[S]=[p[S],T]:p[S]=T}return p},"n$13"),ds=e(function(o){switch(typeof o){case"string":return o;case"boolean":return o?"true":"false";case"number":return isFinite(o)?o:"";default:return""}},"r$12"),Bx=e(function(o,n,r,u){return n=n||"&",r=r||"=",o===null&&(o=void 0),typeof o=="object"?Object.keys(o).map(function(p){var h=encodeURIComponent(ds(p))+r;return Array.isArray(o[p])?o[p].map(function(d){return h+encodeURIComponent(ds(d))}).join(n):h+encodeURIComponent(ds(o[p]))}).join(n):u?encodeURIComponent(ds(u))+r+encodeURIComponent(ds(o)):""},"t4"),Sn={},Sn.decode=Sn.parse=Fx,Sn.encode=Sn.stringify=Bx,Sn.decode,Sn.encode,Sn.parse,Sn.stringify,Pt={},xx=Tx,dn={isString:e(function(o){return typeof o=="string"},"isString"),isObject:e(function(o){return typeof o=="object"&&o!==null},"isObject"),isNull:e(function(o){return o===null},"isNull"),isNullOrUndefined:e(function(o){return o==null},"isNullOrUndefined")},e(Jr,"r4"),Pt.parse=cs,Pt.resolve=function(o,n){return cs(o,!1,!0).resolve(n)},Pt.resolveObject=function(o,n){return o?cs(o,!1,!0).resolveObject(n):n},Pt.format=function(o){return dn.isString(o)&&(o=cs(o)),o instanceof Jr?o.format():Jr.prototype.format.call(o)},Pt.Url=Jr,Ix=/^([a-z0-9.+-]+:)/i,Px=/:[0-9]*$/,jx=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Cx=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
|
|
137
|
-
`," "]),wu=["'"].concat(Cx),Fm=["%","/","?",";","#"].concat(wu),Bm=["/","?","#"],xm=/^[+a-z0-9A-Z_-]{0,63}$/,Lx=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Nx={javascript:!0,"javascript:":!0},bu={javascript:!0,"javascript:":!0},Qo={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},vu=Sn,e(cs,"O3"),Jr.prototype.parse=function(o,n,r){if(!dn.isString(o))throw new TypeError("Parameter 'url' must be a string, not "+typeof o);var u=o.indexOf("?"),p=u!==-1&&u<o.indexOf("#")?"?":"#",h=o.split(p);h[0]=h[0].replace(/\\/g,"/");var d=o=h.join(p);if(d=d.trim(),!r&&o.split("#").length===1){var m=jx.exec(d);if(m)return this.path=d,this.href=d,this.pathname=m[1],m[2]?(this.search=m[2],this.query=n?vu.parse(this.search.substr(1)):this.search.substr(1)):n&&(this.search="",this.query={}),this}var y=Ix.exec(d);if(y){var w=(y=y[0]).toLowerCase();this.protocol=w,d=d.substr(y.length)}if(r||y||d.match(/^\/\/[^@\/]+@[^@\/]+/)){var _=d.substr(0,2)==="//";!_||y&&bu[y]||(d=d.substr(2),this.slashes=!0)}if(!bu[y]&&(_||y&&!Qo[y])){for(var S,T,O=-1,E=0;E<Bm.length;E++)(P=d.indexOf(Bm[E]))!==-1&&(O===-1||P<O)&&(O=P);for((T=O===-1?d.lastIndexOf("@"):d.lastIndexOf("@",O))!==-1&&(S=d.slice(0,T),d=d.slice(T+1),this.auth=decodeURIComponent(S)),O=-1,E=0;E<Fm.length;E++){var P;(P=d.indexOf(Fm[E]))!==-1&&(O===-1||P<O)&&(O=P)}O===-1&&(O=d.length),this.host=d.slice(0,O),d=d.slice(O),this.parseHost(),this.hostname=this.hostname||"";var A=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!A)for(var x=this.hostname.split(/\./),U=(E=0,x.length);E<U;E++){var M=x[E];if(M&&!M.match(xm)){for(var ee="",V=0,q=M.length;V<q;V++)M.charCodeAt(V)>127?ee+="x":ee+=M[V];if(!ee.match(xm)){var G=x.slice(0,E),re=x.slice(E+1),ae=M.match(Lx);ae&&(G.push(ae[1]),re.unshift(ae[2])),re.length&&(d="/"+re.join(".")+d),this.hostname=G.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=xx.toASCII(this.hostname));var de=this.port?":"+this.port:"",we=this.hostname||"";this.host=we+de,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),d[0]!=="/"&&(d="/"+d))}if(!Nx[w])for(E=0,U=wu.length;E<U;E++){var xe=wu[E];if(d.indexOf(xe)!==-1){var Pe=encodeURIComponent(xe);Pe===xe&&(Pe=escape(xe)),d=d.split(xe).join(Pe)}}var se=d.indexOf("#");se!==-1&&(this.hash=d.substr(se),d=d.slice(0,se));var Te=d.indexOf("?");if(Te!==-1?(this.search=d.substr(Te),this.query=d.substr(Te+1),n&&(this.query=vu.parse(this.query)),d=d.slice(0,Te)):n&&(this.search="",this.query={}),d&&(this.pathname=d),Qo[w]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){de=this.pathname||"";var J=this.search||"";this.path=de+J}return this.href=this.format(),this},Jr.prototype.format=function(){var o=this.auth||"";o&&(o=(o=encodeURIComponent(o)).replace(/%3A/i,":"),o+="@");var n=this.protocol||"",r=this.pathname||"",u=this.hash||"",p=!1,h="";this.host?p=o+this.host:this.hostname&&(p=o+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(p+=":"+this.port)),this.query&&dn.isObject(this.query)&&Object.keys(this.query).length&&(h=vu.stringify(this.query));var d=this.search||h&&"?"+h||"";return n&&n.substr(-1)!==":"&&(n+=":"),this.slashes||(!n||Qo[n])&&p!==!1?(p="//"+(p||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):p||(p=""),u&&u.charAt(0)!=="#"&&(u="#"+u),d&&d.charAt(0)!=="?"&&(d="?"+d),n+p+(r=r.replace(/[?#]/g,function(m){return encodeURIComponent(m)}))+(d=d.replace("#","%23"))+u},Jr.prototype.resolve=function(o){return this.resolveObject(cs(o,!1,!0)).format()},Jr.prototype.resolveObject=function(o){if(dn.isString(o)){var n=new Jr;n.parse(o,!1,!0),o=n}for(var r=new Jr,u=Object.keys(this),p=0;p<u.length;p++){var h=u[p];r[h]=this[h]}if(r.hash=o.hash,o.href==="")return r.href=r.format(),r;if(o.slashes&&!o.protocol){for(var d=Object.keys(o),m=0;m<d.length;m++){var y=d[m];y!=="protocol"&&(r[y]=o[y])}return Qo[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(o.protocol&&o.protocol!==r.protocol){if(!Qo[o.protocol]){for(var w=Object.keys(o),_=0;_<w.length;_++){var S=w[_];r[S]=o[S]}return r.href=r.format(),r}if(r.protocol=o.protocol,o.host||bu[o.protocol])r.pathname=o.pathname;else{for(var T=(o.pathname||"").split("/");T.length&&!(o.host=T.shift()););o.host||(o.host=""),o.hostname||(o.hostname=""),T[0]!==""&&T.unshift(""),T.length<2&&T.unshift(""),r.pathname=T.join("/")}if(r.search=o.search,r.query=o.query,r.host=o.host||"",r.auth=o.auth,r.hostname=o.hostname||o.host,r.port=o.port,r.pathname||r.search){var O=r.pathname||"",E=r.search||"";r.path=O+E}return r.slashes=r.slashes||o.slashes,r.href=r.format(),r}var P=r.pathname&&r.pathname.charAt(0)==="/",A=o.host||o.pathname&&o.pathname.charAt(0)==="/",x=A||P||r.host&&o.pathname,U=x,M=r.pathname&&r.pathname.split("/")||[],ee=(T=o.pathname&&o.pathname.split("/")||[],r.protocol&&!Qo[r.protocol]);if(ee&&(r.hostname="",r.port=null,r.host&&(M[0]===""?M[0]=r.host:M.unshift(r.host)),r.host="",o.protocol&&(o.hostname=null,o.port=null,o.host&&(T[0]===""?T[0]=o.host:T.unshift(o.host)),o.host=null),x=x&&(T[0]===""||M[0]==="")),A)r.host=o.host||o.host===""?o.host:r.host,r.hostname=o.hostname||o.hostname===""?o.hostname:r.hostname,r.search=o.search,r.query=o.query,M=T;else if(T.length)M||(M=[]),M.pop(),M=M.concat(T),r.search=o.search,r.query=o.query;else if(!dn.isNullOrUndefined(o.search))return ee&&(r.hostname=r.host=M.shift(),(ae=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=ae.shift(),r.host=r.hostname=ae.shift())),r.search=o.search,r.query=o.query,dn.isNull(r.pathname)&&dn.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!M.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var V=M.slice(-1)[0],q=(r.host||o.host||M.length>1)&&(V==="."||V==="..")||V==="",G=0,re=M.length;re>=0;re--)(V=M[re])==="."?M.splice(re,1):V===".."?(M.splice(re,1),G++):G&&(M.splice(re,1),G--);if(!x&&!U)for(;G--;G)M.unshift("..");!x||M[0]===""||M[0]&&M[0].charAt(0)==="/"||M.unshift(""),q&&M.join("/").substr(-1)!=="/"&&M.push("");var ae,de=M[0]===""||M[0]&&M[0].charAt(0)==="/";return ee&&(r.hostname=r.host=de?"":M.length?M.shift():"",(ae=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=ae.shift(),r.host=r.hostname=ae.shift())),(x=x||r.host&&M.length)&&!de&&M.unshift(""),M.length?r.pathname=M.join("/"):(r.pathname=null,r.path=null),dn.isNull(r.pathname)&&dn.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=o.auth||r.auth,r.slashes=r.slashes||o.slashes,r.href=r.format(),r},Jr.prototype.parseHost=function(){var o=this.host,n=Px.exec(o);n&&((n=n[0])!==":"&&(this.port=n.substr(1)),o=o.substr(0,o.length-n.length)),o&&(this.hostname=o)},Pt.Url,Pt.format,Pt.resolve,Pt.resolveObject,zh={},V_=!1,e(QB,"dew4"),K_=QB(),Dx=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0,Pt.URL=typeof URL<"u"?URL:null,Pt.pathToFileURL=ex,Pt.fileURLToPath=XB,Pt.Url,Pt.format,Pt.resolve,Pt.resolveObject,Pt.URL,C8=92,L8=47,N8=97,D8=122,dd=Dx==="win32",U8=/\//g,M8=/%/g,$8=/\\/g,W8=/\n/g,z8=/\r/g,H8=/\t/g,e(XB,"fileURLToPath$1"),e(m8,"getPathFromURLWin$1"),e(w8,"getPathFromURLPosix$1"),e(ex,"pathToFileURL$1"),Ux=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0,Pt.URL=typeof URL<"u"?URL:null,Pt.pathToFileURL=rx,Pt.fileURLToPath=tx,Pt.Url,Pt.format,Pt.resolve,Pt.resolveObject,Pt.parse,Pt.URL,q8=92,G8=47,V8=97,K8=122,pd=Ux==="win32",J8=/\//g,Y8=/%/g,Z8=/\\/g,Q8=/\n/g,X8=/\r/g,eC=/\t/g,e(tx,"fileURLToPath"),e(b8,"getPathFromURLWin"),e(v8,"getPathFromURLPosix"),e(rx,"pathToFileURL"),$r={},J_=!1,Wi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(u2,"dew$52"),Dl={},Y_=!1,Ul=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(c2,"dew$42"),Hh={},Z_=!1,ur=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(_8,"dew$32"),qh={},Q_=!1,e(E8,"dew$22"),X_={},eE=!1,e(S8,"dew$13"),Gh={},tE=!1,tC=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(nx,"dew$62"),Rn=nx(),Rn.Agent,Rn.ClientRequest,Rn.IncomingMessage,Rn.METHODS,Rn.STATUS_CODES,Rn.get,Rn.globalAgent,Rn.request,Vh={},rE=!1,nE=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,e(ix,"dew5"),Xn=ix(),rC=Xn.Agent,nC=Xn.ClientRequest,iC=Xn.IncomingMessage,oC=Xn.METHODS,aC=Xn.STATUS_CODES,sC=Xn.get,lC=Xn.globalAgent,fC=Xn.request}),uC={};nn(uC,{Agent:l(()=>rC,"Agent"),ClientRequest:l(()=>nC,"ClientRequest"),IncomingMessage:l(()=>iC,"IncomingMessage"),METHODS:l(()=>oC,"METHODS"),STATUS_CODES:l(()=>aC,"STATUS_CODES"),get:l(()=>sC,"get"),globalAgent:l(()=>lC,"globalAgent"),request:l(()=>fC,"request")});var y3=Qt(()=>{g3()}),m3=Ge((a,i)=>{i.exports=f;function f(g,o){if(g&&o)return f(g)(o);if(typeof g!="function")throw new TypeError("need wrapper function");return Object.keys(g).forEach(function(r){n[r]=g[r]}),n;function n(){for(var r=new Array(arguments.length),u=0;u<r.length;u++)r[u]=arguments[u];var p=g.apply(this,r),h=r[r.length-1];return typeof p=="function"&&p!==h&&Object.keys(h).forEach(function(d){p[d]=h[d]}),p}}l(f,"bD"),e(f,"wrappy")}),w3=Ge((a,i)=>{var f=m3();i.exports=f(g),i.exports.strict=f(o),g.proto=g(function(){Object.defineProperty(Function.prototype,"once",{value:e(function(){return g(this)},"value"),configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:e(function(){return o(this)},"value"),configurable:!0})});function g(n){var r=e(function(){return r.called?r.value:(r.called=!0,r.value=n.apply(this,arguments))},"f");return r.called=!1,r}l(g,"Cp"),e(g,"once");function o(n){var r=e(function(){if(r.called)throw new Error(r.onceError);return r.called=!0,r.value=n.apply(this,arguments)},"f"),u=n.name||"Function wrapped with `once`";return r.onceError=u+" shouldn't be called more than once",r.called=!1,r}l(o,"AD"),e(o,"onceStrict")});function cC(){if(iE)return Kh;iE=!0;function a(i,f){return Object.prototype.hasOwnProperty.call(i,f)}return l(a,"e"),e(a,"hasOwnProperty"),Kh=e(function(i,f,g,o){f=f||"&",g=g||"=";var n={};if(typeof i!="string"||i.length===0)return n;var r=/\+/g;i=i.split(f);var u=1e3;o&&typeof o.maxKeys=="number"&&(u=o.maxKeys);var p=i.length;u>0&&p>u&&(p=u);for(var h=0;h<p;++h){var d=i[h].replace(r,"%20"),m=d.indexOf(g),y,w,_,S;m>=0?(y=d.substr(0,m),w=d.substr(m+1)):(y=d,w=""),_=decodeURIComponent(y),S=decodeURIComponent(w),a(n,_)?Array.isArray(n[_])?n[_].push(S):n[_]=[n[_],S]:n[_]=S}return n},"exports$3"),Kh}l(cC,"Aee");function hC(){if(oE)return Jh;oE=!0;var a=e(function(i){switch(typeof i){case"string":return i;case"boolean":return i?"true":"false";case"number":return isFinite(i)?i:"";default:return""}},"stringifyPrimitive");return Jh=e(function(i,f,g,o){return f=f||"&",g=g||"=",i===null&&(i=void 0),typeof i=="object"?Object.keys(i).map(function(n){var r=encodeURIComponent(a(n))+g;return Array.isArray(i[n])?i[n].map(function(u){return r+encodeURIComponent(a(u))}).join(f):r+encodeURIComponent(a(i[n]))}).filter(Boolean).join(f):o?encodeURIComponent(a(o))+g+encodeURIComponent(a(i)):""},"exports$2"),Jh}l(hC,"Ree");function Mx(){return aE||(aE=!0,ks.decode=ks.parse=cC(),ks.encode=ks.stringify=hC()),ks}l(Mx,"Tee");var Kh,iE,Jh,oE,ks,aE,ei,dC,pC,gC,yC,b3=Qt(()=>{Kh={},iE=!1,e(cC,"dew$2"),Jh={},oE=!1,e(hC,"dew$1"),ks={},aE=!1,e(Mx,"dew"),ei=Mx(),ei.decode,ei.parse,ei.encode,ei.stringify,dC=ei.decode,pC=ei.encode,gC=ei.parse,yC=ei.stringify}),mC={};nn(mC,{decode:l(()=>dC,"decode"),encode:l(()=>pC,"encode"),parse:l(()=>gC,"parse"),stringify:l(()=>yC,"stringify")});var v3=Qt(()=>{b3()}),_3=Ge((a,i)=>{i.exports=d;var f=s3(),g=l3(),o=(d3(),cr(qj)),n=(y3(),cr(uC)),r=w3(),u=(v3(),cr(mC)),p=(I6(),cr(OE)),h=e(m=>m!==null&&typeof m=="object"&&typeof m.pipe=="function","isStream");function d(m,y){if(m=Object.assign({maxRedirects:10},typeof m=="string"?{url:m}:m),y=r(y),m.url){let{hostname:O,port:E,protocol:P,auth:A,path:x}=p.parse(m.url);delete m.url,!O&&!E&&!P&&!A?m.path=x:Object.assign(m,{hostname:O,port:E,protocol:P,auth:A,path:x})}let w={"accept-encoding":"gzip, deflate"};m.headers&&Object.keys(m.headers).forEach(O=>w[O.toLowerCase()]=m.headers[O]),m.headers=w;let _;m.body?_=m.json&&!h(m.body)?JSON.stringify(m.body):m.body:m.form&&(_=typeof m.form=="string"?m.form:u.stringify(m.form),m.headers["content-type"]="application/x-www-form-urlencoded"),_&&(m.method||(m.method="POST"),h(_)||(m.headers["content-length"]=Buffer.byteLength(_)),m.json&&!m.form&&(m.headers["content-type"]="application/json")),delete m.body,delete m.form,m.json&&(m.headers.accept="application/json"),m.method&&(m.method=m.method.toUpperCase());let S=m.hostname,T=(m.protocol==="https:"?n:o).request(m,O=>{if(m.followRedirects!==!1&&O.statusCode>=300&&O.statusCode<400&&O.headers.location){m.url=O.headers.location,delete m.headers.host,O.resume();let P=p.parse(m.url).hostname;return P!==null&&P!==S&&(delete m.headers.cookie,delete m.headers.authorization),m.method==="POST"&&[301,302].includes(O.statusCode)&&(m.method="GET",delete m.headers["content-length"],delete m.headers["content-type"]),m.maxRedirects--===0?y(new Error("too many redirects")):d(m,y)}let E=typeof g=="function"&&m.method!=="HEAD";y(null,E?g(O):O)});return T.on("timeout",()=>{T.abort(),y(new Error("Request timed out"))}),T.on("error",y),h(_)?_.on("error",y).pipe(T):T.end(_),T}l(d,"wl"),e(d,"simpleGet"),d.concat=(m,y)=>d(m,(w,_)=>{if(w)return y(w);f(_,(S,T)=>{if(S)return y(S);if(m.json)try{T=JSON.parse(T.toString())}catch(O){return y(O,_,T)}y(null,_,T)})}),["get","post","put","patch","head","delete"].forEach(m=>{d[m]=(y,w)=>(typeof y=="string"&&(y={url:y}),d(Object.assign({method:m.toUpperCase()},y),w))})});function $x(){if(sE)return Ml;sE=!0;var a=typeof Reflect=="object"?Reflect:null,i=a&&typeof a.apply=="function"?a.apply:e(function(A,x,U){return Function.prototype.apply.call(A,x,U)},"ReflectApply2"),f;a&&typeof a.ownKeys=="function"?f=a.ownKeys:Object.getOwnPropertySymbols?f=e(function(A){return Object.getOwnPropertyNames(A).concat(Object.getOwnPropertySymbols(A))},"ReflectOwnKeys2"):f=e(function(A){return Object.getOwnPropertyNames(A)},"ReflectOwnKeys2");function g(A){console&&console.warn&&console.warn(A)}l(g,"n"),e(g,"ProcessEmitWarning");var o=Number.isNaN||e(function(A){return A!==A},"NumberIsNaN2");function n(){n.init.call(this)}l(n,"s"),e(n,"EventEmitter2"),Ml=n,Ml.once=O,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._eventsCount=0,n.prototype._maxListeners=void 0;var r=10;function u(A){if(typeof A!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}l(u,"f"),e(u,"checkListener"),Object.defineProperty(n,"defaultMaxListeners",{enumerable:!0,get:e(function(){return r},"get"),set:e(function(A){if(typeof A!="number"||A<0||o(A))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+A+".");r=A},"set")}),n.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},n.prototype.setMaxListeners=e(function(A){if(typeof A!="number"||A<0||o(A))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+A+".");return this._maxListeners=A,this},"setMaxListeners");function p(A){return A._maxListeners===void 0?n.defaultMaxListeners:A._maxListeners}l(p,"h"),e(p,"_getMaxListeners"),n.prototype.getMaxListeners=e(function(){return p(this)},"getMaxListeners"),n.prototype.emit=e(function(A){for(var x=[],U=1;U<arguments.length;U++)x.push(arguments[U]);var M=A==="error",ee=this._events;if(ee!==void 0)M=M&&ee.error===void 0;else if(!M)return!1;if(M){var V;if(x.length>0&&(V=x[0]),V instanceof Error)throw V;var q=new Error("Unhandled error."+(V?" ("+V.message+")":""));throw q.context=V,q}var G=ee[A];if(G===void 0)return!1;if(typeof G=="function")i(G,this,x);else for(var re=G.length,ae=_(G,re),U=0;U<re;++U)i(ae[U],this,x);return!0},"emit");function h(A,x,U,M){var ee,V,q;if(u(U),V=A._events,V===void 0?(V=A._events=Object.create(null),A._eventsCount=0):(V.newListener!==void 0&&(A.emit("newListener",x,U.listener?U.listener:U),V=A._events),q=V[x]),q===void 0)q=V[x]=U,++A._eventsCount;else if(typeof q=="function"?q=V[x]=M?[U,q]:[q,U]:M?q.unshift(U):q.push(U),ee=p(A),ee>0&&q.length>ee&&!q.warned){q.warned=!0;var G=new Error("Possible EventEmitter memory leak detected. "+q.length+" "+String(x)+" listeners added. Use emitter.setMaxListeners() to increase limit");G.name="MaxListenersExceededWarning",G.emitter=A,G.type=x,G.count=q.length,g(G)}return A}l(h,"c"),e(h,"_addListener"),n.prototype.addListener=e(function(A,x){return h(this,A,x,!1)},"addListener"),n.prototype.on=n.prototype.addListener,n.prototype.prependListener=e(function(A,x){return h(this,A,x,!0)},"prependListener");function d(){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)}l(d,"d"),e(d,"onceWrapper");function m(A,x,U){var M={fired:!1,wrapFn:void 0,target:A,type:x,listener:U},ee=d.bind(M);return ee.listener=U,M.wrapFn=ee,ee}l(m,"y"),e(m,"_onceWrap"),n.prototype.once=e(function(A,x){return u(x),this.on(A,m(this,A,x)),this},"once3"),n.prototype.prependOnceListener=e(function(A,x){return u(x),this.prependListener(A,m(this,A,x)),this},"prependOnceListener"),n.prototype.removeListener=e(function(A,x){var U,M,ee,V,q;if(u(x),M=this._events,M===void 0)return this;if(U=M[A],U===void 0)return this;if(U===x||U.listener===x)--this._eventsCount===0?this._events=Object.create(null):(delete M[A],M.removeListener&&this.emit("removeListener",A,U.listener||x));else if(typeof U!="function"){for(ee=-1,V=U.length-1;V>=0;V--)if(U[V]===x||U[V].listener===x){q=U[V].listener,ee=V;break}if(ee<0)return this;ee===0?U.shift():S(U,ee),U.length===1&&(M[A]=U[0]),M.removeListener!==void 0&&this.emit("removeListener",A,q||x)}return this},"removeListener"),n.prototype.off=n.prototype.removeListener,n.prototype.removeAllListeners=e(function(A){var x,U,M;if(U=this._events,U===void 0)return this;if(U.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):U[A]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete U[A]),this;if(arguments.length===0){var ee=Object.keys(U),V;for(M=0;M<ee.length;++M)V=ee[M],V!=="removeListener"&&this.removeAllListeners(V);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(x=U[A],typeof x=="function")this.removeListener(A,x);else if(x!==void 0)for(M=x.length-1;M>=0;M--)this.removeListener(A,x[M]);return this},"removeAllListeners");function y(A,x,U){var M=A._events;if(M===void 0)return[];var ee=M[x];return ee===void 0?[]:typeof ee=="function"?U?[ee.listener||ee]:[ee]:U?T(ee):_(ee,ee.length)}l(y,"m"),e(y,"_listeners"),n.prototype.listeners=e(function(A){return y(this,A,!0)},"listeners"),n.prototype.rawListeners=e(function(A){return y(this,A,!1)},"rawListeners"),n.listenerCount=function(A,x){return typeof A.listenerCount=="function"?A.listenerCount(x):w.call(A,x)},n.prototype.listenerCount=w;function w(A){var x=this._events;if(x!==void 0){var U=x[A];if(typeof U=="function")return 1;if(U!==void 0)return U.length}return 0}l(w,"g"),e(w,"listenerCount2"),n.prototype.eventNames=e(function(){return this._eventsCount>0?f(this._events):[]},"eventNames");function _(A,x){for(var U=new Array(x),M=0;M<x;++M)U[M]=A[M];return U}l(_,"v"),e(_,"arrayClone");function S(A,x){for(;x+1<A.length;x++)A[x]=A[x+1];A.pop()}l(S,"_"),e(S,"spliceOne");function T(A){for(var x=new Array(A.length),U=0;U<x.length;++U)x[U]=A[U].listener||A[U];return x}l(T,"b"),e(T,"unwrapListeners");function O(A,x){return new Promise(function(U,M){function ee(q){A.removeListener(x,V),M(q)}l(ee,"N"),e(ee,"errorListener");function V(){typeof A.removeListener=="function"&&A.removeListener("error",ee),U([].slice.call(arguments))}l(V,"L"),e(V,"resolver"),P(A,x,V,{once:!0}),x!=="error"&&E(A,ee,{once:!0})})}l(O,"E"),e(O,"once2");function E(A,x,U){typeof A.on=="function"&&P(A,"error",x,U)}l(E,"R"),e(E,"addErrorHandlerIfEventEmitter");function P(A,x,U,M){if(typeof A.on=="function")M.once?A.once(x,U):A.on(x,U);else if(typeof A.addEventListener=="function")A.addEventListener(x,e(l(function ee(V){M.once&&A.removeEventListener(x,ee),U(V)},"N"),"wrapListener"));else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof A)}return l(P,"T"),e(P,"eventTargetAgnosticAddListener"),Ml}l($x,"Nee");var Ml,sE,Sl,wC,bC,vC,_C,EC,SC,E3=Qt(()=>{Ml={},sE=!1,e($x,"dew"),Sl=$x(),Sl.once,Sl.once=function(a,i){return new Promise((f,g)=>{function o(...r){n!==void 0&&a.removeListener("error",n),f(r)}l(o,"a"),e(o,"eventListener");let n;i!=="error"&&(n=e(r=>{a.removeListener(name,o),g(r)},"errorListener"),a.once("error",n)),a.once(i,o)})},Sl.on=function(a,i){let f=[],g=[],o=null,n=!1,r={async next(){let h=f.shift();if(h)return createIterResult(h,!1);if(o){let d=Promise.reject(o);return o=null,d}return n?createIterResult(void 0,!0):new Promise((d,m)=>g.push({resolve:d,reject:m}))},async return(){a.removeListener(i,u),a.removeListener("error",p),n=!0;for(let h of g)h.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(h){o=h,a.removeListener(i,u),a.removeListener("error",p)},[Symbol.asyncIterator](){return this}};return a.on(i,u),a.on("error",p),r;function u(...h){let d=g.shift();d?d.resolve(createIterResult(h,!1)):f.push(h)}function p(h){n=!0;let d=g.shift();d?d.reject(h):o=h,r.return()}},{EventEmitter:wC,defaultMaxListeners:bC,init:vC,listenerCount:_C,on:EC,once:SC}=Sl}),h2={};nn(h2,{EventEmitter:l(()=>wC,"EventEmitter"),defaultMaxListeners:l(()=>bC,"defaultMaxListeners"),init:l(()=>vC,"init"),listenerCount:l(()=>_C,"listenerCount"),on:l(()=>EC,"on"),once:l(()=>SC,"once")});var AC=Qt(()=>{E3()}),RC=Ge((a,i)=>{i.exports=(AC(),cr(h2)).EventEmitter}),OC=Ge((a,i)=>{i.exports={}}),S3=Ge((a,i)=>{"use strict";function f(T,O){var E=Object.keys(T);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(T);O&&(P=P.filter(function(A){return Object.getOwnPropertyDescriptor(T,A).enumerable})),E.push.apply(E,P)}return E}l(f,"UD"),e(f,"ownKeys");function g(T){for(var O=1;O<arguments.length;O++){var E=arguments[O]!=null?arguments[O]:{};O%2?f(Object(E),!0).forEach(function(P){o(T,P,E[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(E)):f(Object(E)).forEach(function(P){Object.defineProperty(T,P,Object.getOwnPropertyDescriptor(E,P))})}return T}l(g,"jD"),e(g,"_objectSpread");function o(T,O,E){return O=p(O),O in T?Object.defineProperty(T,O,{value:E,enumerable:!0,configurable:!0,writable:!0}):T[O]=E,T}l(o,"Wee"),e(o,"_defineProperty");function n(T,O){if(!(T instanceof O))throw new TypeError("Cannot call a class as a function")}l(n,"qee"),e(n,"_classCallCheck");function r(T,O){for(var E=0;E<O.length;E++){var P=O[E];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(T,p(P.key),P)}}l(r,"HD"),e(r,"_defineProperties");function u(T,O,E){return O&&r(T.prototype,O),E&&r(T,E),Object.defineProperty(T,"prototype",{writable:!1}),T}l(u,"zee"),e(u,"_createClass");function p(T){var O=h(T,"string");return typeof O=="symbol"?O:String(O)}l(p,"WD"),e(p,"_toPropertyKey");function h(T,O){if(typeof T!="object"||T===null)return T;var E=T[Symbol.toPrimitive];if(E!==void 0){var P=E.call(T,O||"default");if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(O==="string"?String:Number)(T)}l(h,"Vee"),e(h,"_toPrimitive");var d=(Td(),cr(_f)),m=d.Buffer,y=OC(),w=y.inspect,_=w&&w.custom||"inspect";function S(T,O,E){m.prototype.copy.call(T,O,E)}l(S,"Xee"),e(S,"copyBuffer"),i.exports=function(){function T(){n(this,T),this.head=null,this.tail=null,this.length=0}return l(T,"e"),e(T,"BufferList"),u(T,[{key:"push",value:e(function(O){var E={data:O,next:null};this.length>0?this.tail.next=E:this.head=E,this.tail=E,++this.length},"push")},{key:"unshift",value:e(function(O){var E={data:O,next:this.head};this.length===0&&(this.tail=E),this.head=E,++this.length},"unshift")},{key:"shift",value:e(function(){if(this.length!==0){var O=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,O}},"shift")},{key:"clear",value:e(function(){this.head=this.tail=null,this.length=0},"clear")},{key:"join",value:e(function(O){if(this.length===0)return"";for(var E=this.head,P=""+E.data;E=E.next;)P+=O+E.data;return P},"join")},{key:"concat",value:e(function(O){if(this.length===0)return m.alloc(0);for(var E=m.allocUnsafe(O>>>0),P=this.head,A=0;P;)S(P.data,E,A),A+=P.data.length,P=P.next;return E},"concat")},{key:"consume",value:e(function(O,E){var P;return O<this.head.data.length?(P=this.head.data.slice(0,O),this.head.data=this.head.data.slice(O)):O===this.head.data.length?P=this.shift():P=E?this._getString(O):this._getBuffer(O),P},"consume")},{key:"first",value:e(function(){return this.head.data},"first")},{key:"_getString",value:e(function(O){var E=this.head,P=1,A=E.data;for(O-=A.length;E=E.next;){var x=E.data,U=O>x.length?x.length:O;if(U===x.length?A+=x:A+=x.slice(0,O),O-=U,O===0){U===x.length?(++P,E.next?this.head=E.next:this.head=this.tail=null):(this.head=E,E.data=x.slice(U));break}++P}return this.length-=P,A},"_getString")},{key:"_getBuffer",value:e(function(O){var E=m.allocUnsafe(O),P=this.head,A=1;for(P.data.copy(E),O-=P.data.length;P=P.next;){var x=P.data,U=O>x.length?x.length:O;if(x.copy(E,E.length-O,0,U),O-=U,O===0){U===x.length?(++A,P.next?this.head=P.next:this.head=this.tail=null):(this.head=P,P.data=x.slice(U));break}++A}return this.length-=A,E},"_getBuffer")},{key:_,value:e(function(O,E){return w(this,g(g({},E),{},{depth:0,customInspect:!1}))},"value")}]),T}()}),kC=Ge((a,i)=>{"use strict";function f(p,h){var d=this,m=this._readableState&&this._readableState.destroyed,y=this._writableState&&this._writableState.destroyed;return m||y?(h?h(p):p&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(r,this,p)):process.nextTick(r,this,p)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(p||null,function(w){!h&&w?d._writableState?d._writableState.errorEmitted?process.nextTick(o,d):(d._writableState.errorEmitted=!0,process.nextTick(g,d,w)):process.nextTick(g,d,w):h?(process.nextTick(o,d),h(w)):process.nextTick(o,d)}),this)}l(f,"Jee"),e(f,"destroy");function g(p,h){r(p,h),o(p)}l(g,"VD"),e(g,"emitErrorAndCloseNT");function o(p){p._writableState&&!p._writableState.emitClose||p._readableState&&!p._readableState.emitClose||p.emit("close")}l(o,"$p"),e(o,"emitCloseNT");function n(){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)}l(n,"Zee"),e(n,"undestroy");function r(p,h){p.emit("error",h)}l(r,"M_"),e(r,"emitErrorNT");function u(p,h){var d=p._readableState,m=p._writableState;d&&d.autoDestroy||m&&m.autoDestroy?p.destroy(h):p.emit("error",h)}l(u,"Qee"),e(u,"errorOrDestroy"),i.exports={destroy:f,undestroy:n,errorOrDestroy:u}}),Xs=Ge((a,i)=>{"use strict";function f(h,d){h.prototype=Object.create(d.prototype),h.prototype.constructor=h,h.__proto__=d}l(f,"ete"),e(f,"_inheritsLoose");var g={};function o(h,d,m){m||(m=Error);function y(_,S,T){return typeof d=="string"?d:d(_,S,T)}l(y,"n"),e(y,"getMessage");var w=function(_){f(S,_);function S(T,O,E){return _.call(this,y(T,O,E))||this}return l(S,"i"),e(S,"NodeError"),S}(m);w.prototype.name=m.name,w.prototype.code=h,g[h]=w}l(o,"tn"),e(o,"createErrorType");function n(h,d){if(Array.isArray(h)){var m=h.length;return h=h.map(function(y){return String(y)}),m>2?"one of ".concat(d," ").concat(h.slice(0,m-1).join(", "),", or ")+h[m-1]:m===2?"one of ".concat(d," ").concat(h[0]," or ").concat(h[1]):"of ".concat(d," ").concat(h[0])}else return"of ".concat(d," ").concat(String(h))}l(n,"YD"),e(n,"oneOf");function r(h,d,m){return h.substr(!m||m<0?0:+m,d.length)===d}l(r,"tte"),e(r,"startsWith");function u(h,d,m){return(m===void 0||m>h.length)&&(m=h.length),h.substring(m-d.length,m)===d}l(u,"rte"),e(u,"endsWith");function p(h,d,m){return typeof m!="number"&&(m=0),m+d.length>h.length?!1:h.indexOf(d,m)!==-1}l(p,"nte"),e(p,"includes"),o("ERR_INVALID_OPT_VALUE",function(h,d){return'The value "'+d+'" is invalid for option "'+h+'"'},TypeError),o("ERR_INVALID_ARG_TYPE",function(h,d,m){var y;typeof d=="string"&&r(d,"not ")?(y="must not be",d=d.replace(/^not /,"")):y="must be";var w;if(u(h," argument"))w="The ".concat(h," ").concat(y," ").concat(n(d,"type"));else{var _=p(h,".")?"property":"argument";w='The "'.concat(h,'" ').concat(_," ").concat(y," ").concat(n(d,"type"))}return w+=". Received type ".concat(typeof m),w},TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",function(h){return"The "+h+" method is not implemented"}),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",function(h){return"Cannot call "+h+" after a stream was destroyed"}),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",function(h){return"Unknown encoding: "+h},TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),i.exports.codes=g}),TC=Ge((a,i)=>{"use strict";var f=Xs().codes.ERR_INVALID_OPT_VALUE;function g(n,r,u){return n.highWaterMark!=null?n.highWaterMark:r?n[u]:null}l(g,"ote"),e(g,"highWaterMarkFrom");function o(n,r,u,p){var h=g(r,p,u);if(h!=null){if(!(isFinite(h)&&Math.floor(h)===h)||h<0){var d=p?u:"highWaterMark";throw new f(d,h)}return Math.floor(h)}return n.objectMode?16:16*1024}l(o,"ate"),e(o,"getHighWaterMark"),i.exports={getHighWaterMark:o}}),A3=Ge((a,i)=>{i.exports=f;function f(o,n){if(g("noDeprecation"))return o;var r=!1;function u(){if(!r){if(g("throwDeprecation"))throw new Error(n);g("traceDeprecation")?console.trace(n):console.warn(n),r=!0}return o.apply(this,arguments)}return l(u,"n"),e(u,"deprecated"),u}l(f,"ste"),e(f,"deprecate");function g(o){try{if(!globalThis.localStorage)return!1}catch{return!1}var n=globalThis.localStorage[o];return n==null?!1:String(n).toLowerCase()==="true"}l(g,"H_"),e(g,"config")}),FC=Ge((a,i)=>{"use strict";i.exports=q;function f(H){var Q=this;this.next=null,this.entry=null,this.finish=function(){Y(Q,H)}}l(f,"t$"),e(f,"CorkedRequest");var g;q.WritableState=ee;var o={deprecate:A3()},n=RC(),r=(Td(),cr(_f)).Buffer,u=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function p(H){return r.from(H)}l(p,"ute"),e(p,"_uint8ArrayToBuffer");function h(H){return r.isBuffer(H)||H instanceof u}l(h,"cte"),e(h,"_isUint8Array");var d=kC(),m=TC(),y=m.getHighWaterMark,w=Xs().codes,_=w.ERR_INVALID_ARG_TYPE,S=w.ERR_METHOD_NOT_IMPLEMENTED,T=w.ERR_MULTIPLE_CALLBACK,O=w.ERR_STREAM_CANNOT_PIPE,E=w.ERR_STREAM_DESTROYED,P=w.ERR_STREAM_NULL_VALUES,A=w.ERR_STREAM_WRITE_AFTER_END,x=w.ERR_UNKNOWN_ENCODING,U=d.errorOrDestroy;Ys()(q,n);function M(){}l(M,"Ete"),e(M,"nop");function ee(H,Q,fe){g=g||qs(),H=H||{},typeof fe!="boolean"&&(fe=Q instanceof g),this.objectMode=!!H.objectMode,fe&&(this.objectMode=this.objectMode||!!H.writableObjectMode),this.highWaterMark=y(this,H,"writableHighWaterMark",fe),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ve=H.decodeStrings===!1;this.decodeStrings=!ve,this.defaultEncoding=H.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(N){se(Q,N)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=H.emitClose!==!1,this.autoDestroy=!!H.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new f(this)}l(ee,"mu"),e(ee,"WritableState"),ee.prototype.getBuffer=e(function(){for(var H=this.bufferedRequest,Q=[];H;)Q.push(H),H=H.next;return Q},"getBuffer"),function(){try{Object.defineProperty(ee.prototype,"buffer",{get:o.deprecate(e(function(){return this.getBuffer()},"writableStateBufferGetter"),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var V;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(V=Function.prototype[Symbol.hasInstance],Object.defineProperty(q,Symbol.hasInstance,{value:e(function(H){return V.call(this,H)?!0:this!==q?!1:H&&H._writableState instanceof ee},"value")})):V=e(function(H){return H instanceof this},"realHasInstance");function q(H){g=g||qs();var Q=this instanceof g;if(!Q&&!V.call(q,this))return new q(H);this._writableState=new ee(H,this,Q),this.writable=!0,H&&(typeof H.write=="function"&&(this._write=H.write),typeof H.writev=="function"&&(this._writev=H.writev),typeof H.destroy=="function"&&(this._destroy=H.destroy),typeof H.final=="function"&&(this._final=H.final)),n.call(this)}l(q,"St"),e(q,"Writable"),q.prototype.pipe=function(){U(this,new O)};function G(H,Q){var fe=new A;U(H,fe),process.nextTick(Q,fe)}l(G,"Ste"),e(G,"writeAfterEnd");function re(H,Q,fe,ve){var N;return fe===null?N=new P:typeof fe!="string"&&!Q.objectMode&&(N=new _("chunk",["string","Buffer"],fe)),N?(U(H,N),process.nextTick(ve,N),!1):!0}l(re,"Ate"),e(re,"validChunk"),q.prototype.write=function(H,Q,fe){var ve=this._writableState,N=!1,I=!ve.objectMode&&h(H);return I&&!r.isBuffer(H)&&(H=p(H)),typeof Q=="function"&&(fe=Q,Q=null),I?Q="buffer":Q||(Q=ve.defaultEncoding),typeof fe!="function"&&(fe=M),ve.ending?G(this,fe):(I||re(this,ve,H,fe))&&(ve.pendingcb++,N=de(this,ve,I,H,Q,fe)),N},q.prototype.cork=function(){this._writableState.corked++},q.prototype.uncork=function(){var H=this._writableState;H.corked&&(H.corked--,!H.writing&&!H.corked&&!H.bufferProcessing&&H.bufferedRequest&&ue(this,H))},q.prototype.setDefaultEncoding=e(function(H){if(typeof H=="string"&&(H=H.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((H+"").toLowerCase())>-1))throw new x(H);return this._writableState.defaultEncoding=H,this},"setDefaultEncoding"),Object.defineProperty(q.prototype,"writableBuffer",{enumerable:!1,get:e(function(){return this._writableState&&this._writableState.getBuffer()},"get")});function ae(H,Q,fe){return!H.objectMode&&H.decodeStrings!==!1&&typeof Q=="string"&&(Q=r.from(Q,fe)),Q}l(ae,"Rte"),e(ae,"decodeChunk"),Object.defineProperty(q.prototype,"writableHighWaterMark",{enumerable:!1,get:e(function(){return this._writableState.highWaterMark},"get")});function de(H,Q,fe,ve,N,I){if(!fe){var D=ae(Q,ve,N);ve!==D&&(fe=!0,N="buffer",ve=D)}var z=Q.objectMode?1:ve.length;Q.length+=z;var Ee=Q.length<Q.highWaterMark;if(Ee||(Q.needDrain=!0),Q.writing||Q.corked){var Oe=Q.lastBufferedRequest;Q.lastBufferedRequest={chunk:ve,encoding:N,isBuf:fe,callback:I,next:null},Oe?Oe.next=Q.lastBufferedRequest:Q.bufferedRequest=Q.lastBufferedRequest,Q.bufferedRequestCount+=1}else we(H,Q,!1,z,ve,N,I);return Ee}l(de,"Tte"),e(de,"writeOrBuffer");function we(H,Q,fe,ve,N,I,D){Q.writelen=ve,Q.writecb=D,Q.writing=!0,Q.sync=!0,Q.destroyed?Q.onwrite(new E("write")):fe?H._writev(N,Q.onwrite):H._write(N,I,Q.onwrite),Q.sync=!1}l(we,"W_"),e(we,"doWrite");function xe(H,Q,fe,ve,N){--Q.pendingcb,fe?(process.nextTick(N,ve),process.nextTick(Re,H,Q),H._writableState.errorEmitted=!0,U(H,ve)):(N(ve),H._writableState.errorEmitted=!0,U(H,ve),Re(H,Q))}l(xe,"Fte"),e(xe,"onwriteError");function Pe(H){H.writing=!1,H.writecb=null,H.length-=H.writelen,H.writelen=0}l(Pe,"xte"),e(Pe,"onwriteStateUpdate");function se(H,Q){var fe=H._writableState,ve=fe.sync,N=fe.writecb;if(typeof N!="function")throw new T;if(Pe(fe),Q)xe(H,fe,ve,Q,N);else{var I=te(fe)||H.destroyed;!I&&!fe.corked&&!fe.bufferProcessing&&fe.bufferedRequest&&ue(H,fe),ve?process.nextTick(Te,H,fe,I,N):Te(H,fe,I,N)}}l(se,"Ote"),e(se,"onwrite");function Te(H,Q,fe,ve){fe||J(H,Q),Q.pendingcb--,ve(),Re(H,Q)}l(Te,"e$"),e(Te,"afterWrite");function J(H,Q){Q.length===0&&Q.needDrain&&(Q.needDrain=!1,H.emit("drain"))}l(J,"Pte"),e(J,"onwriteDrain");function ue(H,Q){Q.bufferProcessing=!0;var fe=Q.bufferedRequest;if(H._writev&&fe&&fe.next){var ve=Q.bufferedRequestCount,N=new Array(ve),I=Q.corkedRequestsFree;I.entry=fe;for(var D=0,z=!0;fe;)N[D]=fe,fe.isBuf||(z=!1),fe=fe.next,D+=1;N.allBuffers=z,we(H,Q,!0,Q.length,N,"",I.finish),Q.pendingcb++,Q.lastBufferedRequest=null,I.next?(Q.corkedRequestsFree=I.next,I.next=null):Q.corkedRequestsFree=new f(Q),Q.bufferedRequestCount=0}else{for(;fe;){var Ee=fe.chunk,Oe=fe.encoding,be=fe.callback,ge=Q.objectMode?1:Ee.length;if(we(H,Q,!1,ge,Ee,Oe,be),fe=fe.next,Q.bufferedRequestCount--,Q.writing)break}fe===null&&(Q.lastBufferedRequest=null)}Q.bufferedRequest=fe,Q.bufferProcessing=!1}l(ue,"n$"),e(ue,"clearBuffer"),q.prototype._write=function(H,Q,fe){fe(new S("_write()"))},q.prototype._writev=null,q.prototype.end=function(H,Q,fe){var ve=this._writableState;return typeof H=="function"?(fe=H,H=null,Q=null):typeof Q=="function"&&(fe=Q,Q=null),H!=null&&this.write(H,Q),ve.corked&&(ve.corked=1,this.uncork()),ve.ending||De(this,ve,fe),this},Object.defineProperty(q.prototype,"writableLength",{enumerable:!1,get:e(function(){return this._writableState.length},"get")});function te(H){return H.ending&&H.length===0&&H.bufferedRequest===null&&!H.finished&&!H.writing}l(te,"i$"),e(te,"needFinish");function X(H,Q){H._final(function(fe){Q.pendingcb--,fe&&U(H,fe),Q.prefinished=!0,H.emit("prefinish"),Re(H,Q)})}l(X,"Ite"),e(X,"callFinal");function ye(H,Q){!Q.prefinished&&!Q.finalCalled&&(typeof H._final=="function"&&!Q.destroyed?(Q.pendingcb++,Q.finalCalled=!0,process.nextTick(X,H,Q)):(Q.prefinished=!0,H.emit("prefinish")))}l(ye,"kte"),e(ye,"prefinish");function Re(H,Q){var fe=te(Q);if(fe&&(ye(H,Q),Q.pendingcb===0&&(Q.finished=!0,H.emit("finish"),Q.autoDestroy))){var ve=H._readableState;(!ve||ve.autoDestroy&&ve.endEmitted)&&H.destroy()}return fe}l(Re,"yu"),e(Re,"finishMaybe");function De(H,Q,fe){Q.ending=!0,Re(H,Q),fe&&(Q.finished?process.nextTick(fe):H.once("finish",fe)),Q.ended=!0,H.writable=!1}l(De,"Bte"),e(De,"endWritable");function Y(H,Q,fe){var ve=H.entry;for(H.entry=null;ve;){var N=ve.callback;Q.pendingcb--,N(fe),ve=ve.next}Q.corkedRequestsFree.next=H}l(Y,"Cte"),e(Y,"onCorkedFinish"),Object.defineProperty(q.prototype,"destroyed",{enumerable:!1,get:e(function(){return this._writableState===void 0?!1:this._writableState.destroyed},"get"),set:e(function(H){this._writableState&&(this._writableState.destroyed=H)},"set")}),q.prototype.destroy=d.destroy,q.prototype._undestroy=d.undestroy,q.prototype._destroy=function(H,Q){Q(H)}}),qs=Ge((a,i)=>{"use strict";var f=Object.keys||function(m){var y=[];for(var w in m)y.push(w);return y};i.exports=p;var g=BC(),o=FC();for(Ys()(p,g),n=f(o.prototype),u=0;u<n.length;u++)r=n[u],p.prototype[r]||(p.prototype[r]=o.prototype[r]);var n,r,u;function p(m){if(!(this instanceof p))return new p(m);g.call(this,m),o.call(this,m),this.allowHalfOpen=!0,m&&(m.readable===!1&&(this.readable=!1),m.writable===!1&&(this.writable=!1),m.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",h)))}l(p,"Mn"),e(p,"Duplex"),Object.defineProperty(p.prototype,"writableHighWaterMark",{enumerable:!1,get:e(function(){return this._writableState.highWaterMark},"get")}),Object.defineProperty(p.prototype,"writableBuffer",{enumerable:!1,get:e(function(){return this._writableState&&this._writableState.getBuffer()},"get")}),Object.defineProperty(p.prototype,"writableLength",{enumerable:!1,get:e(function(){return this._writableState.length},"get")});function h(){this._writableState.ended||process.nextTick(d,this)}l(h,"Nte"),e(h,"onend");function d(m){m.end()}l(d,"Dte"),e(d,"onEndNT"),Object.defineProperty(p.prototype,"destroyed",{enumerable:!1,get:e(function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},"get"),set:e(function(m){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=m,this._writableState.destroyed=m)},"set")})}),Wx=Ge(a=>{"use strict";var i=Fd().Buffer,f=i.isEncoding||function(E){switch(E=""+E,E&&E.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 g(E){if(!E)return"utf8";for(var P;;)switch(E){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 E;default:if(P)return;E=(""+E).toLowerCase(),P=!0}}l(g,"$te"),e(g,"_normalizeEncoding");function o(E){var P=g(E);if(typeof P!="string"&&(i.isEncoding===f||!f(E)))throw new Error("Unknown encoding: "+E);return P||E}l(o,"Mte"),e(o,"normalizeEncoding"),a.StringDecoder=n;function n(E){this.encoding=o(E);var P;switch(this.encoding){case"utf16le":this.text=y,this.end=w,P=4;break;case"utf8":this.fillLast=h,P=4;break;case"base64":this.text=_,this.end=S,P=3;break;default:this.write=T,this.end=O;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(P)}l(n,"gu"),e(n,"StringDecoder"),n.prototype.write=function(E){if(E.length===0)return"";var P,A;if(this.lastNeed){if(P=this.fillLast(E),P===void 0)return"";A=this.lastNeed,this.lastNeed=0}else A=0;return A<E.length?P?P+this.text(E,A):this.text(E,A):P||""},n.prototype.end=m,n.prototype.text=d,n.prototype.fillLast=function(E){if(this.lastNeed<=E.length)return E.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);E.copy(this.lastChar,this.lastTotal-this.lastNeed,0,E.length),this.lastNeed-=E.length};function r(E){return E<=127?0:E>>5===6?2:E>>4===14?3:E>>3===30?4:E>>6===2?-1:-2}l(r,"K_"),e(r,"utf8CheckByte");function u(E,P,A){var x=P.length-1;if(x<A)return 0;var U=r(P[x]);return U>=0?(U>0&&(E.lastNeed=U-1),U):--x<A||U===-2?0:(U=r(P[x]),U>=0?(U>0&&(E.lastNeed=U-2),U):--x<A||U===-2?0:(U=r(P[x]),U>=0?(U>0&&(U===2?U=0:E.lastNeed=U-3),U):0))}l(u,"Ute"),e(u,"utf8CheckIncomplete");function p(E,P,A){if((P[0]&192)!==128)return E.lastNeed=0,"\uFFFD";if(E.lastNeed>1&&P.length>1){if((P[1]&192)!==128)return E.lastNeed=1,"\uFFFD";if(E.lastNeed>2&&P.length>2&&(P[2]&192)!==128)return E.lastNeed=2,"\uFFFD"}}l(p,"jte"),e(p,"utf8CheckExtraBytes");function h(E){var P=this.lastTotal-this.lastNeed,A=p(this,E,P);if(A!==void 0)return A;if(this.lastNeed<=E.length)return E.copy(this.lastChar,P,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);E.copy(this.lastChar,P,0,E.length),this.lastNeed-=E.length}l(h,"Hte"),e(h,"utf8FillLast");function d(E,P){var A=u(this,E,P);if(!this.lastNeed)return E.toString("utf8",P);this.lastTotal=A;var x=E.length-(A-this.lastNeed);return E.copy(this.lastChar,0,x),E.toString("utf8",P,x)}l(d,"Wte"),e(d,"utf8Text");function m(E){var P=E&&E.length?this.write(E):"";return this.lastNeed?P+"\uFFFD":P}l(m,"qte"),e(m,"utf8End");function y(E,P){if((E.length-P)%2===0){var A=E.toString("utf16le",P);if(A){var x=A.charCodeAt(A.length-1);if(x>=55296&&x<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1],A.slice(0,-1)}return A}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=E[E.length-1],E.toString("utf16le",P,E.length-1)}l(y,"zte"),e(y,"utf16Text");function w(E){var P=E&&E.length?this.write(E):"";if(this.lastNeed){var A=this.lastTotal-this.lastNeed;return P+this.lastChar.toString("utf16le",0,A)}return P}l(w,"Vte"),e(w,"utf16End");function _(E,P){var A=(E.length-P)%3;return A===0?E.toString("base64",P):(this.lastNeed=3-A,this.lastTotal=3,A===1?this.lastChar[0]=E[E.length-1]:(this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1]),E.toString("base64",P,E.length-A))}l(_,"Gte"),e(_,"base64Text");function S(E){var P=E&&E.length?this.write(E):"";return this.lastNeed?P+this.lastChar.toString("base64",0,3-this.lastNeed):P}l(S,"Yte"),e(S,"base64End");function T(E){return E.toString(this.encoding)}l(T,"Kte"),e(T,"simpleWrite");function O(E){return E&&E.length?this.write(E):""}l(O,"Xte"),e(O,"simpleEnd")}),d2=Ge((a,i)=>{"use strict";var f=Xs().codes.ERR_STREAM_PREMATURE_CLOSE;function g(u){var p=!1;return function(){if(!p){p=!0;for(var h=arguments.length,d=new Array(h),m=0;m<h;m++)d[m]=arguments[m];u.apply(this,d)}}}l(g,"Jte"),e(g,"once");function o(){}l(o,"Zte"),e(o,"noop");function n(u){return u.setHeader&&typeof u.abort=="function"}l(n,"Qte"),e(n,"isRequest");function r(u,p,h){if(typeof p=="function")return r(u,null,p);p||(p={}),h=g(h||o);var d=p.readable||p.readable!==!1&&u.readable,m=p.writable||p.writable!==!1&&u.writable,y=e(function(){u.writable||_()},"onlegacyfinish"),w=u._writableState&&u._writableState.finished,_=e(function(){m=!1,w=!0,d||h.call(u)},"onfinish"),S=u._readableState&&u._readableState.endEmitted,T=e(function(){d=!1,S=!0,m||h.call(u)},"onend"),O=e(function(A){h.call(u,A)},"onerror"),E=e(function(){var A;if(d&&!S)return(!u._readableState||!u._readableState.ended)&&(A=new f),h.call(u,A);if(m&&!w)return(!u._writableState||!u._writableState.ended)&&(A=new f),h.call(u,A)},"onclose"),P=e(function(){u.req.on("finish",_)},"onrequest");return n(u)?(u.on("complete",_),u.on("abort",E),u.req?P():u.on("request",P)):m&&!u._writableState&&(u.on("end",y),u.on("close",y)),u.on("end",T),u.on("finish",_),p.error!==!1&&u.on("error",O),u.on("close",E),function(){u.removeListener("complete",_),u.removeListener("abort",E),u.removeListener("request",P),u.req&&u.req.removeListener("finish",_),u.removeListener("end",y),u.removeListener("close",y),u.removeListener("finish",_),u.removeListener("end",T),u.removeListener("error",O),u.removeListener("close",E)}}l(r,"c$"),e(r,"eos"),i.exports=r}),R3=Ge((a,i)=>{"use strict";var f;function g(x,U,M){return U=o(U),U in x?Object.defineProperty(x,U,{value:M,enumerable:!0,configurable:!0,writable:!0}):x[U]=M,x}l(g,"_o"),e(g,"_defineProperty");function o(x){var U=n(x,"string");return typeof U=="symbol"?U:String(U)}l(o,"ere"),e(o,"_toPropertyKey");function n(x,U){if(typeof x!="object"||x===null)return x;var M=x[Symbol.toPrimitive];if(M!==void 0){var ee=M.call(x,U||"default");if(typeof ee!="object")return ee;throw new TypeError("@@toPrimitive must return a primitive value.")}return(U==="string"?String:Number)(x)}l(n,"tre"),e(n,"_toPrimitive");var r=d2(),u=Symbol("lastResolve"),p=Symbol("lastReject"),h=Symbol("error"),d=Symbol("ended"),m=Symbol("lastPromise"),y=Symbol("handlePromise"),w=Symbol("stream");function _(x,U){return{value:x,done:U}}l(_,"So"),e(_,"createIterResult");function S(x){var U=x[u];if(U!==null){var M=x[w].read();M!==null&&(x[m]=null,x[u]=null,x[p]=null,U(_(M,!1)))}}l(S,"nre"),e(S,"readAndResolve");function T(x){process.nextTick(S,x)}l(T,"ire"),e(T,"onReadable");function O(x,U){return function(M,ee){x.then(function(){if(U[d]){M(_(void 0,!0));return}U[y](M,ee)},ee)}}l(O,"ore"),e(O,"wrapForNext");var E=Object.getPrototypeOf(function(){}),P=Object.setPrototypeOf((f={get stream(){return this[w]},next:e(function(){var x=this,U=this[h];if(U!==null)return Promise.reject(U);if(this[d])return Promise.resolve(_(void 0,!0));if(this[w].destroyed)return new Promise(function(q,G){process.nextTick(function(){x[h]?G(x[h]):q(_(void 0,!0))})});var M=this[m],ee;if(M)ee=new Promise(O(M,this));else{var V=this[w].read();if(V!==null)return Promise.resolve(_(V,!1));ee=new Promise(this[y])}return this[m]=ee,ee},"next")},g(f,Symbol.asyncIterator,function(){return this}),g(f,"return",e(function(){var x=this;return new Promise(function(U,M){x[w].destroy(null,function(ee){if(ee){M(ee);return}U(_(void 0,!0))})})},"_return")),f),E),A=e(function(x){var U,M=Object.create(P,(U={},g(U,w,{value:x,writable:!0}),g(U,u,{value:null,writable:!0}),g(U,p,{value:null,writable:!0}),g(U,h,{value:null,writable:!0}),g(U,d,{value:x._readableState.endEmitted,writable:!0}),g(U,y,{value:e(function(ee,V){var q=M[w].read();q?(M[m]=null,M[u]=null,M[p]=null,ee(_(q,!1))):(M[u]=ee,M[p]=V)},"value"),writable:!0}),U));return M[m]=null,r(x,function(ee){if(ee&&ee.code!=="ERR_STREAM_PREMATURE_CLOSE"){var V=M[p];V!==null&&(M[m]=null,M[u]=null,M[p]=null,V(ee)),M[h]=ee;return}var q=M[u];q!==null&&(M[m]=null,M[u]=null,M[p]=null,q(_(void 0,!0))),M[d]=!0}),x.on("readable",T.bind(null,M)),M},"createReadableStreamAsyncIterator");i.exports=A}),O3=Ge((a,i)=>{i.exports=function(){throw new Error("Readable.from is not available in the browser")}}),BC=Ge((a,i)=>{"use strict";i.exports=re;var f;re.ReadableState=G;var g=(AC(),cr(h2)).EventEmitter,o=e(function(D,z){return D.listeners(z).length},"EElistenerCount"),n=RC(),r=(Td(),cr(_f)).Buffer,u=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function p(D){return r.from(D)}l(p,"ure"),e(p,"_uint8ArrayToBuffer");function h(D){return r.isBuffer(D)||D instanceof u}l(h,"cre"),e(h,"_isUint8Array");var d=OC(),m;d&&d.debuglog?m=d.debuglog("stream"):m=e(function(){},"debug");var y=S3(),w=kC(),_=TC(),S=_.getHighWaterMark,T=Xs().codes,O=T.ERR_INVALID_ARG_TYPE,E=T.ERR_STREAM_PUSH_AFTER_EOF,P=T.ERR_METHOD_NOT_IMPLEMENTED,A=T.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,x,U,M;Ys()(re,n);var ee=w.errorOrDestroy,V=["error","close","destroy","pause","resume"];function q(D,z,Ee){if(typeof D.prependListener=="function")return D.prependListener(z,Ee);!D._events||!D._events[z]?D.on(z,Ee):Array.isArray(D._events[z])?D._events[z].unshift(Ee):D._events[z]=[Ee,D._events[z]]}l(q,"vre"),e(q,"prependListener");function G(D,z,Ee){f=f||qs(),D=D||{},typeof Ee!="boolean"&&(Ee=z instanceof f),this.objectMode=!!D.objectMode,Ee&&(this.objectMode=this.objectMode||!!D.readableObjectMode),this.highWaterMark=S(this,D,"readableHighWaterMark",Ee),this.buffer=new y,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=D.emitClose!==!1,this.autoDestroy=!!D.autoDestroy,this.destroyed=!1,this.defaultEncoding=D.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,D.encoding&&(x||(x=Wx().StringDecoder),this.decoder=new x(D.encoding),this.encoding=D.encoding)}l(G,"b$"),e(G,"ReadableState");function re(D){if(f=f||qs(),!(this instanceof re))return new re(D);var z=this instanceof f;this._readableState=new G(D,this,z),this.readable=!0,D&&(typeof D.read=="function"&&(this._read=D.read),typeof D.destroy=="function"&&(this._destroy=D.destroy)),n.call(this)}l(re,"et"),e(re,"Readable"),Object.defineProperty(re.prototype,"destroyed",{enumerable:!1,get:e(function(){return this._readableState===void 0?!1:this._readableState.destroyed},"get"),set:e(function(D){this._readableState&&(this._readableState.destroyed=D)},"set")}),re.prototype.destroy=w.destroy,re.prototype._undestroy=w.undestroy,re.prototype._destroy=function(D,z){z(D)},re.prototype.push=function(D,z){var Ee=this._readableState,Oe;return Ee.objectMode?Oe=!0:typeof D=="string"&&(z=z||Ee.defaultEncoding,z!==Ee.encoding&&(D=r.from(D,z),z=""),Oe=!0),ae(this,D,z,!1,Oe)},re.prototype.unshift=function(D){return ae(this,D,null,!0,!1)};function ae(D,z,Ee,Oe,be){m("readableAddChunk",z);var ge=D._readableState;if(z===null)ge.reading=!1,Te(D,ge);else{var Ne;if(be||(Ne=we(ge,z)),Ne)ee(D,Ne);else if(ge.objectMode||z&&z.length>0)if(typeof z!="string"&&!ge.objectMode&&Object.getPrototypeOf(z)!==r.prototype&&(z=p(z)),Oe)ge.endEmitted?ee(D,new A):de(D,ge,z,!0);else if(ge.ended)ee(D,new E);else{if(ge.destroyed)return!1;ge.reading=!1,ge.decoder&&!Ee?(z=ge.decoder.write(z),ge.objectMode||z.length!==0?de(D,ge,z,!1):te(D,ge)):de(D,ge,z,!1)}else Oe||(ge.reading=!1,te(D,ge))}return!ge.ended&&(ge.length<ge.highWaterMark||ge.length===0)}l(ae,"_$"),e(ae,"readableAddChunk");function de(D,z,Ee,Oe){z.flowing&&z.length===0&&!z.sync?(z.awaitDrain=0,D.emit("data",Ee)):(z.length+=z.objectMode?1:Ee.length,Oe?z.buffer.unshift(Ee):z.buffer.push(Ee),z.needReadable&&J(D)),te(D,z)}l(de,"n1"),e(de,"addChunk");function we(D,z){var Ee;return!h(z)&&typeof z!="string"&&z!==void 0&&!D.objectMode&&(Ee=new O("chunk",["string","Buffer","Uint8Array"],z)),Ee}l(we,"bre"),e(we,"chunkInvalid"),re.prototype.isPaused=function(){return this._readableState.flowing===!1},re.prototype.setEncoding=function(D){x||(x=Wx().StringDecoder);var z=new x(D);this._readableState.decoder=z,this._readableState.encoding=this._readableState.decoder.encoding;for(var Ee=this._readableState.buffer.head,Oe="";Ee!==null;)Oe+=z.write(Ee.data),Ee=Ee.next;return this._readableState.buffer.clear(),Oe!==""&&this._readableState.buffer.push(Oe),this._readableState.length=Oe.length,this};var xe=1073741824;function Pe(D){return D>=xe?D=xe:(D--,D|=D>>>1,D|=D>>>2,D|=D>>>4,D|=D>>>8,D|=D>>>16,D++),D}l(Pe,"_re"),e(Pe,"computeNewHighWaterMark");function se(D,z){return D<=0||z.length===0&&z.ended?0:z.objectMode?1:D!==D?z.flowing&&z.length?z.buffer.head.data.length:z.length:(D>z.highWaterMark&&(z.highWaterMark=Pe(D)),D<=z.length?D:z.ended?z.length:(z.needReadable=!0,0))}l(se,"w$"),e(se,"howMuchToRead"),re.prototype.read=function(D){m("read",D),D=parseInt(D,10);var z=this._readableState,Ee=D;if(D!==0&&(z.emittedReadable=!1),D===0&&z.needReadable&&((z.highWaterMark!==0?z.length>=z.highWaterMark:z.length>0)||z.ended))return m("read: emitReadable",z.length,z.ended),z.length===0&&z.ended?ve(this):J(this),null;if(D=se(D,z),D===0&&z.ended)return z.length===0&&ve(this),null;var Oe=z.needReadable;m("need readable",Oe),(z.length===0||z.length-D<z.highWaterMark)&&(Oe=!0,m("length less than watermark",Oe)),z.ended||z.reading?(Oe=!1,m("reading or ended",Oe)):Oe&&(m("do read"),z.reading=!0,z.sync=!0,z.length===0&&(z.needReadable=!0),this._read(z.highWaterMark),z.sync=!1,z.reading||(D=se(Ee,z)));var be;return D>0?be=fe(D,z):be=null,be===null?(z.needReadable=z.length<=z.highWaterMark,D=0):(z.length-=D,z.awaitDrain=0),z.length===0&&(z.ended||(z.needReadable=!0),Ee!==D&&z.ended&&ve(this)),be!==null&&this.emit("data",be),be};function Te(D,z){if(m("onEofChunk"),!z.ended){if(z.decoder){var Ee=z.decoder.end();Ee&&Ee.length&&(z.buffer.push(Ee),z.length+=z.objectMode?1:Ee.length)}z.ended=!0,z.sync?J(D):(z.needReadable=!1,z.emittedReadable||(z.emittedReadable=!0,ue(D)))}}l(Te,"Ere"),e(Te,"onEofChunk");function J(D){var z=D._readableState;m("emitReadable",z.needReadable,z.emittedReadable),z.needReadable=!1,z.emittedReadable||(m("emitReadable",z.flowing),z.emittedReadable=!0,process.nextTick(ue,D))}l(J,"Yp"),e(J,"emitReadable");function ue(D){var z=D._readableState;m("emitReadable_",z.destroyed,z.length,z.ended),!z.destroyed&&(z.length||z.ended)&&(D.emit("readable"),z.emittedReadable=!1),z.needReadable=!z.flowing&&!z.ended&&z.length<=z.highWaterMark,Q(D)}l(ue,"E$"),e(ue,"emitReadable_");function te(D,z){z.readingMore||(z.readingMore=!0,process.nextTick(X,D,z))}l(te,"o1"),e(te,"maybeReadMore");function X(D,z){for(;!z.reading&&!z.ended&&(z.length<z.highWaterMark||z.flowing&&z.length===0);){var Ee=z.length;if(m("maybeReadMore read 0"),D.read(0),Ee===z.length)break}z.readingMore=!1}l(X,"Sre"),e(X,"maybeReadMore_"),re.prototype._read=function(D){ee(this,new P("_read()"))},re.prototype.pipe=function(D,z){var Ee=this,Oe=this._readableState;switch(Oe.pipesCount){case 0:Oe.pipes=D;break;case 1:Oe.pipes=[Oe.pipes,D];break;default:Oe.pipes.push(D);break}Oe.pipesCount+=1,m("pipe count=%d opts=%j",Oe.pipesCount,z);var be=(!z||z.end!==!1)&&D!==process.stdout&&D!==process.stderr,ge=be?Ie:v;Oe.endEmitted?process.nextTick(ge):Ee.once("end",ge),D.on("unpipe",Ne);function Ne(R,C){m("onunpipe"),R===Ee&&C&&C.hasUnpiped===!1&&(C.hasUnpiped=!0,$e())}l(Ne,"i"),e(Ne,"onunpipe");function Ie(){m("onend"),D.end()}l(Ie,"f"),e(Ie,"onend");var ke=ye(Ee);D.on("drain",ke);var Ce=!1;function $e(){m("cleanup"),D.removeListener("close",s),D.removeListener("finish",c),D.removeListener("drain",ke),D.removeListener("error",t),D.removeListener("unpipe",Ne),Ee.removeListener("end",Ie),Ee.removeListener("end",v),Ee.removeListener("data",Ke),Ce=!0,Oe.awaitDrain&&(!D._writableState||D._writableState.needDrain)&&ke()}l($e,"d"),e($e,"cleanup"),Ee.on("data",Ke);function Ke(R){m("ondata");var C=D.write(R);m("dest.write",C),C===!1&&((Oe.pipesCount===1&&Oe.pipes===D||Oe.pipesCount>1&&I(Oe.pipes,D)!==-1)&&!Ce&&(m("false write response, pause",Oe.awaitDrain),Oe.awaitDrain++),Ee.pause())}l(Ke,"y"),e(Ke,"ondata");function t(R){m("onerror",R),v(),D.removeListener("error",t),o(D,"error")===0&&ee(D,R)}l(t,"m"),e(t,"onerror"),q(D,"error",t);function s(){D.removeListener("finish",c),v()}l(s,"g"),e(s,"onclose"),D.once("close",s);function c(){m("onfinish"),D.removeListener("close",s),v()}l(c,"v"),e(c,"onfinish"),D.once("finish",c);function v(){m("unpipe"),Ee.unpipe(D)}return l(v,"_"),e(v,"unpipe"),D.emit("pipe",Ee),Oe.flowing||(m("pipe resume"),Ee.resume()),D};function ye(D){return e(function(){var z=D._readableState;m("pipeOnDrain",z.awaitDrain),z.awaitDrain&&z.awaitDrain--,z.awaitDrain===0&&o(D,"data")&&(z.flowing=!0,Q(D))},"pipeOnDrainFunctionResult")}l(ye,"Are"),e(ye,"pipeOnDrain"),re.prototype.unpipe=function(D){var z=this._readableState,Ee={hasUnpiped:!1};if(z.pipesCount===0)return this;if(z.pipesCount===1)return D&&D!==z.pipes?this:(D||(D=z.pipes),z.pipes=null,z.pipesCount=0,z.flowing=!1,D&&D.emit("unpipe",this,Ee),this);if(!D){var Oe=z.pipes,be=z.pipesCount;z.pipes=null,z.pipesCount=0,z.flowing=!1;for(var ge=0;ge<be;ge++)Oe[ge].emit("unpipe",this,{hasUnpiped:!1});return this}var Ne=I(z.pipes,D);return Ne===-1?this:(z.pipes.splice(Ne,1),z.pipesCount-=1,z.pipesCount===1&&(z.pipes=z.pipes[0]),D.emit("unpipe",this,Ee),this)},re.prototype.on=function(D,z){var Ee=n.prototype.on.call(this,D,z),Oe=this._readableState;return D==="data"?(Oe.readableListening=this.listenerCount("readable")>0,Oe.flowing!==!1&&this.resume()):D==="readable"&&!Oe.endEmitted&&!Oe.readableListening&&(Oe.readableListening=Oe.needReadable=!0,Oe.flowing=!1,Oe.emittedReadable=!1,m("on readable",Oe.length,Oe.reading),Oe.length?J(this):Oe.reading||process.nextTick(De,this)),Ee},re.prototype.addListener=re.prototype.on,re.prototype.removeListener=function(D,z){var Ee=n.prototype.removeListener.call(this,D,z);return D==="readable"&&process.nextTick(Re,this),Ee},re.prototype.removeAllListeners=function(D){var z=n.prototype.removeAllListeners.apply(this,arguments);return(D==="readable"||D===void 0)&&process.nextTick(Re,this),z};function Re(D){var z=D._readableState;z.readableListening=D.listenerCount("readable")>0,z.resumeScheduled&&!z.paused?z.flowing=!0:D.listenerCount("data")>0&&D.resume()}l(Re,"S$"),e(Re,"updateReadableListening");function De(D){m("readable nexttick read 0"),D.read(0)}l(De,"Rre"),e(De,"nReadingNextTick"),re.prototype.resume=function(){var D=this._readableState;return D.flowing||(m("resume"),D.flowing=!D.readableListening,Y(this,D)),D.paused=!1,this};function Y(D,z){z.resumeScheduled||(z.resumeScheduled=!0,process.nextTick(H,D,z))}l(Y,"Tre"),e(Y,"resume");function H(D,z){m("resume",z.reading),z.reading||D.read(0),z.resumeScheduled=!1,D.emit("resume"),Q(D),z.flowing&&!z.reading&&D.read(0)}l(H,"Fre"),e(H,"resume_"),re.prototype.pause=function(){return m("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(m("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Q(D){var z=D._readableState;for(m("flow",z.flowing);z.flowing&&D.read()!==null;);}l(Q,"s1"),e(Q,"flow"),re.prototype.wrap=function(D){var z=this,Ee=this._readableState,Oe=!1;D.on("end",function(){if(m("wrapped end"),Ee.decoder&&!Ee.ended){var Ne=Ee.decoder.end();Ne&&Ne.length&&z.push(Ne)}z.push(null)}),D.on("data",function(Ne){if(m("wrapped data"),Ee.decoder&&(Ne=Ee.decoder.write(Ne)),!(Ee.objectMode&&Ne==null)&&!(!Ee.objectMode&&(!Ne||!Ne.length))){var Ie=z.push(Ne);Ie||(Oe=!0,D.pause())}});for(var be in D)this[be]===void 0&&typeof D[be]=="function"&&(this[be]=e(function(Ne){return e(function(){return D[Ne].apply(D,arguments)},"methodWrapReturnFunction")},"methodWrap")(be));for(var ge=0;ge<V.length;ge++)D.on(V[ge],this.emit.bind(this,V[ge]));return this._read=function(Ne){m("wrapped _read",Ne),Oe&&(Oe=!1,D.resume())},this},typeof Symbol=="function"&&(re.prototype[Symbol.asyncIterator]=function(){return U===void 0&&(U=R3()),U(this)}),Object.defineProperty(re.prototype,"readableHighWaterMark",{enumerable:!1,get:e(function(){return this._readableState.highWaterMark},"get")}),Object.defineProperty(re.prototype,"readableBuffer",{enumerable:!1,get:e(function(){return this._readableState&&this._readableState.buffer},"get")}),Object.defineProperty(re.prototype,"readableFlowing",{enumerable:!1,get:e(function(){return this._readableState.flowing},"get"),set:e(function(D){this._readableState&&(this._readableState.flowing=D)},"set")}),re._fromList=fe,Object.defineProperty(re.prototype,"readableLength",{enumerable:!1,get:e(function(){return this._readableState.length},"get")});function fe(D,z){if(z.length===0)return null;var Ee;return z.objectMode?Ee=z.buffer.shift():!D||D>=z.length?(z.decoder?Ee=z.buffer.join(""):z.buffer.length===1?Ee=z.buffer.first():Ee=z.buffer.concat(z.length),z.buffer.clear()):Ee=z.buffer.consume(D,z.decoder),Ee}l(fe,"A$"),e(fe,"fromList");function ve(D){var z=D._readableState;m("endReadable",z.endEmitted),z.endEmitted||(z.ended=!0,process.nextTick(N,z,D))}l(ve,"i1"),e(ve,"endReadable");function N(D,z){if(m("endReadableNT",D.endEmitted,D.length),!D.endEmitted&&D.length===0&&(D.endEmitted=!0,z.readable=!1,z.emit("end"),D.autoDestroy)){var Ee=z._writableState;(!Ee||Ee.autoDestroy&&Ee.finished)&&z.destroy()}}l(N,"xre"),e(N,"endReadableNT"),typeof Symbol=="function"&&(re.from=function(D,z){return M===void 0&&(M=O3()),M(re,D,z)});function I(D,z){for(var Ee=0,Oe=D.length;Ee<Oe;Ee++)if(D[Ee]===z)return Ee;return-1}l(I,"R$"),e(I,"indexOf")}),xC=Ge((a,i)=>{"use strict";i.exports=h;var f=Xs().codes,g=f.ERR_METHOD_NOT_IMPLEMENTED,o=f.ERR_MULTIPLE_CALLBACK,n=f.ERR_TRANSFORM_ALREADY_TRANSFORMING,r=f.ERR_TRANSFORM_WITH_LENGTH_0,u=qs();Ys()(h,u);function p(y,w){var _=this._transformState;_.transforming=!1;var S=_.writecb;if(S===null)return this.emit("error",new o);_.writechunk=null,_.writecb=null,w!=null&&this.push(w),S(y);var T=this._readableState;T.reading=!1,(T.needReadable||T.length<T.highWaterMark)&&this._read(T.highWaterMark)}l(p,"Bre"),e(p,"afterTransform");function h(y){if(!(this instanceof h))return new h(y);u.call(this,y),this._transformState={afterTransform:p.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,y&&(typeof y.transform=="function"&&(this._transform=y.transform),typeof y.flush=="function"&&(this._flush=y.flush)),this.on("prefinish",d)}l(h,"xi"),e(h,"Transform");function d(){var y=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(w,_){m(y,w,_)}):m(this,null,null)}l(d,"Cre"),e(d,"prefinish"),h.prototype.push=function(y,w){return this._transformState.needTransform=!1,u.prototype.push.call(this,y,w)},h.prototype._transform=function(y,w,_){_(new g("_transform()"))},h.prototype._write=function(y,w,_){var S=this._transformState;if(S.writecb=_,S.writechunk=y,S.writeencoding=w,!S.transforming){var T=this._readableState;(S.needTransform||T.needReadable||T.length<T.highWaterMark)&&this._read(T.highWaterMark)}},h.prototype._read=function(y){var w=this._transformState;w.writechunk!==null&&!w.transforming?(w.transforming=!0,this._transform(w.writechunk,w.writeencoding,w.afterTransform)):w.needTransform=!0},h.prototype._destroy=function(y,w){u.prototype._destroy.call(this,y,function(_){w(_)})};function m(y,w,_){if(w)return y.emit("error",w);if(_!=null&&y.push(_),y._writableState.length)throw new r;if(y._transformState.transforming)throw new n;return y.push(null)}l(m,"F$"),e(m,"done")}),k3=Ge((a,i)=>{"use strict";i.exports=g;var f=xC();Ys()(g,f);function g(o){if(!(this instanceof g))return new g(o);f.call(this,o)}l(g,"_u"),e(g,"PassThrough"),g.prototype._transform=function(o,n,r){r(null,o)}}),T3=Ge((a,i)=>{"use strict";var f;function g(_){var S=!1;return function(){S||(S=!0,_.apply(void 0,arguments))}}l(g,"Lre"),e(g,"once");var o=Xs().codes,n=o.ERR_MISSING_ARGS,r=o.ERR_STREAM_DESTROYED;function u(_){if(_)throw _}l(u,"k$"),e(u,"noop");function p(_){return _.setHeader&&typeof _.abort=="function"}l(p,"$re"),e(p,"isRequest");function h(_,S,T,O){O=g(O);var E=!1;_.on("close",function(){E=!0}),f===void 0&&(f=d2()),f(_,{readable:S,writable:T},function(A){if(A)return O(A);E=!0,O()});var P=!1;return function(A){if(!E&&!P){if(P=!0,p(_))return _.abort();if(typeof _.destroy=="function")return _.destroy();O(A||new r("pipe"))}}}l(h,"Mre"),e(h,"destroyer");function d(_){_()}l(d,"B$"),e(d,"call");function m(_,S){return _.pipe(S)}l(m,"Ure"),e(m,"pipe");function y(_){return!_.length||typeof _[_.length-1]!="function"?u:_.pop()}l(y,"jre"),e(y,"popCallback");function w(){for(var _=arguments.length,S=new Array(_),T=0;T<_;T++)S[T]=arguments[T];var O=y(S);if(Array.isArray(S[0])&&(S=S[0]),S.length<2)throw new n("streams");var E,P=S.map(function(A,x){var U=x<S.length-1,M=x>0;return h(A,U,M,function(ee){E||(E=ee),ee&&P.forEach(d),!U&&(P.forEach(d),O(E))})});return S.reduce(m)}l(w,"Hre"),e(w,"pipeline"),i.exports=w}),F3=Ge((a,i)=>{a=i.exports=BC(),a.Stream=a,a.Readable=a,a.Writable=FC(),a.Duplex=qs(),a.Transform=xC(),a.PassThrough=k3(),a.finished=d2(),a.pipeline=T3()});dE();typeof globalThis<"u"&&!globalThis.Buffer&&(globalThis.Buffer=zs);typeof window<"u"&&!window.Buffer&&(window.Buffer=zs);dE();function lE(a){let i=a.name||"untitled";return{kind:"file",name:i,async getFile(){let f=(await a.stat()).size;console.log("reading data into buffer of size"+f);let g=zs.alloc(f);await a.read(g,0,f,0);let o=new Uint8Array(g.buffer,g.byteOffset,g.byteLength);console.log("buffer read",o);let n=o;return new File([n],i||"untitled")},async createWritable(){return{async write(f){console.log("writing data to handle",a);let g;if(typeof f=="string")g=zs.from(f,"utf-8");else if(f instanceof Blob){let o=await f.arrayBuffer();g=new Uint8Array(o)}else if(ArrayBuffer.isView(f))g=new Uint8Array(f.buffer,f.byteOffset,f.byteLength);else throw console.log("data",f),new Error("Unsupported data type for write");await a.write(g),await a.sync(),console.log("write completed")},async close(){await a.close()}}}}}l(lE,"y1");e(lE,"fileHandleToFileSystemFileHandle");async function IC(a){let i=await a.getFile();return i.handle=a,i}l(IC,"i8");e(IC,"fileSystemFileHandleToFileWithHandle");async function B3(a){return{openFile:e(async i=>{let f=await a.promises.open(i,"w");return f.name=i,await IC(lE(f))},"openFile"),fileSave:e(async(i,f,g,o,n)=>{if(g)console.log("using existing handle",g);else{let u=window.prompt("Save as",f?.fileName??"untitled");if(console.log("result of prompt",u),!u)throw new Error("no file choosen");try{let p=await a.promises.open(`${u}`,"w");g=lE(p)}catch(p){throw console.error("Failed to open file in legitFs",p),new Error("Failed to open file in legitFs")}}let r=i instanceof Blob?i:await i;return await(await g.createWritable()).write(r),g},"fileSave")}}l(B3,"nne");e(B3,"getLegitFsAccess");function Nd(a){throw new Error("Node.js process "+a+" is not supported by JSPM core outside of Node.js")}l(Nd,"ny");e(Nd,"unimplemented");var yi=[],Is=!1,ha,Yh=-1;function PC(){!Is||!ha||(Is=!1,ha.length?yi=ha.concat(yi):Yh=-1,yi.length&&p2())}l(PC,"o8");e(PC,"cleanUpNextTick");function p2(){if(!Is){var a=setTimeout(PC,0);Is=!0;for(var i=yi.length;i;){for(ha=yi,yi=[];++Yh<i;)ha&&ha[Yh].run();Yh=-1,i=yi.length}ha=null,Is=!1,clearTimeout(a)}}l(p2,"g1");e(p2,"drainQueue");function jC(a){var i=new Array(arguments.length-1);if(arguments.length>1)for(var f=1;f<arguments.length;f++)i[f-1]=arguments[f];yi.push(new g2(a,i)),yi.length===1&&!Is&&setTimeout(p2,0)}l(jC,"a8");e(jC,"nextTick");function g2(a,i){this.fun=a,this.array=i}l(g2,"w1");e(g2,"Item");g2.prototype.run=function(){this.fun.apply(null,this.array)};var x3="browser",I3="x64",P3="browser",j3={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},C3=["/usr/bin/node"],L3=[],N3="v16.8.0",D3={},U3=e(function(a,i){console.warn((i?i+": ":"")+a)},"emitWarning"),M3=e(function(a){Nd("binding")},"binding"),$3=e(function(a){return 0},"umask"),W3=e(function(){return"/"},"cwd"),z3=e(function(a){},"chdir"),H3={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};function _r(){}l(_r,"Vt");e(_r,"noop");var q3=_r,G3=[];function CC(a){Nd("_linkedBinding")}l(CC,"S8");e(CC,"_linkedBinding");var V3={},K3=!1,J3={};function LC(a){Nd("dlopen")}l(LC,"F8");e(LC,"dlopen");function NC(){return[]}l(NC,"x8");e(NC,"_getActiveRequests");function DC(){return[]}l(DC,"O8");e(DC,"_getActiveHandles");var Y3=_r,Z3=_r,y2=e(function(){return{}},"cpuUsage"),Q3=y2,X3=y2,e5=_r,t5=_r,r5=_r,n5={};function UC(a,i){if(!a)throw new Error(i||"assertion error")}l(UC,"$8");e(UC,"assert");var i5={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},o5=_r,a5=_r;function MC(){return!1}l(MC,"H8");e(MC,"hasUncaughtExceptionCaptureCallback");var s5=_r,l5=_r,f5=_r,u5=_r,c5=_r,h5=void 0,d5=void 0,p5=void 0,g5=_r,y5=2,m5=1,w5="/bin/usr/node",b5=9229,v5="node",_5=[],E5=_r,Hi={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};Hi.now===void 0&&(Im=Date.now(),Hi.timing&&Hi.timing.navigationStart&&(Im=Hi.timing.navigationStart),Hi.now=()=>Date.now()-Im);var Im;function $C(){return Hi.now()/1e3}l($C,"o6");e($C,"uptime");var fE=1e9;function gd(a){var i=Math.floor((Date.now()-Hi.now())*.001),f=Hi.now()*.001,g=Math.floor(f)+i,o=Math.floor(f%1*1e9);return a&&(g=g-a[0],o=o-a[1],o<0&&(g--,o+=fE)),[g,o]}l(gd,"ry");e(gd,"hrtime");gd.bigint=function(a){var i=gd(a);return typeof BigInt>"u"?i[0]*fE+i[1]:BigInt(i[0]*fE)+BigInt(i[1])};var S5=10,A5={},R5=0;function vi(){return zC}l(vi,"Ii");e(vi,"on");var O5=vi,k5=vi,T5=vi,F5=vi,B5=vi,x5=_r,I5=vi,P5=vi;function WC(a){return[]}l(WC,"g6");e(WC,"listeners");var zC={version:N3,versions:D3,arch:I3,platform:P3,release:H3,_rawDebug:q3,moduleLoadList:G3,binding:M3,_linkedBinding:CC,_events:A5,_eventsCount:R5,_maxListeners:S5,on:vi,addListener:O5,once:k5,off:T5,removeListener:F5,removeAllListeners:B5,emit:x5,prependListener:I5,prependOnceListener:P5,listeners:WC,domain:V3,_exiting:K3,config:J3,dlopen:LC,uptime:$C,_getActiveRequests:NC,_getActiveHandles:DC,reallyExit:Y3,_kill:Z3,cpuUsage:y2,resourceUsage:Q3,memoryUsage:X3,kill:e5,exit:t5,openStdin:r5,allowedNodeEnvironmentFlags:n5,assert:UC,features:i5,_fatalExceptions:o5,setUncaughtExceptionCaptureCallback:a5,hasUncaughtExceptionCaptureCallback:MC,emitWarning:U3,nextTick:jC,_tickCallback:s5,_debugProcess:l5,_debugEnd:f5,_startProfilerIdleNotifier:u5,_stopProfilerIdleNotifier:c5,stdout:h5,stdin:p5,stderr:d5,abort:g5,umask:$3,chdir:z3,cwd:W3,env:j3,title:x3,argv:C3,execArgv:L3,pid:y5,ppid:m5,execPath:w5,debugPort:b5,hrtime:gd,argv0:v5,_preload_modules:_5,setSourceMapsEnabled:E5},Pm={},zx=!1;function HC(){if(zx)return Pm;zx=!0;var a=zC;function i(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}l(i,"t"),e(i,"assertPath");function f(n,r){for(var u="",p=0,h=-1,d=0,m,y=0;y<=n.length;++y){if(y<n.length)m=n.charCodeAt(y);else{if(m===47)break;m=47}if(m===47){if(!(h===y-1||d===1))if(h!==y-1&&d===2){if(u.length<2||p!==2||u.charCodeAt(u.length-1)!==46||u.charCodeAt(u.length-2)!==46){if(u.length>2){var w=u.lastIndexOf("/");if(w!==u.length-1){w===-1?(u="",p=0):(u=u.slice(0,w),p=u.length-1-u.lastIndexOf("/")),h=y,d=0;continue}}else if(u.length===2||u.length===1){u="",p=0,h=y,d=0;continue}}r&&(u.length>0?u+="/..":u="..",p=2)}else u.length>0?u+="/"+n.slice(h+1,y):u=n.slice(h+1,y),p=y-h-1;h=y,d=0}else m===46&&d!==-1?++d:d=-1}return u}l(f,"r"),e(f,"normalizeStringPosix");function g(n,r){var u=r.dir||r.root,p=r.base||(r.name||"")+(r.ext||"");return u?u===r.root?u+p:u+n+p:p}l(g,"n"),e(g,"_format");var o={resolve:e(function(){for(var n="",r=!1,u,p=arguments.length-1;p>=-1&&!r;p--){var h;p>=0?h=arguments[p]:(u===void 0&&(u=a.cwd()),h=u),i(h),h.length!==0&&(n=h+"/"+n,r=h.charCodeAt(0)===47)}return n=f(n,!r),r?n.length>0?"/"+n:"/":n.length>0?n:"."},"resolve2"),normalize:e(function(n){if(i(n),n.length===0)return".";var r=n.charCodeAt(0)===47,u=n.charCodeAt(n.length-1)===47;return n=f(n,!r),n.length===0&&!r&&(n="."),n.length>0&&u&&(n+="/"),r?"/"+n:n},"normalize2"),isAbsolute:e(function(n){return i(n),n.length>0&&n.charCodeAt(0)===47},"isAbsolute2"),join:e(function(){if(arguments.length===0)return".";for(var n,r=0;r<arguments.length;++r){var u=arguments[r];i(u),u.length>0&&(n===void 0?n=u:n+="/"+u)}return n===void 0?".":o.normalize(n)},"join2"),relative:e(function(n,r){if(i(n),i(r),n===r||(n=o.resolve(n),r=o.resolve(r),n===r))return"";for(var u=1;u<n.length&&n.charCodeAt(u)===47;++u);for(var p=n.length,h=p-u,d=1;d<r.length&&r.charCodeAt(d)===47;++d);for(var m=r.length,y=m-d,w=h<y?h:y,_=-1,S=0;S<=w;++S){if(S===w){if(y>w){if(r.charCodeAt(d+S)===47)return r.slice(d+S+1);if(S===0)return r.slice(d+S)}else h>w&&(n.charCodeAt(u+S)===47?_=S:S===0&&(_=0));break}var T=n.charCodeAt(u+S),O=r.charCodeAt(d+S);if(T!==O)break;T===47&&(_=S)}var E="";for(S=u+_+1;S<=p;++S)(S===p||n.charCodeAt(S)===47)&&(E.length===0?E+="..":E+="/..");return E.length>0?E+r.slice(d+_):(d+=_,r.charCodeAt(d)===47&&++d,r.slice(d))},"relative2"),_makeLong:e(function(n){return n},"_makeLong2"),dirname:e(function(n){if(i(n),n.length===0)return".";for(var r=n.charCodeAt(0),u=r===47,p=-1,h=!0,d=n.length-1;d>=1;--d)if(r=n.charCodeAt(d),r===47){if(!h){p=d;break}}else h=!1;return p===-1?u?"/":".":u&&p===1?"//":n.slice(0,p)},"dirname2"),basename:e(function(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');i(n);var u=0,p=-1,h=!0,d;if(r!==void 0&&r.length>0&&r.length<=n.length){if(r.length===n.length&&r===n)return"";var m=r.length-1,y=-1;for(d=n.length-1;d>=0;--d){var w=n.charCodeAt(d);if(w===47){if(!h){u=d+1;break}}else y===-1&&(h=!1,y=d+1),m>=0&&(w===r.charCodeAt(m)?--m===-1&&(p=d):(m=-1,p=y))}return u===p?p=y:p===-1&&(p=n.length),n.slice(u,p)}else{for(d=n.length-1;d>=0;--d)if(n.charCodeAt(d)===47){if(!h){u=d+1;break}}else p===-1&&(h=!1,p=d+1);return p===-1?"":n.slice(u,p)}},"basename2"),extname:e(function(n){i(n);for(var r=-1,u=0,p=-1,h=!0,d=0,m=n.length-1;m>=0;--m){var y=n.charCodeAt(m);if(y===47){if(!h){u=m+1;break}continue}p===-1&&(h=!1,p=m+1),y===46?r===-1?r=m:d!==1&&(d=1):r!==-1&&(d=-1)}return r===-1||p===-1||d===0||d===1&&r===p-1&&r===u+1?"":n.slice(r,p)},"extname2"),format:e(function(n){if(n===null||typeof n!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof n);return g("/",n)},"format2"),parse:e(function(n){i(n);var r={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return r;var u=n.charCodeAt(0),p=u===47,h;p?(r.root="/",h=1):h=0;for(var d=-1,m=0,y=-1,w=!0,_=n.length-1,S=0;_>=h;--_){if(u=n.charCodeAt(_),u===47){if(!w){m=_+1;break}continue}y===-1&&(w=!1,y=_+1),u===46?d===-1?d=_:S!==1&&(S=1):d!==-1&&(S=-1)}return d===-1||y===-1||S===0||S===1&&d===y-1&&d===m+1?y!==-1&&(m===0&&p?r.base=r.name=n.slice(1,y):r.base=r.name=n.slice(m,y)):(m===0&&p?(r.name=n.slice(1,d),r.base=n.slice(1,y)):(r.name=n.slice(m,d),r.base=n.slice(m,y)),r.ext=n.slice(d,y)),m>0?r.dir=n.slice(0,m-1):p&&(r.dir="/"),r},"parse2"),sep:"/",delimiter:":",win32:null,posix:null};return o.posix=o,Pm=o,Pm}l(HC,"w6");e(HC,"dew");var jr=HC(),cD=jr._makeLong,Hx=jr.basename,hD=jr.delimiter,Ea=jr.dirname,dD=jr.extname,pD=jr.format,gD=jr.isAbsolute,yD=jr.join,mD=jr.normalize,wD=jr.parse,bD=jr.posix,vD=jr.relative,_D=jr.resolve,ED=jr.sep,SD=jr.win32,js,qC=(js=class{constructor(i,f){vt(this,"entries",[]),vt(this,"currentIndex",0),vt(this,"closed",!1),vt(this,"compositFs"),vt(this,"dirPath"),vt(this,"initialized",!1),this.compositFs=i,this.dirPath=f}async initialize(){if(this.initialized)return;let i=new Set;for(let f of[...this.compositFs.subFilesystems].reverse()){let g=await f.readdir(this.dirPath);for(let o of g)i.add(o)}for(let f of Array.from(i)){let g=this.dirPath+"/"+f;await this.compositFs.hiddenFilesFileSystem?.responsible(g)||this.entries.push({name:f,path:g})}this.initialized=!0}async*[Symbol.asyncIterator](){for(await this.initialize();this.currentIndex<this.entries.length&&!this.closed;){let i=this.entries[this.currentIndex++];try{let f=await this.compositFs.stat(i.path);yield{name:i.name,isFile:e(()=>f.isFile(),"isFile"),isDirectory:e(()=>f.isDirectory(),"isDirectory"),isBlockDevice:e(()=>f.isBlockDevice(),"isBlockDevice"),isCharacterDevice:e(()=>f.isCharacterDevice(),"isCharacterDevice"),isSymbolicLink:e(()=>f.isSymbolicLink(),"isSymbolicLink"),isFIFO:e(()=>f.isFIFO(),"isFIFO"),isSocket:e(()=>f.isSocket(),"isSocket")}}catch(f){console.debug(`Failed to stat ${i.path}:`,f)}}}async read(){if(this.closed)throw new Error("Directory handle is closed");if(await this.initialize(),this.currentIndex>=this.entries.length)return null;let i=this.entries[this.currentIndex++];try{let f=await this.compositFs.stat(i.path);return{name:i.name,isFile:e(()=>f.isFile(),"isFile"),isDirectory:e(()=>f.isDirectory(),"isDirectory"),isBlockDevice:e(()=>f.isBlockDevice(),"isBlockDevice"),isCharacterDevice:e(()=>f.isCharacterDevice(),"isCharacterDevice"),isSymbolicLink:e(()=>f.isSymbolicLink(),"isSymbolicLink"),isFIFO:e(()=>f.isFIFO(),"isFIFO"),isSocket:e(()=>f.isSocket(),"isSocket")}}catch{return this.read()}}async close(){this.closed=!0,this.entries=[]}get path(){return this.dirPath}},l(js,"ay"),js);e(qC,"CompositeFsDir");var GC=qC,Cs,VC=(Cs=class{constructor(i){vt(this,"delegate"),vt(this,"compositeFs"),vt(this,"_subFsFileDescriptor"),vt(this,"handleType","file"),vt(this,"_compositFsFileDescriptor",-1),this.delegate=i.fs,this._subFsFileDescriptor=i.subFsFileDescriptor,this._compositFsFileDescriptor=-1,this.compositeFs=i.compositeFs;let f=this._subFsFileDescriptor}get fsType(){return this.delegate.fileType()}get subFsFileDescriptor(){return this._subFsFileDescriptor}get fd(){return this._compositFsFileDescriptor}realize(i){if(this._compositFsFileDescriptor!==-1)throw new Error("was already realized");this._compositFsFileDescriptor=i}readableWebStream(i){throw new Error("Method not implemented.")}async appendFile(i,f){return await this.compositeFs.logOperationOnFileDescsriptor(this,"appendFile",{data:i,options:f}),await this.delegate.appendFile(this,i,f)}async chmod(i){return await this.compositeFs.logOperationOnFileDescsriptor(this,"chmod",{mode:i}),this.delegate.fchmod(this,i)}async chown(i,f){return await this.compositeFs.logOperationOnFileDescsriptor(this,"chown",{uid:i,gid:f}),this.delegate.fchown(this,i,f)}async close(){return await this.compositeFs.logOperationOnFileDescsriptor(this,"close",{}),this.compositeFs.close(this)}async datasync(){return await this.compositeFs.logOperationOnFileDescsriptor(this,"datasync",{}),this.delegate.dataSync(this)}async read(i,f,g,o){return await this.compositeFs.logOperationOnFileDescsriptor(this,"read",{targetBufferLength:i.length,offset:f,length:g,position:o}),await this.delegate.read(this,i,f,g,o)}async readv(i,f){return await this.compositeFs.logOperationOnFileDescsriptor(this,"readv",{buffers:i,position:f}),this.delegate.readv(this,i,f)}async stat(i){return await this.compositeFs.logOperationOnFileDescsriptor(this,"stat",{options:i}),this.delegate.fstat(this,i)}async truncate(i){return await this.compositeFs.logOperationOnFileDescsriptor(this,"truncate",{len:i}),this.delegate.ftruncate(this,i)}async utimes(i,f){return await this.compositeFs.logOperationOnFileDescsriptor(this,"utimes",{atime:i,mtime:f}),this.delegate.futimes(this,i,f)}async write(i,f,g,o){return await this.compositeFs.logOperationOnFileDescsriptor(this,"write",{buffer:i,offset:f,length:g,position:o}),this.delegate.write(this,i,f,g,o)}async writev(i,f){return await this.compositeFs.logOperationOnFileDescsriptor(this,"writev",{buffers:i,position:f}),this.delegate.writev(this,i,f)}async sync(){return await this.compositeFs.logOperationOnFileDescsriptor(this,"sync",{}),this.delegate.dataSync(this)}},l(Cs,"sy"),Cs);e(VC,"CompositFsFileHandle");var Dd=VC,qx=$t(vf(),1),Ls,KC=(Ls=class{constructor({name:i,parentFs:f,gitRoot:g}){vt(this,"compositFs"),vt(this,"gitRoot"),vt(this,"name"),this.name=i,this.compositFs=f,this.gitRoot=g}toStr(i){return typeof i=="string"?i:Buffer.isBuffer(i)?i.toString():i&&typeof i=="object"&&"fd"in i?`FileHandle(fd=${i.fd})`:String(i)}async open(i,f,g){throw new Error(`open not implemented for: ${this.toStr(i)}`)}async access(i,f){throw new Error(`access not implemented for: ${this.toStr(i)}`)}async stat(i,f){throw new Error(`lstat not implemented for: ${this.toStr(i)}`)}async lstat(i,f){throw new Error(`lstat not implemented for: ${this.toStr(i)}`)}async opendir(i,f){throw new Error(`opendir not implemented for: ${this.toStr(i)}`)}async link(i,f){throw new Error(`link not implemented for: ${this.toStr(i)}`)}async mkdir(i,f){throw new Error(`mkdir not implemented for: ${this.toStr(i)}`)}async readdir(i,f){throw new Error(`readdir not implemented for: ${this.toStr(i)}`)}async readlink(i,...f){throw new Error(`readlink not implemented for: ${this.toStr(i)}`)}async unlink(i){throw new Error(`unlink not implemented for: ${this.toStr(i)}`)}async rename(i,f){throw new Error(`rename not implemented for: ${this.toStr(i)}`)}async rmdir(i,...f){throw new Error(`rmdir not implemented for: ${this.toStr(i)}`)}async symlink(i,f,g){throw new Error(`symlink not implemented for: ${this.toStr(f)}`)}async lookup(i){throw new Error(`lookup not implemented for: ${this.toStr(i)}`)}resolvePath(i){throw new Error(`resolvePath not implemented for fd: ${i}`)}async close(i){this.compositFs.close(i)}async dataSync(i){throw new Error(`dataSync not implemented for: ${i.subFsFileDescriptor}`)}async read(i,f,g,o,n){throw new Error(`read not implemented for: ${i.subFsFileDescriptor}`)}async appendFile(i,f,g){throw new Error(`appendFile not implemented for: ${i.subFsFileDescriptor}`)}async fchmod(i,f){throw new Error(`fchmod not implemented for: ${i.subFsFileDescriptor}`)}async fchown(i,f,g){throw new Error(`fchown not implemented for: ${i.subFsFileDescriptor}`)}async ftruncate(i,f){throw new Error(`ftruncate not implemented for: ${i.subFsFileDescriptor}`)}async fstat(i,f){throw new Error(`fstat not implemented for: ${i.subFsFileDescriptor}`)}async futimes(i,f,g){throw new Error(`futimes not implemented for: ${i.subFsFileDescriptor}`)}async write(i,f,g,o,n){throw new Error(`write not implemented for: ${i.subFsFileDescriptor}`)}async writev(i,f,g){throw new Error(`writev not implemented for: ${i.subFsFileDescriptor}`)}async readv(i,f,g){throw new Error(`readv not implemented for: ${i.subFsFileDescriptor}`)}async readFile(i,f){throw new Error(`readFile not implemented for: ${this.toStr(i)}`)}async writeFile(i,f,g){throw new Error(`writeFile not implemented for: ${this.toStr(i)}`)}},l(Ls,"pw"),Ls);e(KC,"BaseCompositeSubFs");var Of=KC,Ns,JC=(Ns=class extends Of{constructor({name:i,parentFs:f,gitRoot:g}){if(super({name:i,parentFs:f,gitRoot:g}),vt(this,"openFh",new Map),vt(this,"memFs",(0,qx.createFsFromVolume)(new qx.Volume)),vt(this,"targetFs"),this.compositFs=f,this.gitRoot=g,this.compositFs.parentFs===void 0)throw new Error("PassThroughSubFs not allowed in root fs");this.targetFs=this.compositFs.parentFs}async responsible(i){return!0}fileType(){return 4}async open(i,f,g){let o=Ea(i),n=await this.targetFs.promises.open(i,f,g);return this.openFh.set(n.fd,n),new Dd({fs:this,compositeFs:this.compositFs,subFsFileDescriptor:n.fd,parentFsFileDescriptors:[n.fd]})}async access(i,f){return await this.targetFs.promises.access(i,f)}async stat(i,f){return this.targetFs.promises.stat(i,{bigint:!1})}async lstat(i,f){return this.targetFs.promises.lstat(i,{bigint:!1})}async opendir(i,f){return await this.targetFs.promises.opendir(i,f)}async link(i,f){return await this.targetFs.promises.link(i,f)}async mkdir(i,f){let g=typeof i=="string"?i:i.toString();return await this.targetFs.promises.mkdir(g,f)}async readdir(i,...f){return this.targetFs.promises.readdir(i,...f)}async readlink(i,...f){throw new Error("not implemented")}async unlink(i){return await this.targetFs.promises.unlink(i)}async rename(i,f){return await this.targetFs.promises.rename(i,f)}async rmdir(i,f){return await this.targetFs.promises.rmdir(i,f)}async symlink(i,f,g){return await this.targetFs.promises.symlink(i,f,g)}async lookup(i){throw new Error(`lookup is not implemented for: ${this.toStr(i)}`)}async close(i){let f=this.openFh.get(i.subFsFileDescriptor);f&&(await f.close(),this.openFh.delete(i.subFsFileDescriptor))}async dataSync(i){let f=this.openFh.get(i.subFsFileDescriptor);if(f)return await f.sync()}async read(i,f,g,o,n){let r=this.openFh.get(i.subFsFileDescriptor);if(r)return await r.read(f,g,o,n);throw new Error(`File handle not found: ${i.subFsFileDescriptor}`)}async fchmod(i,f){let g=this.openFh.get(i.subFsFileDescriptor);if(g)return await g.chmod(f)}async fchown(i,f,g){let o=this.openFh.get(i.subFsFileDescriptor);if(o)return await o.chown(f,g)}async write(i,f,g,o,n){let r=this.openFh.get(i.subFsFileDescriptor);if(r)return await r.write(f,g,o,n);throw new Error(`File handle not found: ${i.subFsFileDescriptor}`)}async ftruncate(i,f){let g=this.openFh.get(i.subFsFileDescriptor);if(g)return await g.truncate(f)}resolvePath(i){throw new Error(`resolvePath is not implemented: resolvePath(${i})`)}async fstat(i,f){let g=this.openFh.get(i.subFsFileDescriptor);if(g)return await g.stat(f);throw new Error(`File handle not found: ${i.subFsFileDescriptor}`)}async futimes(i,f,g){let o=this.openFh.get(i.subFsFileDescriptor);if(o)return await o.utimes(f,g)}async writev(i,f,g){let o=this.openFh.get(i.subFsFileDescriptor);if(o)return await o.writev(f,g??void 0);throw new Error(`File handle not found: ${i.subFsFileDescriptor}`)}async readv(i,f,g){let o=this.openFh.get(i.subFsFileDescriptor);if(o)return await o.readv(f,g??void 0);throw new Error(`File handle not found: ${i.subFsFileDescriptor}`)}async readFile(i,f){return typeof i=="string"||Buffer.isBuffer(i)?this.targetFs.readFile(i.toString(),f):super.readFile(i,f)}async writeFile(i,f,g){let o=typeof g=="object"&&g.flag?g.flag:"w",n=await this.targetFs.open(i,o);try{let r;if(typeof f=="string"){let u=typeof g=="object"&&g.encoding?g.encoding:"utf8";r=Buffer.from(f,u)}else Buffer.isBuffer(f)?r=f:r=Buffer.from(f);await n.write(r,0,r.length,0)}finally{await this.targetFs.close(n)}}},l(Ns,"yw"),Ns);e(JC,"PassThroughSubFs");var j5=JC,Gx=$t(vf(),1),Ds,YC=(Ds=class extends Of{constructor({name:i,parentFs:f,gitRoot:g,passThroughFs:o}){super({name:i,parentFs:f,gitRoot:g}),vt(this,"openFh",new Map),vt(this,"memFs",(0,Gx.createFsFromVolume)(new Gx.Volume)),vt(this,"targetFs"),this.compositFs=f,this.gitRoot=g,this.targetFs=o}async responsible(i){return!0}fileType(){return 4}async open(i,f,g){let o=Ea(i),n=await this.targetFs.promises.open(i,f,g);return this.openFh.set(n.fd,n),new Dd({fs:this,compositeFs:this.compositFs,subFsFileDescriptor:n.fd,parentFsFileDescriptors:[]})}async access(i,f){return await this.targetFs.promises.access(i,f)}async stat(i,...f){return this.targetFs.promises.stat(i,{bigint:!1})}async lstat(i,...f){return this.targetFs.promises.lstat(i,{bigint:!1})}async opendir(i,f){let g=await this.targetFs.promises.opendir(i,f);return new GC(this.compositFs,i.toString())}async link(i,f){return await this.targetFs.promises.link(i,f)}async mkdir(i,f){await this.targetFs.promises.mkdir(i,f)}async readdir(i,...f){return this.targetFs.promises.readdir(i,...f)}async readlink(i,...f){throw new Error("not implemented")}async unlink(i){return await this.targetFs.promises.unlink(i)}async rename(i,f){return await this.targetFs.promises.rename(i,f)}async rmdir(i,f){return await this.targetFs.promises.rmdir(i,f)}async symlink(i,f,g){return await this.targetFs.promises.symlink(i,f,g)}async lookup(i){throw new Error(`lookup is not implemented for: ${this.toStr(i)}`)}async close(i){let f=this.openFh.get(i.subFsFileDescriptor);f&&(this.openFh.delete(i.subFsFileDescriptor),await f.close())}async dataSync(i){let f=this.openFh.get(i.subFsFileDescriptor);if(f)return await f.sync()}async read(i,f,g,o,n){let r=this.openFh.get(i.subFsFileDescriptor);if(r)return await r.read(f,g,o,n);throw new Error(`File handle not found: ${i.subFsFileDescriptor}`)}async fchmod(i,f){let g=this.openFh.get(i.subFsFileDescriptor);if(g)return await g.chmod(f)}async fchown(i,f,g){let o=this.openFh.get(i.subFsFileDescriptor);if(o)return await o.chown(f,g)}async write(i,f,g,o,n){let r=this.openFh.get(i.subFsFileDescriptor);if(r)return await r.write(f,g,o,n);throw new Error(`File handle not found: ${i.subFsFileDescriptor}`)}async ftruncate(i,f){let g=this.openFh.get(i.subFsFileDescriptor);if(g)return await g.truncate(f)}resolvePath(i){throw new Error(`resolvePath is not implemented: resolvePath(${i})`)}async fstat(i,f){let g=this.openFh.get(i.subFsFileDescriptor);if(g)return await g.stat(f);throw new Error(`File handle not found: ${i.subFsFileDescriptor}`)}async futimes(i,f,g){let o=this.openFh.get(i.subFsFileDescriptor);if(o)return await o.utimes(f,g)}async writev(i,f,g){let o=this.openFh.get(i.subFsFileDescriptor);if(o)return await o.writev(f,g??void 0);throw new Error(`File handle not found: ${i.subFsFileDescriptor}`)}async readv(i,f,g){let o=this.openFh.get(i.subFsFileDescriptor);if(o)return await o.readv(f,g??void 0);throw new Error(`File handle not found: ${i.subFsFileDescriptor}`)}async readFile(i,f){return this.targetFs.promises.readFile(i,f)}async writeFile(i,f,g){return this.targetFs.promises.writeFile(i,f,g)}},l(Ds,"mw"),Ds);e(YC,"PassThroughToAsyncFsSubFs");var C5=YC,Us,ZC=(Us=class{constructor({name:i,parentFs:f,storageFs:g,gitRoot:o,defaultBranch:n="main"}){if(vt(this,"promises"),vt(this,"gitRoot"),vt(this,"ephemeralFilesFileSystem"),vt(this,"hiddenFilesFileSystem"),vt(this,"passThroughFileSystem"),vt(this,"subFilesystems",[]),vt(this,"parentFs"),vt(this,"name"),vt(this,"defaultBranch"),vt(this,"pathToFileDescriptors",new Map),vt(this,"openFileHandles",new Map),vt(this,"logOperation"),this.name=i,this.parentFs=f,this.gitRoot=o,this.defaultBranch=n,this.promises={access:this.access.bind(this),opendir:this.opendir.bind(this),mkdir:this.mkdir.bind(this),readdir:this.readdir.bind(this),open:this.open.bind(this),stat:this.stat.bind(this),lstat:this.lstat.bind(this),link:this.link.bind(this),readlink:this.readlink.bind(this),unlink:this.unlink.bind(this),rename:this.rename.bind(this),rmdir:this.rmdir.bind(this),symlink:this.symlink.bind(this),readFile:this.readFile.bind(this),writeFile:this.writeFile.bind(this),getFilehandle:this.getFilehandle.bind(this)},!f&&g){this.passThroughFileSystem=new C5({name:i+"-passthrough",passThroughFs:g,gitRoot:o,parentFs:this});return}if(!g&&f){this.passThroughFileSystem=new j5({name:i+"-passthrough",parentFs:this,gitRoot:o});return}throw new Error("invalid configuration")}getNextFileDescriptor(){let i=Array.from(this.openFileHandles.keys());return i.length===0?1:Math.max(...i)+1}setLoggger(i){this.logOperation=i}async logOperationOnFileDescsriptor(i,f,g){if(!this.logOperation)return;let o=[];for(let[n,r]of this.pathToFileDescriptors.entries())r.includes(i.fd)&&o.push(n);if(o.length!==0)return this.logOperation?.({fsName:i.delegate.name,fd:i,path:o[0],operation:f,operationArgs:g})}getFilehandle(i){return this.openFileHandles.get(i)}setEphemeralFilesSubFs(i){this.ephemeralFilesFileSystem=i}setHiddenFilesSubFs(i){this.hiddenFilesFileSystem=i}addSubFs(i){this.subFilesystems.push(i)}async getResponsibleFs(i){if(!i.toString().startsWith(this.gitRoot)&&this.gitRoot!=="./")throw new Error("tried to access a file ("+i+") outside of the legit folder: "+this.gitRoot);if(!this.hiddenFilesFileSystem)throw new Error(this.name+" intialize hidden fs first!");if(!this.ephemeralFilesFileSystem)throw new Error(this.name+" intialize ephemeral fs first!");if(await this.hiddenFilesFileSystem.responsible(i.toString()))return this.hiddenFilesFileSystem;if(await this.ephemeralFilesFileSystem.responsible(i.toString()))return this.ephemeralFilesFileSystem;for(let f of this.subFilesystems)if(await f.responsible(i.toString()))return f;return this.passThroughFileSystem}async access(i,f){let g=await this.getResponsibleFs(i);return await this.logOperation?.({fsName:g.name,path:i,operation:"access",operationArgs:{mode:f}}),g.access(i,f)}async opendir(i,f){await this.logOperation?.({fsName:this.name,path:i.toString(),operation:"opendir",operationArgs:{options:f}});let g=i.toString();if(!g.startsWith(this.gitRoot))throw new Error("tried to access a directory ("+g+") outside of the legit folder: "+this.gitRoot);return new GC(this,g)}async mkdir(i,f){let g=await this.getResponsibleFs(i);return await this.logOperation?.({fsName:g.name,path:i.toString(),operation:"mkdir",operationArgs:{options:f}}),g.mkdir(i,f)}async readdir(i,f){await this.logOperation?.({fsName:this.name,path:i.toString(),operation:"readdir",operationArgs:{options:f}});let g=new Set;for(let o of[...this.subFilesystems].reverse()){let n=await o.readdir(i,f);for(let r of n)await this.ephemeralFilesFileSystem?.responsible((i=="/"?"":i)+"/"+r)||g.add(r)}try{let o=await this.passThroughFileSystem.readdir(i,f);for(let n of o)await this.ephemeralFilesFileSystem?.responsible((i=="/"?"":i)+"/"+n)||g.add(n)}catch(o){if(o.code!=="ENOENT")throw new Error("error reading ephemeral fs: "+o)}try{let o=await this.ephemeralFilesFileSystem.readdir(i,f);for(let n of o)g.add(n)}catch(o){if(o.code!=="ENOENT")throw new Error("error reading ephemeral fs: "+o)}for(let o of g){let n=(i=="/"?"":i)+"/"+o;await this.hiddenFilesFileSystem.responsible(n)&&g.delete(o)}return Array.from(g)}async open(i,f,g){let o=await this.getResponsibleFs(i);await this.logOperation?.({fsName:o.name,path:i,operation:"open",operationArgs:{flags:f,mode:g}});let n=await o.open(i,f,g),r=this.getNextFileDescriptor();return n.realize(r),this.openFileHandles.set(r,n),this.pathToFileDescriptors.get(i)||this.pathToFileDescriptors.set(i,[]),this.pathToFileDescriptors.get(i).push(r),n}async close(i){try{await i.delegate.close(i)}catch(f){throw f}finally{for(let[f,g]of this.pathToFileDescriptors.entries()){let o=g.indexOf(i.fd);if(o!==-1){g.splice(o,1),g.length===0&&this.pathToFileDescriptors.delete(f);break}}this.openFileHandles.delete(i.fd)}}async stat(i,f){let g=i.toString(),o=await this.getResponsibleFs(i);return await this.logOperation?.({fsName:o.name,path:g,operation:"stat",operationArgs:{opts:f}}),o.stat(i)}async lstat(i,f){let g=await this.getResponsibleFs(i);return await this.logOperation?.({fsName:g.name,path:i.toString(),operation:"lstat",operationArgs:{opts:f}}),g.lstat(i,f)}async link(i,f){throw new Error("not implemented")}async readlink(i,f){throw new Error("not implemented")}async unlink(i){return(await this.getResponsibleFs(i)).unlink(i)}async rename(i,f){if(this.hiddenFilesFileSystem){if(await this.hiddenFilesFileSystem.responsible(Hx(i.toString())))throw new Error("Renaming of hidden Files is not allowed "+i);if(await this.hiddenFilesFileSystem.responsible(Hx(f.toString())))throw new Error("Renaming to hidden Files is not allowed "+f)}let g=await this.getResponsibleFs(i),o=await this.getResponsibleFs(f);if(g===o)return await this.logOperation?.({fsName:g.name,path:i.toString(),operation:"rename",operationArgs:{oldPath:i,newPath:f}}),g.rename(i,f);let n=await g.open(i.toString(),"r");try{let r=await g.fstat(n),u=Buffer.alloc(r.size);await g.read(n,u,0,r.size,0),await g.close(n),await o.writeFile(f.toString(),u,"utf8"),await g.unlink(i)}catch(r){try{await g.close(n)}catch{}throw r}}async rmdir(i,f){let g=await this.getResponsibleFs(i);return await this.logOperation?.({fsName:g.name,path:i.toString(),operation:"rmdir",operationArgs:{dirPath:i,options:f}}),g.rmdir(i,f)}async symlink(i,f,g){throw new Error("not implemented")}async readFile(i,f){await this.logOperation?.({fsName:this.name,path:i.toString(),operation:"readFile",operationArgs:{path:i,options:f}});let g=!0,o;if(typeof i=="number"){g=!1;let n=this.getFilehandle(i);if(!n)throw new Error("Invalid file descriptor");o=n}else if(typeof i=="string")o=await this.open(i,"r");else throw new Error("only filehandle and path are supported atm");try{let n=(await o.stat()).size;if(typeof n=="bigint"){if(n>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("File too large to read into buffer");n=Number(n)}let r=Buffer.alloc(n),{bytesRead:u}=await o.read(r,0,n,0);if(f&&typeof f.encoding=="string")return r.slice(0,u).toString(f.encoding);if(typeof f=="string"){if(f==="utf8"||f==="utf-8")return r.slice(0,u).toString(f);throw new Error("Unsupported encoding: "+f)}return r.slice(0,u)}finally{o&&g&&await o.close()}}async writeFile(i,f,g){await this.logOperation?.({fsName:this.name,path:i.toString(),operation:"writeFile",operationArgs:{data:f,options:g}});let o=typeof i!="number",n,r,u,p="w";if(typeof g=="string"?r=g:g&&typeof g=="object"&&(r=g.encoding,u=g.mode,p=g.flag||"w"),typeof i=="number"){let h=this.getFilehandle(i);if(!h)throw new Error("Invalid file descriptor");n=h}else if(typeof i=="string")n=await this.open(i,p,u);else throw new Error("only filehandle and path are supported atm");try{let h;if(typeof f=="string")h=Buffer.from(f,r||"utf8");else if(f instanceof Buffer)h=f;else if(f instanceof Uint8Array)h=Buffer.from(f);else throw new Error("Invalid data type for writeFile");let d=0;for(;d<h.length;){let{bytesWritten:m}=await n.write(h,d,h.length-d,d);d+=m}}finally{n&&o&&await n.close()}}},l(Us,"gw"),Us);e(ZC,"CompositeFs");var Vx=ZC,L5=$t(kP(),1),Ms,QC=(Ms=class extends Of{constructor({name:i,parentFs:f,gitRoot:g,hiddenFiles:o}){super({name:i,parentFs:f,gitRoot:g}),vt(this,"ig"),this.ig=(0,L5.default)(),this.ig.add(o)}async responsible(i){let f=i.replace(/\\/g,"/"),g=f.startsWith("./")?f.slice(2):f;return g=g.startsWith("/")?g.slice(1):g,g===""||g==="."?!1:this.ig.ignores(g)}fileType(){return 255}error(i){return new Error(`Access to hidden file is not allowed: ${this.toStr(i)}`)}async open(i,f,g){throw this.error(i)}async access(i){throw this.error(i)}async stat(i){throw this.error(i)}async lstat(i){throw this.error(i)}async opendir(i){throw this.error(i)}async link(i){throw this.error(i)}async mkdir(i){throw this.error(i)}async readdir(i){throw this.error(i)}async readlink(i){throw this.error(i)}async unlink(i){throw this.error(i)}async rename(i){throw this.error(i)}async rmdir(i){throw this.error(i)}async symlink(i,f){throw this.error(f)}async lookup(i){throw this.error(i)}resolvePath(i){throw new Error(`Access to hidden file is not allowed: resolvePath(${i})`)}async close(i){throw new Error("Access to hidden file is not allowed: close: "+i.subFsFileDescriptor)}async dataSync(i){throw new Error("Access to hidden file is not allowed: dataSync: "+i.subFsFileDescriptor)}async read(i,f,g,o,n){throw new Error("Access to hidden file is not allowed: readFileHandle: "+i.subFsFileDescriptor)}},l(Ms,"xw"),Ms);e(QC,"HiddenFileSubFs");var Kx=QC,Jx=$t(vf(),1),N5=$t(kP(),1),$s,XC=($s=class extends Of{constructor({name:i,parentFs:f,gitRoot:g,ephemeralPatterns:o}){super({name:i,parentFs:f,gitRoot:g}),vt(this,"openFh",new Map),vt(this,"memFs",(0,Jx.createFsFromVolume)(new Jx.Volume)),vt(this,"ig"),vt(this,"patterns"),this.compositFs=f,this.gitRoot=g,this.ig=(0,N5.default)(),this.ig.add(o),this.patterns=o}normalizePath(i){let f=typeof i=="string"?i:i.toString();return f.startsWith("/")?f:"/"+f}async responsible(i){let f=i.replace(/\\/g,"/"),g=f.startsWith("./")?f.slice(2):f;return g=g.startsWith("/")?g.slice(1):g,g===""||g==="."?!1:this.ig.ignores(g)}fileType(){return 5}async open(i,f,g){let o=this.normalizePath(i),n=Ea(o);n&&n!=="/"&&n!=="."&&await this.memFs.promises.mkdir(n,{recursive:!0});let r=await this.memFs.promises.open(o,f,g);return this.openFh.set(r.fd,r),new Dd({fs:this,compositeFs:this.compositFs,subFsFileDescriptor:r.fd,parentFsFileDescriptors:[r.fd]})}async access(i,f){let g=this.normalizePath(i);return await this.memFs.promises.access(g,f)}async stat(i,f){let g=this.normalizePath(i);return this.memFs.promises.stat(g,{bigint:!1})}async lstat(i,f){let g=this.normalizePath(i);return this.memFs.promises.lstat(g,{bigint:!1})}async opendir(i,f){let g=this.normalizePath(i);return await this.memFs.promises.opendir(g,f)}async link(i,f){let g=this.normalizePath(i),o=this.normalizePath(f);return await this.memFs.promises.link(g,o)}async mkdir(i,f){let g=this.normalizePath(i);if(!(typeof f=="object"&&f&&"recursive"in f&&f.recursive)){let o=Ea(g);if(o&&o!=="/"&&o!==".")try{await this.memFs.promises.stat(o)}catch{await this.memFs.promises.mkdir(o,{recursive:!0})}}await this.memFs.promises.mkdir(g,f)}async readdir(i,...f){let g=this.normalizePath(i),o=await this.memFs.promises.readdir(g,...f);return console.log("EPHEMERAL: READDIR: ",o),o}async readlink(i){throw new Error("readlink is not implemented for EphemeralFileSubFs")}async unlink(i){let f=this.normalizePath(i);return await this.memFs.promises.unlink(f)}async rename(i,f){let g=this.normalizePath(i),o=this.normalizePath(f);return await this.memFs.promises.rename(g,o)}async rmdir(i,f){let g=this.normalizePath(i);return await this.memFs.promises.rmdir(g,f)}async symlink(i,f,g){let o=this.normalizePath(i),n=this.normalizePath(f);return await this.memFs.promises.symlink(o,n,g)}async lookup(i){throw new Error(`lookup is not implemented for: ${this.toStr(i)}`)}async close(i){let f=this.openFh.get(i.subFsFileDescriptor);f&&(await f.close(),this.openFh.delete(i.subFsFileDescriptor))}async dataSync(i){let f=this.openFh.get(i.subFsFileDescriptor);if(f)return await f.datasync()}async read(i,f,g,o,n){let r=this.openFh.get(i.subFsFileDescriptor);if(r)return await r.read(f,g,o,n);throw new Error(`File handle not found: ${i.subFsFileDescriptor}`)}async fchmod(i,f){let g=this.openFh.get(i.subFsFileDescriptor);if(g)return await g.chmod(f)}async fchown(i,f,g){let o=this.openFh.get(i.subFsFileDescriptor);if(o)return await o.chown(f,g)}async write(i,f,g,o,n){let r=this.openFh.get(i.subFsFileDescriptor);if(r)return await r.write(f,g,o,n);throw new Error(`File handle not found: ${i.subFsFileDescriptor}`)}async ftruncate(i,f){let g=this.openFh.get(i.subFsFileDescriptor);if(g)return await g.truncate(f)}resolvePath(i){throw new Error(`resolvePath is not implemented: resolvePath(${i})`)}async fstat(i,f){let g=this.openFh.get(i.subFsFileDescriptor);if(g)return await g.stat(f);throw new Error(`File handle not found: ${i.subFsFileDescriptor}`)}async futimes(i,f,g){let o=this.openFh.get(i.subFsFileDescriptor);if(o)return await o.utimes(f,g)}async writev(i,f,g){let o=this.openFh.get(i.subFsFileDescriptor);if(o)return await o.writev(f,g??void 0);throw new Error(`File handle not found: ${i.subFsFileDescriptor}`)}async readv(i,f,g){let o=this.openFh.get(i.subFsFileDescriptor);if(o)return await o.readv(f,g??void 0);throw new Error(`File handle not found: ${i.subFsFileDescriptor}`)}async readFile(i,f){if(typeof i=="string"||Buffer.isBuffer(i)){let g=this.normalizePath(i);return this.memFs.promises.readFile(g,f)}return super.readFile(i,f)}async writeFile(i,f,g){let o=this.normalizePath(i),n=Ea(o);return n&&n!=="/"&&n!=="."&&await this.memFs.promises.mkdir(n,{recursive:!0}),this.memFs.promises.writeFile(o,f,g)}},l($s,"Ow"),$s);e(XC,"EphemeralSubFs");var Yx=XC,Zx=$t(hr(),1),Qx=$t(vf(),1),jm=$t(hr(),1),e4={type:"gitBranchesListVirtualFile",getStats:e(async({gitRoot:a,nodeFs:i})=>{let f=a+"/.git";try{return await i.stat(f)}catch{throw new Error(`ENOENT: no such file or directory, stat '${f}'`)}},"getStats"),getFile:e(async({gitRoot:a,nodeFs:i})=>{try{let f=(await jm.default.listBranches({fs:i,dir:a})).filter(n=>n.indexOf("/")===-1),g=await jm.default.currentBranch({fs:i,dir:a}),o=await Promise.all(f.map(async n=>{let r=await jm.default.resolveRef({fs:i,dir:a,ref:n});return n}));return{type:"directory",content:o,mode:493,size:o}}catch(f){throw f}},"getFile"),rename:e(async a=>{throw new Error("not implemented")},"rename"),mkdir:e(async function(a){throw new Error("not implemented")},"mkdir")},kt=$t(hr(),1),Tn=$t(hr(),1);async function zi(a,i,f){try{return await Tn.default.resolveRef({fs:a,dir:i,ref:`refs/heads/${f}`})}catch{return}}l(zi,"ci");e(zi,"tryResolveRef");async function pi({dir:a,fs:i,treeOid:f,deletePathParts:g,addPathParts:o,addObj:n,addKeepIfEmpty:r,deleteKeepIfNotEmpty:u,keepFilename:p=".keep"}){let[h,...d]=o??[],[m,...y]=g??[],w=[];if(f){let{tree:_}=await Tn.default.readTree({fs:i,dir:a,oid:f});w=[..._]}if(h===m){let _=h;if(_===void 0)throw new Error("illegal arguement - called with out a path part");if(d.length===0)throw new Error("can not move into it self");if(y.length===0)throw new Error("can not move from it self");let S=w.findIndex(P=>P.path===_),T=(S!==-1?w[S]:void 0)?.oid,O=await pi({dir:a,fs:i,treeOid:T,addPathParts:d,deletePathParts:y,addObj:n,addKeepIfEmpty:r,deleteKeepIfNotEmpty:u});if(O===void 0)throw new Error("on the same path we expect an update - respectivly a newly created subTreeOid");let E=!1;if(O!==T){E=!0;let P={mode:"040000",path:_,oid:O,type:"tree"};S!==-1?w[S]=P:w.push(P)}if(f==null&&!E)throw new Error("Illegal state - if the currentOid is undefined - a new tree should have been created (an update should have happened)");if(E)return await Tn.default.writeTree({fs:i,dir:a,tree:w});if(f===void 0)throw new Error("currentOid should be set - since the sub tree didn't exist and ");return f}else{let _=!1,S;if(m){let T=w.findIndex(E=>E.path===m),O=T!==-1?w[T]:void 0;if(O===void 0)throw new Error("Element doesnt exist in tree");if(y.length>0){if(O&&O.type!=="tree")throw new Error("SubPart of the path for the obj to delete is not a tree");let E=await pi({dir:a,fs:i,treeOid:O.oid,addPathParts:void 0,deletePathParts:y,addObj:n,addKeepIfEmpty:r,deleteKeepIfNotEmpty:u});if(E===O.oid)throw new Error("in case of a delete we expect a different subtree oid");_=!0,E===void 0?w.splice(T,1):w[T]={mode:"040000",path:m,oid:E,type:"tree"}}else if(_=!0,w.splice(T,1),w.length===0&&r){let E=new Uint8Array(0),P=await Tn.default.writeBlob({fs:i,dir:a,blob:E});w.push({mode:"100644",oid:P,path:p,type:"blob"})}S=O}if(h){let T=w.findIndex(E=>E.path===h),O=T!==-1?w[T]:void 0;if(d.length>0){if(O&&O.type!=="tree")throw new Error("SubPart of the path for the obj to add is not a tree");let E=await pi({dir:a,fs:i,treeOid:O?.oid,addPathParts:d,deletePathParts:void 0,addObj:n,addKeepIfEmpty:r,deleteKeepIfNotEmpty:u});if(E===void 0)throw new Error("in case we add, we expect an update - respectivly a newly created subTreeOid");if(E!==O?.oid){_=!0;let P={mode:"040000",path:h,oid:E,type:"tree"};if(T!==-1)w[T]=P;else if(w.push(P),u&&w.length>1){let A=w.findIndex(x=>x.path===p);A!==-1&&w.splice(A,1)}}}else{if(_=!0,n){let E={mode:n.type==="tree"?"040000":"100644",path:h,oid:n.oid,type:n.type};if(T!==-1)w[T]=E;else{if(u&&w.length>0){let P=w.findIndex(A=>A.path===p);P!==-1&&w.splice(P,1)}w.push(E)}}if(r&&w.length===0){let E=new Uint8Array(0),P=await Tn.default.writeBlob({fs:i,dir:a,blob:E});w.push({mode:"100644",oid:P,path:p,type:"blob"})}}}if(w.length===0)return;if(_)return await Tn.default.writeTree({fs:i,dir:a,tree:w});if(f===void 0)throw new Error("currentOid should be set - since the sub tree didn't exist and ");return f}}l(pi,"ui");e(pi,"buildUpdatedTree");async function Ps({filePath:a,gitRoot:i,nodeFs:f,commitSha:g,pathParams:o}){if(!o.filePath){let n=await Tn.default.readTree({fs:f,dir:i,oid:g});return{type:"tree",entries:n.tree.map(r=>r.path),oid:n.oid}}return(await Tn.default.walk({fs:f,dir:i,trees:[Tn.default.TREE({ref:g})],map:e(async(n,[r])=>{if(n===o.filePath&&r){let u=await r.type();if(u==="blob")return{type:"blob",oid:await r.oid()};if(u=="tree"){let p=await Tn.default.readTree({fs:f,dir:i,oid:await r.oid()});return{type:"tree",entries:p.tree.map(h=>h.path),oid:p.oid}}}},"map")})).find(n=>n!==void 0)}l(Ps,"la");e(Ps,"resolveGitObjAtPath");var Sa,t4=(Sa=class extends Error{constructor(i,f){super(i),vt(this,"code","ENOENT"),vt(this,"path"),this.name="ENOENTError",this.path=f,Object.setPrototypeOf(this,Sa.prototype)}},l(Sa,"Bd"),Sa);e(t4,"ENOENTError");var uE=t4,m2={type:"gitBranchFileVirtualFile",getStats:e(async({gitRoot:a,nodeFs:i,filePath:f,cacheFs:g,pathParams:o})=>{if(o.branchName===void 0)throw new Error("branchName should be in pathParams");let n=await zi(i,a,o.branchName);if(!n)throw new uE(`ENOENT: no such file or directory, stat '${f}'`,f);let r=await Ps({filePath:f,gitRoot:a,nodeFs:i,commitSha:n,pathParams:o});if(!r)throw new uE(`ENOENT: no such file or directory, stat '${f}'`,f);let u=await kt.default.readCommit({fs:i,dir:a,oid:n}),{commit:p}=u,h=await kt.default.log({fs:i,dir:a,ref:n,filepath:o.filePath,depth:1}),d=p.committer.timestamp*1e3,m=h.length>0?h[0].commit.committer.timestamp*1e3:d;if(r.type==="tree")return{mode:420,size:0,isFile:e(()=>!0,"isFile"),isDirectory:e(()=>!0,"isDirectory"),isSymbolicLink:e(()=>!1,"isSymbolicLink"),isBlockDevice:e(()=>!1,"isBlockDevice"),isCharacterDevice:e(()=>!1,"isCharacterDevice"),isSocket:e(()=>!1,"isSocket"),isFIFO:e(()=>!1,"isFIFO"),isFileSync:e(()=>!0,"isFileSync"),isDirectorySync:e(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:0,atimeMs:m,mtimeMs:m,ctimeMs:m,birthtimeMs:d,atime:new Date(m),mtime:new Date(m),ctime:new Date(m),birthtime:new Date(m)};{let{blob:y}=await kt.default.readBlob({fs:i,dir:a,oid:r.oid});return{mode:420,size:y.length,isFile:e(()=>!0,"isFile"),isDirectory:e(()=>!1,"isDirectory"),isSymbolicLink:e(()=>!1,"isSymbolicLink"),isBlockDevice:e(()=>!1,"isBlockDevice"),isCharacterDevice:e(()=>!1,"isCharacterDevice"),isSocket:e(()=>!1,"isSocket"),isFIFO:e(()=>!1,"isFIFO"),isFileSync:e(()=>!0,"isFileSync"),isDirectorySync:e(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:Math.ceil(y.length/4096),atimeMs:m,mtimeMs:m,ctimeMs:m,birthtimeMs:m,atime:new Date(m),mtime:new Date(m),ctime:new Date(m),birthtime:new Date(m)}}},"getStats"),getFile:e(async({filePath:a,gitRoot:i,nodeFs:f,cacheFs:g,pathParams:o})=>{if(o.branchName===void 0)throw new Error("branchName should be in pathParams");let n=[];try{let r=await zi(f,i,o.branchName);if(!r){let p=await kt.default.resolveRef({fs:f,dir:i,ref:"HEAD"});await kt.default.branch({fs:f,dir:i,ref:o.branchName,object:p}),r=await kt.default.resolveRef({fs:f,ref:`refs/heads/${o.branchName}`,dir:i})}let u=await Ps({filePath:a,gitRoot:i,nodeFs:f,commitSha:r,pathParams:o});if(!u)return;if(u.type==="blob"){let{blob:p}=await kt.default.readBlob({fs:f,dir:i,oid:u.oid});return{type:"file",content:Buffer.from(p),mode:420,size:p.length,oid:u.oid}}else{let p=[];try{let h=await g.promises.stat(a);if(h&&h.isDirectory()){let d=await g.promises.readdir(a,{withFileTypes:!1,encoding:"utf-8"});p.push(...d)}}catch{}return{type:"directory",content:Array.from(new Set([...p,...u.entries])),mode:493}}}catch{return}},"getFile"),unlink:e(async({filePath:a,gitRoot:i,nodeFs:f,cacheFs:g,pathParams:o,author:n})=>{if(!o.branchName)throw new Error("branchName should be in pathParams");if(!o.filePath)throw new Error("filePath should be in pathParams");let r=await kt.default.resolveRef({fs:f,dir:i,ref:o.branchName}),u=await kt.default.readTree({fs:f,dir:i,oid:r}),p=await pi({dir:i,fs:f,treeOid:u.oid,deletePathParts:o.filePath.split("/"),addPathParts:void 0,addObj:void 0,deleteKeepIfNotEmpty:!1,addKeepIfEmpty:!0,keepFilename:".keep"});if(p!==u.oid){let h=await kt.default.commit({fs:f,dir:i,message:`Delete ${o.filePath}`,tree:p,noUpdateBranch:!0,parent:[r],author:n});await kt.default.writeRef({fs:f,dir:i,ref:`refs/heads/${o.branchName}`,value:h,force:!0})}},"unlink"),writeFile:e(async({filePath:a,gitRoot:i,nodeFs:f,content:g,cacheFs:o,pathParams:n,author:r})=>{if(n.branchName===void 0)throw new Error("branchName should be in pathParams");if(n.filePath===void 0)throw new Error("filePath should be in pathParams");let u;typeof g=="string"?u=new TextEncoder().encode(g):u=new Uint8Array(g);let p=await kt.default.writeBlob({fs:f,dir:i,blob:u}),h=await zi(f,i,n.branchName);if(!h){let y=await kt.default.resolveRef({fs:f,dir:i,ref:"HEAD"});await kt.default.branch({fs:f,dir:i,ref:n.branchName,object:y}),h=await kt.default.resolveRef({fs:f,dir:i,ref:`refs/heads/${n.branchName}`})}let d=await kt.default.readTree({fs:f,dir:i,oid:h}),m=await pi({dir:i,fs:f,treeOid:d.oid,deletePathParts:void 0,addPathParts:n.filePath.split("/"),addObj:{type:"blob",oid:p},deleteKeepIfNotEmpty:!0,addKeepIfEmpty:!1,keepFilename:".keep"});if(m!==d.oid){let y=await kt.default.commit({fs:f,dir:i,message:`\u{1F4BE} Change '${n.filePath}'`,tree:m,noUpdateBranch:!0,parent:[h],author:r});await kt.default.writeRef({fs:f,dir:i,ref:`refs/heads/${n.branchName}`,value:y,force:!0})}},"writeFile"),rename:e(async function({filePath:a,newPath:i,gitRoot:f,nodeFs:g,pathParams:o,newPathParams:n,author:r}){if(o.branchName===void 0)throw new Error("branchName should be in pathParams");if(o.filePath===void 0)throw new Error("filePath should be in pathParams");if(n.branchName===void 0)throw new Error("branchName should be in newPathParams");if(n.filePath===void 0)throw new Error("filePath should be in newPathParams");let u=await zi(g,f,o.branchName);if(!u)throw new Error("Invalid branch file path - source branch must exist");let p=await zi(g,f,n.branchName);if(!p){let y=await kt.default.resolveRef({fs:g,dir:f,ref:"HEAD"});await kt.default.branch({fs:g,dir:f,ref:n.branchName,object:y}),p=await kt.default.resolveRef({fs:g,dir:f,ref:`refs/heads/${n.branchName}`})}if(n.branchName!==o.branchName)throw new Error("cross branch move not implemented yet");let h=await Ps({gitRoot:f,nodeFs:g,commitSha:u,filePath:a,pathParams:o});if(h===void 0)throw new Error("no obj at path exists");let d=await pi({dir:f,fs:g,deletePathParts:o.filePath.split("/"),addPathParts:n.filePath.split("/"),addObj:h,treeOid:p,addKeepIfEmpty:!0,deleteKeepIfNotEmpty:!0}),m=await kt.default.readTree({fs:g,dir:f,oid:u});if(d!==m.oid){let y=await kt.default.commit({fs:g,dir:f,message:`\u{1F500} Rename '${o.filePath}' to '${n.filePath}'`,tree:d,noUpdateBranch:!0,parent:[p],author:r});await kt.default.writeRef({fs:g,dir:f,ref:`refs/heads/${n.branchName}`,value:y,force:!0})}},"rename"),mkdir:e(async function(a){if(a.pathParams.branchName===void 0)throw new Error("branchName should be in pathParams");if(a.pathParams.filePath===void 0)throw new Error("filePath should be in pathParams");try{throw await m2.getStats(a),new Error("Folder exists")}catch{}a.filePath.endsWith("/")&&(a.filePath=a.filePath.replace(/\/+$/,"")),a.pathParams&&typeof a.pathParams.filePath=="string"&&(a.pathParams.filePath=a.pathParams.filePath.replace(/\/+$/,""));let i=await zi(a.nodeFs,a.gitRoot,a.pathParams.branchName);if(!i){let r=await kt.default.resolveRef({fs:a.nodeFs,dir:a.gitRoot,ref:"HEAD"});await kt.default.branch({fs:a.nodeFs,dir:a.gitRoot,ref:a.pathParams.branchName,object:r}),i=await kt.default.resolveRef({fs:a.nodeFs,dir:a.gitRoot,ref:`refs/heads/${a.pathParams.branchName}`})}let f=await kt.default.readTree({fs:a.nodeFs,dir:a.gitRoot,oid:i}),g=new Uint8Array(0),o=await kt.default.writeBlob({fs:a.nodeFs,dir:a.gitRoot,blob:g}),n=await pi({dir:a.gitRoot,fs:a.nodeFs,treeOid:f.oid,deletePathParts:void 0,addPathParts:[...a.pathParams.filePath.split("/"),".keep"],addObj:{type:"blob",oid:o},deleteKeepIfNotEmpty:!0,addKeepIfEmpty:!0,keepFilename:".keep"});if(n!==f.oid){let r=await kt.default.commit({fs:a.nodeFs,dir:a.gitRoot,message:`\u{1F4BE} Change '${a.pathParams.filePath}'`,tree:n,noUpdateBranch:!0,parent:[i],author:a.author});await kt.default.writeRef({fs:a.nodeFs,dir:a.gitRoot,ref:`refs/heads/${a.pathParams.branchName}`,value:r,force:!0})}},"mkdir"),rmdir:e(async({filePath:a,gitRoot:i,nodeFs:f,cacheFs:g,pathParams:o,author:n})=>{if(!o.branchName)throw new Error("branchName should be in pathParams");if(!o.filePath)throw new Error("filePath should be in pathParams");let r=await kt.default.resolveRef({fs:f,dir:i,ref:o.branchName}),u=await kt.default.readTree({fs:f,dir:i,oid:r}),p=await pi({dir:i,fs:f,treeOid:u.oid,deletePathParts:o.filePath.split("/"),addPathParts:void 0,addObj:void 0,deleteKeepIfNotEmpty:!1,addKeepIfEmpty:!0,keepFilename:".keep"});if(p!==u.oid){let h=await kt.default.commit({fs:f,dir:i,message:`Delete ${o.filePath}`,tree:p,noUpdateBranch:!0,parent:[r],author:n});await kt.default.writeRef({fs:f,dir:i,ref:`refs/heads/${o.branchName}`,value:h,force:!0})}},"rmdir")},Xo=$t(hr(),1),r4={type:"gitBranchHeadVirtualFile",getStats:e(async({gitRoot:a,nodeFs:i,pathParams:f})=>{if(f.branchName===void 0)throw new Error("branchName should be in pathParams");let g;try{g=await Xo.default.resolveRef({fs:i,dir:a,ref:f.branchName})}catch{g=await Xo.default.resolveRef({fs:i,dir:a,ref:`refs/heads/${f.branchName}`})}let o=await Xo.default.readCommit({fs:i,dir:a,oid:g}),{commit:n}=o,r=n.committer.timestamp*1e3;return{mode:420,size:40,isFile:e(()=>!0,"isFile"),isDirectory:e(()=>!1,"isDirectory"),isSymbolicLink:e(()=>!1,"isSymbolicLink"),isBlockDevice:e(()=>!1,"isBlockDevice"),isCharacterDevice:e(()=>!1,"isCharacterDevice"),isSocket:e(()=>!1,"isSocket"),isFIFO:e(()=>!1,"isFIFO"),isFileSync:e(()=>!0,"isFileSync"),isDirectorySync:e(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:Math.ceil(40/4096),atimeMs:r,mtimeMs:r,ctimeMs:r,birthtimeMs:r,atime:new Date(r),mtime:new Date(r),ctime:new Date(r),birthtime:new Date(r)}},"getStats"),getFile:e(async({gitRoot:a,nodeFs:i,pathParams:f})=>{if(f.branchName===void 0)throw new Error("branchName should be in pathParams");try{let g;try{g=await Xo.default.resolveRef({fs:i,dir:a,ref:f.branchName})}catch{g=await Xo.default.resolveRef({fs:i,dir:a,ref:`refs/heads/${f.branchName}`})}return{type:"file",content:g+`
|
|
138
|
-
`,mode:420,size:g.length}}catch{return}},"getFile"),writeFile:e(async({filePath:a,gitRoot:i,nodeFs:f,content:g,cacheFs:o,pathParams:n})=>{if(console.log("gitBranchHeadVirtualFile writeFile called",{pathParams:n,content:g}),n.branchName===void 0)throw new Error("branchName should be in pathParams");let r=g.toString().trim();try{await Xo.default.readCommit({fs:f,dir:i,oid:r})}catch{throw new Error(`Commit ${r} does not exist in the repository`)}await Xo.default.writeRef({fs:f,dir:i,ref:"refs/heads/"+n.branchName,value:r,force:!0})},"writeFile"),rename(a){throw new Error("not implementsd")},mkdir:e(async function(a){throw new Error("not implemented")},"mkdir")},D5=$t(hr(),1),U5={type:"gitBranchTipVirtualFile",getStats:e(async a=>{let i=a.gitRoot+"/.git";try{return await a.nodeFs.stat(i)}catch{throw new Error(`ENOENT: no such file or directory, stat '${i}'`)}},"getStats"),getFile:e(async({filePath:a,gitRoot:i,nodeFs:f,pathParams:g})=>{if(!g.branchName)throw new Error("branchName should be in pathParams");try{let o=await D5.default.resolveRef({fs:f,dir:i,ref:`refs/heads/${g.branchName}`});return{type:"file",content:o+`
|
|
139
|
-
`,mode:420,size:o.length+1}}catch{return}},"getFile"),rename(a){throw new Error("not implementsd")},mkdir:e(async function(a){throw new Error("not implemented")},"mkdir")},Cm=$t(hr(),1),n4={type:"gitCommitFileVirtualFile",getStats:e(async({filePath:a,gitRoot:i,nodeFs:f,pathParams:g})=>{if(!g.sha_1_1_2)throw new Error("sha_1_1_2 should be in pathParams");if(!g.sha1_3__40)throw new Error("sha1_3__40 should be in pathParams");let o=g.sha_1_1_2+g.sha1_3__40,n=await Ps({filePath:a,gitRoot:i,nodeFs:f,commitSha:o,pathParams:g});if(!n)throw new uE(`ENOENT: no such file or directory, stat '${a}'`,a);let r=await Cm.default.readCommit({fs:f,dir:i,oid:o}),{commit:u}=r,p=u.committer.timestamp*1e3;if(n.type==="tree")return{mode:420,size:0,isFile:e(()=>!0,"isFile"),isDirectory:e(()=>!0,"isDirectory"),isSymbolicLink:e(()=>!1,"isSymbolicLink"),isBlockDevice:e(()=>!1,"isBlockDevice"),isCharacterDevice:e(()=>!1,"isCharacterDevice"),isSocket:e(()=>!1,"isSocket"),isFIFO:e(()=>!1,"isFIFO"),isFileSync:e(()=>!0,"isFileSync"),isDirectorySync:e(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:0,atimeMs:p,mtimeMs:p,ctimeMs:p,birthtimeMs:p,atime:new Date(p),mtime:new Date(p),ctime:new Date(p),birthtime:new Date(p)};{let{blob:h}=await Cm.default.readBlob({fs:f,dir:i,oid:n.oid});return{mode:420,size:h.length,isFile:e(()=>!0,"isFile"),isDirectory:e(()=>!1,"isDirectory"),isSymbolicLink:e(()=>!1,"isSymbolicLink"),isBlockDevice:e(()=>!1,"isBlockDevice"),isCharacterDevice:e(()=>!1,"isCharacterDevice"),isSocket:e(()=>!1,"isSocket"),isFIFO:e(()=>!1,"isFIFO"),isFileSync:e(()=>!0,"isFileSync"),isDirectorySync:e(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:Math.ceil(h.length/4096),atimeMs:p,mtimeMs:p,ctimeMs:p,birthtimeMs:p,atime:new Date(p),mtime:new Date(p),ctime:new Date(p),birthtime:new Date(p)}}},"getStats"),getFile:e(async({filePath:a,gitRoot:i,nodeFs:f,pathParams:g})=>{if(!g.sha_1_1_2)throw new Error("sha_1_1_2 should be in pathParams");if(!g.sha1_3__40)throw new Error("sha1_3__40 should be in pathParams");let o=g.sha_1_1_2+g.sha1_3__40;try{let n=await Ps({filePath:a,gitRoot:i,nodeFs:f,commitSha:o,pathParams:g});if(!n)return;if(n.type==="blob"){let{blob:r}=await Cm.default.readBlob({fs:f,dir:i,oid:n.oid});return{type:"file",content:Buffer.from(r),mode:420,size:r.length,oid:n.oid}}else return{type:"directory",content:Array.from(new Set([...n.entries.filter(r=>r!==".keep")])),mode:493}}catch{return}},"getFile"),rename(a){throw new Error("not implementsd")},mkdir:e(async function(a){throw new Error("not implemented")},"mkdir")},Lm=$t(hr(),1);function i4(a,i,f){return a===0&&i===2&&f===0?"untracked":a===1&&i===0&&f===0?"deleted":a===1&&i===2&&f!==0?"modified":a===0&&i===2&&f===2?"added":"unknown"}l(i4,"nX");e(i4,"getFileStatus");var M5={type:"gitStatusVirtualFile",getStats:e(async a=>{let i=a.gitRoot+"/.git";try{return await a.nodeFs.stat(i)}catch{throw new Error(`ENOENT: no such file or directory, stat '${i}'`)}},"getStats"),getFile:e(async({gitRoot:a,nodeFs:i})=>{try{let f=await Lm.default.currentBranch({fs:i,dir:a})||"HEAD",g=await Lm.default.resolveRef({fs:i,dir:a,ref:"HEAD"}),o=(await Lm.default.statusMatrix({fs:i,dir:a})).filter(([,r,u,p])=>r!==u||u!==p).map(([r,u,p,h])=>({path:r,status:i4(u,p,h)})),n=JSON.stringify({branch:f,commit:g,clean:o.length===0,files:o},null,2);return{type:"file",content:n,mode:33188,size:Buffer.byteLength(n)}}catch(f){throw console.error(f),f}},"getFile"),rename(a){throw new Error("not implementsd")},mkdir:e(async function(a){throw new Error("not implemented")},"mkdir")},cE={type:"legitVirtualFile",getStats:e(async({gitRoot:a,nodeFs:i})=>{let f=a+"/.git";try{return await i.stat(f)}catch{throw new Error(`ENOENT: no such file or directory, stat '${f}'`)}},"getStats"),getFile:e(async({gitRoot:a,nodeFs:i})=>({type:"directory",content:[],mode:493,size:0}),"getFile"),rename(a){throw new Error("not implementsd")},mkdir:e(async function(a){throw new Error("not implemented")},"mkdir")},$5=[cE,M5,n4,e4,m2,r4,U5],Ws,o4=(Ws=class{constructor(i){this.routes=i,vt(this,"compiledRoutes");let f={},g=e((o,n)=>{if(typeof o.type=="string"){f[n]={handler:o,siblings:[]};let r=o}else{let r=[];for(let[u,p]of Object.entries(o))if(u==="."){if(f[n])throw new Error(`Conflict: multiple handlers for path '${n}', '.' and optional '[[parameter_name]]' defined?`);f[n]={handler:p,siblings:r}}else if(u.startsWith("[[")&&u.endsWith("]]")){if(f[n])throw new Error(`Conflict: multiple handlers for path '${n}', '.' and optional '[[parameter_name]]' defined?`);f[n]={handler:p,siblings:r},u.startsWith("[[...")?f[n?`${n}/${u}`:u]={handler:p,siblings:[]}:g(p,n?`${n}/${u}`:u)}else u.startsWith("[")&&u.endsWith("]")?u.startsWith("[...")?f[n?`${n}/${u}`:u]={handler:p,siblings:[]}:g(p,n?`${n}/${u}`:u):(r.push(u),g(p,n?`${n}/${u}`:u))}},"walk");for(let[o,n]of Object.entries(i))g(n,o);this.compiledRoutes=Object.entries(f).map(([o,n])=>{let r=[],u=o.split("/").map(p=>{if(p.startsWith("[[")&&p.endsWith("]]")){let h=p.slice(2,-2).replace(/^\.\.\./,"");return r.push(h),"(.*)"}if(p.startsWith("[")&&p.endsWith("]")){let h=p.slice(1,-1);return r.push(h),"([^/]+)"}return p.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}).join("/");return{regex:new RegExp(`^${u}$`),paramNames:r,staticSiblings:n.siblings,handler:n.handler}})}match(i){i.length>1&&i.endsWith("/")&&(i=i.replace(/\/+$/,""));for(let{regex:f,paramNames:g,handler:o,staticSiblings:n}of this.compiledRoutes){let r=i.match(f);if(!r)continue;let u={};for(let p=0;p<g.length;p++)u[g[p]]=decodeURIComponent(r[p+1]||"");return{handler:o,params:u,staticSiblings:n}}}},l(Ws,"Dv"),Ws);e(o4,"LegitPathRouter");var W5=o4,Nm=$t(hr(),1),Xx={type:"gitCommitVirtualFolder",getStats:e(async a=>{let i=a.gitRoot+"/.git";try{return await a.nodeFs.stat(i)}catch{throw new Error(`ENOENT: no such file or directory, stat '${i}'`)}},"getStats"),getFile:e(async({filePath:a,gitRoot:i,nodeFs:f,pathParams:g})=>{let o=await Nm.default.listBranches({fs:f,dir:i}),n=new Set,r=new Set;for(let h of o){let d=`refs/heads/${h}`;try{let m=await Nm.default.resolveRef({fs:f,dir:i,ref:d});n.add(m)}catch{}}for(let h of n){let d=await Nm.default.log({fs:f,dir:i,ref:h});for(let m of d)r.add(m.oid)}if(!g.sha_1_1_2){let h=new Set;for(let m of r)if(h.add(m.slice(0,2)),h.size>=256)break;let d=Array.from(h).sort();return{type:"directory",content:d,mode:493,size:d}}let u=new Set;for(let h of r)h.startsWith(g.sha_1_1_2)&&u.add(h.slice(2,40));let p=Array.from(u).sort();return{type:"directory",content:p,mode:493,size:p.length}},"getFile"),rename(a){throw new Error("not implementsd")},mkdir:e(async function(a){throw new Error("not implemented")},"mkdir")},Gr=$t(hr(),1),z5=$t(hr(),1),a4="-operation";async function rn(a,i,f){return(await z5.default.listBranches({fs:a,dir:i})).filter(g=>g.endsWith("__"+f+a4))[0]}l(rn,"ur");e(rn,"resolveOperationBranchName");var H5={type:"gitBranchOperationVirtualFile",getStats:e(async a=>{let{gitRoot:i,nodeFs:f,pathParams:g}=a,o;try{o=await Gr.default.resolveRef({fs:f,dir:i,ref:`refs/heads/${g.branchName}`})}catch{throw new Error(`Base Branch ${g.branchName} for operations does not exis`)}let n=await rn(f,i,g.branchName),r=!1;if(n)try{o=await Gr.default.resolveRef({fs:f,dir:i,ref:n}),r=!0}catch{try{o=await Gr.default.resolveRef({fs:f,dir:i,ref:`refs/heads/${n}`}),r=!0}catch{}}let u=await Gr.default.readCommit({fs:f,dir:i,oid:o}),{commit:p}=u,h=p.committer.timestamp*1e3;try{return{mode:420,size:40,atimeMs:h,mtimeMs:h,ctimeMs:h,birthtimeMs:h,atime:new Date(h),mtime:new Date(h),ctime:new Date(h),birthtime:new Date(h),isFile:e(()=>!0,"isFile"),isDirectory:e(()=>!1,"isDirectory"),isSymbolicLink:e(()=>!1,"isSymbolicLink"),isBlockDevice:e(()=>!1,"isBlockDevice"),isCharacterDevice:e(()=>!1,"isCharacterDevice"),isSocket:e(()=>!1,"isSocket"),isFIFO:e(()=>!1,"isFIFO"),isFileSync:e(()=>!0,"isFileSync"),isDirectorySync:e(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:0}}catch{throw new Error("ENOENT: no such file or directory, stat operationHistory")}},"getStats"),getFile:e(async a=>{let{gitRoot:i,nodeFs:f,pathParams:g}=a,o=await rn(f,i,g.branchName),n,r=!1;return o?(n=await Gr.default.resolveRef({fs:f,dir:i,ref:`refs/heads/${o}`}),r=!0):n=await Gr.default.resolveRef({fs:f,dir:i,ref:`refs/heads/${g.branchName}`}),{type:"file",content:Buffer.from(n),mode:420,size:n.length}},"getFile"),writeFile:e(async({filePath:a,gitRoot:i,nodeFs:f,content:g,cacheFs:o,pathParams:n,author:r})=>{if(n.branchName===void 0)throw new Error("branchName should be in pathParams");let u;typeof g=="string"?u=new TextEncoder().encode(g):u=new Uint8Array(g);let p=await Gr.default.writeBlob({fs:f,dir:i,blob:u}),h=await zi(f,i,n.branchName);if(!h)throw new Error("Invalid branch file path - branch doesn't exist");let d=await rn(f,i,n.branchName),m=!1;d||(d="legit/__"+n.branchName+a4,await Gr.default.branch({fs:f,dir:i,ref:d,object:h}),m=!0);let y=await Gr.default.resolveRef({fs:f,dir:i,ref:`refs/heads/${d}`}),w=await Gr.default.readTree({fs:f,dir:i,oid:h}),_;g instanceof ArrayBuffer?_=Buffer.from(g).toString("utf-8"):typeof g=="string"?_=g:g instanceof Uint8Array?_=Buffer.from(g).toString("utf-8"):_=String(g);let S=!1;if(!m){let O=await Gr.default.findMergeBase({fs:f,dir:i,oids:S?[y]:[y,h]});O.length===1&&O[0]===h&&(S=!0)}let T=await Gr.default.commit({fs:f,dir:i,message:_,tree:w.oid,noUpdateBranch:!0,author:r,parent:S?m?[h,h]:[y]:[y,h]});await Gr.default.writeRef({fs:f,dir:i,ref:`refs/heads/${d}`,value:T,force:!0})},"writeFile"),rename:e(async function({filePath:a,newPath:i,gitRoot:f,nodeFs:g,pathParams:o,newPathParams:n}){throw new Error("not implemented")},"rename"),mkdir:e(async function(a){throw new Error("not implemented")},"mkdir")},ps=$t(hr(),1),s4={type:"gitBranchOperationsVirtualFile",getStats:e(async a=>{let{gitRoot:i,nodeFs:f,pathParams:g}=a;if(g.branchName===void 0)throw new Error("branchName should be in pathParams");let o=await rn(f,i,g.branchName),n,r=!1;if(o)try{n=await ps.default.resolveRef({fs:f,dir:i,ref:o}),r=!0}catch{try{n=await ps.default.resolveRef({fs:f,dir:i,ref:`refs/heads/${o}`}),r=!0}catch{throw new Error(`Base Branch ${g.branchName} for operations does not exis`)}}else try{n=await ps.default.resolveRef({fs:f,dir:i,ref:`refs/heads/${g.branchName}`})}catch{throw new Error(`Base Branch ${g.branchName} for operations does not exis`)}let u=await ps.default.readCommit({fs:f,dir:i,oid:n}),{commit:p}=u,h=p.committer.timestamp*1e3;try{return{mode:420,size:(r?await s4.getFile(a):void 0)?.content?.length??0,atimeMs:h,mtimeMs:h,ctimeMs:h,birthtimeMs:h,atime:new Date(h),mtime:new Date(h),ctime:new Date(h),birthtime:new Date(h),isFile:e(()=>!0,"isFile"),isDirectory:e(()=>!1,"isDirectory"),isSymbolicLink:e(()=>!1,"isSymbolicLink"),isBlockDevice:e(()=>!1,"isBlockDevice"),isCharacterDevice:e(()=>!1,"isCharacterDevice"),isSocket:e(()=>!1,"isSocket"),isFIFO:e(()=>!1,"isFIFO"),isFileSync:e(()=>!0,"isFileSync"),isDirectorySync:e(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:0}}catch{throw new Error("ENOENT: no such file or directory, stat operationHistory")}},"getStats"),getFile:e(async a=>{let{gitRoot:i,nodeFs:f,pathParams:g}=a,o=await rn(f,i,g.branchName),n=[];if(o){let p=await ps.default.resolveRef({fs:f,dir:i,ref:`refs/heads/${o}`}),h=!1,d=p;for(;d&&!h;){let m=await ps.default.readCommit({fs:f,dir:i,oid:d});n.push({oid:m.oid,parentOids:m.commit.parent,message:m.commit.message,originBranchOid:"unset"}),d=m.commit.parent&&m.commit.parent.length>0?m.commit.parent[0]:null,m.commit.parent.length===2&&m.commit.parent[0]===m.commit.parent[1]&&(h=!0)}}let r;for(let p=n.length-1;p>=0;p--){let h=n[p];if(r===void 0){if(h.parentOids.length!==2&&h.parentOids[0]!==h.parentOids[1])throw new Error(`Operation commit ${h.oid} does not have two parents as expected`);r=h.parentOids[1]}h.parentOids.length===2&&(r=h.parentOids[1]),h.originBranchOid=r}let u=Buffer.from(JSON.stringify(n,null,2),"utf-8");return{type:"file",content:u,mode:420,size:u.length}},"getFile"),rename:e(async function(a){throw new Error("not implemented")},"rename"),mkdir:e(async function(a){throw new Error("not implemented")},"mkdir")},Al=$t(hr(),1),q5=new Set([" ","~","^",":","?","*","[","\\"]),G5=[/^\/|\/$/,/\/\//,/\.$/,/\.lock$/,/^@$/,/@\{/],l4="\u2002";function hE(a){let i=a.codePointAt(0);return!(i>=0&&i<=31||i===127||q5.has(a))}l(hE,"nB");e(hE,"isValidChar");function f4(a){let i="";for(let f of a)f===" "?i+=l4:hE(f)?i+=f:i+="%"+f.codePointAt(0);for(let f of G5)if(f.test(i))return Array.from(i).map(g=>hE(g)?g:"%"+g.codePointAt(0)).join("");return i}l(f4,"oB");e(f4,"encodeName");function u4(a){return a.replace(/%(\d+)/g,(i,f)=>String.fromCodePoint(parseInt(f,10))).replace(new RegExp(l4,"g")," ")}l(u4,"aB");e(u4,"decodeName");var V5={type:"getThreadName",getStats:e(async a=>{let{gitRoot:i,nodeFs:f,pathParams:g}=a,o;try{o=await Al.default.resolveRef({fs:f,dir:i,ref:`refs/heads/${g.branchName}`})}catch{throw new Error(`Base Branch ${g.branchName} for operations does not exis`)}let n=await rn(f,i,g.branchName),r=!1;if(n)try{o=await Al.default.resolveRef({fs:f,dir:i,ref:n}),r=!0}catch{try{o=await Al.default.resolveRef({fs:f,dir:i,ref:`refs/heads/${n}`}),r=!0}catch{}}let u=await Al.default.readCommit({fs:f,dir:i,oid:o}),{commit:p}=u,h=p.committer.timestamp*1e3;try{return{mode:420,size:40,atimeMs:h,mtimeMs:h,ctimeMs:h,birthtimeMs:h,atime:new Date(h),mtime:new Date(h),ctime:new Date(h),birthtime:new Date(h),isFile:e(()=>!0,"isFile"),isDirectory:e(()=>!1,"isDirectory"),isSymbolicLink:e(()=>!1,"isSymbolicLink"),isBlockDevice:e(()=>!1,"isBlockDevice"),isCharacterDevice:e(()=>!1,"isCharacterDevice"),isSocket:e(()=>!1,"isSocket"),isFIFO:e(()=>!1,"isFIFO"),isFileSync:e(()=>!0,"isFileSync"),isDirectorySync:e(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:0}}catch{throw new Error("ENOENT: no such file or directory, stat operationHistory")}},"getStats"),getFile:e(async a=>{let{gitRoot:i,nodeFs:f,pathParams:g}=a,o=await rn(f,i,g.branchName),n;if(o){let r="legit/",u=`__${g.branchName}-operation`;return o.startsWith(r)&&o.endsWith(u)?n=o.slice(r.length,o.length-u.length):n=o,{type:"file",content:Buffer.from(u4(n)),mode:420,size:n.length}}return{type:"file",content:Buffer.from(""),mode:420,size:0}},"getFile"),writeFile:e(async({filePath:a,gitRoot:i,nodeFs:f,content:g,cacheFs:o,pathParams:n})=>{if(n.branchName===void 0)throw new Error("branchName should be in pathParams");let r=await rn(f,i,n.branchName);if(r){let u=`legit/${f4(g.toString())}__${n.branchName}-operation`;await Al.default.renameBranch({fs:f,dir:i,oldref:r,ref:u}),r=u}},"writeFile"),rename:e(async function({filePath:a,newPath:i,gitRoot:f,nodeFs:g,pathParams:o,newPathParams:n}){throw new Error("not implemented")},"rename"),mkdir:e(async function(a){throw new Error("not implemented")},"mkdir")},Rl=$t(hr(),1),K5={type:"gitBranchHistory",getStats:e(async({gitRoot:a,nodeFs:i,pathParams:f})=>{if(f.branchName===void 0)throw new Error("branchName should be in pathParams");let g;try{g=await Rl.default.resolveRef({fs:i,dir:a,ref:f.branchName})}catch{g=await Rl.default.resolveRef({fs:i,dir:a,ref:`refs/heads/${f.branchName}`})}let o=await Rl.default.readCommit({fs:i,dir:a,oid:g}),{commit:n}=o,r=n.committer.timestamp*1e3;return{mode:420,size:1e5,isFile:e(()=>!0,"isFile"),isDirectory:e(()=>!1,"isDirectory"),isSymbolicLink:e(()=>!1,"isSymbolicLink"),isBlockDevice:e(()=>!1,"isBlockDevice"),isCharacterDevice:e(()=>!1,"isCharacterDevice"),isSocket:e(()=>!1,"isSocket"),isFIFO:e(()=>!1,"isFIFO"),isFileSync:e(()=>!0,"isFileSync"),isDirectorySync:e(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:Math.ceil(40/4096),atimeMs:r,mtimeMs:r,ctimeMs:r,birthtimeMs:r,atime:new Date(r),mtime:new Date(r),ctime:new Date(r),birthtime:new Date(r)}},"getStats"),getFile:e(async a=>{let{gitRoot:i,nodeFs:f,pathParams:g}=a,o=g.branchName,n=[];if(o){let u=await Rl.default.resolveRef({fs:f,dir:i,ref:`refs/heads/${o}`}),p=!1,h=u;for(;h&&!p;){let d=await Rl.default.readCommit({fs:f,dir:i,oid:h});n.push({oid:d.oid,...d.commit}),h=d.commit.parent[0]}}let r=Buffer.from(JSON.stringify(n,null,2),"utf-8");return{type:"file",content:r,mode:420,size:r.length}},"getFile"),rename:e(async a=>{throw new Error("not implemented")},"rename"),mkdir:e(async function(a){throw new Error("not implemented")},"mkdir")},ti=$t(hr(),1),J5={type:"gitBranchOperationHeadVirtualFile",getStats:e(async({gitRoot:a,nodeFs:i,pathParams:f})=>{if(f.branchName===void 0)throw new Error("branchName should be in pathParams");let g=await rn(i,a,f.branchName);if(!g){let p=new Date(0);return{mode:420,size:0,isFile:e(()=>!0,"isFile"),isDirectory:e(()=>!1,"isDirectory"),isSymbolicLink:e(()=>!1,"isSymbolicLink"),isBlockDevice:e(()=>!1,"isBlockDevice"),isCharacterDevice:e(()=>!1,"isCharacterDevice"),isSocket:e(()=>!1,"isSocket"),isFIFO:e(()=>!1,"isFIFO"),isFileSync:e(()=>!0,"isFileSync"),isDirectorySync:e(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:Math.ceil(40/4096),atimeMs:p.getTime(),mtimeMs:p.getTime(),ctimeMs:p.getTime(),birthtimeMs:p.getTime(),atime:p,mtime:p,ctime:p,birthtime:p}}let o;try{o=await ti.default.resolveRef({fs:i,dir:a,ref:g})}catch{o=await ti.default.resolveRef({fs:i,dir:a,ref:`refs/heads/${g}`})}let n=await ti.default.readCommit({fs:i,dir:a,oid:o}),{commit:r}=n,u=r.committer.timestamp*1e3;return{mode:420,size:40,isFile:e(()=>!0,"isFile"),isDirectory:e(()=>!1,"isDirectory"),isSymbolicLink:e(()=>!1,"isSymbolicLink"),isBlockDevice:e(()=>!1,"isBlockDevice"),isCharacterDevice:e(()=>!1,"isCharacterDevice"),isSocket:e(()=>!1,"isSocket"),isFIFO:e(()=>!1,"isFIFO"),isFileSync:e(()=>!0,"isFileSync"),isDirectorySync:e(()=>!1,"isDirectorySync"),dev:0,ino:0,nlink:1,uid:0,gid:0,rdev:0,blksize:4096,blocks:Math.ceil(40/4096),atimeMs:u,mtimeMs:u,ctimeMs:u,birthtimeMs:u,atime:new Date(u),mtime:new Date(u),ctime:new Date(u),birthtime:new Date(u)}},"getStats"),getFile:e(async({gitRoot:a,nodeFs:i,pathParams:f})=>{if(f.branchName===void 0)throw new Error("branchName should be in pathParams");let g=await rn(i,a,f.branchName);if(!g)return{type:"file",content:"",mode:420,size:0};try{let o;try{o=await ti.default.resolveRef({fs:i,dir:a,ref:g})}catch{o=await ti.default.resolveRef({fs:i,dir:a,ref:`refs/heads/${g}`})}return{type:"file",content:o+`
|
|
140
|
-
`,mode:420,size:o.length}}catch{return}},"getFile"),writeFile:e(async({filePath:a,gitRoot:i,nodeFs:f,content:g,cacheFs:o,pathParams:n})=>{if(n.branchName===void 0)throw new Error("branchName should be in pathParams");let r=await rn(f,i,n.branchName),u=await ti.default.resolveRef({fs:f,dir:i,ref:`refs/heads/${r}`});if(!r)throw new Error(`Operation branch name could not be resolved for branch ${n.branchName}`);let p=g.toString().trim(),h,d,m=!1;if(!u)throw new Error(`Operation branch ref could not be resolved for branch ${r}`);let y=u;for(;y&&!m;){let w=await ti.default.readCommit({fs:f,dir:i,oid:y});if(w.oid===p&&(h=w.oid),y=w.commit.parent&&w.commit.parent.length>0?w.commit.parent[0]:null,w.commit.parent.length===2){if(w.commit.parent[0]===w.commit.parent[1])m=!0;else if(h!==void 0){d=w.commit.parent[1];break}}}if(h===void 0)throw new Error(`Cant rollback to ${p} couldn't find newOperationBranchHead ${h}`);if(d===void 0)throw new Error(`Cant rollback to ${p} couldn't find newBranchHead ${d}`);await ti.default.writeRef({fs:f,dir:i,ref:"refs/heads/"+r,value:h,force:!0}),await ti.default.writeRef({fs:f,dir:i,ref:"refs/heads/"+n.branchName,value:d,force:!0})},"writeFile"),rename(a){throw new Error("not implementsd")},mkdir:e(async function(a){throw new Error("not implemented")},"mkdir")},Fn,Zh=(Fn=class extends Of{constructor({name:i,parentFs:f,gitStorageFs:g,gitRoot:o,virtualFiles:n=$5}){super({name:i,parentFs:f,gitRoot:o}),vt(this,"memFs"),vt(this,"openFh",{}),vt(this,"virtualFiles"),vt(this,"legitFileNames"),vt(this,"storageFs"),this.gitRoot=o,this.storageFs=g,this.memFs=(0,Qx.createFsFromVolume)(new Qx.Volume),this.virtualFiles=n,this.legitFileNames=["branches","commits"]}async getAuthor(){let i=await Zx.default.getConfig({fs:this.storageFs,dir:this.gitRoot,path:"user.name"}),f=await Zx.default.getConfig({fs:this.storageFs,dir:this.gitRoot,path:"user.email"}),g=Math.floor(Date.now()/1e3),o=new Date().getTimezoneOffset();return{name:i,email:f,date:g,timezoneOffset:o}}async responsible(i){return this.isLegitPath(i)}isLegitPath(i){return i.includes(`/${Fn.LEGIT_DIR}/`)||i.includes(`/${Fn.LEGIT_DIR}`)}getRouteHandler(i){let f=i.indexOf(`/${Fn.LEGIT_DIR}`);if(f===-1)throw new Error("Not a legit path");let g=i.slice(f+1);return Fn.pathRouter.match(g)}async open(i,f,g){let o=this.getRouteHandler(i);if(!o)throw new Error("Not a virtual legit file");if(o?.handler.writeFile===void 0&&(f.includes("w")||f.includes("a")))throw new Error(`Write operations not allowed for ${o?.handler.type}`);if(f.includes("x")&&o?.handler.type!=="gitBranchFileVirtualFile")throw new Error(`Exclusive operations not allowed for ${o?.handler.type}`);let n=await o.handler.getFile({cacheFs:this.memFs,filePath:i,gitRoot:this.gitRoot,nodeFs:this.storageFs,pathParams:o.params,author:await this.getAuthor()}),r=!1;for(let m of Object.values(this.openFh))m.path===i&&(r=!0);if((n||r)&&f.includes("x"))throw Object.assign(new Error(`EEXIST: file already exists, open '${i}'`),{code:"EEXIST",errno:-17,syscall:"open",path:i});if(!n&&!r&&!(f.includes("w")||f.includes("a")))throw Object.assign(new Error(`ENOENT: no such file or directory, open '${i}'`),{code:"ENOENT",errno:-2,syscall:"open",path:i});let u=Ea(i);if(await this.memFs.promises.mkdir(u,{recursive:!0}),n===void 0&&!f.includes("x")||n&&n.type==="file")try{let m=await this.memFs.promises.access(i)}catch{await this.memFs.promises.writeFile(i,"")}let p=await this.memFs.promises.open(i,f,g),h=p.fd,d=new Dd({fs:this,compositeFs:this.compositFs,subFsFileDescriptor:h,parentFsFileDescriptors:[]});return this.openFh[h]={path:i,mode:f,fh:p,openSha:n?.oid,readSha:void 0,unflushed:[]},(f.includes("x")||f.includes("w"))&&this.openFh[h].unflushed.push({length:0,start:0}),d}async mkdir(i,f){let g=i.toString(),o=this.getRouteHandler(g),n=f?{options:f}:{};try{await o?.handler.mkdir({cacheFs:this.memFs,filePath:i.toString(),nodeFs:this.storageFs,gitRoot:this.gitRoot,pathParams:o.params,...n,author:await this.getAuthor()});let r=typeof f=="object"?{...f,recursive:!0}:{recursive:!0};await this.memFs.promises.mkdir(i,r);let u=g.split("/"),p="";for(let h=1;h<=u.length;h++){p=u.slice(0,h).join("/");try{if((await this.memFs.promises.stat(p)).isDirectory()){let d=await this.memFs.promises.open(p,"r");this.openFh[d.fd]={path:p,mode:"r",fh:d,openSha:void 0,readSha:void 0,unflushed:[]}}}catch{}}}catch(r){throw r}}async access(i,f){await this.stat(i)}async futimes(i,f,g){let o=this.openFh[i.subFsFileDescriptor];if(!o)throw new Error("Invalid file handle");return await o.fh.utimes(f,g)}async fstat(i,f){let g=this.openFh[i.subFsFileDescriptor];if(!g)throw new Error("Invalid file handle");return this.stat(g.path,f)}async ftruncate(i,f){let g=this.openFh[i.subFsFileDescriptor];if(!g)throw new Error("Invalid file handle");return g.unflushed.push({length:0,start:0}),await g.fh.truncate(f)}async stat(i,f){let g=i.toString(),o=Object.values(this.openFh).find(r=>r.path===g&&r.unflushed.length>0);if(o&&o.unflushed.length>0)return await o.fh.stat(f);let n=this.getRouteHandler(g);if(!n)throw new Error(`ENOENT: no such file or directory, stat '${g}'`);return await n.handler.getStats({cacheFs:this.memFs,filePath:g,gitRoot:this.gitRoot,nodeFs:this.storageFs,pathParams:n.params,author:await this.getAuthor()})}async lstat(i,f){return this.stat(i,f)}async readdir(i,f){let g=i.toString();if(!this.isLegitPath(g))return[".legit"];let o=this.getRouteHandler(g);if(!o)throw new Error(`ENOENT: no such file or directory, scandir '${g}'`);let n=await o?.handler.getFile({cacheFs:this.memFs,filePath:g,gitRoot:this.gitRoot,nodeFs:this.storageFs,pathParams:o.params,author:await this.getAuthor()});if(n){if(n.type!=="directory")throw new Error("not a folder");let r=o?.staticSiblings??[],u=n.content;return u&&!Array.isArray(n.content)&&(u=JSON.parse(n.content)),Array.from(new Set([...u,...r])).sort((p,h)=>p.localeCompare(h,void 0,{numeric:!0,sensitivity:"base"}))}return[]}async read(i,f,g,o,n){let r=i.subFsFileDescriptor,u=this.openFh[r];if(!u)throw new Error("Invalid file handle");if(u.unflushed.length===0){let p=this.getRouteHandler(u.path),h=await p.handler.getFile({cacheFs:this.memFs,filePath:u.path,gitRoot:this.gitRoot,nodeFs:this.storageFs,pathParams:p?.params,author:await this.getAuthor()});if(!h?.content)throw new Error("couldnt access content");if(h.type!=="file")throw new Error("not a file");let d=typeof h.content=="string"?Buffer.from(h.content):h.content,m=typeof n=="number"?n:0,y=Math.min(m+o,d.length),w=Math.max(0,y-m);return d.copy(f,g,m,m+w),{bytesRead:w,buffer:f}}return await u.fh.read(f,g,o,n)}async write(i,f,g,o,n){let r=this.openFh[i.subFsFileDescriptor];if(!r)throw new Error("Invalid file handle");let u=r.mode;if(!u.includes("w")&&!u.includes("a")&&!u.includes("+"))throw Object.assign(new Error("EBADF: bad file descriptor, write"),{code:"EBADF",errno:-9,syscall:"write"});if(r.unflushed.length===0){let m=this.getRouteHandler(r.path),y=await m.handler.getFile({cacheFs:this.memFs,filePath:r.path,gitRoot:this.gitRoot,nodeFs:this.storageFs,pathParams:m.params,author:await this.getAuthor()});y&&y.oid&&(await this.memFs.promises.writeFile(r.path,y.content),r.readSha=y.oid)}let p=await r.fh.write(f,g,o,n),h=g??0,d=n??0;return r.unflushed.push({start:d,length:o||f.byteLength-h+d}),p}async close(i){let f=i.subFsFileDescriptor,g=this.openFh[f];if(!g)throw new Error("Invalid file handle");try{await this.dataSync(i),await g.fh.close()}finally{delete this.openFh[f]}}async dataSync(i){let f=i.subFsFileDescriptor,g=this.openFh[f];if(!g)throw new Error("Invalid file handle");if(g.unflushed.length>0){let o=this.getRouteHandler(g.path);if(o&&o.handler.writeFile){let n=await this.memFs.promises.readFile(g.path);await o.handler.writeFile({cacheFs:this.memFs,filePath:g.path,gitRoot:this.gitRoot,nodeFs:this.storageFs,content:n,pathParams:o.params,author:await this.getAuthor()})}g.unflushed=[]}}async readFile(i,f){let g=typeof i=="string"?i:Buffer.isBuffer(i)?i.toString():i.fd?`FileHandle(${i.fd})`:i.toString(),o=null;typeof f=="string"?o=f:f&&typeof f=="object"&&f.encoding&&(o=f.encoding);let n=await this.open(g,"r");try{let r=(await this.fstat(n)).size,u=Buffer.alloc(r);return await this.read(n,u,0,r,0),await this.close(n),o?u.toString(o):u}catch(r){try{await this.close(n)}catch{}throw r}}async writeFile(i,f,g){let o="w",n="utf8",r;typeof g=="string"?n=g:g&&typeof g=="object"&&(g.flag&&(o=String(g.flag)),g.encoding&&(n=g.encoding),g.mode&&(r=typeof g.mode=="string"?parseInt(g.mode,8):g.mode));let u=await this.open(i,o,r);try{let p;typeof f=="string"?p=Buffer.from(f,n):Buffer.isBuffer(f)?p=f:f instanceof Uint8Array?p=Buffer.from(f):ArrayBuffer.isView(f)?p=Buffer.from(f.buffer,f.byteOffset,f.byteLength):p=Buffer.from(f),await this.write(u,p,0,p.length,0)}finally{await this.close(u)}}async rename(i,f){let g=i.toString(),o=f.toString(),n=this.getRouteHandler(g),r=this.getRouteHandler(o);if(n?.handler.type==="gitBranchFileVirtualFile"&&r?.handler.type==="gitBranchFileVirtualFile"){let u=!0;try{await this.memFs.promises.access(o)}catch{u=!1}let p=!0;try{await this.stat(o)}catch{p=!1}let h=!0;try{await this.stat(g)}catch{h=!1}let d=!0;try{await this.memFs.promises.access(g)}catch{d=!1}if(d){let w=Ea(o);try{await this.memFs.promises.access(w)}catch{await this.memFs.promises.mkdir(w,{recursive:!0})}await this.memFs.promises.rename(i,f)}let m=this.getRouteHandler(g);if(!m)throw new Error("VF not found");let y=await m.handler.rename({cacheFs:this.memFs,filePath:g,gitRoot:this.gitRoot,nodeFs:this.storageFs,newPath:o,pathParams:m?.params??{},newPathParams:r?.params??{},author:await this.getAuthor()})}else throw new Error(`Unsupported rename operation from ${n?.handler.type} to ${r?.handler.type}`)}async fchmod(i,f){}async unlink(i){let f=i.toString(),g=this.getRouteHandler(f);if(g?.handler.unlink!==void 0)try{await g.handler.unlink({cacheFs:this.memFs,filePath:f,nodeFs:this.storageFs,gitRoot:this.gitRoot,pathParams:g.params,author:await this.getAuthor()})}catch(o){let n=!1;for(let[r,u]of Object.entries(this.openFh))u.path===f&&u.unflushed.length>0&&(n=!0);if(!n)throw o}finally{let o=!1;for(let[n,r]of Object.entries(this.openFh))r.path===f&&(o=!0,await r.fh.close(),delete this.openFh[Number(n)]);o&&await this.memFs.promises.unlink(f)}else throw new Error(`Cannot unlink ${g?.handler.type} files`)}async rmdir(i,...f){let g=i.toString(),o=this.getRouteHandler(g);if(o?.handler.rmdir!==void 0){await o.handler.rmdir({cacheFs:this.memFs,filePath:g,nodeFs:this.storageFs,gitRoot:this.gitRoot,pathParams:o.params,author:await this.getAuthor()});let n=!1;for(let[r,u]of Object.entries(this.openFh))u.path===g&&(n=!0,await u.fh.close(),delete this.openFh[Number(r)]);n&&await this.memFs.promises.rmdir(g,{recursive:!0})}else throw new Error(`Cannot rmdir
|
|
141
|
-
${o?.handler.type} directories`)}fileType(){return 10}},l(Fn,"hi"),Fn);e(Zh,"GitSubFs"),vt(Zh,"LEGIT_DIR",".legit"),vt(Zh,"pathRouter",new W5({".legit":{".":cE,branches:{".":e4,"[branchName]":{".legit":{".":cE,operation:H5,head:r4,operationHead:J5,operationHistory:s4,threadName:V5,history:K5},"[[...filePath]]":m2}},commits:{".":Xx,"[sha_1_1_2]":{".":Xx,"[sha1_3__40]":{"[[...filePath]]":n4}}}}}));var Y5=Zh,Nr=$t(hr(),1),Z5=$t(_3(),1);function c4(a){let i=[a];return{next(){return Promise.resolve({done:i.length===0,value:i.pop()})},return(){return i=[],{}},[Symbol.asyncIterator](){return this}}}l(c4,"Wre");e(c4,"fromValue");function h4(a){return a[Symbol.asyncIterator]?a[Symbol.asyncIterator]():a[Symbol.iterator]?a[Symbol.iterator]():a.next?a:c4(a)}l(h4,"qre");e(h4,"getIterator");async function w2(a,i){let f=h4(a);for(;;){let{value:g,done:o}=await f.next();if(g&&await i(g),o)break}f.return&&f.return()}l(w2,"U$");e(w2,"forAwait");function d4(a){let{PassThrough:i}=F3(),f=new i;return setTimeout(async()=>{await w2(a,g=>f.write(g)),f.end()},1),f}l(d4,"zre");e(d4,"asyncIteratorToStream");async function p4(a){let i=0,f=[];await w2(a,n=>{f.push(n),i+=n.byteLength});let g=new Uint8Array(i),o=0;for(let n of f)g.set(n,o),o+=n.byteLength;return g}l(p4,"Vre");e(p4,"collect");function g4(a){let i=Object.getOwnPropertyDescriptor(a,Symbol.asyncIterator);if(i&&i.enumerable)return a;let f=!1,g=[],o={};return a.on("data",n=>{g.push(n),o.resolve&&(o.resolve({value:g.shift(),done:!1}),o={})}),a.on("error",n=>{o.reject&&(o.reject(n),o={})}),a.on("end",()=>{f=!0,o.resolve&&(o.resolve({done:!0}),o={})}),{next(){return new Promise((n,r)=>{if(g.length===0&&f)return n({done:!0});if(g.length>0)return n({value:g.shift(),done:!1});g.length===0&&!f&&(o={resolve:n,reject:r})})},return(){a.removeAllListeners(),a.destroy&&a.destroy()},[Symbol.asyncIterator](){return this}}}l(g4,"Gre");e(g4,"fromNodeStream");async function y4({onProgress:a,url:i,method:f="GET",headers:g={},agent:o,body:n}){return n&&Array.isArray(n)?n=Buffer.from(await p4(n)):n&&(n=d4(n)),new Promise((r,u)=>{(0,Z5.default)({url:i,method:f,headers:g,agent:o,body:n},(p,h)=>{if(p)return u(p);try{let d=g4(h);r({url:h.url,method:h.method,statusCode:h.statusCode,statusMessage:h.statusMessage,body:d,headers:h.headers})}catch(d){u(d)}})})}l(y4,"Yre");e(y4,"request");var Q5={request:y4},Dm=Q5,Pi="legit",X5=e(({fs:a,gitRepoPath:i,serverUrl:f="https://hub.legitcontrol.com",auth:g,anonymousBranch:o,authHeaderPrefix:n="Bearer "})=>{let r=!1;async function u(T){let O=await g.getMaxAccessTokenForBranch(T);if(!O)throw new Error(`No access token for branch ${T}`);await Nr.default.fetch({fs:a,http:Dm,dir:i,singleBranch:!0,ref:`${T}`,remote:Pi,url:f,headers:{Authorization:`${n}${O}`}});let E=await Nr.default.resolveRef({fs:a,dir:i,ref:`${Pi}/${T}`});await Nr.default.writeRef({fs:a,dir:i,ref:`refs/heads/${T}`,value:E})}l(u,"f"),e(u,"loadBranch");let p=[];async function h(){let T=await g.getMaxAccessTokenForBranch("todo");await Nr.default.fetch({fs:a,http:Dm,dir:i,remote:Pi,url:f,headers:{Authorization:`${n}${T}`}});let O=await Nr.default.listBranches({fs:a,dir:i});for(let E of O){if(E===o)continue;let P=`${Pi}/${E}`,A,x;try{A=await Nr.default.resolveRef({fs:a,dir:i,ref:E})}catch(U){console.log(`Could not resolve local ref ${E}:`,U)}try{x=await Nr.default.resolveRef({fs:a,dir:i,ref:P})}catch{x=void 0}if(A&&x){if(A!==x){let U=await Nr.default.findMergeBase({fs:a,dir:i,oids:[A,x]});if(U[0]!==A&&U[0]!==x){let M=await Nr.default.merge({fs:a,dir:i,ours:A,theirs:x,fastForwardOnly:!1,abortOnConflict:!1,author:{name:"Your Name",email:"your.email@example.com"},mergeDriver:e(async({branches:ee,contents:V,path:q})=>{let[G,re,ae]=V;return console.log(`Merging ${ee[0]} with ${ee[1]}...`),console.log("merged:"),console.log(V),{cleanMerge:!0,mergedText:ae===void 0?re:ae}},"mergeDriver")});await Nr.default.writeRef({fs:a,dir:i,ref:`refs/heads/${E}`,value:M.oid,force:!0})}U[0]===A?(console.log(`branch ${E} differs - remote ahaed, not behind`),await Nr.default.writeRef({fs:a,dir:i,ref:`refs/heads/${E}`,value:x,force:!0})):U[0]===x?(console.log(`branch ${E} differs - local ahead, not behind`),p.push(E)):(console.log(`branch ${E} differs - both changed`),p.push(E))}}else A&&!x&&p.push(E)}}l(h,"c"),e(h,"pull");async function d(T){if((await g.getUser()).type!=="local")for(let O of T){let E=await g.getMaxAccessTokenForBranch(O);await Nr.default.push({fs:a,http:Dm,dir:i,remote:Pi,url:f,ref:O,headers:{Authorization:`Bearer ${E}`}})}}l(d,"d"),e(d,"push");let m=Promise.resolve();async function y(T){m=m.then(()=>d(T)),await m}l(y,"m"),e(y,"sequentialPush");async function w(){await Nr.default.getConfig({fs:a,dir:i,path:`remote.${Pi}.fetch`})||await Nr.default.setConfig({fs:a,dir:i,path:`remote.${Pi}.fetch`,value:`+refs/heads/*:refs/remotes/${Pi}/*`});try{await h();let T=[...new Set(p)].filter(O=>O.indexOf(o)===-1);await y(T),p=[]}catch(T){console.error("Error monitoring changes:",T)}finally{r&&setTimeout(w,1e3)}}l(w,"g"),e(w,"pullPushTick");function _(){r=!0,w()}l(_,"v"),e(_,"startSync");function S(){r=!1}return l(S,"_"),e(S,"stopSync"),{start:e(()=>{r||(_(),r=!0)},"start"),stop:e(()=>{S()},"stop"),isRunning:e(()=>r,"isRunning"),loadBranch:u,sequentialPush:y}},"createLegitSyncService"),Br=$t(hr(),1),eI=$t(vf(),1),eD=e((a,i)=>{let f={type:"local",id:"local",name:"Local User",email:"local@legitcontrol.com"};return{getUser:e(async()=>f,"getUser"),signInAnonymously:e(async()=>{f.type="anonymous",f.id=crypto.randomUUID(),f.email=`anonymous-sha1-${f.id}-@legitcontrol.com`},"signInAnonymously"),addAccessToken:e(async g=>{let o=await a.getUserTokens(f.id);o.accessTokens.push(g),await a.setUserTokens(f.id,o)},"addAccessToken"),getMaxAccessTokenForBranch:e(async g=>{let o=await a.getUserTokens(f.id);if(!(o.accessTokens===void 0||o.accessTokens.length===0))return o.accessTokens[0]},"getMaxAccessTokenForBranch")}},"createSessionManager"),tI=$t(hr(),1);function m4(a){let i=JSON.stringify(a),f=new TextEncoder().encode(i),g="";return typeof btoa=="function"?g=btoa(String.fromCharCode(...f)):g=Buffer.from(f).toString("base64"),g.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}l(m4,"W$");e(m4,"encodeConfigJson");function w4(a){let i=a.replace(/-/g,"+").replace(/_/g,"/")+"===".slice((a.length+3)%4),f;typeof atob=="function"?f=atob(i):f=Buffer.from(i,"base64").toString("binary");let g=Uint8Array.from(f,n=>n.charCodeAt(0)),o=new TextDecoder().decode(g);return JSON.parse(o)}l(w4,"q$");e(w4,"decodeConfigJson");var rI="user.legit-tokens";function b4({storageFs:a,gitRoot:i}){return{getUserTokens:e(async f=>{let g=await tI.default.getConfig({fs:a,dir:i,path:rI});return g?w4(g):{accessTokens:[]}},"getUserTokens"),setUserTokens:e(async(f,g)=>await tI.default.setConfig({fs:a,dir:i,path:rI,value:m4(g)}),"setUserTokens")}}l(b4,"V$");e(b4,"createGitConfigTokenStore");async function b2(a){let i=new eI.Volume,f=(0,eI.createFsFromVolume)(i);return v4({...a,storageFs:a?.storageFs?a.storageFs:f,gitRoot:a?.gitRoot||"/"})}l(b2,"Yce");e(b2,"openLegitFsWithMemoryFs");async function v4({storageFs:a,gitRoot:i,anonymousBranch:f="anonymous",showKeepFiles:g=!1,initialAuthor:o={type:"local",id:"local",name:"Local User",email:"local@legitcontrol.com"},serverUrl:n="https://sync.legitcontrol.com",publicKey:r}){await a.promises.readdir(i+"/.git").then(()=>!0).catch(()=>!1)||(await Br.default.init({fs:a,dir:"/",defaultBranch:f}),await a.promises.writeFile(i+"/.keep",""),await Br.default.add({fs:a,dir:"/",filepath:".keep"}),await Br.default.commit({fs:a,dir:"/",message:"Initial commit",author:{name:"Test",email:"test@example.com"}}),await Br.default.setConfig({fs:a,dir:i,path:"init.defaultBranch",value:f})),await Br.default.getConfig({fs:a,dir:i,path:"user.legit_user_id"})||await Br.default.setConfig({fs:a,dir:i,path:"user.legit_user_id",value:o.name}),await Br.default.getConfig({fs:a,dir:i,path:"user.name"})||await Br.default.setConfig({fs:a,dir:i,path:"user.name",value:o.name}),await Br.default.getConfig({fs:a,dir:i,path:"user.email"})||await Br.default.setConfig({fs:a,dir:i,path:"user.email",value:o.email});let u=new Vx({name:"root",parentFs:void 0,storageFs:a,gitRoot:i}),p=new Yx({name:"root-ephemeral",parentFs:u,gitRoot:i,ephemeralPatterns:[]}),h=new Kx({name:"root-hidden",parentFs:u,gitRoot:i,hiddenFiles:[]});u.setHiddenFilesSubFs(h),u.setEphemeralFilesSubFs(p);let d=new Vx({name:"git",parentFs:u,storageFs:void 0,gitRoot:i,defaultBranch:f}),m=new Y5({name:"git-subfs",parentFs:d,gitRoot:i,gitStorageFs:u}),y=g?[".git"]:[".git",".keep"],w=new Kx({name:"git-hidden-subfs",parentFs:d,gitRoot:i,hiddenFiles:y}),_=new Yx({name:"git-ephemeral-subfs",parentFs:d,gitRoot:i,ephemeralPatterns:["**/._*","**/.DS_Store","**/.AppleDouble/","**/.AppleDB","**/.AppleDesktop","**/.Spotlight-V100","**/.TemporaryItems","**/.Trashes","**/.fseventsd","**/.VolumeIcon.icns","**/.ql_disablethumbnails","**/.~lock.*","**/lu[0-9a-zA-Z]*.tmp","**/.metaentries.json.tmp","**/**.sb-**"]});d.addSubFs(m),d.setHiddenFilesSubFs(w),d.setEphemeralFilesSubFs(_);let S=b4({storageFs:a,gitRoot:i}),T=eD(S,r),O=X5({fs:a,gitRepoPath:i,serverUrl:n,auth:T,anonymousBranch:f}),E=Object.assign(d,{auth:T,sync:O,setLogger(P){u.setLoggger(P),d.setLoggger(P)},push:e(async P=>{},"push"),shareCurrentBranch:e(async()=>{if((await T.getUser()).type==="local")throw new Error("login first - for example anonymously using legitfs.auth.signInAnonymously()");let P=await E.getCurrentBranch();return P===f&&(P=(await T.getUser()).id,await Br.default.renameBranch({fs:a,dir:i,oldref:f,ref:P})),await O.sequentialPush([P]),E.setCurrentBranch(P),P},"shareCurrentBranch"),setCurrentBranch:e(async P=>{(await Br.default.listBranches({fs:a,dir:i})).includes(P)||await O?.loadBranch(P);let A=(await Br.default.listBranches({fs:a,dir:i})).includes(P);if(console.log("branchExistsAfter",A),!A)throw new Error(`Branch ${P} does not exist`);await Br.default.setConfig({fs:a,dir:i,path:"init.defaultBranch",value:P})},"setCurrentBranch"),getCurrentBranch:e(async()=>{let P=await Br.default.getConfig({fs:a,dir:i,path:"init.defaultBranch"});if(!P)throw new Error("No current branch set");return P},"getCurrentBranch")});return E}l(v4,"Xre");e(v4,"openLegitFs");var AD=e(a=>async i=>{if(!i.path.includes(".legit/branches/")||(i.path.match(/\.legit/g)||[]).length>1)return;let[f,g]=i.path.split(".legit/branches/"),[o,...n]=g.split("/"),r=n.join("/"),u=f+".legit/branches/"+o+"/.legit/operation",p=JSON.stringify(i.operationArgs,(h,d)=>Buffer.isBuffer(d)?{__buffer__:d.toString("base64")}:d);await a.writeFile(u,`[${i.fsName}].${i.operation}(${i.fd?i.fd.fd+" - ":""}${i.path})
|
|
142
|
-
|
|
143
|
-
${p}
|
|
144
|
-
|
|
145
|
-
`)},"createFsOperationFileLogger");import{jsx as sD}from"react/jsx-runtime";var E4=tD({legitFs:null,loading:!0,head:null,rollback:l(async()=>{},"rollback")}),v2=l(()=>rD(E4),"useLegitContext"),iD={gitRoot:"/"},oD=100,aD=l(({children:a,config:i=iD})=>{let[f,g]=Ud(!0),[o,n]=Ud(null),r=nD(null),[u,p]=Ud(),[h,d]=Ud(null);_4(()=>{if(!f)return;l(async()=>{try{let w=await b2({gitRoot:i.gitRoot,serverUrl:i.serverUrl,publicKey:i.publicKey});i.publicKey&&(await w.auth.addAccessToken(i.publicKey),w.sync.start()),w&&n(w)}catch(w){p(w)}},"init")(),g(!1)},[]),_4(()=>{if(!o)return;window.legitFs=o;let y=setInterval(async()=>{let w=await o.getCurrentBranch();try{let _=await o.promises.readFile(`/.legit/branches/${w}/.legit/head`,"utf8");_!==r.current&&(r.current=_,d(_))}catch{}},oD);return()=>{clearInterval(y)}},[o]);let m=l(async y=>{if(!o){console.error("No legitFs instance available");return}try{let w=await o.getCurrentBranch();await o.promises.writeFile(`/.legit/branches/${w}/.legit/head`,y,"utf8")}catch(w){p(w)}},"rollback");return sD(E4.Provider,{value:{legitFs:o,loading:o===null,head:h,rollback:m,error:u},children:a})},"LegitProvider");import{useEffect as S4,useState as Md,useRef as _2,useCallback as A4,useMemo as lD}from"react";function fD(a,i){let{legitFs:f,error:g,head:o}=v2(),[n,r]=Md(null),[u,p]=Md([]),[h,d]=Md(!0),[m,y]=Md(),w=_2(null),_=_2(!1),S=_2(!1);S4(()=>{if(!f)return;let E=!1;return l(async()=>{d(!0);try{let A=await f.getCurrentBranch(),x=`/.legit/branches/${A}${a}`,U=`/.legit/branches/${A}/.legit/history`,M=await f.promises.readFile(x,"utf8"),ee=await f.promises.readFile(U,"utf8").catch(()=>"");if(E)return;let V=[],q=ee;q&&(V=JSON.parse(q)),w.current===M&&(w.current=null),r(M),p(V),y(void 0)}catch(A){A?.code!=="ENOENT"?y(A):(r(null),p([]))}finally{E||d(!1)}},"load")(),()=>{E=!0}},[f,a,o]);let T=A4(async E=>{if(f)try{w.current=E;let P=await f.getCurrentBranch();await f.promises.writeFile(`/.legit/branches/${P}${a}`,E,"utf8"),r(E)}catch(P){throw w.current=null,y(P),P}},[f,a]);S4(()=>{_.current||S.current||!h&&n===null&&f&&i?.initialData&&(S.current=!0,_.current=!0,l(async()=>{try{await T(i.initialData)}catch(P){console.error("Failed to initialize file:",P),_.current=!1}finally{S.current=!1}},"initialize")())},[h,n,f,i?.initialData,T]);let O=A4(async E=>{if(!f)return"";try{let P=a.startsWith("/")?a.slice(1):a;return await f.promises.readFile(`/.legit/commits/${E.slice(0,2)}/${E.slice(2)}/${P}`,"utf8")}catch{return""}},[f,a]);return{data:n,setData:T,history:lD(()=>u,[u]),getPastState:O,loading:h,error:m??g,legitFs:f}}l(fD,"useLegitFile");export{aD as LegitProvider,v2 as useLegitContext,fD as useLegitFile};
|
|
146
|
-
/*! Bundled license information:
|
|
147
|
-
|
|
148
|
-
@jspm/core/nodelibs/browser/chunk-DtuTasat.js:
|
|
149
|
-
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
150
|
-
*/
|
|
151
|
-
/*! Bundled license information:
|
|
152
|
-
|
|
153
|
-
@jspm/core/nodelibs/browser/chunk-DtuTasat.js:
|
|
154
|
-
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
155
|
-
|
|
156
|
-
@jspm/core/nodelibs/browser/chunk-CcCWfKp1.js:
|
|
157
|
-
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
158
|
-
*/
|
|
159
|
-
/*! Bundled license information:
|
|
160
|
-
|
|
161
|
-
@jspm/core/nodelibs/browser/chunk-B738Er4n.js:
|
|
162
|
-
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
163
|
-
*/
|
|
164
|
-
/*! Bundled license information:
|
|
165
|
-
|
|
166
|
-
safe-buffer/index.js:
|
|
167
|
-
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
168
|
-
|
|
169
|
-
crc-32/crc32.js:
|
|
170
|
-
(*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com *)
|
|
171
|
-
|
|
172
|
-
simple-concat/index.js:
|
|
173
|
-
(*! simple-concat. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
174
|
-
|
|
175
|
-
simple-get/index.js:
|
|
176
|
-
(*! simple-get. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
177
|
-
*/
|
|
11
|
+
`)},"createFsOperationFileLogger");import{jsx as Wt}from"react/jsx-runtime";var st=Mt({legitFs:null,loading:!0,head:null,rollback:g(async()=>{},"rollback")}),be=g(()=>_t(st),"useLegitContext"),Ut={gitRoot:"/"},jt=100,Vt=g(({children:a,config:e=Ut})=>{let[t,r]=ae(!0),[i,s]=ae(null),o=Ht(null),[l,h]=ae(),[c,d]=ae(null);it(()=>{if(!t)return;g(async()=>{try{let f=await ye({gitRoot:e.gitRoot,serverUrl:e.serverUrl,publicKey:e.publicKey});e.publicKey&&(await f.auth.addAccessToken(e.publicKey),f.sync.start()),f&&s(f)}catch(f){h(f)}},"init")(),r(!1)},[]),it(()=>{if(!i)return;window.legitFs=i;let w=setInterval(async()=>{let f=await i.getCurrentBranch();try{let E=await i.promises.readFile(`/.legit/branches/${f}/.legit/head`,"utf8");E!==o.current&&(o.current=E,d(E))}catch{}},jt);return()=>{clearInterval(w)}},[i]);let m=g(async w=>{if(!i){console.error("No legitFs instance available");return}try{let f=await i.getCurrentBranch();await i.promises.writeFile(`/.legit/branches/${f}/.legit/head`,w,"utf8")}catch(f){h(f)}},"rollback");return Wt(st.Provider,{value:{legitFs:i,loading:i===null,head:c,rollback:m,error:l},children:a})},"LegitProvider");import{useEffect as at,useState as oe,useRef as ve,useCallback as ot,useMemo as Kt}from"react";function Jt(a,e){let{legitFs:t,error:r,head:i}=be(),[s,o]=oe(null),[l,h]=oe([]),[c,d]=oe(!0),[m,w]=oe(),f=ve(null),E=ve(!1),D=ve(!1);at(()=>{if(!t)return;let p=!1;return g(async()=>{d(!0);try{let S=await t.getCurrentBranch(),k=`/.legit/branches/${S}${a}`,I=`/.legit/branches/${S}/.legit/history`,ee=await t.promises.readFile(k,"utf8"),te=await t.promises.readFile(I,"utf8").catch(()=>"");if(p)return;let Z=[],ne=te;ne&&(Z=JSON.parse(ne)),f.current===ee&&(f.current=null),o(ee),h(Z),w(void 0)}catch(S){S?.code!=="ENOENT"?w(S):(o(null),h([]))}finally{p||d(!1)}},"load")(),()=>{p=!0}},[t,a,i]);let y=ot(async p=>{if(t)try{f.current=p;let F=await t.getCurrentBranch();await t.promises.writeFile(`/.legit/branches/${F}${a}`,p,"utf8"),o(p)}catch(F){throw f.current=null,w(F),F}},[t,a]);at(()=>{E.current||D.current||!c&&s===null&&t&&e?.initialData&&(D.current=!0,E.current=!0,g(async()=>{try{await y(e.initialData)}catch(F){console.error("Failed to initialize file:",F),E.current=!1}finally{D.current=!1}},"initialize")())},[c,s,t,e?.initialData,y]);let v=ot(async p=>{if(!t)return"";try{let F=a.startsWith("/")?a.slice(1):a;return await t.promises.readFile(`/.legit/commits/${p.slice(0,2)}/${p.slice(2)}/${F}`,"utf8")}catch{return""}},[t,a]);return{data:s,setData:y,history:Kt(()=>l,[l]),getPastState:v,loading:c,error:m??r,legitFs:t}}g(Jt,"useLegitFile");export{Vt as LegitProvider,be as useLegitContext,Jt as useLegitFile};
|