import"./chunk-5XVCUSSZ.js";function ri(t,e,n,r){return new(n||(n=Promise))(function(o,h){function l(a){try{y(r.next(a))}catch(c){h(c)}}function p(a){try{y(r.throw(a))}catch(c){h(c)}}function y(a){a.done?o(a.value):new n(function(c){c(a.value)}).then(l,p)}y((r=r.apply(t,e||[])).next())})}function ii(t,e){function n(a){return function(c){return r([a,c])}}function r(a){if(h)throw new TypeError("Generator is already executing.");for(;o;)try{if(h=1,l&&(p=a[0]&2?l.return:a[0]?l.throw||((p=l.return)&&p.call(l),0):l.next)&&!(p=p.call(l,a[1])).done)return p;switch(l=0,p&&(a=[a[0]&2,p.value]),a[0]){case 0:case 1:p=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(p=o.trys,!(p=0p[0]&&a[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function oi(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;t=n.call(t);var r,o=[];try{for(;(e===void 0||0t;++t)Q[t]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[t],K["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(t)]=t;K[45]=62,K[95]=63}function fi(t,e,n){for(var r=[],o=e;o>18&63]+Q[e>>12&63]+Q[e>>6&63]+Q[e&63]);return r.join("")}function Rn(t){Ae||Sn();for(var e=t.length,n=e%3,r="",o=[],h=0,l=e-n;hl?l:h+16383));return n===1?(t=t[e-1],r+=Q[t>>2],r+=Q[t<<4&63],r+="=="):n===2&&(t=(t[e-2]<<8)+t[e-1],r+=Q[t>>10],r+=Q[t>>4&63],r+=Q[t<<2&63],r+="="),o.push(r),o.join("")}function he(t,e,n,r,o){var h=8*o-r-1,l=(1<>1,y=-7;o=n?o-1:0;var a=n?-1:1,c=t[e+o];for(o+=a,n=c&(1<<-y)-1,c>>=-y,y+=h;0>=-y,y+=r;0>1,c=o===23?Math.pow(2,-24)-Math.pow(2,-77):0;h=r?0:h-1;var g=r?1:-1,v=0>e||e===0&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(e=isNaN(e)?1:0,r=y):(r=Math.floor(Math.log(e)/Math.LN2),1>e*(l=Math.pow(2,-r))&&(r--,l*=2),e=1<=r+a?e+c/l:e+c*Math.pow(2,1-a),2<=e*l&&(r++,l/=2),r+a>=y?(e=0,r=y):1<=r+a?(e=(e*l-1)*Math.pow(2,o),r+=a):(e=e*Math.pow(2,a-1)*Math.pow(2,o),r=0));8<=o;t[n+h]=e&255,h+=g,e/=256,o-=8);for(r=r<n||e.byteLengtht)throw new RangeError('"size" argument must not be negative')}_.alloc=function(t,e,n){return An(t),t=0>=t?ot(null,t):e!==void 0?typeof n=="string"?ot(null,t).fill(e,n):ot(null,t).fill(e):ot(null,t),t};function Ne(t,e){if(An(e),t=ot(t,0>e?0:Le(e)|0),!_.TYPED_ARRAY_SUPPORT)for(var n=0;ne.length?0:Le(e.length)|0;t=ot(t,n);for(var r=0;r=(_.TYPED_ARRAY_SUPPORT?2147483647:1073741823))throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+(_.TYPED_ARRAY_SUPPORT?2147483647:1073741823).toString(16)+" bytes");return t|0}_.isBuffer=st;function b(t){return!(t==null||!t._isBuffer)}_.compare=function(t,e){if(!b(t)||!b(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,h=Math.min(n,r);o>>1;case"base64":return Cn(t).length;default:if(r)return ae(t).length;e=(""+e).toLowerCase(),r=!0}}_.byteLength=Nn;function ai(t,e,n){var r=!1;if((e===void 0||0>e)&&(e=0),e>this.length||((n===void 0||n>this.length)&&(n=this.length),0>=n)||(n>>>=0,e>>>=0,n<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":for(t=e,e=n,n=this.length,(!t||0>t)&&(t=0),(!e||0>e||e>n)&&(e=n),r="",n=t;nr?"0"+r.toString(16):r.toString(16),r=t+r;return r;case"utf8":case"utf-8":return kn(this,e,n);case"ascii":for(t="",n=Math.min(this.length,n);e"};_.prototype.compare=function(t,e,n,r,o){if(!b(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),r===void 0&&(r=0),o===void 0&&(o=this.length),0>e||n>t.length||0>r||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,o>>>=0,this===t)return 0;var h=o-r,l=n-e,p=Math.min(h,l);for(r=this.slice(r,o),t=t.slice(e,n),e=0;en&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),0>n&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(0>n)if(o)n=0;else return-1;if(typeof e=="string"&&(e=_.from(e,r)),b(e))return e.length===0?-1:Ln(t,e,n,r,o);if(typeof e=="number")return e&=255,_.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):Ln(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function Ln(t,e,n,r,o){function h(a,c){return l===1?a[c]:a.readUInt16BE(c*l)}var l=1,p=t.length,y=e.length;if(r!==void 0&&(r=String(r).toLowerCase(),r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le")){if(2>t.length||2>e.length)return-1;l=2,p/=2,y/=2,n/=2}if(o)for(r=-1;np&&(n=p-y);0<=n;n--){for(p=!0,r=0;ro)&&(n=o),0n||0>e)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");for(r||(r="utf8"),o=!1;;)switch(r){case"hex":t:{if(e=Number(e)||0,r=this.length-e,n?(n=Number(n),n>r&&(n=r)):n=r,r=t.length,r%2!=0)throw new TypeError("Invalid hex string");for(n>r/2&&(n=r/2),r=0;r(o-=2));++l){var p=r.charCodeAt(l);t=p>>8,p%=256,h.push(p),h.push(t)}return Gt(h,this,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}};_.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function kn(t,e,n){n=Math.min(t.length,n);for(var r=[];eo&&(h=o);break;case 2:var p=t[e+1];(p&192)==128&&(o=(o&31)<<6|p&63,127o||57343o&&(h=o))}h===null?(h=65533,l=1):65535>>10&1023|55296),h=56320|h&1023),r.push(h),e+=l}if(t=r.length,t<=Fn)r=String.fromCharCode.apply(String,r);else{for(n="",e=0;et?(t+=n,0>t&&(t=0)):t>n&&(t=n),0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),et)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}_.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||F(t,e,this.length),n=this[t];for(var r=1,o=0;++o=128*r&&(n-=Math.pow(2,8*e)),n};_.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||F(t,e,this.length),n=e;for(var r=1,o=this[t+--n];0=128*r&&(o-=Math.pow(2,8*e)),o};_.prototype.readInt8=function(t,e){return e||F(t,1,this.length),this[t]&128?-1*(255-this[t]+1):this[t]};_.prototype.readInt16LE=function(t,e){return e||F(t,2,this.length),t=this[t]|this[t+1]<<8,t&32768?t|4294901760:t};_.prototype.readInt16BE=function(t,e){return e||F(t,2,this.length),t=this[t+1]|this[t]<<8,t&32768?t|4294901760:t};_.prototype.readInt32LE=function(t,e){return e||F(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};_.prototype.readInt32BE=function(t,e){return e||F(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};_.prototype.readFloatLE=function(t,e){return e||F(t,4,this.length),he(this,t,!0,23,4)};_.prototype.readFloatBE=function(t,e){return e||F(t,4,this.length),he(this,t,!1,23,4)};_.prototype.readDoubleLE=function(t,e){return e||F(t,8,this.length),he(this,t,!0,52,8)};_.prototype.readDoubleBE=function(t,e){return e||F(t,8,this.length),he(this,t,!1,52,8)};function M(t,e,n,r,o,h){if(!b(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}_.prototype.writeUIntLE=function(t,e,n,r){t=+t,e|=0,n|=0,r||M(this,t,e,n,Math.pow(2,8*n)-1,0),r=1;var o=0;for(this[e]=t&255;++oe&&(e=65535+e+1);for(var o=0,h=Math.min(t.length-n,2);o>>8*(r?o:1-o)}_.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,65535,0),_.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):le(this,t,e,!0),e+2};_.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,65535,0),_.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):le(this,t,e,!1),e+2};function pe(t,e,n,r){0>e&&(e=4294967295+e+1);for(var o=0,h=Math.min(t.length-n,4);o>>8*(r?o:3-o)&255}_.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,4294967295,0),_.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):pe(this,t,e,!0),e+4};_.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,4294967295,0),_.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):pe(this,t,e,!1),e+4};_.prototype.writeIntLE=function(t,e,n,r){t=+t,e|=0,r||(r=Math.pow(2,8*n-1),M(this,t,e,n,r-1,-r)),r=0;var o=1,h=0;for(this[e]=t&255;++rt&&h===0&&this[e+r-1]!==0&&(h=1),this[e+r]=(t/o>>0)-h&255;return e+n};_.prototype.writeIntBE=function(t,e,n,r){t=+t,e|=0,r||(r=Math.pow(2,8*n-1),M(this,t,e,n,r-1,-r)),r=n-1;var o=1,h=0;for(this[e+r]=t&255;0<=--r&&(o*=256);)0>t&&h===0&&this[e+r+1]!==0&&(h=1),this[e+r]=(t/o>>0)-h&255;return e+n};_.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,1,127,-128),_.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[e]=t&255,e+1};_.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,32767,-32768),_.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):le(this,t,e,!0),e+2};_.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,32767,-32768),_.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):le(this,t,e,!1),e+2};_.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,2147483647,-2147483648),_.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):pe(this,t,e,!0),e+4};_.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),_.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):pe(this,t,e,!1),e+4};function ce(t,e,n,r){if(n+r>t.length)throw new RangeError("Index out of range");if(0>n)throw new RangeError("Index out of range")}_.prototype.writeFloatLE=function(t,e,n){return n||ce(this,t,e,4),fe(this,t,e,!0,23,4),e+4};_.prototype.writeFloatBE=function(t,e,n){return n||ce(this,t,e,4),fe(this,t,e,!1,23,4),e+4};_.prototype.writeDoubleLE=function(t,e,n){return n||ce(this,t,e,8),fe(this,t,e,!0,52,8),e+8};_.prototype.writeDoubleBE=function(t,e,n){return n||ce(this,t,e,8),fe(this,t,e,!1,52,8),e+8};_.prototype.copy=function(t,e,n,r){if(n||(n=0),r||r===0||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),0e)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-eo||!_.TYPED_ARRAY_SUPPORT)for(r=0;ro&&(t=o)}if(r!==void 0&&typeof r!="string")throw new TypeError("encoding must be a string");if(typeof r=="string"&&!_.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else typeof t=="number"&&(t&=255);if(0>e||this.length>>=0,n=n===void 0?this.length:n>>>0,t||(t=0),typeof t=="number")for(r=e;rn){if(!o){if(56319n){-1<(e-=3)&&h.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&-1<(e-=3)&&h.push(239,191,189);if(o=null,128>n){if(0>--e)break;h.push(n)}else if(2048>n){if(0>(e-=2))break;h.push(n>>6|192,n&63|128)}else if(65536>n){if(0>(e-=3))break;h.push(n>>12|224,n>>6&63|128,n&63|128)}else if(1114112>n){if(0>(e-=4))break;h.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error("Invalid code point")}return h}function Bn(t){for(var e=[],n=0;nt.length)t="";else for(;t.length%4!=0;)t+="=";Ae||Sn();var e=t.length;if(0>16&255,r[h++]=l>>8&255,r[h++]=l&255}return n===2?(l=K[t.charCodeAt(e)]<<2|K[t.charCodeAt(e+1)]>>4,r[h++]=l&255):n===1&&(l=K[t.charCodeAt(e)]<<10|K[t.charCodeAt(e+1)]<<4|K[t.charCodeAt(e+2)]>>2,r[h++]=l>>8&255,r[h++]=l&255),r}function Gt(t,e,n,r){for(var o=0;o=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function st(t){return t!=null&&(!!t._isBuffer||Pn(t)||typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&Pn(t.slice(0,0)))}function Pn(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}var Ht=Object.freeze({__proto__:null,INSPECT_MAX_BYTES:50,kMaxLength:pi,Buffer:_,SlowBuffer:function(t){return+t!=t&&(t=0),_.alloc(+t)},isBuffer:st}),A=C(function(t,e){function n(o){for(var h=[],l=1;le&&(n--,e+=1e9)),[n,e]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-vi)/1e3}},dt=typeof Object.create=="function"?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){function n(){}t.super_=e,n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t},wi=/%[sdj%]/g;function ke(t){if(!Rt(t)){for(var e=[],n=0;n=o)return l;switch(l){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(p){return"[Circular]"}default:return l}});for(var h=r[n];nn?Dt(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),o=l?Oi(t,e,n,h,o):o.map(function(y){return Pe(t,e,n,h,y,l)}),t.seen.pop(),Ti(o,r,p))}function Ri(t,e){if(ht(e))return t.stylize("undefined","undefined");if(Rt(e))return e="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'",t.stylize(e,"string");if(Vn(e))return t.stylize(""+e,"number");if(De(e))return t.stylize(""+e,"boolean");if(e===null)return t.stylize("null","null")}function Ce(t){return"["+Error.prototype.toString.call(t)+"]"}function Oi(t,e,n,r,o){for(var h=[],l=0,p=e.length;lt.seen.indexOf(e.value)?(p=n===null?ge(t,e.value,null):ge(t,e.value,n-1),-1t?"0"+t.toString(10):t.toString(10)}var Ai="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");function Ni(){var t=new Date,e=[Me(t.getHours()),Me(t.getMinutes()),Me(t.getSeconds())].join(":");return[t.getDate(),Ai[t.getMonth()],e].join(" ")}function qn(t,e){if(!e||!yt(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}var Zt={inherits:dt,_extend:qn,log:function(){console.log("%s - %s",Ni(),ke.apply(null,arguments))},isBuffer:function(t){return st(t)},isPrimitive:xe,isFunction:xt,isError:Xt,isDate:Jt,isObject:yt,isRegExp:Dt,isUndefined:ht,isSymbol:function(t){return typeof t=="symbol"},isString:Rt,isNumber:Vn,isNullOrUndefined:function(t){return t==null},isNull:function(t){return t===null},isBoolean:De,isArray:Wn,inspect:tt,deprecate:Fe,format:ke,debuglog:Yn};function zn(t,e){if(t===e)return 0;for(var n=t.length,r=e.length,o=0,h=Math.min(n,r);o 0 and < 65536"),o("ERR_SOCKET_BAD_TYPE","Bad socket type specified. Valid types are: udp4, udp6"),o("ERR_SOCKET_CANNOT_SEND","Unable to send data"),o("ERR_SOCKET_CLOSED","Socket is closed"),o("ERR_SOCKET_DGRAM_NOT_RUNNING","Not running"),o("ERR_STDERR_CLOSE","process.stderr cannot be closed"),o("ERR_STDOUT_CLOSE","process.stdout cannot be closed"),o("ERR_STREAM_WRAP","Stream has StringDecoder set or is in objectMode"),o("ERR_TLS_CERT_ALTNAME_INVALID","Hostname/IP does not match certificate's altnames: %s"),o("ERR_TLS_DH_PARAM_SIZE",function(a){return"DH parameter size "+a+" is less than 2048"}),o("ERR_TLS_HANDSHAKE_TIMEOUT","TLS handshake timeout"),o("ERR_TLS_RENEGOTIATION_FAILED","Failed to renegotiate"),o("ERR_TLS_REQUIRED_SERVER_NAME",'"servername" is required parameter for Server.addContext'),o("ERR_TLS_SESSION_ATTACK","TSL session renegotiation attack detected"),o("ERR_TRANSFORM_ALREADY_TRANSFORMING","Calling transform done when still transforming"),o("ERR_TRANSFORM_WITH_LENGTH_0","Calling transform done when writableState.length != 0"),o("ERR_UNKNOWN_ENCODING","Unknown encoding: %s"),o("ERR_UNKNOWN_SIGNAL","Unknown signal: %s"),o("ERR_UNKNOWN_STDIN_TYPE","Unknown stdin file type"),o("ERR_UNKNOWN_STREAM_TYPE","Unknown stream file type"),o("ERR_V8BREAKITERATOR","Full ICU data not installed. See https://github.com/nodejs/node/wiki/Intl")});D($t);var G=C(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ENCODING_UTF8="utf8",e.assertEncoding=function(n){if(n&&!A.Buffer.isEncoding(n))throw new $t.TypeError("ERR_INVALID_OPT_VALUE_ENCODING",n)},e.strToEncoding=function(n,r){return r&&r!==e.ENCODING_UTF8?r==="buffer"?new A.Buffer(n):new A.Buffer(n).toString(r):n}});D(G);var We=C(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=R.constants.S_IFMT,r=R.constants.S_IFDIR,o=R.constants.S_IFREG,h=R.constants.S_IFBLK,l=R.constants.S_IFCHR,p=R.constants.S_IFLNK,y=R.constants.S_IFIFO,a=R.constants.S_IFSOCK;t=function(){function c(){this.name="",this.mode=0}return c.build=function(g,v){var m=new c,S=g.getNode().mode;return m.name=G.strToEncoding(g.getName(),v),m.mode=S,m},c.prototype._checkModeProperty=function(g){return(this.mode&n)===g},c.prototype.isDirectory=function(){return this._checkModeProperty(r)},c.prototype.isFile=function(){return this._checkModeProperty(o)},c.prototype.isBlockDevice=function(){return this._checkModeProperty(h)},c.prototype.isCharacterDevice=function(){return this._checkModeProperty(l)},c.prototype.isSymbolicLink=function(){return this._checkModeProperty(p)},c.prototype.isFIFO=function(){return this._checkModeProperty(y)},c.prototype.isSocket=function(){return this._checkModeProperty(a)},c}(),e.Dirent=t,e.default=t});D(We);function fr(t,e){for(var n=0,r=t.length-1;0<=r;r--){var o=t[r];o==="."?t.splice(r,1):o===".."?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}var Ve=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;function qe(){for(var t="",e=!1,n=arguments.length-1;-1<=n&&!e;n--){var r=0<=n?arguments[n]:"/";if(typeof r!="string")throw new TypeError("Arguments to path.resolve must be strings");r&&(t=r+"/"+t,e=r.charAt(0)==="/")}return t=fr(Ge(t.split("/"),function(o){return!!o}),!e).join("/"),(e?"/":"")+t||"."}function lr(t){var e=pr(t),n=Pi(t,-1)==="/";return(t=fr(Ge(t.split("/"),function(r){return!!r}),!e).join("/"))||e||(t="."),t&&n&&(t+="/"),(e?"/":"")+t}function pr(t){return t.charAt(0)==="/"}function ze(t,e){function n(l){for(var p=0;py?[]:l.slice(p,y-p+1)}t=qe(t).substr(1),e=qe(e).substr(1),t=n(t.split("/")),e=n(e.split("/"));for(var r=Math.min(t.length,e.length),o=r,h=0;he&&(e=t.length+e),t.substr(e,n)},Ut=C(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),t=typeof setImmediate=="function"?setImmediate.bind(k):setTimeout.bind(k),e.default=t});D(Ut);var x=C(function(t,e){function n(){var r=Pt||{};return r.getuid||(r.getuid=function(){return 0}),r.getgid||(r.getgid=function(){return 0}),r.cwd||(r.cwd=function(){return"/"}),r.nextTick||(r.nextTick=Ut.default),r.emitWarning||(r.emitWarning=function(o,h){console.warn(""+h+(h?": ":"")+o)}),r.env||(r.env={}),r}Object.defineProperty(e,"__esModule",{value:!0}),e.createProcess=n,e.default=n()});D(x);function gt(){}gt.prototype=Object.create(null);function O(){O.init.call(this)}O.EventEmitter=O;O.usingDomains=!1;O.prototype.domain=void 0;O.prototype._events=void 0;O.prototype._maxListeners=void 0;O.defaultMaxListeners=10;O.init=function(){this.domain=null,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new gt,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};O.prototype.setMaxListeners=function(t){if(typeof t!="number"||0>t||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this};O.prototype.getMaxListeners=function(){return this._maxListeners===void 0?O.defaultMaxListeners:this._maxListeners};O.prototype.emit=function(t){var e,n,r=t==="error";if(e=this._events)r=r&&e.error==null;else if(!r)return!1;var o=this.domain;if(r){if(e=arguments[1],o)e||(e=Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=o,e.domainThrown=!1,o.emit("error",e);else throw e instanceof Error?e:(o=Error('Uncaught, unspecified "error" event. ('+e+")"),o.context=e,o);return!1}if(o=e[t],!o)return!1;e=typeof o=="function";var h=arguments.length;switch(h){case 1:if(e)o.call(this);else for(e=o.length,o=Qt(o,e),r=0;rn&&(h.warned=!0,n=Error("Possible EventEmitter memory leak detected. "+h.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit"),n.name="MaxListenersExceededWarning",n.emitter=t,n.type=e,n.count=h.length,typeof console.warn=="function"?console.warn(n):console.log(n))):(o[e]=n,++t._eventsCount),t}O.prototype.addListener=function(t,e){return cr(this,t,e,!1)};O.prototype.on=O.prototype.addListener;O.prototype.prependListener=function(t,e){return cr(this,t,e,!0)};function ar(t,e,n){function r(){t.removeListener(e,r),o||(o=!0,n.apply(t,arguments))}var o=!1;return r.listener=n,r}O.prototype.once=function(t,e){if(typeof e!="function")throw new TypeError('"listener" argument must be a function');return this.on(t,ar(this,t,e)),this};O.prototype.prependOnceListener=function(t,e){if(typeof e!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(t,ar(this,t,e)),this};O.prototype.removeListener=function(t,e){var n;if(typeof e!="function")throw new TypeError('"listener" argument must be a function');var r=this._events;if(!r)return this;var o=r[t];if(!o)return this;if(o===e||o.listener&&o.listener===e)--this._eventsCount==0?this._events=new gt:(delete r[t],r.removeListener&&this.emit("removeListener",t,o.listener||e));else if(typeof o!="function"){var h=-1;for(n=o.length;0h)return this;if(o.length===1){if(o[0]=void 0,--this._eventsCount==0)return this._events=new gt,this;delete r[t]}else{n=h+1;for(var p=o.length;nthis.buf.length){var S=A.bufferAllocUnsafe(m+v);this.buf.copy(S,0,0,this.buf.length),this.buf=S}return c.copy(this.buf,m,g,g+v),this.touch(),v},a.prototype.read=function(c,g,v,m){return g===void 0&&(g=0),v===void 0&&(v=c.byteLength),m===void 0&&(m=0),this.buf||(this.buf=A.bufferAllocUnsafe(0)),v>c.byteLength&&(v=c.byteLength),v+m>this.buf.length&&(v=this.buf.length-m),this.buf.copy(c,g,m,m+v),v},a.prototype.truncate=function(c){if(c===void 0&&(c=0),c)if(this.buf||(this.buf=A.bufferAllocUnsafe(0)),c<=this.buf.length)this.buf=this.buf.slice(0,c);else{var g=A.bufferAllocUnsafe(0);this.buf.copy(g),g.fill(0,c)}else this.buf=A.bufferAllocUnsafe(0);this.touch()},a.prototype.chmod=function(c){this.perm=c,this.mode=this.mode&-512|c,this.touch()},a.prototype.chown=function(c,g){this.uid=c,this.gid=g,this.touch()},a.prototype.touch=function(){this.mtime=new Date,this.emit("change",this)},a.prototype.canRead=function(c,g){return c===void 0&&(c=x.default.getuid()),g===void 0&&(g=x.default.getgid()),!!(this.perm&4||g===this.gid&&this.perm&32||c===this.uid&&this.perm&256)},a.prototype.canWrite=function(c,g){return c===void 0&&(c=x.default.getuid()),g===void 0&&(g=x.default.getgid()),!!(this.perm&2||g===this.gid&&this.perm&16||c===this.uid&&this.perm&128)},a.prototype.del=function(){this.emit("delete",this)},a.prototype.toJSON=function(){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()}},a}(O.EventEmitter),e.Node=t,t=function(y){function a(c,g,v){var m=y.call(this)||this;return m.children={},m.steps=[],m.ino=0,m.length=0,m.vol=c,m.parent=g,m.steps=g?g.steps.concat([v]):[v],m}return n(a,y),a.prototype.setNode=function(c){this.node=c,this.ino=c.ino},a.prototype.getNode=function(){return this.node},a.prototype.createChild=function(c,g){g===void 0&&(g=this.vol.createNode());var v=new a(this.vol,this,c);return v.setNode(g),g.isDirectory(),this.setChild(c,v),v},a.prototype.setChild=function(c,g){return g===void 0&&(g=new a(this.vol,this,c)),this.children[c]=g,g.parent=this,this.length++,this.emit("child:add",g,this),g},a.prototype.deleteChild=function(c){delete this.children[c.getName()],this.length--,this.emit("child:delete",c,this)},a.prototype.getChild=function(c){if(Object.hasOwnProperty.call(this.children,c))return this.children[c]},a.prototype.getPath=function(){return this.steps.join(e.SEP)},a.prototype.getName=function(){return this.steps[this.steps.length-1]},a.prototype.walk=function(c,g,v){if(g===void 0&&(g=c.length),v===void 0&&(v=0),v>=c.length||v>=g)return this;var m=this.getChild(c[v]);return m?m.walk(c,g,v+1):null},a.prototype.toJSON=function(){return{steps:this.steps,ino:this.ino,children:Object.keys(this.children)}},a}(O.EventEmitter),e.Link=t,t=function(){function y(a,c,g,v){this.position=0,this.link=a,this.node=c,this.flags=g,this.fd=v}return y.prototype.getString=function(){return this.node.getString()},y.prototype.setString=function(a){this.node.setString(a)},y.prototype.getBuffer=function(){return this.node.getBuffer()},y.prototype.setBuffer=function(a){this.node.setBuffer(a)},y.prototype.getSize=function(){return this.node.getSize()},y.prototype.truncate=function(a){this.node.truncate(a)},y.prototype.seekTo=function(a){this.position=a},y.prototype.stats=function(){return Ft.default.build(this.node)},y.prototype.write=function(a,c,g,v){return c===void 0&&(c=0),g===void 0&&(g=a.length),typeof v!="number"&&(v=this.position),this.flags&p&&(v=this.getSize()),a=this.node.write(a,c,g,v),this.position=v+a,a},y.prototype.read=function(a,c,g,v){return c===void 0&&(c=0),g===void 0&&(g=a.byteLength),typeof v!="number"&&(v=this.position),a=this.node.read(a,c,g,v),this.position=v+a,a},y.prototype.chmod=function(a){this.node.chmod(a)},y.prototype.chown=function(a,c){this.node.chown(a,c)},y}(),e.File=t});D(bt);var Di=bt.Node,yr=C(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(n,r,o){var h=setTimeout.apply(null,arguments);return h&&typeof h=="object"&&typeof h.unref=="function"&&h.unref(),h}});D(yr);function Ot(){this.tail=this.head=null,this.length=0}Ot.prototype.push=function(t){t={data:t,next:null},0>>0);for(var e=this.head,n=0;e;)e.data.copy(t,n),n+=e.data.length,e=e.next;return t};var xi=_.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function te(t){if(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),t&&!xi(t))throw Error("Unknown encoding: "+t);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=Ui;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=ji;break;default:this.write=Mi;return}this.charBuffer=new _(6),this.charLength=this.charReceived=0}te.prototype.write=function(t){for(var e="";this.charLength;){if(e=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length,t.copy(this.charBuffer,this.charReceived,0,e),this.charReceived+=e,this.charReceived=n)this.charLength+=this.surrogateSize,e="";else{if(this.charReceived=this.charLength=0,t.length===0)return e;break}}this.detectIncompleteChar(t);var r=t.length;return this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,r),r-=this.charReceived),e+=t.toString(this.encoding,0,r),r=e.length-1,n=e.charCodeAt(r),55296<=n&&56319>=n?(n=this.surrogateSize,this.charLength+=n,this.charReceived+=n,this.charBuffer.copy(this.charBuffer,n,0,n),t.copy(this.charBuffer,0,0,n),e.substring(0,r)):e};te.prototype.detectIncompleteChar=function(t){for(var e=3<=t.length?3:t.length;0>5==6){this.charLength=2;break}if(2>=e&&n>>4==14){this.charLength=3;break}if(3>=e&&n>>3==30){this.charLength=4;break}}this.charReceived=e};te.prototype.end=function(t){var e="";return t&&t.length&&(e=this.write(t)),this.charReceived&&(t=this.encoding,e+=this.charBuffer.slice(0,this.charReceived).toString(t)),e};function Mi(t){return t.toString(this.encoding)}function Ui(t){this.charLength=(this.charReceived=t.length%2)?2:0}function ji(t){this.charLength=(this.charReceived=t.length%3)?3:0}I.ReadableState=gr;var T=Yn("stream");dt(I,O);function Yi(t,e,n){if(typeof t.prependListener=="function")return t.prependListener(e,n);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}function gr(t,e){t=t||{},this.objectMode=!!t.objectMode,e instanceof H&&(this.objectMode=this.objectMode||!!t.readableObjectMode),e=t.highWaterMark;var n=this.objectMode?16:16384;this.highWaterMark=e||e===0?e:n,this.highWaterMark=~~this.highWaterMark,this.buffer=new Ot,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.reading=this.endEmitted=this.ended=!1,this.sync=!0,this.resumeScheduled=this.readableListening=this.emittedReadable=this.needReadable=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.encoding=this.decoder=null,t.encoding&&(this.decoder=new te(t.encoding),this.encoding=t.encoding)}function I(t){if(!(this instanceof I))return new I(t);this._readableState=new gr(t,this),this.readable=!0,t&&typeof t.read=="function"&&(this._read=t.read),O.call(this)}I.prototype.push=function(t,e){var n=this._readableState;return n.objectMode||typeof t!="string"||(e=e||n.defaultEncoding,e!==n.encoding&&(t=_.from(t,e),e="")),mr(this,n,t,e,!1)};I.prototype.unshift=function(t){return mr(this,this._readableState,t,"",!0)};I.prototype.isPaused=function(){return this._readableState.flowing===!1};function mr(t,e,n,r,o){var h=n,l=null;if(st(h)||typeof h=="string"||h===null||h===void 0||e.objectMode||(l=new TypeError("Invalid non-string/buffer chunk")),h=l)t.emit("error",h);else if(n===null)e.reading=!1,e.ended||(e.decoder&&(n=e.decoder.end())&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length),e.ended=!0,me(t));else if(e.objectMode||n&&0=t||e.length===0&&e.ended)return 0;if(e.objectMode)return 1;if(t!==t)return e.flowing&&e.length?e.buffer.head.data.length:e.length;if(t>e.highWaterMark){var n=t;8388608<=n?n=8388608:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),e.highWaterMark=n}return t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0)}I.prototype.read=function(t){T("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return T("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Je(this):me(this),null;if(t=vr(t,e),t===0&&e.ended)return e.length===0&&Je(this),null;var r=e.needReadable;return T("need readable",r),(e.length===0||e.length-t=e.length)n=e.decoder?e.buffer.join(""):e.buffer.length===1?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear();else{if(n=e.buffer,e=e.decoder,th.length?h.length:t;if(o=l===h.length?o+h:o+h.slice(0,t),t-=l,t===0){l===h.length?(++r,n.head=e.next?e.next:n.tail=null):(n.head=e,e.data=h.slice(l));break}++r}n.length-=r,n=o}else{for(e=_.allocUnsafe(t),r=n.head,o=1,r.data.copy(e),t-=r.data.length;r=r.next;){if(h=r.data,l=t>h.length?h.length:t,h.copy(e,e.length-t,0,l),t-=l,t===0){l===h.length?(++o,n.head=r.next?r.next:n.tail=null):(n.head=r,r.data=h.slice(l));break}++o}n.length-=o,n=e}e=n}n=e}return n}function Je(t){var e=t._readableState;if(0arguments.length?e:t.apply(null,[e].concat(Qi.call(arguments,2)))}},Ir=C(function(t,e){function n(h,l,p){return p===void 0&&(p=function(y){return y}),function(){for(var y=[],a=0;a= 0x80 (not a basic code point)","invalid-input":"Invalid input"},jt=Math.floor,Qe=String.fromCharCode;function no(t,e){var n=t.split("@"),r="";1t)-((e!=0)<<5)}function ro(t){return no(t,function(e){if(to.test(e)){var n,r=[],o=[],h=0;for(n=e.length;h=l&&hc&&r.push(Qe(c))}for((h=n=r.length)&&r.push("-");h=o&&cjt((2147483647-y)/v))throw new RangeError(Lr.overflow);for(y+=(g-o)*v,o=g,l=0;l=a+26?26:g-a,!(m>1,y+=jt(y/a);455e&&(r=e),e=0;e"` \r\n '.split("")),be=["'"].concat(lo),Pr=["%","/","?",";","#"].concat(be),Dr=["/","?","#"],po=255,xr=/^[+a-z0-9A-Z_-]{0,63}$/,co=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ao={javascript:!0,"javascript:":!0},tn={javascript:!0,"javascript:":!0},Yt={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function _e(t,e,n){if(t&&yt(t)&&t instanceof nt)return t;var r=new nt;return r.parse(t,e,n),r}nt.prototype.parse=function(t,e,n){return Mr(this,t,e,n)};function Mr(t,e,n,r){if(!Rt(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?");if(o=o!==-1&&opo?"":t.hostname.toLowerCase(),l||(t.hostname=ro(t.hostname)),r=t.port?":"+t.port:"",t.host=(t.hostname||"")+r,t.href+=t.host,l&&(t.hostname=t.hostname.substr(1,t.hostname.length-2),o[0]!=="/"&&(o="/"+o))}if(!ao[h])for(r=0,e=be.length;rh.length&&h.unshift(""),e.pathname=h.join("/")}return e.search=t.search,e.query=t.query,e.host=t.host||"",e.auth=t.auth,e.hostname=t.hostname||t.host,e.port=t.port,(e.pathname||e.search)&&(e.path=(e.pathname||"")+(e.search||"")),e.slashes=e.slashes||t.slashes,e.href=e.format(),e}n=e.pathname&&e.pathname.charAt(0)==="/";var l=t.host||t.pathname&&t.pathname.charAt(0)==="/",p=n=l||n||e.host&&t.pathname;if(r=e.pathname&&e.pathname.split("/")||[],o=e.protocol&&!Yt[e.protocol],h=t.pathname&&t.pathname.split("/")||[],o&&(e.hostname="",e.port=null,e.host&&(r[0]===""?r[0]=e.host:r.unshift(e.host)),e.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(h[0]===""?h[0]=t.host:h.unshift(t.host)),t.host=null),n=n&&(h[0]===""||r[0]==="")),l)e.host=t.host||t.host===""?t.host:e.host,e.hostname=t.hostname||t.hostname===""?t.hostname:e.hostname,e.search=t.search,e.query=t.query,r=h;else if(h.length)r||(r=[]),r.pop(),r=r.concat(h),e.search=t.search,e.query=t.query;else if(t.search!=null)return o&&(e.hostname=e.host=r.shift(),o=e.host&&0p)p=l;else{for(;n(l,p);)p--;p=l.substr(0,p+1)}return p.replace(/^([a-zA-Z]+:|\.\/)/,"")}return h}Object.defineProperty(e,"__esModule",{value:!0}),e.unixify=r,e.correctPath=function(h){return r(h.replace(/^\\\\\?\\.:\\/,"\\"))};var o=Pt.platform==="win32"});D(jr);var Tt=C(function(t,e){function n(f,i){return i===void 0&&(i=x.default.cwd()),Kr(i,f)}function r(f,i){return typeof f=="function"?[o(),f]:[o(f),g(i)]}function o(f){return f===void 0&&(f={}),$({},Qr,f)}function h(f){return typeof f=="number"?$({},dn,{mode:f}):$({},dn,f)}function l(f,i,s,u){i===void 0&&(i=""),s===void 0&&(s=""),u===void 0&&(u="");var d="";switch(s&&(d=" '"+s+"'"),u&&(d+=" -> '"+u+"'"),f){case"ENOENT":return"ENOENT: no such file or directory, "+i+d;case"EBADF":return"EBADF: bad file descriptor, "+i+d;case"EINVAL":return"EINVAL: invalid argument, "+i+d;case"EPERM":return"EPERM: operation not permitted, "+i+d;case"EPROTO":return"EPROTO: protocol error, "+i+d;case"EEXIST":return"EEXIST: file already exists, "+i+d;case"ENOTDIR":return"ENOTDIR: not a directory, "+i+d;case"EISDIR":return"EISDIR: illegal operation on a directory, "+i+d;case"EACCES":return"EACCES: permission denied, "+i+d;case"ENOTEMPTY":return"ENOTEMPTY: directory not empty, "+i+d;case"EMFILE":return"EMFILE: too many open files, "+i+d;case"ENOSYS":return"ENOSYS: function not implemented, "+i+d;default:return f+": error occurred, "+i+d}}function p(f,i,s,u,d){return i===void 0&&(i=""),s===void 0&&(s=""),u===void 0&&(u=""),d===void 0&&(d=Error),i=new d(l(f,i,s,u)),i.code=f,i}function y(f){if(typeof f=="number")return f;if(typeof f=="string"){var i=mt[f];if(typeof i!="undefined")return i}throw new $t.TypeError("ERR_INVALID_OPT_VALUE","flags",f)}function a(f,i){if(i){var s=typeof i;switch(s){case"string":f=$({},f,{encoding:i});break;case"object":f=$({},f,i);break;default:throw TypeError("Expected options to be either an object or a string, but got "+s+" instead")}}else return f;return f.encoding!=="buffer"&&G.assertEncoding(f.encoding),f}function c(f){return function(i){return a(f,i)}}function g(f){if(typeof f!="function")throw TypeError(it.CB);return f}function v(f){return function(i,s){return typeof i=="function"?[f(),i]:[f(i),g(s)]}}function m(f){if(typeof f!="string"&&!A.Buffer.isBuffer(f)){try{if(!(f instanceof so.URL))throw new TypeError(it.PATH_STR)}catch(u){throw new TypeError(it.PATH_STR)}if(f.hostname!=="")throw new $t.TypeError("ERR_INVALID_FILE_URL_HOST",x.default.platform);f=f.pathname;for(var i=0;i>>0!==f)throw TypeError(it.FD)}function rt(f){if(typeof f=="string"&&+f==f)return+f;if(f instanceof Date)return f.getTime()/1e3;if(isFinite(f))return 0>f?Date.now()/1e3:f;throw Error("Cannot parse time: "+f)}function Nt(f){if(typeof f!="number")throw TypeError(it.UID)}function It(f){if(typeof f!="number")throw TypeError(it.GID)}function qr(f){f.emit("stop")}function J(f,i,s){if(!(this instanceof J))return new J(f,i,s);if(this._vol=f,s=$({},a(s,{})),s.highWaterMark===void 0&&(s.highWaterMark=65536),V.Readable.call(this,s),this.path=m(i),this.fd=s.fd===void 0?null:s.fd,this.flags=s.flags===void 0?"r":s.flags,this.mode=s.mode===void 0?438:s.mode,this.start=s.start,this.end=s.end,this.autoClose=s.autoClose===void 0?!0:s.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 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()})}function zr(){this.close()}function q(f,i,s){if(!(this instanceof q))return new q(f,i,s);if(this._vol=f,s=$({},a(s,{})),V.Writable.call(this,s),this.path=m(i),this.fd=s.fd===void 0?null:s.fd,this.flags=s.flags===void 0?"w":s.flags,this.mode=s.mode===void 0?438:s.mode,this.start=s.start,this.autoClose=s.autoClose===void 0?!0:!!s.autoClose,this.pos=void 0,this.bytesWritten=0,this.start!==void 0){if(typeof this.start!="number")throw new TypeError('"start" option must be a Number');if(0>this.start)throw Error('"start" must be >= zero');this.pos=this.start}s.encoding&&this.setDefaultEncoding(s.encoding),typeof this.fd!="number"&&this.open(),this.once("finish",function(){this.autoClose&&this.close()})}var Lt=k&&k.__extends||function(){function f(i,s){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var w in d)d.hasOwnProperty(w)&&(u[w]=d[w])},f(i,s)}return function(i,s){function u(){this.constructor=i}f(i,s),i.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Ee=k&&k.__spreadArrays||function(){for(var f=0,i=0,s=arguments.length;i>>0!==i)throw TypeError(it.FD);if(i=this.getFileByFd(i),!i)throw p("EBADF",s);return i},f.prototype.getNodeByIdOrCreate=function(i,s,u){if(typeof i=="number"){if(i=this.getFileByFd(i),!i)throw Error("File nto found");return i.node}var d=B(i),w=this.getLink(d);if(w)return w.getNode();if(s&X&&(s=this.getLinkParent(d)))return w=this.createLink(s,d[d.length-1],!1,u),w.getNode();throw p("ENOENT","getNodeByIdOrCreate",m(i))},f.prototype.wrapAsync=function(i,s,u){var d=this;g(u),Ut.default(function(){try{u(null,i.apply(d,s))}catch(w){u(w)}})},f.prototype._toJSON=function(i,s,u){var d;i===void 0&&(i=this.root),s===void 0&&(s={});var w=!0,E=i.children;i.getNode().isFile()&&(E=(d={},d[i.getName()]=i.parent.getChild(i.getName()),d),i=i.parent);for(var L in E){if(w=!1,E=i.getChild(L),!E)throw Error("_toJSON: unexpected undefined");d=E.getNode(),d.isFile()?(E=E.getPath(),u&&(E=sn(u,E)),s[E]=d.getString()):d.isDirectory()&&this._toJSON(E,s,u)}return i=i.getPath(),u&&(i=sn(u,i)),i&&w&&(s[i]=null),s},f.prototype.toJSON=function(i,s,u){s===void 0&&(s={}),u===void 0&&(u=!1);var d=[];if(i){i instanceof Array||(i=[i]);for(var w=0;w=this.maxFiles)throw p("EMFILE","open",i.getPath());var d=i;if(u&&(d=this.resolveSymlinks(i)),!d)throw p("ENOENT","open",i.getPath());if(u=d.getNode(),u.isDirectory()){if((s&(re|lt|kt))!==re)throw p("EISDIR","open",i.getPath())}else if(s&Gr)throw p("ENOTDIR","open",i.getPath());if(!(s&kt||u.canRead()))throw p("EACCES","open",i.getPath());return i=new this.props.File(i,u,s,this.newFdNumber()),this.fds[i.fd]=i,this.openFiles++,s&qt&&i.truncate(),i},f.prototype.openFile=function(i,s,u,d){d===void 0&&(d=!0);var w=S(i),E=d?this.getResolvedLink(w):this.getLink(w);if(!E&&s&X){var L=this.getResolvedLink(w.slice(0,w.length-1));if(!L)throw p("ENOENT","open",Z+w.join(Z));s&X&&typeof u=="number"&&(E=this.createLink(L,w[w.length-1],!1,u))}if(E)return this.openLink(E,s,d);throw p("ENOENT","open",i)},f.prototype.openBase=function(i,s,u,d){if(d===void 0&&(d=!0),s=this.openFile(i,s,u,d),!s)throw p("ENOENT","open",i);return s.fd},f.prototype.openSync=function(i,s,u){return u===void 0&&(u=438),u=j(u),i=m(i),s=y(s),this.openBase(i,s,u)},f.prototype.open=function(i,s,u,d){var w=u;typeof u=="function"&&(w=438,d=u),u=j(w||438),i=m(i),s=y(s),this.wrapAsync(this.openBase,[i,s,u],d)},f.prototype.closeFile=function(i){this.fds[i.fd]&&(this.openFiles--,delete this.fds[i.fd],this.releasedFds.push(i.fd))},f.prototype.closeSync=function(i){Vt(i),i=this.getFileByFdOrThrow(i,"close"),this.closeFile(i)},f.prototype.close=function(i,s){Vt(i),this.wrapAsync(this.closeSync,[i],s)},f.prototype.openFileOrGetById=function(i,s,u){if(typeof i=="number"){if(i=this.fds[i],!i)throw p("ENOENT");return i}return this.openFile(m(i),s,u)},f.prototype.readBase=function(i,s,u,d,w){return this.getFileByFdOrThrow(i).read(s,Number(u),Number(d),w)},f.prototype.readSync=function(i,s,u,d,w){return Vt(i),this.readBase(i,s,u,d,w)},f.prototype.read=function(i,s,u,d,w,E){var L=this;if(g(E),d===0)return x.default.nextTick(function(){E&&E(null,0,s)});Ut.default(function(){try{var Y=L.readBase(i,s,u,d,w);E(null,Y,s)}catch(pt){E(pt)}})},f.prototype.readFileBase=function(i,s,u){var d=typeof i=="number"&&i>>>0===i;if(!d){var w=m(i);if(w=S(w),(w=this.getResolvedLink(w))&&w.getNode().isDirectory())throw p("EISDIR","open",w.getPath());i=this.openSync(i,s)}try{var E=At(this.getFileByFdOrThrow(i).getBuffer(),u)}finally{d||this.closeSync(i)}return E},f.prototype.readFileSync=function(i,s){s=hn(s);var u=y(s.flag);return this.readFileBase(i,u,s.encoding)},f.prototype.readFile=function(i,s,u){u=v(hn)(s,u),s=u[0],u=u[1];var d=y(s.flag);this.wrapAsync(this.readFileBase,[i,d,s.encoding],u)},f.prototype.writeBase=function(i,s,u,d,w){return this.getFileByFdOrThrow(i,"write").write(s,u,d,w)},f.prototype.writeSync=function(i,s,u,d,w){Vt(i);var E=typeof s!="string";if(E){var L=(u||0)|0,Y=d;u=w}else var pt=d;return s=ft(s,pt),E?typeof Y=="undefined"&&(Y=s.length):(L=0,Y=s.length),this.writeBase(i,s,L,Y,u)},f.prototype.write=function(i,s,u,d,w,E){var L=this;Vt(i);var Y=typeof s,pt=typeof u,wn=typeof d,_n=typeof w;if(Y!=="string")if(pt==="function")var vt=u;else if(wn==="function"){var se=u|0;vt=d}else if(_n==="function"){se=u|0;var Kt=d;vt=w}else{se=u|0,Kt=d;var Re=w;vt=E}else if(pt==="function")vt=u;else if(wn==="function")Re=u,vt=d;else if(_n==="function"){Re=u;var ei=d;vt=w}var ue=ft(s,ei);Y!=="string"?typeof Kt=="undefined"&&(Kt=ue.length):(se=0,Kt=ue.length);var Oe=g(vt);Ut.default(function(){try{var En=L.writeBase(i,ue,se,Kt,Re);Y!=="string"?Oe(null,En,ue):Oe(null,En,s)}catch(ni){Oe(ni)}})},f.prototype.writeFileBase=function(i,s,u,d){var w=typeof i=="number";i=w?i:this.openBase(m(i),u,d),d=0;var E=s.length;u=u&zt?void 0:0;try{for(;0=i.nlink&&this.deleteNode(i)},f.prototype.unlinkSync=function(i){i=m(i),this.unlinkBase(i)},f.prototype.unlink=function(i,s){i=m(i),this.wrapAsync(this.unlinkBase,[i],s)},f.prototype.symlinkBase=function(i,s){var u=S(s),d=this.getLinkParent(u);if(!d)throw p("ENOENT","symlink",i,s);if(u=u[u.length-1],d.getChild(u))throw p("EEXIST","symlink",i,s);return s=d.createChild(u),s.getNode().makeSymlink(S(i)),s},f.prototype.symlinkSync=function(i,s){i=m(i),s=m(s),this.symlinkBase(i,s)},f.prototype.symlink=function(i,s,u,d){u=g(typeof u=="function"?u:d),i=m(i),s=m(s),this.wrapAsync(this.symlinkBase,[i,s],u)},f.prototype.realpathBase=function(i,s){var u=S(i);if(u=this.getResolvedLink(u),!u)throw p("ENOENT","realpath",i);return G.strToEncoding(u.getPath(),s)},f.prototype.realpathSync=function(i,s){return this.realpathBase(m(i),an(s).encoding)},f.prototype.realpath=function(i,s,u){u=Zr(s,u),s=u[0],u=u[1],i=m(i),this.wrapAsync(this.realpathBase,[i,s.encoding],u)},f.prototype.lstatBase=function(i,s){s===void 0&&(s=!1);var u=this.getLink(S(i));if(!u)throw p("ENOENT","lstat",i);return Ft.default.build(u.getNode(),s)},f.prototype.lstatSync=function(i,s){return this.lstatBase(m(i),o(s).bigint)},f.prototype.lstat=function(i,s,u){u=r(s,u),s=u[0],u=u[1],this.wrapAsync(this.lstatBase,[m(i),s.bigint],u)},f.prototype.statBase=function(i,s){s===void 0&&(s=!1);var u=this.getResolvedLink(S(i));if(!u)throw p("ENOENT","stat",i);return Ft.default.build(u.getNode(),s)},f.prototype.statSync=function(i,s){return this.statBase(m(i),o(s).bigint)},f.prototype.stat=function(i,s,u){u=r(s,u),s=u[0],u=u[1],this.wrapAsync(this.statBase,[m(i),s.bigint],u)},f.prototype.fstatBase=function(i,s){if(s===void 0&&(s=!1),i=this.getFileByFd(i),!i)throw p("EBADF","fstat");return Ft.default.build(i.node,s)},f.prototype.fstatSync=function(i,s){return this.fstatBase(i,o(s).bigint)},f.prototype.fstat=function(i,s,u){s=r(s,u),this.wrapAsync(this.fstatBase,[i,s[0].bigint],s[1])},f.prototype.renameBase=function(i,s){var u=this.getLink(S(i));if(!u)throw p("ENOENT","rename",i,s);var d=S(s),w=this.getLinkParent(d);if(!w)throw p("ENOENT","rename",i,s);(i=u.parent)&&i.deleteChild(u),u.steps=Ee(w.steps,[d[d.length-1]]),w.setChild(u.getName(),u)},f.prototype.renameSync=function(i,s){i=m(i),s=m(s),this.renameBase(i,s)},f.prototype.rename=function(i,s,u){i=m(i),s=m(s),this.wrapAsync(this.renameBase,[i,s],u)},f.prototype.existsBase=function(i){return!!this.statBase(i)},f.prototype.existsSync=function(i){try{return this.existsBase(m(i))}catch(s){return!1}},f.prototype.exists=function(i,s){var u=this,d=m(i);if(typeof s!="function")throw Error(it.CB);Ut.default(function(){try{s(u.existsBase(d))}catch(w){s(!1)}})},f.prototype.accessBase=function(i){this.getLinkOrThrow(i,"access")},f.prototype.accessSync=function(i,s){s===void 0&&(s=on),i=m(i),this.accessBase(i,s|0)},f.prototype.access=function(i,s,u){var d=on;typeof s!="function"&&(d=s|0,s=g(u)),i=m(i),this.wrapAsync(this.accessBase,[i,d],s)},f.prototype.appendFileSync=function(i,s,u){u===void 0&&(u=pn),u=cn(u),u.flag&&i>>>0!==i||(u.flag="a"),this.writeFileSync(i,s,u)},f.prototype.appendFile=function(i,s,u,d){d=Xr(u,d),u=d[0],d=d[1],u.flag&&i>>>0!==i||(u.flag="a"),this.writeFile(i,s,u,d)},f.prototype.readdirBase=function(i,s){var u=S(i);if(u=this.getResolvedLink(u),!u)throw p("ENOENT","readdir",i);if(!u.getNode().isDirectory())throw p("ENOTDIR","scandir",i);if(s.withFileTypes){var d=[];for(w in u.children)(i=u.getChild(w))&&d.push(We.default.build(i,s.encoding));return Se||s.encoding==="buffer"||d.sort(function(E,L){return E.nameL.name?1:0}),d}var w=[];for(d in u.children)w.push(G.strToEncoding(d,s.encoding));return Se||s.encoding==="buffer"||w.sort(),w},f.prototype.readdirSync=function(i,s){return s=gn(s),i=m(i),this.readdirBase(i,s)},f.prototype.readdir=function(i,s,u){u=$r(s,u),s=u[0],u=u[1],i=m(i),this.wrapAsync(this.readdirBase,[i,s],u)},f.prototype.readlinkBase=function(i,s){var u=this.getLinkOrThrow(i,"readlink").getNode();if(!u.isSymlink())throw p("EINVAL","readlink",i);return i=Z+u.symlink.join(Z),G.strToEncoding(i,s)},f.prototype.readlinkSync=function(i,s){return s=oe(s),i=m(i),this.readlinkBase(i,s.encoding)},f.prototype.readlink=function(i,s,u){u=un(s,u),s=u[0],u=u[1],i=m(i),this.wrapAsync(this.readlinkBase,[i,s.encoding],u)},f.prototype.fsyncBase=function(i){this.getFileByFdOrThrow(i,"fsync")},f.prototype.fsyncSync=function(i){this.fsyncBase(i)},f.prototype.fsync=function(i,s){this.wrapAsync(this.fsyncBase,[i],s)},f.prototype.fdatasyncBase=function(i){this.getFileByFdOrThrow(i,"fdatasync")},f.prototype.fdatasyncSync=function(i){this.fdatasyncBase(i)},f.prototype.fdatasync=function(i,s){this.wrapAsync(this.fdatasyncBase,[i],s)},f.prototype.ftruncateBase=function(i,s){this.getFileByFdOrThrow(i,"ftruncate").truncate(s)},f.prototype.ftruncateSync=function(i,s){this.ftruncateBase(i,s)},f.prototype.ftruncate=function(i,s,u){var d=typeof s=="number"?s:0;s=g(typeof s=="number"?u:s),this.wrapAsync(this.ftruncateBase,[i,d],s)},f.prototype.truncateBase=function(i,s){i=this.openSync(i,"r+");try{this.ftruncateSync(i,s)}finally{this.closeSync(i)}},f.prototype.truncateSync=function(i,s){if(i>>>0===i)return this.ftruncateSync(i,s);this.truncateBase(i,s)},f.prototype.truncate=function(i,s,u){var d=typeof s=="number"?s:0;if(s=g(typeof s=="number"?u:s),i>>>0===i)return this.ftruncate(i,d,s);this.wrapAsync(this.truncateBase,[i,d],s)},f.prototype.futimesBase=function(i,s,u){i=this.getFileByFdOrThrow(i,"futimes").node,i.atime=new Date(1e3*s),i.mtime=new Date(1e3*u)},f.prototype.futimesSync=function(i,s,u){this.futimesBase(i,rt(s),rt(u))},f.prototype.futimes=function(i,s,u,d){this.wrapAsync(this.futimesBase,[i,rt(s),rt(u)],d)},f.prototype.utimesBase=function(i,s,u){i=this.openSync(i,"r+");try{this.futimesBase(i,s,u)}finally{this.closeSync(i)}},f.prototype.utimesSync=function(i,s,u){this.utimesBase(m(i),rt(s),rt(u))},f.prototype.utimes=function(i,s,u,d){this.wrapAsync(this.utimesBase,[m(i),rt(s),rt(u)],d)},f.prototype.mkdirBase=function(i,s){var u=S(i);if(!u.length)throw p("EISDIR","mkdir",i);var d=this.getLinkParentAsDirOrThrow(i,"mkdir");if(u=u[u.length-1],d.getChild(u))throw p("EEXIST","mkdir",i);d.createChild(u,this.createNode(!0,s))},f.prototype.mkdirpBase=function(i,s){i=S(i);for(var u=this.root,d=0;dthis.prev.mtimeMs||s.nlink!==this.prev.nlink},i.prototype.start=function(s,u,d){u===void 0&&(u=!0),d===void 0&&(d=5007),this.filename=m(s),this.setTimeout=u?setTimeout:yr.default,this.interval=d,this.prev=this.vol.statSync(this.filename),this.loop()},i.prototype.stop=function(){clearTimeout(this.timeoutRef),x.default.nextTick(qr,this)},i}(O.EventEmitter);e.StatWatcher=mn;var z;Zt.inherits(J,V.Readable),e.ReadStream=J,J.prototype.open=function(){var f=this;this._vol.open(this.path,this.flags,this.mode,function(i,s){i?(f.autoClose&&f.destroy&&f.destroy(),f.emit("error",i)):(f.fd=s,f.emit("open",s),f.read())})},J.prototype._read=function(f){if(typeof this.fd!="number")return this.once("open",function(){this._read(f)});if(!this.destroyed){(!z||128>z.length-z.used)&&(z=A.bufferAllocUnsafe(this._readableState.highWaterMark),z.used=0);var i=z,s=Math.min(z.length-z.used,f),u=z.used;if(this.pos!==void 0&&(s=Math.min(this.end-this.pos+1,s)),0>=s)return this.push(null);var d=this;this._vol.read(this.fd,z,z.used,s,this.pos,function(w,E){w?(d.autoClose&&d.destroy&&d.destroy(),d.emit("error",w)):(w=null,0