UNPKG

@uservitals/import

Version:

Import helpers for uploading feedback to UserVitals

28 lines (26 loc) 851 kB
import e from"http";import t from"https";import n from"stream";import r from"tty";import i from"os";import o from"zlib";import s from"readline";import u from"buffer";import a from"fs";import c from"child_process";import l from"path";import f from"crypto";import h from"async_hooks"; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var p=function(e,t){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},p(e,t)};function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var v=function(){return v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},v.apply(this,arguments)};function y(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))}function g(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}function b(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function _(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function w(e){return this instanceof w?(this.v=e,this):new w(e)}function D(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=i[e](t)).value instanceof w?Promise.resolve(n.value.v).then(a,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}var n}function a(e){u("next",e)}function c(e){u("throw",e)}function l(e,t){e(t),o.shift(),o.length&&u(o[0][0],o[0][1])}}function E(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=b(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}var C=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}},x=Object.prototype.toString;function S(e){return"[object Array]"===x.call(e)}function F(e){return void 0===e}function O(e){return null!==e&&"object"==typeof e}function j(e){if("[object Object]"!==x.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function A(e){return"[object Function]"===x.call(e)}function k(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),S(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var R={isArray:S,isArrayBuffer:function(e){return"[object ArrayBuffer]"===x.call(e)},isBuffer:function(e){return null!==e&&!F(e)&&null!==e.constructor&&!F(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:O,isPlainObject:j,isUndefined:F,isDate:function(e){return"[object Date]"===x.call(e)},isFile:function(e){return"[object File]"===x.call(e)},isBlob:function(e){return"[object Blob]"===x.call(e)},isFunction:A,isStream:function(e){return O(e)&&A(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:k,merge:function e(){var t={};function n(n,r){j(t[r])&&j(n)?t[r]=e(t[r],n):j(n)?t[r]=e({},n):S(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)k(arguments[r],n);return t},extend:function(e,t,n){return k(t,(function(t,r){e[r]=n&&"function"==typeof t?C(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}};function T(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var B=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(R.isURLSearchParams(t))r=t.toString();else{var i=[];R.forEach(t,(function(e,t){null!=e&&(R.isArray(e)?t+="[]":e=[e],R.forEach(e,(function(e){R.isDate(e)?e=e.toISOString():R.isObject(e)&&(e=JSON.stringify(e)),i.push(T(t)+"="+T(e))})))})),r=i.join("&")}if(r){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e};function P(){this.handlers=[]}P.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},P.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},P.prototype.forEach=function(e){R.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var I=P,L=function(e,t){R.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))},N=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e},M=function(e,t,n,r,i){var o=new Error(e);return N(o,t,n,r,i)},U=function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(M("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)},q=R.isStandardBrowserEnv()?{write:function(e,t,n,r,i,o){var s=[];s.push(e+"="+encodeURIComponent(t)),R.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),R.isString(r)&&s.push("path="+r),R.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},z=function(e,t){return e&&!function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t},V=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],$=R.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=R.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0};function H(e){this.message=e}H.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},H.prototype.__CANCEL__=!0;var W=H,G=It,K=function(e){return new Promise((function(t,n){var r,i=e.data,o=e.headers,s=e.responseType;function u(){e.cancelToken&&e.cancelToken.unsubscribe(r),e.signal&&e.signal.removeEventListener("abort",r)}R.isFormData(i)&&delete o["Content-Type"];var a=new XMLHttpRequest;if(e.auth){var c=e.auth.username||"",l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(c+":"+l)}var f=z(e.baseURL,e.url);function h(){if(a){var r="getAllResponseHeaders"in a?function(e){var t,n,r,i={};return e?(R.forEach(e.split("\n"),(function(e){if(r=e.indexOf(":"),t=R.trim(e.substr(0,r)).toLowerCase(),n=R.trim(e.substr(r+1)),t){if(i[t]&&V.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}(a.getAllResponseHeaders()):null,i={data:s&&"text"!==s&&"json"!==s?a.response:a.responseText,status:a.status,statusText:a.statusText,headers:r,config:e,request:a};U((function(e){t(e),u()}),(function(e){n(e),u()}),i),a=null}}if(a.open(e.method.toUpperCase(),B(f,e.params,e.paramsSerializer),!0),a.timeout=e.timeout,"onloadend"in a?a.onloadend=h:a.onreadystatechange=function(){a&&4===a.readyState&&(0!==a.status||a.responseURL&&0===a.responseURL.indexOf("file:"))&&setTimeout(h)},a.onabort=function(){a&&(n(M("Request aborted",e,"ECONNABORTED",a)),a=null)},a.onerror=function(){n(M("Network Error",e,null,a)),a=null},a.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||G.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(M(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",a)),a=null},R.isStandardBrowserEnv()){var p=(e.withCredentials||$(f))&&e.xsrfCookieName?q.read(e.xsrfCookieName):void 0;p&&(o[e.xsrfHeaderName]=p)}"setRequestHeader"in a&&R.forEach(o,(function(e,t){void 0===i&&"content-type"===t.toLowerCase()?delete o[t]:a.setRequestHeader(t,e)})),R.isUndefined(e.withCredentials)||(a.withCredentials=!!e.withCredentials),s&&"json"!==s&&(a.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&a.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&a.upload&&a.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(r=function(e){a&&(n(!e||e&&e.type?new W("canceled"):e),a.abort(),a=null)},e.cancelToken&&e.cancelToken.subscribe(r),e.signal&&(e.signal.aborted?r():e.signal.addEventListener("abort",r))),i||(i=null),a.send(i)}))},Y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Q(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}function J(e){var t={exports:{}};return e(t,t.exports),t.exports /*! https://mths.be/punycode v1.3.2 by @mathias */}var X=J((function(e,t){!function(n){var r=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,o="object"==typeof Y&&Y;o.global!==o&&o.window!==o&&o.self!==o||(n=o);var s,u,a=2147483647,c=36,l=/^xn--/,f=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,v=String.fromCharCode;function y(e){throw RangeError(p[e])}function g(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function b(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+g((e=e.replace(h,".")).split("."),t).join(".")}function m(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function _(e){return g(e,(function(e){var t="";return e>65535&&(t+=v((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=v(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function D(e,t,n){var r=0;for(e=n?d(e/700):e>>1,e+=d(e/t);e>455;r+=c)e=d(e/35);return d(r+36*e/(e+38))}function E(e){var t,n,r,i,o,s,u,l,f,h,p,v=[],g=e.length,b=0,m=128,w=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&y("not-basic"),v.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<g;){for(o=b,s=1,u=c;i>=g&&y("invalid-input"),((l=(p=e.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:c)>=c||l>d((a-b)/s))&&y("overflow"),b+=l*s,!(l<(f=u<=w?1:u>=w+26?26:u-w));u+=c)s>d(a/(h=c-f))&&y("overflow"),s*=h;w=D(b-o,t=v.length+1,0==o),d(b/t)>a-m&&y("overflow"),m+=d(b/t),b%=t,v.splice(b++,0,m)}return _(v)}function C(e){var t,n,r,i,o,s,u,l,f,h,p,g,b,_,E,C=[];for(g=(e=m(e)).length,t=128,n=0,o=72,s=0;s<g;++s)(p=e[s])<128&&C.push(v(p));for(r=i=C.length,i&&C.push("-");r<g;){for(u=a,s=0;s<g;++s)(p=e[s])>=t&&p<u&&(u=p);for(u-t>d((a-n)/(b=r+1))&&y("overflow"),n+=(u-t)*b,t=u,s=0;s<g;++s)if((p=e[s])<t&&++n>a&&y("overflow"),p==t){for(l=n,f=c;!(l<(h=f<=o?1:f>=o+26?26:f-o));f+=c)E=l-h,_=c-h,C.push(v(w(h+E%_,0))),l=d(E/_);C.push(v(w(l,0))),o=D(n,b,r==i),n=0,++r}++n,++t}return C.join("")}if(s={version:"1.3.2",ucs2:{decode:m,encode:_},decode:E,encode:C,toASCII:function(e){return b(e,(function(e){return f.test(e)?"xn--"+C(e):e}))},toUnicode:function(e){return b(e,(function(e){return l.test(e)?E(e.slice(4).toLowerCase()):e}))}},r&&i)if(e.exports==r)i.exports=s;else for(u in s)s.hasOwnProperty(u)&&(r[u]=s[u]);else n.punycode=s}(Y)})),Z=function(e){return"string"==typeof e},ee=function(e){return"object"==typeof e&&null!==e},te=function(e){return null===e},ne=function(e){return null==e};function re(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var ie=function(e,t,n,r){t=t||"&",n=n||"=";var i={};if("string"!=typeof e||0===e.length)return i;var o=/\+/g;e=e.split(t);var s=1e3;r&&"number"==typeof r.maxKeys&&(s=r.maxKeys);var u=e.length;s>0&&u>s&&(u=s);for(var a=0;a<u;++a){var c,l,f,h,p=e[a].replace(o,"%20"),d=p.indexOf(n);d>=0?(c=p.substr(0,d),l=p.substr(d+1)):(c=p,l=""),f=decodeURIComponent(c),h=decodeURIComponent(l),re(i,f)?Array.isArray(i[f])?i[f].push(h):i[f]=[i[f],h]:i[f]=h}return i},oe=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},se=function(e,t,n,r){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(r){var i=encodeURIComponent(oe(r))+n;return Array.isArray(e[r])?e[r].map((function(e){return i+encodeURIComponent(oe(e))})).join(t):i+encodeURIComponent(oe(e[r]))})).join(t):r?encodeURIComponent(oe(r))+n+encodeURIComponent(oe(e)):""},ue=J((function(e,t){t.decode=t.parse=ie,t.encode=t.stringify=se})),ae=Se,ce=function(e,t){return Se(e,!1,!0).resolve(t)},le=function(e,t){return e?Se(e,!1,!0).resolveObject(t):t},fe=function(e){Z(e)&&(e=Se(e));return e instanceof pe?e.format():pe.prototype.format.call(e)},he=pe;function pe(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var de=/^([a-z0-9.+-]+:)/i,ve=/:[0-9]*$/,ye=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,ge=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),be=["'"].concat(ge),me=["%","/","?",";","#"].concat(be),_e=["/","?","#"],we=/^[+a-z0-9A-Z_-]{0,63}$/,De=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Ee={javascript:!0,"javascript:":!0},Ce={javascript:!0,"javascript:":!0},xe={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Se(e,t,n){if(e&&ee(e)&&e instanceof pe)return e;var r=new pe;return r.parse(e,t,n),r}pe.prototype.parse=function(e,t,n){if(!Z(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=-1!==r&&r<e.indexOf("#")?"?":"#",o=e.split(i);o[0]=o[0].replace(/\\/g,"/");var s=e=o.join(i);if(s=s.trim(),!n&&1===e.split("#").length){var u=ye.exec(s);if(u)return this.path=s,this.href=s,this.pathname=u[1],u[2]?(this.search=u[2],this.query=t?ue.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var a=de.exec(s);if(a){var c=(a=a[0]).toLowerCase();this.protocol=c,s=s.substr(a.length)}if(n||a||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var l="//"===s.substr(0,2);!l||a&&Ce[a]||(s=s.substr(2),this.slashes=!0)}if(!Ce[a]&&(l||a&&!xe[a])){for(var f,h,p=-1,d=0;d<_e.length;d++){-1!==(v=s.indexOf(_e[d]))&&(-1===p||v<p)&&(p=v)}-1!==(h=-1===p?s.lastIndexOf("@"):s.lastIndexOf("@",p))&&(f=s.slice(0,h),s=s.slice(h+1),this.auth=decodeURIComponent(f)),p=-1;for(d=0;d<me.length;d++){var v;-1!==(v=s.indexOf(me[d]))&&(-1===p||v<p)&&(p=v)}-1===p&&(p=s.length),this.host=s.slice(0,p),s=s.slice(p),this.parseHost(),this.hostname=this.hostname||"";var y="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!y)for(var g=this.hostname.split(/\./),b=(d=0,g.length);d<b;d++){var m=g[d];if(m&&!m.match(we)){for(var _="",w=0,D=m.length;w<D;w++)m.charCodeAt(w)>127?_+="x":_+=m[w];if(!_.match(we)){var E=g.slice(0,d),C=g.slice(d+1),x=m.match(De);x&&(E.push(x[1]),C.unshift(x[2])),C.length&&(s="/"+C.join(".")+s),this.hostname=E.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=X.toASCII(this.hostname));var S=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+S,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!Ee[c])for(d=0,b=be.length;d<b;d++){var O=be[d];if(-1!==s.indexOf(O)){var j=encodeURIComponent(O);j===O&&(j=escape(O)),s=s.split(O).join(j)}}var A=s.indexOf("#");-1!==A&&(this.hash=s.substr(A),s=s.slice(0,A));var k=s.indexOf("?");if(-1!==k?(this.search=s.substr(k),this.query=s.substr(k+1),t&&(this.query=ue.parse(this.query)),s=s.slice(0,k)):t&&(this.search="",this.query={}),s&&(this.pathname=s),xe[c]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){S=this.pathname||"";var R=this.search||"";this.path=S+R}return this.href=this.format(),this},pe.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&ee(this.query)&&Object.keys(this.query).length&&(o=ue.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||xe[t])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})),t+i+n+(s=s.replace("#","%23"))+r},pe.prototype.resolve=function(e){return this.resolveObject(Se(e,!1,!0)).format()},pe.prototype.resolveObject=function(e){if(Z(e)){var t=new pe;t.parse(e,!1,!0),e=t}for(var n=new pe,r=Object.keys(this),i=0;i<r.length;i++){var o=r[i];n[o]=this[o]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),u=0;u<s.length;u++){var a=s[u];"protocol"!==a&&(n[a]=e[a])}return xe[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!xe[e.protocol]){for(var c=Object.keys(e),l=0;l<c.length;l++){var f=c[l];n[f]=e[f]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||Ce[e.protocol])n.pathname=e.pathname;else{for(var h=(e.pathname||"").split("/");h.length&&!(e.host=h.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),n.pathname=h.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var p=n.pathname||"",d=n.search||"";n.path=p+d}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var v=n.pathname&&"/"===n.pathname.charAt(0),y=e.host||e.pathname&&"/"===e.pathname.charAt(0),g=y||v||n.host&&e.pathname,b=g,m=n.pathname&&n.pathname.split("/")||[],_=(h=e.pathname&&e.pathname.split("/")||[],n.protocol&&!xe[n.protocol]);if(_&&(n.hostname="",n.port=null,n.host&&(""===m[0]?m[0]=n.host:m.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),g=g&&(""===h[0]||""===m[0])),y)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,m=h;else if(h.length)m||(m=[]),m.pop(),m=m.concat(h),n.search=e.search,n.query=e.query;else if(!ne(e.search)){if(_)n.hostname=n.host=m.shift(),(x=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=x.shift(),n.host=n.hostname=x.shift());return n.search=e.search,n.query=e.query,te(n.pathname)&&te(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!m.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var w=m.slice(-1)[0],D=(n.host||e.host||m.length>1)&&("."===w||".."===w)||""===w,E=0,C=m.length;C>=0;C--)"."===(w=m[C])?m.splice(C,1):".."===w?(m.splice(C,1),E++):E&&(m.splice(C,1),E--);if(!g&&!b)for(;E--;E)m.unshift("..");!g||""===m[0]||m[0]&&"/"===m[0].charAt(0)||m.unshift(""),D&&"/"!==m.join("/").substr(-1)&&m.push("");var x,S=""===m[0]||m[0]&&"/"===m[0].charAt(0);_&&(n.hostname=n.host=S?"":m.length?m.shift():"",(x=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=x.shift(),n.host=n.hostname=x.shift()));return(g=g||n.host&&m.length)&&!S&&m.unshift(""),m.length?n.pathname=m.join("/"):(n.pathname=null,n.path=null),te(n.pathname)&&te(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},pe.prototype.parseHost=function(){var e=this.host,t=ve.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Fe={parse:ae,resolve:ce,resolveObject:le,format:fe,Url:he},Oe=Object.getOwnPropertySymbols,je=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable; /* object-assign (c) Sindre Sorhus @license MIT */function ke(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var Re=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=ke(e),o=1;o<arguments.length;o++){for(var s in n=Object(arguments[o]))je.call(n,s)&&(i[s]=n[s]);if(Oe){r=Oe(n);for(var u=0;u<r.length;u++)Ae.call(n,r[u])&&(i[r[u]]=n[r[u]])}}return i},Te=function(e){return e instanceof Buffer},Be=Ie,Pe=Be.inherits,Ie=J((function(e,t){var n=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(o(arguments[r]));return t.join(" ")}r=1;for(var i=arguments,s=i.length,u=String(e).replace(n,(function(e){if("%%"===e)return"%";if(r>=s)return e;switch(e){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(e){return"[Circular]"}default:return e}})),a=i[r];r<s;a=i[++r])p(a)||!b(a)?u+=" "+a:u+=" "+o(a);return u},t.deprecate=function(e,n){if(y(Y.process))return function(){return t.deprecate(e,n).apply(this,arguments)};if(!0===process.noDeprecation)return e;var r=!1;return function(){if(!r){if(process.throwDeprecation)throw new Error(n);process.traceDeprecation?console.trace(n):console.error(n),r=!0}return e.apply(this,arguments)}};var r,i={};function o(e,n){var r={seen:[],stylize:u};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),y(r.showHidden)&&(r.showHidden=!1),y(r.depth)&&(r.depth=2),y(r.colors)&&(r.colors=!1),y(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),a(r,e,r.depth)}function s(e,t){var n=o.styles[t];return n?"["+o.colors[n][0]+"m"+e+"["+o.colors[n][1]+"m":e}function u(e,t){return e}function a(e,n,r){if(e.customInspect&&n&&w(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return v(i)||(i=a(e,i,r)),i}var o=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(d(t))return e.stylize(""+t,"number");if(h(t))return e.stylize(""+t,"boolean");if(p(t))return e.stylize("null","null")}(e,n);if(o)return o;var s=Object.keys(n),u=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(n)),_(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return c(n);if(0===s.length){if(w(n)){var b=n.name?": "+n.name:"";return e.stylize("[Function"+b+"]","special")}if(g(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(m(n))return e.stylize(Date.prototype.toString.call(n),"date");if(_(n))return c(n)}var D,E="",C=!1,x=["{","}"];(f(n)&&(C=!0,x=["[","]"]),w(n))&&(E=" [Function"+(n.name?": "+n.name:"")+"]");return g(n)&&(E=" "+RegExp.prototype.toString.call(n)),m(n)&&(E=" "+Date.prototype.toUTCString.call(n)),_(n)&&(E=" "+c(n)),0!==s.length||C&&0!=n.length?r<0?g(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),D=C?function(e,t,n,r,i){for(var o=[],s=0,u=t.length;s<u;++s)S(t,String(s))?o.push(l(e,t,n,r,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(l(e,t,n,r,i,!0))})),o}(e,n,r,u,s):s.map((function(t){return l(e,n,r,u,t,C)})),e.seen.pop(),function(e,t,n){if(e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(D,E,x)):x[0]+E+x[1]}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,t,n,r,i,o){var s,u,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?u=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(u=e.stylize("[Setter]","special")),S(r,i)||(s="["+i+"]"),u||(e.seen.indexOf(c.value)<0?(u=p(n)?a(e,c.value,null):a(e,c.value,n-1)).indexOf("\n")>-1&&(u=o?u.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+u.split("\n").map((function(e){return" "+e})).join("\n")):u=e.stylize("[Circular]","special")),y(s)){if(o&&i.match(/^\d+$/))return u;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+u}function f(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function p(e){return null===e}function d(e){return"number"==typeof e}function v(e){return"string"==typeof e}function y(e){return void 0===e}function g(e){return b(e)&&"[object RegExp]"===D(e)}function b(e){return"object"==typeof e&&null!==e}function m(e){return b(e)&&"[object Date]"===D(e)}function _(e){return b(e)&&("[object Error]"===D(e)||e instanceof Error)}function w(e){return"function"==typeof e}function D(e){return Object.prototype.toString.call(e)}function E(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(y(r)&&(r=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(r)){var n=process.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=f,t.isBoolean=h,t.isNull=p,t.isNullOrUndefined=function(e){return null==e},t.isNumber=d,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=y,t.isRegExp=g,t.isObject=b,t.isDate=m,t.isError=_,t.isFunction=w,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=Te;var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function x(){var e=new Date,t=[E(e.getHours()),E(e.getMinutes()),E(e.getSeconds())].join(":");return[e.getDate(),C[e.getMonth()],t].join(" ")}function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",x(),t.format.apply(t,arguments))},t.inherits=Pe,t._extend=function(e,t){if(!t||!b(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}})),Le=J((function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> * @license MIT */ function t(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0}function n(e){return Y.Buffer&&"function"==typeof Y.Buffer.isBuffer?Y.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var r=Object.prototype.hasOwnProperty,i=Array.prototype.slice,o="foo"===function(){}.name;function s(e){return Object.prototype.toString.call(e)}function u(e){return!n(e)&&("function"==typeof Y.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var a=e.exports=d,c=/\s*function\s+([^\(\s]*)\s*/;function l(e){if(Be.isFunction(e)){if(o)return e.name;var t=e.toString().match(c);return t&&t[1]}}function f(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function h(e){if(o||!Be.isFunction(e))return Be.inspect(e);var t=l(e);return"[Function"+(t?": "+t:"")+"]"}function p(e,t,n,r,i){throw new a.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function d(e,t){e||p(e,!0,t,"==",a.ok)}function v(e,r,o,a){if(e===r)return!0;if(n(e)&&n(r))return 0===t(e,r);if(Be.isDate(e)&&Be.isDate(r))return e.getTime()===r.getTime();if(Be.isRegExp(e)&&Be.isRegExp(r))return e.source===r.source&&e.global===r.global&&e.multiline===r.multiline&&e.lastIndex===r.lastIndex&&e.ignoreCase===r.ignoreCase;if(null!==e&&"object"==typeof e||null!==r&&"object"==typeof r){if(u(e)&&u(r)&&s(e)===s(r)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===t(new Uint8Array(e.buffer),new Uint8Array(r.buffer));if(n(e)!==n(r))return!1;var c=(a=a||{actual:[],expected:[]}).actual.indexOf(e);return-1!==c&&c===a.expected.indexOf(r)||(a.actual.push(e),a.expected.push(r),function(e,t,n,r){if(null==e||null==t)return!1;if(Be.isPrimitive(e)||Be.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var o=y(e),s=y(t);if(o&&!s||!o&&s)return!1;if(o)return v(e=i.call(e),t=i.call(t),n);var u,a,c=m(e),l=m(t);if(c.length!==l.length)return!1;for(c.sort(),l.sort(),a=c.length-1;a>=0;a--)if(c[a]!==l[a])return!1;for(a=c.length-1;a>=0;a--)if(!v(e[u=c[a]],t[u],n,r))return!1;return!0}(e,r,o,a))}return o?e===r:e==r}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function g(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function b(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&p(i,n,"Missing expected exception"+r);var o="string"==typeof r,s=!e&&i&&!n;if((!e&&Be.isError(i)&&o&&g(i,n)||s)&&p(i,n,"Got unwanted exception"+r),e&&i&&n&&!g(i,n)||!e&&i)throw i}a.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return f(h(e.actual),128)+" "+e.operator+" "+f(h(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||p;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=l(t),o=r.indexOf("\n"+i);if(o>=0){var s=r.indexOf("\n",o+1);r=r.substring(s+1)}this.stack=r}}},Be.inherits(a.AssertionError,Error),a.fail=p,a.ok=d,a.equal=function(e,t,n){e!=t&&p(e,t,n,"==",a.equal)},a.notEqual=function(e,t,n){e==t&&p(e,t,n,"!=",a.notEqual)},a.deepEqual=function(e,t,n){v(e,t,!1)||p(e,t,n,"deepEqual",a.deepEqual)},a.deepStrictEqual=function(e,t,n){v(e,t,!0)||p(e,t,n,"deepStrictEqual",a.deepStrictEqual)},a.notDeepEqual=function(e,t,n){v(e,t,!1)&&p(e,t,n,"notDeepEqual",a.notDeepEqual)},a.notDeepStrictEqual=function e(t,n,r){v(t,n,!0)&&p(t,n,r,"notDeepStrictEqual",e)},a.strictEqual=function(e,t,n){e!==t&&p(e,t,n,"===",a.strictEqual)},a.notStrictEqual=function(e,t,n){e===t&&p(e,t,n,"!==",a.notStrictEqual)},a.throws=function(e,t,n){b(!0,e,t,n)},a.doesNotThrow=function(e,t,n){b(!1,e,t,n)},a.ifError=function(e){if(e)throw e},a.strict=Re((function e(t,n){t||p(t,!0,n,"==",e)}),a,{equal:a.strictEqual,deepEqual:a.deepStrictEqual,notEqual:a.notStrictEqual,notDeepEqual:a.notDeepStrictEqual}),a.strict.strict=a.strict;var m=Object.keys||function(e){var t=[];for(var n in e)r.call(e,n)&&t.push(n);return t}})),Ne=1e3,Me=60*Ne,Ue=60*Me,qe=24*Ue,ze=7*qe,Ve=365.25*qe,$e=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*Ve;case"weeks":case"week":case"w":return n*ze;case"days":case"day":case"d":return n*qe;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Ue;case"minutes":case"minute":case"mins":case"min":case"m":return n*Me;case"seconds":case"second":case"secs":case"sec":case"s":return n*Ne;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}(e);if("number"===n&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=qe)return He(e,t,qe,"day");if(t>=Ue)return He(e,t,Ue,"hour");if(t>=Me)return He(e,t,Me,"minute");if(t>=Ne)return He(e,t,Ne,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=qe)return Math.round(e/qe)+"d";if(t>=Ue)return Math.round(e/Ue)+"h";if(t>=Me)return Math.round(e/Me)+"m";if(t>=Ne)return Math.round(e/Ne)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function He(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}var We=function(e){function t(e){let r,i,o,s=null;function u(...e){if(!u.enabled)return;const n=u,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";s++;const o=t.formatters[i];if("function"==typeof o){const t=e[s];r=o.call(n,t),e.splice(s,1),s--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return u.namespace=e,u.useColors=t.useColors(),u.color=t.selectColor(e),u.extend=n,u.destroy=t.destroy,Object.defineProperty(u,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{s=e}}),"function"==typeof t.init&&t.init(u),u}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=$e,t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},Ge=J((function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=We(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}})),Ke=function(e){return e instanceof Buffer},Ye=J((function(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}})),Qe=Xe,Je=J((function(e){try{var t=Qe;if("function"!=typeof t.inherits)throw"";e.exports=t.inherits}catch(t){e.exports=Ye}})),Xe=J((function(e,t){var n=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(o(arguments[r]));return t.join(" ")}r=1;for(var i=arguments,s=i.length,u=String(e).replace(n,(function(e){if("%%"===e)return"%";if(r>=s)return e;switch(e){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(e){return"[Circular]"}default:return e}})),a=i[r];r<s;a=i[++r])p(a)||!b(a)?u+=" "+a:u+=" "+o(a);return u},t.deprecate=function(e,n){if(y(Y.process))return function(){return t.deprecate(e,n).apply(this,arguments)};if(!0===process.noDeprecation)return e;var r=!1;return function(){if(!r){if(process.throwDeprecation)throw new Error(n);process.traceDeprecation?console.trace(n):console.error(n),r=!0}return e.apply(this,arguments)}};var r,i={};function o(e,n){var r={seen:[],stylize:u};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),y(r.showHidden)&&(r.showHidden=!1),y(r.depth)&&(r.depth=2),y(r.colors)&&(r.colors=!1),y(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),a(r,e,r.depth)}function s(e,t){var n=o.styles[t];return n?"["+o.colors[n][0]+"m"+e+"["+o.colors[n][1]+"m":e}function u(e,t){return e}function a(e,n,r){if(e.customInspect&&n&&w(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return v(i)||(i=a(e,i,r)),i}var o=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(d(t))return e.stylize(""+t,"number");if(h(t))return e.stylize(""+t,"boolean");if(p(t))return e.stylize("null","null")}(e,n);if(o)return o;var s=Object.keys(n),u=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(n)),_(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return c(n);if(0===s.length){if(w(n)){var b=n.name?": "+n.name:"";return e.stylize("[Function"+b+"]","special")}if(g(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(m(n))return e.stylize(Date.prototype.toString.call(n),"date");if(_(n))return c(n)}var D,E="",C=!1,x=["{","}"];(f(n)&&(C=!0,x=["[","]"]),w(n))&&(E=" [Function"+(n.name?": "+n.name:"")+"]");return g(n)&&(E=" "+RegExp.prototype.toString.call(n)),m(n)&&(E=" "+Date.prototype.toUTCString.call(n)),_(n)&&(E=" "+c(n)),0!==s.length||C&&0!=n.length?r<0?g(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),D=C?function(e,t,n,r,i){for(var o=[],s=0,u=t.length;s<u;++s)S(t,String(s))?o.push(l(e,t,n,r,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(l(e,t,n,r,i,!0))})),o}(e,n,r,u,s):s.map((function(t){return l(e,n,r,u,t,C)})),e.seen.pop(),function(e,t,n){if(e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(D,E,x)):x[0]+E+x[1]}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,t,n,r,i,o){var s,u,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?u=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(u=e.stylize("[Setter]","special")),S(r,i)||(s="["+i+"]"),u||(e.seen.indexOf(c.value)<0?(u=p(n)?a(e,c.value,null):a(e,c.value,n-1)).indexOf("\n")>-1&&(u=o?u.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+u.split("\n").map((function(e){return" "+e})).join("\n")):u=e.stylize("[Circular]","special")),y(s)){if(o&&i.match(/^\d+$/))return u;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+u}function f(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function p(e){return null===e}function d(e){return"number"==typeof e}function v(e){return"string"==typeof e}function y(e){return void 0===e}function g(e){return b(e)&&"[object RegExp]"===D(e)}function b(e){return"object"==typeof e&&null!==e}function m(e){return b(e)&&"[object Date]"===D(e)}function _(e){return b(e)&&("[object Error]"===D(e)||e instanceof Error)}function w(e){return"function"==typeof e}function D(e){return Object.prototype.toString.call(e)}function E(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(y(r)&&(r=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(r)){var n=process.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=f,t.isBoolean=h,t.isNull=p,t.isNullOrUndefined=function(e){return null==e},t.isNumber=d,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=y,t.isRegExp=g,t.isObject=b,t.isDate=m,t.isError=_,t.isFunction=w,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=Ke;var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function x(){var e=new Date,t=[E(e.getHours()),E(e.getMinutes()),E(e.getSeconds())].join(":");return[e.getDate(),C[e.getMonth()],t].join(" ")}function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",x(),t.format.apply(t,arguments))},t.inherits=Je,t._extend=function(e,t){if(!t||!b(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}})),Ze=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)};const{env:et}=process;let tt;function nt(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function rt(e,t){if(0===tt)return 0;if(Ze("color=16m")||Ze("color=full")||Ze("color=truecolor"))return 3;if(Ze("color=256"))return 2;if(e&&!t&&void 0===tt)return 0;const n=tt||0;if("dumb"===et.TERM)return n;if("win32"===process.platform){const e=i.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in et)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in et))||"codeship"===et.CI_NAME?1:n;if("TEAMCITY_VERSION"in et)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(et.TEAMCITY_VERSION)?1:0;if("truecolor"===et.COLORTERM)return 3;if("TERM_PROGRAM"in et)