/* ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. **************************************************************************** https://mths.be/punycode v1.4.1 by @mathias */ 'use strict';Object.defineProperty(exports,"__esModule",{value:!0});function __awaiter(a,b,c,d){return new (c||(c=Promise))(function(e,f){function g(a){try{l(d.next(a))}catch(m){f(m)}}function h(a){try{l(d["throw"](a))}catch(m){f(m)}}function l(a){a.done?e(a.value):(new c(function(b){b(a.value)})).then(g,h)}l((d=d.apply(a,b||[])).next())})} function __generator(a,b){function c(a){return function(b){return d([a,b])}}function d(c){if(f)throw new TypeError("Generator is already executing.");for(;e;)try{if(f=1,g&&(h=c[0]&2?g["return"]:c[0]?g["throw"]||((h=g["return"])&&h.call(g),0):g.next)&&!(h=h.call(g,c[1])).done)return h;if(g=0,h)c=[c[0]&2,h.value];switch(c[0]){case 0:case 1:h=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++;g=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop();continue;default:if(!(h=e.trys,h= 0h[0]&&c[1]=a.length&&(a=void 0);return{value:a&&a[c++],done:!a}}}} function __read(a,b){var c="function"===typeof Symbol&&a[Symbol.iterator];if(!c)return a;a=c.call(a);var d,e=[];try{for(;(void 0===b||0a;++a)lookup[a]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[a],revLookup["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(a)]=a;revLookup[45]=62;revLookup[95]=63} function toByteArray(a){inited||init();var b=a.length;if(0>16&255;d[f++]=g>>8&255;d[f++]=g&255}2===c?(g=revLookup[a.charCodeAt(b)]<<2|revLookup[a.charCodeAt(b+1)]>>4,d[f++]=g&255):1===c&&(g=revLookup[a.charCodeAt(b)]<< 10|revLookup[a.charCodeAt(b+1)]<<4|revLookup[a.charCodeAt(b+2)]>>2,d[f++]=g>>8&255,d[f++]=g&255);return d}function tripletToBase64(a){return lookup[a>>18&63]+lookup[a>>12&63]+lookup[a>>6&63]+lookup[a&63]}function encodeChunk(a,b,c){for(var d=[],e=b;eg?g:f+16383));1===c?(a=a[b-1],d+=lookup[a>>2],d+=lookup[a<<4&63],d+="=="):2===c&&(a=(a[b-2]<<8)+a[b-1],d+=lookup[a>>10],d+=lookup[a>>4&63],d+=lookup[a<<2&63],d+="=");e.push(d);return e.join("")} function read(a,b,c,d,e){var f=8*e-d-1;var g=(1<>1,l=-7;e=c?e-1:0;var k=c?-1:1,m=a[b+e];e+=k;c=m&(1<<-l)-1;m>>=-l;for(l+=f;0>=-l;for(l+=d;0>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0;f=d?0:f-1;var p=d?1:-1,r=0>b||0===b&&0>1/b?1:0;b=Math.abs(b);isNaN(b)||Infinity===b?(b=isNaN(b)?1:0,d=l):(d=Math.floor(Math.log(b)/Math.LN2),1>b*(g=Math.pow(2,-d))&&(d--,g*=2),b=1<=d+k?b+m/g:b+m*Math.pow(2,1-k),2<=b*g&&(d++,g/=2),d+k>=l?(b=0,d=l):1<=d+k?(b=(b*g-1)*Math.pow(2,e),d+=k):(b=b*Math.pow(2,k-1)*Math.pow(2,e),d=0));for(;8<=e;a[c+f]=b&255,f+=p,b/=256,e-=8);d=d<a)throw new RangeError('"size" argument must not be negative');}function alloc(a,b,c,d){assertSize(b);return 0>=b?createBuffer(a,b):void 0!==c?"string"===typeof d?createBuffer(a,b).fill(c,d):createBuffer(a,b).fill(c):createBuffer(a,b)}Buffer.alloc=function(a,b,c){return alloc(null,a,b,c)}; function allocUnsafe(a,b){assertSize(b);a=createBuffer(a,0>b?0:checked(b)|0);if(!Buffer.TYPED_ARRAY_SUPPORT)for(var c=0;cb.length?0:checked(b.length)|0;a=createBuffer(a,c);for(var d=0;dc||b.byteLength=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return a|0}function SlowBuffer(a){+a!=a&&(a=0);return Buffer.alloc(+a)}Buffer.isBuffer=isBuffer;function internalIsBuffer(a){return!(null==a||!a._isBuffer)} Buffer.compare=function(a,b){if(!internalIsBuffer(a)||!internalIsBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var c=a.length,d=b.length,e=0,f=Math.min(c,d);e>> 1;case "base64":return base64ToBytes(a).length;default:if(d)return utf8ToBytes(a).length;b=(""+b).toLowerCase();d=!0}}Buffer.byteLength=byteLength; function slowToString(a,b,c){var d=!1;if(void 0===b||0>b)b=0;if(b>this.length)return"";if(void 0===c||c>this.length)c=this.length;if(0>=c)return"";c>>>=0;b>>>=0;if(c<=b)return"";for(a||(a="utf8");;)switch(a){case "hex":return hexSlice(this,b,c);case "utf8":case "utf-8":return utf8Slice(this,b,c);case "ascii":return asciiSlice(this,b,c);case "latin1":case "binary":return latin1Slice(this,b,c);case "base64":return base64Slice(this,b,c);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return utf16leSlice(this, b,c);default:if(d)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase();d=!0}}Buffer.prototype._isBuffer=!0;function swap(a,b,c){var d=a[b];a[b]=a[c];a[c]=d}Buffer.prototype.swap16=function(){var a=this.length;if(0!==a%2)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var b=0;bb&&(a+=" ... "));return""}; Buffer.prototype.compare=function(a,b,c,d,e){if(!internalIsBuffer(a))throw new TypeError("Argument must be a Buffer");void 0===b&&(b=0);void 0===c&&(c=a?a.length:0);void 0===d&&(d=0);void 0===e&&(e=this.length);if(0>b||c>a.length||0>d||e>this.length)throw new RangeError("out of range index");if(d>=e&&b>=c)return 0;if(d>=e)return-1;if(b>=c)return 1;b>>>=0;c>>>=0;d>>>=0;e>>>=0;if(this===a)return 0;var f=e-d,g=c-b,h=Math.min(f,g);d=this.slice(d,e);a=a.slice(b,c);for(b=0;bc&&(c=-2147483648);c=+c;isNaN(c)&&(c=e?0:a.length-1);0>c&&(c=a.length+c);if(c>=a.length){if(e)return-1;c=a.length-1}else if(0>c)if(e)c=0;else return-1;"string"===typeof b&&(b=Buffer.from(b,d));if(internalIsBuffer(b))return 0===b.length?-1:arrayIndexOf(a,b,c,d,e);if("number"===typeof b)return b&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf? e?Uint8Array.prototype.indexOf.call(a,b,c):Uint8Array.prototype.lastIndexOf.call(a,b,c):arrayIndexOf(a,[b],c,d,e);throw new TypeError("val must be string, number or Buffer");} function arrayIndexOf(a,b,c,d,e){function f(a,b){return 1===g?a[b]:a.readUInt16BE(b*g)}var g=1,h=a.length,l=b.length;if(void 0!==d&&(d=String(d).toLowerCase(),"ucs2"===d||"ucs-2"===d||"utf16le"===d||"utf-16le"===d)){if(2>a.length||2>b.length)return-1;g=2;h/=2;l/=2;c/=2}if(e)for(d=-1;ch&&(c=h-l);0<=c;c--){h=!0;for(d=0;de&&(d=e)):d=e;e=b.length;if(0!==e%2)throw new TypeError("Invalid hex string");d>e/2&&(d=e/2);for(e=0;ee)c=e;if(0c||0>b)||b>this.length)throw new RangeError("Attempt to write outside buffer bounds");d||(d="utf8");for(e=!1;;)switch(d){case "hex":return hexWrite(this, a,b,c);case "utf8":case "utf-8":return utf8Write(this,a,b,c);case "ascii":return asciiWrite(this,a,b,c);case "latin1":case "binary":return latin1Write(this,a,b,c);case "base64":return base64Write(this,a,b,c);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return ucs2Write(this,a,b,c);default:if(e)throw new TypeError("Unknown encoding: "+d);d=(""+d).toLowerCase();e=!0}};Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}}; function base64Slice(a,b,c){return 0===b&&c===a.length?fromByteArray(a):fromByteArray(a.slice(b,c))} function utf8Slice(a,b,c){c=Math.min(a.length,c);for(var d=[];be&&(f=e);break;case 2:var h=a[b+1];128===(h&192)&&(e=(e&31)<<6|h&63,127e||57343 e&&(f=e))}null===f?(f=65533,g=1):65535>>10&1023|55296),f=56320|f&1023);d.push(f);b+=g}return decodeCodePointsArray(d)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(a){var b=a.length;if(b<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,a);for(var c="",d=0;db)b=0;if(!c||0>c||c>d)c=d;for(d="";ba?(a+=c,0>a&&(a=0)):a>c&&(a=c);0>b?(b+=c,0>b&&(b=0)):b>c&&(b=c);ba)throw new RangeError("offset is not uint");if(a+b>c)throw new RangeError("Trying to access beyond buffer length");} Buffer.prototype.readUIntLE=function(a,b,c){a|=0;b|=0;c||checkOffset(a,b,this.length);c=this[a];for(var d=1,e=0;++e=128*d&&(c-=Math.pow(2,8*b));return c};Buffer.prototype.readIntBE=function(a,b,c){a|=0;b|=0;c||checkOffset(a,b,this.length);c=b;for(var d=1,e=this[a+--c];0=128*d&&(e-=Math.pow(2,8*b));return e};Buffer.prototype.readInt8=function(a,b){b||checkOffset(a,1,this.length);return this[a]&128?-1*(255-this[a]+1):this[a]}; Buffer.prototype.readInt16LE=function(a,b){b||checkOffset(a,2,this.length);a=this[a]|this[a+1]<<8;return a&32768?a|4294901760:a};Buffer.prototype.readInt16BE=function(a,b){b||checkOffset(a,2,this.length);a=this[a+1]|this[a]<<8;return a&32768?a|4294901760:a};Buffer.prototype.readInt32LE=function(a,b){b||checkOffset(a,4,this.length);return this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24}; Buffer.prototype.readInt32BE=function(a,b){b||checkOffset(a,4,this.length);return this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]};Buffer.prototype.readFloatLE=function(a,b){b||checkOffset(a,4,this.length);return read(this,a,!0,23,4)};Buffer.prototype.readFloatBE=function(a,b){b||checkOffset(a,4,this.length);return read(this,a,!1,23,4)};Buffer.prototype.readDoubleLE=function(a,b){b||checkOffset(a,8,this.length);return read(this,a,!0,52,8)}; Buffer.prototype.readDoubleBE=function(a,b){b||checkOffset(a,8,this.length);return read(this,a,!1,52,8)};function checkInt(a,b,c,d,e,f){if(!internalIsBuffer(a))throw new TypeError('"buffer" argument must be a Buffer instance');if(b>e||ba.length)throw new RangeError("Index out of range");} Buffer.prototype.writeUIntLE=function(a,b,c,d){a=+a;b|=0;c|=0;d||checkInt(this,a,b,c,Math.pow(2,8*c)-1,0);d=1;var e=0;for(this[b]=a&255;++eb&&(b=65535+b+1);for(var e=0,f=Math.min(a.length-c,2);e>>8*(d?e:1-e)}Buffer.prototype.writeUInt16LE=function(a,b,c){a=+a;b|=0;c||checkInt(this,a,b,2,65535,0);Buffer.TYPED_ARRAY_SUPPORT?(this[b]=a&255,this[b+1]=a>>>8):objectWriteUInt16(this,a,b,!0);return b+2}; Buffer.prototype.writeUInt16BE=function(a,b,c){a=+a;b|=0;c||checkInt(this,a,b,2,65535,0);Buffer.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a&255):objectWriteUInt16(this,a,b,!1);return b+2};function objectWriteUInt32(a,b,c,d){0>b&&(b=4294967295+b+1);for(var e=0,f=Math.min(a.length-c,4);e>>8*(d?e:3-e)&255} Buffer.prototype.writeUInt32LE=function(a,b,c){a=+a;b|=0;c||checkInt(this,a,b,4,4294967295,0);Buffer.TYPED_ARRAY_SUPPORT?(this[b+3]=a>>>24,this[b+2]=a>>>16,this[b+1]=a>>>8,this[b]=a&255):objectWriteUInt32(this,a,b,!0);return b+4};Buffer.prototype.writeUInt32BE=function(a,b,c){a=+a;b|=0;c||checkInt(this,a,b,4,4294967295,0);Buffer.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a&255):objectWriteUInt32(this,a,b,!1);return b+4}; Buffer.prototype.writeIntLE=function(a,b,c,d){a=+a;b|=0;d||(d=Math.pow(2,8*c-1),checkInt(this,a,b,c,d-1,-d));d=0;var e=1,f=0;for(this[b]=a&255;++da&&0===f&&0!==this[b+d-1]&&(f=1),this[b+d]=(a/e>>0)-f&255;return b+c};Buffer.prototype.writeIntBE=function(a,b,c,d){a=+a;b|=0;d||(d=Math.pow(2,8*c-1),checkInt(this,a,b,c,d-1,-d));d=c-1;var e=1,f=0;for(this[b+d]=a&255;0<=--d&&(e*=256);)0>a&&0===f&&0!==this[b+d+1]&&(f=1),this[b+d]=(a/e>>0)-f&255;return b+c}; Buffer.prototype.writeInt8=function(a,b,c){a=+a;b|=0;c||checkInt(this,a,b,1,127,-128);Buffer.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));0>a&&(a=255+a+1);this[b]=a&255;return b+1};Buffer.prototype.writeInt16LE=function(a,b,c){a=+a;b|=0;c||checkInt(this,a,b,2,32767,-32768);Buffer.TYPED_ARRAY_SUPPORT?(this[b]=a&255,this[b+1]=a>>>8):objectWriteUInt16(this,a,b,!0);return b+2}; Buffer.prototype.writeInt16BE=function(a,b,c){a=+a;b|=0;c||checkInt(this,a,b,2,32767,-32768);Buffer.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a&255):objectWriteUInt16(this,a,b,!1);return b+2};Buffer.prototype.writeInt32LE=function(a,b,c){a=+a;b|=0;c||checkInt(this,a,b,4,2147483647,-2147483648);Buffer.TYPED_ARRAY_SUPPORT?(this[b]=a&255,this[b+1]=a>>>8,this[b+2]=a>>>16,this[b+3]=a>>>24):objectWriteUInt32(this,a,b,!0);return b+4}; Buffer.prototype.writeInt32BE=function(a,b,c){a=+a;b|=0;c||checkInt(this,a,b,4,2147483647,-2147483648);0>a&&(a=4294967295+a+1);Buffer.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a&255):objectWriteUInt32(this,a,b,!1);return b+4};function checkIEEE754(a,b,c,d,e,f){if(c+d>a.length)throw new RangeError("Index out of range");if(0>c)throw new RangeError("Index out of range");}function writeFloat(a,b,c,d,e){e||checkIEEE754(a,b,c,4);write(a,b,c,d,23,4);return c+4} Buffer.prototype.writeFloatLE=function(a,b,c){return writeFloat(this,a,b,!0,c)};Buffer.prototype.writeFloatBE=function(a,b,c){return writeFloat(this,a,b,!1,c)};function writeDouble(a,b,c,d,e){e||checkIEEE754(a,b,c,8);write(a,b,c,d,52,8);return c+8}Buffer.prototype.writeDoubleLE=function(a,b,c){return writeDouble(this,a,b,!0,c)};Buffer.prototype.writeDoubleBE=function(a,b,c){return writeDouble(this,a,b,!1,c)}; Buffer.prototype.copy=function(a,b,c,d){c||(c=0);d||0===d||(d=this.length);b>=a.length&&(b=a.length);b||(b=0);0b)throw new RangeError("targetStart out of bounds");if(0>c||c>=this.length)throw new RangeError("sourceStart out of bounds");if(0>d)throw new RangeError("sourceEnd out of bounds");d>this.length&&(d=this.length);a.length-b e||!Buffer.TYPED_ARRAY_SUPPORT)for(d=0;de&&(a=e)}if(void 0!==d&&"string"!==typeof d)throw new TypeError("encoding must be a string");if("string"===typeof d&&!Buffer.isEncoding(d))throw new TypeError("Unknown encoding: "+d);}else"number"===typeof a&&(a&=255);if(0>b||this.length>>=0;c=void 0===c?this.length:c>>>0;a||(a=0);if("number"===typeof a)for(d=b;da.length)return"";for(;0!==a.length%4;)a+="=";return a}function stringtrim(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} function toHex(a){return 16>a?"0"+a.toString(16):a.toString(16)} function utf8ToBytes(a,b){b=b||Infinity;for(var c,d=a.length,e=null,f=[],g=0;gc){if(!e){if(56319c){-1<(b-=3)&&f.push(239,191,189);e=c;continue}c=(e-55296<<10|c-56320)+65536}else e&&-1<(b-=3)&&f.push(239,191,189);e=null;if(128>c){if(0>--b)break;f.push(c)}else if(2048>c){if(0>(b-=2))break;f.push(c>>6|192,c&63|128)}else if(65536>c){if(0> (b-=3))break;f.push(c>>12|224,c>>6&63|128,c&63|128)}else if(1114112>c){if(0>(b-=4))break;f.push(c>>18|240,c>>12&63|128,c>>6&63|128,c&63|128)}else throw Error("Invalid code point");}return f}function asciiToBytes(a){for(var b=[],c=0;c(b-=2));++f)c=a.charCodeAt(f),d=c>>8,c%=256,e.push(c),e.push(d);return e}function base64ToBytes(a){return toByteArray(base64clean(a))} function blitBuffer(a,b,c,d){for(var e=0;e=b.length||e>=a.length);++e)b[e+c]=a[e];return e}function isnan(a){return a!==a}function isBuffer(a){return null!=a&&(!!a._isBuffer||isFastBuffer(a)||isSlowBuffer(a))}function isFastBuffer(a){return!!a.constructor&&"function"===typeof a.constructor.isBuffer&&a.constructor.isBuffer(a)}function isSlowBuffer(a){return"function"===typeof a.readFloatLE&&"function"===typeof a.slice&&isFastBuffer(a.slice(0,0))} var bufferEs6=Object.freeze({__proto__:null,INSPECT_MAX_BYTES,kMaxLength:_kMaxLength,Buffer,SlowBuffer,isBuffer}),buffer=createCommonjsModule(function(a,b){function c(a){for(var b=[],c=1;cb&&(c--,b+=1E9));return[c,b]}var startTime=new Date;function uptime(){return(new Date-startTime)/1E3} var process={nextTick,title,browser,env,argv,version,versions,on,addListener,once,off,removeListener,removeAllListeners,emit,binding,cwd,chdir,umask,hrtime,platform,release,config,uptime},inherits,inherits$1=inherits="function"===typeof Object.create?function(a,b){a.super_=b;a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:function(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},formatRegExp= /%[sdj%]/g; function format(a){if(!isString(a)){for(var b=[],c=0;c=e)return a;switch(a){case "%s":return String(d[c++]);case "%d":return Number(d[c++]);case "%j":try{return JSON.stringify(d[c++])}catch(h){return"[Circular]"}default:return a}});for(var f=d[c];cc)return isRegExp(b)?a.stylize(RegExp.prototype.toString.call(b),"regexp"):a.stylize("[Object]","special");a.seen.push(b);e=g?formatArray(a,b,c,f,e):e.map(function(d){return formatProperty(a,b,c,f,d,g)});a.seen.pop();return reduceToSingleString(e,d,h)} function formatPrimitive(a,b){if(isUndefined(b))return a.stylize("undefined","undefined");if(isString(b))return b="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'",a.stylize(b,"string");if(isNumber(b))return a.stylize(""+b,"number");if(isBoolean(b))return a.stylize(""+b,"boolean");if(isNull(b))return a.stylize("null","null")}function formatError(a){return"["+Error.prototype.toString.call(a)+"]"} function formatArray(a,b,c,d,e){for(var f=[],g=0,h=b.length;ga.seen.indexOf(b.value)?(h=isNull(c)?formatValue(a,b.value,null):formatValue(a,b.value,c-1),-1a?"0"+a.toString(10):a.toString(10)}var months="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "); function timestamp(){var a=new Date,b=[pad(a.getHours()),pad(a.getMinutes()),pad(a.getSeconds())].join(":");return[a.getDate(),months[a.getMonth()],b].join(" ")}function log(){console.log("%s - %s",timestamp(),format.apply(null,arguments))}function _extend(a,b){if(!b||!isObject(b))return a;for(var c=Object.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}function hasOwnProperty(a,b){return Object.prototype.hasOwnProperty.call(a,b)} var util={inherits:inherits$1,_extend,log,isBuffer:isBuffer$1,isPrimitive,isFunction,isError,isDate,isObject,isRegExp,isUndefined,isSymbol,isString,isNumber,isNullOrUndefined,isNull,isBoolean,isArray:isArray$1,inspect,deprecate,format,debuglog};function compare(a,b){if(a===b)return 0;for(var c=a.length,d=b.length,e=0,f=Math.min(c,d);e 0 and < 65536");e("ERR_SOCKET_BAD_TYPE","Bad socket type specified. Valid types are: udp4, udp6");e("ERR_SOCKET_CANNOT_SEND","Unable to send data");e("ERR_SOCKET_CLOSED","Socket is closed");e("ERR_SOCKET_DGRAM_NOT_RUNNING","Not running");e("ERR_STDERR_CLOSE","process.stderr cannot be closed");e("ERR_STDOUT_CLOSE","process.stdout cannot be closed");e("ERR_STREAM_WRAP","Stream has StringDecoder set or is in objectMode");e("ERR_TLS_CERT_ALTNAME_INVALID","Hostname/IP does not match certificate's altnames: %s"); e("ERR_TLS_DH_PARAM_SIZE",function(a){return"DH parameter size "+a+" is less than 2048"});e("ERR_TLS_HANDSHAKE_TIMEOUT","TLS handshake timeout");e("ERR_TLS_RENEGOTIATION_FAILED","Failed to renegotiate");e("ERR_TLS_REQUIRED_SERVER_NAME",'"servername" is required parameter for Server.addContext');e("ERR_TLS_SESSION_ATTACK","TSL session renegotiation attack detected");e("ERR_TRANSFORM_ALREADY_TRANSFORMING","Calling transform done when still transforming");e("ERR_TRANSFORM_WITH_LENGTH_0","Calling transform done when writableState.length != 0"); e("ERR_UNKNOWN_ENCODING","Unknown encoding: %s");e("ERR_UNKNOWN_SIGNAL","Unknown signal: %s");e("ERR_UNKNOWN_STDIN_TYPE","Unknown stdin file type");e("ERR_UNKNOWN_STREAM_TYPE","Unknown stream file type");e("ERR_V8BREAKITERATOR","Full ICU data not installed. See https://github.com/nodejs/node/wiki/Intl")});unwrapExports(errors); var errors_1=errors.AssertionError,errors_2=errors.message,errors_3=errors.E,errors_4=errors.Error,errors_5=errors.TypeError,errors_6=errors.RangeError,encoding=createCommonjsModule(function(a,b){Object.defineProperty(b,"__esModule",{value:!0});b.ENCODING_UTF8="utf8";b.assertEncoding=function(a){if(a&&!buffer.Buffer.isEncoding(a))throw new errors.TypeError("ERR_INVALID_OPT_VALUE_ENCODING",a);};b.strToEncoding=function(a,d){return d&&d!==b.ENCODING_UTF8?"buffer"===d?new buffer.Buffer(a):(new buffer.Buffer(a)).toString(d): a}});unwrapExports(encoding); var encoding_1=encoding.ENCODING_UTF8,encoding_2=encoding.assertEncoding,encoding_3=encoding.strToEncoding,Dirent_1=createCommonjsModule(function(a,b){Object.defineProperty(b,"__esModule",{value:!0});var c=constants.constants.S_IFMT,d=constants.constants.S_IFDIR,e=constants.constants.S_IFREG,f=constants.constants.S_IFBLK,g=constants.constants.S_IFCHR,h=constants.constants.S_IFLNK,l=constants.constants.S_IFIFO,k=constants.constants.S_IFSOCK;a=function(){function a(){this.name="";this.mode=0}a.build= function(b,c){var d=new a,e=b.getNode().mode;d.name=encoding.strToEncoding(b.getName(),c);d.mode=e;return d};a.prototype._checkModeProperty=function(a){return(this.mode&c)===a};a.prototype.isDirectory=function(){return this._checkModeProperty(d)};a.prototype.isFile=function(){return this._checkModeProperty(e)};a.prototype.isBlockDevice=function(){return this._checkModeProperty(f)};a.prototype.isCharacterDevice=function(){return this._checkModeProperty(g)};a.prototype.isSymbolicLink=function(){return this._checkModeProperty(h)}; a.prototype.isFIFO=function(){return this._checkModeProperty(l)};a.prototype.isSocket=function(){return this._checkModeProperty(k)};return a}();b.Dirent=a;b.default=a});unwrapExports(Dirent_1);var Dirent_2=Dirent_1.Dirent;function normalizeArray(a,b){for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a} var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,splitPath=function(a){return splitPathRe.exec(a).slice(1)};function resolve(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){var d=0<=c?arguments[c]:"/";if("string"!==typeof d)throw new TypeError("Arguments to path.resolve must be strings");d&&(a=d+"/"+a,b="/"===d.charAt(0))}a=normalizeArray(filter(a.split("/"),function(a){return!!a}),!b).join("/");return(b?"/":"")+a||"."} function normalize(a){var b=isAbsolute(a),c="/"===substr(a,-1);(a=normalizeArray(filter(a.split("/"),function(a){return!!a}),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a}function isAbsolute(a){return"/"===a.charAt(0)}function join(){var a=Array.prototype.slice.call(arguments,0);return normalize(filter(a,function(a,c){if("string"!==typeof a)throw new TypeError("Arguments to path.join must be strings");return a}).join("/"))} function relative(a,b){function c(a){for(var b=0;bc?[]:a.slice(b,c-b+1)}a=resolve(a).substr(1);b=resolve(b).substr(1);a=c(a.split("/"));b=c(b.split("/"));for(var d=Math.min(a.length,b.length),e=d,f=0;fb&&(b=a.length+b);return a.substr(b,c)},setImmediate_1=createCommonjsModule(function(a,b){Object.defineProperty(b,"__esModule",{value:!0});a="function"===typeof setImmediate?setImmediate.bind(commonjsGlobal):setTimeout.bind(commonjsGlobal);b.default=a});unwrapExports(setImmediate_1); var process_1=createCommonjsModule(function(a,b){function c(){var a=process;a=a||{};a.getuid||(a.getuid=function(){return 0});a.getgid||(a.getgid=function(){return 0});a.cwd||(a.cwd=function(){return"/"});a.nextTick||(a.nextTick=setImmediate_1.default);a.emitWarning||(a.emitWarning=function(a,b){console.warn(""+b+(b?": ":"")+a)});a.env||(a.env={});return a}Object.defineProperty(b,"__esModule",{value:!0});b.createProcess=c;b.default=c()});unwrapExports(process_1); var process_2=process_1.createProcess,domain;function EventHandlers(){}EventHandlers.prototype=Object.create(null);function EventEmitter(){EventEmitter.init.call(this)}EventEmitter.EventEmitter=EventEmitter;EventEmitter.usingDomains=!1;EventEmitter.prototype.domain=void 0;EventEmitter.prototype._events=void 0;EventEmitter.prototype._maxListeners=void 0;EventEmitter.defaultMaxListeners=10; EventEmitter.init=function(){this.domain=null;this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new EventHandlers,this._eventsCount=0);this._maxListeners=this._maxListeners||void 0};EventEmitter.prototype.setMaxListeners=function(a){if("number"!==typeof a||0>a||isNaN(a))throw new TypeError('"n" argument must be a positive number');this._maxListeners=a;return this}; function $getMaxListeners(a){return void 0===a._maxListeners?EventEmitter.defaultMaxListeners:a._maxListeners}EventEmitter.prototype.getMaxListeners=function(){return $getMaxListeners(this)};function emitNone(a,b,c){if(b)a.call(c);else{b=a.length;a=arrayClone(a,b);for(var d=0;dc&&(f.warned=!0,c=Error("Possible EventEmitter memory leak detected. "+f.length+" "+b+" listeners added. Use emitter.setMaxListeners() to increase limit"), c.name="MaxListenersExceededWarning",c.emitter=a,c.type=b,c.count=f.length,emitWarning(c))):(e[b]=c,++a._eventsCount);return a}function emitWarning(a){"function"===typeof console.warn?console.warn(a):console.log(a)}EventEmitter.prototype.addListener=function(a,b){return _addListener(this,a,b,!1)};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.prependListener=function(a,b){return _addListener(this,a,b,!0)}; function _onceWrap(a,b,c){function d(){a.removeListener(b,d);e||(e=!0,c.apply(a,arguments))}var e=!1;d.listener=c;return d}EventEmitter.prototype.once=function(a,b){if("function"!==typeof b)throw new TypeError('"listener" argument must be a function');this.on(a,_onceWrap(this,a,b));return this};EventEmitter.prototype.prependOnceListener=function(a,b){if("function"!==typeof b)throw new TypeError('"listener" argument must be a function');this.prependListener(a,_onceWrap(this,a,b));return this}; EventEmitter.prototype.removeListener=function(a,b){var c;if("function"!==typeof b)throw new TypeError('"listener" argument must be a function');var d=this._events;if(!d)return this;var e=d[a];if(!e)return this;if(e===b||e.listener&&e.listener===b)0===--this._eventsCount?this._events=new EventHandlers:(delete d[a],d.removeListener&&this.emit("removeListener",a,e.listener||b));else if("function"!==typeof e){var f=-1;for(c=e.length;0f)return this;if(1===e.length){e[0]=void 0;if(0===--this._eventsCount)return this._events=new EventHandlers,this;delete d[a]}else spliceOne(e,f);d.removeListener&&this.emit("removeListener",a,g||b)}return this}; EventEmitter.prototype.removeAllListeners=function(a){var b=this._events;if(!b)return this;if(!b.removeListener)return 0===arguments.length?(this._events=new EventHandlers,this._eventsCount=0):b[a]&&(0===--this._eventsCount?this._events=new EventHandlers:delete b[a]),this;if(0===arguments.length){b=Object.keys(b);for(var c=0,d;cthis.buf.length){var e=buffer.bufferAllocUnsafe(d+ c);this.buf.copy(e,0,0,this.buf.length);this.buf=e}a.copy(this.buf,d,b,b+c);this.touch();return c};b.prototype.read=function(a,b,c,d){void 0===b&&(b=0);void 0===c&&(c=a.byteLength);void 0===d&&(d=0);this.buf||(this.buf=buffer.bufferAllocUnsafe(0));c>a.byteLength&&(c=a.byteLength);c+d>this.buf.length&&(c=this.buf.length-d);this.buf.copy(a,b,d,d+c);return c};b.prototype.truncate=function(a){void 0===a&&(a=0);if(a)if(this.buf||(this.buf=buffer.bufferAllocUnsafe(0)),a<=this.buf.length)this.buf=this.buf.slice(0, a);else{var b=buffer.bufferAllocUnsafe(0);this.buf.copy(b);b.fill(0,a)}else this.buf=buffer.bufferAllocUnsafe(0);this.touch()};b.prototype.chmod=function(a){this.perm=a;this.mode=this.mode&-512|a;this.touch()};b.prototype.chown=function(a,b){this.uid=a;this.gid=b;this.touch()};b.prototype.touch=function(){this.mtime=new Date;this.emit("change",this)};b.prototype.canRead=function(a,b){void 0===a&&(a=process_1.default.getuid());void 0===b&&(b=process_1.default.getgid());return this.perm&4||b===this.gid&& this.perm&32||a===this.uid&&this.perm&256?!0:!1};b.prototype.canWrite=function(a,b){void 0===a&&(a=process_1.default.getuid());void 0===b&&(b=process_1.default.getgid());return this.perm&2||b===this.gid&&this.perm&16||a===this.uid&&this.perm&128?!0:!1};b.prototype.del=function(){this.emit("delete",this)};b.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()}};return b}(EventEmitter.EventEmitter);b.Node=a;a=function(a){function d(b,c,d){var e=a.call(this)||this;e.children={};e.steps=[];e.ino=0;e.length=0;e.vol=b;e.parent=c;e.steps=c?c.steps.concat([d]):[d];return e}c(d,a);d.prototype.setNode=function(a){this.node=a;this.ino=a.ino};d.prototype.getNode=function(){return this.node};d.prototype.createChild=function(a,b){void 0===b&&(b=this.vol.createNode());var c=new d(this.vol,this,a);c.setNode(b);b.isDirectory(); this.setChild(a,c);return c};d.prototype.setChild=function(a,b){void 0===b&&(b=new d(this.vol,this,a));this.children[a]=b;b.parent=this;this.length++;this.emit("child:add",b,this);return b};d.prototype.deleteChild=function(a){delete this.children[a.getName()];this.length--;this.emit("child:delete",a,this)};d.prototype.getChild=function(a){if(Object.hasOwnProperty.call(this.children,a))return this.children[a]};d.prototype.getPath=function(){return this.steps.join(b.SEP)};d.prototype.getName=function(){return this.steps[this.steps.length- 1]};d.prototype.walk=function(a,b,c){void 0===b&&(b=a.length);void 0===c&&(c=0);if(c>=a.length||c>=b)return this;var d=this.getChild(a[c]);return d?d.walk(a,b,c+1):null};d.prototype.toJSON=function(){return{steps:this.steps,ino:this.ino,children:Object.keys(this.children)}};return d}(EventEmitter.EventEmitter);b.Link=a;a=function(){function a(a,b,c,d){this.position=0;this.link=a;this.node=b;this.flags=c;this.fd=d}a.prototype.getString=function(a){return this.node.getString()};a.prototype.setString= function(a){this.node.setString(a)};a.prototype.getBuffer=function(){return this.node.getBuffer()};a.prototype.setBuffer=function(a){this.node.setBuffer(a)};a.prototype.getSize=function(){return this.node.getSize()};a.prototype.truncate=function(a){this.node.truncate(a)};a.prototype.seekTo=function(a){this.position=a};a.prototype.stats=function(){return Stats_1.default.build(this.node)};a.prototype.write=function(a,b,c,d){void 0===b&&(b=0);void 0===c&&(c=a.length);"number"!==typeof d&&(d=this.position); this.flags&h&&(d=this.getSize());a=this.node.write(a,b,c,d);this.position=d+a;return a};a.prototype.read=function(a,b,c,d){void 0===b&&(b=0);void 0===c&&(c=a.byteLength);"number"!==typeof d&&(d=this.position);a=this.node.read(a,b,c,d);this.position=d+a;return a};a.prototype.chmod=function(a){this.node.chmod(a)};a.prototype.chown=function(a,b){this.node.chown(a,b)};return a}();b.File=a});unwrapExports(node); var node_1=node.SEP,node_2=node.Node,node_3=node.Link,node_4=node.File,setTimeoutUnref_1=createCommonjsModule(function(a,b){Object.defineProperty(b,"__esModule",{value:!0});b.default=function(a,b,e){var c=setTimeout.apply(null,arguments);c&&"object"===typeof c&&"function"===typeof c.unref&&c.unref();return c}});unwrapExports(setTimeoutUnref_1);function BufferList(){this.tail=this.head=null;this.length=0} BufferList.prototype.push=function(a){a={data:a,next:null};0>>0);for(var b=this.head,c=0;b;)b.data.copy(a,c),c+=b.data.length,b=b.next;return a}; var isBufferEncoding=Buffer.isEncoding||function(a){switch(a&&a.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 assertEncoding(a){if(a&&!isBufferEncoding(a))throw Error("Unknown encoding: "+a);} function StringDecoder(a){this.encoding=(a||"utf8").toLowerCase().replace(/[-_]/,"");assertEncoding(a);switch(this.encoding){case "utf8":this.surrogateSize=3;break;case "ucs2":case "utf16le":this.surrogateSize=2;this.detectIncompleteChar=utf16DetectIncompleteChar;break;case "base64":this.surrogateSize=3;this.detectIncompleteChar=base64DetectIncompleteChar;break;default:this.write=passThroughWrite;return}this.charBuffer=new Buffer(6);this.charLength=this.charReceived=0} StringDecoder.prototype.write=function(a){for(var b="";this.charLength;){b=a.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:a.length;a.copy(this.charBuffer,this.charReceived,0,b);this.charReceived+=b;if(this.charReceived=c)this.charLength+=this.surrogateSize,b="";else{this.charReceived=this.charLength=0;if(0=== a.length)return b;break}}this.detectIncompleteChar(a);var d=a.length;this.charLength&&(a.copy(this.charBuffer,0,a.length-this.charReceived,d),d-=this.charReceived);b+=a.toString(this.encoding,0,d);d=b.length-1;c=b.charCodeAt(d);return 55296<=c&&56319>=c?(c=this.surrogateSize,this.charLength+=c,this.charReceived+=c,this.charBuffer.copy(this.charBuffer,c,0,c),a.copy(this.charBuffer,0,0,c),b.substring(0,d)):b}; StringDecoder.prototype.detectIncompleteChar=function(a){for(var b=3<=a.length?3:a.length;0>5){this.charLength=2;break}if(2>=b&&14==c>>4){this.charLength=3;break}if(3>=b&&30==c>>3){this.charLength=4;break}}this.charReceived=b};StringDecoder.prototype.end=function(a){var b="";a&&a.length&&(b=this.write(a));this.charReceived&&(a=this.encoding,b+=this.charBuffer.slice(0,this.charReceived).toString(a));return b}; function passThroughWrite(a){return a.toString(this.encoding)}function utf16DetectIncompleteChar(a){this.charLength=(this.charReceived=a.length%2)?2:0}function base64DetectIncompleteChar(a){this.charLength=(this.charReceived=a.length%3)?3:0}Readable.ReadableState=ReadableState;var debug=debuglog("stream");inherits$1(Readable,EventEmitter); function prependListener(a,b,c){if("function"===typeof a.prependListener)return a.prependListener(b,c);if(a._events&&a._events[b])Array.isArray(a._events[b])?a._events[b].unshift(c):a._events[b]=[c,a._events[b]];else a.on(b,c)}function listenerCount$1(a,b){return a.listeners(b).length} function ReadableState(a,b){a=a||{};this.objectMode=!!a.objectMode;b instanceof Duplex&&(this.objectMode=this.objectMode||!!a.readableObjectMode);b=a.highWaterMark;var c=this.objectMode?16:16384;this.highWaterMark=b||0===b?b:c;this.highWaterMark=~~this.highWaterMark;this.buffer=new BufferList;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=a.defaultEncoding||"utf8";this.ranOut=!1;this.awaitDrain=0;this.readingMore=!1;this.encoding=this.decoder=null;a.encoding&&(this.decoder=new StringDecoder(a.encoding),this.encoding=a.encoding)}function Readable(a){if(!(this instanceof Readable))return new Readable(a);this._readableState=new ReadableState(a,this);this.readable=!0;a&&"function"===typeof a.read&&(this._read=a.read);EventEmitter.call(this)} Readable.prototype.push=function(a,b){var c=this._readableState;c.objectMode||"string"!==typeof a||(b=b||c.defaultEncoding,b!==c.encoding&&(a=Buffer.from(a,b),b=""));return readableAddChunk(this,c,a,b,!1)};Readable.prototype.unshift=function(a){return readableAddChunk(this,this._readableState,a,"",!0)};Readable.prototype.isPaused=function(){return!1===this._readableState.flowing}; function readableAddChunk(a,b,c,d,e){var f=chunkInvalid(b,c);if(f)a.emit("error",f);else if(null===c)b.reading=!1,onEofChunk(a,b);else if(b.objectMode||c&&0=MAX_HWM?a=MAX_HWM:(a--,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a++);return a}function howMuchToRead(a,b){if(0>=a||0===b.length&&b.ended)return 0;if(b.objectMode)return 1;if(a!==a)return b.flowing&&b.length?b.buffer.head.data.length:b.length;a>b.highWaterMark&&(b.highWaterMark=computeNewHighWaterMark(a));return a<=b.length?a:b.ended?b.length:(b.needReadable=!0,0)} Readable.prototype.read=function(a){debug("read",a);a=parseInt(a,10);var b=this._readableState,c=a;0!==a&&(b.emittedReadable=!1);if(0===a&&b.needReadable&&(b.length>=b.highWaterMark||b.ended))return debug("read: emitReadable",b.length,b.ended),0===b.length&&b.ended?endReadable(this):emitReadable(this),null;a=howMuchToRead(a,b);if(0===a&&b.ended)return 0===b.length&&endReadable(this),null;var d=b.needReadable;debug("need readable",d);if(0===b.length||b.length-a=b.length?(a=b.decoder?b.buffer.join(""):1===b.buffer.length?b.buffer.head.data:b.buffer.concat(b.length),b.buffer.clear()):a=fromListPartial(a,b.buffer,b.decoder);return a} function fromListPartial(a,b,c){af.length?f.length:a;e=g===f.length?e+f:e+f.slice(0,a);a-=g;if(0===a){g===f.length?(++d,b.head=c.next?c.next:b.tail=null):(b.head=c,c.data=f.slice(g));break}++d}b.length-=d;return e} function copyFromBuffer(a,b){var c=Buffer.allocUnsafe(a),d=b.head,e=1;d.data.copy(c);for(a-=d.data.length;d=d.next;){var f=d.data,g=a>f.length?f.length:a;f.copy(c,c.length-a,0,g);a-=g;if(0===a){g===f.length?(++e,b.head=d.next?d.next:b.tail=null):(b.head=d,d.data=f.slice(g));break}++e}b.length-=e;return c}function endReadable(a){var b=a._readableState;if(0arguments.length?a:extend.apply(null,[a].concat(slice.call(arguments,2)))},fastExtend={extend},promises=createCommonjsModule(function(a,b){function c(a,b,c){void 0===c&&(c=function(a){return a});return function(){for(var e=[],f=0;f= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode; function error(a){throw new RangeError(errors$1[a]);}function map(a,b){for(var c=a.length,d=[];c--;)d[c]=b(a[c]);return d}function mapDomain(a,b){var c=a.split("@"),d="";1=e&&ca)-((0!=b)<<5)}function adapt(a,b,c){var d=0;a=c?floor(a/damp):a>>1;for(a+=floor(a/b);a>baseMinusTMin*tMax>>1;d+=base)a=floor(a/baseMinusTMin);return floor(d+(baseMinusTMin+1)*a/(a+skew))} function encode(a){var b,c,d,e=[];a=ucs2decode(a);var f=a.length;var g=initialN;var h=0;var l=initialBias;for(d=0;dk&&e.push(stringFromCharCode(k))}for((b=c=e.length)&&e.push(delimiter$1);b=g&&kfloor((maxInt-h)/p)&&error("overflow");h+=(m-g)*p;g=m;for(d=0;dmaxInt&&error("overflow"),k==g){var r=h;for(m=base;;m+=base){k=m<=l?tMin:m>=l+tMax?tMax:m-l;if(rb&&(d=b);for(b=0;b"` \r\n\t'.split(""),unwise="{}|\\^`".split("").concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0}, slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function urlParse(a,b,c){if(a&&isObject(a)&&a instanceof Url)return a;var d=new Url;d.parse(a,b,c);return d}Url.prototype.parse=function(a,b,c){return parse$1(this,a,b,c)}; function parse$1(a,b,c,d){if(!isString(b))throw new TypeError("Parameter 'url' must be a string, not "+typeof b);var e=b.indexOf("?");e=-1!==e&&ehostnameMaxLen?"":a.hostname.toLowerCase();g||(a.hostname=toASCII(a.hostname));d=a.port?":"+a.port:"";a.host=(a.hostname||"")+d;a.href+=a.host;g&&(a.hostname=a.hostname.substr(1,a.hostname.length-2),"/"!==e[0]&&(e="/"+e))}if(!unsafeProtocol[f])for(d=0,b=autoEscape.length;df.length&&f.unshift("");b.pathname=f.join("/")}b.search=a.search;b.query=a.query;b.host=a.host||"";b.auth=a.auth;b.hostname=a.hostname||a.host;b.port=a.port;if(b.pathname||b.search)b.path=(b.pathname|| "")+(b.search||"");b.slashes=b.slashes||a.slashes;b.href=b.format();return b}c=b.pathname&&"/"===b.pathname.charAt(0);var g=a.host||a.pathname&&"/"===a.pathname.charAt(0),h=c=g||c||b.host&&a.pathname;d=b.pathname&&b.pathname.split("/")||[];e=b.protocol&&!slashedProtocol[b.protocol];f=a.pathname&&a.pathname.split("/")||[];e&&(b.hostname="",b.port=null,b.host&&(""===d[0]?d[0]=b.host:d.unshift(b.host)),b.host="",a.protocol&&(a.hostname=null,a.port=null,a.host&&(""===f[0]?f[0]=a.host:f.unshift(a.host)), a.host=null),c=c&&(""===f[0]||""===d[0]));if(g)b.host=a.host||""===a.host?a.host:b.host,b.hostname=a.hostname||""===a.hostname?a.hostname:b.hostname,b.search=a.search,b.query=a.query,d=f;else if(f.length)d||(d=[]),d.pop(),d=d.concat(f),b.search=a.search,b.query=a.query;else if(!isNullOrUndefined(a.search))return e&&(b.hostname=b.host=d.shift(),e=b.host&&0d)d=b;else{for(;c(b,d);)d--;d=b.substr(0,d+1)}return d.replace(/^([a-zA-Z]+:|\.\/)/,"")}return a}Object.defineProperty(b,"__esModule",{value:!0});b.unixify=d;b.correctPath=function(a){return d(a.replace(/^\\\\\?\\.:\\/, "\\"))};var e="win32"===process.platform});unwrapExports(correctPath_1); var correctPath_2=correctPath_1.unixify,correctPath_3=correctPath_1.correctPath,volume=createCommonjsModule(function(a,b){function c(a,b,c,d){void 0===b&&(b="");void 0===c&&(c="");void 0===d&&(d="");var e="";c&&(e=" '"+c+"'");d&&(e+=" -> '"+d+"'");switch(a){case "ENOENT":return"ENOENT: no such file or directory, "+b+e;case "EBADF":return"EBADF: bad file descriptor, "+b+e;case "EINVAL":return"EINVAL: invalid argument, "+b+e;case "EPERM":return"EPERM: operation not permitted, "+b+e;case "EPROTO":return"EPROTO: protocol error, "+ b+e;case "EEXIST":return"EEXIST: file already exists, "+b+e;case "ENOTDIR":return"ENOTDIR: not a directory, "+b+e;case "EISDIR":return"EISDIR: illegal operation on a directory, "+b+e;case "EACCES":return"EACCES: permission denied, "+b+e;case "ENOTEMPTY":return"ENOTEMPTY: directory not empty, "+b+e;case "EMFILE":return"EMFILE: too many open files, "+b+e;case "ENOSYS":return"ENOSYS: function not implemented, "+b+e;default:return a+": error occurred, "+b+e}}function d(a,b,d,e,f){void 0===b&&(b="");void 0=== d&&(d="");void 0===e&&(e="");void 0===f&&(f=Error);b=new f(c(a,b,d,e));b.code=a;return b}function e(a){if("number"===typeof a)return a;if("string"===typeof a){var b=I[a];if("undefined"!==typeof b)return b}throw new errors.TypeError("ERR_INVALID_OPT_VALUE","flags",a);}function f(a,b){if(b){var c=typeof b;switch(c){case "string":a=C({},a,{encoding:b});break;case "object":a=C({},a,b);break;default:throw TypeError("Expected options to be either an object or a string, but got "+c+" instead");}}else return a; "buffer"!==a.encoding&&encoding.assertEncoding(a.encoding);return a}function g(a){return function(b){return f(a,b)}}function h(a){if("function"!==typeof a)throw TypeError(E.CB);return a}function l(a){return function(b,c){return"function"===typeof b?[a(),b]:[a(b),h(c)]}}function k(a){if("string"!==typeof a&&!buffer.Buffer.isBuffer(a)){try{if(!(a instanceof require$$1.URL))throw new TypeError(E.PATH_STR);}catch(G){throw new TypeError(E.PATH_STR);}if(""!==a.hostname)throw new errors.TypeError("ERR_INVALID_FILE_URL_HOST", process_1.default.platform);a=a.pathname;for(var b=0;b>>0!==a)throw TypeError(E.FD);}function D(a){if("string"=== typeof a&&+a==a)return+a;if(a instanceof Date)return a.getTime()/1E3;if(isFinite(a))return 0>a?Date.now()/1E3:a;throw Error("Cannot parse time: "+a);}function K(a){if("number"!==typeof a)throw TypeError(E.UID);}function L(a){if("number"!==typeof a)throw TypeError(E.GID);}function sa(a){a.emit("stop")}function z(a,b,c){if(!(this instanceof z))return new z(a,b,c);this._vol=a;c=C({},f(c,{}));void 0===c.highWaterMark&&(c.highWaterMark=65536);Stream.Readable.call(this,c);this.path=k(b);this.fd=void 0=== c.fd?null:c.fd;this.flags=void 0===c.flags?"r":c.flags;this.mode=void 0===c.mode?438:c.mode;this.start=c.start;this.end=c.end;this.autoClose=void 0===c.autoClose?!0:c.autoClose;this.pos=void 0;this.bytesRead=0;if(void 0!==this.start){if("number"!==typeof this.start)throw new TypeError('"start" option must be a Number');if(void 0===this.end)this.end=Infinity;else if("number"!==typeof this.end)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}"number"!==typeof this.fd&&this.open();this.on("end",function(){this.autoClose&&this.destroy&&this.destroy()})}function ta(a){this.close()}function x(a,b,c){if(!(this instanceof x))return new x(a,b,c);this._vol=a;c=C({},f(c,{}));Stream.Writable.call(this,c);this.path=k(b);this.fd=void 0===c.fd?null:c.fd;this.flags=void 0===c.flags?"w":c.flags;this.mode=void 0===c.mode?438:c.mode;this.start=c.start;this.autoClose=void 0===c.autoClose?!0:!!c.autoClose;this.pos=void 0;this.bytesWritten= 0;if(void 0!==this.start){if("number"!==typeof this.start)throw new TypeError('"start" option must be a Number');if(0>this.start)throw Error('"start" must be >= zero');this.pos=this.start}c.encoding&&this.setDefaultEncoding(c.encoding);"number"!==typeof this.fd&&this.open();this.once("finish",function(){this.autoClose&&this.close()})}var M=commonjsGlobal&&commonjsGlobal.__extends||function(){var a=function(b,c){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}|| function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return a(b,c)};return function(b,c){function d(){this.constructor=b}a(b,c);b.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)}}(),X=commonjsGlobal&&commonjsGlobal.__spreadArrays||function(){for(var a=0,b=0,c=arguments.length;b>>0!==a)throw TypeError(E.FD);a=this.getFileByFd(a);if(!a)throw d("EBADF",b);return a}; a.prototype.getNodeByIdOrCreate=function(a,b,c){if("number"===typeof a){a=this.getFileByFd(a);if(!a)throw Error("File nto found");return a.node}var e=p(a),n=this.getLink(e);if(n)return n.getNode();if(b&A&&(b=this.getLinkParent(e)))return n=this.createLink(b,e[e.length-1],!1,c),n.getNode();throw d("ENOENT","getNodeByIdOrCreate",k(a));};a.prototype.wrapAsync=function(a,b,c){var d=this;h(c);setImmediate_1.default(function(){try{c(null,a.apply(d,b))}catch(F){c(F)}})};a.prototype._toJSON=function(a,b, c){var d;void 0===a&&(a=this.root);void 0===b&&(b={});var e=!0,n=a.children;a.getNode().isFile()&&(n=(d={},d[a.getName()]=a.parent.getChild(a.getName()),d),a=a.parent);for(var q in n){e=!1;n=a.getChild(q);if(!n)throw Error("_toJSON: unexpected undefined");d=n.getNode();d.isFile()?(n=n.getPath(),c&&(n=da(c,n)),b[n]=d.getString()):d.isDirectory()&&this._toJSON(n,b,c)}a=a.getPath();c&&(a=da(c,a));a&&e&&(b[a]=null);return b};a.prototype.toJSON=function(a,b,c){void 0===b&&(b={});void 0===c&&(c=!1);var d= [];if(a){a instanceof Array||(a=[a]);for(var e=0;e=this.maxFiles)throw d("EMFILE","open",a.getPath());var e=a;c&&(e=this.resolveSymlinks(a));if(!e)throw d("ENOENT","open",a.getPath());c=e.getNode();if(c.isDirectory()){if((b& (U|H|N))!==U)throw d("EISDIR","open",a.getPath());}else if(b&va)throw d("ENOTDIR","open",a.getPath());if(!(b&N||c.canRead()))throw d("EACCES","open",a.getPath());a=new this.props.File(a,c,b,this.newFdNumber());this.fds[a.fd]=a;this.openFiles++;b&P&&a.truncate();return a};a.prototype.openFile=function(a,b,c,e){void 0===e&&(e=!0);var n=m(a),q=e?this.getResolvedLink(n):this.getLink(n);if(!q&&b&A){var G=this.getResolvedLink(n.slice(0,n.length-1));if(!G)throw d("ENOENT","open",y+n.join(y));b&A&&"number"=== typeof c&&(q=this.createLink(G,n[n.length-1],!1,c))}if(q)return this.openLink(q,b,e);throw d("ENOENT","open",a);};a.prototype.openBase=function(a,b,c,e){void 0===e&&(e=!0);b=this.openFile(a,b,c,e);if(!b)throw d("ENOENT","open",a);return b.fd};a.prototype.openSync=function(a,b,c){void 0===c&&(c=438);c=t(c);a=k(a);b=e(b);return this.openBase(a,b,c)};a.prototype.open=function(a,b,c,d){var n=c;"function"===typeof c&&(n=438,d=c);c=t(n||438);a=k(a);b=e(b);this.wrapAsync(this.openBase,[a,b,c],d)};a.prototype.closeFile= function(a){this.fds[a.fd]&&(this.openFiles--,delete this.fds[a.fd],this.releasedFds.push(a.fd))};a.prototype.closeSync=function(a){O(a);a=this.getFileByFdOrThrow(a,"close");this.closeFile(a)};a.prototype.close=function(a,b){O(a);this.wrapAsync(this.closeSync,[a],b)};a.prototype.openFileOrGetById=function(a,b,c){if("number"===typeof a){a=this.fds[a];if(!a)throw d("ENOENT");return a}return this.openFile(k(a),b,c)};a.prototype.readBase=function(a,b,c,d,e){return this.getFileByFdOrThrow(a).read(b,Number(c), Number(d),e)};a.prototype.readSync=function(a,b,c,d,e){O(a);return this.readBase(a,b,c,d,e)};a.prototype.read=function(a,b,c,d,e,f){var n=this;h(f);if(0===d)return process_1.default.nextTick(function(){f&&f(null,0,b)});setImmediate_1.default(function(){try{var q=n.readBase(a,b,c,d,e);f(null,q,b)}catch(Ea){f(Ea)}})};a.prototype.readFileBase=function(a,b,c){var e="number"===typeof a&&a>>>0===a;if(!e){var n=k(a);n=m(n);if((n=this.getResolvedLink(n))&&n.getNode().isDirectory())throw d("EISDIR","open", n.getPath());a=this.openSync(a,b)}try{var q=u(this.getFileByFdOrThrow(a).getBuffer(),c)}finally{e||this.closeSync(a)}return q};a.prototype.readFileSync=function(a,b){b=fa(b);var c=e(b.flag);return this.readFileBase(a,c,b.encoding)};a.prototype.readFile=function(a,b,c){c=l(fa)(b,c);b=c[0];c=c[1];var d=e(b.flag);this.wrapAsync(this.readFileBase,[a,d,b.encoding],c)};a.prototype.writeBase=function(a,b,c,d,e){return this.getFileByFdOrThrow(a,"write").write(b,c,d,e)};a.prototype.writeSync=function(a,b, c,d,e){O(a);var n="string"!==typeof b;if(n){var q=(c||0)|0;var f=d;c=e}else var G=d;b=r(b,G);n?"undefined"===typeof f&&(f=b.length):(q=0,f=b.length);return this.writeBase(a,b,q,f,c)};a.prototype.write=function(a,b,c,d,e,f){var n=this;O(a);var q=typeof b,G=typeof c,g=typeof d,aa=typeof e;if("string"!==q)if("function"===G)var k=c;else if("function"===g){var l=c|0;k=d}else if("function"===aa){l=c|0;var m=d;k=e}else{l=c|0;m=d;var F=e;k=f}else if("function"===G)k=c;else if("function"===g)F=c,k=d;else if("function"=== aa){F=c;var p=d;k=e}var S=r(b,p);"string"!==q?"undefined"===typeof m&&(m=S.length):(l=0,m=S.length);var J=h(k);setImmediate_1.default(function(){try{var c=n.writeBase(a,S,l,m,F);"string"!==q?J(null,c,S):J(null,c,b)}catch(Fa){J(Fa)}})};a.prototype.writeFileBase=function(a,b,c,d){var e="number"===typeof a;a=e?a:this.openBase(k(a),c,d);d=0;var n=b.length;c=c&Q?void 0:0;try{for(;0=a.nlink&&this.deleteNode(a)};a.prototype.unlinkSync=function(a){a=k(a);this.unlinkBase(a)};a.prototype.unlink=function(a,b){a=k(a);this.wrapAsync(this.unlinkBase, [a],b)};a.prototype.symlinkBase=function(a,b){var c=m(b),e=this.getLinkParent(c);if(!e)throw d("ENOENT","symlink",a,b);c=c[c.length-1];if(e.getChild(c))throw d("EEXIST","symlink",a,b);b=e.createChild(c);b.getNode().makeSymlink(m(a));return b};a.prototype.symlinkSync=function(a,b,c){a=k(a);b=k(b);this.symlinkBase(a,b)};a.prototype.symlink=function(a,b,c,d){c=h("function"===typeof c?c:d);a=k(a);b=k(b);this.wrapAsync(this.symlinkBase,[a,b],c)};a.prototype.realpathBase=function(a,b){var c=m(a);c=this.getResolvedLink(c); if(!c)throw d("ENOENT","realpath",a);return encoding.strToEncoding(c.getPath(),b)};a.prototype.realpathSync=function(a,b){return this.realpathBase(k(a),la(b).encoding)};a.prototype.realpath=function(a,b,c){c=za(b,c);b=c[0];c=c[1];a=k(a);this.wrapAsync(this.realpathBase,[a,b.encoding],c)};a.prototype.lstatBase=function(a,b){void 0===b&&(b=!1);var c=this.getLink(m(a));if(!c)throw d("ENOENT","lstat",a);return Stats_1.default.build(c.getNode(),b)};a.prototype.lstatSync=function(a,b){return this.lstatBase(k(a), R(b).bigint)};a.prototype.lstat=function(a,b,c){c=Z(b,c);b=c[0];c=c[1];this.wrapAsync(this.lstatBase,[k(a),b.bigint],c)};a.prototype.statBase=function(a,b){void 0===b&&(b=!1);var c=this.getResolvedLink(m(a));if(!c)throw d("ENOENT","stat",a);return Stats_1.default.build(c.getNode(),b)};a.prototype.statSync=function(a,b){return this.statBase(k(a),R(b).bigint)};a.prototype.stat=function(a,b,c){c=Z(b,c);b=c[0];c=c[1];this.wrapAsync(this.statBase,[k(a),b.bigint],c)};a.prototype.fstatBase=function(a,b){void 0=== b&&(b=!1);a=this.getFileByFd(a);if(!a)throw d("EBADF","fstat");return Stats_1.default.build(a.node,b)};a.prototype.fstatSync=function(a,b){return this.fstatBase(a,R(b).bigint)};a.prototype.fstat=function(a,b,c){b=Z(b,c);this.wrapAsync(this.fstatBase,[a,b[0].bigint],b[1])};a.prototype.renameBase=function(a,b){var c=this.getLink(m(a));if(!c)throw d("ENOENT","rename",a,b);var e=m(b),f=this.getLinkParent(e);if(!f)throw d("ENOENT","rename",a,b);(a=c.parent)&&a.deleteChild(c);c.steps=X(f.steps,[e[e.length- 1]]);f.setChild(c.getName(),c)};a.prototype.renameSync=function(a,b){a=k(a);b=k(b);this.renameBase(a,b)};a.prototype.rename=function(a,b,c){a=k(a);b=k(b);this.wrapAsync(this.renameBase,[a,b],c)};a.prototype.existsBase=function(a){return!!this.statBase(a)};a.prototype.existsSync=function(a){try{return this.existsBase(k(a))}catch(q){return!1}};a.prototype.exists=function(a,b){var c=this,d=k(a);if("function"!==typeof b)throw Error(E.CB);setImmediate_1.default(function(){try{b(c.existsBase(d))}catch(F){b(!1)}})}; a.prototype.accessBase=function(a,b){this.getLinkOrThrow(a,"access")};a.prototype.accessSync=function(a,b){void 0===b&&(b=ca);a=k(a);this.accessBase(a,b|0)};a.prototype.access=function(a,b,c){var d=ca;"function"!==typeof b&&(d=b|0,b=h(c));a=k(a);this.wrapAsync(this.accessBase,[a,d],b)};a.prototype.appendFileSync=function(a,b,c){void 0===c&&(c=ja);c=ka(c);c.flag&&a>>>0!==a||(c.flag="a");this.writeFileSync(a,b,c)};a.prototype.appendFile=function(a,b,c,d){d=ya(c,d);c=d[0];d=d[1];c.flag&&a>>>0!==a||(c.flag= "a");this.writeFile(a,b,c,d)};a.prototype.readdirBase=function(a,b){var c=m(a);c=this.getResolvedLink(c);if(!c)throw d("ENOENT","readdir",a);if(!c.getNode().isDirectory())throw d("ENOTDIR","scandir",a);if(b.withFileTypes){var e=[];for(f in c.children)(a=c.getChild(f))&&e.push(Dirent_1.default.build(a,b.encoding));Y||"buffer"===b.encoding||e.sort(function(a,b){return a.nameb.name?1:0});return e}var f=[];for(e in c.children)f.push(encoding.strToEncoding(e,b.encoding));Y||"buffer"=== b.encoding||f.sort();return f};a.prototype.readdirSync=function(a,b){b=pa(b);a=k(a);return this.readdirBase(a,b)};a.prototype.readdir=function(a,b,c){c=Aa(b,c);b=c[0];c=c[1];a=k(a);this.wrapAsync(this.readdirBase,[a,b],c)};a.prototype.readlinkBase=function(a,b){var c=this.getLinkOrThrow(a,"readlink").getNode();if(!c.isSymlink())throw d("EINVAL","readlink",a);a=y+c.symlink.join(y);return encoding.strToEncoding(a,b)};a.prototype.readlinkSync=function(a,b){b=W(b);a=k(a);return this.readlinkBase(a,b.encoding)}; a.prototype.readlink=function(a,b,c){c=ea(b,c);b=c[0];c=c[1];a=k(a);this.wrapAsync(this.readlinkBase,[a,b.encoding],c)};a.prototype.fsyncBase=function(a){this.getFileByFdOrThrow(a,"fsync")};a.prototype.fsyncSync=function(a){this.fsyncBase(a)};a.prototype.fsync=function(a,b){this.wrapAsync(this.fsyncBase,[a],b)};a.prototype.fdatasyncBase=function(a){this.getFileByFdOrThrow(a,"fdatasync")};a.prototype.fdatasyncSync=function(a){this.fdatasyncBase(a)};a.prototype.fdatasync=function(a,b){this.wrapAsync(this.fdatasyncBase, [a],b)};a.prototype.ftruncateBase=function(a,b){this.getFileByFdOrThrow(a,"ftruncate").truncate(b)};a.prototype.ftruncateSync=function(a,b){this.ftruncateBase(a,b)};a.prototype.ftruncate=function(a,b,c){var d="number"===typeof b?b:0;b=h("number"===typeof b?c:b);this.wrapAsync(this.ftruncateBase,[a,d],b)};a.prototype.truncateBase=function(a,b){a=this.openSync(a,"r+");try{this.ftruncateSync(a,b)}finally{this.closeSync(a)}};a.prototype.truncateSync=function(a,b){if(a>>>0===a)return this.ftruncateSync(a, b);this.truncateBase(a,b)};a.prototype.truncate=function(a,b,c){var d="number"===typeof b?b:0;b=h("number"===typeof b?c:b);if(a>>>0===a)return this.ftruncate(a,d,b);this.wrapAsync(this.truncateBase,[a,d],b)};a.prototype.futimesBase=function(a,b,c){a=this.getFileByFdOrThrow(a,"futimes").node;a.atime=new Date(1E3*b);a.mtime=new Date(1E3*c)};a.prototype.futimesSync=function(a,b,c){this.futimesBase(a,D(b),D(c))};a.prototype.futimes=function(a,b,c,d){this.wrapAsync(this.futimesBase,[a,D(b),D(c)],d)};a.prototype.utimesBase= function(a,b,c){a=this.openSync(a,"r+");try{this.futimesBase(a,b,c)}finally{this.closeSync(a)}};a.prototype.utimesSync=function(a,b,c){this.utimesBase(k(a),D(b),D(c))};a.prototype.utimes=function(a,b,c,d){this.wrapAsync(this.utimesBase,[k(a),D(b),D(c)],d)};a.prototype.mkdirBase=function(a,b){var c=m(a);if(!c.length)throw d("EISDIR","mkdir",a);var e=this.getLinkParentAsDirOrThrow(a,"mkdir");c=c[c.length-1];if(e.getChild(c))throw d("EEXIST","mkdir",a);e.createChild(c,this.createNode(!0,b))};a.prototype.mkdirpBase= function(a,b){a=m(a);for(var c=this.root,e=0;ethis.prev.mtimeMs||a.nlink!==this.prev.nlink?!0:!1};b.prototype.start=function(a,b,c){void 0===b&&(b=!0);void 0===c&&(c=5007);this.filename=k(a);this.setTimeout=b?setTimeout:setTimeoutUnref_1.default;this.interval=c;this.prev=this.vol.statSync(this.filename); this.loop()};b.prototype.stop=function(){clearTimeout(this.timeoutRef);process_1.default.nextTick(sa,this)};return b}(EventEmitter.EventEmitter);b.StatWatcher=qa;var w;util.inherits(z,Stream.Readable);b.ReadStream=z;z.prototype.open=function(){var a=this;this._vol.open(this.path,this.flags,this.mode,function(b,c){b?(a.autoClose&&a.destroy&&a.destroy(),a.emit("error",b)):(a.fd=c,a.emit("open",c),a.read())})};z.prototype._read=function(a){if("number"!==typeof this.fd)return this.once("open",function(){this._read(a)}); if(!this.destroyed){if(!w||128>w.length-w.used)w=buffer.bufferAllocUnsafe(this._readableState.highWaterMark),w.used=0;var b=w,c=Math.min(w.length-w.used,a),d=w.used;void 0!==this.pos&&(c=Math.min(this.end-this.pos+1,c));if(0>=c)return this.push(null);var e=this;this._vol.read(this.fd,w,w.used,c,this.pos,function(a,c){a?(e.autoClose&&e.destroy&&e.destroy(),e.emit("error",a)):(a=null,0