solorice/vscodium/extensions/tabnine.tabnine-vscode-3.5.45/out/extension.js
Kristofers Solo c9984d197b Minor changes
2022-05-05 15:08:52 +03:00

18 lines
736 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(()=>{var e={8054:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const i=n(8614),o=r(n(5158)),s=r(n(6304)),a=o.default("agent-base");function c(){const{stack:e}=new Error;return"string"==typeof e&&e.split("\n").some((e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:")))}function u(e,t){return new u.Agent(e,t)}!function(e){class t extends i.EventEmitter{constructor(e,t){super();let n=t;"function"==typeof e?this.callback=e:e&&(n=e),this.timeout=null,n&&"number"==typeof n.timeout&&(this.timeout=n.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return"number"==typeof this.explicitDefaultPort?this.explicitDefaultPort:c()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return"string"==typeof this.explicitProtocol?this.explicitProtocol:c()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,t,n){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,t){const n=Object.assign({},t);"boolean"!=typeof n.secureEndpoint&&(n.secureEndpoint=c()),null==n.host&&(n.host="localhost"),null==n.port&&(n.port=n.secureEndpoint?443:80),null==n.protocol&&(n.protocol=n.secureEndpoint?"https:":"http:"),n.host&&n.path&&delete n.path,delete n.agent,delete n.hostname,delete n._defaultAgent,delete n.defaultPort,delete n.createConnection,e._last=!0,e.shouldKeepAlive=!1;let r=!1,i=null;const o=n.timeout||this.timeout,u=t=>{e._hadError||(e.emit("error",t),e._hadError=!0)},l=()=>{i=null,r=!0;const e=new Error(`A "socket" was not created for HTTP request before ${o}ms`);e.code="ETIMEOUT",u(e)},p=e=>{r||(null!==i&&(clearTimeout(i),i=null),u(e))},f=t=>{if(r)return;if(null!=i&&(clearTimeout(i),i=null),o=t,Boolean(o)&&"function"==typeof o.addRequest)return a("Callback returned another Agent instance %o",t.constructor.name),void t.addRequest(e,n);var o;if(t)return t.once("free",(()=>{this.freeSocket(t,n)})),void e.onSocket(t);const s=new Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``);u(s)};if("function"==typeof this.callback){this.promisifiedCallback||(this.callback.length>=3?(a("Converting legacy callback function to promise"),this.promisifiedCallback=s.default(this.callback)):this.promisifiedCallback=this.callback),"number"==typeof o&&o>0&&(i=setTimeout(l,o)),"port"in n&&"number"!=typeof n.port&&(n.port=Number(n.port));try{a("Resolving socket for %o request: %o",n.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,n)).then(f,p)}catch(e){Promise.reject(e).catch(p)}}else u(new Error("`callback` is not defined"))}freeSocket(e,t){a("Freeing socket %o %o",e.constructor.name,t),e.destroy()}destroy(){a("Destroying agent %o",this.constructor.name)}}e.Agent=t,e.prototype=e.Agent.prototype}(u||(u={})),e.exports=u},6304:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,n){return new Promise(((r,i)=>{e.call(this,t,n,((e,t)=>{e?i(e):r(t)}))}))}}},6281:(e,t,n)=>{"use strict";var r=n(7396),i=function(){function e(t){if(e.INSTANCE)throw new Error("Console logging adapter tracking should be configured from the applicationInsights object");this._client=t,e.INSTANCE=this}return e.prototype.enable=function(e,t){r.IsInitialized&&(n(4309).wp(e&&t,this._client),n(5823).wp(e,this._client),n(454).wp(e,this._client))},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1,!1)},e._methodNames=["debug","info","log","warn","error"],e}();e.exports=i},894:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5282),i=n(7396),o=function(){function e(){}return e.getCurrentContext=function(){if(!e.enabled)return null;var t=e.session.get(e.CONTEXT_NAME);return void 0===t?null:t},e.generateContextObject=function(e,t,n,r,i,o){return t=t||e,this.enabled?{operation:{name:n,id:e,parentId:t,traceparent:i,tracestate:o},customProperties:new s(r)}:null},e.runWithContext=function(t,n){return e.enabled?e.session.bind(n,((r={})[e.CONTEXT_NAME]=t,r))():n();var r},e.wrapEmitter=function(t){e.enabled&&e.session.bindEmitter(t)},e.wrapCallback=function(t){return e.enabled?e.session.bind(t):t},e.enable=function(t){this.enabled||(this.isNodeVersionCompatible()?(e.hasEverEnabled||(this.forceClsHooked=t,this.hasEverEnabled=!0,void 0===this.cls&&(!0===e.forceClsHooked||void 0===e.forceClsHooked&&e.shouldUseClsHooked()?this.cls=n(9562):this.cls=n(3057)),e.session=this.cls.createNamespace("AI-CLS-Session"),i.registerContextPreservation((function(t){return e.session.bind(t)}))),this.enabled=!0):this.enabled=!1)},e.disable=function(){this.enabled=!1},e.reset=function(){e.hasEverEnabled&&(e.session=null,e.session=this.cls.createNamespace("AI-CLS-Session"))},e.isNodeVersionCompatible=function(){var e=process.versions.node.split(".");return parseInt(e[0])>3||parseInt(e[0])>2&&parseInt(e[1])>2},e.shouldUseClsHooked=function(){var e=process.versions.node.split(".");return parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=2},e.canUseClsHooked=function(){var e=process.versions.node.split("."),t=parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=0,n=parseInt(e[0])<8||parseInt(e[0])<=8&&parseInt(e[1])<2,r=parseInt(e[0])>4||parseInt(e[0])>=4&&parseInt(e[1])>=7;return!(t&&n)&&r},e.enabled=!1,e.hasEverEnabled=!1,e.forceClsHooked=void 0,e.CONTEXT_NAME="ApplicationInsights-Context",e}();t.CorrelationContextManager=o;var s=function(){function e(e){this.props=[],this.addHeaderData(e)}return e.prototype.addHeaderData=function(e){var t=e?e.split(", "):[];this.props=t.map((function(e){var t=e.split("=");return{key:t[0],value:t[1]}})).concat(this.props)},e.prototype.serializeToHeader=function(){return this.props.map((function(e){return e.key+"="+e.value})).join(", ")},e.prototype.getProperty=function(e){for(var t=0;t<this.props.length;++t){var n=this.props[t];if(n.key===e)return n.value}},e.prototype.setProperty=function(t,n){if(e.bannedCharacters.test(t)||e.bannedCharacters.test(n))r.warn("Correlation context property keys and values must not contain ',' or '='. setProperty was called with key: "+t+" and value: "+n);else{for(var i=0;i<this.props.length;++i){var o=this.props[i];if(o.key===t)return void(o.value=n)}this.props.push({key:t,value:n})}},e.bannedCharacters=/[,=]/,e}()},6639:e=>{"use strict";var t=function(){function e(t){if(e.INSTANCE)throw new Error("Exception tracking should be configured from the applicationInsights object");e.INSTANCE=this,this._client=t;var n=process.versions.node.split(".");e._canUseUncaughtExceptionMonitor=parseInt(n[0])>13||13===parseInt(n[0])&&parseInt(n[1])>=7}return e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.enable=function(t){var n=this;if(t){this._isInitialized=!0;if(!this._exceptionListenerHandle){var r=function(t,r,i){void 0===i&&(i=new Error(e._FALLBACK_ERROR_MESSAGE)),n._client.trackException({exception:i}),n._client.flush({isAppCrashing:!0}),t&&r&&1===process.listeners(r).length&&(console.error(i),process.exit(1))};e._canUseUncaughtExceptionMonitor?(this._exceptionListenerHandle=r.bind(this,!1),process.on(e.UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME,this._exceptionListenerHandle)):(this._exceptionListenerHandle=r.bind(this,!0,e.UNCAUGHT_EXCEPTION_HANDLER_NAME),this._rejectionListenerHandle=r.bind(this,!1),process.on(e.UNCAUGHT_EXCEPTION_HANDLER_NAME,this._exceptionListenerHandle),process.on(e.UNHANDLED_REJECTION_HANDLER_NAME,this._rejectionListenerHandle))}}else this._exceptionListenerHandle&&(e._canUseUncaughtExceptionMonitor?process.removeListener(e.UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME,this._exceptionListenerHandle):(process.removeListener(e.UNCAUGHT_EXCEPTION_HANDLER_NAME,this._exceptionListenerHandle),process.removeListener(e.UNHANDLED_REJECTION_HANDLER_NAME,this._rejectionListenerHandle)),this._exceptionListenerHandle=void 0,this._rejectionListenerHandle=void 0,delete this._exceptionListenerHandle,delete this._rejectionListenerHandle)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e.INSTANCE=null,e.UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME="uncaughtExceptionMonitor",e.UNCAUGHT_EXCEPTION_HANDLER_NAME="uncaughtException",e.UNHANDLED_REJECTION_HANDLER_NAME="unhandledRejection",e._RETHROW_EXIT_MESSAGE="Application Insights Rethrow Exception Handler",e._FALLBACK_ERROR_MESSAGE="A promise was rejected without providing an error. Application Insights generated this error stack for you.",e._canUseUncaughtExceptionMonitor=!1,e}();e.exports=t},8723:(e,t,n)=>{"use strict";var r=n(8605),i=n(7211),o=n(5282),s=n(5740),a=n(9036),c=n(8339),u=n(894),l=n(9962),p=n(8090),f=n(7396),d=function(){function e(t){if(e.INSTANCE)throw new Error("Client request tracking should be configured from the applicationInsights object");e.INSTANCE=this,this._client=t}return e.prototype.enable=function(e){this._isEnabled=e,this._isEnabled&&!this._isInitialized&&this._initialize(),f.IsInitialized&&(n(7886).wp(e,this._client),n(4777).wp(e,this._client),n(5071).wp(e,this._client),n(9843).wp(e,this._client))},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype._initialize=function(){var t=this;this._isInitialized=!0;r.get;var n=r.request,o=i.request,s=function(n,r){var i=!r[e.disableCollectionRequestOption]&&!n[e.alreadyAutoCollectedFlag];n[e.alreadyAutoCollectedFlag]=!0,n&&r&&i&&(u.CorrelationContextManager.wrapEmitter(n),e.trackRequest(t._client,{options:r,request:n}))};r.request=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];var o=n.call.apply(n,[r,e].concat(t));return s(o,e),o},i.request=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=o.call.apply(o,[i,e].concat(t));return s(r,e),r},r.get=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i,o=(i=r.request).call.apply(i,[r,e].concat(t));return o.end(),o},i.get=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r,o=(r=i.request).call.apply(r,[i,e].concat(t));return o.end(),o}},e.trackRequest=function(t,n){if(n.options&&n.request&&t){var r,i,f=new c(n.options,n.request),d=u.CorrelationContextManager.getCurrentContext();if(d&&d.operation&&d.operation.traceparent&&p.isValidTraceId(d.operation.traceparent.traceId))d.operation.traceparent.updateSpanId(),r=d.operation.traceparent.getBackCompatRequestId();else if(l.w3cEnabled){i=(m=new p).toString(),r=m.getBackCompatRequestId()}else r=d&&d.operation&&d.operation.parentId+e.requestNumber+++".";if(s.canIncludeCorrelationHeader(t,f.getUrl())&&n.request.getHeader&&n.request.setHeader&&t.config&&t.config.correlationId){var h=n.request.getHeader(a.requestContextHeader);try{s.safeIncludeCorrelationHeader(t,n.request,h)}catch(e){o.warn("Request-Context header could not be set. Correlation of requests may be lost",e)}if(d&&d.operation)try{if(n.request.setHeader(a.requestIdHeader,r),n.request.setHeader(a.parentIdHeader,d.operation.id),n.request.setHeader(a.rootIdHeader,r),i||d.operation.traceparent)n.request.setHeader(a.traceparentHeader,i||d.operation.traceparent.toString());else if(l.w3cEnabled){var m=(new p).toString();n.request.setHeader(a.traceparentHeader,m)}if(d.operation.tracestate){var g=d.operation.tracestate.toString();g&&n.request.setHeader(a.traceStateHeader,g)}var v=d.customProperties.serializeToHeader();v&&n.request.setHeader(a.correlationContextHeader,v)}catch(e){o.warn("Correlation headers could not be set. Correlation of requests may be lost.",e)}}n.request.on&&(n.request.on("response",(function(e){f.onResponse(e);var i=f.getDependencyTelemetry(n,r);i.contextObjects=i.contextObjects||{},i.contextObjects["http.RequestOptions"]=n.options,i.contextObjects["http.ClientRequest"]=n.request,i.contextObjects["http.ClientResponse"]=e,t.trackDependency(i)})),n.request.on("error",(function(e){f.onError(e);var i=f.getDependencyTelemetry(n,r);i.contextObjects=i.contextObjects||{},i.contextObjects["http.RequestOptions"]=n.options,i.contextObjects["http.ClientRequest"]=n.request,i.contextObjects.Error=e,t.trackDependency(i)})))}else o.info("AutoCollectHttpDependencies.trackRequest was called with invalid parameters: ",!n.options,!n.request,!t)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e.disableCollectionRequestOption="disableAppInsightsAutoCollection",e.requestNumber=1,e.alreadyAutoCollectedFlag="_appInsightsAutoCollected",e}();e.exports=d},8339:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=n(8835),s=n(5290),a=n(5740),c=n(9036),u=n(3054),l=n(9962),p=function(e){function t(n,r){var i=e.call(this)||this;return r&&r.method&&n&&(i.method=r.method,i.url=t._getUrlFromRequestOptions(n,r),i.startTime=+new Date),i}return i(t,e),t.prototype.onError=function(e){this._setStatus(void 0,e)},t.prototype.onResponse=function(e){this._setStatus(e.statusCode,void 0),this.correlationId=a.getCorrelationContextTarget(e,c.requestContextTargetKey)},t.prototype.getDependencyTelemetry=function(e,t){var n=o.parse(this.url);n.search=void 0,n.hash=void 0;var r=this.method.toUpperCase()+" "+n.pathname,i=s.RemoteDependencyDataConstants.TYPE_HTTP,a=n.hostname;this.correlationId?(i=s.RemoteDependencyDataConstants.TYPE_AI,this.correlationId!==l.correlationIdPrefix&&(a=n.hostname+" | "+this.correlationId)):i=s.RemoteDependencyDataConstants.TYPE_HTTP,n.port&&(a+=":"+n.port);var c={id:t,name:r,data:this.url,duration:this.duration,success:this._isSuccess(),resultCode:this.statusCode?this.statusCode.toString():null,properties:this.properties||{},dependencyTypeName:i,target:a};if(e){for(var u in e)c[u]||(c[u]=e[u]);if(e.properties)for(var u in e.properties)c.properties[u]=e.properties[u]}return c},t._getUrlFromRequestOptions=function(e,t){if("string"==typeof e)e=o.parse(e);else{var n=e;e={},n&&Object.keys(n).forEach((function(t){e[t]=n[t]}))}if(e.path){var r=o.parse(e.path);e.pathname=r.pathname,e.search=r.search}e.host&&e.port&&(!o.parse("http://"+e.host).port&&e.port&&(e.hostname=e.host,delete e.host));return e.protocol=e.protocol||t.agent&&t.agent.protocol||void 0,e.hostname=e.hostname||"localhost",o.format(e)},t}(u);e.exports=p},6694:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=n(8835),s=n(5290),a=n(5740),c=n(9036),u=n(3054),l=n(9962),p=n(6333),f=n(8090),d=function(e){function t(t,n){var r=e.call(this)||this;return t&&(r.method=t.method,r.url=r._getAbsoluteUrl(t),r.startTime=+new Date,r.socketRemoteAddress=t.socket&&t.socket.remoteAddress,r.parseHeaders(t,n),t.connection&&(r.connectionRemoteAddress=t.connection.remoteAddress,r.legacySocketRemoteAddress=t.connection.socket&&t.connection.socket.remoteAddress)),r}return i(t,e),t.prototype.onError=function(e,t){this._setStatus(void 0,e),t&&(this.duration=t)},t.prototype.onResponse=function(e,t){this._setStatus(e.statusCode,void 0),t&&(this.duration=t)},t.prototype.getRequestTelemetry=function(e){var t={id:this.requestId,name:this.method+" "+o.parse(this.url).pathname,url:this.url,source:this.sourceCorrelationId,duration:this.duration,resultCode:this.statusCode?this.statusCode.toString():null,success:this._isSuccess(),properties:this.properties};if(e){for(var n in e)t[n]||(t[n]=e[n]);if(e.properties)for(var n in e.properties)t.properties[n]=e.properties[n]}return t},t.prototype.getRequestTags=function(e){var n={};for(var r in e)n[r]=e[r];return n[t.keys.locationIp]=e[t.keys.locationIp]||this._getIp(),n[t.keys.sessionId]=e[t.keys.sessionId]||this._getId("ai_session"),n[t.keys.userId]=e[t.keys.userId]||this._getId("ai_user"),n[t.keys.userAuthUserId]=e[t.keys.userAuthUserId]||this._getId("ai_authUser"),n[t.keys.operationName]=this.getOperationName(e),n[t.keys.operationParentId]=this.getOperationParentId(e),n[t.keys.operationId]=this.getOperationId(e),n},t.prototype.getOperationId=function(e){return e[t.keys.operationId]||this.operationId},t.prototype.getOperationParentId=function(e){return e[t.keys.operationParentId]||this.parentId||this.getOperationId(e)},t.prototype.getOperationName=function(e){return e[t.keys.operationName]||this.method+" "+o.parse(this.url).pathname},t.prototype.getRequestId=function(){return this.requestId},t.prototype.getCorrelationContextHeader=function(){return this.correlationContextHeader},t.prototype.getTraceparent=function(){return this.traceparent},t.prototype.getTracestate=function(){return this.tracestate},t.prototype.getLegacyRootId=function(){return this.legacyRootId},t.prototype._getAbsoluteUrl=function(e){if(!e.headers)return e.url;var t=e.connection?e.connection.encrypted:null,n=o.parse(e.url),r=n.pathname,i=n.search;return o.format({protocol:t?"https":"http",host:e.headers.host,pathname:r,search:i})},t.prototype._getIp=function(){var e=/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/,t=function(t){var n=e.exec(t);if(n)return n[0]},n=t(this.rawHeaders["x-forwarded-for"])||t(this.rawHeaders["x-client-ip"])||t(this.rawHeaders["x-real-ip"])||t(this.connectionRemoteAddress)||t(this.socketRemoteAddress)||t(this.legacySocketRemoteAddress);return!n&&this.connectionRemoteAddress&&this.connectionRemoteAddress.substr&&"::"===this.connectionRemoteAddress.substr(0,2)&&(n="127.0.0.1"),n},t.prototype._getId=function(e){var n=this.rawHeaders&&this.rawHeaders.cookie&&"string"==typeof this.rawHeaders.cookie&&this.rawHeaders.cookie||"";return t.parseId(a.getCookie(e,n))},t.prototype.setBackCompatFromThisTraceContext=function(){this.operationId=this.traceparent.traceId,this.traceparent.legacyRootId&&(this.legacyRootId=this.traceparent.legacyRootId),this.parentId=this.traceparent.parentId,this.traceparent.updateSpanId(),this.requestId=this.traceparent.getBackCompatRequestId()},t.prototype.parseHeaders=function(e,t){if(this.rawHeaders=e.headers||e.rawHeaders,this.userAgent=e.headers&&e.headers["user-agent"],this.sourceCorrelationId=a.getCorrelationContextTarget(e,c.requestContextSourceKey),e.headers){var n=e.headers[c.traceStateHeader],r=e.headers[c.traceparentHeader],i=e.headers[c.requestIdHeader],o=e.headers[c.parentIdHeader],s=e.headers[c.rootIdHeader];this.correlationContextHeader=e.headers[c.correlationContextHeader],l.w3cEnabled&&(r||n)?(this.traceparent=new f(r),this.tracestate=r&&n&&new p(n),this.setBackCompatFromThisTraceContext()):i?l.w3cEnabled?(this.traceparent=new f(null,i),this.setBackCompatFromThisTraceContext()):(this.parentId=i,this.requestId=l.generateRequestId(this.parentId),this.operationId=l.getRootId(this.requestId)):l.w3cEnabled?(this.traceparent=new f,this.traceparent.parentId=o,this.traceparent.legacyRootId=s||o,this.setBackCompatFromThisTraceContext()):(this.parentId=o,this.requestId=l.generateRequestId(s||this.parentId),this.correlationContextHeader=null,this.operationId=l.getRootId(this.requestId)),t&&(this.requestId=t,this.operationId=l.getRootId(this.requestId))}},t.parseId=function(e){var t=e.split("|");return t.length>0?t[0]:""},t.keys=new s.ContextTagKeys,t}(u);e.exports=d},731:(e,t,n)=>{"use strict";var r=n(8605),i=n(7211),o=n(5282),s=n(5740),a=n(9036),c=n(6694),u=n(894),l=n(4350),p=function(){function e(t){if(e.INSTANCE)throw new Error("Server request tracking should be configured from the applicationInsights object");e.INSTANCE=this,this._client=t}return e.prototype.enable=function(e){this._isEnabled=e,(this._isAutoCorrelating||this._isEnabled||l.isEnabled())&&!this._isInitialized&&(this.useAutoCorrelation(this._isAutoCorrelating),this._initialize())},e.prototype.useAutoCorrelation=function(e,t){e&&!this._isAutoCorrelating?u.CorrelationContextManager.enable(t):!e&&this._isAutoCorrelating&&u.CorrelationContextManager.disable(),this._isAutoCorrelating=e},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.isAutoCorrelating=function(){return this._isAutoCorrelating},e.prototype._generateCorrelationContext=function(e){if(this._isAutoCorrelating)return u.CorrelationContextManager.generateContextObject(e.getOperationId(this._client.context.tags),e.getRequestId(),e.getOperationName(this._client.context.tags),e.getCorrelationContextHeader(),e.getTraceparent(),e.getTracestate())},e.prototype._initialize=function(){var t=this;this._isInitialized=!0;var n=function(n){if(n){if("function"!=typeof n)throw new Error("onRequest handler must be a function");return function(r,i){u.CorrelationContextManager.wrapEmitter(r),u.CorrelationContextManager.wrapEmitter(i);var o=r&&!r[e.alreadyAutoCollectedFlag];if(r&&o){var s=new c(r),a=t._generateCorrelationContext(s);u.CorrelationContextManager.runWithContext(a,(function(){t._isEnabled&&(r[e.alreadyAutoCollectedFlag]=!0,e.trackRequest(t._client,{request:r,response:i},s)),"function"==typeof n&&n(r,i)}))}else"function"==typeof n&&n(r,i)}}},o=function(e){var t=e.addListener.bind(e);e.addListener=function(e,r){switch(e){case"request":case"checkContinue":return t(e,n(r));default:return t(e,r)}},e.on=e.addListener},s=r.createServer;r.createServer=function(e){var t=s(n(e));return o(t),t};var a=i.createServer;i.createServer=function(e,t){var r=a(e,n(t));return o(r),r}},e.trackRequestSync=function(t,n){if(n.request&&n.response&&t){e.addResponseCorrelationIdHeader(t,n.response);var r=u.CorrelationContextManager.getCurrentContext(),i=new c(n.request,r&&r.operation.parentId);r&&(r.operation.id=i.getOperationId(t.context.tags)||r.operation.id,r.operation.name=i.getOperationName(t.context.tags)||r.operation.name,r.operation.parentId=i.getRequestId()||r.operation.parentId,r.customProperties.addHeaderData(i.getCorrelationContextHeader())),e.endRequest(t,i,n,n.duration,n.error)}else o.info("AutoCollectHttpRequests.trackRequestSync was called with invalid parameters: ",!n.request,!n.response,!t)},e.trackRequest=function(t,n,r){if(n.request&&n.response&&t){var i=u.CorrelationContextManager.getCurrentContext(),a=r||new c(n.request,i&&i.operation.parentId);s.canIncludeCorrelationHeader(t,a.getUrl())&&e.addResponseCorrelationIdHeader(t,n.response),i&&!r&&(i.operation.id=a.getOperationId(t.context.tags)||i.operation.id,i.operation.name=a.getOperationName(t.context.tags)||i.operation.name,i.operation.parentId=a.getOperationParentId(t.context.tags)||i.operation.parentId,i.customProperties.addHeaderData(a.getCorrelationContextHeader())),n.response.once&&n.response.once("finish",(function(){e.endRequest(t,a,n,null,null)})),n.request.on&&n.request.on("error",(function(r){e.endRequest(t,a,n,null,r)}))}else o.info("AutoCollectHttpRequests.trackRequest was called with invalid parameters: ",!n.request,!n.response,!t)},e.addResponseCorrelationIdHeader=function(e,t){if(e.config&&e.config.correlationId&&t.getHeader&&t.setHeader&&!t.headersSent){var n=t.getHeader(a.requestContextHeader);s.safeIncludeCorrelationHeader(e,t,n)}},e.endRequest=function(e,t,n,r,i){i?t.onError(i,r):t.onResponse(n.response,r);var o=t.getRequestTelemetry(n);if(o.tagOverrides=t.getRequestTags(e.context.tags),n.tagOverrides)for(var s in n.tagOverrides)o.tagOverrides[s]=n.tagOverrides[s];var a=t.getLegacyRootId();a&&(o.properties.ai_legacyRootId=a),o.contextObjects=o.contextObjects||{},o.contextObjects["http.ServerRequest"]=n.request,o.contextObjects["http.ServerResponse"]=n.response,e.trackRequest(o)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1,u.CorrelationContextManager.disable(),this._isAutoCorrelating=!1},e.alreadyAutoCollectedFlag="_appInsightsAutoCollected",e}();e.exports=p},1629:function(e,t,n){"use strict";var r=this&&this.__assign||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};Object.defineProperty(t,"__esModule",{value:!0});var i=n(9253),o=n(4470),s=n(5282),a=function(){function e(t){this._disabledMetrics={},e.INSTANCE&&e.INSTANCE.dispose(),e.INSTANCE=this,this._client=t}return e.isNodeVersionCompatible=function(){var e=process.versions.node.split(".");return parseInt(e[0])>=6},e.prototype.enable=function(t,r,i){var o=this;if(void 0===r&&(r={}),void 0===i&&(i=6e4),e.isNodeVersionCompatible()){if(null==e._metricsAvailable&&t&&!this._isInitialized)try{var a=n(Object(function(){var e=new Error("Cannot find module 'applicationinsights-native-metrics'");throw e.code="MODULE_NOT_FOUND",e}()));e._emitter=new a,e._metricsAvailable=!0,s.info("Native metrics module successfully loaded!")}catch(t){return void(e._metricsAvailable=!1)}this._isEnabled=t,this._disabledMetrics=r,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),this._isEnabled&&e._emitter?(e._emitter.enable(!0,i),this._handle=setInterval((function(){return o._trackNativeMetrics()}),i),this._handle.unref()):e._emitter&&(e._emitter.enable(!1),this._handle&&(clearInterval(this._handle),this._handle=void 0))}},e.prototype.dispose=function(){this.enable(!1)},e.parseEnabled=function(e){var t=process.env[i.ENV_nativeMetricsDisableAll],n=process.env[i.ENV_nativeMetricsDisablers];if(t)return{isEnabled:!1,disabledMetrics:{}};if(n){var o=n.split(","),s={};if(o.length>0)for(var a=0,c=o;a<c.length;a++){s[c[a]]=!0}return"object"==typeof e?{isEnabled:!0,disabledMetrics:r({},e,s)}:{isEnabled:e,disabledMetrics:s}}return"boolean"==typeof e?{isEnabled:e,disabledMetrics:{}}:{isEnabled:!0,disabledMetrics:e}},e.prototype._trackNativeMetrics=function(){var e=!0;"object"!=typeof this._isEnabled&&(e=this._isEnabled),e&&(this._trackGarbageCollection(),this._trackEventLoop(),this._trackHeapUsage())},e.prototype._trackGarbageCollection=function(){if(!this._disabledMetrics.gc){var t,n=e._emitter.getGCData();for(var r in n){var i=n[r].metrics,s=r+" Garbage Collection Duration",a=Math.sqrt(i.sumSquares/i.count-Math.pow(i.total/i.count,2))||0;this._client.trackMetric({name:s,value:i.total,count:i.count,max:i.max,min:i.min,stdDev:a,tagOverrides:(t={},t[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+o.sdkVersion,t)})}}},e.prototype._trackEventLoop=function(){if(!this._disabledMetrics.loop){var t=e._emitter.getLoopData().loopUsage;if(0!=t.count){var n,r=Math.sqrt(t.sumSquares/t.count-Math.pow(t.total/t.count,2))||0;this._client.trackMetric({name:"Event Loop CPU Time",value:t.total,count:t.count,min:t.min,max:t.max,stdDev:r,tagOverrides:(n={},n[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+o.sdkVersion,n)})}}},e.prototype._trackHeapUsage=function(){if(!this._disabledMetrics.heap){var e,t,n,r=process.memoryUsage(),i=r.heapUsed,s=r.heapTotal,a=r.rss;this._client.trackMetric({name:"Memory Usage (Heap)",value:i,count:1,tagOverrides:(e={},e[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+o.sdkVersion,e)}),this._client.trackMetric({name:"Memory Total (Heap)",value:s,count:1,tagOverrides:(t={},t[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+o.sdkVersion,t)}),this._client.trackMetric({name:"Memory Usage (Non-Heap)",value:a-s,count:1,tagOverrides:(n={},n[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+o.sdkVersion,n)})}},e}();t.AutoCollectNativePerformance=a},4350:(e,t,n)=>{"use strict";var r=n(2087),i=n(3580),o=function(){function e(t,n,r){void 0===n&&(n=6e4),void 0===r&&(r=!1),this._lastIntervalRequestExecutionTime=0,this._lastIntervalDependencyExecutionTime=0,e.INSTANCE||(e.INSTANCE=this),this._isInitialized=!1,this._client=t,this._collectionInterval=n,this._enableLiveMetricsCounters=r}return e.prototype.enable=function(t,n){var i=this;this._isEnabled=t,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),t?this._handle||(this._lastCpus=r.cpus(),this._lastRequests={totalRequestCount:e._totalRequestCount,totalFailedRequestCount:e._totalFailedRequestCount,time:+new Date},this._lastDependencies={totalDependencyCount:e._totalDependencyCount,totalFailedDependencyCount:e._totalFailedDependencyCount,time:+new Date},this._lastExceptions={totalExceptionCount:e._totalExceptionCount,time:+new Date},"function"==typeof process.cpuUsage&&(this._lastAppCpuUsage=process.cpuUsage()),this._lastHrtime=process.hrtime(),this._collectionInterval=n||this._collectionInterval,this._handle=setInterval((function(){return i.trackPerformance()}),this._collectionInterval),this._handle.unref()):this._handle&&(clearInterval(this._handle),this._handle=void 0)},e.countRequest=function(t,n){var r;if(e.isEnabled()){if("string"==typeof t)r=+new Date("1970-01-01T"+t+"Z");else{if("number"!=typeof t)return;r=t}e._intervalRequestExecutionTime+=r,!1===n&&e._totalFailedRequestCount++,e._totalRequestCount++}},e.countException=function(){e._totalExceptionCount++},e.countDependency=function(t,n){var r;if(e.isEnabled()){if("string"==typeof t)r=+new Date("1970-01-01T"+t+"Z");else{if("number"!=typeof t)return;r=t}e._intervalDependencyExecutionTime+=r,!1===n&&e._totalFailedDependencyCount++,e._totalDependencyCount++}},e.prototype.isInitialized=function(){return this._isInitialized},e.isEnabled=function(){return e.INSTANCE&&e.INSTANCE._isEnabled},e.prototype.trackPerformance=function(){this._trackCpu(),this._trackMemory(),this._trackNetwork(),this._trackDependencyRate(),this._trackExceptionRate()},e.prototype._trackCpu=function(){var e=r.cpus();if(e&&e.length&&this._lastCpus&&e.length===this._lastCpus.length){for(var t=0,n=0,o=0,s=0,a=0,c=0;e&&c<e.length;c++){var u=e[c],l=this._lastCpus[c],p=(u.model,u.speed,u.times),f=l.times;t+=p.user-f.user||0,n+=p.sys-f.sys||0,o+=p.nice-f.nice||0,s+=p.idle-f.idle||0,a+=p.irq-f.irq||0}var d=void 0;if("function"==typeof process.cpuUsage){var h=process.cpuUsage(),m=process.hrtime(),g=h.user-this._lastAppCpuUsage.user+(h.system-this._lastAppCpuUsage.system)||0;if(void 0!==this._lastHrtime&&2===this._lastHrtime.length)d=100*g/((1e6*(m[0]-this._lastHrtime[0])+(m[1]-this._lastHrtime[1])/1e3||0)*e.length);this._lastAppCpuUsage=h,this._lastHrtime=m}var v=t+n+o+s+a||1;this._client.trackMetric({name:i.PerformanceCounter.PROCESSOR_TIME,value:(v-s)/v*100}),this._client.trackMetric({name:i.PerformanceCounter.PROCESS_TIME,value:d||t/v*100})}this._lastCpus=e},e.prototype._trackMemory=function(){var e=r.freemem(),t=process.memoryUsage().rss,n=r.totalmem()-e;this._client.trackMetric({name:i.PerformanceCounter.PRIVATE_BYTES,value:t}),this._client.trackMetric({name:i.PerformanceCounter.AVAILABLE_BYTES,value:e}),this._enableLiveMetricsCounters&&this._client.trackMetric({name:i.QuickPulseCounter.COMMITTED_BYTES,value:n})},e.prototype._trackNetwork=function(){var t=this._lastRequests,n={totalRequestCount:e._totalRequestCount,totalFailedRequestCount:e._totalFailedRequestCount,time:+new Date},r=n.totalRequestCount-t.totalRequestCount||0,o=n.totalFailedRequestCount-t.totalFailedRequestCount||0,s=n.time-t.time,a=s/1e3,c=(e._intervalRequestExecutionTime-this._lastIntervalRequestExecutionTime)/r||0;if(this._lastIntervalRequestExecutionTime=e._intervalRequestExecutionTime,s>0){var u=r/a,l=o/a;this._client.trackMetric({name:i.PerformanceCounter.REQUEST_RATE,value:u}),(!this._enableLiveMetricsCounters||r>0)&&this._client.trackMetric({name:i.PerformanceCounter.REQUEST_DURATION,value:c}),this._enableLiveMetricsCounters&&this._client.trackMetric({name:i.QuickPulseCounter.REQUEST_FAILURE_RATE,value:l})}this._lastRequests=n},e.prototype._trackDependencyRate=function(){if(this._enableLiveMetricsCounters){var t=this._lastDependencies,n={totalDependencyCount:e._totalDependencyCount,totalFailedDependencyCount:e._totalFailedDependencyCount,time:+new Date},r=n.totalDependencyCount-t.totalDependencyCount||0,o=n.totalFailedDependencyCount-t.totalFailedDependencyCount||0,s=n.time-t.time,a=s/1e3,c=(e._intervalDependencyExecutionTime-this._lastIntervalDependencyExecutionTime)/r||0;if(this._lastIntervalDependencyExecutionTime=e._intervalDependencyExecutionTime,s>0){var u=r/a,l=o/a;this._client.trackMetric({name:i.QuickPulseCounter.DEPENDENCY_RATE,value:u}),this._client.trackMetric({name:i.QuickPulseCounter.DEPENDENCY_FAILURE_RATE,value:l}),(!this._enableLiveMetricsCounters||r>0)&&this._client.trackMetric({name:i.QuickPulseCounter.DEPENDENCY_DURATION,value:c})}this._lastDependencies=n}},e.prototype._trackExceptionRate=function(){if(this._enableLiveMetricsCounters){var t=this._lastExceptions,n={totalExceptionCount:e._totalExceptionCount,time:+new Date},r=n.totalExceptionCount-t.totalExceptionCount||0,o=n.time-t.time;if(o>0){var s=r/(o/1e3);this._client.trackMetric({name:i.QuickPulseCounter.EXCEPTION_RATE,value:s})}this._lastExceptions=n}},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e._totalRequestCount=0,e._totalFailedRequestCount=0,e._lastRequestExecutionTime=0,e._totalDependencyCount=0,e._totalFailedDependencyCount=0,e._lastDependencyExecutionTime=0,e._totalExceptionCount=0,e._intervalDependencyExecutionTime=0,e._intervalRequestExecutionTime=0,e}();e.exports=o},3054:e=>{"use strict";var t=function(){function e(){}return e.prototype.getUrl=function(){return this.url},e.prototype.RequestParser=function(){this.startTime=+new Date},e.prototype._setStatus=function(e,t){var n=+new Date;this.duration=n-this.startTime,this.statusCode=e;var r=this.properties||{};if(t)if("string"==typeof t)r.error=t;else if(t instanceof Error)r.error=t.message;else if("object"==typeof t)for(var i in t)r[i]=t[i]&&t[i].toString&&t[i].toString();this.properties=r},e.prototype._isSuccess=function(){return 0<this.statusCode&&this.statusCode<400},e}();e.exports=t},5823:(e,t,n)=>{"use strict";var r=n(5290),i=n(4953),o=[],s={10:r.SeverityLevel.Verbose,20:r.SeverityLevel.Verbose,30:r.SeverityLevel.Information,40:r.SeverityLevel.Warning,50:r.SeverityLevel.Error,60:r.SeverityLevel.Critical},a=function(e){var t=e.data.result;o.forEach((function(n){var r=s[e.data.level];t instanceof Error?n.trackException({exception:t}):n.trackTrace({message:t,severity:r})}))};t.wp=function(e,t){e?(0===o.length&&i.channel.subscribe("bunyan",a),o.push(t)):0===(o=o.filter((function(e){return e!=t}))).length&&i.channel.unsubscribe("bunyan",a)}},4309:(e,t,n)=>{"use strict";var r=n(5290),i=n(4953),o=[],s=function(e){var t=e.data.message;o.forEach((function(n){t instanceof Error?n.trackException({exception:t}):(t.lastIndexOf("\n")==t.length-1&&(t=t.substring(0,t.length-1)),n.trackTrace({message:t,severity:e.data.stderr?r.SeverityLevel.Warning:r.SeverityLevel.Information}))}))};t.wp=function(e,t){e?(0===o.length&&i.channel.subscribe("console",s),o.push(t)):0===(o=o.filter((function(e){return e!=t}))).length&&i.channel.unsubscribe("console",s)}},7396:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5282);t.IsInitialized=!process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL;var i="DiagnosticChannel";if(t.IsInitialized){var o=n(4106),s=(process.env.APPLICATION_INSIGHTS_NO_PATCH_MODULES||"").split(","),a={bunyan:o.bunyan,console:o.console,mongodb:o.mongodb,mongodbCore:o.mongodbCore,mysql:o.mysql,redis:o.redis,pg:o.pg,pgPool:o.pgPool,winston:o.winston};for(var c in a)-1===s.indexOf(c)&&(a[c].enable(),r.info(i,"Subscribed to "+c+" events"));s.length>0&&r.info(i,"Some modules will not be patched",s)}else r.info(i,"Not subscribing to dependency autocollection because APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL was set");t.registerContextPreservation=function(e){t.IsInitialized&&n(4953).channel.addContextPreservation(e)}},7886:(e,t,n)=>{"use strict";var r=n(4953),i=[];t.qP=function(e){e.data.event.commandName,i.forEach((function(t){var n=e.data.startedData&&e.data.startedData.databaseName||"Unknown database";t.trackDependency({target:n,data:e.data.event.commandName,name:e.data.event.commandName,duration:e.data.event.duration,success:e.data.succeeded,resultCode:e.data.succeeded?"0":"1",dependencyTypeName:"mongodb"})}))},t.wp=function(e,n){e?(0===i.length&&r.channel.subscribe("mongodb",t.qP),i.push(n)):0===(i=i.filter((function(e){return e!=n}))).length&&r.channel.unsubscribe("mongodb",t.qP)}},4777:(e,t,n)=>{"use strict";var r=n(4953),i=[];t.qP=function(e){i.forEach((function(t){var n=e.data.query||{},r=n.sql||"Unknown query",i=!e.data.err,o=(n._connection||{}).config||{},s=o.socketPath?o.socketPath:(o.host||"localhost")+":"+o.port;t.trackDependency({target:s,data:r,name:r,duration:e.data.duration,success:i,resultCode:i?"0":"1",dependencyTypeName:"mysql"})}))},t.wp=function(e,n){e?(0===i.length&&r.channel.subscribe("mysql",t.qP),i.push(n)):0===(i=i.filter((function(e){return e!=n}))).length&&r.channel.unsubscribe("mysql",t.qP)}},9843:(e,t,n)=>{"use strict";var r=n(4953),i=[];t.qP=function(e){i.forEach((function(t){var n=e.data.query,r=n.preparable&&n.preparable.text||n.plan||n.text||"unknown query",i=!e.data.error,o=e.data.database.host+":"+e.data.database.port;t.trackDependency({target:o,data:r,name:r,duration:e.data.duration,success:i,resultCode:i?"0":"1",dependencyTypeName:"postgres"})}))},t.wp=function(e,n){e?(0===i.length&&r.channel.subscribe("postgres",t.qP),i.push(n)):0===(i=i.filter((function(e){return e!=n}))).length&&r.channel.unsubscribe("postgres",t.qP)}},5071:(e,t,n)=>{"use strict";var r=n(4953),i=[];t.qP=function(e){i.forEach((function(t){"info"!==e.data.commandObj.command&&t.trackDependency({target:e.data.address,name:e.data.commandObj.command,data:e.data.commandObj.command,duration:e.data.duration,success:!e.data.err,resultCode:e.data.err?"1":"0",dependencyTypeName:"redis"})}))},t.wp=function(e,n){e?(0===i.length&&r.channel.subscribe("redis",t.qP),i.push(n)):0===(i=i.filter((function(e){return e!=n}))).length&&r.channel.unsubscribe("redis",t.qP)}},454:(e,t,n)=>{"use strict";var r=n(5290),i=n(4953),o=[],s={syslog:function(e){var t={emerg:r.SeverityLevel.Critical,alert:r.SeverityLevel.Critical,crit:r.SeverityLevel.Critical,error:r.SeverityLevel.Error,warning:r.SeverityLevel.Warning,notice:r.SeverityLevel.Information,info:r.SeverityLevel.Information,debug:r.SeverityLevel.Verbose};return void 0===t[e]?r.SeverityLevel.Information:t[e]},npm:function(e){var t={error:r.SeverityLevel.Error,warn:r.SeverityLevel.Warning,info:r.SeverityLevel.Information,verbose:r.SeverityLevel.Verbose,debug:r.SeverityLevel.Verbose,silly:r.SeverityLevel.Verbose};return void 0===t[e]?r.SeverityLevel.Information:t[e]},unknown:function(e){return r.SeverityLevel.Information}},a=function(e){var t=e.data.message;o.forEach((function(n){if(t instanceof Error)n.trackException({exception:t,properties:e.data.meta});else{var r=s[e.data.levelKind](e.data.level);n.trackTrace({message:t,severity:r,properties:e.data.meta})}}))};t.wp=function(e,t){e?(0===o.length&&i.channel.subscribe("winston",a),o.push(t)):0===(o=o.filter((function(e){return e!=t}))).length&&i.channel.unsubscribe("winston",a)}},3580:(e,t)=>{"use strict";var n,r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_BREEZE_ENDPOINT="https://dc.services.visualstudio.com",t.DEFAULT_LIVEMETRICS_ENDPOINT="https://rt.services.visualstudio.com",t.DEFAULT_LIVEMETRICS_HOST="rt.services.visualstudio.com",function(e){e.COMMITTED_BYTES="\\Memory\\Committed Bytes",e.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",e.REQUEST_RATE="\\ApplicationInsights\\Requests/Sec",e.REQUEST_FAILURE_RATE="\\ApplicationInsights\\Requests Failed/Sec",e.REQUEST_DURATION="\\ApplicationInsights\\Request Duration",e.DEPENDENCY_RATE="\\ApplicationInsights\\Dependency Calls/Sec",e.DEPENDENCY_FAILURE_RATE="\\ApplicationInsights\\Dependency Calls Failed/Sec",e.DEPENDENCY_DURATION="\\ApplicationInsights\\Dependency Call Duration",e.EXCEPTION_RATE="\\ApplicationInsights\\Exceptions/Sec"}(n=t.QuickPulseCounter||(t.QuickPulseCounter={})),function(e){e.PRIVATE_BYTES="\\Process(??APP_WIN32_PROC??)\\Private Bytes",e.AVAILABLE_BYTES="\\Memory\\Available Bytes",e.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",e.PROCESS_TIME="\\Process(??APP_WIN32_PROC??)\\% Processor Time",e.REQUEST_RATE="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Requests/Sec",e.REQUEST_DURATION="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Request Execution Time"}(r=t.PerformanceCounter||(t.PerformanceCounter={})),t.PerformanceToQuickPulseCounter=((i={})[r.PROCESSOR_TIME]=n.PROCESSOR_TIME,i[r.REQUEST_RATE]=n.REQUEST_RATE,i[r.REQUEST_DURATION]=n.REQUEST_DURATION,i[n.COMMITTED_BYTES]=n.COMMITTED_BYTES,i[n.REQUEST_FAILURE_RATE]=n.REQUEST_FAILURE_RATE,i[n.DEPENDENCY_RATE]=n.DEPENDENCY_RATE,i[n.DEPENDENCY_FAILURE_RATE]=n.DEPENDENCY_FAILURE_RATE,i[n.DEPENDENCY_DURATION]=n.DEPENDENCY_DURATION,i[n.EXCEPTION_RATE]=n.EXCEPTION_RATE,i),t.QuickPulseDocumentType={Event:"Event",Exception:"Exception",Trace:"Trace",Metric:"Metric",Request:"Request",Dependency:"RemoteDependency",Availability:"Availability"},t.QuickPulseType={Event:"EventTelemetryDocument",Exception:"ExceptionTelemetryDocument",Trace:"TraceTelemetryDocument",Metric:"MetricTelemetryDocument",Request:"RequestTelemetryDocument",Dependency:"DependencyTelemetryDocument",Availability:"AvailabilityTelemetryDocument"},t.TelemetryTypeStringToQuickPulseType={EventData:t.QuickPulseType.Event,ExceptionData:t.QuickPulseType.Exception,MessageData:t.QuickPulseType.Trace,MetricData:t.QuickPulseType.Metric,RequestData:t.QuickPulseType.Request,RemoteDependencyData:t.QuickPulseType.Dependency,AvailabilityData:t.QuickPulseType.Availability},t.TelemetryTypeStringToQuickPulseDocumentType={EventData:t.QuickPulseDocumentType.Event,ExceptionData:t.QuickPulseDocumentType.Exception,MessageData:t.QuickPulseDocumentType.Trace,MetricData:t.QuickPulseDocumentType.Metric,RequestData:t.QuickPulseDocumentType.Request,RemoteDependencyData:t.QuickPulseDocumentType.Dependency,AvailabilityData:t.QuickPulseDocumentType.Availability}},9382:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9958),i=function(){function e(){}return e.TYPE_HTTP="Http",e.TYPE_AI="Http (tracked component)",e}();t.RemoteDependencyDataConstants=i,t.domainSupportsProperties=function(e){return"properties"in e||e instanceof r.EventData||e instanceof r.ExceptionData||e instanceof r.MessageData||e instanceof r.MetricData||e instanceof r.PageViewData||e instanceof r.RemoteDependencyData||e instanceof r.RequestData}},7220:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return i(t,e),t}(n(8934));e.exports=o},4101:e=>{"use strict";var t=function(){};e.exports=t},9871:e=>{"use strict";var t=function(){this.applicationVersion="ai.application.ver",this.deviceId="ai.device.id",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceOEMName="ai.device.oemName",this.deviceOSVersion="ai.device.osVersion",this.deviceType="ai.device.type",this.locationIp="ai.location.ip",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.userAccountId="ai.user.accountId",this.userId="ai.user.id",this.userAuthUserId="ai.user.authUserId",this.cloudRole="ai.cloud.role",this.cloudRoleInstance="ai.cloud.roleInstance",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion",this.internalNodeName="ai.internal.nodeName"};e.exports=t},320:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=function(e){function t(){return e.call(this)||this}return i(t,e),t}(n(4101));e.exports=o},8602:(e,t,n)=>{"use strict";var r=n(495),i=function(){this.kind=r.Measurement};e.exports=i},495:e=>{"use strict";var t;!function(e){e[e.Measurement=0]="Measurement",e[e.Aggregation=1]="Aggregation"}(t||(t={})),e.exports=t},8934:e=>{"use strict";var t=function(){};e.exports=t},7300:e=>{"use strict";var t=function(){this.ver=1,this.sampleRate=100,this.tags={}};e.exports=t},4526:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return i(t,e),t}(n(8934));e.exports=o},935:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.exceptions=[],t.properties={},t.measurements={},t}return i(t,e),t}(n(8934));e.exports=o},8082:e=>{"use strict";var t=function(){this.hasFullStack=!0,this.parsedStack=[]};e.exports=t},901:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t}return i(t,e),t}(n(8934));e.exports=o},3092:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.metrics=[],t.properties={},t}return i(t,e),t}(n(8934));e.exports=o},6279:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return i(t,e),t}(n(4526));e.exports=o},6290:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.success=!0,t.properties={},t.measurements={},t}return i(t,e),t}(n(8934));e.exports=o},7339:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return i(t,e),t}(n(8934));e.exports=o},9697:e=>{"use strict";var t;!function(e){e[e.Verbose=0]="Verbose",e[e.Information=1]="Information",e[e.Warning=2]="Warning",e[e.Error=3]="Error",e[e.Critical=4]="Critical"}(t||(t={})),e.exports=t},6781:e=>{"use strict";var t=function(){};e.exports=t},9958:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AvailabilityData=n(7220),t.Base=n(4101),t.ContextTagKeys=n(9871),t.Data=n(320),t.DataPoint=n(8602),t.DataPointType=n(495),t.Domain=n(8934),t.Envelope=n(7300),t.EventData=n(4526),t.ExceptionData=n(935),t.ExceptionDetails=n(8082),t.MessageData=n(901),t.MetricData=n(3092),t.PageViewData=n(6279),t.RemoteDependencyData=n(6290),t.RequestData=n(7339),t.SeverityLevel=n(9697),t.StackFrame=n(6781)},5481:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.telemetryTypeToBaseType=function(e){switch(e){case n.Event:return"EventData";case n.Exception:return"ExceptionData";case n.Trace:return"MessageData";case n.Metric:return"MetricData";case n.Request:return"RequestData";case n.Dependency:return"RemoteDependencyData";case n.Availability:return"AvailabilityData"}},t.baseTypeToTelemetryType=function(e){switch(e){case"EventData":return n.Event;case"ExceptionData":return n.Exception;case"MessageData":return n.Trace;case"MetricData":return n.Metric;case"RequestData":return n.Request;case"RemoteDependencyData":return n.Dependency;case"AvailabilityData":return n.Availability}},t.TelemetryTypeString={Event:"EventData",Exception:"ExceptionData",Trace:"MessageData",Metric:"MetricData",Request:"RequestData",Dependency:"RemoteDependencyData",Availability:"AvailabilityData"},function(e){e[e.Event=0]="Event",e[e.Exception=1]="Exception",e[e.Trace=2]="Trace",e[e.Metric=3]="Metric",e[e.Request=4]="Request",e[e.Dependency=5]="Dependency",e[e.Availability=6]="Availability"}(n=t.TelemetryType||(t.TelemetryType={}))},2626:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(5481))},5290:(e,t,n)=>{"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(9382)),r(n(9958)),r(n(2626))},3504:(e,t,n)=>{"use strict";var r=n(5282),i=function(){function e(e,t,n,r){this._buffer=[],this._lastSend=0,this._isDisabled=e,this._getBatchSize=t,this._getBatchIntervalMs=n,this._sender=r}return e.prototype.setUseDiskRetryCaching=function(e,t,n){this._sender.setDiskRetryMode(e,t,n)},e.prototype.send=function(e){var t=this;if(!this._isDisabled())if(e){var n=this._stringify(e);"string"==typeof n&&(this._buffer.push(n),this._buffer.length>=this._getBatchSize()?this.triggerSend(!1):!this._timeoutHandle&&this._buffer.length>0&&(this._timeoutHandle=setTimeout((function(){t._timeoutHandle=null,t.triggerSend(!1)}),this._getBatchIntervalMs())))}else r.warn("Cannot send null/undefined telemetry")},e.prototype.triggerSend=function(e,t){var n=this._buffer.length<1;if(!n){var r=this._buffer.join("\n");e?(this._sender.saveOnCrash(r),"function"==typeof t&&t("data saved on crash")):this._sender.send(Buffer.from?Buffer.from(r):new Buffer(r),t)}this._lastSend=+new Date,this._buffer.length=0,clearTimeout(this._timeoutHandle),this._timeoutHandle=null,n&&"function"==typeof t&&t("no data to send")},e.prototype._stringify=function(e){try{return JSON.stringify(e)}catch(t){r.warn("Failed to serialize payload",t,e)}},e}();e.exports=i},9253:(e,t,n)=>{"use strict";var r=n(9962),i=n(640),o=n(3580),s=n(8835),a=function(){function e(t){var n=this;this.endpointBase=o.DEFAULT_BREEZE_ENDPOINT;var r=process.env[e.ENV_connectionString],a=i.parse(t),c=i.parse(r),u=!a.instrumentationkey&&Object.keys(a).length>0?null:t;this.instrumentationKey=a.instrumentationkey||u||c.instrumentationkey||e._getInstrumentationKey(),this.endpointUrl=(a.ingestionendpoint||c.ingestionendpoint||this.endpointBase)+"/v2/track",this.maxBatchSize=250,this.maxBatchIntervalMs=15e3,this.disableAppInsights=!1,this.samplingPercentage=100,this.correlationIdRetryIntervalMs=3e4,this.correlationHeaderExcludedDomains=["*.core.windows.net","*.core.chinacloudapi.cn","*.core.cloudapi.de","*.core.usgovcloudapi.net","*.core.microsoft.scloud","*.core.eaglex.ic.gov"],this.setCorrelationId=function(e){return n.correlationId=e},this.proxyHttpUrl=process.env[e.ENV_http_proxy]||void 0,this.proxyHttpsUrl=process.env[e.ENV_https_proxy]||void 0,this.httpAgent=void 0,this.httpsAgent=void 0,this.profileQueryEndpoint=a.ingestionendpoint||c.ingestionendpoint||process.env[e.ENV_profileQueryEndpoint]||this.endpointBase,this._quickPulseHost=a.liveendpoint||c.liveendpoint||process.env[e.ENV_quickPulseHost]||o.DEFAULT_LIVEMETRICS_HOST,this._quickPulseHost.match(/^https?:\/\//)&&(this._quickPulseHost=s.parse(this._quickPulseHost).host)}return Object.defineProperty(e.prototype,"profileQueryEndpoint",{get:function(){return this._profileQueryEndpoint},set:function(e){r.cancelCorrelationIdQuery(this,this.setCorrelationId),this._profileQueryEndpoint=e,this.correlationId=r.correlationIdPrefix,r.queryCorrelationId(this,this.setCorrelationId)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"quickPulseHost",{get:function(){return this._quickPulseHost},set:function(e){this._quickPulseHost=e},enumerable:!0,configurable:!0}),e._getInstrumentationKey=function(){var t=process.env[e.ENV_iKey]||process.env[e.ENV_azurePrefix+e.ENV_iKey]||process.env[e.legacy_ENV_iKey]||process.env[e.ENV_azurePrefix+e.legacy_ENV_iKey];if(!t||""==t)throw new Error("Instrumentation key not found, pass the key in the config to this method or set the key in the environment variable APPINSIGHTS_INSTRUMENTATIONKEY before starting the server");return t},e.ENV_azurePrefix="APPSETTING_",e.ENV_iKey="APPINSIGHTS_INSTRUMENTATIONKEY",e.legacy_ENV_iKey="APPINSIGHTS_INSTRUMENTATION_KEY",e.ENV_profileQueryEndpoint="APPINSIGHTS_PROFILE_QUERY_ENDPOINT",e.ENV_quickPulseHost="APPINSIGHTS_QUICKPULSE_HOST",e.ENV_connectionString="APPLICATIONINSIGHTS_CONNECTION_STRING",e.ENV_nativeMetricsDisablers="APPLICATION_INSIGHTS_DISABLE_EXTENDED_METRIC",e.ENV_nativeMetricsDisableAll="APPLICATION_INSIGHTS_DISABLE_ALL_EXTENDED_METRICS",e.ENV_http_proxy="http_proxy",e.ENV_https_proxy="https_proxy",e}();e.exports=a},640:(e,t,n)=>{"use strict";var r=n(3580),i=function(){function e(){}return e.parse=function(t){if(!t)return{};var n=t.split(e._FIELDS_SEPARATOR).reduce((function(t,n){var r=n.split(e._FIELD_KEY_VALUE_SEPARATOR);if(2===r.length){var i=r[0].toLowerCase(),o=r[1];t[i]=o}return t}),{});if(Object.keys(n).length>0){if(n.endpointsuffix){var i=n.location?n.location+".":"";n.ingestionendpoint=n.ingestionendpoint||"https://"+i+"dc."+n.endpointsuffix,n.liveendpoint=n.liveendpoint||"https://"+i+"live."+n.endpointsuffix}n.ingestionendpoint=n.ingestionendpoint||r.DEFAULT_BREEZE_ENDPOINT,n.liveendpoint=n.liveendpoint||r.DEFAULT_LIVEMETRICS_ENDPOINT}return n},e._FIELDS_SEPARATOR=";",e._FIELD_KEY_VALUE_SEPARATOR="=",e}();e.exports=i},4470:(e,t,n)=>{"use strict";var r=n(2087),i=n(5747),o=n(5622),s=n(5290),a=n(5282),c=function(){function e(e){this.keys=new s.ContextTagKeys,this.tags={},this._loadApplicationContext(),this._loadDeviceContext(),this._loadInternalContext()}return e.prototype._loadApplicationContext=function(t){if(t=t||o.resolve(__dirname,"../../../../package.json"),!e.appVersion[t]){e.appVersion[t]="unknown";try{var n=JSON.parse(i.readFileSync(t,"utf8"));n&&"string"==typeof n.version&&(e.appVersion[t]=n.version)}catch(e){a.info("unable to read app version: ",e)}}this.tags[this.keys.applicationVersion]=e.appVersion[t]},e.prototype._loadDeviceContext=function(){this.tags[this.keys.deviceId]="",this.tags[this.keys.cloudRoleInstance]=r&&r.hostname(),this.tags[this.keys.deviceOSVersion]=r&&r.type()+" "+r.release(),this.tags[this.keys.cloudRole]=e.DefaultRoleName,this.tags["ai.device.osArchitecture"]=r&&r.arch(),this.tags["ai.device.osPlatform"]=r&&r.platform()},e.prototype._loadInternalContext=function(){var t=o.resolve(__dirname,"../../package.json");if(!e.sdkVersion){e.sdkVersion="unknown";try{var n=JSON.parse(i.readFileSync(t,"utf8"));n&&"string"==typeof n.version&&(e.sdkVersion=n.version)}catch(e){a.info("unable to read app version: ",e)}}this.tags[this.keys.internalSdkVersion]="node:"+e.sdkVersion},e.DefaultRoleName="Web",e.appVersion={},e.sdkVersion=null,e}();e.exports=c},9962:(e,t,n)=>{"use strict";var r=n(5740),i=n(5282),o=function(){function e(){}return e.queryCorrelationId=function(t,n){var o=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId";if(e.completedLookups.hasOwnProperty(o))n(e.completedLookups[o]);else if(e.pendingLookups[o])e.pendingLookups[o].push(n);else{e.pendingLookups[o]=[n];var s=function(){if(e.pendingLookups[o]){var n={method:"GET",disableAppInsightsAutoCollection:!0};i.info(e.TAG,n);var a=r.makeRequest(t,o,n,(function(n){if(200===n.statusCode){var r="";n.setEncoding("utf-8"),n.on("data",(function(e){r+=e})),n.on("end",(function(){i.info(e.TAG,r);var t=e.correlationIdPrefix+r;e.completedLookups[o]=t,e.pendingLookups[o]&&e.pendingLookups[o].forEach((function(e){return e(t)})),delete e.pendingLookups[o]}))}else n.statusCode>=400&&n.statusCode<500?(e.completedLookups[o]=void 0,delete e.pendingLookups[o]):setTimeout(s,t.correlationIdRetryIntervalMs)}));a&&(a.on("error",(function(t){i.warn(e.TAG,t)})),a.end())}};setTimeout(s,0)}},e.cancelCorrelationIdQuery=function(t,n){var r=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId",i=e.pendingLookups[r];i&&(e.pendingLookups[r]=i.filter((function(e){return e!=n})),0==e.pendingLookups[r].length&&delete e.pendingLookups[r])},e.generateRequestId=function(t){if(t){"."!==(t="|"==t[0]?t:"|"+t)[t.length-1]&&(t+=".");var n=(e.currentRootId++).toString(16);return e.appendSuffix(t,n,"_")}return e.generateRootId()},e.getRootId=function(e){var t=e.indexOf(".");t<0&&(t=e.length);var n="|"===e[0]?1:0;return e.substring(n,t)},e.generateRootId=function(){return"|"+r.w3cTraceId()+"."},e.appendSuffix=function(t,n,i){if(t.length+n.length<e.requestIdMaxLength)return t+n+i;var o=e.requestIdMaxLength-9;if(t.length>o)for(;o>1;--o){var s=t[o-1];if("."===s||"_"===s)break}if(o<=1)return e.generateRootId();for(n=r.randomu32().toString(16);n.length<8;)n="0"+n;return t.substring(0,o)+n+"#"},e.TAG="CorrelationIdManager",e.correlationIdPrefix="cid-v1:",e.w3cEnabled=!1,e.pendingLookups={},e.completedLookups={},e.requestIdMaxLength=1024,e.currentRootId=r.randomu32(),e}();e.exports=o},9813:(e,t,n)=>{"use strict";var r=n(5290),i=n(5740),o=n(894),s=function(){function e(){}return e.createEnvelope=function(t,n,o,s,a){var c=null;switch(n){case r.TelemetryType.Trace:c=e.createTraceData(t);break;case r.TelemetryType.Dependency:c=e.createDependencyData(t);break;case r.TelemetryType.Event:c=e.createEventData(t);break;case r.TelemetryType.Exception:c=e.createExceptionData(t);break;case r.TelemetryType.Request:c=e.createRequestData(t);break;case r.TelemetryType.Metric:c=e.createMetricData(t);break;case r.TelemetryType.Availability:c=e.createAvailabilityData(t)}if(o&&r.domainSupportsProperties(c.baseData)){if(c&&c.baseData)if(c.baseData.properties)for(var u in o)c.baseData.properties[u]||(c.baseData.properties[u]=o[u]);else c.baseData.properties=o;c.baseData.properties=i.validateStringMap(c.baseData.properties)}var l=a&&a.instrumentationKey||"",p=new r.Envelope;return p.data=c,p.iKey=l,p.name="Microsoft.ApplicationInsights."+l.replace(/-/g,"")+"."+c.baseType.substr(0,c.baseType.length-4),p.tags=this.getTags(s,t.tagOverrides),p.time=(new Date).toISOString(),p.ver=1,p.sampleRate=a?a.samplingPercentage:100,n===r.TelemetryType.Metric&&(p.sampleRate=100),p},e.createTraceData=function(e){var t=new r.MessageData;t.message=e.message,t.properties=e.properties,isNaN(e.severity)?t.severityLevel=r.SeverityLevel.Information:t.severityLevel=e.severity;var n=new r.Data;return n.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Trace),n.baseData=t,n},e.createDependencyData=function(e){var t=new r.RemoteDependencyData;"string"==typeof e.name&&(t.name=e.name.length>1024?e.name.slice(0,1021)+"...":e.name),t.data=e.data,t.target=e.target,t.duration=i.msToTimeSpan(e.duration),t.success=e.success,t.type=e.dependencyTypeName,t.properties=e.properties,t.resultCode=e.resultCode?e.resultCode+"":"",e.id?t.id=e.id:t.id=i.w3cTraceId();var n=new r.Data;return n.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Dependency),n.baseData=t,n},e.createEventData=function(e){var t=new r.EventData;t.name=e.name,t.properties=e.properties,t.measurements=e.measurements;var n=new r.Data;return n.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Event),n.baseData=t,n},e.createExceptionData=function(e){var t=new r.ExceptionData;t.properties=e.properties,isNaN(e.severity)?t.severityLevel=r.SeverityLevel.Error:t.severityLevel=e.severity,t.measurements=e.measurements,t.exceptions=[];var n=e.exception.stack,o=new r.ExceptionDetails;o.message=e.exception.message,o.typeName=e.exception.name,o.parsedStack=this.parseStack(n),o.hasFullStack=i.isArray(o.parsedStack)&&o.parsedStack.length>0,t.exceptions.push(o);var s=new r.Data;return s.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Exception),s.baseData=t,s},e.createRequestData=function(e){var t=new r.RequestData;e.id?t.id=e.id:t.id=i.w3cTraceId(),t.name=e.name,t.url=e.url,t.source=e.source,t.duration=i.msToTimeSpan(e.duration),t.responseCode=e.resultCode?e.resultCode+"":"",t.success=e.success,t.properties=e.properties;var n=new r.Data;return n.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Request),n.baseData=t,n},e.createMetricData=function(e){var t=new r.MetricData;t.metrics=[];var n=new r.DataPoint;n.count=isNaN(e.count)?1:e.count,n.kind=r.DataPointType.Aggregation,n.max=isNaN(e.max)?e.value:e.max,n.min=isNaN(e.min)?e.value:e.min,n.name=e.name,n.stdDev=isNaN(e.stdDev)?0:e.stdDev,n.value=e.value,t.metrics.push(n),t.properties=e.properties;var i=new r.Data;return i.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Metric),i.baseData=t,i},e.createAvailabilityData=function(e){var t=new r.AvailabilityData;e.id?t.id=e.id:t.id=i.w3cTraceId(),t.name=e.name,t.duration=i.msToTimeSpan(e.duration),t.success=e.success,t.runLocation=e.runLocation,t.message=e.message,t.measurements=e.measurements,t.properties=e.properties;var n=new r.Data;return n.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Availability),n.baseData=t,n},e.getTags=function(e,t){var n=o.CorrelationContextManager.getCurrentContext(),r={};if(e&&e.tags)for(var i in e.tags)r[i]=e.tags[i];if(t)for(var i in t)r[i]=t[i];return n&&(r[e.keys.operationId]=r[e.keys.operationId]||n.operation.id,r[e.keys.operationName]=r[e.keys.operationName]||n.operation.name,r[e.keys.operationParentId]=r[e.keys.operationParentId]||n.operation.parentId),r},e.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var r=0,i=0,o=0;o<=n.length;o++){var s=n[o];if(a.regex.test(s)){var c=new a(n[o],r++);i+=c.sizeInBytes,t.push(c)}}if(i>32768)for(var u=0,l=t.length-1,p=0,f=u,d=l;u<l;){if((p+=t[u].sizeInBytes+t[l].sizeInBytes)>32768){var h=d-f+1;t.splice(f,h);break}f=u,d=l,u++,l--}}return t},e}(),a=function(){function e(t,n){this.sizeInBytes=0,this.level=n,this.method="<no_method>",this.assembly=i.trim(t);var r=t.match(e.regex);r&&r.length>=5&&(this.method=i.trim(r[2])||this.method,this.fileName=i.trim(r[4])||"<no_filename>",this.line=parseInt(r[5])||0),this.sizeInBytes+=this.method.length,this.sizeInBytes+=this.fileName.length,this.sizeInBytes+=this.assembly.length,this.sizeInBytes+=e.baseSize,this.sizeInBytes+=this.level.toString().length,this.sizeInBytes+=this.line.toString().length}return e.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,e.baseSize=58,e}();e.exports=s},5282:e=>{"use strict";var t=function(){function e(){}return e.info=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];e.enableDebug&&console.info(e.TAG+t,n)},e.warn=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];e.disableWarnings||console.warn(e.TAG+t,n)},e.enableDebug=!1,e.disableWarnings=!1,e.disableErrors=!1,e.TAG="ApplicationInsights:",e}();e.exports=t},1259:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=n(7625),s=n(731),a=n(8723),c=n(5282),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.trackNodeHttpRequestSync=function(e){e&&e.request&&e.response&&e.duration?s.trackRequestSync(this,e):c.warn("trackNodeHttpRequestSync requires NodeHttpRequestTelemetry object with request, response and duration specified.")},t.prototype.trackNodeHttpRequest=function(e){(e.duration||e.error)&&c.warn("trackNodeHttpRequest will ignore supplied duration and error parameters. These values are collected from the request and response objects."),e&&e.request&&e.response?s.trackRequest(this,e):c.warn("trackNodeHttpRequest requires NodeHttpRequestTelemetry object with request and response specified.")},t.prototype.trackNodeHttpDependency=function(e){e&&e.request?a.trackRequest(this,e):c.warn("trackNodeHttpDependency requires NodeHttpDependencyTelemetry object with request specified.")},t}(o);e.exports=u},7148:function(e,t,n){"use strict";var r=this&&this.__assign||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},i=n(2087),o=n(5290),s=n(3580),a=n(5740),c=n(5282),u=a.w3cTraceId(),l=function(){function e(){}return e.createQuickPulseEnvelope=function(e,t,n,r){var o=i&&"function"==typeof i.hostname&&i.hostname()||"Unknown",s=r.tags&&r.keys&&r.keys.cloudRoleInstance&&r.tags[r.keys.cloudRoleInstance]||o;return{Documents:t.length>0?t:null,InstrumentationKey:n.instrumentationKey||"",Metrics:e.length>0?e:null,InvariantVersion:1,Timestamp:"/Date("+Date.now()+")/",Version:r.tags[r.keys.internalSdkVersion],StreamId:u,MachineName:o,Instance:s}},e.createQuickPulseMetric=function(e){return{Name:e.name,Value:e.value,Weight:e.count||1}},e.telemetryEnvelopeToQuickPulseDocument=function(t){switch(t.data.baseType){case o.TelemetryTypeString.Event:return e.createQuickPulseEventDocument(t);case o.TelemetryTypeString.Exception:return e.createQuickPulseExceptionDocument(t);case o.TelemetryTypeString.Trace:return e.createQuickPulseTraceDocument(t);case o.TelemetryTypeString.Dependency:return e.createQuickPulseDependencyDocument(t);case o.TelemetryTypeString.Request:return e.createQuickPulseRequestDocument(t)}return null},e.createQuickPulseEventDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData.name;return r({},n,{Name:i})},e.createQuickPulseTraceDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData.severityLevel||0;return r({},n,{Message:t.data.baseData.message,SeverityLevel:o.SeverityLevel[i]})},e.createQuickPulseExceptionDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData.exceptions,o="",s="",a="";return i&&i.length>0&&(i[0].parsedStack&&i[0].parsedStack.length>0?i[0].parsedStack.forEach((function(e){o+=e.assembly+"\n"})):i[0].stack&&i[0].stack.length>0&&(o=i[0].stack),s=i[0].message,a=i[0].typeName),r({},n,{Exception:o,ExceptionMessage:s,ExceptionType:a})},e.createQuickPulseRequestDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData;return r({},n,{Name:i.name,Success:i.success,Duration:i.duration,ResponseCode:i.responseCode,OperationName:i.name})},e.createQuickPulseDependencyDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData;return r({},n,{Name:i.name,Target:i.target,Success:i.success,Duration:i.duration,ResultCode:i.resultCode,CommandName:i.data,OperationName:n.OperationId,DependencyTypeName:i.type})},e.createQuickPulseDocument=function(t){var n,r;return t.data.baseType?(r=s.TelemetryTypeStringToQuickPulseType[t.data.baseType],n=s.TelemetryTypeStringToQuickPulseDocumentType[t.data.baseType]):c.warn("Document type invalid; not sending live metric document",t.data.baseType),{DocumentType:n,__type:r,OperationId:t.tags[e.keys.operationId],Version:"1.0",Properties:e.aggregateProperties(t)}},e.aggregateProperties=function(e){var t=[],n=e.data.baseData.measurements||{};for(var r in n)if(n.hasOwnProperty(r)){var i={key:r,value:n[r]};t.push(i)}var o=e.data.baseData.properties||{};for(var r in o)if(o.hasOwnProperty(r)){i={key:r,value:o[r]};t.push(i)}return t},e.keys=new o.ContextTagKeys,e}();e.exports=l},9184:(e,t,n)=>{"use strict";var r=n(7211),i=n(8723),o=n(5282),s="POST",a="x-ms-qps-transmission-time",c="x-ms-qps-subscribed",u=function(){function e(e){this._config=e,this._consecutiveErrors=0}return e.prototype.ping=function(e,t){this._submitData(e,t,"ping")},e.prototype.post=function(e,t){this._submitData([e],t,"post")},e.prototype._submitData=function(t,n,u){var l,p,f=this,d=JSON.stringify(t),h=((l={})[i.disableCollectionRequestOption]=!0,l.host=this._config.quickPulseHost,l.method=s,l.path="/QuickPulseService.svc/"+u+"?ikey="+this._config.instrumentationKey,l.headers=((p={Expect:"100-continue"})[a]=1e4*Date.now(),p["Content-Type"]="application/json",p["Content-Length"]=Buffer.byteLength(d),p),l),m=r.request(h,(function(e){var t="true"===e.headers[c];f._consecutiveErrors=0,n(t,e)}));m.on("error",(function(t){f._consecutiveErrors++;var r="Transient error connecting to the Live Metrics endpoint. This packet will not appear in your Live Metrics Stream. Error:";f._consecutiveErrors%e.MAX_QPS_FAILURES_BEFORE_WARN==0?(r="Live Metrics endpoint could not be reached "+f._consecutiveErrors+" consecutive times. Most recent error:",o.warn(e.TAG,r,t)):o.info(e.TAG,r,t),n()})),m.write(d),m.end()},e.TAG="QuickPulseSender",e.MAX_QPS_FAILURES_BEFORE_WARN=25,e}();e.exports=u},3668:(e,t,n)=>{"use strict";var r=n(5282),i=n(9253),o=n(7148),s=n(9184),a=n(3580),c=n(4470),u=function(){function e(e,t){this._isCollectingData=!1,this._lastSuccessTime=Date.now(),this._lastSendSucceeded=!0,this._metrics={},this._documents=[],this._collectors=[],this.config=new i(e),this.context=t||new c,this._sender=new s(this.config),this._isEnabled=!1}return e.prototype.addCollector=function(e){this._collectors.push(e)},e.prototype.trackMetric=function(e){this._addMetric(e)},e.prototype.addDocument=function(e){var t=o.telemetryEnvelopeToQuickPulseDocument(e);t&&this._documents.push(t)},e.prototype.enable=function(e){e&&!this._isEnabled?(this._isEnabled=!0,this._goQuickPulse()):!e&&this._isEnabled&&(this._isEnabled=!1,clearTimeout(this._handle),this._handle=void 0)},e.prototype.enableCollectors=function(e){this._collectors.forEach((function(t){t.enable(e)}))},e.prototype._addMetric=function(e){var t=e.value,n=e.count||1,r=a.PerformanceToQuickPulseCounter[e.name];r&&(this._metrics[r]?(this._metrics[r].Value=(this._metrics[r].Value*this._metrics[r].Weight+t*n)/(this._metrics[r].Weight+n),this._metrics[r].Weight+=n):(this._metrics[r]=o.createQuickPulseMetric(e),this._metrics[r].Name=r,this._metrics[r].Weight=1))},e.prototype._resetQuickPulseBuffer=function(){delete this._metrics,this._metrics={},this._documents.length=0},e.prototype._goQuickPulse=function(){var t=this,n=Object.keys(this._metrics).map((function(e){return t._metrics[e]})),r=o.createQuickPulseEnvelope(n,this._documents.slice(),this.config,this.context);this._resetQuickPulseBuffer(),this._isCollectingData?this._post(r):this._ping(r);var i=this._isCollectingData?e.POST_INTERVAL:e.PING_INTERVAL;this._isCollectingData&&Date.now()-this._lastSuccessTime>=e.MAX_POST_WAIT_TIME&&!this._lastSendSucceeded?(this._isCollectingData=!1,i=e.FALLBACK_INTERVAL):!this._isCollectingData&&Date.now()-this._lastSuccessTime>=e.MAX_PING_WAIT_TIME&&!this._lastSendSucceeded&&(i=e.FALLBACK_INTERVAL),this._lastSendSucceeded=null,this._handle=setTimeout(this._goQuickPulse.bind(this),i),this._handle.unref()},e.prototype._ping=function(e){this._sender.ping(e,this._quickPulseDone.bind(this))},e.prototype._post=function(e){this._sender.post(e,this._quickPulseDone.bind(this))},e.prototype._quickPulseDone=function(e,t){null!=e?(this._isCollectingData!==e&&(r.info("Live Metrics sending data",e),this.enableCollectors(e)),this._isCollectingData=e,t&&t.statusCode<300&&t.statusCode>=200?(this._lastSuccessTime=Date.now(),this._lastSendSucceeded=!0):this._lastSendSucceeded=!1):this._lastSendSucceeded=!1},e.MAX_POST_WAIT_TIME=2e4,e.MAX_PING_WAIT_TIME=6e4,e.FALLBACK_INTERVAL=6e4,e.PING_INTERVAL=5e3,e.POST_INTERVAL=1e3,e}();e.exports=u},9036:e=>{"use strict";e.exports={requestContextHeader:"request-context",requestContextSourceKey:"appId",requestContextTargetKey:"appId",requestIdHeader:"request-id",parentIdHeader:"x-ms-request-id",rootIdHeader:"x-ms-request-root-id",correlationContextHeader:"correlation-context",traceparentHeader:"traceparent",traceStateHeader:"tracestate"}},2588:(e,t,n)=>{"use strict";var r=n(5747),i=n(2087),o=n(5622),s=n(8761),a=n(3129),c=n(5282),u=n(8723),l=n(5740),p=function(){function e(t,n,i){if(this._config=t,this._onSuccess=n,this._onError=i,this._enableDiskRetryMode=!1,this._resendInterval=e.WAIT_BETWEEN_RESEND,this._maxBytesOnDisk=e.MAX_BYTES_ON_DISK,this._numConsecutiveFailures=0,!e.OS_PROVIDES_FILE_PROTECTION)if(e.USE_ICACLS){try{e.OS_PROVIDES_FILE_PROTECTION=r.existsSync(e.ICACLS_PATH)}catch(e){}e.OS_PROVIDES_FILE_PROTECTION||c.warn(e.TAG,"Could not find ICACLS in expected location! This is necessary to use disk retry mode on Windows.")}else e.OS_PROVIDES_FILE_PROTECTION=!0}return e.prototype.setDiskRetryMode=function(t,n,r){this._enableDiskRetryMode=e.OS_PROVIDES_FILE_PROTECTION&&t,"number"==typeof n&&n>=0&&(this._resendInterval=Math.floor(n)),"number"==typeof r&&r>=0&&(this._maxBytesOnDisk=Math.floor(r)),t&&!e.OS_PROVIDES_FILE_PROTECTION&&(this._enableDiskRetryMode=!1,c.warn(e.TAG,"Ignoring request to enable disk retry mode. Sufficient file protection capabilities were not detected."))},e.prototype.send=function(t,n){var r=this,i=this._config.endpointUrl,o={method:"POST",withCredentials:!1,headers:{"Content-Type":"application/x-json-stream"}};s.gzip(t,(function(s,a){var p=a;s?(c.warn(s),p=t,o.headers["Content-Length"]=t.length.toString()):(o.headers["Content-Encoding"]="gzip",o.headers["Content-Length"]=a.length),c.info(e.TAG,o),o[u.disableCollectionRequestOption]=!0;var f=l.makeRequest(r._config,i,o,(function(i){i.setEncoding("utf-8");var o="";i.on("data",(function(e){o+=e})),i.on("end",(function(){r._numConsecutiveFailures=0,c.info(e.TAG,o),"function"==typeof r._onSuccess&&r._onSuccess(o),"function"==typeof n&&n(o),r._enableDiskRetryMode&&(200===i.statusCode?setTimeout((function(){return r._sendFirstFileOnDisk()}),r._resendInterval).unref():408!==i.statusCode&&429!==i.statusCode&&439!==i.statusCode&&500!==i.statusCode&&503!==i.statusCode||r._storeToDisk(t))}))}));f.on("error",(function(i){if(r._numConsecutiveFailures++,!r._enableDiskRetryMode||r._numConsecutiveFailures>0&&r._numConsecutiveFailures%e.MAX_CONNECTION_FAILURES_BEFORE_WARN==0){var o="Ingestion endpoint could not be reached. This batch of telemetry items has been lost. Use Disk Retry Caching to enable resending of failed telemetry. Error:";r._enableDiskRetryMode&&(o="Ingestion endpoint could not be reached "+r._numConsecutiveFailures+" consecutive times. There may be resulting telemetry loss. Most recent error:"),c.warn(e.TAG,o,i)}else{o="Transient failure to reach ingestion endpoint. This batch of telemetry items will be retried. Error:";c.info(e.TAG,o,i)}if(r._onErrorHelper(i),"function"==typeof n){var s="error sending telemetry";i&&"function"==typeof i.toString&&(s=i.toString()),n(s)}r._enableDiskRetryMode&&r._storeToDisk(t)})),f.write(p),f.end()}))},e.prototype.saveOnCrash=function(e){this._enableDiskRetryMode&&this._storeToDiskSync(e)},e.prototype._runICACLS=function(t,n){var r=a.spawn(e.ICACLS_PATH,t,{windowsHide:!0});r.on("error",(function(e){return n(e)})),r.on("close",(function(e,t){return n(0===e?null:new Error("Setting ACL restrictions did not succeed (ICACLS returned code "+e+")"))}))},e.prototype._runICACLSSync=function(t){if(!a.spawnSync)throw new Error("Could not synchronously call ICACLS under current version of Node.js");var n=a.spawnSync(e.ICACLS_PATH,t,{windowsHide:!0});if(n.error)throw n.error;if(0!==n.status)throw new Error("Setting ACL restrictions did not succeed (ICACLS returned code "+n.status+")")},e.prototype._getACLIdentity=function(t){if(e.ACL_IDENTITY)return t(null,e.ACL_IDENTITY);var n=a.spawn(e.POWERSHELL_PATH,["-Command","[System.Security.Principal.WindowsIdentity]::GetCurrent().Name"],{windowsHide:!0,stdio:["ignore","pipe","pipe"]}),r="";n.stdout.on("data",(function(e){return r+=e})),n.on("error",(function(e){return t(e,null)})),n.on("close",(function(n,i){return e.ACL_IDENTITY=r&&r.trim(),t(0===n?null:new Error("Getting ACL identity did not succeed (PS returned code "+n+")"),e.ACL_IDENTITY)}))},e.prototype._getACLIdentitySync=function(){if(e.ACL_IDENTITY)return e.ACL_IDENTITY;if(a.spawnSync){var t=a.spawnSync(e.POWERSHELL_PATH,["-Command","[System.Security.Principal.WindowsIdentity]::GetCurrent().Name"],{windowsHide:!0,stdio:["ignore","pipe","pipe"]});if(t.error)throw t.error;if(0!==t.status)throw new Error("Getting ACL identity did not succeed (PS returned code "+t.status+")");return e.ACL_IDENTITY=t.stdout&&t.stdout.toString().trim(),e.ACL_IDENTITY}throw new Error("Could not synchronously get ACL identity under current version of Node.js")},e.prototype._getACLArguments=function(e,t){return[e,"/grant","*S-1-5-32-544:(OI)(CI)F","/grant",t+":(OI)(CI)F","/inheritance:r"]},e.prototype._applyACLRules=function(t,n){var r=this;return e.USE_ICACLS?void 0!==e.ACLED_DIRECTORIES[t]?n(e.ACLED_DIRECTORIES[t]?null:new Error("Setting ACL restrictions did not succeed (cached result)")):(e.ACLED_DIRECTORIES[t]=!1,void this._getACLIdentity((function(i,o){if(i)return e.ACLED_DIRECTORIES[t]=!1,n(i);r._runICACLS(r._getACLArguments(t,o),(function(r){return e.ACLED_DIRECTORIES[t]=!r,n(r)}))}))):n(null)},e.prototype._applyACLRulesSync=function(t){if(e.USE_ICACLS){if(void 0===e.ACLED_DIRECTORIES[t])return this._runICACLSSync(this._getACLArguments(t,this._getACLIdentitySync())),void(e.ACLED_DIRECTORIES[t]=!0);if(!e.ACLED_DIRECTORIES[t])throw new Error("Setting ACL restrictions did not succeed (cached result)")}},e.prototype._confirmDirExists=function(e,t){var n=this;r.lstat(e,(function(i,o){i&&"ENOENT"===i.code?r.mkdir(e,(function(r){r&&"EEXIST"!==r.code?t(r):n._applyACLRules(e,t)})):!i&&o.isDirectory()?n._applyACLRules(e,t):t(i||new Error("Path existed but was not a directory"))}))},e.prototype._getShallowDirectorySize=function(e,t){r.readdir(e,(function(n,i){if(n)return t(n,-1);var s=null,a=0,c=0;if(0!==i.length)for(var u=0;u<i.length;u++)r.stat(o.join(e,i[u]),(function(e,n){c++,e?s=e:n.isFile()&&(a+=n.size),c===i.length&&t(s,s?-1:a)}));else t(null,0)}))},e.prototype._getShallowDirectorySizeSync=function(e){for(var t=r.readdirSync(e),n=0,i=0;i<t.length;i++)n+=r.statSync(o.join(e,t[i])).size;return n},e.prototype._storeToDisk=function(t){var n=this,s=o.join(i.tmpdir(),e.TEMPDIR_PREFIX+this._config.instrumentationKey);c.info(e.TAG,"Checking existance of data storage directory: "+s),this._confirmDirExists(s,(function(i){if(i)return c.warn(e.TAG,"Error while checking/creating directory: "+(i&&i.message)),void n._onErrorHelper(i);n._getShallowDirectorySize(s,(function(i,a){if(i||a<0)return c.warn(e.TAG,"Error while checking directory size: "+(i&&i.message)),void n._onErrorHelper(i);if(a>n._maxBytesOnDisk)c.warn(e.TAG,"Not saving data due to max size limit being met. Directory size in bytes is: "+a);else{var u=(new Date).getTime()+".ai.json",l=o.join(s,u);c.info(e.TAG,"saving data to disk at: "+l),r.writeFile(l,t,{mode:384},(function(e){return n._onErrorHelper(e)}))}}))}))},e.prototype._storeToDiskSync=function(t){var n=o.join(i.tmpdir(),e.TEMPDIR_PREFIX+this._config.instrumentationKey);try{c.info(e.TAG,"Checking existance of data storage directory: "+n),r.existsSync(n)||r.mkdirSync(n),this._applyACLRulesSync(n);var s=this._getShallowDirectorySizeSync(n);if(s>this._maxBytesOnDisk)return void c.info(e.TAG,"Not saving data due to max size limit being met. Directory size in bytes is: "+s);var a=(new Date).getTime()+".ai.json",u=o.join(n,a);c.info(e.TAG,"saving data before crash to disk at: "+u),r.writeFileSync(u,t,{mode:384})}catch(t){c.warn(e.TAG,"Error while saving data to disk: "+(t&&t.message)),this._onErrorHelper(t)}},e.prototype._sendFirstFileOnDisk=function(){var t=this,n=o.join(i.tmpdir(),e.TEMPDIR_PREFIX+this._config.instrumentationKey);r.exists(n,(function(e){e&&r.readdir(n,(function(e,i){if(e)t._onErrorHelper(e);else if((i=i.filter((function(e){return o.basename(e).indexOf(".ai.json")>-1}))).length>0){var s=i[0],a=o.join(n,s);r.readFile(a,(function(e,n){e?t._onErrorHelper(e):r.unlink(a,(function(e){e?t._onErrorHelper(e):t.send(n)}))}))}}))}))},e.prototype._onErrorHelper=function(e){"function"==typeof this._onError&&this._onError(e)},e.TAG="Sender",e.ICACLS_PATH=process.env.systemdrive+"/windows/system32/icacls.exe",e.POWERSHELL_PATH=process.env.systemdrive+"/windows/system32/windowspowershell/v1.0/powershell.exe",e.ACLED_DIRECTORIES={},e.ACL_IDENTITY=null,e.WAIT_BETWEEN_RESEND=6e4,e.MAX_BYTES_ON_DISK=5e7,e.MAX_CONNECTION_FAILURES_BEFORE_WARN=5,e.TEMPDIR_PREFIX="appInsights-node",e.OS_PROVIDES_FILE_PROTECTION=!1,e.USE_ICACLS="Windows_NT"===i.type(),e}();e.exports=p},7625:(e,t,n)=>{"use strict";var r=n(8835),i=n(9253),o=n(4470),s=n(5290),a=n(3504),c=n(9428),u=n(894),l=n(2588),p=n(5740),f=n(5282),d=n(9813),h=function(){function e(e){this._telemetryProcessors=[];var t=new i(e);this.config=t,this.context=new o,this.commonProperties={};var n=new l(this.config);this.channel=new a((function(){return t.disableAppInsights}),(function(){return t.maxBatchSize}),(function(){return t.maxBatchIntervalMs}),n)}return e.prototype.trackAvailability=function(e){this.track(e,s.TelemetryType.Availability)},e.prototype.trackTrace=function(e){this.track(e,s.TelemetryType.Trace)},e.prototype.trackMetric=function(e){this.track(e,s.TelemetryType.Metric)},e.prototype.trackException=function(e){e&&e.exception&&!p.isError(e.exception)&&(e.exception=new Error(e.exception.toString())),this.track(e,s.TelemetryType.Exception)},e.prototype.trackEvent=function(e){this.track(e,s.TelemetryType.Event)},e.prototype.trackRequest=function(e){this.track(e,s.TelemetryType.Request)},e.prototype.trackDependency=function(e){e&&!e.target&&e.data&&(e.target=r.parse(e.data).host),this.track(e,s.TelemetryType.Dependency)},e.prototype.flush=function(e){this.channel.triggerSend(!!e&&!!e.isAppCrashing,e?e.callback:void 0)},e.prototype.track=function(e,t){if(e&&s.telemetryTypeToBaseType(t)){var n=d.createEnvelope(e,t,this.commonProperties,this.context,this.config);e.time&&(n.time=e.time.toISOString());var r=this.runTelemetryProcessors(n,e.contextObjects);r=r&&c.samplingTelemetryProcessor(n,{correlationContext:u.CorrelationContextManager.getCurrentContext()}),c.performanceMetricsTelemetryProcessor(n,this.quickPulseClient),r&&this.channel.send(n)}else f.warn("track() requires telemetry object and telemetryType to be specified.")},e.prototype.addTelemetryProcessor=function(e){this._telemetryProcessors.push(e)},e.prototype.clearTelemetryProcessors=function(){this._telemetryProcessors=[]},e.prototype.runTelemetryProcessors=function(e,t){var n=!0,r=this._telemetryProcessors.length;if(0===r)return n;(t=t||{}).correlationContext=u.CorrelationContextManager.getCurrentContext();for(var i=0;i<r;++i)try{var o=this._telemetryProcessors[i];if(o&&!1===o.apply(null,[e,t])){n=!1;break}}catch(t){n=!0,f.warn("One of telemetry processors failed, telemetry item will be sent.",t,e)}return n},e}();e.exports=h},8090:(e,t,n)=>{"use strict";var r=n(5740),i=n(9962),o=function(){function e(t,n){if(this.traceFlag=e.DEFAULT_TRACE_FLAG,this.version=e.DEFAULT_VERSION,t&&"string"==typeof t)if(t.split(",").length>1)this.traceId=r.w3cTraceId(),this.spanId=r.w3cTraceId().substr(0,16);else{var o=t.trim().split("-"),s=o.length;s>=4?(this.version=o[0],this.traceId=o[1],this.spanId=o[2],this.traceFlag=o[3]):(this.traceId=r.w3cTraceId(),this.spanId=r.w3cTraceId().substr(0,16)),this.version.match(/^[0-9a-f]{2}$/g)||(this.version=e.DEFAULT_VERSION,this.traceId=r.w3cTraceId()),"00"===this.version&&4!==s&&(this.traceId=r.w3cTraceId(),this.spanId=r.w3cTraceId().substr(0,16)),"ff"===this.version&&(this.version=e.DEFAULT_VERSION,this.traceId=r.w3cTraceId(),this.spanId=r.w3cTraceId().substr(0,16)),this.version.match(/^0[0-9a-f]$/g)||(this.version=e.DEFAULT_VERSION),this.traceFlag.match(/^[0-9a-f]{2}$/g)||(this.traceFlag=e.DEFAULT_TRACE_FLAG,this.traceId=r.w3cTraceId()),e.isValidTraceId(this.traceId)||(this.traceId=r.w3cTraceId()),e.isValidSpanId(this.spanId)||(this.spanId=r.w3cTraceId().substr(0,16),this.traceId=r.w3cTraceId()),this.parentId=this.getBackCompatRequestId()}else if(n){this.parentId=n.slice();var a=i.getRootId(n);e.isValidTraceId(a)||(this.legacyRootId=a,a=r.w3cTraceId()),-1!==n.indexOf("|")&&(n=n.substring(1+n.substring(0,n.length-1).lastIndexOf("."),n.length-1)),this.traceId=a,this.spanId=n}else this.traceId=r.w3cTraceId(),this.spanId=r.w3cTraceId().substr(0,16)}return e.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},e.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},e.prototype.getBackCompatRequestId=function(){return"|"+this.traceId+"."+this.spanId+"."},e.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},e.prototype.updateSpanId=function(){this.spanId=r.w3cTraceId().substr(0,16)},e.DEFAULT_TRACE_FLAG="01",e.DEFAULT_VERSION="00",e}();e.exports=o},6333:e=>{"use strict";var t=function(){function e(e){this.fieldmap=[],e&&(this.fieldmap=this.parseHeader(e))}return e.prototype.toString=function(){var e=this.fieldmap;return e&&0!=e.length?e.join(", "):null},e.validateKeyChars=function(e){var t=e.split("@");if(2==t.length){var n=t[0].trim(),r=t[1].trim(),i=Boolean(n.match(/^[\ ]?[a-z0-9\*\-\_/]{1,241}$/)),o=Boolean(r.match(/^[\ ]?[a-z0-9\*\-\_/]{1,14}$/));return i&&o}return 1==t.length&&Boolean(e.match(/^[\ ]?[a-z0-9\*\-\_/]{1,256}$/))},e.prototype.parseHeader=function(t){var n=[],r={},i=t.split(",");if(i.length>32)return null;for(var o=0,s=i;o<s.length;o++){var a=s[o].trim();if(0!==a.length){var c=a.split("=");if(2!==c.length)return null;if(!e.validateKeyChars(c[0]))return null;if(r[c[0]])return null;r[c[0]]=!0,n.push(a)}}return n},e.strict=!0,e}();e.exports=t},5740:function(e,t,n){"use strict";var r=this&&this.__assign||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},i=n(8605),o=n(7211),s=n(8835),a=n(7619),c=n(5282),u=n(9036),l=function(){function e(){}return e.getCookie=function(t,n){var r="";if(t&&t.length&&"string"==typeof n)for(var i=t+"=",o=n.split(";"),s=0;s<o.length;s++){n=o[s];if((n=e.trim(n))&&0===n.indexOf(i)){r=n.substring(i.length,o[s].length);break}}return r},e.trim=function(e){return"string"==typeof e?e.replace(/^\s+|\s+$/g,""):""},e.int32ArrayToBase64=function(e){var t=function(e,t){return String.fromCharCode(e>>t&255)},n=e.map((function(e){return t(e,24)+t(e,16)+t(e,8)+t(e,0)})).join(""),r=(Buffer.from?Buffer.from(n,"binary"):new Buffer(n,"binary")).toString("base64");return r.substr(0,r.indexOf("="))},e.random32=function(){return 4294967296*Math.random()|0},e.randomu32=function(){return e.random32()+2147483648},e.w3cTraceId=function(){for(var t,n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],r="",i=0;i<4;i++)r+=n[15&(t=e.random32())]+n[t>>4&15]+n[t>>8&15]+n[t>>12&15]+n[t>>16&15]+n[t>>20&15]+n[t>>24&15]+n[t>>28&15];var o=n[8+4*Math.random()|0];return r.substr(0,8)+r.substr(9,4)+"4"+r.substr(13,3)+o+r.substr(16,3)+r.substr(19,12)},e.isValidW3CId=function(e){return 32===e.length&&"00000000000000000000000000000000"!==e},e.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},e.isError=function(e){return e instanceof Error},e.isPrimitive=function(e){var t=typeof e;return"string"===t||"number"===t||"boolean"===t},e.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},e.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=(e/1e3%60).toFixed(7).replace(/0{0,4}$/,""),n=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,i=Math.floor(e/864e5);return t=t.indexOf(".")<2?"0"+t:t,n=n.length<2?"0"+n:n,(i>0?i+".":"")+(r=r.length<2?"0"+r:r)+":"+n+":"+t},e.extractError=function(e){var t=e;return{message:e.message,code:t.code||t.id||""}},e.extractObject=function(t){return t instanceof Error?e.extractError(t):"function"==typeof t.toJSON?t.toJSON():t},e.validateStringMap=function(t){if("object"==typeof t){var n={};for(var r in t){var i="",o=t[r],s=typeof o;if(e.isPrimitive(o))i=o.toString();else if(null===o||"undefined"===s)i="";else{if("function"===s){c.info("key: "+r+" was function; will not serialize");continue}var a=e.isArray(o)?o:e.extractObject(o);try{i=e.isPrimitive(a)?a:JSON.stringify(a)}catch(e){i=o.constructor.name.toString()+" (Error: "+e.message+")",c.info("key: "+r+", could not be serialized")}}n[r]=i.substring(0,e.MAX_PROPERTY_LENGTH)}return n}c.info("Invalid properties dropped from payload")},e.canIncludeCorrelationHeader=function(e,t){var n=e&&e.config&&e.config.correlationHeaderExcludedDomains;if(!n||0==n.length||!t)return!0;for(var r=0;r<n.length;r++){if(new RegExp(n[r].replace(/\./g,".").replace(/\*/g,".*")).test(s.parse(t).hostname))return!1}return!0},e.getCorrelationContextTarget=function(e,t){var n=e.headers&&e.headers[u.requestContextHeader];if(n)for(var r=n.split(","),i=0;i<r.length;++i){var o=r[i].split("=");if(2==o.length&&o[0]==t)return o[1]}},e.makeRequest=function(t,n,a,u){n&&0===n.indexOf("//")&&(n="https:"+n);var l=s.parse(n),p=r({},a,{host:l.hostname,port:l.port,path:l.pathname}),f=void 0;if("https:"===l.protocol&&(f=t.proxyHttpsUrl||void 0),"http:"===l.protocol&&(f=t.proxyHttpUrl||void 0),f){0===f.indexOf("//")&&(f="http:"+f);var d=s.parse(f);"https:"===d.protocol?(c.info("Proxies that use HTTPS are not supported"),f=void 0):p=r({},p,{host:d.hostname,port:d.port||"80",path:n,headers:r({},p.headers,{Host:l.hostname})})}var h="https:"===l.protocol&&!f;return h&&void 0!==t.httpsAgent?p.agent=t.httpsAgent:h||void 0===t.httpAgent?h&&(p.agent=e.tlsRestrictedAgent):p.agent=t.httpAgent,h?o.request(p,u):i.request(p,u)},e.safeIncludeCorrelationHeader=function(t,n,r){var i;if("string"==typeof r)i=r;else if(r instanceof Array)i=r.join(",");else if(r&&"function"==typeof r.toString)try{i=r.toString()}catch(e){c.warn("Outgoing request-context header could not be read. Correlation of requests may be lost.",e,r)}i?e.addCorrelationIdHeaderFromString(t,n,i):n.setHeader(u.requestContextHeader,u.requestContextSourceKey+"="+t.config.correlationId)},e.addCorrelationIdHeaderFromString=function(e,t,n){var r=n.split(","),i=u.requestContextSourceKey+"=";r.some((function(e){return e.substring(0,i.length)===i}))||t.setHeader(u.requestContextHeader,n+","+u.requestContextSourceKey+"="+e.config.correlationId)},e.MAX_PROPERTY_LENGTH=8192,e.tlsRestrictedAgent=new o.Agent({secureOptions:a.SSL_OP_NO_SSLv2|a.SSL_OP_NO_SSLv3|a.SSL_OP_NO_TLSv1|a.SSL_OP_NO_TLSv1_1}),e}();e.exports=l},4127:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4350),i=n(5290);t.performanceMetricsTelemetryProcessor=function(e,t){switch(t&&t.addDocument(e),e.data.baseType){case i.TelemetryTypeString.Exception:r.countException();break;case i.TelemetryTypeString.Request:var n=e.data.baseData;r.countRequest(n.duration,n.success);break;case i.TelemetryTypeString.Dependency:var o=e.data.baseData;r.countDependency(o.duration,o.success)}return!0}},2037:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5290);function i(e){var t=2147483647,n=5381;if(!e)return 0;for(;e.length<8;)e+=e;for(var r=0;r<e.length;r++)n=((n<<5)+n|0)+e.charCodeAt(r)|0;return(n=n<=-2147483648?t:Math.abs(n))/t*100}t.samplingTelemetryProcessor=function(e,t){var n=e.sampleRate;return null==n||n>=100||(!(!e.data||r.TelemetryType.Metric!==r.baseTypeToTelemetryType(e.data.baseType))||(t.correlationContext&&t.correlationContext.operation?i(t.correlationContext.operation.id)<n:100*Math.random()<n))},t.getSamplingHashCode=i},9428:(e,t,n)=>{"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(2037)),r(n(4127))},9574:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(894),o=n(6281),s=n(6639),a=n(4350),c=n(8723),u=n(731),l=n(9962),p=n(5282),f=n(3668),d=n(1629);t.TelemetryClient=n(1259),t.Contracts=n(5290),function(e){e[e.AI=0]="AI",e[e.AI_AND_W3C=1]="AI_AND_W3C"}(r=t.DistributedTracingModes||(t.DistributedTracingModes={}));var h,m,g,v,y,_,E,b,w,S=!0,I=!1,C=!0,x=!0,O=!0,T=!0,A=!0,N=!0,P=!1,L=!0,R=void 0,k=void 0,D=!1;function M(){return t.defaultClient?(D=!0,g.enable(S,I),v.enable(C),y.enable(x),_.enable(L,m),E.useAutoCorrelation(N,h),E.enable(O),b.enable(T),t.liveMetricsClient&&P&&t.liveMetricsClient.enable(P)):p.warn("Start cannot be called before setup"),V}t.setup=function(e){return t.defaultClient?p.info("The default client is already setup"):(t.defaultClient=new t.TelemetryClient(e),g=new o(t.defaultClient),v=new s(t.defaultClient),y=new a(t.defaultClient),E=new u(t.defaultClient),b=new c(t.defaultClient),_||(_=new d.AutoCollectNativePerformance(t.defaultClient))),t.defaultClient&&t.defaultClient.channel&&t.defaultClient.channel.setUseDiskRetryCaching(A,R,k),V},t.start=M,t.getCorrelationContext=function(){return N?i.CorrelationContextManager.getCurrentContext():null},t.wrapWithCorrelationContext=function(e){return i.CorrelationContextManager.wrapCallback(e)};var V=function(){function e(){}return e.setDistributedTracingMode=function(t){return l.w3cEnabled=t===r.AI_AND_W3C,e},e.setAutoCollectConsole=function(t,n){return void 0===n&&(n=!1),S=t,I=n,D&&g.enable(t,n),e},e.setAutoCollectExceptions=function(t){return C=t,D&&v.enable(t),e},e.setAutoCollectPerformance=function(t,n){void 0===n&&(n=!0),x=t;var r=d.AutoCollectNativePerformance.parseEnabled(n);return L=r.isEnabled,m=r.disabledMetrics,D&&(y.enable(t),_.enable(r.isEnabled,r.disabledMetrics)),e},e.setAutoCollectRequests=function(t){return O=t,D&&E.enable(t),e},e.setAutoCollectDependencies=function(t){return T=t,D&&b.enable(t),e},e.setAutoDependencyCorrelation=function(t,n){return N=t,h=n,D&&E.useAutoCorrelation(t,n),e},e.setUseDiskRetryCaching=function(n,r,i){return A=n,R=r,k=i,t.defaultClient&&t.defaultClient.channel&&t.defaultClient.channel.setUseDiskRetryCaching(n,r,i),e},e.setInternalLogging=function(t,n){return void 0===t&&(t=!1),void 0===n&&(n=!0),p.enableDebug=t,p.disableWarnings=!n,e},e.setSendLiveMetrics=function(n){return void 0===n&&(n=!1),t.defaultClient?(!t.liveMetricsClient&&n?(t.liveMetricsClient=new f(t.defaultClient.config.instrumentationKey),w=new a(t.liveMetricsClient,1e3,!0),t.liveMetricsClient.addCollector(w),t.defaultClient.quickPulseClient=t.liveMetricsClient):t.liveMetricsClient&&t.liveMetricsClient.enable(n),P=n,e):(p.warn("Live metrics client cannot be setup without the default client"),e)},e.start=M,e}();t.Configuration=V,t.dispose=function(){t.defaultClient=null,D=!1,g&&g.dispose(),v&&v.dispose(),y&&y.dispose(),_&&_.dispose(),E&&E.dispose(),b&&b.dispose(),t.liveMetricsClient&&(t.liveMetricsClient.enable(!1),P=!1,t.liveMetricsClient=void 0)}},9822:(e,t,n)=>{"use strict";const r=process.binding("async_wrap"),i=r.Providers.TIMERWRAP,o={nextTick:n(3269),promise:n(9565),timers:n(7190)},s=new Set;function a(){this.enabled=!1,this.counter=0}function c(){const e=this.initFns=[],t=this.preFns=[],n=this.postFns=[],r=this.destroyFns=[];this.init=function(t,n,r,o){if(n!==i)for(const i of e)i(t,this,n,r,o);else s.add(t)},this.pre=function(e){if(!s.has(e))for(const n of t)n(e,this)},this.post=function(e,t){if(!s.has(e))for(const r of n)r(e,this,t)},this.destroy=function(e){if(s.has(e))s.delete(e);else for(const t of r)t(e)}}function u(e,t){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}function l(){this._state=new a,this._hooks=new c,this.version=n(1910).i8,this.providers=r.Providers;for(const e of Object.keys(o))o[e].call(this);process.env.hasOwnProperty("NODE_ASYNC_HOOK_WARNING")&&console.warn("warning: you are using async-hook-jl which is unstable."),r.setupHooks({init:this._hooks.init,pre:this._hooks.pre,post:this._hooks.post,destroy:this._hooks.destroy})}c.prototype.add=function(e){e.init&&this.initFns.push(e.init),e.pre&&this.preFns.push(e.pre),e.post&&this.postFns.push(e.post),e.destroy&&this.destroyFns.push(e.destroy)},c.prototype.remove=function(e){e.init&&u(this.initFns,e.init),e.pre&&u(this.preFns,e.pre),e.post&&u(this.postFns,e.post),e.destroy&&u(this.destroyFns,e.destroy)},e.exports=l,l.prototype.addHooks=function(e){this._hooks.add(e)},l.prototype.removeHooks=function(e){this._hooks.remove(e)},l.prototype.enable=function(){this._state.enabled=!0,r.enable()},l.prototype.disable=function(){this._state.enabled=!1,r.disable()}},3223:(e,t,n)=>{"use strict";const r=n(9822);if(global._asyncHook){if(global._asyncHook.version!==n(1910).i8)throw new Error("Conflicting version of async-hook-jl found");e.exports=global._asyncHook}else{n(2512).filter.attach((function(e,t){return t.filter((function(e){const t=e.getFileName();return!(t&&t.slice(0,__dirname.length)===__dirname)}))})),e.exports=global._asyncHook=new r}},1910:e=>{"use strict";e.exports={i8:"1.7.6"}},3269:e=>{"use strict";function t(){}e.exports=function(){const e=this._hooks,n=this._state,r=process.nextTick;process.nextTick=function(){if(!n.enabled)return r.apply(process,arguments);const i=new Array(arguments.length);for(let e=0;e<arguments.length;e++)i[e]=arguments[e];const o=i[0];if("function"!=typeof o)throw new TypeError("callback is not a function");const s=new t,a=--n.counter;return e.init.call(s,a,0,null,null),i[0]=function(){e.pre.call(s,a);let t=!0;try{o.apply(this,arguments),t=!1}finally{t&&process.listenerCount("uncaughtException")>0&&process.once("uncaughtException",(function(){e.post.call(s,a,!0),e.destroy.call(null,a)}))}e.post.call(s,a,!1),e.destroy.call(null,a)},r.apply(process,i)}}},9565:e=>{"use strict";function t(){}e.exports=function(){const e=this._hooks,n=this._state,r=global.Promise,i=r.prototype.then;function o(t,n,r,i){return"function"!=typeof t?i?function(t){return function(n){return e.destroy.call(null,t),n}}(r):function(t){return function(n){throw e.destroy.call(null,t),n}}(r):function(){e.pre.call(n,r);try{return t.apply(this,arguments)}finally{e.post.call(n,r,!1),e.destroy.call(null,r)}}}r.prototype.then=function(r,s){if(!n.enabled)return i.call(this,r,s);const a=new t,c=--n.counter;return e.init.call(a,c,0,null,null),i.call(this,o(r,a,c,!0),o(s,a,c,!1))}}},7190:(e,t,n)=>{"use strict";const r=n(8213);function i(){}function o(){}function s(){}const a=new Map,c=new Map,u=new Map;let l=null,p=!1;function f(e,t,n,i,o,s,a){const c=r[n],u=r[i];r[n]=function(){if(!t.enabled)return c.apply(r,arguments);const n=new Array(arguments.length);for(let e=0;e<arguments.length;e++)n[e]=arguments[e];const i=n[0];if("function"!=typeof i)throw new TypeError('"callback" argument must be a function');const u=new o,f=--t.counter;let d;return e.init.call(u,f,0,null,null),n[0]=function(){l=d,e.pre.call(u,f);let t=!0;try{i.apply(this,arguments),t=!1}finally{t&&process.listenerCount("uncaughtException")>0&&process.once("uncaughtException",(function(){e.post.call(u,f,!0),s.delete(d),e.destroy.call(null,f)}))}e.post.call(u,f,!1),l=null,(a||p)&&(p=!1,s.delete(d),e.destroy.call(null,f))},d=c.apply(r,n),s.set(d,f),d},r[i]=function(t){if(l===t&&null!==t)p=!0;else if(s.has(t)){const n=s.get(t);s.delete(t),e.destroy.call(null,n)}u.apply(r,arguments)}}e.exports=function(){f(this._hooks,this._state,"setTimeout","clearTimeout",i,a,!0),f(this._hooks,this._state,"setInterval","clearInterval",o,c,!1),f(this._hooks,this._state,"setImmediate","clearImmediate",s,u,!0),global.setTimeout=r.setTimeout,global.setInterval=r.setInterval,global.setImmediate=r.setImmediate,global.clearTimeout=r.clearTimeout,global.clearInterval=r.clearInterval,global.clearImmediate=r.clearImmediate}},8286:e=>{"use strict";e.exports=(e,t)=>class extends e{constructor(e){var n,r;super((function(e,o){n=this,r=[function(n){return t(i,!1),e(n)},function(e){return t(i,!1),o(e)}]}));var i=this;try{e.apply(n,r)}catch(e){r[1](e)}return i}}},9090:(e,t,n)=>{var r,i,o=n(6372).wrap,s=[],a=0,c=!1,u=[];function l(e,t){var n=e.length,r=t.length,i=[];if(0===n&&0===r)return i;for(var o=0;o<n;o++)i[o]=e[o];if(0===r)return i;for(var s=0;s<r;s++){var a=!0;for(o=0;o<n;o++)if(e[o].uid===t[s].uid){a=!1;break}a&&i.push(t[s])}return i}if(process._fatalException){var p,f=!1;r=function(e){var t=s.length;if(f||0===t)return!1;var n=!1;f=!0;for(var r=0;r<t;++r){var i=s[r];if(0!=(8&i.flags)){var o=p&&p[i.uid];n=i.error(o,e)||n}}return f=!1,u.length>0&&(s=u.pop()),p=void 0,n&&!c},i=function(e,t,n){var r=[];c=!0;for(var i=0;i<n;++i){var o=t[i];if(r[o.uid]=o.data,0!=(1&o.flags)){var a=o.create(o.data);void 0!==a&&(r[o.uid]=a)}}return c=!1,function(){p=r,u.push(s),s=l(t,s),c=!0;for(var i=0;i<n;++i)(2&t[i].flags)>0&&t[i].before(this,r[t[i].uid]);c=!1;var o=e.apply(this,arguments);for(c=!0,i=0;i<n;++i)(4&t[i].flags)>0&&t[i].after(this,r[t[i].uid]);return c=!1,s=u.pop(),p=void 0,o}},o(process,"_fatalException",(function(e){return function(t){return r(t)||e(t)}}))}else{var d=!1;r=function(e){if(d)throw e;for(var t=!1,n=s.length,r=0;r<n;++r){var i=s[r];0!=(8&i.flags)&&(t=i.error(null,e)||t)}if(!t&&c)throw e},i=function(e,t,n){var i=[];c=!0;for(var o=0;o<n;++o){var a=t[o];if(i[a.uid]=a.data,0!=(1&a.flags)){var p=a.create(a.data);void 0!==p&&(i[a.uid]=p)}}return c=!1,function(){var o,a=!1,p=!1;u.push(s),s=l(t,s),c=!0;for(var f=0;f<n;++f)(2&t[f].flags)>0&&t[f].before(this,i[t[f].uid]);c=!1;try{o=e.apply(this,arguments)}catch(e){a=!0;for(f=0;f<n;++f)if(0!=(8&s[f].flags))try{p=s[f].error(i[t[f].uid],e)||p}catch(e){throw d=!0,e}if(!p)throw process.removeListener("uncaughtException",r),process._originalNextTick((function(){process.addListener("uncaughtException",r)})),e}finally{if(!a||p){for(c=!0,f=0;f<n;++f)(4&t[f].flags)>0&&t[f].after(this,i[t[f].uid]);c=!1}s=u.pop()}return o}},process.addListener("uncaughtException",r)}function h(e,t){"function"==typeof e.create&&(this.create=e.create,this.flags|=1),"function"==typeof e.before&&(this.before=e.before,this.flags|=2),"function"==typeof e.after&&(this.after=e.after,this.flags|=4),"function"==typeof e.error&&(this.error=e.error,this.flags|=8),this.uid=++a,this.data=void 0===t?null:t}function m(e,t){if("object"!=typeof e||!e)throw new TypeError("callbacks argument must be an object");return e instanceof h?e:new h(e,t)}h.prototype.create=void 0,h.prototype.before=void 0,h.prototype.after=void 0,h.prototype.error=void 0,h.prototype.data=void 0,h.prototype.uid=0,h.prototype.flags=0,process.createAsyncListener=m,process.addAsyncListener=function(e,t){var n;n=e instanceof h?e:m(e,t);for(var r=!1,i=0;i<s.length;i++)if(n===s[i]){r=!0;break}return r||s.push(n),n},process.removeAsyncListener=function(e){for(var t=0;t<s.length;t++)if(e===s[t]){s.splice(t,1);break}},e.exports=function(e){var t=s.length;if(0===t)return e;for(var n=s.slice(),r=0;r<t;++r)if(n[r].flags>0)return i(e,n,t);return function(e,t,n){c=!0;for(var r=0;r<n;++r){var i=t[r];i.create&&i.create(i.data)}return c=!1,function(){u.push(s),s=l(t,s);var n=e.apply(this,arguments);return s=u.pop(),n}}(e,n,t)}},7645:(e,t,n)=>{"use strict";if(process.addAsyncListener)throw new Error("Don't require polyfill unless needed");var r=n(6372),i=n(1249),o=r.wrap,s=r.massWrap,a=n(9090),c=n(1669),u=i.gte(process.version,"6.0.0"),l=i.gte(process.version,"7.0.0"),p=i.gte(process.version,"8.0.0"),f=i.gte(process.version,"11.0.0"),d=n(1631);function h(e){return function(){this.on("connection",(function(e){e._handle&&(e._handle.onread=a(e._handle.onread))}));try{return e.apply(this,arguments)}finally{this._handle&&this._handle.onconnection&&(this._handle.onconnection=a(this._handle.onconnection))}}}function m(e){if(e&&e._handle){var t=e._handle;t._originalOnread||(t._originalOnread=t.onread),t.onread=a(t._originalOnread)}}l&&!d._normalizeArgs?d._normalizeArgs=function(e){if(0===e.length)return[{},null];var t,n,r=e[0],i={};"object"==typeof r&&null!==r?i=r:"string"==typeof(t=r)&&!1===(n=t,(n=Number(n))>=0&&n)?i.path=r:(i.port=r,e.length>1&&"string"==typeof e[1]&&(i.host=e[1]));var o=e[e.length-1];return"function"!=typeof o?[i,null]:[i,o]}:l||d._normalizeConnectArgs||(d._normalizeConnectArgs=function(e){var t,n={};"object"==typeof e[0]&&null!==e[0]?n=e[0]:"string"==typeof e[0]&&!1===(t=e[0],(t=Number(t))>=0&&t)?n.path=e[0]:(n.port=e[0],"string"==typeof e[1]&&(n.host=e[1]));var r=e[e.length-1];return"function"==typeof r?[n,r]:[n]}),"_setUpListenHandle"in d.Server.prototype?o(d.Server.prototype,"_setUpListenHandle",h):o(d.Server.prototype,"_listen2",h),o(d.Socket.prototype,"connect",(function(e){return function(){var t;(t=p&&Array.isArray(arguments[0])&&Object.getOwnPropertySymbols(arguments[0]).length>0?arguments[0]:l?d._normalizeArgs(arguments):d._normalizeConnectArgs(arguments))[1]&&(t[1]=a(t[1]));var n=e.apply(this,t);return m(this),n}}));var g=n(8605);o(g.Agent.prototype,"addRequest",(function(e){return function(t){var n=t.onSocket;return t.onSocket=a((function(e){return m(e),n.apply(this,arguments)})),e.apply(this,arguments)}}));var v=n(3129);function y(e){Array.isArray(e.stdio)&&e.stdio.forEach((function(e){e&&e._handle&&(e._handle.onread=a(e._handle.onread),o(e._handle,"close",L))})),e._handle&&(e._handle.onexit=a(e._handle.onexit))}v.ChildProcess?o(v.ChildProcess.prototype,"spawn",(function(e){return function(){var t=e.apply(this,arguments);return y(this),t}})):s(v,["execFile","fork","spawn"],(function(e){return function(){var t=e.apply(this,arguments);return y(t),t}})),process._fatalException||(process._originalNextTick=process.nextTick);var _=[];process._nextDomainTick&&_.push("_nextDomainTick"),process._tickDomainCallback&&_.push("_tickDomainCallback"),s(process,_,P),o(process,"nextTick",L);var E=["setTimeout","setInterval"];global.setImmediate&&E.push("setImmediate");var b=n(8213),w=global.setTimeout===b.setTimeout;s(b,E,L),w&&s(global,E,L);var S=n(881);s(S,["lookup","resolve","resolve4","resolve6","resolveCname","resolveMx","resolveNs","resolveTxt","resolveSrv","reverse"],P),S.resolveNaptr&&o(S,"resolveNaptr",P);var I,C,x=n(5747);s(x,["watch","rename","truncate","chown","fchown","chmod","fchmod","stat","lstat","fstat","link","symlink","readlink","realpath","unlink","rmdir","mkdir","readdir","close","open","utimes","futimes","fsync","write","read","readFile","writeFile","appendFile","watchFile","unwatchFile","exists"],P),x.lchown&&o(x,"lchown",P),x.lchmod&&o(x,"lchmod",P),x.ftruncate&&o(x,"ftruncate",P);try{I=n(8761)}catch(e){}if(I&&I.Deflate&&I.Deflate.prototype){var O=Object.getPrototypeOf(I.Deflate.prototype);O._transform?o(O,"_transform",P):O.write&&O.flush&&O.end&&s(O,["write","flush","end"],P)}try{C=n(6417)}catch(e){}if(C){var T=["pbkdf2","randomBytes"];f||T.push("pseudoRandomBytes"),s(C,T,P)}var A=!!global.Promise&&"function Promise() { [native code] }"===Promise.toString()&&"function toString() { [native code] }"===Promise.toString.toString();if(A){var N=process.addAsyncListener({create:function(){A=!1}});global.Promise.resolve(!0).then((function(){A=!1})),process.removeAsyncListener(N)}function P(e){var t=function(){var t,n=arguments.length-1;if("function"==typeof arguments[n]){t=Array(arguments.length);for(var r=0;r<arguments.length-1;r++)t[r]=arguments[r];t[n]=a(arguments[n])}return e.apply(this,t||arguments)};switch(e.length){case 1:return function(n){return 1!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=a(n)),e.call(this,n))};case 2:return function(n,r){return 2!==arguments.length?t.apply(this,arguments):("function"==typeof r&&(r=a(r)),e.call(this,n,r))};case 3:return function(n,r,i){return 3!==arguments.length?t.apply(this,arguments):("function"==typeof i&&(i=a(i)),e.call(this,n,r,i))};case 4:return function(n,r,i,o){return 4!==arguments.length?t.apply(this,arguments):("function"==typeof o&&(o=a(o)),e.call(this,n,r,i,o))};case 5:return function(n,r,i,o,s){return 5!==arguments.length?t.apply(this,arguments):("function"==typeof s&&(s=a(s)),e.call(this,n,r,i,o,s))};case 6:return function(n,r,i,o,s,c){return 6!==arguments.length?t.apply(this,arguments):("function"==typeof c&&(c=a(c)),e.call(this,n,r,i,o,s,c))};default:return t}}function L(e){var t=function(){var t;if("function"==typeof arguments[0]){(t=Array(arguments.length))[0]=a(arguments[0]);for(var n=1;n<arguments.length;n++)t[n]=arguments[n]}return e.apply(this,t||arguments)};switch(e.length){case 1:return function(n){return 1!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=a(n)),e.call(this,n))};case 2:return function(n,r){return 2!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=a(n)),e.call(this,n,r))};case 3:return function(n,r,i){return 3!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=a(n)),e.call(this,n,r,i))};case 4:return function(n,r,i,o){return 4!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=a(n)),e.call(this,n,r,i,o))};case 5:return function(n,r,i,o,s){return 5!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=a(n)),e.call(this,n,r,i,o,s))};case 6:return function(n,r,i,o,s,c){return 6!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=a(n)),e.call(this,n,r,i,o,s,c))};default:return t}}A&&function(){var e=global.Promise;function t(n){if(!(this instanceof t))return e(n);if("function"!=typeof n)return new e(n);var i,o,s=new e(a);s.__proto__=t.prototype;try{n.apply(i,o)}catch(e){o[1](e)}return s;function a(e,t){function n(t){return r(s,!1),e(t)}function a(e){return r(s,!1),t(e)}i=this,o=[n,a]}}c.inherits(t,e),o(e.prototype,"then",s),e.prototype.chain&&o(e.prototype,"chain",s);if(u)global.Promise=n(8286)(e,r);else{["all","race","reject","resolve","accept","defer"].forEach((function(n){"function"==typeof e[n]&&(t[n]=e[n])})),global.Promise=t}function r(e,t){e.__asl_wrapper&&!t||(e.__asl_wrapper=a(i))}function i(t,n,o,s){var a;try{return{returnVal:a=n.call(t,o),error:!1}}catch(e){return{errorVal:e,error:!0}}finally{a instanceof e?s.__asl_wrapper=function(){return(a.__asl_wrapper||i).apply(this,arguments)}:r(s,!0)}}function s(e){return function(){var t=this,n=e.apply(t,Array.prototype.map.call(arguments,r));return n.__asl_wrapper=function(e,r,o,s){return t.__asl_wrapper?(t.__asl_wrapper(e,(function(){}),null,n),n.__asl_wrapper(e,r,o,s)):i(e,r,o,s)},n;function r(e){return"function"!=typeof e?e:a((function(r){var o=(t.__asl_wrapper||i)(this,e,r,n);if(o.error)throw o.errorVal;return o.returnVal}))}}}}()},4017:(e,t)=>{"use strict";class n{constructor(e){this.tasks=[],this.count=e}sched(){if(this.count>0&&this.tasks.length>0){this.count--;let e=this.tasks.shift();if(void 0===e)throw"Unexpected undefined value in tasks list";e()}}acquire(){return new Promise(((e,t)=>{this.tasks.push((()=>{var t=!1;e((()=>{t||(t=!0,this.count++,this.sched())}))})),process&&process.nextTick?process.nextTick(this.sched.bind(this)):setImmediate(this.sched.bind(this))}))}use(e){return this.acquire().then((t=>e().then((e=>(t(),e))).catch((e=>{throw t(),e}))))}}t.Semaphore=n;t.Mutex=class extends n{constructor(){super(1)}}},9669:(e,t,n)=>{e.exports=n(1609)},7970:(e,t,n)=>{"use strict";var r=n(4867),i=n(6026),o=n(4097),s=n(5327),a=n(8605),c=n(7211),u=n(2629).http,l=n(2629).https,p=n(8835),f=n(8761),d=n(1075),h=n(5061),m=n(481),g=/https:?/;function v(e,t,n){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=n,t.auth){var r=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+r}e.beforeRedirect=function(e){e.headers.host=e.host,v(e,t,e.href)}}e.exports=function(e){return new Promise((function(t,n){var y=function(e){t(e)},_=function(e){n(e)},E=e.data,b=e.headers;if("User-Agent"in b||"user-agent"in b?b["User-Agent"]||b["user-agent"]||(delete b["User-Agent"],delete b["user-agent"]):b["User-Agent"]="axios/"+d.version,E&&!r.isStream(E)){if(Buffer.isBuffer(E));else if(r.isArrayBuffer(E))E=Buffer.from(new Uint8Array(E));else{if(!r.isString(E))return _(h("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));E=Buffer.from(E,"utf-8")}b["Content-Length"]=E.length}var w=void 0;e.auth&&(w=(e.auth.username||"")+":"+(e.auth.password||""));var S=o(e.baseURL,e.url),I=p.parse(S),C=I.protocol||"http:";if(!w&&I.auth){var x=I.auth.split(":");w=(x[0]||"")+":"+(x[1]||"")}w&&delete b.Authorization;var O=g.test(C),T=O?e.httpsAgent:e.httpAgent,A={path:s(I.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:b,agent:T,agents:{http:e.httpAgent,https:e.httpsAgent},auth:w};e.socketPath?A.socketPath=e.socketPath:(A.hostname=I.hostname,A.port=I.port);var N,P=e.proxy;if(!P&&!1!==P){var L=C.slice(0,-1)+"_proxy",R=process.env[L]||process.env[L.toUpperCase()];if(R){var k=p.parse(R),D=process.env.no_proxy||process.env.NO_PROXY,M=!0;if(D)M=!D.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||("."===e[0]&&I.hostname.substr(I.hostname.length-e.length)===e||I.hostname===e))}));if(M&&(P={host:k.hostname,port:k.port,protocol:k.protocol},k.auth)){var V=k.auth.split(":");P.auth={username:V[0],password:V[1]}}}}P&&(A.headers.host=I.hostname+(I.port?":"+I.port:""),v(A,P,C+"//"+I.hostname+(I.port?":"+I.port:"")+A.path));var F=O&&(!P||g.test(P.protocol));e.transport?N=e.transport:0===e.maxRedirects?N=F?c:a:(e.maxRedirects&&(A.maxRedirects=e.maxRedirects),N=F?l:u),e.maxBodyLength>-1&&(A.maxBodyLength=e.maxBodyLength);var j=N.request(A,(function(t){if(!j.aborted){var n=t,o=t.req||j;if(204!==t.statusCode&&"HEAD"!==o.method&&!1!==e.decompress)switch(t.headers["content-encoding"]){case"gzip":case"compress":case"deflate":n=n.pipe(f.createUnzip()),delete t.headers["content-encoding"]}var s={status:t.statusCode,statusText:t.statusMessage,headers:t.headers,config:e,request:o};if("stream"===e.responseType)s.data=n,i(y,_,s);else{var a=[],c=0;n.on("data",(function(t){a.push(t),c+=t.length,e.maxContentLength>-1&&c>e.maxContentLength&&(n.destroy(),_(h("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,o)))})),n.on("error",(function(t){j.aborted||_(m(t,e,null,o))})),n.on("end",(function(){var t=Buffer.concat(a);"arraybuffer"!==e.responseType&&(t=t.toString(e.responseEncoding),e.responseEncoding&&"utf8"!==e.responseEncoding||(t=r.stripBOM(t))),s.data=t,i(y,_,s)}))}}}));if(j.on("error",(function(t){j.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==t.code||_(m(t,e,null,j))})),e.timeout){var B=parseInt(e.timeout,10);if(isNaN(B))return void _(h("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",j));j.setTimeout(B,(function(){j.abort(),_(h("timeout of "+B+"ms exceeded",e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",j))}))}e.cancelToken&&e.cancelToken.promise.then((function(e){j.aborted||(j.abort(),_(e))})),r.isStream(E)?E.on("error",(function(t){_(m(t,e,null,j))})).pipe(j):j.end(E)}))}},5448:(e,t,n)=>{"use strict";var r=n(4867),i=n(6026),o=n(3691),s=n(5327),a=n(4097),c=n(4109),u=n(7985),l=n(5061);e.exports=function(e){return new Promise((function(t,n){var p=e.data,f=e.headers,d=e.responseType;r.isFormData(p)&&delete f["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";f.Authorization="Basic "+btoa(m+":"+g)}var v=a(e.baseURL,e.url);function y(){if(h){var r="getAllResponseHeaders"in h?c(h.getAllResponseHeaders()):null,o={data:d&&"text"!==d&&"json"!==d?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h};i(t,n,o),h=null}}if(h.open(e.method.toUpperCase(),s(v,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=y:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(y)},h.onabort=function(){h&&(n(l("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){n(l("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var _=(e.withCredentials||u(v))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;_&&(f[e.xsrfHeaderName]=_)}"setRequestHeader"in h&&r.forEach(f,(function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete f[t]:h.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),d&&"json"!==d&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),n(e),h=null)})),p||(p=null),h.send(p)}))}},1609:(e,t,n)=>{"use strict";var r=n(4867),i=n(1849),o=n(321),s=n(7185);function a(e){var t=new o(e),n=i(o.prototype.request,t);return r.extend(n,o.prototype,t),r.extend(n,t),n}var c=a(n(5655));c.Axios=o,c.create=function(e){return a(s(c.defaults,e))},c.Cancel=n(5263),c.CancelToken=n(4972),c.isCancel=n(6502),c.all=function(e){return Promise.all(e)},c.spread=n(8713),c.isAxiosError=n(6268),e.exports=c,e.exports.default=c},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,n)=>{"use strict";var r=n(5263);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},6502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(4867),i=n(5327),o=n(782),s=n(3572),a=n(7185),c=n(4875),u=c.validators;function l(e){this.defaults=e,this.interceptors={request:new o,response:new o}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean,"1.0.0"),forcedJSONParsing:u.transitional(u.boolean,"1.0.0"),clarifyTimeoutError:u.transitional(u.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!r){var l=[s,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(o),i=Promise.resolve(e);l.length;)i=i.then(l.shift(),l.shift());return i}for(var p=e;n.length;){var f=n.shift(),d=n.shift();try{p=f(p)}catch(e){d(e);break}}try{i=s(p)}catch(e){return Promise.reject(e)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},l.prototype.getUri=function(e){return e=a(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(a(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(a(r||{},{method:e,url:t,data:n}))}})),e.exports=l},782:(e,t,n)=>{"use strict";var r=n(4867);function i(){this.handlers=[]}i.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},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},4097:(e,t,n)=>{"use strict";var r=n(1793),i=n(9002);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},5061:(e,t,n)=>{"use strict";var r=n(481);e.exports=function(e,t,n,i,o){var s=new Error(e);return r(s,t,n,i,o)}},3572:(e,t,n)=>{"use strict";var r=n(4867),i=n(8527),o=n(6502),s=n(5655);function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return a(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(a(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=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}},e}},7185:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function c(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function u(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=c(void 0,e[i])):n[i]=c(e[i],t[i])}r.forEach(i,(function(e){r.isUndefined(t[e])||(n[e]=c(void 0,t[e]))})),r.forEach(o,u),r.forEach(s,(function(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=c(void 0,e[i])):n[i]=c(void 0,t[i])})),r.forEach(a,(function(r){r in t?n[r]=c(e[r],t[r]):r in e&&(n[r]=c(void 0,e[r]))}));var l=i.concat(o).concat(s).concat(a),p=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===l.indexOf(e)}));return r.forEach(p,u),n}},6026:(e,t,n)=>{"use strict";var r=n(5061);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},8527:(e,t,n)=>{"use strict";var r=n(4867),i=n(5655);e.exports=function(e,t,n){var o=this||i;return r.forEach(n,(function(n){e=n.call(o,e,t)})),e}},5655:(e,t,n)=>{"use strict";var r=n(4867),i=n(6016),o=n(481),s={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?c=n(5448):"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(c=n(7970)),c),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(a(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,s=!n&&"json"===this.responseType;if(s||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw o(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(s)})),e.exports=u},1849:e=>{"use strict";e.exports=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)}}},5327:(e,t,n)=>{"use strict";var r=n(4867);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var s=[];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)),s.push(i(t)+"="+i(e))})))})),o=s.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},9002:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},3691:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,s){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.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(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},6268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},7985:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(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=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},4109:(e,t,n)=>{"use strict";var r=n(4867),i=["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"];e.exports=function(e){var t,n,o,s={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(s[t]&&i.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4875:(e,t,n)=>{"use strict";var r=n(1075),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var o={},s=r.version.split(".");function a(e,t){for(var n=t?t.split("."):s,r=e.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]<r[i])return!1}return!1}i.transitional=function(e,t,n){var i=t&&a(t);function s(e,t){return"[Axios v"+r.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,a){if(!1===e)throw new Error(s(r," has been removed in "+t));return i&&!o[r]&&(o[r]=!0,console.warn(s(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},e.exports={isOlderVersion:a,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],s=t[o];if(s){var a=e[o],c=void 0===a||s(a,o,e);if(!0!==c)throw new TypeError("option "+o+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:i}},4867:(e,t,n)=>{"use strict";var r=n(1849),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(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)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(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:a,isPlainObject:c,isUndefined:s,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:u,isStream:function(e){return a(e)&&u(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:l,merge:function e(){var t={};function n(n,r){c(t[r])&&c(n)?t[r]=e(t[r],n):c(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return t},extend:function(e,t,n){return l(t,(function(t,i){e[i]=n&&"function"==typeof t?r(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}}},7109:(e,t,n)=>{var r;e.exports=function(){if(!r){try{r=n(5158)("follow-redirects")}catch(e){}"function"!=typeof r&&(r=function(){})}r.apply(null,arguments)}},2629:(e,t,n)=>{var r=n(8835),i=r.URL,o=n(8605),s=n(7211),a=n(2413).Writable,c=n(2357),u=n(7109),l=["abort","aborted","connect","error","socket","timeout"],p=Object.create(null);l.forEach((function(e){p[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}}));var f=b("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),d=b("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),h=b("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),m=b("ERR_STREAM_WRITE_AFTER_END","write after end");function g(e,t){a.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){n._processResponse(e)},this._performRequest()}function v(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(o){var s=o+":",a=n[s]=e[o],l=t[o]=Object.create(a);Object.defineProperties(l,{request:{value:function(e,o,a){if("string"==typeof e){var l=e;try{e=_(new i(l))}catch(t){e=r.parse(l)}}else i&&e instanceof i?e=_(e):(a=o,o=e,e={protocol:s});return"function"==typeof o&&(a=o,o=null),(o=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,o)).nativeProtocols=n,c.equal(o.protocol,s,"protocol mismatch"),u("options",o),new g(o,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var r=l.request(e,t,n);return r.end(),r},configurable:!0,enumerable:!0,writable:!0}})})),t}function y(){}function _(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};return""!==e.port&&(t.port=Number(e.port)),t}function E(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return null==n?void 0:String(n).trim()}function b(e,t){function n(e){Error.captureStackTrace(this,this.constructor),e?(this.message=t+": "+e.message,this.cause=e):this.message=t}return n.prototype=new Error,n.prototype.constructor=n,n.prototype.name="Error ["+e+"]",n.prototype.code=e,n}function w(e){for(var t=0;t<l.length;t++)e.removeListener(l[t],p[l[t]]);e.on("error",y),e.abort()}g.prototype=Object.create(a.prototype),g.prototype.abort=function(){w(this._currentRequest),this.emit("abort")},g.prototype.write=function(e,t,n){if(this._ending)throw new m;if(!("string"==typeof e||"object"==typeof e&&"length"in e))throw new TypeError("data should be a string, Buffer or Uint8Array");"function"==typeof t&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new h),this.abort()):n&&n()},g.prototype.end=function(e,t,n){if("function"==typeof e?(n=e,e=t=null):"function"==typeof t&&(n=t,t=null),e){var r=this,i=this._currentRequest;this.write(e,t,(function(){r._ended=!0,i.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},g.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},g.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},g.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),o()}),e),r(t)}function o(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",o),n.removeListener("error",o),n.removeListener("response",o),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",r),this.on("abort",o),this.on("error",o),this.on("response",o),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){g.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(g.prototype,e,{get:function(){return this._currentRequest[e]}})})),g.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},g.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(t){if(this._options.agents){var n=e.substr(0,e.length-1);this._options.agent=this._options.agents[n]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);this._currentUrl=r.format(this._options),i._redirectable=this;for(var o=0;o<l.length;o++)i.on(l[o],p[l[o]]);if(this._isRedirect){var s=0,a=this,c=this._requestBodyBuffers;!function e(t){if(i===a._currentRequest)if(t)a.emit("error",t);else if(s<c.length){var n=c[s++];i.finished||i.write(n.data,n.encoding,e)}else a._ended&&i.end()}()}}else this.emit("error",new TypeError("Unsupported protocol "+e))},g.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n=e.headers.location;if(!n||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(w(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)this.emit("error",new d);else{((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],E(/^content-/i,this._options.headers));var i,o=E(/^host$/i,this._options.headers),s=r.parse(this._currentUrl),a=o||s.host,c=/^\w+:/.test(n)?this._currentUrl:r.format(Object.assign(s,{host:a}));try{i=r.resolve(c,n)}catch(e){return void this.emit("error",new f(e))}u("redirecting to",i),this._isRedirect=!0;var l=r.parse(i);if(Object.assign(this._options,l),(l.protocol!==s.protocol&&"https:"!==l.protocol||l.host!==a&&!function(e,t){const n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(l.host,a))&&E(/^(?:authorization|cookie)$/i,this._options.headers),"function"==typeof this._options.beforeRedirect){var p={headers:e.headers};try{this._options.beforeRedirect.call(null,this._options,p)}catch(e){return void this.emit("error",e)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){this.emit("error",new f(e))}}},e.exports=v({http:o,https:s}),e.exports.wrap=v},1075:e=>{"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')},5623:e=>{"use strict";function t(e,t,i){e instanceof RegExp&&(e=n(e,i)),t instanceof RegExp&&(t=n(t,i));var o=r(e,t,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+e.length,o[1]),post:i.slice(o[1]+t.length)}}function n(e,t){var n=t.match(e);return n?n[0]:null}function r(e,t,n){var r,i,o,s,a,c=n.indexOf(e),u=n.indexOf(t,c+1),l=c;if(c>=0&&u>0){if(e===t)return[c,u];for(r=[],o=n.length;l>=0&&!a;)l==c?(r.push(l),c=n.indexOf(e,l+1)):1==r.length?a=[r.pop(),u]:((i=r.pop())<o&&(o=i,s=u),u=n.indexOf(t,l+1)),l=c<u&&c>=0?c:u;r.length&&(a=[o,s])}return a}e.exports=t,t.range=r},3644:(e,t,n)=>{var r=n(1048),i=n(5623);e.exports=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return v(function(e){return e.split("\\\\").join(o).split("\\{").join(s).split("\\}").join(a).split("\\,").join(c).split("\\.").join(u)}(e),!0).map(p)};var o="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",c="\0COMMA"+Math.random()+"\0",u="\0PERIOD"+Math.random()+"\0";function l(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function p(e){return e.split(o).join("\\").split(s).join("{").split(a).join("}").split(c).join(",").split(u).join(".")}function f(e){if(!e)return[""];var t=[],n=i("{","}",e);if(!n)return e.split(",");var r=n.pre,o=n.body,s=n.post,a=r.split(",");a[a.length-1]+="{"+o+"}";var c=f(s);return s.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function d(e){return"{"+e+"}"}function h(e){return/^-?0\d/.test(e)}function m(e,t){return e<=t}function g(e,t){return e>=t}function v(e,t){var n=[],o=i("{","}",e);if(!o||/\$$/.test(o.pre))return[e];var s,c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),p=c||u,y=o.body.indexOf(",")>=0;if(!p&&!y)return o.post.match(/,.*\}/)?v(e=o.pre+"{"+o.body+a+o.post):[e];if(p)s=o.body.split(/\.\./);else if(1===(s=f(o.body)).length&&1===(s=v(s[0],!1).map(d)).length)return(b=o.post.length?v(o.post,!1):[""]).map((function(e){return o.pre+s[0]+e}));var _,E=o.pre,b=o.post.length?v(o.post,!1):[""];if(p){var w=l(s[0]),S=l(s[1]),I=Math.max(s[0].length,s[1].length),C=3==s.length?Math.abs(l(s[2])):1,x=m;S<w&&(C*=-1,x=g);var O=s.some(h);_=[];for(var T=w;x(T,S);T+=C){var A;if(u)"\\"===(A=String.fromCharCode(T))&&(A="");else if(A=String(T),O){var N=I-A.length;if(N>0){var P=new Array(N+1).join("0");A=T<0?"-"+P+A.slice(1):P+A}}_.push(A)}}else _=r(s,(function(e){return v(e,!1)}));for(var L=0;L<_.length;L++)for(var R=0;R<b.length;R++){var k=E+_[L]+b[R];(!t||p||k)&&n.push(k)}return n}},2779:(e,t,n)=>{var r=n(4293).Buffer,i=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function o(e){if(r.isBuffer(e))return e;var t="function"==typeof r.alloc&&"function"==typeof r.from;if("number"==typeof e)return t?r.alloc(e):new r(e);if("string"==typeof e)return t?r.from(e):new r(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function s(e){var t=o(4);return t.writeInt32BE(e,0),t}function a(e,t){e=o(e),r.isBuffer(t)&&(t=t.readUInt32BE(0));for(var n=-1^~~t,s=0;s<e.length;s++)n=i[255&(n^e[s])]^n>>>8;return-1^n}function c(){return s(a.apply(null,arguments))}"undefined"!=typeof Int32Array&&(i=new Int32Array(i)),c.signed=function(){return a.apply(null,arguments)},c.unsigned=function(){return a.apply(null,arguments)>>>0},e.exports=c},4046:(e,t,n)=>{"use strict";const r=n(1669),i=n(2357),o=n(9867),s=n(3223),a="error@context",c=[];for(let e in s.providers)c[s.providers[e]]=e;const u=process.env.DEBUG_CLS_HOOKED;let l=-1;function p(e){this.name=e,this.active=null,this._set=[],this.id=null,this._contexts=new Map}function f(e){return process.namespaces[e]}function d(e){let t=f(e);i.ok(t,"can't delete nonexistent namespace! \""+e+'"'),i.ok(t.id,"don't assign to process.namespaces directly! "+r.inspect(t)),process.namespaces[e]=null}function h(e){process.env.DEBUG&&process._rawDebug(e)}function m(e){return e?"function"==typeof e?e.name?e.name:(e.toString().trim().match(/^function\s*([^\s(]+)/)||[])[1]:e.constructor&&e.constructor.name?e.constructor.name:void 0:e}if(e.exports={getNamespace:f,createNamespace:function(e){i.ok(e,"namespace must be given a name."),u&&h("CREATING NAMESPACE "+e);let t=new p(e);return t.id=l,s.addHooks({init(n,i,o,s,a){l=n,s?(t._contexts.set(n,t._contexts.get(s)),u&&h("PARENTID: "+e+" uid:"+n+" parent:"+s+" provider:"+o)):t._contexts.set(l,t.active),u&&h("INIT "+e+" uid:"+n+" parent:"+s+" provider:"+c[o]+" active:"+r.inspect(t.active,!0))},pre(n,i){l=n;let o=t._contexts.get(n);o?(u&&h(" PRE "+e+" uid:"+n+" handle:"+m(i)+" context:"+r.inspect(o)),t.enter(o)):u&&h(" PRE MISSING CONTEXT "+e+" uid:"+n+" handle:"+m(i))},post(n,i){l=n;let o=t._contexts.get(n);o?(u&&h(" POST "+e+" uid:"+n+" handle:"+m(i)+" context:"+r.inspect(o)),t.exit(o)):u&&h(" POST MISSING CONTEXT "+e+" uid:"+n+" handle:"+m(i))},destroy(n){l=n,u&&h("DESTROY "+e+" uid:"+n+" context:"+r.inspect(t._contexts.get(l))+" active:"+r.inspect(t.active,!0)),t._contexts.delete(n)}}),process.namespaces[e]=t,t},destroyNamespace:d,reset:function(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){d(e)}));process.namespaces=Object.create(null)},ERROR_SYMBOL:a},p.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return u&&h(" SETTING KEY:"+e+"="+t+" in ns:"+this.name+" uid:"+l+" active:"+r.inspect(this.active,!0)),this.active[e]=t,t},p.prototype.get=function(e){if(this.active)return u&&h(" GETTING KEY:"+e+"="+this.active[e]+" "+this.name+" uid:"+l+" active:"+r.inspect(this.active,!0)),this.active[e];u&&h(" GETTING KEY:"+e+"=undefined "+this.name+" uid:"+l+" active:"+r.inspect(this.active,!0))},p.prototype.createContext=function(){u&&h(" CREATING Context: "+this.name+" uid:"+l+" len:"+this._set.length+" active:"+r.inspect(this.active,!0,2,!0));let e=Object.create(this.active?this.active:Object.prototype);return e._ns_name=this.name,e.id=l,u&&h(" CREATED Context: "+this.name+" uid:"+l+" len:"+this._set.length+" context:"+r.inspect(e,!0,2,!0)),e},p.prototype.run=function(e){let t=this.createContext();this.enter(t);try{return u&&h(" BEFORE RUN: "+this.name+" uid:"+l+" len:"+this._set.length+" "+r.inspect(t)),e(t),t}catch(e){throw e&&(e[a]=t),e}finally{u&&h(" AFTER RUN: "+this.name+" uid:"+l+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t)}},p.prototype.runAndReturn=function(e){var t;return this.run((function(n){t=e(n)})),t},p.prototype.runPromise=function(e){let t=this.createContext();this.enter(t);let n=e(t);if(!n||!n.then||!n.catch)throw new Error("fn must return a promise.");return u&&h(" BEFORE runPromise: "+this.name+" uid:"+l+" len:"+this._set.length+" "+r.inspect(t)),n.then((e=>(u&&h(" AFTER runPromise: "+this.name+" uid:"+l+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e))).catch((e=>{throw e[a]=t,u&&h(" AFTER runPromise: "+this.name+" uid:"+l+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e}))},p.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());let n=this;return function(){n.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[a]=t),e}finally{n.exit(t)}}},p.prototype.enter=function(e){i.ok(e,"context must be provided for entering"),u&&h(" ENTER "+this.name+" uid:"+l+" len:"+this._set.length+" context: "+r.inspect(e)),this._set.push(this.active),this.active=e},p.prototype.exit=function(e){if(i.ok(e,"context must be provided for exiting"),u&&h(" EXIT "+this.name+" uid:"+l+" len:"+this._set.length+" context: "+r.inspect(e)),this.active===e)return i.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());let t=this._set.lastIndexOf(e);t<0?(u&&h("??ERROR?? context exiting but not entered - ignoring: "+r.inspect(e)),i.ok(t>=0,"context not currently entered; can't exit. \n"+r.inspect(this)+"\n"+r.inspect(e))):(i.ok(t,"can't remove top context"),this._set.splice(t,1))},p.prototype.bindEmitter=function(e){i.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let t=this,n="context@"+this.name;o(e,(function(e){e&&(e["cls@contexts"]||(e["cls@contexts"]=Object.create(null)),e["cls@contexts"][n]={namespace:t,context:t.active})}),(function(e){if(!e||!e["cls@contexts"])return e;let t=e,n=e["cls@contexts"];return Object.keys(n).forEach((function(e){let r=n[e];t=r.namespace.bind(t,r.context)})),t}))},p.prototype.fromException=function(e){return e[a]},process.namespaces={},s._state&&!s._state.enabled&&s.enable(),u){var g=n(2512);for(var v in g.filter._modifiers)g.filter.deattach(v)}},3964:(e,t,n)=>{"use strict";const r=n(1669),i=n(2357),o=n(9867),s=n(7303),a="error@context",c=process.env.DEBUG_CLS_HOOKED;let u=-1;function l(e){this.name=e,this.active=null,this._set=[],this.id=null,this._contexts=new Map,this._indent=0}function p(e){return process.namespaces[e]}function f(e){let t=p(e);i.ok(t,"can't delete nonexistent namespace! \""+e+'"'),i.ok(t.id,"don't assign to process.namespaces directly! "+r.inspect(t)),process.namespaces[e]=null}function d(...e){c&&process._rawDebug(`${r.format(...e)}`)}e.exports={getNamespace:p,createNamespace:function(e){i.ok(e,"namespace must be given a name."),c&&d(`NS-CREATING NAMESPACE (${e})`);let t=new l(e);t.id=u;return s.createHook({init(n,i,o,a){u=s.executionAsyncId();if(t.active){t._contexts.set(n,t.active);if(c){const s=" ".repeat(t._indent<0?0:t._indent);d(`${s}INIT [${i}] (${e}) asyncId:${n} currentUid:${u} triggerId:${o} active:${r.inspect(t.active,{showHidden:true,depth:2,colors:true})} resource:${a}`)}}else if(u===0){const o=s.triggerAsyncId();const l=t._contexts.get(o);if(l){t._contexts.set(n,l);if(c){const s=" ".repeat(t._indent<0?0:t._indent);d(`${s}INIT USING CONTEXT FROM TRIGGERID [${i}] (${e}) asyncId:${n} currentUid:${u} triggerId:${o} active:${r.inspect(t.active,{showHidden:true,depth:2,colors:true})} resource:${a}`)}}else if(c){const s=" ".repeat(t._indent<0?0:t._indent);d(`${s}INIT MISSING CONTEXT [${i}] (${e}) asyncId:${n} currentUid:${u} triggerId:${o} active:${r.inspect(t.active,{showHidden:true,depth:2,colors:true})} resource:${a}`)}}if(c&&i==="PROMISE"){d(r.inspect(a,{showHidden:true}));const s=a.parentId;const c=" ".repeat(t._indent<0?0:t._indent);d(`${c}INIT RESOURCE-PROMISE [${i}] (${e}) parentId:${s} asyncId:${n} currentUid:${u} triggerId:${o} active:${r.inspect(t.active,{showHidden:true,depth:2,colors:true})} resource:${a}`)}},before(n){u=s.executionAsyncId();let i;i=t._contexts.get(n)||t._contexts.get(u);if(i){if(c){const o=s.triggerAsyncId();const a=" ".repeat(t._indent<0?0:t._indent);d(`${a}BEFORE (${e}) asyncId:${n} currentUid:${u} triggerId:${o} active:${r.inspect(t.active,{showHidden:true,depth:2,colors:true})} context:${r.inspect(i)}`);t._indent+=2}t.enter(i)}else if(c){const i=s.triggerAsyncId();const o=" ".repeat(t._indent<0?0:t._indent);d(`${o}BEFORE MISSING CONTEXT (${e}) asyncId:${n} currentUid:${u} triggerId:${i} active:${r.inspect(t.active,{showHidden:true,depth:2,colors:true})} namespace._contexts:${r.inspect(t._contexts,{showHidden:true,depth:2,colors:true})}`);t._indent+=2}},after(n){u=s.executionAsyncId();let i;i=t._contexts.get(n)||t._contexts.get(u);if(i){if(c){const o=s.triggerAsyncId();t._indent-=2;const a=" ".repeat(t._indent<0?0:t._indent);d(`${a}AFTER (${e}) asyncId:${n} currentUid:${u} triggerId:${o} active:${r.inspect(t.active,{showHidden:true,depth:2,colors:true})} context:${r.inspect(i)}`)}t.exit(i)}else if(c){const o=s.triggerAsyncId();t._indent-=2;const a=" ".repeat(t._indent<0?0:t._indent);d(`${a}AFTER MISSING CONTEXT (${e}) asyncId:${n} currentUid:${u} triggerId:${o} active:${r.inspect(t.active,{showHidden:true,depth:2,colors:true})} context:${r.inspect(i)}`)}},destroy(n){u=s.executionAsyncId();if(c){const i=s.triggerAsyncId();const o=" ".repeat(t._indent<0?0:t._indent);d(`${o}DESTROY (${e}) currentUid:${u} asyncId:${n} triggerId:${i} active:${r.inspect(t.active,{showHidden:true,depth:2,colors:true})} context:${r.inspect(t._contexts.get(u))}`)}t._contexts.delete(n)}}).enable(),process.namespaces[e]=t,t},destroyNamespace:f,reset:function(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){f(e)}));process.namespaces=Object.create(null)},ERROR_SYMBOL:a},l.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");if(this.active[e]=t,c){d(" ".repeat(this._indent<0?0:this._indent)+"CONTEXT-SET KEY:"+e+"="+t+" in ns:"+this.name+" currentUid:"+u+" active:"+r.inspect(this.active,{showHidden:!0,depth:2,colors:!0}))}return t},l.prototype.get=function(e){if(this.active){if(c){const t=s.executionAsyncId(),n=s.triggerAsyncId(),i=" ".repeat(this._indent<0?0:this._indent);d(i+"CONTEXT-GETTING KEY:"+e+"="+this.active[e]+" ("+this.name+") currentUid:"+u+" active:"+r.inspect(this.active,{showHidden:!0,depth:2,colors:!0})),d(`${i}CONTEXT-GETTING KEY: (${this.name}) ${e}=${this.active[e]} currentUid:${u} asyncHooksCurrentId:${t} triggerId:${n} len:${this._set.length} active:${r.inspect(this.active)}`)}return this.active[e]}if(c){const t=s.currentId(),n=s.triggerAsyncId();d(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-GETTING KEY NO ACTIVE NS: (${this.name}) ${e}=undefined currentUid:${u} asyncHooksCurrentId:${t} triggerId:${n} len:${this._set.length}`)}},l.prototype.createContext=function(){let e=Object.create(this.active?this.active:Object.prototype);if(e._ns_name=this.name,e.id=u,c){const t=s.executionAsyncId(),n=s.triggerAsyncId();d(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-CREATED Context: (${this.name}) currentUid:${u} asyncHooksCurrentId:${t} triggerId:${n} len:${this._set.length} context:${r.inspect(e,{showHidden:!0,depth:2,colors:!0})}`)}return e},l.prototype.run=function(e){let t=this.createContext();this.enter(t);try{if(c){const e=s.triggerAsyncId(),n=s.executionAsyncId();d(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-RUN BEGIN: (${this.name}) currentUid:${u} triggerId:${e} asyncHooksCurrentId:${n} len:${this._set.length} context:${r.inspect(t)}`)}return e(t),t}catch(e){throw e&&(e[a]=t),e}finally{if(c){const e=s.triggerAsyncId(),n=s.executionAsyncId();d(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-RUN END: (${this.name}) currentUid:${u} triggerId:${e} asyncHooksCurrentId:${n} len:${this._set.length} ${r.inspect(t)}`)}this.exit(t)}},l.prototype.runAndReturn=function(e){let t;return this.run((function(n){t=e(n)})),t},l.prototype.runPromise=function(e){let t=this.createContext();this.enter(t);let n=e(t);if(!n||!n.then||!n.catch)throw new Error("fn must return a promise.");return c&&d("CONTEXT-runPromise BEFORE: ("+this.name+") currentUid:"+u+" len:"+this._set.length+" "+r.inspect(t)),n.then((e=>(c&&d("CONTEXT-runPromise AFTER then: ("+this.name+") currentUid:"+u+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e))).catch((e=>{throw e[a]=t,c&&d("CONTEXT-runPromise AFTER catch: ("+this.name+") currentUid:"+u+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e}))},l.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());let n=this;return function(){n.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[a]=t),e}finally{n.exit(t)}}},l.prototype.enter=function(e){if(i.ok(e,"context must be provided for entering"),c){const t=s.executionAsyncId(),n=s.triggerAsyncId();d(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-ENTER: (${this.name}) currentUid:${u} triggerId:${n} asyncHooksCurrentId:${t} len:${this._set.length} ${r.inspect(e)}`)}this._set.push(this.active),this.active=e},l.prototype.exit=function(e){if(i.ok(e,"context must be provided for exiting"),c){const t=s.executionAsyncId(),n=s.triggerAsyncId();d(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-EXIT: (${this.name}) currentUid:${u} triggerId:${n} asyncHooksCurrentId:${t} len:${this._set.length} ${r.inspect(e)}`)}if(this.active===e)return i.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());let t=this._set.lastIndexOf(e);t<0?(c&&d("??ERROR?? context exiting but not entered - ignoring: "+r.inspect(e)),i.ok(t>=0,"context not currently entered; can't exit. \n"+r.inspect(this)+"\n"+r.inspect(e))):(i.ok(t,"can't remove top context"),this._set.splice(t,1))},l.prototype.bindEmitter=function(e){i.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let t=this,n="context@"+this.name;o(e,(function(e){e&&(e["cls@contexts"]||(e["cls@contexts"]=Object.create(null)),e["cls@contexts"][n]={namespace:t,context:t.active})}),(function(e){if(!e||!e["cls@contexts"])return e;let t=e,n=e["cls@contexts"];return Object.keys(n).forEach((function(e){let r=n[e];t=r.namespace.bind(t,r.context)})),t}))},l.prototype.fromException=function(e){return e[a]},process.namespaces={}},9562:(e,t,n)=>{"use strict";const r=n(1249);process&&r.gte(process.versions.node,"8.0.0")?e.exports=n(3964):e.exports=n(4046)},1048:e=>{e.exports=function(e,n){for(var r=[],i=0;i<e.length;i++){var o=n(e[i],i);t(o)?r.push.apply(r,o):r.push(o)}return r};var t=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},3057:(e,t,n)=>{"use strict";var r=n(2357),i=n(9867),o="error@context";function s(e){this.name=e,this.active=null,this._set=[],this.id=null}function a(e){return process.namespaces[e]}function c(e){var t=a(e);r.ok(t,"can't delete nonexistent namespace!"),r.ok(t.id,"don't assign to process.namespaces directly!"),process.removeAsyncListener(t.id),process.namespaces[e]=null}function u(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){c(e)})),process.namespaces=Object.create(null)}process.addAsyncListener||n(7645),s.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return this.active[e]=t,t},s.prototype.get=function(e){if(this.active)return this.active[e]},s.prototype.createContext=function(){return Object.create(this.active)},s.prototype.run=function(e){var t=this.createContext();this.enter(t);try{return e(t),t}catch(e){throw e&&(e[o]=t),e}finally{this.exit(t)}},s.prototype.runAndReturn=function(e){var t;return this.run((function(n){t=e(n)})),t},s.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());var n=this;return function(){n.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[o]=t),e}finally{n.exit(t)}}},s.prototype.enter=function(e){r.ok(e,"context must be provided for entering"),this._set.push(this.active),this.active=e},s.prototype.exit=function(e){if(r.ok(e,"context must be provided for exiting"),this.active===e)return r.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());var t=this._set.lastIndexOf(e);r.ok(t>=0,"context not currently entered; can't exit"),r.ok(t,"can't remove top context"),this._set.splice(t,1)},s.prototype.bindEmitter=function(e){r.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");var t=this,n="context@"+this.name;i(e,(function(e){e&&(e["cls@contexts"]||(e["cls@contexts"]=Object.create(null)),e["cls@contexts"][n]={namespace:t,context:t.active})}),(function(e){if(!e||!e["cls@contexts"])return e;var t=e,n=e["cls@contexts"];return Object.keys(n).forEach((function(e){var r=n[e];t=r.namespace.bind(t,r.context)})),t}))},s.prototype.fromException=function(e){return e[o]},process.namespaces||u(),e.exports={getNamespace:a,createNamespace:function(e){r.ok(e,"namespace must be given a name!");var t=new s(e);return t.id=process.addAsyncListener({create:function(){return t.active},before:function(e,n){n&&t.enter(n)},after:function(e,n){n&&t.exit(n)},error:function(e){e&&t.exit(e)}}),process.namespaces[e]=t,t},destroyNamespace:c,reset:u}},296:e=>{function t(e,t,n){var r,i,o,s,a;function c(){var u=Date.now()-s;u<t&&u>=0?r=setTimeout(c,t-u):(r=null,n||(a=e.apply(o,i),o=i=null))}null==t&&(t=100);var u=function(){o=this,i=arguments,s=Date.now();var u=n&&!r;return r||(r=setTimeout(c,t)),u&&(a=e.apply(o,i),o=i=null),a};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(a=e.apply(o,i),o=i=null,clearTimeout(r),r=null)},u}t.debounce=t,e.exports=t},1227:(e,t,n)=>{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=n(2447)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},2447:(e,t,n)=>{e.exports=function(e){function t(e){let n,i=null;function o(...e){if(!o.enabled)return;const r=o,i=Number(new Date),s=i-(n||i);r.diff=s,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";a++;const o=t.formatters[i];if("function"==typeof o){const t=e[a];n=o.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return o.namespace=e,o.useColors=t.useColors(),o.color=t.selectColor(e),o.extend=r,o.destroy=t.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null===i?t.enabled(e):i,set:e=>{i=e}}),"function"==typeof t.init&&t.init(o),o}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function i(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(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(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=n(7824),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}},5158:(e,t,n)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=n(1227):e.exports=n(39)},39:(e,t,n)=>{const r=n(3867),i=n(1669);t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return process.stderr.write(i.format(...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),o=` ${i};1m${r} `;n[0]=o+n[0].split("\n").join("\n"+o),n.push(i+"m+"+e.exports.humanize(this.diff)+"")}else n[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+r+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):r.isatty(process.stderr.fd)},t.destroy=i.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=n(2130);e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=n(2447)(t);const{formatters:o}=e.exports;o.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},o.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}},8604:function(e,t,n){"use strict";var r=this&&this.__assign||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};Object.defineProperty(t,"__esModule",{value:!0});var i=n(4953);t.AzureMonitorSymbol="Azure_Monitor_Tracer";var o=function(){function e(){}return e.prototype.onStart=function(e){},e.prototype.onEnd=function(e){i.channel.publish("azure-coretracing",e)},e.prototype.shutdown=function(){},e}();t.azureCoreTracing={versionSpecifier:">= 1.0.0 < 2.0.0",patch:function(e){try{var n=new(0,Object(function(){var e=new Error("Cannot find module '@opentelemetry/tracing'");throw e.code="MODULE_NOT_FOUND",e}()).BasicTracer)(i.channel.spanContextPropagator?{scopeManager:i.channel.spanContextPropagator}:void 0),s=n.startSpan;n.startSpan=function(e,t){if(!t||!t.parent){var i=n.getCurrentSpan();i&&i.operation&&i.operation.traceparent&&(t=r({},t,{parent:{traceId:i.operation.traceparent.traceId,spanId:i.operation.traceparent.spanId}}))}var o=s.call(this,e,t);return o.addEvent("Application Insights Integration enabled"),o},n.addSpanProcessor(new o),n[t.AzureMonitorSymbol]=!0,e.setTracer(n)}catch(e){}return e}},t.enable=function(){i.channel.registerMonkeyPatch("@azure/core-tracing",t.azureCoreTracing)}},8859:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4953);t.bunyan={versionSpecifier:">= 1.0.0 < 2.0.0",patch:function(e){var t=e.prototype._emit;return e.prototype._emit=function(e,n){var i=t.apply(this,arguments);if(!n){var o=i;o||(o=t.call(this,e,!0)),r.channel.publish("bunyan",{level:e.level,result:o})}return i},e}},t.enable=function(){r.channel.registerMonkeyPatch("bunyan",t.bunyan)}},2495:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4953),i=n(2413);t.console={versionSpecifier:">= 4.0.0",patch:function(e){var t=new i.Writable,n=new i.Writable;t.write=function(e){if(!e)return!0;var t=e.toString();return r.channel.publish("console",{message:t}),!0},n.write=function(e){if(!e)return!0;var t=e.toString();return r.channel.publish("console",{message:t,stderr:!0}),!0};for(var o=new e.Console(t,n),s=function(t){var n=e[t];n&&(e[t]=function(){if(o[t])try{o[t].apply(o,arguments)}catch(e){}return n.apply(e,arguments)})},a=0,c=["log","info","warn","error","dir","time","timeEnd","trace","assert"];a<c.length;a++){s(c[a])}return e}},t.enable=function(){r.channel.registerMonkeyPatch("console",t.console),n(7082)}},4106:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8604);t.azuresdk=r;var i=n(8859);t.bunyan=i;var o=n(2495);t.console=o;var s=n(2028);t.mongodbCore=s;var a=n(8436);t.mongodb=a;var c=n(8002);t.mysql=c;var u=n(9024);t.pgPool=u;var l=n(2080);t.pg=l;var p=n(4487);t.redis=p;var f=n(6661);t.tedious=f;var d=n(4650);t.winston=d,t.enable=function(){i.enable(),o.enable(),s.enable(),a.enable(),c.enable(),l.enable(),u.enable(),p.enable(),d.enable(),r.enable(),f.enable()}},2028:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4953);t.mongoCore={versionSpecifier:">= 2.0.0 < 4.0.0",patch:function(e){var t=e.Server.prototype.connect;return e.Server.prototype.connect=function(){var e=t.apply(this,arguments),n=this.s.pool.write;this.s.pool.write=function(){var e="function"==typeof arguments[1]?1:2;return"function"==typeof arguments[e]&&(arguments[e]=r.channel.bindToContext(arguments[e])),n.apply(this,arguments)};var i=this.s.pool.logout;return this.s.pool.logout=function(){return"function"==typeof arguments[1]&&(arguments[1]=r.channel.bindToContext(arguments[1])),i.apply(this,arguments)},e},e}},t.enable=function(){r.channel.registerMonkeyPatch("mongodb-core",t.mongoCore)}},8436:function(e,t,n){"use strict";var r=this&&this.__assign||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};Object.defineProperty(t,"__esModule",{value:!0});var i=n(4953);t.mongo2={versionSpecifier:">= 2.0.0 <= 3.0.5",patch:function(e){var t=e.instrument({operationIdGenerator:{next:function(){return i.channel.bindToContext((function(e){return e()}))}}}),n={};return t.on("started",(function(e){n[e.requestId]||(n[e.requestId]=r({},e,{time:new Date}))})),t.on("succeeded",(function(e){var t=n[e.requestId];t&&delete n[e.requestId],"function"==typeof e.operationId?e.operationId((function(){return i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})):i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),t.on("failed",(function(e){var t=n[e.requestId];t&&delete n[e.requestId],"function"==typeof e.operationId?e.operationId((function(){return i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})):i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),e}},t.mongo3={versionSpecifier:"> 3.0.5 < 3.3.0",patch:function(e){var t=e.instrument(),n={},o={};return t.on("started",(function(e){n[e.requestId]||(o[e.requestId]=i.channel.bindToContext((function(e){return e()})),n[e.requestId]=r({},e,{time:new Date}))})),t.on("succeeded",(function(e){var t=n[e.requestId];t&&delete n[e.requestId],"object"==typeof e&&"function"==typeof o[e.requestId]&&(o[e.requestId]((function(){return i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),delete o[e.requestId])})),t.on("failed",(function(e){var t=n[e.requestId];t&&delete n[e.requestId],"object"==typeof e&&"function"==typeof o[e.requestId]&&(o[e.requestId]((function(){return i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),delete o[e.requestId])})),e}},t.mongo330={versionSpecifier:">= 3.3.0 < 4.0.0",patch:function(e){!function(e){var t=e.Server.prototype.connect;e.Server.prototype.connect=function(){var e=t.apply(this,arguments),n=this.s.coreTopology.s.pool.write;this.s.coreTopology.s.pool.write=function(){var e="function"==typeof arguments[1]?1:2;return"function"==typeof arguments[e]&&(arguments[e]=i.channel.bindToContext(arguments[e])),n.apply(this,arguments)};var r=this.s.coreTopology.s.pool.logout;return this.s.coreTopology.s.pool.logout=function(){return"function"==typeof arguments[1]&&(arguments[1]=i.channel.bindToContext(arguments[1])),r.apply(this,arguments)},e}}(e);var t=e.instrument(),n={},r={};return t.on("started",(function(e){n[e.requestId]||(r[e.requestId]=i.channel.bindToContext((function(e){return e()})),n[e.requestId]=e)})),t.on("succeeded",(function(e){var t=n[e.requestId];t&&delete n[e.requestId],"object"==typeof e&&"function"==typeof r[e.requestId]&&(r[e.requestId]((function(){return i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),delete r[e.requestId])})),t.on("failed",(function(e){var t=n[e.requestId];t&&delete n[e.requestId],"object"==typeof e&&"function"==typeof r[e.requestId]&&(r[e.requestId]((function(){return i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),delete r[e.requestId])})),e}},t.enable=function(){i.channel.registerMonkeyPatch("mongodb",t.mongo2),i.channel.registerMonkeyPatch("mongodb",t.mongo3),i.channel.registerMonkeyPatch("mongodb",t.mongo330)}},8002:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4953),i=n(5622);t.mysql={versionSpecifier:">= 2.0.0 < 3.0.0",patch:function(e,t){var o=function(e,t){return function(t,n){var i=e[t];i&&(e[t]=function(){for(var e=arguments.length-1,t=arguments.length-1;t>=0;--t){if("function"==typeof arguments[t]){e=t;break}if(void 0!==arguments[t])break}var o=arguments[e],s={result:null,startTime:null,startDate:null};"function"==typeof o&&(n?(s.startTime=process.hrtime(),s.startDate=new Date,arguments[e]=r.channel.bindToContext(n(s,o))):arguments[e]=r.channel.bindToContext(o));var a=i.apply(this,arguments);return s.result=a,a})}},s=function(e,t){return o(e.prototype)},a=n(4694)(i.dirname(t)+"/lib/Connection");["connect","changeUser","ping","statistics","end"].forEach((function(e){return s(a)(e)})),o(a)("createQuery",(function(e,t){return function(n){var i=process.hrtime(e.startTime),o=1e3*i[0]+i[1]/1e6|0;r.channel.publish("mysql",{query:e.result,callbackArgs:arguments,err:n,duration:o,time:e.startDate}),t.apply(this,arguments)}}));var c=n(420)(i.dirname(t)+"/lib/Pool");return["_enqueueCallback"].forEach((function(e){return s(c)(e)})),e}},t.enable=function(){r.channel.registerMonkeyPatch("mysql",t.mysql)}},9024:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4953);t.postgresPool1={versionSpecifier:">= 1.0.0 < 3.0.0",patch:function(e){var t=e.prototype.connect;return e.prototype.connect=function(e){return e&&(arguments[0]=r.channel.bindToContext(e)),t.apply(this,arguments)},e}},t.enable=function(){r.channel.registerMonkeyPatch("pg-pool",t.postgresPool1)}},2080:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4953),i=n(8614);t.postgres6={versionSpecifier:"6.*",patch:function(e,t){var n=e.Client.prototype.query,o="__diagnosticOriginalFunc";return e.Client.prototype.query=function(e,t,s){var a,c={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},u=process.hrtime();function l(e){e&&e[o]&&(e=e[o]);var t=r.channel.bindToContext((function(t,n){var o=process.hrtime(u);if(c.result=n&&{rowCount:n.rowCount,command:n.command},c.error=t,c.duration=Math.ceil(1e3*o[0]+o[1]/1e6),r.channel.publish("postgres",c),t){if(e)return e.apply(this,arguments);a&&a instanceof i.EventEmitter&&a.emit("error",t)}else e&&e.apply(this,arguments)}));try{return Object.defineProperty(t,o,{value:e}),t}catch(t){return e}}try{"string"==typeof e?t instanceof Array?(c.query.preparable={text:e,args:t},s=l(s)):(c.query.text=e,s?s=l(s):t=l(t)):("string"==typeof e.name?c.query.plan=e.name:e.values instanceof Array?c.query.preparable={text:e.text,args:e.values}:c.query.text=e.text,s?s=l(s):t?t=l(t):e.callback=l(e.callback))}catch(e){return n.apply(this,arguments)}return arguments[0]=e,arguments[1]=t,arguments[2]=s,arguments.length=arguments.length>3?arguments.length:3,a=n.apply(this,arguments)},e}},t.postgres7={versionSpecifier:">=7.* <=8.*",patch:function(e,t){var n=e.Client.prototype.query,o="__diagnosticOriginalFunc";return e.Client.prototype.query=function(e,t,s){var a,c=this,u=!!s,l={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},p=process.hrtime();function f(e){e&&e[o]&&(e=e[o]);var t=r.channel.bindToContext((function(t,n){var o=process.hrtime(p);if(l.result=n&&{rowCount:n.rowCount,command:n.command},l.error=t,l.duration=Math.ceil(1e3*o[0]+o[1]/1e6),r.channel.publish("postgres",l),t){if(e)return e.apply(this,arguments);a&&a instanceof i.EventEmitter&&a.emit("error",t)}else e&&e.apply(this,arguments)}));try{return Object.defineProperty(t,o,{value:e}),t}catch(t){return e}}try{"string"==typeof e?t instanceof Array?(l.query.preparable={text:e,args:t},s=(u="function"==typeof s)?f(s):s):(l.query.text=e,s?s=(u="function"==typeof s)?f(s):s:t=(u="function"==typeof t)?f(t):t):("string"==typeof e.name?l.query.plan=e.name:e.values instanceof Array?l.query.preparable={text:e.text,args:e.values}:l.query.text=e.text,s?(u="function"==typeof s,s=f(s)):t?t=(u="function"==typeof t)?f(t):t:(u="function"==typeof e.callback,e.callback=u?f(e.callback):e.callback))}catch(e){return n.apply(this,arguments)}return arguments[0]=e,arguments[1]=t,arguments[2]=s,arguments.length=arguments.length>3?arguments.length:3,a=n.apply(this,arguments),u?a:a.then((function(e){return f()(void 0,e),new c._Promise((function(t,n){t(e)}))})).catch((function(e){return f()(e,void 0),new c._Promise((function(t,n){n(e)}))}))},e}},t.enable=function(){r.channel.registerMonkeyPatch("pg",t.postgres6),r.channel.registerMonkeyPatch("pg",t.postgres7)}},4487:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4953);t.redis={versionSpecifier:">= 2.0.0 < 4.0.0",patch:function(e){var t=e.RedisClient.prototype.internal_send_command;return e.RedisClient.prototype.internal_send_command=function(e){if(e){var n=e.callback;if(!n||!n.pubsubBound){var i=this.address,o=process.hrtime(),s=new Date;e.callback=r.channel.bindToContext((function(t,a){var c=process.hrtime(o),u=1e3*c[0]+c[1]/1e6|0;r.channel.publish("redis",{duration:u,address:i,commandObj:e,err:t,result:a,time:s}),"function"==typeof n&&n.apply(this,arguments)})),e.callback.pubsubBound=!0}}return t.call(this,e)},e}},t.enable=function(){r.channel.registerMonkeyPatch("redis",t.redis)}},6661:function(e,t,n){"use strict";var r=this&&this.__assign||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};Object.defineProperty(t,"__esModule",{value:!0});var i=n(4953);t.tedious={versionSpecifier:">= 6.0.0 < 9.0.0",patch:function(e){var t=e.Connection.prototype.makeRequest;return e.Connection.prototype.makeRequest=function(){function e(e){var t=process.hrtime(),n={query:{},database:{host:null,port:null},result:null,error:null,duration:0};return i.channel.bindToContext((function(o,s,a){var c=process.hrtime(t);n=r({},n,{database:{host:this.connection.config.server,port:this.connection.config.options.port},result:!o&&{rowCount:s,rows:a},query:{text:this.parametersByName.statement.value},error:o,duration:Math.ceil(1e3*c[0]+c[1]/1e6)}),i.channel.publish("tedious",n),e.call(this,o,s,a)}))}var n=arguments[0];arguments[0].callback=e(n.callback),t.apply(this,arguments)},e}},t.enable=function(){i.channel.registerMonkeyPatch("tedious",t.tedious)}},4650:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(4953);t.winston3={versionSpecifier:"3.x",patch:function(e){var t=function(e){function t(t,n){var r=e.call(this,n)||this;return r.winston=t,r}return i(t,e),t.prototype.log=function(e,t){var n=e.message,r=e.level,i=e.meta,a=o(e,["message","level","meta"]);r="function"==typeof Symbol.for?e[Symbol.for("level")]:r,n=e instanceof Error?e:n;var c=function(e,t){return null!=e.config.npm.levels[t]?"npm":null!=e.config.syslog.levels[t]?"syslog":"unknown"}(this.winston,r);for(var u in i=i||{},a)a.hasOwnProperty(u)&&(i[u]=a[u]);s.channel.publish("winston",{message:n,level:r,levelKind:c,meta:i}),t()},t}(e.Transport);function n(){var n,r=arguments[0].levels||e.config.npm.levels;for(var i in r)r.hasOwnProperty(i)&&(n=void 0===n||r[i]>r[n]?i:n);this.add(new t(e,{level:n}))}var r=e.createLogger;e.createLogger=function(){var i,o=arguments[0].levels||e.config.npm.levels;for(var s in o)o.hasOwnProperty(s)&&(i=void 0===i||o[s]>o[i]?s:i);var a=r.apply(this,arguments);a.add(new t(e,{level:i}));var c=a.configure;return a.configure=function(){c.apply(this,arguments),n.apply(this,arguments)},a};var a=e.createLogger;return e.configure=function(){a.apply(this,arguments),n.apply(this,arguments)},e.add(new t(e)),e}},t.winston2={versionSpecifier:"2.x",patch:function(e){var t,n=e.Logger.prototype.log,r=function(n,r,i){var o;return o=t===e.config.npm.levels?"npm":t===e.config.syslog.levels?"syslog":"unknown",s.channel.publish("winston",{level:n,message:r,meta:i,levelKind:o}),r};return e.Logger.prototype.log=function(){return t=this.levels,this.filters&&0!==this.filters.length?this.filters[this.filters.length-1]!==r&&(this.filters=this.filters.filter((function(e){return e!==r})),this.filters.push(r)):this.filters=[r],n.apply(this,arguments)},e}},t.enable=function(){s.channel.registerMonkeyPatch("winston",t.winston2),s.channel.registerMonkeyPatch("winston",t.winston3)}},4694:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4694,e.exports=t},420:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=420,e.exports=t},4953:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7424),i=n(7424);t.makePatchingRequire=i.makePatchingRequire;var o=function(e){return!0},s=function(){function e(){this.version=n(5236).i8,this.subscribers={},this.contextPreservationFunction=function(e){return e},this.knownPatches={},this.currentlyPublishing=!1}return e.prototype.shouldPublish=function(e){var t=this.subscribers[e];return!!t&&t.some((function(e){var t=e.filter;return!t||t(!1)}))},e.prototype.publish=function(e,t){if(!this.currentlyPublishing){var n=this.subscribers[e];if(n){var r={timestamp:Date.now(),data:t};this.currentlyPublishing=!0,n.forEach((function(e){var t=e.listener,n=e.filter;try{n&&n(!0)&&t(r)}catch(e){}})),this.currentlyPublishing=!1}}},e.prototype.subscribe=function(e,t,n){void 0===n&&(n=o),this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push({listener:t,filter:n})},e.prototype.unsubscribe=function(e,t,n){void 0===n&&(n=o);var r=this.subscribers[e];if(r)for(var i=0;i<r.length;++i)if(r[i].listener===t&&r[i].filter===n)return r.splice(i,1),!0;return!1},e.prototype.reset=function(){var e=this;this.subscribers={},this.contextPreservationFunction=function(e){return e},Object.getOwnPropertyNames(this.knownPatches).forEach((function(t){return delete e.knownPatches[t]}))},e.prototype.bindToContext=function(e){return this.contextPreservationFunction(e)},e.prototype.addContextPreservation=function(e){var t=this.contextPreservationFunction;this.contextPreservationFunction=function(n){return e(t(n))}},e.prototype.registerMonkeyPatch=function(e,t){this.knownPatches[e]||(this.knownPatches[e]=[]),this.knownPatches[e].push(t)},e.prototype.getPatchesObject=function(){return this.knownPatches},e}();global.diagnosticsSource||(global.diagnosticsSource=new s,n(2282).prototype.require=r.makePatchingRequire(global.diagnosticsSource.getPatchesObject()));t.channel=global.diagnosticsSource},7424:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5622),i=n(1249),o=n(2282),s=Object.keys(process.binding("natives")),a=o.prototype.require;t.makePatchingRequire=function(e){var t={};return function(n){var c=a.apply(this,arguments);if(e[n]){var u=o._resolveFilename(n,this);if(t.hasOwnProperty(u))return t[u];var l=void 0;if(s.indexOf(n)<0)try{l=a.call(this,r.join(n,"package.json")).version}catch(e){return c}else l=process.version.substring(1);var p=l.indexOf("-");p>=0&&(l=l.substring(0,p));for(var f=c,d=0,h=e[n];d<h.length;d++){var m=h[d];i.satisfies(l,m.versionSpecifier)&&(f=m.patch(f,u))}return t[u]=f}return c}}},5236:e=>{"use strict";e.exports={i8:"0.2.0"}},696:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertChangesToDMP=function(e){for(var t,n,r=[],i=0;i<e.length;i++)t=e[i],n=t.added?1:t.removed?-1:0,r.push([n,t.value]);return r}},5826:(e,t)=>{"use strict";function n(e){var t=e;return t=(t=(t=(t=t.replace(/&/g,"&amp;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;")).replace(/"/g,"&quot;")}Object.defineProperty(t,"__esModule",{value:!0}),t.convertChangesToXML=function(e){for(var t=[],r=0;r<e.length;r++){var i=e[r];i.added?t.push("<ins>"):i.removed&&t.push("<del>"),t.push(n(i.value)),i.added?t.push("</ins>"):i.removed&&t.push("</del>")}return t.join("")}},6976:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.diffArrays=function(e,t,n){return i.diff(e,t,n)},t.arrayDiff=void 0;var i=new(((r=n(5913))&&r.__esModule?r:{default:r}).default);t.arrayDiff=i,i.tokenize=function(e){return e.slice()},i.join=i.removeEmpty=function(e){return e}},5913:(e,t)=>{"use strict";function n(){}function r(e,t,n,r,i){for(var o=0,s=t.length,a=0,c=0;o<s;o++){var u=t[o];if(u.removed){if(u.value=e.join(r.slice(c,c+u.count)),c+=u.count,o&&t[o-1].added){var l=t[o-1];t[o-1]=t[o],t[o]=l}}else{if(!u.added&&i){var p=n.slice(a,a+u.count);p=p.map((function(e,t){var n=r[c+t];return n.length>e.length?n:e})),u.value=e.join(p)}else u.value=e.join(n.slice(a,a+u.count));a+=u.count,u.added||(c+=u.count)}}var f=t[s-1];return s>1&&"string"==typeof f.value&&(f.added||f.removed)&&e.equals("",f.value)&&(t[s-2].value+=f.value,t.pop()),t}function i(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.callback;"function"==typeof n&&(o=n,n={}),this.options=n;var s=this;function a(e){return o?(setTimeout((function(){o(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var c=(t=this.removeEmpty(this.tokenize(t))).length,u=e.length,l=1,p=c+u,f=[{newPos:-1,components:[]}],d=this.extractCommon(f[0],t,e,0);if(f[0].newPos+1>=c&&d+1>=u)return a([{value:this.join(t),count:t.length}]);function h(){for(var n=-1*l;n<=l;n+=2){var o=void 0,p=f[n-1],d=f[n+1],h=(d?d.newPos:0)-n;p&&(f[n-1]=void 0);var m=p&&p.newPos+1<c,g=d&&0<=h&&h<u;if(m||g){if(!m||g&&p.newPos<d.newPos?(o=i(d),s.pushComponent(o.components,void 0,!0)):((o=p).newPos++,s.pushComponent(o.components,!0,void 0)),h=s.extractCommon(o,t,e,n),o.newPos+1>=c&&h+1>=u)return a(r(s,o.components,t,e,s.useLongestToken));f[n]=o}else f[n]=void 0}l++}if(o)!function e(){setTimeout((function(){if(l>p)return o();h()||e()}),0)}();else for(;l<=p;){var m=h();if(m)return m}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var i=t.length,o=n.length,s=e.newPos,a=s-r,c=0;s+1<i&&a+1<o&&this.equals(t[s+1],n[a+1]);)s++,a++,c++;return c&&e.components.push({count:c}),e.newPos=s,a},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},7630:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.diffChars=function(e,t,n){return i.diff(e,t,n)},t.characterDiff=void 0;var i=new(((r=n(5913))&&r.__esModule?r:{default:r}).default);t.characterDiff=i},4852:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.diffCss=function(e,t,n){return i.diff(e,t,n)},t.cssDiff=void 0;var i=new(((r=n(5913))&&r.__esModule?r:{default:r}).default);t.cssDiff=i,i.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)}},4276:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.diffJson=function(e,t,n){return c.diff(e,t,n)},t.canonicalize=u,t.jsonDiff=void 0;var r,i=(r=n(5913))&&r.__esModule?r:{default:r},o=n(8187);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=Object.prototype.toString,c=new i.default;function u(e,t,n,r,i){var o,c;for(t=t||[],n=n||[],r&&(e=r(i,e)),o=0;o<t.length;o+=1)if(t[o]===e)return n[o];if("[object Array]"===a.call(e)){for(t.push(e),c=new Array(e.length),n.push(c),o=0;o<e.length;o+=1)c[o]=u(e[o],t,n,r,i);return t.pop(),n.pop(),c}if(e&&e.toJSON&&(e=e.toJSON()),"object"===s(e)&&null!==e){t.push(e),c={},n.push(c);var l,p=[];for(l in e)e.hasOwnProperty(l)&&p.push(l);for(p.sort(),o=0;o<p.length;o+=1)c[l=p[o]]=u(e[l],t,n,r,l);t.pop(),n.pop()}else c=e;return c}t.jsonDiff=c,c.useLongestToken=!0,c.tokenize=o.lineDiff.tokenize,c.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,i=void 0===r?function(e,t){return void 0===t?n:t}:r;return"string"==typeof e?e:JSON.stringify(u(e,null,null,i),i," ")},c.equals=function(e,t){return i.default.prototype.equals.call(c,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))}},8187:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.diffLines=function(e,t,n){return s.diff(e,t,n)},t.diffTrimmedLines=function(e,t,n){var r=(0,o.generateOptions)(n,{ignoreWhitespace:!0});return s.diff(e,t,r)},t.lineDiff=void 0;var r,i=(r=n(5913))&&r.__esModule?r:{default:r},o=n(8009);var s=new i.default;t.lineDiff=s,s.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t}},4146:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.diffSentences=function(e,t,n){return i.diff(e,t,n)},t.sentenceDiff=void 0;var i=new(((r=n(5913))&&r.__esModule?r:{default:r}).default);t.sentenceDiff=i,i.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)}},5303:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.diffWords=function(e,t,n){return n=(0,o.generateOptions)(n,{ignoreWhitespace:!0}),c.diff(e,t,n)},t.diffWordsWithSpace=function(e,t,n){return c.diff(e,t,n)},t.wordDiff=void 0;var r,i=(r=n(5913))&&r.__esModule?r:{default:r},o=n(8009);var s=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,a=/\S/,c=new i.default;t.wordDiff=c,c.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!a.test(e)&&!a.test(t)},c.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&s.test(t[n])&&s.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t}},9479:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Diff",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"diffChars",{enumerable:!0,get:function(){return o.diffChars}}),Object.defineProperty(t,"diffWords",{enumerable:!0,get:function(){return s.diffWords}}),Object.defineProperty(t,"diffWordsWithSpace",{enumerable:!0,get:function(){return s.diffWordsWithSpace}}),Object.defineProperty(t,"diffLines",{enumerable:!0,get:function(){return a.diffLines}}),Object.defineProperty(t,"diffTrimmedLines",{enumerable:!0,get:function(){return a.diffTrimmedLines}}),Object.defineProperty(t,"diffSentences",{enumerable:!0,get:function(){return c.diffSentences}}),Object.defineProperty(t,"diffCss",{enumerable:!0,get:function(){return u.diffCss}}),Object.defineProperty(t,"diffJson",{enumerable:!0,get:function(){return l.diffJson}}),Object.defineProperty(t,"canonicalize",{enumerable:!0,get:function(){return l.canonicalize}}),Object.defineProperty(t,"diffArrays",{enumerable:!0,get:function(){return p.diffArrays}}),Object.defineProperty(t,"applyPatch",{enumerable:!0,get:function(){return f.applyPatch}}),Object.defineProperty(t,"applyPatches",{enumerable:!0,get:function(){return f.applyPatches}}),Object.defineProperty(t,"parsePatch",{enumerable:!0,get:function(){return d.parsePatch}}),Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return h.merge}}),Object.defineProperty(t,"structuredPatch",{enumerable:!0,get:function(){return m.structuredPatch}}),Object.defineProperty(t,"createTwoFilesPatch",{enumerable:!0,get:function(){return m.createTwoFilesPatch}}),Object.defineProperty(t,"createPatch",{enumerable:!0,get:function(){return m.createPatch}}),Object.defineProperty(t,"convertChangesToDMP",{enumerable:!0,get:function(){return g.convertChangesToDMP}}),Object.defineProperty(t,"convertChangesToXML",{enumerable:!0,get:function(){return v.convertChangesToXML}});var r,i=(r=n(5913))&&r.__esModule?r:{default:r},o=n(7630),s=n(5303),a=n(8187),c=n(4146),u=n(4852),l=n(4276),p=n(6976),f=n(3690),d=n(3719),h=n(3051),m=n(1286),g=n(696),v=n(5826)},3690:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applyPatch=s,t.applyPatches=function(e,t){"string"==typeof e&&(e=(0,i.parsePatch)(e));var n=0;!function r(){var i=e[n++];if(!i)return t.complete();t.loadFile(i,(function(e,n){if(e)return t.complete(e);var o=s(n,i,t);t.patched(i,o,(function(e){if(e)return t.complete(e);r()}))}))}()};var r,i=n(3719),o=(r=n(8169))&&r.__esModule?r:{default:r};function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof t&&(t=(0,i.parsePatch)(t)),Array.isArray(t)){if(t.length>1)throw new Error("applyPatch only works with a single input.");t=t[0]}var r,s,a=e.split(/\r\n|[\n\v\f\r\x85]/),c=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],u=t.hunks,l=n.compareLine||function(e,t,n,r){return t===r},p=0,f=n.fuzzFactor||0,d=0,h=0;function m(e,t){for(var n=0;n<e.lines.length;n++){var r=e.lines[n],i=r.length>0?r[0]:" ",o=r.length>0?r.substr(1):r;if(" "===i||"-"===i){if(!l(t+1,a[t],i,o)&&++p>f)return!1;t++}}return!0}for(var g=0;g<u.length;g++){for(var v=u[g],y=a.length-v.oldLines,_=0,E=h+v.oldStart-1,b=(0,o.default)(E,d,y);void 0!==_;_=b())if(m(v,E+_)){v.offset=h+=_;break}if(void 0===_)return!1;d=v.offset+v.oldStart+v.oldLines}for(var w=0,S=0;S<u.length;S++){var I=u[S],C=I.oldStart+I.offset+w-1;w+=I.newLines-I.oldLines;for(var x=0;x<I.lines.length;x++){var O=I.lines[x],T=O.length>0?O[0]:" ",A=O.length>0?O.substr(1):O,N=I.linedelimiters[x];if(" "===T)C++;else if("-"===T)a.splice(C,1),c.splice(C,1);else if("+"===T)a.splice(C,0,A),c.splice(C,0,N),C++;else if("\\"===T){var P=I.lines[x-1]?I.lines[x-1][0]:null;"+"===P?r=!0:"-"===P&&(s=!0)}}}if(r)for(;!a[a.length-1];)a.pop(),c.pop();else s&&(a.push(""),c.push("\n"));for(var L=0;L<a.length-1;L++)a[L]=a[L]+c[L];return a.join("")}},1286:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.structuredPatch=s,t.formatPatch=a,t.createTwoFilesPatch=c,t.createPatch=function(e,t,n,r,i,o){return c(e,e,t,n,r,i,o)};var r=n(8187);function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t,n,o,s,a,c){c||(c={}),void 0===c.context&&(c.context=4);var u=(0,r.diffLines)(n,o,c);function l(e){return e.map((function(e){return" "+e}))}u.push({value:"",lines:[]});for(var p=[],f=0,d=0,h=[],m=1,g=1,v=function(e){var t=u[e],r=t.lines||t.value.replace(/\n$/,"").split("\n");if(t.lines=r,t.added||t.removed){var s;if(!f){var a=u[e-1];f=m,d=g,a&&(h=c.context>0?l(a.lines.slice(-c.context)):[],f-=h.length,d-=h.length)}(s=h).push.apply(s,i(r.map((function(e){return(t.added?"+":"-")+e})))),t.added?g+=r.length:m+=r.length}else{if(f)if(r.length<=2*c.context&&e<u.length-2){var v;(v=h).push.apply(v,i(l(r)))}else{var y,_=Math.min(r.length,c.context);(y=h).push.apply(y,i(l(r.slice(0,_))));var E={oldStart:f,oldLines:m-f+_,newStart:d,newLines:g-d+_,lines:h};if(e>=u.length-2&&r.length<=c.context){var b=/\n$/.test(n),w=/\n$/.test(o),S=0==r.length&&h.length>E.oldLines;!b&&S&&n.length>0&&h.splice(E.oldLines,0,"\\ No newline at end of file"),(b||S)&&w||h.push("\\ No newline at end of file")}p.push(E),f=0,d=0,h=[]}m+=r.length,g+=r.length}},y=0;y<u.length;y++)v(y);return{oldFileName:e,newFileName:t,oldHeader:s,newHeader:a,hunks:p}}function a(e){var t=[];e.oldFileName==e.newFileName&&t.push("Index: "+e.oldFileName),t.push("==================================================================="),t.push("--- "+e.oldFileName+(void 0===e.oldHeader?"":"\t"+e.oldHeader)),t.push("+++ "+e.newFileName+(void 0===e.newHeader?"":"\t"+e.newHeader));for(var n=0;n<e.hunks.length;n++){var r=e.hunks[n];0===r.oldLines&&(r.oldStart-=1),0===r.newLines&&(r.newStart-=1),t.push("@@ -"+r.oldStart+","+r.oldLines+" +"+r.newStart+","+r.newLines+" @@"),t.push.apply(t,r.lines)}return t.join("\n")+"\n"}function c(e,t,n,r,i,o,c){return a(s(e,t,n,r,i,o,c))}},3051:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calcLineCount=c,t.merge=function(e,t,n){e=u(e,n),t=u(t,n);var r={};(e.index||t.index)&&(r.index=e.index||t.index);(e.newFileName||t.newFileName)&&(l(e)?l(t)?(r.oldFileName=p(r,e.oldFileName,t.oldFileName),r.newFileName=p(r,e.newFileName,t.newFileName),r.oldHeader=p(r,e.oldHeader,t.oldHeader),r.newHeader=p(r,e.newHeader,t.newHeader)):(r.oldFileName=e.oldFileName,r.newFileName=e.newFileName,r.oldHeader=e.oldHeader,r.newHeader=e.newHeader):(r.oldFileName=t.oldFileName||e.oldFileName,r.newFileName=t.newFileName||e.newFileName,r.oldHeader=t.oldHeader||e.oldHeader,r.newHeader=t.newHeader||e.newHeader));r.hunks=[];var i=0,o=0,s=0,a=0;for(;i<e.hunks.length||o<t.hunks.length;){var c=e.hunks[i]||{oldStart:1/0},m=t.hunks[o]||{oldStart:1/0};if(f(c,m))r.hunks.push(d(c,s)),i++,a+=c.newLines-c.oldLines;else if(f(m,c))r.hunks.push(d(m,a)),o++,s+=m.newLines-m.oldLines;else{var g={oldStart:Math.min(c.oldStart,m.oldStart),oldLines:0,newStart:Math.min(c.newStart+s,m.oldStart+a),newLines:0,lines:[]};h(g,c.oldStart,c.lines,m.oldStart,m.lines),o++,i++,r.hunks.push(g)}}return r};var r=n(1286),i=n(3719),o=n(7780);function s(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e){var t=S(e.lines),n=t.oldLines,r=t.newLines;void 0!==n?e.oldLines=n:delete e.oldLines,void 0!==r?e.newLines=r:delete e.newLines}function u(e,t){if("string"==typeof e){if(/^@@/m.test(e)||/^Index:/m.test(e))return(0,i.parsePatch)(e)[0];if(!t)throw new Error("Must provide a base reference or pass in a patch");return(0,r.structuredPatch)(void 0,void 0,t,e)}return e}function l(e){return e.newFileName&&e.newFileName!==e.oldFileName}function p(e,t,n){return t===n?t:(e.conflict=!0,{mine:t,theirs:n})}function f(e,t){return e.oldStart<t.oldStart&&e.oldStart+e.oldLines<t.oldStart}function d(e,t){return{oldStart:e.oldStart,oldLines:e.oldLines,newStart:e.newStart+t,newLines:e.newLines,lines:e.lines}}function h(e,t,n,r,i){var o={offset:t,lines:n,index:0},a={offset:r,lines:i,index:0};for(y(e,o,a),y(e,a,o);o.index<o.lines.length&&a.index<a.lines.length;){var u=o.lines[o.index],l=a.lines[a.index];if("-"!==u[0]&&"+"!==u[0]||"-"!==l[0]&&"+"!==l[0])if("+"===u[0]&&" "===l[0]){var p;(p=e.lines).push.apply(p,s(E(o)))}else if("+"===l[0]&&" "===u[0]){var f;(f=e.lines).push.apply(f,s(E(a)))}else"-"===u[0]&&" "===l[0]?g(e,o,a):"-"===l[0]&&" "===u[0]?g(e,a,o,!0):u===l?(e.lines.push(u),o.index++,a.index++):v(e,E(o),E(a));else m(e,o,a)}_(e,o),_(e,a),c(e)}function m(e,t,n){var r=E(t),i=E(n);if(b(r)&&b(i)){var a,c;if((0,o.arrayStartsWith)(r,i)&&w(n,r,r.length-i.length))return void(a=e.lines).push.apply(a,s(r));if((0,o.arrayStartsWith)(i,r)&&w(t,i,i.length-r.length))return void(c=e.lines).push.apply(c,s(i))}else if((0,o.arrayEqual)(r,i)){var u;return void(u=e.lines).push.apply(u,s(r))}v(e,r,i)}function g(e,t,n,r){var i,o=E(t),a=function(e,t){var n=[],r=[],i=0,o=!1,s=!1;for(;i<t.length&&e.index<e.lines.length;){var a=e.lines[e.index],c=t[i];if("+"===c[0])break;if(o=o||" "!==a[0],r.push(c),i++,"+"===a[0])for(s=!0;"+"===a[0];)n.push(a),a=e.lines[++e.index];c.substr(1)===a.substr(1)?(n.push(a),e.index++):s=!0}"+"===(t[i]||"")[0]&&o&&(s=!0);if(s)return n;for(;i<t.length;)r.push(t[i++]);return{merged:r,changes:n}}(n,o);a.merged?(i=e.lines).push.apply(i,s(a.merged)):v(e,r?a:o,r?o:a)}function v(e,t,n){e.conflict=!0,e.lines.push({conflict:!0,mine:t,theirs:n})}function y(e,t,n){for(;t.offset<n.offset&&t.index<t.lines.length;){var r=t.lines[t.index++];e.lines.push(r),t.offset++}}function _(e,t){for(;t.index<t.lines.length;){var n=t.lines[t.index++];e.lines.push(n)}}function E(e){for(var t=[],n=e.lines[e.index][0];e.index<e.lines.length;){var r=e.lines[e.index];if("-"===n&&"+"===r[0]&&(n="+"),n!==r[0])break;t.push(r),e.index++}return t}function b(e){return e.reduce((function(e,t){return e&&"-"===t[0]}),!0)}function w(e,t,n){for(var r=0;r<n;r++){var i=t[t.length-n+r].substr(1);if(e.lines[e.index+r]!==" "+i)return!1}return e.index+=n,!0}function S(e){var t=0,n=0;return e.forEach((function(e){if("string"!=typeof e){var r=S(e.mine),i=S(e.theirs);void 0!==t&&(r.oldLines===i.oldLines?t+=r.oldLines:t=void 0),void 0!==n&&(r.newLines===i.newLines?n+=r.newLines:n=void 0)}else void 0===n||"+"!==e[0]&&" "!==e[0]||n++,void 0===t||"-"!==e[0]&&" "!==e[0]||t++})),{oldLines:t,newLines:n}}},3719:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parsePatch=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.split(/\r\n|[\n\v\f\r\x85]/),r=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],i=[],o=0;function s(){var e={};for(i.push(e);o<n.length;){var r=n[o];if(/^(\-\-\-|\+\+\+|@@)\s/.test(r))break;var s=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(r);s&&(e.index=s[1]),o++}for(a(e),a(e),e.hunks=[];o<n.length;){var u=n[o];if(/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(u))break;if(/^@@/.test(u))e.hunks.push(c());else{if(u&&t.strict)throw new Error("Unknown line "+(o+1)+" "+JSON.stringify(u));o++}}}function a(e){var t=/^(---|\+\+\+)\s+(.*)$/.exec(n[o]);if(t){var r="---"===t[1]?"old":"new",i=t[2].split("\t",2),s=i[0].replace(/\\\\/g,"\\");/^".*"$/.test(s)&&(s=s.substr(1,s.length-2)),e[r+"FileName"]=s,e[r+"Header"]=(i[1]||"").trim(),o++}}function c(){var e=o,i=n[o++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),s={oldStart:+i[1],oldLines:void 0===i[2]?1:+i[2],newStart:+i[3],newLines:void 0===i[4]?1:+i[4],lines:[],linedelimiters:[]};0===s.oldLines&&(s.oldStart+=1),0===s.newLines&&(s.newStart+=1);for(var a=0,c=0;o<n.length&&!(0===n[o].indexOf("--- ")&&o+2<n.length&&0===n[o+1].indexOf("+++ ")&&0===n[o+2].indexOf("@@"));o++){var u=0==n[o].length&&o!=n.length-1?" ":n[o][0];if("+"!==u&&"-"!==u&&" "!==u&&"\\"!==u)break;s.lines.push(n[o]),s.linedelimiters.push(r[o]||"\n"),"+"===u?a++:"-"===u?c++:" "===u&&(a++,c++)}if(a||1!==s.newLines||(s.newLines=0),c||1!==s.oldLines||(s.oldLines=0),t.strict){if(a!==s.newLines)throw new Error("Added line count did not match for hunk at line "+(e+1));if(c!==s.oldLines)throw new Error("Removed line count did not match for hunk at line "+(e+1))}return s}for(;o<n.length;)s();return i}},7780:(e,t)=>{"use strict";function n(e,t){if(t.length>e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.arrayEqual=function(e,t){if(e.length!==t.length)return!1;return n(e,t)},t.arrayStartsWith=n},8169:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=!0,i=!1,o=!1,s=1;return function a(){if(r&&!o){if(i?s++:r=!1,e+s<=n)return s;o=!0}if(!i)return o||(r=!0),t<=e-s?-s++:(i=!0,a())}}},8009:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateOptions=function(e,t){if("function"==typeof e)t.callback=e;else if(e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}},9867:(e,t,n)=>{"use strict";var r=n(6372),i=r.wrap,o=r.unwrap,s="wrap@before";function a(e,t,n){var r=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}function c(e,t){var n;return n=e._events&&e._events[t],Array.isArray(n)||(n=n?[n]:[]),n}function u(e,t,n){var r=c(e,t).filter((function(e){return-1===n.indexOf(e)}));r.length>0&&function(e,t){for(var n=t.length,r=0;r<n;r++){var i=t[r],o=e[s];if("function"==typeof o)o(i);else if(Array.isArray(o))for(var a=o.length,c=0;c<a;c++)o[c](i)}}(e,r)}function l(e,t){if(e){var n=e;if("function"==typeof e)n=t(e);else if(Array.isArray(e)){n=[];for(var r=0;r<e.length;r++)n[r]=t(e[r])}return n}}e.exports=function(e,t,n){if(!(e&&e.on&&e.addListener&&e.removeListener&&e.emit))throw new Error("can only wrap real EEs");if(!t)throw new Error("must have function to run on listener addition");if(!n)throw new Error("must have function to wrap listeners when emitting");function r(e){return function(t,n){var o=c(this,t).slice();try{var s=e.call(this,t,n);return u(this,t,o),s}finally{this.on.__wrapped||i(this,"on",r),this.addListener.__wrapped||i(this,"addListener",r)}}}e[s]?"function"==typeof e[s]?a(e,s,[e[s],t]):Array.isArray(e[s])&&e[s].push(t):a(e,s,t),e.__wrapped||(i(e,"addListener",r),i(e,"on",r),i(e,"emit",(function(e){return function(t){if(!this._events||!this._events[t])return e.apply(this,arguments);var r=this._events[t];function s(e){return function(){this._events[t]=r;try{return e.apply(this,arguments)}finally{r=this._events[t],this._events[t]=l(r,n)}}}i(this,"removeListener",s);try{return this._events[t]=l(r,n),e.apply(this,arguments)}finally{o(this,"removeListener"),this._events[t]=r}}})),a(e,"__unwrap",(function(){o(e,"addListener"),o(e,"on"),o(e,"emit"),delete e[s],delete e.__wrapped})),a(e,"__wrapped",!0))}},2840:(e,t,n)=>{var r=n(778),i=function(){},o=function(e,t,n){if("function"==typeof t)return o(e,null,t);t||(t={}),n=r(n||i);var s=e._writableState,a=e._readableState,c=t.readable||!1!==t.readable&&e.readable,u=t.writable||!1!==t.writable&&e.writable,l=!1,p=function(){e.writable||f()},f=function(){u=!1,c||n.call(e)},d=function(){c=!1,u||n.call(e)},h=function(t){n.call(e,t?new Error("exited with error code: "+t):null)},m=function(t){n.call(e,t)},g=function(){process.nextTick(v)},v=function(){if(!l)return(!c||a&&a.ended&&!a.destroyed)&&(!u||s&&s.ended&&!s.destroyed)?void 0:n.call(e,new Error("premature close"))},y=function(){e.req.on("finish",f)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?u&&!s&&(e.on("end",p),e.on("close",p)):(e.on("complete",f),e.on("abort",g),e.req?y():e.on("request",y)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",h),e.on("end",d),e.on("finish",f),!1!==t.error&&e.on("error",m),e.on("close",g),function(){l=!0,e.removeListener("complete",f),e.removeListener("abort",g),e.removeListener("request",y),e.req&&e.req.removeListener("finish",f),e.removeListener("end",p),e.removeListener("close",p),e.removeListener("finish",f),e.removeListener("exit",h),e.removeListener("end",d),e.removeListener("error",m),e.removeListener("close",g)}};e.exports=o},2106:(e,t,n)=>{const r=n(5158)("extract-zip"),{createWriteStream:i,promises:o}=n(5747),s=n(31),a=n(5622),{promisify:c}=n(1669),u=n(2413),l=n(7766),p=c(l.open),f=c(u.pipeline);class d{constructor(e,t){this.zipPath=e,this.opts=t}async extract(){return r("opening",this.zipPath,"with opts",this.opts),this.zipfile=await p(this.zipPath,{lazyEntries:!0}),this.canceled=!1,new Promise(((e,t)=>{this.zipfile.on("error",(e=>{this.canceled=!0,t(e)})),this.zipfile.readEntry(),this.zipfile.on("close",(()=>{this.canceled||(r("zip extraction complete"),e())})),this.zipfile.on("entry",(async e=>{if(this.canceled)return void r("skipping entry",e.fileName,{cancelled:this.canceled});if(r("zipfile entry",e.fileName),e.fileName.startsWith("__MACOSX/"))return void this.zipfile.readEntry();const n=a.dirname(a.join(this.opts.dir,e.fileName));try{await o.mkdir(n,{recursive:!0});const t=await o.realpath(n);if(a.relative(this.opts.dir,t).split(a.sep).includes(".."))throw new Error(`Out of bound path "${t}" found while processing file ${e.fileName}`);await this.extractEntry(e),r("finished processing",e.fileName),this.zipfile.readEntry()}catch(e){this.canceled=!0,this.zipfile.close(),t(e)}}))}))}async extractEntry(e){if(this.canceled)return void r("skipping entry extraction",e.fileName,{cancelled:this.canceled});this.opts.onEntry&&this.opts.onEntry(e,this.zipfile);const t=a.join(this.opts.dir,e.fileName),n=e.externalFileAttributes>>16&65535,u=40960==(61440&n);let l=16384==(61440&n);!l&&e.fileName.endsWith("/")&&(l=!0);const p=e.versionMadeBy>>8;l||(l=0===p&&16===e.externalFileAttributes),r("extracting entry",{filename:e.fileName,isDir:l,isSymlink:u});const d=511&this.getExtractedMode(n,l),h=l?t:a.dirname(t),m={recursive:!0};if(l&&(m.mode=d),r("mkdir",{dir:h,...m}),await o.mkdir(h,m),l)return;r("opening read stream",t);const g=await c(this.zipfile.openReadStream.bind(this.zipfile))(e);if(u){const e=await s(g);r("creating symlink",e,t),await o.symlink(e,t)}else await f(g,i(t,{mode:d}))}getExtractedMode(e,t){let n=e;return 0===n&&(t?(this.opts.defaultDirMode&&(n=parseInt(this.opts.defaultDirMode,10)),n||(n=493)):(this.opts.defaultFileMode&&(n=parseInt(this.opts.defaultFileMode,10)),n||(n=420))),n}}e.exports=async function(e,t){if(r("creating target directory",t.dir),!a.isAbsolute(t.dir))throw new Error("Target directory is expected to be absolute");return await o.mkdir(t.dir,{recursive:!0}),t.dir=await o.realpath(t.dir),new d(e,t).extract()}},8913:(e,t,n)=>{var r=n(5747),i=n(1669),o=n(2413),s=o.Readable,a=o.Writable,c=o.PassThrough,u=n(9916),l=n(8614).EventEmitter;function p(e,t){t=t||{},l.call(this),this.fd=e,this.pend=new u,this.pend.max=1,this.refCount=0,this.autoClose=!!t.autoClose}function f(e,t){t=t||{},s.call(this,t),this.context=e,this.context.ref(),this.start=t.start||0,this.endOffset=t.end,this.pos=this.start,this.destroyed=!1}function d(e,t){t=t||{},a.call(this,t),this.context=e,this.context.ref(),this.start=t.start||0,this.endOffset=null==t.end?1/0:+t.end,this.bytesWritten=0,this.pos=this.start,this.destroyed=!1,this.on("finish",this.destroy.bind(this))}function h(e,t){l.call(this),t=t||{},this.refCount=0,this.buffer=e,this.maxChunkSize=t.maxChunkSize||Number.MAX_SAFE_INTEGER}t.createFromBuffer=function(e,t){return new h(e,t)},t.createFromFd=function(e,t){return new p(e,t)},t.BufferSlicer=h,t.FdSlicer=p,i.inherits(p,l),p.prototype.read=function(e,t,n,i,o){var s=this;s.pend.go((function(a){r.read(s.fd,e,t,n,i,(function(e,t,n){a(),o(e,t,n)}))}))},p.prototype.write=function(e,t,n,i,o){var s=this;s.pend.go((function(a){r.write(s.fd,e,t,n,i,(function(e,t,n){a(),o(e,t,n)}))}))},p.prototype.createReadStream=function(e){return new f(this,e)},p.prototype.createWriteStream=function(e){return new d(this,e)},p.prototype.ref=function(){this.refCount+=1},p.prototype.unref=function(){var e=this;if(e.refCount-=1,!(e.refCount>0)){if(e.refCount<0)throw new Error("invalid unref");e.autoClose&&r.close(e.fd,(function(t){t?e.emit("error",t):e.emit("close")}))}},i.inherits(f,s),f.prototype._read=function(e){var t=this;if(!t.destroyed){var n=Math.min(t._readableState.highWaterMark,e);if(null!=t.endOffset&&(n=Math.min(n,t.endOffset-t.pos)),n<=0)return t.destroyed=!0,t.push(null),void t.context.unref();t.context.pend.go((function(e){if(t.destroyed)return e();var i=new Buffer(n);r.read(t.context.fd,i,0,n,t.pos,(function(n,r){n?t.destroy(n):0===r?(t.destroyed=!0,t.push(null),t.context.unref()):(t.pos+=r,t.push(i.slice(0,r))),e()}))}))}},f.prototype.destroy=function(e){this.destroyed||(e=e||new Error("stream destroyed"),this.destroyed=!0,this.emit("error",e),this.context.unref())},i.inherits(d,a),d.prototype._write=function(e,t,n){var i=this;if(!i.destroyed){if(i.pos+e.length>i.endOffset){var o=new Error("maximum file length exceeded");return o.code="ETOOBIG",i.destroy(),void n(o)}i.context.pend.go((function(t){if(i.destroyed)return t();r.write(i.context.fd,e,0,e.length,i.pos,(function(e,r){e?(i.destroy(),t(),n(e)):(i.bytesWritten+=r,i.pos+=r,i.emit("progress"),t(),n())}))}))}},d.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.context.unref())},i.inherits(h,l),h.prototype.read=function(e,t,n,r,i){var o=r+n,s=o-this.buffer.length,a=s>0?s:n;this.buffer.copy(e,t,r,o),setImmediate((function(){i(null,a)}))},h.prototype.write=function(e,t,n,r,i){e.copy(this.buffer,r,t,t+n),setImmediate((function(){i(null,n,e)}))},h.prototype.createReadStream=function(e){var t=new c(e=e||{});t.destroyed=!1,t.start=e.start||0,t.endOffset=e.end,t.pos=t.endOffset||this.buffer.length;for(var n=this.buffer.slice(t.start,t.pos),r=0;;){var i=r+this.maxChunkSize;if(i>=n.length){r<n.length&&t.write(n.slice(r,n.length));break}t.write(n.slice(r,i)),r=i}return t.end(),t.destroy=function(){t.destroyed=!0},t},h.prototype.createWriteStream=function(e){var t=this,n=new a(e=e||{});return n.start=e.start||0,n.endOffset=null==e.end?this.buffer.length:+e.end,n.bytesWritten=0,n.pos=n.start,n.destroyed=!1,n._write=function(e,r,i){if(!n.destroyed){var o=n.pos+e.length;if(o>n.endOffset){var s=new Error("maximum file length exceeded");return s.code="ETOOBIG",n.destroyed=!0,void i(s)}e.copy(t.buffer,n.pos,0,e.length),n.bytesWritten+=e.length,n.pos=o,n.emit("progress"),i()}},n.destroy=function(){n.destroyed=!0},n},h.prototype.ref=function(){this.refCount+=1},h.prototype.unref=function(){if(this.refCount-=1,this.refCount<0)throw new Error("invalid unref")}},7334:(e,t,n)=>{e.exports=l,l.realpath=l,l.sync=p,l.realpathSync=p,l.monkeypatch=function(){r.realpath=l,r.realpathSync=p},l.unmonkeypatch=function(){r.realpath=i,r.realpathSync=o};var r=n(5747),i=r.realpath,o=r.realpathSync,s=process.version,a=/^v[0-5]\./.test(s),c=n(7059);function u(e){return e&&"realpath"===e.syscall&&("ELOOP"===e.code||"ENOMEM"===e.code||"ENAMETOOLONG"===e.code)}function l(e,t,n){if(a)return i(e,t,n);"function"==typeof t&&(n=t,t=null),i(e,t,(function(r,i){u(r)?c.realpath(e,t,n):n(r,i)}))}function p(e,t){if(a)return o(e,t);try{return o(e,t)}catch(n){if(u(n))return c.realpathSync(e,t);throw n}}},7059:(e,t,n)=>{var r=n(5622),i="win32"===process.platform,o=n(5747),s=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function a(e){return"function"==typeof e?e:function(){var e;if(s){var t=new Error;e=function(e){e&&(t.message=e.message,n(e=t))}}else e=n;return e;function n(e){if(e){if(process.throwDeprecation)throw e;if(!process.noDeprecation){var t="fs: missing callback "+(e.stack||e.message);process.traceDeprecation?console.trace(t):console.error(t)}}}}()}r.normalize;if(i)var c=/(.*?)(?:[\/\\]+|$)/g;else c=/(.*?)(?:[\/]+|$)/g;if(i)var u=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;else u=/^[\/]*/;t.realpathSync=function(e,t){if(e=r.resolve(e),t&&Object.prototype.hasOwnProperty.call(t,e))return t[e];var n,s,a,l,p=e,f={},d={};function h(){var t=u.exec(e);n=t[0].length,s=t[0],a=t[0],l="",i&&!d[a]&&(o.lstatSync(a),d[a]=!0)}for(h();n<e.length;){c.lastIndex=n;var m=c.exec(e);if(l=s,s+=m[0],a=l+m[1],n=c.lastIndex,!(d[a]||t&&t[a]===a)){var g;if(t&&Object.prototype.hasOwnProperty.call(t,a))g=t[a];else{var v=o.lstatSync(a);if(!v.isSymbolicLink()){d[a]=!0,t&&(t[a]=a);continue}var y=null;if(!i){var _=v.dev.toString(32)+":"+v.ino.toString(32);f.hasOwnProperty(_)&&(y=f[_])}null===y&&(o.statSync(a),y=o.readlinkSync(a)),g=r.resolve(l,y),t&&(t[a]=g),i||(f[_]=y)}e=r.resolve(g,e.slice(n)),h()}}return t&&(t[p]=e),e},t.realpath=function(e,t,n){if("function"!=typeof n&&(n=a(t),t=null),e=r.resolve(e),t&&Object.prototype.hasOwnProperty.call(t,e))return process.nextTick(n.bind(null,null,t[e]));var s,l,p,f,d=e,h={},m={};function g(){var t=u.exec(e);s=t[0].length,l=t[0],p=t[0],f="",i&&!m[p]?o.lstat(p,(function(e){if(e)return n(e);m[p]=!0,v()})):process.nextTick(v)}function v(){if(s>=e.length)return t&&(t[d]=e),n(null,e);c.lastIndex=s;var r=c.exec(e);return f=l,l+=r[0],p=f+r[1],s=c.lastIndex,m[p]||t&&t[p]===p?process.nextTick(v):t&&Object.prototype.hasOwnProperty.call(t,p)?E(t[p]):o.lstat(p,y)}function y(e,r){if(e)return n(e);if(!r.isSymbolicLink())return m[p]=!0,t&&(t[p]=p),process.nextTick(v);if(!i){var s=r.dev.toString(32)+":"+r.ino.toString(32);if(h.hasOwnProperty(s))return _(null,h[s],p)}o.stat(p,(function(e){if(e)return n(e);o.readlink(p,(function(e,t){i||(h[s]=t),_(e,t)}))}))}function _(e,i,o){if(e)return n(e);var s=r.resolve(f,i);t&&(t[o]=s),E(s)}function E(t){e=r.resolve(t,e.slice(s)),g()}g()}},5105:(e,t,n)=>{"use strict";const{PassThrough:r}=n(2413);e.exports=e=>{e={...e};const{array:t}=e;let{encoding:n}=e;const i="buffer"===n;let o=!1;t?o=!(n||i):n=n||"utf8",i&&(n=null);const s=new r({objectMode:o});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",(e=>{c.push(e),o?a=c.length:a+=e.length})),s.getBufferedValue=()=>t?c:i?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s}},31:(e,t,n)=>{"use strict";const{constants:r}=n(4293),i=n(4286),o=n(5105);class s extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function a(e,t){if(!e)return Promise.reject(new Error("Expected a stream"));t={maxBuffer:1/0,...t};const{maxBuffer:n}=t;let a;return await new Promise(((c,u)=>{const l=e=>{e&&a.getBufferedLength()<=r.MAX_LENGTH&&(e.bufferedData=a.getBufferedValue()),u(e)};a=i(e,o(t),(e=>{e?l(e):c()})),a.on("data",(()=>{a.getBufferedLength()>n&&l(new s)}))})),a.getBufferedValue()}e.exports=a,e.exports.default=a,e.exports.buffer=(e,t)=>a(e,{...t,encoding:"buffer"}),e.exports.array=(e,t)=>a(e,{...t,array:!0}),e.exports.MaxBufferError=s},6772:(e,t,n)=>{function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.alphasort=u,t.alphasorti=c,t.setopts=function(e,t,n){n||(n={});if(n.matchBase&&-1===t.indexOf("/")){if(n.noglobstar)throw new Error("base matching requires globstar");t="**/"+t}e.silent=!!n.silent,e.pattern=t,e.strict=!1!==n.strict,e.realpath=!!n.realpath,e.realpathCache=n.realpathCache||Object.create(null),e.follow=!!n.follow,e.dot=!!n.dot,e.mark=!!n.mark,e.nodir=!!n.nodir,e.nodir&&(e.mark=!0);e.sync=!!n.sync,e.nounique=!!n.nounique,e.nonull=!!n.nonull,e.nosort=!!n.nosort,e.nocase=!!n.nocase,e.stat=!!n.stat,e.noprocess=!!n.noprocess,e.absolute=!!n.absolute,e.maxLength=n.maxLength||1/0,e.cache=n.cache||Object.create(null),e.statCache=n.statCache||Object.create(null),e.symlinks=n.symlinks||Object.create(null),function(e,t){e.ignore=t.ignore||[],Array.isArray(e.ignore)||(e.ignore=[e.ignore]);e.ignore.length&&(e.ignore=e.ignore.map(l))}(e,n),e.changedCwd=!1;var o=process.cwd();r(n,"cwd")?(e.cwd=i.resolve(n.cwd),e.changedCwd=e.cwd!==o):e.cwd=o;e.root=n.root||i.resolve(e.cwd,"/"),e.root=i.resolve(e.root),"win32"===process.platform&&(e.root=e.root.replace(/\\/g,"/"));e.cwdAbs=s(e.cwd)?e.cwd:p(e,e.cwd),"win32"===process.platform&&(e.cwdAbs=e.cwdAbs.replace(/\\/g,"/"));e.nomount=!!n.nomount,n.nonegate=!0,n.nocomment=!0,e.minimatch=new a(t,n),e.options=e.minimatch.options},t.ownProp=r,t.makeAbs=p,t.finish=function(e){for(var t=e.nounique,n=t?[]:Object.create(null),r=0,i=e.matches.length;r<i;r++){var o=e.matches[r];if(o&&0!==Object.keys(o).length){var s=Object.keys(o);t?n.push.apply(n,s):s.forEach((function(e){n[e]=!0}))}else if(e.nonull){var a=e.minimatch.globSet[r];t?n.push(a):n[a]=!0}}t||(n=Object.keys(n));e.nosort||(n=n.sort(e.nocase?c:u));if(e.mark){for(r=0;r<n.length;r++)n[r]=e._mark(n[r]);e.nodir&&(n=n.filter((function(t){var n=!/\/$/.test(t),r=e.cache[t]||e.cache[p(e,t)];return n&&r&&(n="DIR"!==r&&!Array.isArray(r)),n})))}e.ignore.length&&(n=n.filter((function(t){return!f(e,t)})));e.found=n},t.mark=function(e,t){var n=p(e,t),r=e.cache[n],i=t;if(r){var o="DIR"===r||Array.isArray(r),s="/"===t.slice(-1);if(o&&!s?i+="/":!o&&s&&(i=i.slice(0,-1)),i!==t){var a=p(e,i);e.statCache[a]=e.statCache[n],e.cache[a]=e.cache[n]}}return i},t.isIgnored=f,t.childrenIgnored=function(e,t){return!!e.ignore.length&&e.ignore.some((function(e){return!(!e.gmatcher||!e.gmatcher.match(t))}))};var i=n(5622),o=n(1171),s=n(4095),a=o.Minimatch;function c(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}function u(e,t){return e.localeCompare(t)}function l(e){var t=null;if("/**"===e.slice(-3)){var n=e.replace(/(\/\*\*)+$/,"");t=new a(n,{dot:!0})}return{matcher:new a(e,{dot:!0}),gmatcher:t}}function p(e,t){var n=t;return n="/"===t.charAt(0)?i.join(e.root,t):s(t)||""===t?t:e.changedCwd?i.resolve(e.cwd,t):i.resolve(t),"win32"===process.platform&&(n=n.replace(/\\/g,"/")),n}function f(e,t){return!!e.ignore.length&&e.ignore.some((function(e){return e.matcher.match(t)||!(!e.gmatcher||!e.gmatcher.match(t))}))}},2884:(e,t,n)=>{e.exports=_;var r=n(5747),i=n(7334),o=n(1171),s=(o.Minimatch,n(4378)),a=n(8614).EventEmitter,c=n(5622),u=n(2357),l=n(4095),p=n(4751),f=n(6772),d=(f.alphasort,f.alphasorti,f.setopts),h=f.ownProp,m=n(7844),g=(n(1669),f.childrenIgnored),v=f.isIgnored,y=n(778);function _(e,t,n){if("function"==typeof t&&(n=t,t={}),t||(t={}),t.sync){if(n)throw new TypeError("callback provided to sync glob");return p(e,t)}return new b(e,t,n)}_.sync=p;var E=_.GlobSync=p.GlobSync;function b(e,t,n){if("function"==typeof t&&(n=t,t=null),t&&t.sync){if(n)throw new TypeError("callback provided to sync glob");return new E(e,t)}if(!(this instanceof b))return new b(e,t,n);d(this,e,t),this._didRealPath=!1;var r=this.minimatch.set.length;this.matches=new Array(r),"function"==typeof n&&(n=y(n),this.on("error",n),this.on("end",(function(e){n(null,e)})));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(0===r)return s();for(var o=0;o<r;o++)this._process(this.minimatch.set[o],o,!1,s);function s(){--i._processing,i._processing<=0&&i._finish()}}_.glob=_,_.hasMagic=function(e,t){var n=function(e,t){if(null===t||"object"!=typeof t)return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}({},t);n.noprocess=!0;var r=new b(e,n).minimatch.set;if(!e)return!1;if(r.length>1)return!0;for(var i=0;i<r[0].length;i++)if("string"!=typeof r[0][i])return!0;return!1},_.Glob=b,s(b,a),b.prototype._finish=function(){if(u(this instanceof b),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();f.finish(this),this.emit("end",this.found)}},b.prototype._realpath=function(){if(!this._didRealpath){this._didRealpath=!0;var e=this.matches.length;if(0===e)return this._finish();for(var t=this,n=0;n<this.matches.length;n++)this._realpathSet(n,r)}function r(){0==--e&&t._finish()}},b.prototype._realpathSet=function(e,t){var n=this.matches[e];if(!n)return t();var r=Object.keys(n),o=this,s=r.length;if(0===s)return t();var a=this.matches[e]=Object.create(null);r.forEach((function(n,r){n=o._makeAbs(n),i.realpath(n,o.realpathCache,(function(r,i){r?"stat"===r.syscall?a[n]=!0:o.emit("error",r):a[i]=!0,0==--s&&(o.matches[e]=a,t())}))}))},b.prototype._mark=function(e){return f.mark(this,e)},b.prototype._makeAbs=function(e){return f.makeAbs(this,e)},b.prototype.abort=function(){this.aborted=!0,this.emit("abort")},b.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))},b.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var e=this._emitQueue.slice(0);this._emitQueue.length=0;for(var t=0;t<e.length;t++){var n=e[t];this._emitMatch(n[0],n[1])}}if(this._processQueue.length){var r=this._processQueue.slice(0);this._processQueue.length=0;for(t=0;t<r.length;t++){var i=r[t];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}},b.prototype._process=function(e,t,n,r){if(u(this instanceof b),u("function"==typeof r),!this.aborted)if(this._processing++,this.paused)this._processQueue.push([e,t,n,r]);else{for(var i,s=0;"string"==typeof e[s];)s++;switch(s){case e.length:return void this._processSimple(e.join("/"),t,r);case 0:i=null;break;default:i=e.slice(0,s).join("/")}var a,c=e.slice(s);null===i?a=".":l(i)||l(e.join("/"))?(i&&l(i)||(i="/"+i),a=i):a=i;var p=this._makeAbs(a);if(g(this,a))return r();c[0]===o.GLOBSTAR?this._processGlobStar(i,a,p,c,t,n,r):this._processReaddir(i,a,p,c,t,n,r)}},b.prototype._processReaddir=function(e,t,n,r,i,o,s){var a=this;this._readdir(n,o,(function(c,u){return a._processReaddir2(e,t,n,r,i,o,u,s)}))},b.prototype._processReaddir2=function(e,t,n,r,i,o,s,a){if(!s)return a();for(var u=r[0],l=!!this.minimatch.negate,p=u._glob,f=this.dot||"."===p.charAt(0),d=[],h=0;h<s.length;h++){if("."!==(g=s[h]).charAt(0)||f)(l&&!e?!g.match(u):g.match(u))&&d.push(g)}var m=d.length;if(0===m)return a();if(1===r.length&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(h=0;h<m;h++){var g=d[h];e&&(g="/"!==e?e+"/"+g:e+g),"/"!==g.charAt(0)||this.nomount||(g=c.join(this.root,g)),this._emitMatch(i,g)}return a()}r.shift();for(h=0;h<m;h++){g=d[h];e&&(g="/"!==e?e+"/"+g:e+g),this._process([g].concat(r),i,o,a)}a()},b.prototype._emitMatch=function(e,t){if(!this.aborted&&!v(this,t))if(this.paused)this._emitQueue.push([e,t]);else{var n=l(t)?t:this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=n),!this.matches[e][t]){if(this.nodir){var r=this.cache[n];if("DIR"===r||Array.isArray(r))return}this.matches[e][t]=!0;var i=this.statCache[n];i&&this.emit("stat",t,i),this.emit("match",t)}}},b.prototype._readdirInGlobStar=function(e,t){if(!this.aborted){if(this.follow)return this._readdir(e,!1,t);var n=this,i=m("lstat\0"+e,(function(r,i){if(r&&"ENOENT"===r.code)return t();var o=i&&i.isSymbolicLink();n.symlinks[e]=o,o||!i||i.isDirectory()?n._readdir(e,!1,t):(n.cache[e]="FILE",t())}));i&&r.lstat(e,i)}},b.prototype._readdir=function(e,t,n){if(!this.aborted&&(n=m("readdir\0"+e+"\0"+t,n))){if(t&&!h(this.symlinks,e))return this._readdirInGlobStar(e,n);if(h(this.cache,e)){var i=this.cache[e];if(!i||"FILE"===i)return n();if(Array.isArray(i))return n(null,i)}r.readdir(e,function(e,t,n){return function(r,i){r?e._readdirError(t,r,n):e._readdirEntries(t,i,n)}}(this,e,n))}},b.prototype._readdirEntries=function(e,t,n){if(!this.aborted){if(!this.mark&&!this.stat)for(var r=0;r<t.length;r++){var i=t[r];i="/"===e?e+i:e+"/"+i,this.cache[i]=!0}return this.cache[e]=t,n(null,t)}},b.prototype._readdirError=function(e,t,n){if(!this.aborted){switch(t.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(e);if(this.cache[r]="FILE",r===this.cwdAbs){var i=new Error(t.code+" invalid cwd "+this.cwd);i.path=this.cwd,i.code=t.code,this.emit("error",i),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:this.cache[this._makeAbs(e)]=!1,this.strict&&(this.emit("error",t),this.abort()),this.silent||console.error("glob error",t)}return n()}},b.prototype._processGlobStar=function(e,t,n,r,i,o,s){var a=this;this._readdir(n,o,(function(c,u){a._processGlobStar2(e,t,n,r,i,o,u,s)}))},b.prototype._processGlobStar2=function(e,t,n,r,i,o,s,a){if(!s)return a();var c=r.slice(1),u=e?[e]:[],l=u.concat(c);this._process(l,i,!1,a);var p=this.symlinks[n],f=s.length;if(p&&o)return a();for(var d=0;d<f;d++){if("."!==s[d].charAt(0)||this.dot){var h=u.concat(s[d],c);this._process(h,i,!0,a);var m=u.concat(s[d],r);this._process(m,i,!0,a)}}a()},b.prototype._processSimple=function(e,t,n){var r=this;this._stat(e,(function(i,o){r._processSimple2(e,t,i,o,n)}))},b.prototype._processSimple2=function(e,t,n,r,i){if(this.matches[t]||(this.matches[t]=Object.create(null)),!r)return i();if(e&&l(e)&&!this.nomount){var o=/[\/\\]$/.test(e);"/"===e.charAt(0)?e=c.join(this.root,e):(e=c.resolve(this.root,e),o&&(e+="/"))}"win32"===process.platform&&(e=e.replace(/\\/g,"/")),this._emitMatch(t,e),i()},b.prototype._stat=function(e,t){var n=this._makeAbs(e),i="/"===e.slice(-1);if(e.length>this.maxLength)return t();if(!this.stat&&h(this.cache,n)){var o=this.cache[n];if(Array.isArray(o)&&(o="DIR"),!i||"DIR"===o)return t(null,o);if(i&&"FILE"===o)return t()}var s=this.statCache[n];if(void 0!==s){if(!1===s)return t(null,s);var a=s.isDirectory()?"DIR":"FILE";return i&&"FILE"===a?t():t(null,a,s)}var c=this,u=m("stat\0"+n,(function(i,o){if(o&&o.isSymbolicLink())return r.stat(n,(function(r,i){r?c._stat2(e,n,null,o,t):c._stat2(e,n,r,i,t)}));c._stat2(e,n,i,o,t)}));u&&r.lstat(n,u)},b.prototype._stat2=function(e,t,n,r,i){if(n&&("ENOENT"===n.code||"ENOTDIR"===n.code))return this.statCache[t]=!1,i();var o="/"===e.slice(-1);if(this.statCache[t]=r,"/"===t.slice(-1)&&r&&!r.isDirectory())return i(null,!1,r);var s=!0;return r&&(s=r.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||s,o&&"FILE"===s?i():i(null,s,r)}},4751:(e,t,n)=>{e.exports=h,h.GlobSync=m;var r=n(5747),i=n(7334),o=n(1171),s=(o.Minimatch,n(2884).Glob,n(1669),n(5622)),a=n(2357),c=n(4095),u=n(6772),l=(u.alphasort,u.alphasorti,u.setopts),p=u.ownProp,f=u.childrenIgnored,d=u.isIgnored;function h(e,t){if("function"==typeof t||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new m(e,t).found}function m(e,t){if(!e)throw new Error("must provide pattern");if("function"==typeof t||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof m))return new m(e,t);if(l(this,e,t),this.noprocess)return this;var n=this.minimatch.set.length;this.matches=new Array(n);for(var r=0;r<n;r++)this._process(this.minimatch.set[r],r,!1);this._finish()}m.prototype._finish=function(){if(a(this instanceof m),this.realpath){var e=this;this.matches.forEach((function(t,n){var r=e.matches[n]=Object.create(null);for(var o in t)try{o=e._makeAbs(o),r[i.realpathSync(o,e.realpathCache)]=!0}catch(t){if("stat"!==t.syscall)throw t;r[e._makeAbs(o)]=!0}}))}u.finish(this)},m.prototype._process=function(e,t,n){a(this instanceof m);for(var r,i=0;"string"==typeof e[i];)i++;switch(i){case e.length:return void this._processSimple(e.join("/"),t);case 0:r=null;break;default:r=e.slice(0,i).join("/")}var s,u=e.slice(i);null===r?s=".":c(r)||c(e.join("/"))?(r&&c(r)||(r="/"+r),s=r):s=r;var l=this._makeAbs(s);f(this,s)||(u[0]===o.GLOBSTAR?this._processGlobStar(r,s,l,u,t,n):this._processReaddir(r,s,l,u,t,n))},m.prototype._processReaddir=function(e,t,n,r,i,o){var a=this._readdir(n,o);if(a){for(var c=r[0],u=!!this.minimatch.negate,l=c._glob,p=this.dot||"."===l.charAt(0),f=[],d=0;d<a.length;d++){if("."!==(g=a[d]).charAt(0)||p)(u&&!e?!g.match(c):g.match(c))&&f.push(g)}var h=f.length;if(0!==h)if(1!==r.length||this.mark||this.stat){r.shift();for(d=0;d<h;d++){var m;g=f[d];m=e?[e,g]:[g],this._process(m.concat(r),i,o)}}else{this.matches[i]||(this.matches[i]=Object.create(null));for(var d=0;d<h;d++){var g=f[d];e&&(g="/"!==e.slice(-1)?e+"/"+g:e+g),"/"!==g.charAt(0)||this.nomount||(g=s.join(this.root,g)),this._emitMatch(i,g)}}}},m.prototype._emitMatch=function(e,t){if(!d(this,t)){var n=this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=n),!this.matches[e][t]){if(this.nodir){var r=this.cache[n];if("DIR"===r||Array.isArray(r))return}this.matches[e][t]=!0,this.stat&&this._stat(t)}}},m.prototype._readdirInGlobStar=function(e){if(this.follow)return this._readdir(e,!1);var t,n;try{n=r.lstatSync(e)}catch(e){if("ENOENT"===e.code)return null}var i=n&&n.isSymbolicLink();return this.symlinks[e]=i,i||!n||n.isDirectory()?t=this._readdir(e,!1):this.cache[e]="FILE",t},m.prototype._readdir=function(e,t){if(t&&!p(this.symlinks,e))return this._readdirInGlobStar(e);if(p(this.cache,e)){var n=this.cache[e];if(!n||"FILE"===n)return null;if(Array.isArray(n))return n}try{return this._readdirEntries(e,r.readdirSync(e))}catch(t){return this._readdirError(e,t),null}},m.prototype._readdirEntries=function(e,t){if(!this.mark&&!this.stat)for(var n=0;n<t.length;n++){var r=t[n];r="/"===e?e+r:e+"/"+r,this.cache[r]=!0}return this.cache[e]=t,t},m.prototype._readdirError=function(e,t){switch(t.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(e);if(this.cache[n]="FILE",n===this.cwdAbs){var r=new Error(t.code+" invalid cwd "+this.cwd);throw r.path=this.cwd,r.code=t.code,r}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:if(this.cache[this._makeAbs(e)]=!1,this.strict)throw t;this.silent||console.error("glob error",t)}},m.prototype._processGlobStar=function(e,t,n,r,i,o){var s=this._readdir(n,o);if(s){var a=r.slice(1),c=e?[e]:[],u=c.concat(a);this._process(u,i,!1);var l=s.length;if(!this.symlinks[n]||!o)for(var p=0;p<l;p++){if("."!==s[p].charAt(0)||this.dot){var f=c.concat(s[p],a);this._process(f,i,!0);var d=c.concat(s[p],r);this._process(d,i,!0)}}}},m.prototype._processSimple=function(e,t){var n=this._stat(e);if(this.matches[t]||(this.matches[t]=Object.create(null)),n){if(e&&c(e)&&!this.nomount){var r=/[\/\\]$/.test(e);"/"===e.charAt(0)?e=s.join(this.root,e):(e=s.resolve(this.root,e),r&&(e+="/"))}"win32"===process.platform&&(e=e.replace(/\\/g,"/")),this._emitMatch(t,e)}},m.prototype._stat=function(e){var t=this._makeAbs(e),n="/"===e.slice(-1);if(e.length>this.maxLength)return!1;if(!this.stat&&p(this.cache,t)){var i=this.cache[t];if(Array.isArray(i)&&(i="DIR"),!n||"DIR"===i)return i;if(n&&"FILE"===i)return!1}var o=this.statCache[t];if(!o){var s;try{s=r.lstatSync(t)}catch(e){if(e&&("ENOENT"===e.code||"ENOTDIR"===e.code))return this.statCache[t]=!1,!1}if(s&&s.isSymbolicLink())try{o=r.statSync(t)}catch(e){o=s}else o=s}this.statCache[t]=o;i=!0;return o&&(i=o.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||i,(!n||"FILE"!==i)&&i},m.prototype._mark=function(e){return u.mark(this,e)},m.prototype._makeAbs=function(e){return u.makeAbs(this,e)}},6560:e=>{"use strict";e.exports=(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)}},9146:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=i(n(1631)),s=i(n(4016)),a=i(n(8835)),c=i(n(2357)),u=i(n(5158)),l=n(8054),p=i(n(9829)),f=u.default("https-proxy-agent:agent");class d extends l.Agent{constructor(e){let t;if(t="string"==typeof e?a.default.parse(e):e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");f("creating new HttpsProxyAgent instance: %o",t),super(t);const n=Object.assign({},t);var r;this.secureProxy=t.secureProxy||"string"==typeof(r=n.protocol)&&/^https:?$/i.test(r),n.host=n.hostname||n.host,"string"==typeof n.port&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in n)&&(n.ALPNProtocols=["http 1.1"]),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(e,t){return r(this,void 0,void 0,(function*(){const{proxy:n,secureProxy:r}=this;let i;r?(f("Creating `tls.Socket`: %o",n),i=s.default.connect(n)):(f("Creating `net.Socket`: %o",n),i=o.default.connect(n));const a=Object.assign({},n.headers);let u=`CONNECT ${`${t.host}:${t.port}`} HTTP/1.1\r\n`;n.auth&&(a["Proxy-Authorization"]=`Basic ${Buffer.from(n.auth).toString("base64")}`);let{host:l,port:d,secureEndpoint:m}=t;(function(e,t){return Boolean(!t&&80===e||t&&443===e)})(d,m)||(l+=`:${d}`),a.Host=l,a.Connection="close";for(const e of Object.keys(a))u+=`${e}: ${a[e]}\r\n`;const g=p.default(i);i.write(`${u}\r\n`);const{statusCode:v,buffered:y}=yield g;if(200===v){if(e.once("socket",h),t.secureEndpoint){const e=t.servername||t.host;if(!e)throw new Error('Could not determine "servername"');return f("Upgrading socket connection to TLS"),s.default.connect(Object.assign(Object.assign({},function(e,...t){const n={};let r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}(t,"host","hostname","path","port")),{socket:i,servername:e}))}return i}i.destroy();const _=new o.default.Socket;return _.readable=!0,e.once("socket",(e=>{f("replaying proxy buffer for failed request"),c.default(e.listenerCount("data")>0),e.push(y),e.push(null)})),_}))}}function h(e){e.resume()}t.default=d},9829:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(5158)).default("https-proxy-agent:parse-proxy-response");t.default=function(e){return new Promise(((t,n)=>{let r=0;const o=[];function s(){const n=e.read();n?function(e){o.push(e),r+=e.length;const n=Buffer.concat(o,r);if(-1===n.indexOf("\r\n\r\n"))return i("have not received end of HTTP headers yet..."),void s();const a=n.toString("ascii",0,n.indexOf("\r\n")),c=+a.split(" ")[1];i("got proxy server response: %o",a),t({statusCode:c,buffered:n})}(n):e.once("readable",s)}function a(e){i("onclose had error %o",e)}function c(){i("onend")}function u(t){e.removeListener("end",c),e.removeListener("error",u),e.removeListener("close",a),e.removeListener("readable",s),i("onerror %o",t),n(t)}e.on("error",u),e.on("close",a),e.on("end",c),s()}))}},7844:(e,t,n)=>{var r=n(2479),i=Object.create(null),o=n(778);function s(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r]=e[r];return n}e.exports=r((function(e,t){return i[e]?(i[e].push(t),null):(i[e]=[t],function(e){return o((function t(){var n=i[e],r=n.length,o=s(arguments);try{for(var a=0;a<r;a++)n[a].apply(null,o)}finally{n.length>r?(n.splice(0,r),process.nextTick((function(){t.apply(null,o)}))):delete i[e]}}))}(e))}))},4378:(e,t,n)=>{try{var r=n(1669);if("function"!=typeof r.inherits)throw"";e.exports=r.inherits}catch(t){e.exports=n(5717)}},5717:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},6486:function(e,t,n){var r;
/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/e=n.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",c=16,u=32,l=64,p=128,f=256,d=1/0,h=9007199254740991,m=NaN,g=4294967295,v=[["ary",p],["bind",1],["bindKey",2],["curry",8],["curryRight",c],["flip",512],["partial",u],["partialRight",l],["rearg",f]],y="[object Arguments]",_="[object Array]",E="[object Boolean]",b="[object Date]",w="[object Error]",S="[object Function]",I="[object GeneratorFunction]",C="[object Map]",x="[object Number]",O="[object Object]",T="[object Promise]",A="[object RegExp]",N="[object Set]",P="[object String]",L="[object Symbol]",R="[object WeakMap]",k="[object ArrayBuffer]",D="[object DataView]",M="[object Float32Array]",V="[object Float64Array]",F="[object Int8Array]",j="[object Int16Array]",B="[object Int32Array]",U="[object Uint8Array]",$="[object Uint8ClampedArray]",H="[object Uint16Array]",q="[object Uint32Array]",G=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,X=/[&<>"']/g,K=RegExp(Y.source),Q=RegExp(X.source),J=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ie.source),se=/^\s+/,ae=/\s/,ce=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ue=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,pe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,ve=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,_e=/^0o[0-7]+$/i,Ee=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,Se=/['\n\r\u2028\u2029\\]/g,Ie="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="\\u2700-\\u27bf",xe="a-z\\xdf-\\xf6\\xf8-\\xff",Oe="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",Ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ne="[']",Pe="[\\ud800-\\udfff]",Le="["+Ae+"]",Re="["+Ie+"]",ke="\\d+",De="[\\u2700-\\u27bf]",Me="["+xe+"]",Ve="[^\\ud800-\\udfff"+Ae+ke+Ce+xe+Oe+"]",Fe="\\ud83c[\\udffb-\\udfff]",je="[^\\ud800-\\udfff]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",Ue="[\\ud800-\\udbff][\\udc00-\\udfff]",$e="["+Oe+"]",He="(?:"+Me+"|"+Ve+")",qe="(?:"+$e+"|"+Ve+")",Ge="(?:['](?:d|ll|m|re|s|t|ve))?",ze="(?:['](?:D|LL|M|RE|S|T|VE))?",We="(?:"+Re+"|"+Fe+")"+"?",Ye="[\\ufe0e\\ufe0f]?",Xe=Ye+We+("(?:\\u200d(?:"+[je,Be,Ue].join("|")+")"+Ye+We+")*"),Ke="(?:"+[De,Be,Ue].join("|")+")"+Xe,Qe="(?:"+[je+Re+"?",Re,Be,Ue,Pe].join("|")+")",Je=RegExp(Ne,"g"),Ze=RegExp(Re,"g"),et=RegExp(Fe+"(?="+Fe+")|"+Qe+Xe,"g"),tt=RegExp([$e+"?"+Me+"+"+Ge+"(?="+[Le,$e,"$"].join("|")+")",qe+"+"+ze+"(?="+[Le,$e+He,"$"].join("|")+")",$e+"?"+He+"+"+Ge,$e+"+"+ze,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ke,Ke].join("|"),"g"),nt=RegExp("[\\u200d\\ud800-\\udfff"+Ie+Te+"]"),rt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ot=-1,st={};st[M]=st[V]=st[F]=st[j]=st[B]=st[U]=st[$]=st[H]=st[q]=!0,st[y]=st[_]=st[k]=st[E]=st[D]=st[b]=st[w]=st[S]=st[C]=st[x]=st[O]=st[A]=st[N]=st[P]=st[R]=!1;var at={};at[y]=at[_]=at[k]=at[D]=at[E]=at[b]=at[M]=at[V]=at[F]=at[j]=at[B]=at[C]=at[x]=at[O]=at[A]=at[N]=at[P]=at[L]=at[U]=at[$]=at[H]=at[q]=!0,at[w]=at[S]=at[R]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,lt=parseInt,pt="object"==typeof global&&global&&global.Object===Object&&global,ft="object"==typeof self&&self&&self.Object===Object&&self,dt=pt||ft||Function("return this")(),ht=t&&!t.nodeType&&t,mt=ht&&e&&!e.nodeType&&e,gt=mt&&mt.exports===ht,vt=gt&&pt.process,yt=function(){try{var e=mt&&mt.require&&mt.require("util").types;return e||vt&&vt.binding&&vt.binding("util")}catch(e){}}(),_t=yt&&yt.isArrayBuffer,Et=yt&&yt.isDate,bt=yt&&yt.isMap,wt=yt&&yt.isRegExp,St=yt&&yt.isSet,It=yt&&yt.isTypedArray;function Ct(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function xt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function Ot(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function At(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Nt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function Pt(e,t){return!!(null==e?0:e.length)&&Ut(e,t,0)>-1}function Lt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Rt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function kt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Dt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Mt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Vt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Ft=Gt("length");function jt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Bt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Ut(e,t,n){return t==t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Bt(e,Ht,n)}function $t(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Ht(e){return e!=e}function qt(e,t){var n=null==e?0:e.length;return n?Yt(e,t)/n:m}function Gt(e){return function(t){return null==t?i:t[e]}}function zt(e){return function(t){return null==e?i:e[t]}}function Wt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Yt(e,t){for(var n,r=-1,o=e.length;++r<o;){var s=t(e[r]);s!==i&&(n=n===i?s:n+s)}return n}function Xt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Kt(e){return e?e.slice(0,mn(e)+1).replace(se,""):e}function Qt(e){return function(t){return e(t)}}function Jt(e,t){return Rt(t,(function(t){return e[t]}))}function Zt(e,t){return e.has(t)}function en(e,t){for(var n=-1,r=e.length;++n<r&&Ut(t,e[n],0)>-1;);return n}function tn(e,t){for(var n=e.length;n--&&Ut(t,e[n],0)>-1;);return n}function nn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var rn=zt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),on=zt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function sn(e){return"\\"+ct[e]}function an(e){return nt.test(e)}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function un(e,t){return function(n){return e(t(n))}}function ln(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];s!==t&&s!==a||(e[n]=a,o[i++]=n)}return o}function pn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function fn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function dn(e){return an(e)?function(e){var t=et.lastIndex=0;for(;et.test(e);)++t;return t}(e):Ft(e)}function hn(e){return an(e)?function(e){return e.match(et)||[]}(e):function(e){return e.split("")}(e)}function mn(e){for(var t=e.length;t--&&ae.test(e.charAt(t)););return t}var gn=zt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var vn=function e(t){var n,r=(t=null==t?dt:vn.defaults(dt.Object(),t,vn.pick(dt,it))).Array,ae=t.Date,Ie=t.Error,Ce=t.Function,xe=t.Math,Oe=t.Object,Te=t.RegExp,Ae=t.String,Ne=t.TypeError,Pe=r.prototype,Le=Ce.prototype,Re=Oe.prototype,ke=t["__core-js_shared__"],De=Le.toString,Me=Re.hasOwnProperty,Ve=0,Fe=(n=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",je=Re.toString,Be=De.call(Oe),Ue=dt._,$e=Te("^"+De.call(Me).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=gt?t.Buffer:i,qe=t.Symbol,Ge=t.Uint8Array,ze=He?He.allocUnsafe:i,We=un(Oe.getPrototypeOf,Oe),Ye=Oe.create,Xe=Re.propertyIsEnumerable,Ke=Pe.splice,Qe=qe?qe.isConcatSpreadable:i,et=qe?qe.iterator:i,nt=qe?qe.toStringTag:i,ct=function(){try{var e=ho(Oe,"defineProperty");return e({},"",{}),e}catch(e){}}(),pt=t.clearTimeout!==dt.clearTimeout&&t.clearTimeout,ft=ae&&ae.now!==dt.Date.now&&ae.now,ht=t.setTimeout!==dt.setTimeout&&t.setTimeout,mt=xe.ceil,vt=xe.floor,yt=Oe.getOwnPropertySymbols,Ft=He?He.isBuffer:i,zt=t.isFinite,yn=Pe.join,_n=un(Oe.keys,Oe),En=xe.max,bn=xe.min,wn=ae.now,Sn=t.parseInt,In=xe.random,Cn=Pe.reverse,xn=ho(t,"DataView"),On=ho(t,"Map"),Tn=ho(t,"Promise"),An=ho(t,"Set"),Nn=ho(t,"WeakMap"),Pn=ho(Oe,"create"),Ln=Nn&&new Nn,Rn={},kn=Uo(xn),Dn=Uo(On),Mn=Uo(Tn),Vn=Uo(An),Fn=Uo(Nn),jn=qe?qe.prototype:i,Bn=jn?jn.valueOf:i,Un=jn?jn.toString:i;function $n(e){if(ia(e)&&!Ws(e)&&!(e instanceof zn)){if(e instanceof Gn)return e;if(Me.call(e,"__wrapped__"))return $o(e)}return new Gn(e)}var Hn=function(){function e(){}return function(t){if(!ra(t))return{};if(Ye)return Ye(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function qn(){}function Gn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function zn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Xn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Xn;++t<n;)this.add(e[t])}function Qn(e){var t=this.__data__=new Yn(e);this.size=t.size}function Jn(e,t){var n=Ws(e),r=!n&&zs(e),i=!n&&!r&&Qs(e),o=!n&&!r&&!i&&fa(e),s=n||r||i||o,a=s?Xt(e.length,Ae):[],c=a.length;for(var u in e)!t&&!Me.call(e,u)||s&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||bo(u,c))||a.push(u);return a}function Zn(e){var t=e.length;return t?e[Kr(0,t-1)]:i}function er(e,t){return Fo(Pi(e),ur(t,0,e.length))}function tr(e){return Fo(Pi(e))}function nr(e,t,n){(n!==i&&!Hs(e[t],n)||n===i&&!(t in e))&&ar(e,t,n)}function rr(e,t,n){var r=e[t];Me.call(e,t)&&Hs(r,n)&&(n!==i||t in e)||ar(e,t,n)}function ir(e,t){for(var n=e.length;n--;)if(Hs(e[n][0],t))return n;return-1}function or(e,t,n,r){return hr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function sr(e,t){return e&&Li(t,ka(t),e)}function ar(e,t,n){"__proto__"==t&&ct?ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function cr(e,t){for(var n=-1,o=t.length,s=r(o),a=null==e;++n<o;)s[n]=a?i:Aa(e,t[n]);return s}function ur(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function lr(e,t,n,r,o,s){var a,c=1&t,u=2&t,l=4&t;if(n&&(a=o?n(e,r,o,s):n(e)),a!==i)return a;if(!ra(e))return e;var p=Ws(e);if(p){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Me.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!c)return Pi(e,a)}else{var f=vo(e),d=f==S||f==I;if(Qs(e))return Ci(e,c);if(f==O||f==y||d&&!o){if(a=u||d?{}:_o(e),!c)return u?function(e,t){return Li(e,go(e),t)}(e,function(e,t){return e&&Li(t,Da(t),e)}(a,e)):function(e,t){return Li(e,mo(e),t)}(e,sr(a,e))}else{if(!at[f])return o?e:{};a=function(e,t,n){var r=e.constructor;switch(t){case k:return xi(e);case E:case b:return new r(+e);case D:return function(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case M:case V:case F:case j:case B:case U:case $:case H:case q:return Oi(e,n);case C:return new r;case x:case P:return new r(e);case A:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case N:return new r;case L:return i=e,Bn?Oe(Bn.call(i)):{}}var i}(e,f,c)}}s||(s=new Qn);var h=s.get(e);if(h)return h;s.set(e,a),ua(e)?e.forEach((function(r){a.add(lr(r,t,n,r,e,s))})):oa(e)&&e.forEach((function(r,i){a.set(i,lr(r,t,n,i,e,s))}));var m=p?i:(l?u?so:oo:u?Da:ka)(e);return Ot(m||e,(function(r,i){m&&(r=e[i=r]),rr(a,i,lr(r,t,n,i,e,s))})),a}function pr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Oe(e);r--;){var o=n[r],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function fr(e,t,n){if("function"!=typeof e)throw new Ne(o);return ko((function(){e.apply(i,n)}),t)}function dr(e,t,n,r){var i=-1,o=Pt,s=!0,a=e.length,c=[],u=t.length;if(!a)return c;n&&(t=Rt(t,Qt(n))),r?(o=Lt,s=!1):t.length>=200&&(o=Zt,s=!1,t=new Kn(t));e:for(;++i<a;){var l=e[i],p=null==n?l:n(l);if(l=r||0!==l?l:0,s&&p==p){for(var f=u;f--;)if(t[f]===p)continue e;c.push(l)}else o(t,p,r)||c.push(l)}return c}$n.templateSettings={escape:J,evaluate:Z,interpolate:ee,variable:"",imports:{_:$n}},$n.prototype=qn.prototype,$n.prototype.constructor=$n,Gn.prototype=Hn(qn.prototype),Gn.prototype.constructor=Gn,zn.prototype=Hn(qn.prototype),zn.prototype.constructor=zn,Wn.prototype.clear=function(){this.__data__=Pn?Pn(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.prototype.get=function(e){var t=this.__data__;if(Pn){var n=t[e];return n===s?i:n}return Me.call(t,e)?t[e]:i},Wn.prototype.has=function(e){var t=this.__data__;return Pn?t[e]!==i:Me.call(t,e)},Wn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Pn&&t===i?s:t,this},Yn.prototype.clear=function(){this.__data__=[],this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=ir(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ke.call(t,n,1),--this.size,!0)},Yn.prototype.get=function(e){var t=this.__data__,n=ir(t,e);return n<0?i:t[n][1]},Yn.prototype.has=function(e){return ir(this.__data__,e)>-1},Yn.prototype.set=function(e,t){var n=this.__data__,r=ir(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Xn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(On||Yn),string:new Wn}},Xn.prototype.delete=function(e){var t=po(this,e).delete(e);return this.size-=t?1:0,t},Xn.prototype.get=function(e){return po(this,e).get(e)},Xn.prototype.has=function(e){return po(this,e).has(e)},Xn.prototype.set=function(e,t){var n=po(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(e){return this.__data__.set(e,s),this},Kn.prototype.has=function(e){return this.__data__.has(e)},Qn.prototype.clear=function(){this.__data__=new Yn,this.size=0},Qn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Qn.prototype.get=function(e){return this.__data__.get(e)},Qn.prototype.has=function(e){return this.__data__.has(e)},Qn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Yn){var r=n.__data__;if(!On||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Xn(r)}return n.set(e,t),this.size=n.size,this};var hr=Di(wr),mr=Di(Sr,!0);function gr(e,t){var n=!0;return hr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function vr(e,t,n){for(var r=-1,o=e.length;++r<o;){var s=e[r],a=t(s);if(null!=a&&(c===i?a==a&&!pa(a):n(a,c)))var c=a,u=s}return u}function yr(e,t){var n=[];return hr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function _r(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=Eo),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?_r(a,t-1,n,r,i):kt(i,a):r||(i[i.length]=a)}return i}var Er=Mi(),br=Mi(!0);function wr(e,t){return e&&Er(e,t,ka)}function Sr(e,t){return e&&br(e,t,ka)}function Ir(e,t){return Nt(t,(function(t){return ea(e[t])}))}function Cr(e,t){for(var n=0,r=(t=bi(t,e)).length;null!=e&&n<r;)e=e[Bo(t[n++])];return n&&n==r?e:i}function xr(e,t,n){var r=t(e);return Ws(e)?r:kt(r,n(e))}function Or(e){return null==e?e===i?"[object Undefined]":"[object Null]":nt&&nt in Oe(e)?function(e){var t=Me.call(e,nt),n=e[nt];try{e[nt]=i;var r=!0}catch(e){}var o=je.call(e);r&&(t?e[nt]=n:delete e[nt]);return o}(e):function(e){return je.call(e)}(e)}function Tr(e,t){return e>t}function Ar(e,t){return null!=e&&Me.call(e,t)}function Nr(e,t){return null!=e&&t in Oe(e)}function Pr(e,t,n){for(var o=n?Lt:Pt,s=e[0].length,a=e.length,c=a,u=r(a),l=1/0,p=[];c--;){var f=e[c];c&&t&&(f=Rt(f,Qt(t))),l=bn(f.length,l),u[c]=!n&&(t||s>=120&&f.length>=120)?new Kn(c&&f):i}f=e[0];var d=-1,h=u[0];e:for(;++d<s&&p.length<l;){var m=f[d],g=t?t(m):m;if(m=n||0!==m?m:0,!(h?Zt(h,g):o(p,g,n))){for(c=a;--c;){var v=u[c];if(!(v?Zt(v,g):o(e[c],g,n)))continue e}h&&h.push(g),p.push(m)}}return p}function Lr(e,t,n){var r=null==(e=No(e,t=bi(t,e)))?e:e[Bo(Zo(t))];return null==r?i:Ct(r,e,n)}function Rr(e){return ia(e)&&Or(e)==y}function kr(e,t,n,r,o){return e===t||(null==e||null==t||!ia(e)&&!ia(t)?e!=e&&t!=t:function(e,t,n,r,o,s){var a=Ws(e),c=Ws(t),u=a?_:vo(e),l=c?_:vo(t),p=(u=u==y?O:u)==O,f=(l=l==y?O:l)==O,d=u==l;if(d&&Qs(e)){if(!Qs(t))return!1;a=!0,p=!1}if(d&&!p)return s||(s=new Qn),a||fa(e)?ro(e,t,n,r,o,s):function(e,t,n,r,i,o,s){switch(n){case D:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!o(new Ge(e),new Ge(t)));case E:case b:case x:return Hs(+e,+t);case w:return e.name==t.name&&e.message==t.message;case A:case P:return e==t+"";case C:var a=cn;case N:var c=1&r;if(a||(a=pn),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;r|=2,s.set(e,t);var l=ro(a(e),a(t),r,i,o,s);return s.delete(e),l;case L:if(Bn)return Bn.call(e)==Bn.call(t)}return!1}(e,t,u,n,r,o,s);if(!(1&n)){var h=p&&Me.call(e,"__wrapped__"),m=f&&Me.call(t,"__wrapped__");if(h||m){var g=h?e.value():e,v=m?t.value():t;return s||(s=new Qn),o(g,v,n,r,s)}}if(!d)return!1;return s||(s=new Qn),function(e,t,n,r,o,s){var a=1&n,c=oo(e),u=c.length,l=oo(t).length;if(u!=l&&!a)return!1;var p=u;for(;p--;){var f=c[p];if(!(a?f in t:Me.call(t,f)))return!1}var d=s.get(e),h=s.get(t);if(d&&h)return d==t&&h==e;var m=!0;s.set(e,t),s.set(t,e);var g=a;for(;++p<u;){var v=e[f=c[p]],y=t[f];if(r)var _=a?r(y,v,f,t,e,s):r(v,y,f,e,t,s);if(!(_===i?v===y||o(v,y,n,r,s):_)){m=!1;break}g||(g="constructor"==f)}if(m&&!g){var E=e.constructor,b=t.constructor;E==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof E&&E instanceof E&&"function"==typeof b&&b instanceof b||(m=!1)}return s.delete(e),s.delete(t),m}(e,t,n,r,o,s)}(e,t,n,r,kr,o))}function Dr(e,t,n,r){var o=n.length,s=o,a=!r;if(null==e)return!s;for(e=Oe(e);o--;){var c=n[o];if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++o<s;){var u=(c=n[o])[0],l=e[u],p=c[1];if(a&&c[2]){if(l===i&&!(u in e))return!1}else{var f=new Qn;if(r)var d=r(l,p,u,e,t,f);if(!(d===i?kr(p,l,3,r,f):d))return!1}}return!0}function Mr(e){return!(!ra(e)||(t=e,Fe&&Fe in t))&&(ea(e)?$e:ye).test(Uo(e));var t}function Vr(e){return"function"==typeof e?e:null==e?sc:"object"==typeof e?Ws(e)?Hr(e[0],e[1]):$r(e):mc(e)}function Fr(e){if(!xo(e))return _n(e);var t=[];for(var n in Oe(e))Me.call(e,n)&&"constructor"!=n&&t.push(n);return t}function jr(e){if(!ra(e))return function(e){var t=[];if(null!=e)for(var n in Oe(e))t.push(n);return t}(e);var t=xo(e),n=[];for(var r in e)("constructor"!=r||!t&&Me.call(e,r))&&n.push(r);return n}function Br(e,t){return e<t}function Ur(e,t){var n=-1,i=Xs(e)?r(e.length):[];return hr(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}function $r(e){var t=fo(e);return 1==t.length&&t[0][2]?To(t[0][0],t[0][1]):function(n){return n===e||Dr(n,e,t)}}function Hr(e,t){return So(e)&&Oo(t)?To(Bo(e),t):function(n){var r=Aa(n,e);return r===i&&r===t?Na(n,e):kr(t,r,3)}}function qr(e,t,n,r,o){e!==t&&Er(t,(function(s,a){if(o||(o=new Qn),ra(s))!function(e,t,n,r,o,s,a){var c=Lo(e,n),u=Lo(t,n),l=a.get(u);if(l)return void nr(e,n,l);var p=s?s(c,u,n+"",e,t,a):i,f=p===i;if(f){var d=Ws(u),h=!d&&Qs(u),m=!d&&!h&&fa(u);p=u,d||h||m?Ws(c)?p=c:Ks(c)?p=Pi(c):h?(f=!1,p=Ci(u,!0)):m?(f=!1,p=Oi(u,!0)):p=[]:aa(u)||zs(u)?(p=c,zs(c)?p=Ea(c):ra(c)&&!ea(c)||(p=_o(u))):f=!1}f&&(a.set(u,p),o(p,u,r,s,a),a.delete(u));nr(e,n,p)}(e,t,a,n,qr,r,o);else{var c=r?r(Lo(e,a),s,a+"",e,t,o):i;c===i&&(c=s),nr(e,a,c)}}),Da)}function Gr(e,t){var n=e.length;if(n)return bo(t+=t<0?n:0,n)?e[t]:i}function zr(e,t,n){t=t.length?Rt(t,(function(e){return Ws(e)?function(t){return Cr(t,1===e.length?e[0]:e)}:e})):[sc];var r=-1;return t=Rt(t,Qt(lo())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Ur(e,(function(e,n,i){return{criteria:Rt(t,(function(t){return t(e)})),index:++r,value:e}})),(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;for(;++r<s;){var c=Ti(i[r],o[r]);if(c)return r>=a?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Wr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=Cr(e,s);n(a,s)&&ti(o,bi(s,e),a)}return o}function Yr(e,t,n,r){var i=r?$t:Ut,o=-1,s=t.length,a=e;for(e===t&&(t=Pi(t)),n&&(a=Rt(e,Qt(n)));++o<s;)for(var c=0,u=t[o],l=n?n(u):u;(c=i(a,l,c,r))>-1;)a!==e&&Ke.call(a,c,1),Ke.call(e,c,1);return e}function Xr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;bo(i)?Ke.call(e,i,1):di(e,i)}}return e}function Kr(e,t){return e+vt(In()*(t-e+1))}function Qr(e,t){var n="";if(!e||t<1||t>h)return n;do{t%2&&(n+=e),(t=vt(t/2))&&(e+=e)}while(t);return n}function Jr(e,t){return Do(Ao(e,t,sc),e+"")}function Zr(e){return Zn(Ha(e))}function ei(e,t){var n=Ha(e);return Fo(n,ur(t,0,n.length))}function ti(e,t,n,r){if(!ra(e))return e;for(var o=-1,s=(t=bi(t,e)).length,a=s-1,c=e;null!=c&&++o<s;){var u=Bo(t[o]),l=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(o!=a){var p=c[u];(l=r?r(p,u,c):i)===i&&(l=ra(p)?p:bo(t[o+1])?[]:{})}rr(c,u,l),c=c[u]}return e}var ni=Ln?function(e,t){return Ln.set(e,t),e}:sc,ri=ct?function(e,t){return ct(e,"toString",{configurable:!0,enumerable:!1,value:rc(t),writable:!0})}:sc;function ii(e){return Fo(Ha(e))}function oi(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=r(o);++i<o;)s[i]=e[i+t];return s}function si(e,t){var n;return hr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ai(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!pa(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return ci(e,t,sc,n)}function ci(e,t,n,r){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=n(t))!=t,c=null===t,u=pa(t),l=t===i;o<s;){var p=vt((o+s)/2),f=n(e[p]),d=f!==i,h=null===f,m=f==f,g=pa(f);if(a)var v=r||m;else v=l?m&&(r||d):c?m&&d&&(r||!h):u?m&&d&&!h&&(r||!g):!h&&!g&&(r?f<=t:f<t);v?o=p+1:s=p}return bn(s,4294967294)}function ui(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!Hs(a,c)){var c=a;o[i++]=0===s?0:s}}return o}function li(e){return"number"==typeof e?e:pa(e)?m:+e}function pi(e){if("string"==typeof e)return e;if(Ws(e))return Rt(e,pi)+"";if(pa(e))return Un?Un.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function fi(e,t,n){var r=-1,i=Pt,o=e.length,s=!0,a=[],c=a;if(n)s=!1,i=Lt;else if(o>=200){var u=t?null:Qi(e);if(u)return pn(u);s=!1,i=Zt,c=new Kn}else c=t?[]:a;e:for(;++r<o;){var l=e[r],p=t?t(l):l;if(l=n||0!==l?l:0,s&&p==p){for(var f=c.length;f--;)if(c[f]===p)continue e;t&&c.push(p),a.push(l)}else i(c,p,n)||(c!==a&&c.push(p),a.push(l))}return a}function di(e,t){return null==(e=No(e,t=bi(t,e)))||delete e[Bo(Zo(t))]}function hi(e,t,n,r){return ti(e,t,n(Cr(e,t)),r)}function mi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?oi(e,r?0:o,r?o+1:i):oi(e,r?o+1:0,r?i:o)}function gi(e,t){var n=e;return n instanceof zn&&(n=n.value()),Dt(t,(function(e,t){return t.func.apply(t.thisArg,kt([e],t.args))}),n)}function vi(e,t,n){var i=e.length;if(i<2)return i?fi(e[0]):[];for(var o=-1,s=r(i);++o<i;)for(var a=e[o],c=-1;++c<i;)c!=o&&(s[o]=dr(s[o]||a,e[c],t,n));return fi(_r(s,1),t,n)}function yi(e,t,n){for(var r=-1,o=e.length,s=t.length,a={};++r<o;){var c=r<s?t[r]:i;n(a,e[r],c)}return a}function _i(e){return Ks(e)?e:[]}function Ei(e){return"function"==typeof e?e:sc}function bi(e,t){return Ws(e)?e:So(e,t)?[e]:jo(ba(e))}var wi=Jr;function Si(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:oi(e,t,n)}var Ii=pt||function(e){return dt.clearTimeout(e)};function Ci(e,t){if(t)return e.slice();var n=e.length,r=ze?ze(n):new e.constructor(n);return e.copy(r),r}function xi(e){var t=new e.constructor(e.byteLength);return new Ge(t).set(new Ge(e)),t}function Oi(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ti(e,t){if(e!==t){var n=e!==i,r=null===e,o=e==e,s=pa(e),a=t!==i,c=null===t,u=t==t,l=pa(t);if(!c&&!l&&!s&&e>t||s&&a&&u&&!c&&!l||r&&a&&u||!n&&u||!o)return 1;if(!r&&!s&&!l&&e<t||l&&n&&o&&!r&&!s||c&&n&&o||!a&&o||!u)return-1}return 0}function Ai(e,t,n,i){for(var o=-1,s=e.length,a=n.length,c=-1,u=t.length,l=En(s-a,0),p=r(u+l),f=!i;++c<u;)p[c]=t[c];for(;++o<a;)(f||o<s)&&(p[n[o]]=e[o]);for(;l--;)p[c++]=e[o++];return p}function Ni(e,t,n,i){for(var o=-1,s=e.length,a=-1,c=n.length,u=-1,l=t.length,p=En(s-c,0),f=r(p+l),d=!i;++o<p;)f[o]=e[o];for(var h=o;++u<l;)f[h+u]=t[u];for(;++a<c;)(d||o<s)&&(f[h+n[a]]=e[o++]);return f}function Pi(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function Li(e,t,n,r){var o=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var c=t[s],u=r?r(n[c],e[c],c,n,e):i;u===i&&(u=e[c]),o?ar(n,c,u):rr(n,c,u)}return n}function Ri(e,t){return function(n,r){var i=Ws(n)?xt:or,o=t?t():{};return i(n,e,lo(r,2),o)}}function ki(e){return Jr((function(t,n){var r=-1,o=n.length,s=o>1?n[o-1]:i,a=o>2?n[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&wo(n[0],n[1],a)&&(s=o<3?i:s,o=1),t=Oe(t);++r<o;){var c=n[r];c&&e(t,c,r,s)}return t}))}function Di(e,t){return function(n,r){if(null==n)return n;if(!Xs(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=Oe(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function Mi(e){return function(t,n,r){for(var i=-1,o=Oe(t),s=r(t),a=s.length;a--;){var c=s[e?a:++i];if(!1===n(o[c],c,o))break}return t}}function Vi(e){return function(t){var n=an(t=ba(t))?hn(t):i,r=n?n[0]:t.charAt(0),o=n?Si(n,1).join(""):t.slice(1);return r[e]()+o}}function Fi(e){return function(t){return Dt(ec(za(t).replace(Je,"")),e,"")}}function ji(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Hn(e.prototype),r=e.apply(n,t);return ra(r)?r:n}}function Bi(e){return function(t,n,r){var o=Oe(t);if(!Xs(t)){var s=lo(n,3);t=ka(t),n=function(e){return s(o[e],e,o)}}var a=e(t,n,r);return a>-1?o[s?t[a]:a]:i}}function Ui(e){return io((function(t){var n=t.length,r=n,s=Gn.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new Ne(o);if(s&&!c&&"wrapper"==co(a))var c=new Gn([],!0)}for(r=c?r:n;++r<n;){var u=co(a=t[r]),l="wrapper"==u?ao(a):i;c=l&&Io(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?c[co(l[0])].apply(c,l[3]):1==a.length&&Io(a)?c[u]():c.thru(a)}return function(){var e=arguments,r=e[0];if(c&&1==e.length&&Ws(r))return c.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function $i(e,t,n,o,s,a,c,u,l,f){var d=t&p,h=1&t,m=2&t,g=24&t,v=512&t,y=m?i:ji(e);return function i(){for(var p=arguments.length,_=r(p),E=p;E--;)_[E]=arguments[E];if(g)var b=uo(i),w=nn(_,b);if(o&&(_=Ai(_,o,s,g)),a&&(_=Ni(_,a,c,g)),p-=w,g&&p<f){var S=ln(_,b);return Xi(e,t,$i,i.placeholder,n,_,S,u,l,f-p)}var I=h?n:this,C=m?I[e]:e;return p=_.length,u?_=Po(_,u):v&&p>1&&_.reverse(),d&&l<p&&(_.length=l),this&&this!==dt&&this instanceof i&&(C=y||ji(C)),C.apply(I,_)}}function Hi(e,t){return function(n,r){return function(e,t,n,r){return wr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function qi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=pi(n),r=pi(r)):(n=li(n),r=li(r)),o=e(n,r)}return o}}function Gi(e){return io((function(t){return t=Rt(t,Qt(lo())),Jr((function(n){var r=this;return e(t,(function(e){return Ct(e,r,n)}))}))}))}function zi(e,t){var n=(t=t===i?" ":pi(t)).length;if(n<2)return n?Qr(t,e):t;var r=Qr(t,mt(e/dn(t)));return an(t)?Si(hn(r),0,e).join(""):r.slice(0,e)}function Wi(e){return function(t,n,o){return o&&"number"!=typeof o&&wo(t,n,o)&&(n=o=i),t=ga(t),n===i?(n=t,t=0):n=ga(n),function(e,t,n,i){for(var o=-1,s=En(mt((t-e)/(n||1)),0),a=r(s);s--;)a[i?s:++o]=e,e+=n;return a}(t,n,o=o===i?t<n?1:-1:ga(o),e)}}function Yi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=_a(t),n=_a(n)),e(t,n)}}function Xi(e,t,n,r,o,s,a,c,p,f){var d=8&t;t|=d?u:l,4&(t&=~(d?l:u))||(t&=-4);var h=[e,t,o,d?s:i,d?a:i,d?i:s,d?i:a,c,p,f],m=n.apply(i,h);return Io(e)&&Ro(m,h),m.placeholder=r,Mo(m,e,t)}function Ki(e){var t=xe[e];return function(e,n){if(e=_a(e),(n=null==n?0:bn(va(n),292))&&zt(e)){var r=(ba(e)+"e").split("e");return+((r=(ba(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Qi=An&&1/pn(new An([,-0]))[1]==d?function(e){return new An(e)}:pc;function Ji(e){return function(t){var n=vo(t);return n==C?cn(t):n==N?fn(t):function(e,t){return Rt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Zi(e,t,n,s,d,h,m,g){var v=2&t;if(!v&&"function"!=typeof e)throw new Ne(o);var y=s?s.length:0;if(y||(t&=-97,s=d=i),m=m===i?m:En(va(m),0),g=g===i?g:va(g),y-=d?d.length:0,t&l){var _=s,E=d;s=d=i}var b=v?i:ao(e),w=[e,t,n,s,d,_,E,h,m,g];if(b&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,s=r==p&&8==n||r==p&&n==f&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!s)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var c=t[3];if(c){var u=e[3];e[3]=u?Ai(u,c,t[4]):c,e[4]=u?ln(e[3],a):t[4]}(c=t[5])&&(u=e[5],e[5]=u?Ni(u,c,t[6]):c,e[6]=u?ln(e[5],a):t[6]);(c=t[7])&&(e[7]=c);r&p&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(w,b),e=w[0],t=w[1],n=w[2],s=w[3],d=w[4],!(g=w[9]=w[9]===i?v?0:e.length:En(w[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)S=8==t||t==c?function(e,t,n){var o=ji(e);return function s(){for(var a=arguments.length,c=r(a),u=a,l=uo(s);u--;)c[u]=arguments[u];var p=a<3&&c[0]!==l&&c[a-1]!==l?[]:ln(c,l);return(a-=p.length)<n?Xi(e,t,$i,s.placeholder,i,c,p,i,i,n-a):Ct(this&&this!==dt&&this instanceof s?o:e,this,c)}}(e,t,g):t!=u&&33!=t||d.length?$i.apply(i,w):function(e,t,n,i){var o=1&t,s=ji(e);return function t(){for(var a=-1,c=arguments.length,u=-1,l=i.length,p=r(l+c),f=this&&this!==dt&&this instanceof t?s:e;++u<l;)p[u]=i[u];for(;c--;)p[u++]=arguments[++a];return Ct(f,o?n:this,p)}}(e,t,n,s);else var S=function(e,t,n){var r=1&t,i=ji(e);return function t(){return(this&&this!==dt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return Mo((b?ni:Ro)(S,w),e,t)}function eo(e,t,n,r){return e===i||Hs(e,Re[n])&&!Me.call(r,n)?t:e}function to(e,t,n,r,o,s){return ra(e)&&ra(t)&&(s.set(t,e),qr(e,t,i,to,s),s.delete(t)),e}function no(e){return aa(e)?i:e}function ro(e,t,n,r,o,s){var a=1&n,c=e.length,u=t.length;if(c!=u&&!(a&&u>c))return!1;var l=s.get(e),p=s.get(t);if(l&&p)return l==t&&p==e;var f=-1,d=!0,h=2&n?new Kn:i;for(s.set(e,t),s.set(t,e);++f<c;){var m=e[f],g=t[f];if(r)var v=a?r(g,m,f,t,e,s):r(m,g,f,e,t,s);if(v!==i){if(v)continue;d=!1;break}if(h){if(!Vt(t,(function(e,t){if(!Zt(h,t)&&(m===e||o(m,e,n,r,s)))return h.push(t)}))){d=!1;break}}else if(m!==g&&!o(m,g,n,r,s)){d=!1;break}}return s.delete(e),s.delete(t),d}function io(e){return Do(Ao(e,i,Yo),e+"")}function oo(e){return xr(e,ka,mo)}function so(e){return xr(e,Da,go)}var ao=Ln?function(e){return Ln.get(e)}:pc;function co(e){for(var t=e.name+"",n=Rn[t],r=Me.call(Rn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function uo(e){return(Me.call($n,"placeholder")?$n:e).placeholder}function lo(){var e=$n.iteratee||ac;return e=e===ac?Vr:e,arguments.length?e(arguments[0],arguments[1]):e}function po(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function fo(e){for(var t=ka(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Oo(i)]}return t}function ho(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Mr(n)?n:i}var mo=yt?function(e){return null==e?[]:(e=Oe(e),Nt(yt(e),(function(t){return Xe.call(e,t)})))}:yc,go=yt?function(e){for(var t=[];e;)kt(t,mo(e)),e=We(e);return t}:yc,vo=Or;function yo(e,t,n){for(var r=-1,i=(t=bi(t,e)).length,o=!1;++r<i;){var s=Bo(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&na(i)&&bo(s,i)&&(Ws(e)||zs(e))}function _o(e){return"function"!=typeof e.constructor||xo(e)?{}:Hn(We(e))}function Eo(e){return Ws(e)||zs(e)||!!(Qe&&e&&e[Qe])}function bo(e,t){var n=typeof e;return!!(t=null==t?h:t)&&("number"==n||"symbol"!=n&&Ee.test(e))&&e>-1&&e%1==0&&e<t}function wo(e,t,n){if(!ra(n))return!1;var r=typeof t;return!!("number"==r?Xs(n)&&bo(t,n.length):"string"==r&&t in n)&&Hs(n[t],e)}function So(e,t){if(Ws(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!pa(e))||(ne.test(e)||!te.test(e)||null!=t&&e in Oe(t))}function Io(e){var t=co(e),n=$n[t];if("function"!=typeof n||!(t in zn.prototype))return!1;if(e===n)return!0;var r=ao(n);return!!r&&e===r[0]}(xn&&vo(new xn(new ArrayBuffer(1)))!=D||On&&vo(new On)!=C||Tn&&vo(Tn.resolve())!=T||An&&vo(new An)!=N||Nn&&vo(new Nn)!=R)&&(vo=function(e){var t=Or(e),n=t==O?e.constructor:i,r=n?Uo(n):"";if(r)switch(r){case kn:return D;case Dn:return C;case Mn:return T;case Vn:return N;case Fn:return R}return t});var Co=ke?ea:_c;function xo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Re)}function Oo(e){return e==e&&!ra(e)}function To(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==i||e in Oe(n)))}}function Ao(e,t,n){return t=En(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=En(i.length-t,0),a=r(s);++o<s;)a[o]=i[t+o];o=-1;for(var c=r(t+1);++o<t;)c[o]=i[o];return c[t]=n(a),Ct(e,this,c)}}function No(e,t){return t.length<2?e:Cr(e,oi(t,0,-1))}function Po(e,t){for(var n=e.length,r=bn(t.length,n),o=Pi(e);r--;){var s=t[r];e[r]=bo(s,n)?o[s]:i}return e}function Lo(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ro=Vo(ni),ko=ht||function(e,t){return dt.setTimeout(e,t)},Do=Vo(ri);function Mo(e,t,n){var r=t+"";return Do(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ce,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Ot(v,(function(n){var r="_."+n[0];t&n[1]&&!Pt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ue);return t?t[1].split(le):[]}(r),n)))}function Vo(e){var t=0,n=0;return function(){var r=wn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Fo(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var s=Kr(n,o),a=e[s];e[s]=e[n],e[n]=a}return e.length=t,e}var jo=function(e){var t=Vs(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,(function(e,n,r,i){t.push(r?i.replace(de,"$1"):n||e)})),t}));function Bo(e){if("string"==typeof e||pa(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Uo(e){if(null!=e){try{return De.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function $o(e){if(e instanceof zn)return e.clone();var t=new Gn(e.__wrapped__,e.__chain__);return t.__actions__=Pi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ho=Jr((function(e,t){return Ks(e)?dr(e,_r(t,1,Ks,!0)):[]})),qo=Jr((function(e,t){var n=Zo(t);return Ks(n)&&(n=i),Ks(e)?dr(e,_r(t,1,Ks,!0),lo(n,2)):[]})),Go=Jr((function(e,t){var n=Zo(t);return Ks(n)&&(n=i),Ks(e)?dr(e,_r(t,1,Ks,!0),i,n):[]}));function zo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:va(n);return i<0&&(i=En(r+i,0)),Bt(e,lo(t,3),i)}function Wo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=va(n),o=n<0?En(r+o,0):bn(o,r-1)),Bt(e,lo(t,3),o,!0)}function Yo(e){return(null==e?0:e.length)?_r(e,1):[]}function Xo(e){return e&&e.length?e[0]:i}var Ko=Jr((function(e){var t=Rt(e,_i);return t.length&&t[0]===e[0]?Pr(t):[]})),Qo=Jr((function(e){var t=Zo(e),n=Rt(e,_i);return t===Zo(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Pr(n,lo(t,2)):[]})),Jo=Jr((function(e){var t=Zo(e),n=Rt(e,_i);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Pr(n,i,t):[]}));function Zo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var es=Jr(ts);function ts(e,t){return e&&e.length&&t&&t.length?Yr(e,t):e}var ns=io((function(e,t){var n=null==e?0:e.length,r=cr(e,t);return Xr(e,Rt(t,(function(e){return bo(e,n)?+e:e})).sort(Ti)),r}));function rs(e){return null==e?e:Cn.call(e)}var is=Jr((function(e){return fi(_r(e,1,Ks,!0))})),os=Jr((function(e){var t=Zo(e);return Ks(t)&&(t=i),fi(_r(e,1,Ks,!0),lo(t,2))})),ss=Jr((function(e){var t=Zo(e);return t="function"==typeof t?t:i,fi(_r(e,1,Ks,!0),i,t)}));function as(e){if(!e||!e.length)return[];var t=0;return e=Nt(e,(function(e){if(Ks(e))return t=En(e.length,t),!0})),Xt(t,(function(t){return Rt(e,Gt(t))}))}function cs(e,t){if(!e||!e.length)return[];var n=as(e);return null==t?n:Rt(n,(function(e){return Ct(t,i,e)}))}var us=Jr((function(e,t){return Ks(e)?dr(e,t):[]})),ls=Jr((function(e){return vi(Nt(e,Ks))})),ps=Jr((function(e){var t=Zo(e);return Ks(t)&&(t=i),vi(Nt(e,Ks),lo(t,2))})),fs=Jr((function(e){var t=Zo(e);return t="function"==typeof t?t:i,vi(Nt(e,Ks),i,t)})),ds=Jr(as);var hs=Jr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,cs(e,n)}));function ms(e){var t=$n(e);return t.__chain__=!0,t}function gs(e,t){return t(e)}var vs=io((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return cr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof zn&&bo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:gs,args:[o],thisArg:i}),new Gn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)}));var ys=Ri((function(e,t,n){Me.call(e,n)?++e[n]:ar(e,n,1)}));var _s=Bi(zo),Es=Bi(Wo);function bs(e,t){return(Ws(e)?Ot:hr)(e,lo(t,3))}function ws(e,t){return(Ws(e)?Tt:mr)(e,lo(t,3))}var Ss=Ri((function(e,t,n){Me.call(e,n)?e[n].push(t):ar(e,n,[t])}));var Is=Jr((function(e,t,n){var i=-1,o="function"==typeof t,s=Xs(e)?r(e.length):[];return hr(e,(function(e){s[++i]=o?Ct(t,e,n):Lr(e,t,n)})),s})),Cs=Ri((function(e,t,n){ar(e,n,t)}));function xs(e,t){return(Ws(e)?Rt:Ur)(e,lo(t,3))}var Os=Ri((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Ts=Jr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&wo(e,t[0],t[1])?t=[]:n>2&&wo(t[0],t[1],t[2])&&(t=[t[0]]),zr(e,_r(t,1),[])})),As=ft||function(){return dt.Date.now()};function Ns(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Zi(e,p,i,i,i,i,t)}function Ps(e,t){var n;if("function"!=typeof t)throw new Ne(o);return e=va(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Ls=Jr((function(e,t,n){var r=1;if(n.length){var i=ln(n,uo(Ls));r|=u}return Zi(e,r,t,n,i)})),Rs=Jr((function(e,t,n){var r=3;if(n.length){var i=ln(n,uo(Rs));r|=u}return Zi(t,r,e,n,i)}));function ks(e,t,n){var r,s,a,c,u,l,p=0,f=!1,d=!1,h=!0;if("function"!=typeof e)throw new Ne(o);function m(t){var n=r,o=s;return r=s=i,p=t,c=e.apply(o,n)}function g(e){return p=e,u=ko(y,t),f?m(e):c}function v(e){var n=e-l;return l===i||n>=t||n<0||d&&e-p>=a}function y(){var e=As();if(v(e))return _(e);u=ko(y,function(e){var n=t-(e-l);return d?bn(n,a-(e-p)):n}(e))}function _(e){return u=i,h&&r?m(e):(r=s=i,c)}function E(){var e=As(),n=v(e);if(r=arguments,s=this,l=e,n){if(u===i)return g(l);if(d)return Ii(u),u=ko(y,t),m(l)}return u===i&&(u=ko(y,t)),c}return t=_a(t)||0,ra(n)&&(f=!!n.leading,a=(d="maxWait"in n)?En(_a(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),E.cancel=function(){u!==i&&Ii(u),p=0,r=l=s=u=i},E.flush=function(){return u===i?c:_(As())},E}var Ds=Jr((function(e,t){return fr(e,1,t)})),Ms=Jr((function(e,t,n){return fr(e,_a(t)||0,n)}));function Vs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ne(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Vs.Cache||Xn),n}function Fs(e){if("function"!=typeof e)throw new Ne(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Vs.Cache=Xn;var js=wi((function(e,t){var n=(t=1==t.length&&Ws(t[0])?Rt(t[0],Qt(lo())):Rt(_r(t,1),Qt(lo()))).length;return Jr((function(r){for(var i=-1,o=bn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return Ct(e,this,r)}))})),Bs=Jr((function(e,t){var n=ln(t,uo(Bs));return Zi(e,u,i,t,n)})),Us=Jr((function(e,t){var n=ln(t,uo(Us));return Zi(e,l,i,t,n)})),$s=io((function(e,t){return Zi(e,f,i,i,i,t)}));function Hs(e,t){return e===t||e!=e&&t!=t}var qs=Yi(Tr),Gs=Yi((function(e,t){return e>=t})),zs=Rr(function(){return arguments}())?Rr:function(e){return ia(e)&&Me.call(e,"callee")&&!Xe.call(e,"callee")},Ws=r.isArray,Ys=_t?Qt(_t):function(e){return ia(e)&&Or(e)==k};function Xs(e){return null!=e&&na(e.length)&&!ea(e)}function Ks(e){return ia(e)&&Xs(e)}var Qs=Ft||_c,Js=Et?Qt(Et):function(e){return ia(e)&&Or(e)==b};function Zs(e){if(!ia(e))return!1;var t=Or(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!aa(e)}function ea(e){if(!ra(e))return!1;var t=Or(e);return t==S||t==I||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ta(e){return"number"==typeof e&&e==va(e)}function na(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function ra(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ia(e){return null!=e&&"object"==typeof e}var oa=bt?Qt(bt):function(e){return ia(e)&&vo(e)==C};function sa(e){return"number"==typeof e||ia(e)&&Or(e)==x}function aa(e){if(!ia(e)||Or(e)!=O)return!1;var t=We(e);if(null===t)return!0;var n=Me.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&De.call(n)==Be}var ca=wt?Qt(wt):function(e){return ia(e)&&Or(e)==A};var ua=St?Qt(St):function(e){return ia(e)&&vo(e)==N};function la(e){return"string"==typeof e||!Ws(e)&&ia(e)&&Or(e)==P}function pa(e){return"symbol"==typeof e||ia(e)&&Or(e)==L}var fa=It?Qt(It):function(e){return ia(e)&&na(e.length)&&!!st[Or(e)]};var da=Yi(Br),ha=Yi((function(e,t){return e<=t}));function ma(e){if(!e)return[];if(Xs(e))return la(e)?hn(e):Pi(e);if(et&&e[et])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[et]());var t=vo(e);return(t==C?cn:t==N?pn:Ha)(e)}function ga(e){return e?(e=_a(e))===d||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function va(e){var t=ga(e),n=t%1;return t==t?n?t-n:t:0}function ya(e){return e?ur(va(e),0,g):0}function _a(e){if("number"==typeof e)return e;if(pa(e))return m;if(ra(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ra(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Kt(e);var n=ve.test(e);return n||_e.test(e)?lt(e.slice(2),n?2:8):ge.test(e)?m:+e}function Ea(e){return Li(e,Da(e))}function ba(e){return null==e?"":pi(e)}var wa=ki((function(e,t){if(xo(t)||Xs(t))Li(t,ka(t),e);else for(var n in t)Me.call(t,n)&&rr(e,n,t[n])})),Sa=ki((function(e,t){Li(t,Da(t),e)})),Ia=ki((function(e,t,n,r){Li(t,Da(t),e,r)})),Ca=ki((function(e,t,n,r){Li(t,ka(t),e,r)})),xa=io(cr);var Oa=Jr((function(e,t){e=Oe(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&wo(t[0],t[1],o)&&(r=1);++n<r;)for(var s=t[n],a=Da(s),c=-1,u=a.length;++c<u;){var l=a[c],p=e[l];(p===i||Hs(p,Re[l])&&!Me.call(e,l))&&(e[l]=s[l])}return e})),Ta=Jr((function(e){return e.push(i,to),Ct(Va,i,e)}));function Aa(e,t,n){var r=null==e?i:Cr(e,t);return r===i?n:r}function Na(e,t){return null!=e&&yo(e,t,Nr)}var Pa=Hi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),e[t]=n}),rc(sc)),La=Hi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),Me.call(e,t)?e[t].push(n):e[t]=[n]}),lo),Ra=Jr(Lr);function ka(e){return Xs(e)?Jn(e):Fr(e)}function Da(e){return Xs(e)?Jn(e,!0):jr(e)}var Ma=ki((function(e,t,n){qr(e,t,n)})),Va=ki((function(e,t,n,r){qr(e,t,n,r)})),Fa=io((function(e,t){var n={};if(null==e)return n;var r=!1;t=Rt(t,(function(t){return t=bi(t,e),r||(r=t.length>1),t})),Li(e,so(e),n),r&&(n=lr(n,7,no));for(var i=t.length;i--;)di(n,t[i]);return n}));var ja=io((function(e,t){return null==e?{}:function(e,t){return Wr(e,t,(function(t,n){return Na(e,n)}))}(e,t)}));function Ba(e,t){if(null==e)return{};var n=Rt(so(e),(function(e){return[e]}));return t=lo(t),Wr(e,n,(function(e,n){return t(e,n[0])}))}var Ua=Ji(ka),$a=Ji(Da);function Ha(e){return null==e?[]:Jt(e,ka(e))}var qa=Fi((function(e,t,n){return t=t.toLowerCase(),e+(n?Ga(t):t)}));function Ga(e){return Za(ba(e).toLowerCase())}function za(e){return(e=ba(e))&&e.replace(be,rn).replace(Ze,"")}var Wa=Fi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ya=Fi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Xa=Vi("toLowerCase");var Ka=Fi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Qa=Fi((function(e,t,n){return e+(n?" ":"")+Za(t)}));var Ja=Fi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Za=Vi("toUpperCase");function ec(e,t,n){return e=ba(e),(t=n?i:t)===i?function(e){return rt.test(e)}(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.match(pe)||[]}(e):e.match(t)||[]}var tc=Jr((function(e,t){try{return Ct(e,i,t)}catch(e){return Zs(e)?e:new Ie(e)}})),nc=io((function(e,t){return Ot(t,(function(t){t=Bo(t),ar(e,t,Ls(e[t],e))})),e}));function rc(e){return function(){return e}}var ic=Ui(),oc=Ui(!0);function sc(e){return e}function ac(e){return Vr("function"==typeof e?e:lr(e,1))}var cc=Jr((function(e,t){return function(n){return Lr(n,e,t)}})),uc=Jr((function(e,t){return function(n){return Lr(e,n,t)}}));function lc(e,t,n){var r=ka(t),i=Ir(t,r);null!=n||ra(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Ir(t,ka(t)));var o=!(ra(n)&&"chain"in n&&!n.chain),s=ea(e);return Ot(i,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=Pi(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,kt([this.value()],arguments))})})),e}function pc(){}var fc=Gi(Rt),dc=Gi(At),hc=Gi(Vt);function mc(e){return So(e)?Gt(Bo(e)):function(e){return function(t){return Cr(t,e)}}(e)}var gc=Wi(),vc=Wi(!0);function yc(){return[]}function _c(){return!1}var Ec=qi((function(e,t){return e+t}),0),bc=Ki("ceil"),wc=qi((function(e,t){return e/t}),1),Sc=Ki("floor");var Ic,Cc=qi((function(e,t){return e*t}),1),xc=Ki("round"),Oc=qi((function(e,t){return e-t}),0);return $n.after=function(e,t){if("function"!=typeof t)throw new Ne(o);return e=va(e),function(){if(--e<1)return t.apply(this,arguments)}},$n.ary=Ns,$n.assign=wa,$n.assignIn=Sa,$n.assignInWith=Ia,$n.assignWith=Ca,$n.at=xa,$n.before=Ps,$n.bind=Ls,$n.bindAll=nc,$n.bindKey=Rs,$n.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ws(e)?e:[e]},$n.chain=ms,$n.chunk=function(e,t,n){t=(n?wo(e,t,n):t===i)?1:En(va(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,c=r(mt(o/t));s<o;)c[a++]=oi(e,s,s+=t);return c},$n.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},$n.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return kt(Ws(n)?Pi(n):[n],_r(t,1))},$n.cond=function(e){var t=null==e?0:e.length,n=lo();return e=t?Rt(e,(function(e){if("function"!=typeof e[1])throw new Ne(o);return[n(e[0]),e[1]]})):[],Jr((function(n){for(var r=-1;++r<t;){var i=e[r];if(Ct(i[0],this,n))return Ct(i[1],this,n)}}))},$n.conforms=function(e){return function(e){var t=ka(e);return function(n){return pr(n,e,t)}}(lr(e,1))},$n.constant=rc,$n.countBy=ys,$n.create=function(e,t){var n=Hn(e);return null==t?n:sr(n,t)},$n.curry=function e(t,n,r){var o=Zi(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},$n.curryRight=function e(t,n,r){var o=Zi(t,c,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},$n.debounce=ks,$n.defaults=Oa,$n.defaultsDeep=Ta,$n.defer=Ds,$n.delay=Ms,$n.difference=Ho,$n.differenceBy=qo,$n.differenceWith=Go,$n.drop=function(e,t,n){var r=null==e?0:e.length;return r?oi(e,(t=n||t===i?1:va(t))<0?0:t,r):[]},$n.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?oi(e,0,(t=r-(t=n||t===i?1:va(t)))<0?0:t):[]},$n.dropRightWhile=function(e,t){return e&&e.length?mi(e,lo(t,3),!0,!0):[]},$n.dropWhile=function(e,t){return e&&e.length?mi(e,lo(t,3),!0):[]},$n.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&wo(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=va(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:va(r))<0&&(r+=o),r=n>r?0:ya(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},$n.filter=function(e,t){return(Ws(e)?Nt:yr)(e,lo(t,3))},$n.flatMap=function(e,t){return _r(xs(e,t),1)},$n.flatMapDeep=function(e,t){return _r(xs(e,t),d)},$n.flatMapDepth=function(e,t,n){return n=n===i?1:va(n),_r(xs(e,t),n)},$n.flatten=Yo,$n.flattenDeep=function(e){return(null==e?0:e.length)?_r(e,d):[]},$n.flattenDepth=function(e,t){return(null==e?0:e.length)?_r(e,t=t===i?1:va(t)):[]},$n.flip=function(e){return Zi(e,512)},$n.flow=ic,$n.flowRight=oc,$n.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},$n.functions=function(e){return null==e?[]:Ir(e,ka(e))},$n.functionsIn=function(e){return null==e?[]:Ir(e,Da(e))},$n.groupBy=Ss,$n.initial=function(e){return(null==e?0:e.length)?oi(e,0,-1):[]},$n.intersection=Ko,$n.intersectionBy=Qo,$n.intersectionWith=Jo,$n.invert=Pa,$n.invertBy=La,$n.invokeMap=Is,$n.iteratee=ac,$n.keyBy=Cs,$n.keys=ka,$n.keysIn=Da,$n.map=xs,$n.mapKeys=function(e,t){var n={};return t=lo(t,3),wr(e,(function(e,r,i){ar(n,t(e,r,i),e)})),n},$n.mapValues=function(e,t){var n={};return t=lo(t,3),wr(e,(function(e,r,i){ar(n,r,t(e,r,i))})),n},$n.matches=function(e){return $r(lr(e,1))},$n.matchesProperty=function(e,t){return Hr(e,lr(t,1))},$n.memoize=Vs,$n.merge=Ma,$n.mergeWith=Va,$n.method=cc,$n.methodOf=uc,$n.mixin=lc,$n.negate=Fs,$n.nthArg=function(e){return e=va(e),Jr((function(t){return Gr(t,e)}))},$n.omit=Fa,$n.omitBy=function(e,t){return Ba(e,Fs(lo(t)))},$n.once=function(e){return Ps(2,e)},$n.orderBy=function(e,t,n,r){return null==e?[]:(Ws(t)||(t=null==t?[]:[t]),Ws(n=r?i:n)||(n=null==n?[]:[n]),zr(e,t,n))},$n.over=fc,$n.overArgs=js,$n.overEvery=dc,$n.overSome=hc,$n.partial=Bs,$n.partialRight=Us,$n.partition=Os,$n.pick=ja,$n.pickBy=Ba,$n.property=mc,$n.propertyOf=function(e){return function(t){return null==e?i:Cr(e,t)}},$n.pull=es,$n.pullAll=ts,$n.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Yr(e,t,lo(n,2)):e},$n.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Yr(e,t,i,n):e},$n.pullAt=ns,$n.range=gc,$n.rangeRight=vc,$n.rearg=$s,$n.reject=function(e,t){return(Ws(e)?Nt:yr)(e,Fs(lo(t,3)))},$n.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=lo(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return Xr(e,i),n},$n.rest=function(e,t){if("function"!=typeof e)throw new Ne(o);return Jr(e,t=t===i?t:va(t))},$n.reverse=rs,$n.sampleSize=function(e,t,n){return t=(n?wo(e,t,n):t===i)?1:va(t),(Ws(e)?er:ei)(e,t)},$n.set=function(e,t,n){return null==e?e:ti(e,t,n)},$n.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:ti(e,t,n,r)},$n.shuffle=function(e){return(Ws(e)?tr:ii)(e)},$n.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&wo(e,t,n)?(t=0,n=r):(t=null==t?0:va(t),n=n===i?r:va(n)),oi(e,t,n)):[]},$n.sortBy=Ts,$n.sortedUniq=function(e){return e&&e.length?ui(e):[]},$n.sortedUniqBy=function(e,t){return e&&e.length?ui(e,lo(t,2)):[]},$n.split=function(e,t,n){return n&&"number"!=typeof n&&wo(e,t,n)&&(t=n=i),(n=n===i?g:n>>>0)?(e=ba(e))&&("string"==typeof t||null!=t&&!ca(t))&&!(t=pi(t))&&an(e)?Si(hn(e),0,n):e.split(t,n):[]},$n.spread=function(e,t){if("function"!=typeof e)throw new Ne(o);return t=null==t?0:En(va(t),0),Jr((function(n){var r=n[t],i=Si(n,0,t);return r&&kt(i,r),Ct(e,this,i)}))},$n.tail=function(e){var t=null==e?0:e.length;return t?oi(e,1,t):[]},$n.take=function(e,t,n){return e&&e.length?oi(e,0,(t=n||t===i?1:va(t))<0?0:t):[]},$n.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?oi(e,(t=r-(t=n||t===i?1:va(t)))<0?0:t,r):[]},$n.takeRightWhile=function(e,t){return e&&e.length?mi(e,lo(t,3),!1,!0):[]},$n.takeWhile=function(e,t){return e&&e.length?mi(e,lo(t,3)):[]},$n.tap=function(e,t){return t(e),e},$n.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ne(o);return ra(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ks(e,t,{leading:r,maxWait:t,trailing:i})},$n.thru=gs,$n.toArray=ma,$n.toPairs=Ua,$n.toPairsIn=$a,$n.toPath=function(e){return Ws(e)?Rt(e,Bo):pa(e)?[e]:Pi(jo(ba(e)))},$n.toPlainObject=Ea,$n.transform=function(e,t,n){var r=Ws(e),i=r||Qs(e)||fa(e);if(t=lo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:ra(e)&&ea(o)?Hn(We(e)):{}}return(i?Ot:wr)(e,(function(e,r,i){return t(n,e,r,i)})),n},$n.unary=function(e){return Ns(e,1)},$n.union=is,$n.unionBy=os,$n.unionWith=ss,$n.uniq=function(e){return e&&e.length?fi(e):[]},$n.uniqBy=function(e,t){return e&&e.length?fi(e,lo(t,2)):[]},$n.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?fi(e,i,t):[]},$n.unset=function(e,t){return null==e||di(e,t)},$n.unzip=as,$n.unzipWith=cs,$n.update=function(e,t,n){return null==e?e:hi(e,t,Ei(n))},$n.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:hi(e,t,Ei(n),r)},$n.values=Ha,$n.valuesIn=function(e){return null==e?[]:Jt(e,Da(e))},$n.without=us,$n.words=ec,$n.wrap=function(e,t){return Bs(Ei(t),e)},$n.xor=ls,$n.xorBy=ps,$n.xorWith=fs,$n.zip=ds,$n.zipObject=function(e,t){return yi(e||[],t||[],rr)},$n.zipObjectDeep=function(e,t){return yi(e||[],t||[],ti)},$n.zipWith=hs,$n.entries=Ua,$n.entriesIn=$a,$n.extend=Sa,$n.extendWith=Ia,lc($n,$n),$n.add=Ec,$n.attempt=tc,$n.camelCase=qa,$n.capitalize=Ga,$n.ceil=bc,$n.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=_a(n))==n?n:0),t!==i&&(t=(t=_a(t))==t?t:0),ur(_a(e),t,n)},$n.clone=function(e){return lr(e,4)},$n.cloneDeep=function(e){return lr(e,5)},$n.cloneDeepWith=function(e,t){return lr(e,5,t="function"==typeof t?t:i)},$n.cloneWith=function(e,t){return lr(e,4,t="function"==typeof t?t:i)},$n.conformsTo=function(e,t){return null==t||pr(e,t,ka(t))},$n.deburr=za,$n.defaultTo=function(e,t){return null==e||e!=e?t:e},$n.divide=wc,$n.endsWith=function(e,t,n){e=ba(e),t=pi(t);var r=e.length,o=n=n===i?r:ur(va(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},$n.eq=Hs,$n.escape=function(e){return(e=ba(e))&&Q.test(e)?e.replace(X,on):e},$n.escapeRegExp=function(e){return(e=ba(e))&&oe.test(e)?e.replace(ie,"\\$&"):e},$n.every=function(e,t,n){var r=Ws(e)?At:gr;return n&&wo(e,t,n)&&(t=i),r(e,lo(t,3))},$n.find=_s,$n.findIndex=zo,$n.findKey=function(e,t){return jt(e,lo(t,3),wr)},$n.findLast=Es,$n.findLastIndex=Wo,$n.findLastKey=function(e,t){return jt(e,lo(t,3),Sr)},$n.floor=Sc,$n.forEach=bs,$n.forEachRight=ws,$n.forIn=function(e,t){return null==e?e:Er(e,lo(t,3),Da)},$n.forInRight=function(e,t){return null==e?e:br(e,lo(t,3),Da)},$n.forOwn=function(e,t){return e&&wr(e,lo(t,3))},$n.forOwnRight=function(e,t){return e&&Sr(e,lo(t,3))},$n.get=Aa,$n.gt=qs,$n.gte=Gs,$n.has=function(e,t){return null!=e&&yo(e,t,Ar)},$n.hasIn=Na,$n.head=Xo,$n.identity=sc,$n.includes=function(e,t,n,r){e=Xs(e)?e:Ha(e),n=n&&!r?va(n):0;var i=e.length;return n<0&&(n=En(i+n,0)),la(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ut(e,t,n)>-1},$n.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:va(n);return i<0&&(i=En(r+i,0)),Ut(e,t,i)},$n.inRange=function(e,t,n){return t=ga(t),n===i?(n=t,t=0):n=ga(n),function(e,t,n){return e>=bn(t,n)&&e<En(t,n)}(e=_a(e),t,n)},$n.invoke=Ra,$n.isArguments=zs,$n.isArray=Ws,$n.isArrayBuffer=Ys,$n.isArrayLike=Xs,$n.isArrayLikeObject=Ks,$n.isBoolean=function(e){return!0===e||!1===e||ia(e)&&Or(e)==E},$n.isBuffer=Qs,$n.isDate=Js,$n.isElement=function(e){return ia(e)&&1===e.nodeType&&!aa(e)},$n.isEmpty=function(e){if(null==e)return!0;if(Xs(e)&&(Ws(e)||"string"==typeof e||"function"==typeof e.splice||Qs(e)||fa(e)||zs(e)))return!e.length;var t=vo(e);if(t==C||t==N)return!e.size;if(xo(e))return!Fr(e).length;for(var n in e)if(Me.call(e,n))return!1;return!0},$n.isEqual=function(e,t){return kr(e,t)},$n.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?kr(e,t,i,n):!!r},$n.isError=Zs,$n.isFinite=function(e){return"number"==typeof e&&zt(e)},$n.isFunction=ea,$n.isInteger=ta,$n.isLength=na,$n.isMap=oa,$n.isMatch=function(e,t){return e===t||Dr(e,t,fo(t))},$n.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Dr(e,t,fo(t),n)},$n.isNaN=function(e){return sa(e)&&e!=+e},$n.isNative=function(e){if(Co(e))throw new Ie("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mr(e)},$n.isNil=function(e){return null==e},$n.isNull=function(e){return null===e},$n.isNumber=sa,$n.isObject=ra,$n.isObjectLike=ia,$n.isPlainObject=aa,$n.isRegExp=ca,$n.isSafeInteger=function(e){return ta(e)&&e>=-9007199254740991&&e<=h},$n.isSet=ua,$n.isString=la,$n.isSymbol=pa,$n.isTypedArray=fa,$n.isUndefined=function(e){return e===i},$n.isWeakMap=function(e){return ia(e)&&vo(e)==R},$n.isWeakSet=function(e){return ia(e)&&"[object WeakSet]"==Or(e)},$n.join=function(e,t){return null==e?"":yn.call(e,t)},$n.kebabCase=Wa,$n.last=Zo,$n.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=va(n))<0?En(r+o,0):bn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Bt(e,Ht,o,!0)},$n.lowerCase=Ya,$n.lowerFirst=Xa,$n.lt=da,$n.lte=ha,$n.max=function(e){return e&&e.length?vr(e,sc,Tr):i},$n.maxBy=function(e,t){return e&&e.length?vr(e,lo(t,2),Tr):i},$n.mean=function(e){return qt(e,sc)},$n.meanBy=function(e,t){return qt(e,lo(t,2))},$n.min=function(e){return e&&e.length?vr(e,sc,Br):i},$n.minBy=function(e,t){return e&&e.length?vr(e,lo(t,2),Br):i},$n.stubArray=yc,$n.stubFalse=_c,$n.stubObject=function(){return{}},$n.stubString=function(){return""},$n.stubTrue=function(){return!0},$n.multiply=Cc,$n.nth=function(e,t){return e&&e.length?Gr(e,va(t)):i},$n.noConflict=function(){return dt._===this&&(dt._=Ue),this},$n.noop=pc,$n.now=As,$n.pad=function(e,t,n){e=ba(e);var r=(t=va(t))?dn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return zi(vt(i),n)+e+zi(mt(i),n)},$n.padEnd=function(e,t,n){e=ba(e);var r=(t=va(t))?dn(e):0;return t&&r<t?e+zi(t-r,n):e},$n.padStart=function(e,t,n){e=ba(e);var r=(t=va(t))?dn(e):0;return t&&r<t?zi(t-r,n)+e:e},$n.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),Sn(ba(e).replace(se,""),t||0)},$n.random=function(e,t,n){if(n&&"boolean"!=typeof n&&wo(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=ga(e),t===i?(t=e,e=0):t=ga(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=In();return bn(e+o*(t-e+ut("1e-"+((o+"").length-1))),t)}return Kr(e,t)},$n.reduce=function(e,t,n){var r=Ws(e)?Dt:Wt,i=arguments.length<3;return r(e,lo(t,4),n,i,hr)},$n.reduceRight=function(e,t,n){var r=Ws(e)?Mt:Wt,i=arguments.length<3;return r(e,lo(t,4),n,i,mr)},$n.repeat=function(e,t,n){return t=(n?wo(e,t,n):t===i)?1:va(t),Qr(ba(e),t)},$n.replace=function(){var e=arguments,t=ba(e[0]);return e.length<3?t:t.replace(e[1],e[2])},$n.result=function(e,t,n){var r=-1,o=(t=bi(t,e)).length;for(o||(o=1,e=i);++r<o;){var s=null==e?i:e[Bo(t[r])];s===i&&(r=o,s=n),e=ea(s)?s.call(e):s}return e},$n.round=xc,$n.runInContext=e,$n.sample=function(e){return(Ws(e)?Zn:Zr)(e)},$n.size=function(e){if(null==e)return 0;if(Xs(e))return la(e)?dn(e):e.length;var t=vo(e);return t==C||t==N?e.size:Fr(e).length},$n.snakeCase=Ka,$n.some=function(e,t,n){var r=Ws(e)?Vt:si;return n&&wo(e,t,n)&&(t=i),r(e,lo(t,3))},$n.sortedIndex=function(e,t){return ai(e,t)},$n.sortedIndexBy=function(e,t,n){return ci(e,t,lo(n,2))},$n.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ai(e,t);if(r<n&&Hs(e[r],t))return r}return-1},$n.sortedLastIndex=function(e,t){return ai(e,t,!0)},$n.sortedLastIndexBy=function(e,t,n){return ci(e,t,lo(n,2),!0)},$n.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=ai(e,t,!0)-1;if(Hs(e[n],t))return n}return-1},$n.startCase=Qa,$n.startsWith=function(e,t,n){return e=ba(e),n=null==n?0:ur(va(n),0,e.length),t=pi(t),e.slice(n,n+t.length)==t},$n.subtract=Oc,$n.sum=function(e){return e&&e.length?Yt(e,sc):0},$n.sumBy=function(e,t){return e&&e.length?Yt(e,lo(t,2)):0},$n.template=function(e,t,n){var r=$n.templateSettings;n&&wo(e,t,n)&&(t=i),e=ba(e),t=Ia({},t,r,eo);var o,s,a=Ia({},t.imports,r.imports,eo),c=ka(a),u=Jt(a,c),l=0,p=t.interpolate||we,f="__p += '",d=Te((t.escape||we).source+"|"+p.source+"|"+(p===ee?he:we).source+"|"+(t.evaluate||we).source+"|$","g"),h="//# sourceURL="+(Me.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ot+"]")+"\n";e.replace(d,(function(t,n,r,i,a,c){return r||(r=i),f+=e.slice(l,c).replace(Se,sn),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),a&&(s=!0,f+="';\n"+a+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+t.length,t})),f+="';\n";var m=Me.call(t,"variable")&&t.variable;if(m){if(fe.test(m))throw new Ie("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(s?f.replace(G,""):f).replace(z,"$1").replace(W,"$1;"),f="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var g=tc((function(){return Ce(c,h+"return "+f).apply(i,u)}));if(g.source=f,Zs(g))throw g;return g},$n.times=function(e,t){if((e=va(e))<1||e>h)return[];var n=g,r=bn(e,g);t=lo(t),e-=g;for(var i=Xt(r,t);++n<e;)t(n);return i},$n.toFinite=ga,$n.toInteger=va,$n.toLength=ya,$n.toLower=function(e){return ba(e).toLowerCase()},$n.toNumber=_a,$n.toSafeInteger=function(e){return e?ur(va(e),-9007199254740991,h):0===e?e:0},$n.toString=ba,$n.toUpper=function(e){return ba(e).toUpperCase()},$n.trim=function(e,t,n){if((e=ba(e))&&(n||t===i))return Kt(e);if(!e||!(t=pi(t)))return e;var r=hn(e),o=hn(t);return Si(r,en(r,o),tn(r,o)+1).join("")},$n.trimEnd=function(e,t,n){if((e=ba(e))&&(n||t===i))return e.slice(0,mn(e)+1);if(!e||!(t=pi(t)))return e;var r=hn(e);return Si(r,0,tn(r,hn(t))+1).join("")},$n.trimStart=function(e,t,n){if((e=ba(e))&&(n||t===i))return e.replace(se,"");if(!e||!(t=pi(t)))return e;var r=hn(e);return Si(r,en(r,hn(t))).join("")},$n.truncate=function(e,t){var n=30,r="...";if(ra(t)){var o="separator"in t?t.separator:o;n="length"in t?va(t.length):n,r="omission"in t?pi(t.omission):r}var s=(e=ba(e)).length;if(an(e)){var a=hn(e);s=a.length}if(n>=s)return e;var c=n-dn(r);if(c<1)return r;var u=a?Si(a,0,c).join(""):e.slice(0,c);if(o===i)return u+r;if(a&&(c+=u.length-c),ca(o)){if(e.slice(c).search(o)){var l,p=u;for(o.global||(o=Te(o.source,ba(me.exec(o))+"g")),o.lastIndex=0;l=o.exec(p);)var f=l.index;u=u.slice(0,f===i?c:f)}}else if(e.indexOf(pi(o),c)!=c){var d=u.lastIndexOf(o);d>-1&&(u=u.slice(0,d))}return u+r},$n.unescape=function(e){return(e=ba(e))&&K.test(e)?e.replace(Y,gn):e},$n.uniqueId=function(e){var t=++Ve;return ba(e)+t},$n.upperCase=Ja,$n.upperFirst=Za,$n.each=bs,$n.eachRight=ws,$n.first=Xo,lc($n,(Ic={},wr($n,(function(e,t){Me.call($n.prototype,t)||(Ic[t]=e)})),Ic),{chain:!1}),$n.VERSION="4.17.21",Ot(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){$n[e].placeholder=$n})),Ot(["drop","take"],(function(e,t){zn.prototype[e]=function(n){n=n===i?1:En(va(n),0);var r=this.__filtered__&&!t?new zn(this):this.clone();return r.__filtered__?r.__takeCount__=bn(n,r.__takeCount__):r.__views__.push({size:bn(n,g),type:e+(r.__dir__<0?"Right":"")}),r},zn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ot(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;zn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:lo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Ot(["head","last"],(function(e,t){var n="take"+(t?"Right":"");zn.prototype[e]=function(){return this[n](1).value()[0]}})),Ot(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");zn.prototype[e]=function(){return this.__filtered__?new zn(this):this[n](1)}})),zn.prototype.compact=function(){return this.filter(sc)},zn.prototype.find=function(e){return this.filter(e).head()},zn.prototype.findLast=function(e){return this.reverse().find(e)},zn.prototype.invokeMap=Jr((function(e,t){return"function"==typeof e?new zn(this):this.map((function(n){return Lr(n,e,t)}))})),zn.prototype.reject=function(e){return this.filter(Fs(lo(e)))},zn.prototype.slice=function(e,t){e=va(e);var n=this;return n.__filtered__&&(e>0||t<0)?new zn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=va(t))<0?n.dropRight(-t):n.take(t-e)),n)},zn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},zn.prototype.toArray=function(){return this.take(g)},wr(zn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=$n[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);o&&($n.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,c=t instanceof zn,u=a[0],l=c||Ws(t),p=function(e){var t=o.apply($n,kt([e],a));return r&&f?t[0]:t};l&&n&&"function"==typeof u&&1!=u.length&&(c=l=!1);var f=this.__chain__,d=!!this.__actions__.length,h=s&&!f,m=c&&!d;if(!s&&l){t=m?t:new zn(this);var g=e.apply(t,a);return g.__actions__.push({func:gs,args:[p],thisArg:i}),new Gn(g,f)}return h&&m?e.apply(this,a):(g=this.thru(p),h?r?g.value()[0]:g.value():g)})})),Ot(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Pe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);$n.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ws(i)?i:[],e)}return this[n]((function(n){return t.apply(Ws(n)?n:[],e)}))}})),wr(zn.prototype,(function(e,t){var n=$n[t];if(n){var r=n.name+"";Me.call(Rn,r)||(Rn[r]=[]),Rn[r].push({name:t,func:n})}})),Rn[$i(i,2).name]=[{name:"wrapper",func:i}],zn.prototype.clone=function(){var e=new zn(this.__wrapped__);return e.__actions__=Pi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Pi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Pi(this.__views__),e},zn.prototype.reverse=function(){if(this.__filtered__){var e=new zn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},zn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ws(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=bn(t,e+s);break;case"takeRight":e=En(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,c=a-s,u=r?a:s-1,l=this.__iteratees__,p=l.length,f=0,d=bn(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return gi(e,this.__actions__);var h=[];e:for(;c--&&f<d;){for(var m=-1,g=e[u+=t];++m<p;){var v=l[m],y=v.iteratee,_=v.type,E=y(g);if(2==_)g=E;else if(!E){if(1==_)continue e;break e}}h[f++]=g}return h},$n.prototype.at=vs,$n.prototype.chain=function(){return ms(this)},$n.prototype.commit=function(){return new Gn(this.value(),this.__chain__)},$n.prototype.next=function(){this.__values__===i&&(this.__values__=ma(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},$n.prototype.plant=function(e){for(var t,n=this;n instanceof qn;){var r=$o(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},$n.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof zn){var t=e;return this.__actions__.length&&(t=new zn(this)),(t=t.reverse()).__actions__.push({func:gs,args:[rs],thisArg:i}),new Gn(t,this.__chain__)}return this.thru(rs)},$n.prototype.toJSON=$n.prototype.valueOf=$n.prototype.value=function(){return gi(this.__wrapped__,this.__actions__)},$n.prototype.first=$n.prototype.head,et&&($n.prototype[et]=function(){return this}),$n}();dt._=vn,(r=function(){return vn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},9593:(e,t,n)=>{"use strict";const r=n(4411),i=Symbol("max"),o=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),c=Symbol("maxAge"),u=Symbol("dispose"),l=Symbol("noDisposeOnSet"),p=Symbol("lruList"),f=Symbol("cache"),d=Symbol("updateAgeOnGet"),h=()=>1;const m=(e,t,n)=>{const r=e[f].get(t);if(r){const t=r.value;if(g(e,t)){if(y(e,r),!e[a])return}else n&&(e[d]&&(r.value.now=Date.now()),e[p].unshiftNode(r));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[c]&&n>e[c]},v=e=>{if(e[o]>e[i])for(let t=e[p].tail;e[o]>e[i]&&null!==t;){const n=t.prev;y(e,t),t=n}},y=(e,t)=>{if(t){const n=t.value;e[u]&&e[u](n.key,n.value),e[o]-=n.length,e[f].delete(n.key),e[p].removeNode(t)}};class _{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}const E=(e,t,n,r)=>{let i=n.value;g(e,i)&&(y(e,n),e[a]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||h;if(this[s]="function"!=typeof t?h:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[u]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[d]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,v(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,v(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[s]&&(this[s]=e,this[o]=0,this[p].forEach((e=>{e.length=this[s](e.value,e.key),this[o]+=e.length}))),v(this)}get lengthCalculator(){return this[s]}get length(){return this[o]}get itemCount(){return this[p].length}rforEach(e,t){t=t||this;for(let n=this[p].tail;null!==n;){const r=n.prev;E(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[p].head;null!==n;){const r=n.next;E(this,e,n,t),n=r}}keys(){return this[p].toArray().map((e=>e.key))}values(){return this[p].toArray().map((e=>e.value))}reset(){this[u]&&this[p]&&this[p].length&&this[p].forEach((e=>this[u](e.key,e.value))),this[f]=new Map,this[p]=new r,this[o]=0}dump(){return this[p].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[p]}set(e,t,n){if((n=n||this[c])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,a=this[s](t,e);if(this[f].has(e)){if(a>this[i])return y(this,this[f].get(e)),!1;const s=this[f].get(e).value;return this[u]&&(this[l]||this[u](e,s.value)),s.now=r,s.maxAge=n,s.value=t,this[o]+=a-s.length,s.length=a,this.get(e),v(this),!0}const d=new _(e,t,a,r,n);return d.length>this[i]?(this[u]&&this[u](e,t),!1):(this[o]+=d.length,this[p].unshift(d),this[f].set(e,this[p].head),v(this),!0)}has(e){if(!this[f].has(e))return!1;const t=this[f].get(e).value;return!g(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[p].tail;return e?(y(this,e),e.value):null}del(e){y(this,this[f].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{const e=i-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[f].forEach(((e,t)=>m(this,t,!1)))}}},1171:(e,t,n)=>{e.exports=f,f.Minimatch=d;var r={sep:"/"};try{r=n(5622)}catch(e){}var i=f.GLOBSTAR=d.GLOBSTAR={},o=n(3644),s={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},a="[^/]",c="[^/]*?",u="().*{}+?[]^$\\!".split("").reduce((function(e,t){return e[t]=!0,e}),{});var l=/\/+/;function p(e,t){e=e||{},t=t||{};var n={};return Object.keys(t).forEach((function(e){n[e]=t[e]})),Object.keys(e).forEach((function(t){n[t]=e[t]})),n}function f(e,t,n){if("string"!=typeof t)throw new TypeError("glob pattern string required");return n||(n={}),!(!n.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new d(t,n).match(e))}function d(e,t){if(!(this instanceof d))return new d(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==r.sep&&(e=e.split(r.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function h(e,t){if(t||(t=this instanceof d?this.options:{}),void 0===(e=void 0===e?this.pattern:e))throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:o(e)}f.filter=function(e,t){return t=t||{},function(n,r,i){return f(n,e,t)}},f.defaults=function(e){if(!e||!Object.keys(e).length)return f;var t=f,n=function(n,r,i){return t.minimatch(n,r,p(e,i))};return n.Minimatch=function(n,r){return new t.Minimatch(n,p(e,r))},n},d.defaults=function(e){return e&&Object.keys(e).length?f.defaults(e).Minimatch:d},d.prototype.debug=function(){},d.prototype.make=function(){if(this._made)return;var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();var n=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error);this.debug(this.pattern,n),n=this.globParts=n.map((function(e){return e.split(l)})),this.debug(this.pattern,n),n=n.map((function(e,t,n){return e.map(this.parse,this)}),this),this.debug(this.pattern,n),n=n.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,n),this.set=n},d.prototype.parseNegate=function(){var e=this.pattern,t=!1,n=this.options,r=0;if(n.nonegate)return;for(var i=0,o=e.length;i<o&&"!"===e.charAt(i);i++)t=!t,r++;r&&(this.pattern=e.substr(r));this.negate=t},f.braceExpand=function(e,t){return h(e,t)},d.prototype.braceExpand=h,d.prototype.parse=function(e,t){if(e.length>65536)throw new TypeError("pattern is too long");var n=this.options;if(!n.noglobstar&&"**"===e)return i;if(""===e)return"";var r,o="",l=!!n.nocase,p=!1,f=[],d=[],h=!1,g=-1,v=-1,y="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",_=this;function E(){if(r){switch(r){case"*":o+=c,l=!0;break;case"?":o+=a,l=!0;break;default:o+="\\"+r}_.debug("clearStateChar %j %j",r,o),r=!1}}for(var b,w=0,S=e.length;w<S&&(b=e.charAt(w));w++)if(this.debug("%s\t%s %s %j",e,w,o,b),p&&u[b])o+="\\"+b,p=!1;else switch(b){case"/":return!1;case"\\":E(),p=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,w,o,b),h){this.debug(" in class"),"!"===b&&w===v+1&&(b="^"),o+=b;continue}_.debug("call clearStateChar %j",r),E(),r=b,n.noext&&E();continue;case"(":if(h){o+="(";continue}if(!r){o+="\\(";continue}f.push({type:r,start:w-1,reStart:o.length,open:s[r].open,close:s[r].close}),o+="!"===r?"(?:(?!(?:":"(?:",this.debug("plType %j %j",r,o),r=!1;continue;case")":if(h||!f.length){o+="\\)";continue}E(),l=!0;var I=f.pop();o+=I.close,"!"===I.type&&d.push(I),I.reEnd=o.length;continue;case"|":if(h||!f.length||p){o+="\\|",p=!1;continue}E(),o+="|";continue;case"[":if(E(),h){o+="\\"+b;continue}h=!0,v=w,g=o.length,o+=b;continue;case"]":if(w===v+1||!h){o+="\\"+b,p=!1;continue}if(h){var C=e.substring(v+1,w);try{RegExp("["+C+"]")}catch(e){var x=this.parse(C,m);o=o.substr(0,g)+"\\["+x[0]+"\\]",l=l||x[1],h=!1;continue}}l=!0,h=!1,o+=b;continue;default:E(),p?p=!1:!u[b]||"^"===b&&h||(o+="\\"),o+=b}h&&(C=e.substr(v+1),x=this.parse(C,m),o=o.substr(0,g)+"\\["+x[0],l=l||x[1]);for(I=f.pop();I;I=f.pop()){var O=o.slice(I.reStart+I.open.length);this.debug("setting tail",o,I),O=O.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(e,t,n){return n||(n="\\"),t+t+n+"|"})),this.debug("tail=%j\n %s",O,O,I,o);var T="*"===I.type?c:"?"===I.type?a:"\\"+I.type;l=!0,o=o.slice(0,I.reStart)+T+"\\("+O}E(),p&&(o+="\\\\");var A=!1;switch(o.charAt(0)){case".":case"[":case"(":A=!0}for(var N=d.length-1;N>-1;N--){var P=d[N],L=o.slice(0,P.reStart),R=o.slice(P.reStart,P.reEnd-8),k=o.slice(P.reEnd-8,P.reEnd),D=o.slice(P.reEnd);k+=D;var M=L.split("(").length-1,V=D;for(w=0;w<M;w++)V=V.replace(/\)[+*?]?/,"");var F="";""===(D=V)&&t!==m&&(F="$"),o=L+R+D+F+k}""!==o&&l&&(o="(?=.)"+o);A&&(o=y+o);if(t===m)return[o,l];if(!l)return function(e){return e.replace(/\\(.)/g,"$1")}(e);var j=n.nocase?"i":"";try{var B=new RegExp("^"+o+"$",j)}catch(e){return new RegExp("$.")}return B._glob=e,B._src=o,B};var m={};f.makeRe=function(e,t){return new d(e,t||{}).makeRe()},d.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,n=t.noglobstar?c:t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=t.nocase?"i":"",o=e.map((function(e){return e.map((function(e){return e===i?n:"string"==typeof e?function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(e):e._src})).join("\\/")})).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=new RegExp(o,r)}catch(e){this.regexp=!1}return this.regexp},f.match=function(e,t,n){var r=new d(t,n=n||{});return e=e.filter((function(e){return r.match(e)})),r.options.nonull&&!e.length&&e.push(t),e},d.prototype.match=function(e,t){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var n=this.options;"/"!==r.sep&&(e=e.split(r.sep).join("/"));e=e.split(l),this.debug(this.pattern,"split",e);var i,o,s=this.set;for(this.debug(this.pattern,"set",s),o=e.length-1;o>=0&&!(i=e[o]);o--);for(o=0;o<s.length;o++){var a=s[o],c=e;if(n.matchBase&&1===a.length&&(c=[i]),this.matchOne(c,a,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate},d.prototype.matchOne=function(e,t,n){var r=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var o=0,s=0,a=e.length,c=t.length;o<a&&s<c;o++,s++){this.debug("matchOne loop");var u,l=t[s],p=e[o];if(this.debug(t,l,p),!1===l)return!1;if(l===i){this.debug("GLOBSTAR",[t,l,p]);var f=o,d=s+1;if(d===c){for(this.debug("** at the end");o<a;o++)if("."===e[o]||".."===e[o]||!r.dot&&"."===e[o].charAt(0))return!1;return!0}for(;f<a;){var h=e[f];if(this.debug("\nglobstar while",e,f,t,d,h),this.matchOne(e.slice(f),t.slice(d),n))return this.debug("globstar found match!",f,a,h),!0;if("."===h||".."===h||!r.dot&&"."===h.charAt(0)){this.debug("dot detected!",e,f,t,d);break}this.debug("globstar swallow a segment, and continue"),f++}return!(!n||(this.debug("\n>>> no match, partial?",e,f,t,d),f!==a))}if("string"==typeof l?(u=r.nocase?p.toLowerCase()===l.toLowerCase():p===l,this.debug("string match",l,p,u)):(u=p.match(l),this.debug("pattern match",l,p,u)),!u)return!1}if(o===a&&s===c)return!0;if(o===a)return n;if(s===c)return o===a-1&&""===e[o];throw new Error("wtf?")}},7824:e=>{var t=1e3,n=60*t,r=60*n,i=24*r,o=7*i,s=365.25*i;function a(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,c){c=c||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var a=/^(-?(?:\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(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"weeks":case"week":case"w":return c*o;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===u&&isFinite(e))return c.long?function(e){var o=Math.abs(e);if(o>=i)return a(e,o,i,"day");if(o>=r)return a(e,o,r,"hour");if(o>=n)return a(e,o,n,"minute");if(o>=t)return a(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=i)return Math.round(e/i)+"d";if(o>=r)return Math.round(e/r)+"h";if(o>=n)return Math.round(e/n)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},778:(e,t,n)=>{var r=n(2479);function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}e.exports=r(i),e.exports.strict=r(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},4095:e=>{"use strict";function t(e){return"/"===e.charAt(0)}function n(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/.exec(e),n=t[1]||"",r=Boolean(n&&":"!==n.charAt(1));return Boolean(t[2]||r)}e.exports="win32"===process.platform?n:t,e.exports.posix=t,e.exports.win32=n},9916:e=>{function t(){this.pending=0,this.max=1/0,this.listeners=[],this.waiting=[],this.error=null}function n(e){e.pending+=1;var t=!1;return function(i){if(t)throw new Error("callback called twice");if(t=!0,e.error=e.error||i,e.pending-=1,e.waiting.length>0&&e.pending<e.max)r(e,e.waiting.shift());else if(0===e.pending){var o=e.listeners;e.listeners=[],o.forEach(n)}};function n(t){t(e.error)}}function r(e,t){t(n(e))}e.exports=t,t.prototype.go=function(e){this.pending<this.max?r(this,e):this.waiting.push(e)},t.prototype.wait=function(e){0===this.pending?e(this.error):this.listeners.push(e)},t.prototype.hold=function(){return n(this)}},4286:(e,t,n)=>{var r=n(778),i=n(2840),o=n(5747),s=function(){},a=/^v?\.0/.test(process.version),c=function(e){return"function"==typeof e},u=function(e,t,n,u){u=r(u);var l=!1;e.on("close",(function(){l=!0})),i(e,{readable:t,writable:n},(function(e){if(e)return u(e);l=!0,u()}));var p=!1;return function(t){if(!l&&!p)return p=!0,function(e){return!!a&&!!o&&(e instanceof(o.ReadStream||s)||e instanceof(o.WriteStream||s))&&c(e.close)}(e)?e.close(s):function(e){return e.setHeader&&c(e.abort)}(e)?e.abort():c(e.destroy)?e.destroy():void u(t||new Error("stream was destroyed"))}},l=function(e){e()},p=function(e,t){return e.pipe(t)};e.exports=function(){var e,t=Array.prototype.slice.call(arguments),n=c(t[t.length-1]||s)&&t.pop()||s;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var r=t.map((function(i,o){var s=o<t.length-1;return u(i,s,o>0,(function(t){e||(e=t),t&&r.forEach(l),s||(r.forEach(l),n(e))}))}));return t.reduce(p)}},984:(e,t,n)=>{const r=n(2357),i=n(5622),o=n(5747);let s;try{s=n(2884)}catch(e){}const a={nosort:!0,silent:!0};let c=0;const u="win32"===process.platform,l=e=>{if(["unlink","chmod","stat","lstat","rmdir","readdir"].forEach((t=>{e[t]=e[t]||o[t],e[t+="Sync"]=e[t]||o[t]})),e.maxBusyTries=e.maxBusyTries||3,e.emfileWait=e.emfileWait||1e3,!1===e.glob&&(e.disableGlob=!0),!0!==e.disableGlob&&void 0===s)throw Error("glob dependency not found, set `options.disableGlob = true` if intentional");e.disableGlob=e.disableGlob||!1,e.glob=e.glob||a},p=(e,t,n)=>{"function"==typeof t&&(n=t,t={}),r(e,"rimraf: missing path"),r.equal(typeof e,"string","rimraf: path should be a string"),r.equal(typeof n,"function","rimraf: callback function required"),r(t,"rimraf: invalid options argument provided"),r.equal(typeof t,"object","rimraf: options should be object"),l(t);let i=0,o=null,a=0;const u=(e,r)=>e?n(e):(a=r.length,0===a?n():void r.forEach((e=>{const r=s=>{if(s){if(("EBUSY"===s.code||"ENOTEMPTY"===s.code||"EPERM"===s.code)&&i<t.maxBusyTries)return i++,setTimeout((()=>f(e,t,r)),100*i);if("EMFILE"===s.code&&c<t.emfileWait)return setTimeout((()=>f(e,t,r)),c++);"ENOENT"===s.code&&(s=null)}c=0,(e=>{o=o||e,0==--a&&n(o)})(s)};f(e,t,r)})));if(t.disableGlob||!s.hasMagic(e))return u(null,[e]);t.lstat(e,((n,r)=>{if(!n)return u(null,[e]);s(e,t.glob,u)}))},f=(e,t,n)=>{r(e),r(t),r("function"==typeof n),t.lstat(e,((r,i)=>r&&"ENOENT"===r.code?n(null):(r&&"EPERM"===r.code&&u&&d(e,t,r,n),i&&i.isDirectory()?m(e,t,r,n):void t.unlink(e,(r=>{if(r){if("ENOENT"===r.code)return n(null);if("EPERM"===r.code)return u?d(e,t,r,n):m(e,t,r,n);if("EISDIR"===r.code)return m(e,t,r,n)}return n(r)})))))},d=(e,t,n,i)=>{r(e),r(t),r("function"==typeof i),t.chmod(e,438,(r=>{r?i("ENOENT"===r.code?null:n):t.stat(e,((r,o)=>{r?i("ENOENT"===r.code?null:n):o.isDirectory()?m(e,t,n,i):t.unlink(e,i)}))}))},h=(e,t,n)=>{r(e),r(t);try{t.chmodSync(e,438)}catch(e){if("ENOENT"===e.code)return;throw n}let i;try{i=t.statSync(e)}catch(e){if("ENOENT"===e.code)return;throw n}i.isDirectory()?y(e,t,n):t.unlinkSync(e)},m=(e,t,n,i)=>{r(e),r(t),r("function"==typeof i),t.rmdir(e,(r=>{!r||"ENOTEMPTY"!==r.code&&"EEXIST"!==r.code&&"EPERM"!==r.code?r&&"ENOTDIR"===r.code?i(n):i(r):g(e,t,i)}))},g=(e,t,n)=>{r(e),r(t),r("function"==typeof n),t.readdir(e,((r,o)=>{if(r)return n(r);let s,a=o.length;if(0===a)return t.rmdir(e,n);o.forEach((r=>{p(i.join(e,r),t,(r=>{if(!s)return r?n(s=r):void(0==--a&&t.rmdir(e,n))}))}))}))},v=(e,t)=>{let n;if(l(t=t||{}),r(e,"rimraf: missing path"),r.equal(typeof e,"string","rimraf: path should be a string"),r(t,"rimraf: missing options"),r.equal(typeof t,"object","rimraf: options should be object"),t.disableGlob||!s.hasMagic(e))n=[e];else try{t.lstatSync(e),n=[e]}catch(r){n=s.sync(e,t.glob)}if(n.length)for(let e=0;e<n.length;e++){const r=n[e];let i;try{i=t.lstatSync(r)}catch(e){if("ENOENT"===e.code)return;"EPERM"===e.code&&u&&h(r,t,e)}try{i&&i.isDirectory()?y(r,t,null):t.unlinkSync(r)}catch(e){if("ENOENT"===e.code)return;if("EPERM"===e.code)return u?h(r,t,e):y(r,t,e);if("EISDIR"!==e.code)throw e;y(r,t,e)}}},y=(e,t,n)=>{r(e),r(t);try{t.rmdirSync(e)}catch(r){if("ENOENT"===r.code)return;if("ENOTDIR"===r.code)throw n;"ENOTEMPTY"!==r.code&&"EEXIST"!==r.code&&"EPERM"!==r.code||_(e,t)}},_=(e,t)=>{r(e),r(t),t.readdirSync(e).forEach((n=>v(i.join(e,n),t)));const n=u?100:1;let o=0;for(;;){let r=!0;try{const i=t.rmdirSync(e,t);return r=!1,i}finally{if(++o<n&&r)continue}}};e.exports=p,p.sync=v},2257:(e,t,n)=>{const r=Symbol("SemVer ANY");class i{static get ANY(){return r}constructor(e,t){if(t=o(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}u("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new l(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new p(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new p(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=c(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),u=c(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||o&&s||a||u}}e.exports=i;const o=n(2893),{re:s,t:a}=n(5765),c=n(7539),u=n(4225),l=n(6376),p=n(6902)},6902:(e,t,n)=>{class r{constructor(e,t){if(t=o(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&m(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=i.get(t);if(n)return n;const r=this.options.loose,o=r?u[l.HYPHENRANGELOOSE]:u[l.HYPHENRANGE];e=e.replace(o,O(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(u[l.COMPARATORTRIM],p),a("comparator trim",e,u[l.COMPARATORTRIM]),e=(e=(e=e.replace(u[l.TILDETRIM],f)).replace(u[l.CARETTRIM],d)).split(/\s+/).join(" ");const c=r?u[l.COMPARATORLOOSE]:u[l.COMPARATOR],m=e.split(" ").map((e=>v(e,this.options))).join(" ").split(/\s+/).map((e=>x(e,this.options))).filter(this.options.loose?e=>!!e.match(c):()=>!0).map((e=>new s(e,this.options))),g=(m.length,new Map);for(const e of m){if(h(e))return[e];g.set(e.value,e)}g.size>1&&g.has("")&&g.delete("");const y=[...g.values()];return i.set(t,y),y}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some((n=>g(n,t)&&e.set.some((e=>g(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(T(this.set[t],e,this.options))return!0;return!1}}e.exports=r;const i=new(n(9593))({max:1e3}),o=n(2893),s=n(2257),a=n(4225),c=n(6376),{re:u,t:l,comparatorTrimReplace:p,tildeTrimReplace:f,caretTrimReplace:d}=n(5765),h=e=>"<0.0.0-0"===e.value,m=e=>""===e.value,g=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},v=(e,t)=>(a("comp",e,t),e=b(e,t),a("caret",e),e=_(e,t),a("tildes",e),e=S(e,t),a("xrange",e),e=C(e,t),a("stars",e),e),y=e=>!e||"x"===e.toLowerCase()||"*"===e,_=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{const n=t.loose?u[l.TILDELOOSE]:u[l.TILDE];return e.replace(n,((t,n,r,i,o)=>{let s;return a("tilde",e,t,n,r,i,o),y(n)?s="":y(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:y(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:o?(a("replaceTilde pr",o),s=`>=${n}.${r}.${i}-${o} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,a("tilde return",s),s}))},b=(e,t)=>e.trim().split(/\s+/).map((e=>w(e,t))).join(" "),w=(e,t)=>{a("caret",e,t);const n=t.loose?u[l.CARETLOOSE]:u[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,o,s)=>{let c;return a("caret",e,t,n,i,o,s),y(n)?c="":y(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:y(o)?c="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(a("replaceCaret pr",s),c="0"===n?"0"===i?`>=${n}.${i}.${o}-${s} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o}-${s} <${+n+1}.0.0-0`):(a("no pr"),c="0"===n?"0"===i?`>=${n}.${i}.${o}${r} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o} <${+n+1}.0.0-0`),a("caret return",c),c}))},S=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>I(e,t))).join(" ")),I=(e,t)=>{e=e.trim();const n=t.loose?u[l.XRANGELOOSE]:u[l.XRANGE];return e.replace(n,((n,r,i,o,s,c)=>{a("xRange",e,n,r,i,o,s,c);const u=y(i),l=u||y(o),p=l||y(s),f=p;return"="===r&&f&&(r=""),c=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&f?(l&&(o=0),s=0,">"===r?(r=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",l?i=+i+1:o=+o+1),"<"===r&&(c="-0"),n=`${r+i}.${o}.${s}${c}`):l?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:p&&(n=`>=${i}.${o}.0${c} <${i}.${+o+1}.0-0`),a("xRange return",n),n}))},C=(e,t)=>(a("replaceStars",e,t),e.trim().replace(u[l.STAR],"")),x=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),O=e=>(t,n,r,i,o,s,a,c,u,l,p,f,d)=>`${n=y(r)?"":y(i)?`>=${r}.0.0${e?"-0":""}`:y(o)?`>=${r}.${i}.0${e?"-0":""}`:s?`>=${n}`:`>=${n}${e?"-0":""}`} ${c=y(u)?"":y(l)?`<${+u+1}.0.0-0`:y(p)?`<${u}.${+l+1}.0-0`:f?`<=${u}.${l}.${p}-${f}`:e?`<${u}.${l}.${+p+1}-0`:`<=${c}`}`.trim(),T=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(a(e[n].semver),e[n].semver!==s.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},6376:(e,t,n)=>{const r=n(4225),{MAX_LENGTH:i,MAX_SAFE_INTEGER:o}=n(3295),{re:s,t:a}=n(5765),c=n(2893),{compareIdentifiers:u}=n(6742);class l{constructor(e,t){if(t=c(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>i)throw new TypeError(`version is longer than ${i} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<o)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),u(this.major,e.major)||u(this.minor,e.minor)||u(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],i=e.prerelease[t];if(r("prerelease compare",t,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return u(n,i)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const n=this.build[t],i=e.build[t];if(r("prerelease compare",t,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return u(n,i)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=l},3507:(e,t,n)=>{const r=n(3959);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},7539:(e,t,n)=>{const r=n(8718),i=n(1194),o=n(1312),s=n(5903),a=n(1544),c=n(2056);e.exports=(e,t,n,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,u);case"!=":return i(e,n,u);case">":return o(e,n,u);case">=":return s(e,n,u);case"<":return a(e,n,u);case"<=":return c(e,n,u);default:throw new TypeError(`Invalid operator: ${t}`)}}},9038:(e,t,n)=>{const r=n(6376),i=n(3959),{re:o,t:s}=n(5765);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=o[s.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),o[s.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;o[s.COERCERTL].lastIndex=-1}else n=e.match(o[s.COERCE]);return null===n?null:i(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},8880:(e,t,n)=>{const r=n(6376);e.exports=(e,t,n)=>{const i=new r(e,n),o=new r(t,n);return i.compare(o)||i.compareBuild(o)}},7880:(e,t,n)=>{const r=n(6269);e.exports=(e,t)=>r(e,t,!0)},6269:(e,t,n)=>{const r=n(6376);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},2378:(e,t,n)=>{const r=n(3959),i=n(8718);e.exports=(e,t)=>{if(i(e,t))return null;{const n=r(e),i=r(t),o=n.prerelease.length||i.prerelease.length,s=o?"pre":"",a=o?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==i[e])return s+e;return a}}},8718:(e,t,n)=>{const r=n(6269);e.exports=(e,t,n)=>0===r(e,t,n)},1312:(e,t,n)=>{const r=n(6269);e.exports=(e,t,n)=>r(e,t,n)>0},5903:(e,t,n)=>{const r=n(6269);e.exports=(e,t,n)=>r(e,t,n)>=0},253:(e,t,n)=>{const r=n(6376);e.exports=(e,t,n,i)=>{"string"==typeof n&&(i=n,n=void 0);try{return new r(e,n).inc(t,i).version}catch(e){return null}}},1544:(e,t,n)=>{const r=n(6269);e.exports=(e,t,n)=>r(e,t,n)<0},2056:(e,t,n)=>{const r=n(6269);e.exports=(e,t,n)=>r(e,t,n)<=0},8679:(e,t,n)=>{const r=n(6376);e.exports=(e,t)=>new r(e,t).major},7789:(e,t,n)=>{const r=n(6376);e.exports=(e,t)=>new r(e,t).minor},1194:(e,t,n)=>{const r=n(6269);e.exports=(e,t,n)=>0!==r(e,t,n)},3959:(e,t,n)=>{const{MAX_LENGTH:r}=n(3295),{re:i,t:o}=n(5765),s=n(6376),a=n(2893);e.exports=(e,t)=>{if(t=a(t),e instanceof s)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?i[o.LOOSE]:i[o.FULL]).test(e))return null;try{return new s(e,t)}catch(e){return null}}},2358:(e,t,n)=>{const r=n(6376);e.exports=(e,t)=>new r(e,t).patch},7559:(e,t,n)=>{const r=n(3959);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},9795:(e,t,n)=>{const r=n(6269);e.exports=(e,t,n)=>r(t,e,n)},3657:(e,t,n)=>{const r=n(8880);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},5712:(e,t,n)=>{const r=n(6902);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},1100:(e,t,n)=>{const r=n(8880);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},6397:(e,t,n)=>{const r=n(3959);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},1249:(e,t,n)=>{const r=n(5765);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(3295).SEMVER_SPEC_VERSION,SemVer:n(6376),compareIdentifiers:n(6742).compareIdentifiers,rcompareIdentifiers:n(6742).rcompareIdentifiers,parse:n(3959),valid:n(6397),clean:n(3507),inc:n(253),diff:n(2378),major:n(8679),minor:n(7789),patch:n(2358),prerelease:n(7559),compare:n(6269),rcompare:n(9795),compareLoose:n(7880),compareBuild:n(8880),sort:n(1100),rsort:n(3657),gt:n(1312),lt:n(1544),eq:n(8718),neq:n(1194),gte:n(5903),lte:n(2056),cmp:n(7539),coerce:n(9038),Comparator:n(2257),Range:n(6902),satisfies:n(5712),toComparators:n(1042),maxSatisfying:n(5775),minSatisfying:n(1657),minVersion:n(5316),validRange:n(9042),outside:n(6826),gtr:n(7606),ltr:n(32),intersects:n(2937),simplifyRange:n(7908),subset:n(799)}},3295:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},4225:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},6742:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),i=t.test(n);return r&&i&&(e=+e,n=+n),e===n?0:r&&!i?-1:i&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},2893:e=>{const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},5765:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r}=n(3295),i=n(4225),o=(t=e.exports={}).re=[],s=t.src=[],a=t.t={};let c=0;const u=(e,t,n)=>{const r=c++;i(r,t),a[e]=r,s[r]=t,o[r]=new RegExp(t,n?"g":void 0)};u("NUMERICIDENTIFIER","0|[1-9]\\d*"),u("NUMERICIDENTIFIERLOOSE","[0-9]+"),u("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),u("MAINVERSION",`(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})`),u("MAINVERSIONLOOSE",`(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})`),u("PRERELEASEIDENTIFIER",`(?:${s[a.NUMERICIDENTIFIER]}|${s[a.NONNUMERICIDENTIFIER]})`),u("PRERELEASEIDENTIFIERLOOSE",`(?:${s[a.NUMERICIDENTIFIERLOOSE]}|${s[a.NONNUMERICIDENTIFIER]})`),u("PRERELEASE",`(?:-(${s[a.PRERELEASEIDENTIFIER]}(?:\\.${s[a.PRERELEASEIDENTIFIER]})*))`),u("PRERELEASELOOSE",`(?:-?(${s[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[a.PRERELEASEIDENTIFIERLOOSE]})*))`),u("BUILDIDENTIFIER","[0-9A-Za-z-]+"),u("BUILD",`(?:\\+(${s[a.BUILDIDENTIFIER]}(?:\\.${s[a.BUILDIDENTIFIER]})*))`),u("FULLPLAIN",`v?${s[a.MAINVERSION]}${s[a.PRERELEASE]}?${s[a.BUILD]}?`),u("FULL",`^${s[a.FULLPLAIN]}$`),u("LOOSEPLAIN",`[v=\\s]*${s[a.MAINVERSIONLOOSE]}${s[a.PRERELEASELOOSE]}?${s[a.BUILD]}?`),u("LOOSE",`^${s[a.LOOSEPLAIN]}$`),u("GTLT","((?:<|>)?=?)"),u("XRANGEIDENTIFIERLOOSE",`${s[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),u("XRANGEIDENTIFIER",`${s[a.NUMERICIDENTIFIER]}|x|X|\\*`),u("XRANGEPLAIN",`[v=\\s]*(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:${s[a.PRERELEASE]})?${s[a.BUILD]}?)?)?`),u("XRANGEPLAINLOOSE",`[v=\\s]*(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:${s[a.PRERELEASELOOSE]})?${s[a.BUILD]}?)?)?`),u("XRANGE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAIN]}$`),u("XRANGELOOSE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAINLOOSE]}$`),u("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),u("COERCERTL",s[a.COERCE],!0),u("LONETILDE","(?:~>?)"),u("TILDETRIM",`(\\s*)${s[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",u("TILDE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAIN]}$`),u("TILDELOOSE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAINLOOSE]}$`),u("LONECARET","(?:\\^)"),u("CARETTRIM",`(\\s*)${s[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",u("CARET",`^${s[a.LONECARET]}${s[a.XRANGEPLAIN]}$`),u("CARETLOOSE",`^${s[a.LONECARET]}${s[a.XRANGEPLAINLOOSE]}$`),u("COMPARATORLOOSE",`^${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]})$|^$`),u("COMPARATOR",`^${s[a.GTLT]}\\s*(${s[a.FULLPLAIN]})$|^$`),u("COMPARATORTRIM",`(\\s*)${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]}|${s[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",u("HYPHENRANGE",`^\\s*(${s[a.XRANGEPLAIN]})\\s+-\\s+(${s[a.XRANGEPLAIN]})\\s*$`),u("HYPHENRANGELOOSE",`^\\s*(${s[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[a.XRANGEPLAINLOOSE]})\\s*$`),u("STAR","(<|>)?=?\\s*\\*"),u("GTE0","^\\s*>=\\s*0.0.0\\s*$"),u("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},7606:(e,t,n)=>{const r=n(6826);e.exports=(e,t,n)=>r(e,t,">",n)},2937:(e,t,n)=>{const r=n(6902);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t))},32:(e,t,n)=>{const r=n(6826);e.exports=(e,t,n)=>r(e,t,"<",n)},5775:(e,t,n)=>{const r=n(6376),i=n(6902);e.exports=(e,t,n)=>{let o=null,s=null,a=null;try{a=new i(t,n)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&-1!==s.compare(e)||(o=e,s=new r(o,n)))})),o}},1657:(e,t,n)=>{const r=n(6376),i=n(6902);e.exports=(e,t,n)=>{let o=null,s=null,a=null;try{a=new i(t,n)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&1!==s.compare(e)||(o=e,s=new r(o,n)))})),o}},5316:(e,t,n)=>{const r=n(6376),i=n(6902),o=n(1312);e.exports=(e,t)=>{e=new i(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const i=e.set[t];let s=null;i.forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!o(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||n&&!o(n,s)||(n=s)}return n&&e.test(n)?n:null}},6826:(e,t,n)=>{const r=n(6376),i=n(2257),{ANY:o}=i,s=n(6902),a=n(5712),c=n(1312),u=n(1544),l=n(2056),p=n(5903);e.exports=(e,t,n,f)=>{let d,h,m,g,v;switch(e=new r(e,f),t=new s(t,f),n){case">":d=c,h=l,m=u,g=">",v=">=";break;case"<":d=u,h=p,m=c,g="<",v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,f))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let s=null,a=null;if(r.forEach((e=>{e.semver===o&&(e=new i(">=0.0.0")),s=s||e,a=a||e,d(e.semver,s.semver,f)?s=e:m(e.semver,a.semver,f)&&(a=e)})),s.operator===g||s.operator===v)return!1;if((!a.operator||a.operator===g)&&h(e,a.semver))return!1;if(a.operator===v&&m(e,a.semver))return!1}return!0}},7908:(e,t,n)=>{const r=n(5712),i=n(6269);e.exports=(e,t,n)=>{const o=[];let s=null,a=null;const c=e.sort(((e,t)=>i(e,t,n)));for(const e of c){r(e,t,n)?(a=e,s||(s=e)):(a&&o.push([s,a]),a=null,s=null)}s&&o.push([s,null]);const u=[];for(const[e,t]of o)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");const l=u.join(" || "),p="string"==typeof t.raw?t.raw:String(t);return l.length<p.length?l:t}},799:(e,t,n)=>{const r=n(6902),i=n(2257),{ANY:o}=i,s=n(5712),a=n(6269),c=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===o){if(1===t.length&&t[0].semver===o)return!0;e=n.includePrerelease?[new i(">=0.0.0-0")]:[new i(">=0.0.0")]}if(1===t.length&&t[0].semver===o){if(n.includePrerelease)return!0;t=[new i(">=0.0.0")]}const r=new Set;let c,p,f,d,h,m,g;for(const t of e)">"===t.operator||">="===t.operator?c=u(c,t,n):"<"===t.operator||"<="===t.operator?p=l(p,t,n):r.add(t.semver);if(r.size>1)return null;if(c&&p){if(f=a(c.semver,p.semver,n),f>0)return null;if(0===f&&(">="!==c.operator||"<="!==p.operator))return null}for(const e of r){if(c&&!s(e,String(c),n))return null;if(p&&!s(e,String(p),n))return null;for(const r of t)if(!s(e,String(r),n))return!1;return!0}let v=!(!p||n.includePrerelease||!p.semver.prerelease.length)&&p.semver,y=!(!c||n.includePrerelease||!c.semver.prerelease.length)&&c.semver;v&&1===v.prerelease.length&&"<"===p.operator&&0===v.prerelease[0]&&(v=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,c)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),">"===e.operator||">="===e.operator){if(d=u(c,e,n),d===e&&d!==c)return!1}else if(">="===c.operator&&!s(c.semver,String(e),n))return!1;if(p)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),"<"===e.operator||"<="===e.operator){if(h=l(p,e,n),h===e&&h!==p)return!1}else if("<="===p.operator&&!s(p.semver,String(e),n))return!1;if(!e.operator&&(p||c)&&0!==f)return!1}return!(c&&m&&!p&&0!==f)&&(!(p&&g&&!c&&0!==f)&&(!y&&!v))},u=(e,t,n)=>{if(!e)return t;const r=a(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},l=(e,t,n)=>{if(!e)return t;const r=a(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let i=!1;e:for(const r of e.set){for(const e of t.set){const t=c(r,e,n);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},1042:(e,t,n)=>{const r=n(6902);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},9042:(e,t,n)=>{const r=n(6902);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},6372:e=>{"use strict";function t(e){return"function"==typeof e}var n=console.error.bind(console);function r(e,t,n){var r=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}function i(e){e&&e.logger&&(t(e.logger)?n=e.logger:n("new logger isn't a function, not replacing"))}function o(e,i,o){if(e&&e[i]){if(!o)return n("no wrapper function"),void n((new Error).stack);if(t(e[i])&&t(o)){var s=e[i],a=o(s,i);return r(a,"__original",s),r(a,"__unwrap",(function(){e[i]===a&&r(e,i,s)})),r(a,"__wrapped",!0),r(e,i,a),a}n("original object and wrapper must be functions")}else n("no original function "+i+" to wrap")}function s(e,t){return e&&e[t]?e[t].__unwrap?e[t].__unwrap():void n("no original to unwrap to -- has "+t+" already been unwrapped?"):(n("no function to unwrap."),void n((new Error).stack))}i.wrap=o,i.massWrap=function(e,t,r){if(!e)return n("must provide one or more modules to patch"),void n((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){o(e,t,r)}))})):n("must provide one or more functions to wrap on modules")},i.unwrap=s,i.massUnwrap=function(e,t){if(!e)return n("must provide one or more modules to patch"),void n((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){s(e,t)}))})):n("must provide one or more functions to unwrap on modules")},e.exports=i},465:e=>{e.exports=function(e,t){var n=[];n.push(function(e){try{return Error.prototype.toString.call(e)}catch(e){try{return"<error: "+e+">"}catch(e){return"<error>"}}}(e));for(var r=0;r<t.length;r++){var i,o=t[r];try{i=o.toString()}catch(e){try{i="<error: "+e+">"}catch(e){i="<error>"}}n.push(" at "+i)}return n.join("\n")}},2512:(e,t,n)=>{if(global._stackChain){if(global._stackChain.version!==n(9414).i8)throw new Error("Conflicting version of stack-chain found");e.exports=global._stackChain}else e.exports=global._stackChain=n(7898)},9414:e=>{"use strict";e.exports={i8:"1.3.7"}},7898:(e,t,n)=>{var r=n(465);function i(){this.extend=new a,this.filter=new a,this.format=new c,this.version=n(9414).i8}var o=!1;i.prototype.callSite=function e(t){t||(t={}),o=!0;var n={};Error.captureStackTrace(n,e);var r=n.stack;return o=!1,r=r.slice(t.slice||0),t.extend&&(r=this.extend._modify(n,r)),t.filter&&(r=this.filter._modify(n,r)),r};var s=new i;function a(){this._modifiers=[]}function c(){this._formater=r,this._previous=void 0}a.prototype._modify=function(e,t){for(var n=0,r=this._modifiers.length;n<r;n++)t=this._modifiers[n](e,t);return t},a.prototype.attach=function(e){this._modifiers.push(e)},a.prototype.deattach=function(e){var t=this._modifiers.indexOf(e);return-1!==t&&(this._modifiers.splice(t,1),!0)},c.prototype.replace=function(e){e?this._formater=e:this.restore()},c.prototype.restore=function(){this._formater=r,this._previous=void 0},c.prototype._backup=function(){this._previous=this._formater},c.prototype._roolback=function(){this._previous===r?this.replace(void 0):this.replace(this._previous),this._previous=void 0},Error.prepareStackTrace&&s.format.replace(Error.prepareStackTrace);var u=!1;function l(e,t){if(o)return t;if(u)return r(e,t);var n=t.concat();n=s.extend._modify(e,n),n=(n=s.filter._modify(e,n)).slice(0,Error.stackTraceLimit),Object.isExtensible(e)&&void 0===Object.getOwnPropertyDescriptor(e,"callSite")&&(e.callSite={original:t,mutated:n}),u=!0;var i=s.format._formater(e,n);return u=!1,i}Object.defineProperty(Error,"prepareStackTrace",{get:function(){return l},set:function(e){e===l?s.format._roolback():(s.format._backup(),s.format.replace(e))}}),Object.defineProperty(Error.prototype,"callSite",{get:function(){return this.stack,this.callSite},set:function(e){Object.defineProperty(this,"callSite",{value:e,writable:!0,configurable:!0})},configurable:!0}),e.exports=s},2130:(e,t,n)=>{"use strict";const r=n(2087),i=n(3867),o=n(6560),{env:s}=process;let a;function c(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function u(e,t){if(0===a)return 0;if(o("color=16m")||o("color=full")||o("color=truecolor"))return 3;if(o("color=256"))return 2;if(e&&!t&&void 0===a)return 0;const n=a||0;if("dumb"===s.TERM)return n;if("win32"===process.platform){const e=r.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in s)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in s))||"codeship"===s.CI_NAME?1:n;if("TEAMCITY_VERSION"in s)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0;if("truecolor"===s.COLORTERM)return 3;if("TERM_PROGRAM"in s){const e=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(s.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)||"COLORTERM"in s?1:n}o("no-color")||o("no-colors")||o("color=false")||o("color=never")?a=0:(o("color")||o("colors")||o("color=true")||o("color=always"))&&(a=1),"FORCE_COLOR"in s&&(a="true"===s.FORCE_COLOR?1:"false"===s.FORCE_COLOR?0:0===s.FORCE_COLOR.length?1:Math.min(parseInt(s.FORCE_COLOR,10),3)),e.exports={supportsColor:function(e){return c(u(e,e&&e.isTTY))},stdout:c(u(!0,i.isatty(1))),stderr:c(u(!0,i.isatty(2)))}},7250:(e,t,n)=>{"use strict";const r=n(3129).exec,i=n(3129).execSync,o=n(1453);let s=process.platform;const a="linux"===s,c="darwin"===s,u="win32"===s,l="freebsd"===s,p="openbsd"===s,f="netbsd"===s,d="sunos"===s;function h(e,t,n){let r="";return e.indexOf("speak")>=0&&(r="Speaker"),e.indexOf("laut")>=0&&(r="Speaker"),e.indexOf("loud")>=0&&(r="Speaker"),e.indexOf("head")>=0&&(r="Headset"),e.indexOf("mic")>=0&&(r="Microphone"),e.indexOf("mikr")>=0&&(r="Microphone"),e.indexOf("phone")>=0&&(r="Phone"),e.indexOf("controll")>=0&&(r="Controller"),e.indexOf("line o")>=0&&(r="Line Out"),e.indexOf("digital o")>=0&&(r="Digital Out"),!r&&n?r="Speaker":!r&&t&&(r="Microphone"),r}function m(e,t){const n={},r=o.getValue(e,"Slot"),i=t.filter((function(e){return e.slotId===r}));return n.id=r,n.name=o.getValue(e,"SDevice"),n.manufacturer=o.getValue(e,"SVendor"),n.revision=o.getValue(e,"Rev"),n.driver=i&&1===i.length&&i[0].driver?i[0].driver:"",n.default=null,n.channel="PCIe",n.type=h(n.name,null,null),n.in=null,n.out=null,n.status="online",n}function g(e,t){const n={},r=((e.coreaudio_device_transport||"")+" "+(e._name||"")).toLowerCase();return n.id=t,n.name=e._name,n.manufacturer=e.coreaudio_device_manufacturer,n.revision=null,n.driver=null,n.default=!!e.coreaudio_default_audio_input_device||!!e.coreaudio_default_audio_output_device,n.channel=function(e){let t="";return e.indexOf("builtin")>=0&&(t="Built-In"),e.indexOf("extern")>=0&&(t="Audio-Jack"),e.indexOf("hdmi")>=0&&(t="HDMI"),e.indexOf("displayport")>=0&&(t="Display-Port"),e.indexOf("usb")>=0&&(t="USB"),e.indexOf("pci")>=0&&(t="PCIe"),t}(r),n.type=h(n.name,!!e.coreaudio_device_input,!!e.coreaudio_device_output),n.in=!!e.coreaudio_device_input,n.out=!!e.coreaudio_device_output,n.status="online",n}function v(e){const t={},n=o.getValue(e,"StatusInfo","=");return t.id=o.getValue(e,"DeviceID","="),t.name=o.getValue(e,"name","="),t.manufacturer=o.getValue(e,"manufacturer","="),t.revision=null,t.driver=null,t.default=null,t.channel=null,t.type=h(t.name,null,null),t.in=null,t.out=null,t.status=n,t}t.audio=function(e){return new Promise((t=>{process.nextTick((()=>{let n=[];if(a||l||p||f){r("lspci -vmm 2>/dev/null",(function(r,s){if(!r){const e=function(){let e=[];try{const t=i("lspci -v 2>/dev/null").toString().split("\n\n");for(let n=0;n<t.length;n++){const r=t[n].split("\n");if(r&&r.length&&r[0].toLowerCase().indexOf("audio")>=0){const t={};t.slotId=r[0].split(" ")[0],t.driver=o.getValue(r,"Kernel driver in use",":",!0)||o.getValue(r,"Kernel modules",":",!0),e.push(t)}}return e}catch(t){return e}}(),t=s.toString().split("\n\n");for(let r=0;r<t.length;r++){const i=t[r].split("\n");if(o.getValue(i,"class",":",!0).toLowerCase().indexOf("audio")>=0){const t=m(i,e);n.push(t)}}}e&&e(n),t(n)}))}if(c){r("system_profiler SPAudioDataType -json",(function(r,i){if(!r)try{const e=JSON.parse(i.toString());if(e.SPAudioDataType&&e.SPAudioDataType.length&&e.SPAudioDataType[0]&&e.SPAudioDataType[0]._items&&e.SPAudioDataType[0]._items.length)for(let t=0;t<e.SPAudioDataType[0]._items.length;t++){const r=g(e.SPAudioDataType[0]._items[t],t);n.push(r)}}catch(e){o.noop()}e&&e(n),t(n)}))}u&&o.wmic("path Win32_SoundDevice get /value",(function(r,i){if(!r){const e=i.toString().split(/\n\s*\n/);for(let t=0;t<e.length;t++)o.getValue(e[t].split("\n"),"name","=")&&n.push(v(e[t].split("\n")))}e&&e(n),t(n)})),d&&t(null)}))}))}},5953:(e,t,n)=>{"use strict";const r=n(3129).exec,i=n(5747),o=n(1453);let s=process.platform;const a="linux"===s,c="darwin"===s,u="win32"===s,l="freebsd"===s,p="openbsd"===s,f="netbsd"===s,d="sunos"===s;e.exports=function(e){return new Promise((t=>{process.nextTick((()=>{let n={hasBattery:!1,cycleCount:0,isCharging:!1,designedCapacity:0,maxCapacity:0,currentCapacity:0,voltage:0,capacityUnit:"",percent:0,timeRemaining:null,acConnected:!0,type:"",model:"",manufacturer:"",serial:""};if(a){let r="";i.existsSync("/sys/class/power_supply/BAT1/uevent")?r="/sys/class/power_supply/BAT1/":i.existsSync("/sys/class/power_supply/BAT0/uevent")&&(r="/sys/class/power_supply/BAT0/"),r?i.readFile(r+"uevent",(function(r,i){if(r)e&&e(n),t(n);else{let r=i.toString().split("\n");n.isCharging="charging"===o.getValue(r,"POWER_SUPPLY_STATUS","=").toLowerCase(),n.acConnected=n.isCharging,n.voltage=parseInt("0"+o.getValue(r,"POWER_SUPPLY_VOLTAGE_NOW","="),10)/1e6,n.capacityUnit=n.voltage?"mWh":"mAh",n.cycleCount=parseInt("0"+o.getValue(r,"POWER_SUPPLY_CYCLE_COUNT","="),10),n.maxCapacity=Math.round(parseInt("0"+o.getValue(r,"POWER_SUPPLY_CHARGE_FULL","="),10)/1e3/(n.voltage||1)),n.designedCapacity=Math.round(parseInt("0"+o.getValue(r,"POWER_SUPPLY_CHARGE_FULL_DESIGN","="),10)/1e3/(n.voltage||1))|n.maxcapacity,n.currentCapacity=Math.round(parseInt("0"+o.getValue(r,"POWER_SUPPLY_CHARGE_NOW","="),10)/1e3/(n.voltage||1)),n.maxCapacity||(n.maxCapacity=parseInt("0"+o.getValue(r,"POWER_SUPPLY_ENERGY_FULL","="),10)/1e3,n.designCapacity=parseInt("0"+o.getValue(r,"POWER_SUPPLY_ENERGY_FULL_DESIGN","="),10)/1e3|n.maxCapacity,n.currentCapacity=parseInt("0"+o.getValue(r,"POWER_SUPPLY_ENERGY_NOW","="),10)/1e3);const s=o.getValue(r,"POWER_SUPPLY_CAPACITY","="),a=parseInt("0"+o.getValue(r,"POWER_SUPPLY_ENERGY_NOW","="),10),c=parseInt("0"+o.getValue(r,"POWER_SUPPLY_POWER_NOW","="),10),u=parseInt("0"+o.getValue(r,"POWER_SUPPLY_CURRENT_NOW","="),10);n.percent=parseInt("0"+s,10),n.maxCapacity&&n.currentCapacity&&(n.hasBattery=!0,s||(n.percent=100*n.currentCapacity/n.maxCapacity)),n.isCharging&&(n.hasBattery=!0),a&&c?n.timeRemaining=Math.floor(a/c*60):u&&n.currentCapacity&&(n.timeRemaining=Math.floor(n.currentCapacity/u*60)),n.type=o.getValue(r,"POWER_SUPPLY_TECHNOLOGY","="),n.model=o.getValue(r,"POWER_SUPPLY_MODEL_NAME","="),n.manufacturer=o.getValue(r,"POWER_SUPPLY_MANUFACTURER","="),n.serial=o.getValue(r,"POWER_SUPPLY_SERIAL_NUMBER","="),e&&e(n),t(n)}})):(e&&e(n),t(n))}if((l||p||f)&&r("sysctl hw.acpi.battery hw.acpi.acline",(function(r,i){let s=i.toString().split("\n");const a=parseInt("0"+o.getValue(s,"hw.acpi.battery.units"),10),c=parseInt("0"+o.getValue(s,"hw.acpi.battery.life"),10);n.hasBattery=a>0,n.cycleCount=null,n.isCharging="1"!==o.getValue(s,"hw.acpi.acline"),n.acConnected=n.isCharging,n.maxCapacity=null,n.currentCapacity=null,n.capacityUnit="unknown",n.percent=a?c:null,e&&e(n),t(n)})),c&&r('ioreg -n AppleSmartBattery -r | egrep "CycleCount|IsCharging|DesignCapacity|MaxCapacity|CurrentCapacity|BatterySerialNumber|TimeRemaining|Voltage"; pmset -g batt | grep %',(function(r,i){if(i){let e=i.toString().replace(/ +/g,"").replace(/"+/g,"").replace(/-/g,"").split("\n");n.cycleCount=parseInt("0"+o.getValue(e,"cyclecount","="),10),n.voltage=parseInt("0"+o.getValue(e,"voltage","="),10)/1e3,n.capacityUnit=n.voltage?"mWh":"mAh",n.maxCapacity=Math.round(parseInt("0"+o.getValue(e,"maxcapacity","="),10)*(n.voltage||1)),n.currentCapacity=Math.round(parseInt("0"+o.getValue(e,"currentcapacity","="),10)*(n.voltage||1)),n.designedCapacity=Math.round(parseInt("0"+o.getValue(e,"DesignCapacity","="),10)*(n.voltage||1)),n.manufacturer="Apple",n.serial=o.getValue(e,"BatterySerialNumber","=");let t=null;let r=o.getValue(e,"internal","Battery").split(";");if(r&&r[0]){let e=r[0].split("\t");e&&e[1]&&(t=parseFloat(e[1].trim().replace(/%/g,"")))}r&&r[1]?(n.isCharging="charging"===r[1].trim(),n.acConnected="discharging"!==r[1].trim()):(n.isCharging="yes"===o.getValue(e,"ischarging","=").toLowerCase(),n.acConnected=n.isCharging),n.maxCapacity&&n.currentCapacity&&(n.hasBattery=!0,n.type="Li-ion",n.percent=null!==t?t:Math.round(100*n.currentCapacity/n.maxCapacity),n.isCharging||(n.timeRemaining=parseInt("0"+o.getValue(e,"TimeRemaining","="),10)))}e&&e(n),t(n)})),d&&(e&&e(n),t(n)),u)try{o.wmic("Path Win32_Battery Get BatteryStatus, DesignCapacity, EstimatedChargeRemaining, DesignVoltage, FullChargeCapacity /value").then((r=>{if(r){let e=r.split("\r\n"),t=o.getValue(e,"BatteryStatus","=").trim();if(t&&"10"!=t){const r=parseInt(t);n.hasBattery=!0,n.maxCapacity=parseInt(o.getValue(e,"DesignCapacity","=")||0),n.designCapacity=parseInt(o.getValue(e,"DesignCapacity","=")||0),n.voltage=parseInt(o.getValue(e,"DesignVoltage","=")||0)/1e3,n.capacityUnit="mWh",n.percent=parseInt(o.getValue(e,"EstimatedChargeRemaining","=")||0),n.currentCapacity=parseInt(n.maxcapacity*n.percent/100),n.isCharging=r>=6&&r<=9||11===r||!(3===r)&&!(1===r)&&n.percent<100,n.acConnected=n.ischarging||2===r}}e&&e(n),t(n)}))}catch(r){e&&e(n),t(n)}}))}))}},7381:(e,t,n)=>{"use strict";const r=n(3129).exec,i=n(3129).execSync,o=n(5622),s=n(1453),a=n(5747);let c=process.platform;const u="linux"===c,l="darwin"===c,p="win32"===c,f="freebsd"===c,d="openbsd"===c,h="netbsd"===c,m="sunos"===c;function g(e){let t="";return e.indexOf("keyboard")>=0&&(t="Keyboard"),e.indexOf("mouse")>=0&&(t="Mouse"),e.indexOf("speaker")>=0&&(t="Speaker"),e.indexOf("headset")>=0&&(t="Headset"),e.indexOf("phone")>=0&&(t="Phone"),t}function v(e,t,n){const r={device:null};return r.name=s.getValue(e,"name","="),r.manufacturer=null,r.macDevice=t,r.macHost=n,r.batteryPercent=null,r.type=g(r.name.toLowerCase()),r.connected=!1,r}function y(e,t){const n={},r=((e.device_minorClassOfDevice_string||e.device_majorClassOfDevice_string||"")+(e.device_name||"")).toLowerCase();return n.device=e.device_services||"",n.name=e.device_name||"",n.manufacturer=e.device_manufacturer||"",n.macDevice=(e.device_addr||"").toLowerCase().replace(/-/g,":"),n.macHost=t,n.batteryPercent=e.device_batteryPercent||null,n.type=g(r),n.connected="attrib_Yes"===e.device_isconnected||!1,n}function _(e){const t={device:null};return t.name=s.getValue(e,"name","="),t.manufacturer=s.getValue(e,"manufacturer","="),t.macDevice=null,t.macHost=null,t.batteryPercent=null,t.type=g(t.name.toLowerCase()),t.connected=null,t}t.bluetoothDevices=function(e){return new Promise((t=>{process.nextTick((()=>{let n=[];if(u){const r=s.getFilesInPath("/var/lib/bluetooth/");for(let e=0;e<r.length;e++){const t=o.basename(r[e]),i=r[e].split("/"),s=i.length>=6?i[i.length-2]:null,c=i.length>=7?i[i.length-3]:null;if("info"===t){const t=a.readFileSync(r[e],{encoding:"utf8"}).split("\n");n.push(v(t,s,c))}}try{const e=i("hcitool con").toString().toLowerCase();for(let t=0;t<n.length;t++)n[t].macDevice&&n[t].macDevice.length>10&&e.indexOf(n[t].macDevice.toLowerCase())>=0&&(n[t].connected=!0)}catch(e){s.noop()}e&&e(n),t(n)}if(l){r("system_profiler SPBluetoothDataType -json",(function(r,i){if(!r)try{const e=JSON.parse(i.toString());if(e.SPBluetoothDataType&&e.SPBluetoothDataType.length&&e.SPBluetoothDataType[0]&&e.SPBluetoothDataType[0].device_title&&e.SPBluetoothDataType[0].device_title.length){let t=null;e.SPBluetoothDataType[0].local_device_title&&e.SPBluetoothDataType[0].local_device_title.general_address&&(t=e.SPBluetoothDataType[0].local_device_title.general_address.toLowerCase().replace(/-/g,":"));for(let r=0;r<e.SPBluetoothDataType[0].device_title.length;r++){const i=e.SPBluetoothDataType[0].device_title[r],o=Object.keys(i);if(o&&1===o.length){const e=i[o[0]];e.device_name=o[0];const r=y(e,t);n.push(r)}}}}catch(e){s.noop()}e&&e(n),t(n)}))}p&&s.wmic("path Win32_PNPEntity get /value",(function(r,i){if(!r){const e=i.toString().split(/\n\s*\n/);for(let t=0;t<e.length;t++)"Bluetooth"===s.getValue(e[t].split("\n"),"PNPClass","=")&&n.push(_(e[t].split("\n")))}e&&e(n),t(n)})),(f||h||d||m)&&t(null)}))}))}},51:(e,t,n)=>{"use strict";const r=n(2087),i=n(3129).exec,o=n(3129).execSync,s=n(5747),a=n(1453);let c=process.platform;const u="linux"===c,l="darwin"===c,p="win32"===c,f="freebsd"===c,d="openbsd"===c,h="netbsd"===c,m="sunos"===c;let g=0,v={user:0,nice:0,system:0,idle:0,irq:0,load:0,tick:0,ms:0,currentLoad:0,currentLoadUser:0,currentLoadSystem:0,currentLoadNice:0,currentLoadIdle:0,currentLoadIrq:0,rawCurrentLoad:0,rawCurrentLoadUser:0,rawCurrentLoadSystem:0,rawCurrentLoadNice:0,rawCurrentLoadIdle:0,rawCurrentLoadIrq:0},y=[],_=0;const E={8346:"1.8",8347:"1.9",8350:"2.0",8354:"2.2","8356|SE":"2.4",8356:"2.3",8360:"2.5",2372:"2.1",2373:"2.1",2374:"2.2",2376:"2.3",2377:"2.3",2378:"2.4",2379:"2.4",2380:"2.5",2381:"2.5",2382:"2.6",2384:"2.7",2386:"2.8",2387:"2.8",2389:"2.9",2393:"3.1",8374:"2.2",8376:"2.3",8378:"2.4",8379:"2.4",8380:"2.5",8381:"2.5",8382:"2.6",8384:"2.7",8386:"2.8",8387:"2.8",8389:"2.9",8393:"3.1","2419EE":"1.8","2423HE":"2.0","2425HE":"2.1",2427:"2.2",2431:"2.4",2435:"2.6","2439SE":"2.8","8425HE":"2.1",8431:"2.4",8435:"2.6","8439SE":"2.8",4122:"2.2",4130:"2.6","4162EE":"1.7","4164EE":"1.8","4170HE":"2.1","4174HE":"2.3","4176HE":"2.4",4180:"2.6",4184:"2.8","6124HE":"1.8","6128HE":"2.0","6132HE":"2.2",6128:"2.0",6134:"2.3",6136:"2.4",6140:"2.6","6164HE":"1.7","6166HE":"1.8",6168:"1.9",6172:"2.1",6174:"2.2",6176:"2.3","6176SE":"2.3","6180SE":"2.5",3250:"2.5",3260:"2.7",3280:"2.4",4226:"2.7",4228:"2.8",4230:"2.9",4234:"3.1",4238:"3.3",4240:"3.4",4256:"1.6",4274:"2.5",4276:"2.6",4280:"2.8",4284:"3.0",6204:"3.3",6212:"2.6",6220:"3.0",6234:"2.4",6238:"2.6","6262HE":"1.6",6272:"2.1",6274:"2.2",6276:"2.3",6278:"2.4","6282SE":"2.6","6284SE":"2.7",6308:"3.5",6320:"2.8",6328:"3.2","6338P":"2.3",6344:"2.6",6348:"2.8",6366:"1.8","6370P":"2.0",6376:"2.3",6378:"2.4",6380:"2.5",6386:"2.8","FX|4100":"3.6","FX|4120":"3.9","FX|4130":"3.8","FX|4150":"3.8","FX|4170":"4.2","FX|6100":"3.3","FX|6120":"3.6","FX|6130":"3.6","FX|6200":"3.8","FX|8100":"2.8","FX|8120":"3.1","FX|8140":"3.2","FX|8150":"3.6","FX|8170":"3.9","FX|4300":"3.8","FX|4320":"4.0","FX|4350":"4.2","FX|6300":"3.5","FX|6350":"3.9","FX|8300":"3.3","FX|8310":"3.4","FX|8320":"3.5","FX|8350":"4.0","FX|8370":"4.0","FX|9370":"4.4","FX|9590":"4.7","FX|8320E":"3.2","FX|8370E":"3.3",1200:"3.1","Pro 1200":"3.1","1300X":"3.5","Pro 1300":"3.5",1400:"3.2","1500X":"3.5","Pro 1500":"3.5",1600:"3.2","1600X":"3.6","Pro 1600":"3.2",1700:"3.0","Pro 1700":"3.0","1700X":"3.4","Pro 1700X":"3.4","1800X":"3.6","1900X":"3.8",1920:"3.2","1920X":"3.5","1950X":"3.4","200GE":"3.2","Pro 200GE":"3.2","220GE":"3.4","240GE":"3.5","3000G":"3.5","300GE":"3.4","3050GE":"3.4","2200G":"3.5","Pro 2200G":"3.5","2200GE":"3.2","Pro 2200GE":"3.2","2400G":"3.6","Pro 2400G":"3.6","2400GE":"3.2","Pro 2400GE":"3.2","Pro 200U":"2.3","300U":"2.4","2200U":"2.5","3200U":"2.6","2300U":"2.0","Pro 2300U":"2.0","2500U":"2.0","Pro 2500U":"2.2","2600H":"3.2","2700U":"2.0","Pro 2700U":"2.2","2800H":"3.3",7351:"2.4","7351P":"2.4",7401:"2.0","7401P":"2.0","7551P":"2.0",7551:"2.0",7251:"2.1",7261:"2.5",7281:"2.1",7301:"2.2",7371:"3.1",7451:"2.3",7501:"2.0",7571:"2.2",7601:"2.2",V1500B:"2.2",V1780B:"3.35",V1202B:"2.3",V1404I:"2.0",V1605B:"2.0",V1756B:"3.25",V1807B:"3.35",3101:"2.1",3151:"2.7",3201:"1.5",3251:"2.5",3255:"2.5",3301:"2.0",3351:"1.9",3401:"1.85",3451:"2.15","1200|AF":"3.1","2300X":"3.5","2500X":"3.6",2600:"3.4","2600E":"3.1","1600|AF":"3.2","2600X":"3.6",2700:"3.2","2700E":"2.8","Pro 2700":"3.2","2700X":"3.7","Pro 2700X":"3.6","2920X":"3.5","2950X":"3.5","2970WX":"3.0","2990WX":"3.0","Pro 300GE":"3.4","Pro 3125GE":"3.4","3150G":"3.5","Pro 3150G":"3.5","3150GE":"3.3","Pro 3150GE":"3.3","3200G":"3.6","Pro 3200G":"3.6","3200GE":"3.3","Pro 3200GE":"3.3","3350G":"3.6","Pro 3350G":"3.6","3350GE":"3.3","Pro 3350GE":"3.3","3400G":"3.7","Pro 3400G":"3.7","3400GE":"3.3","Pro 3400GE":"3.3","3300U":"2.1","PRO 3300U":"2.1","3450U":"2.1","3500U":"2.1","PRO 3500U":"2.1","3500C":"2.1","3550H":"2.1","3580U":"2.1","3700U":"2.3","PRO 3700U":"2.3","3700C":"2.3","3750H":"2.3","3780U":"2.3",3100:"3.6","3300X":"3.8",3500:"3.6","3500X":"3.6",3600:"3.6","Pro 3600":"3.6","3600X":"3.8","3600XT":"3.8","Pro 3700":"3.6","3700X":"3.6","3800X":"3.9","3800XT":"3.9",3900:"3.1","Pro 3900":"3.1","3900X":"3.8","3900XT":"3.8","3950X":"3.5","3960X":"3.8","3970X":"3.7","3990X":"2.9","3945WX":"4.0","3955WX":"3.9","3975WX":"3.5","3995WX":"2.7","4300GE":"3.5","Pro 4300GE":"3.5","4300G":"3.8","Pro 4300G":"3.8","4600GE":"3.3","Pro 4650GE":"3.3","4600G":"3.7","Pro 4650G":"3.7","4700GE":"3.1","Pro 4750GE":"3.1","4700G":"3.6","Pro 4750G":"3.6","4300U":"2.7","Pro 4450U":"2.5","4500U":"2.3","4600U":"2.1","PRO 4650U":"2.1","4600HS":"3.0","4600H":"3.0","4700U":"2.0","PRO 4750U":"1.7","4800U":"1.8","4800HS":"2.9","4800H":"2.9","4900HS":"3.0","4900H":"3.3","7232P":"3.1","7302P":"3.0","7402P":"2.8","7502P":"2.5","7702P":"2.0",7252:"3.1",7262:"3.2",7272:"2.9",7282:"2.8",7302:"3.0",7352:"2.3",7402:"2.8",7452:"2.35",7502:"2.5",7532:"2.4",7542:"2.9",7552:"2.2",7642:"2.3",7662:"2.0",7702:"2.0",7742:"2.25","7H12":"2.6","7F32":"3.7","7F52":"3.5","7F72":"3.2","5600X":"3.7","5800X":"3.8","5900X":"3.7","5950X":"3.4"},b={1:"Other",2:"Unknown",3:"Daughter Board",4:"ZIF Socket",5:"Replacement/Piggy Back",6:"None",7:"LIF Socket",8:"Slot 1",9:"Slot 2",10:"370 Pin Socket",11:"Slot A",12:"Slot M",13:"423",14:"A (Socket 462)",15:"478",16:"754",17:"940",18:"939",19:"mPGA604",20:"LGA771",21:"LGA775",22:"S1",23:"AM2",24:"F (1207)",25:"LGA1366",26:"G34",27:"AM3",28:"C32",29:"LGA1156",30:"LGA1567",31:"PGA988A",32:"BGA1288",33:"rPGA988B",34:"BGA1023",35:"BGA1224",36:"LGA1155",37:"LGA1356",38:"LGA2011",39:"FS1",40:"FS2",41:"FM1",42:"FM2",43:"LGA2011-3",44:"LGA1356-3",45:"LGA1150",46:"BGA1168",47:"BGA1234",48:"BGA1364",49:"AM4",50:"LGA1151",51:"BGA1356",52:"BGA1440",53:"BGA1515",54:"LGA3647-1",55:"SP3",56:"SP3r2",57:"LGA2066",58:"BGA1392",59:"BGA1510",60:"BGA1528",61:"LGA4189",62:"LGA1200"};function w(e){e.brand=e.brand.replace(/\(R\)+/g,"®").replace(/\s+/g," ").trim(),e.brand=e.brand.replace(/\(TM\)+/g,"™").replace(/\s+/g," ").trim(),e.brand=e.brand.replace(/\(C\)+/g,"©").replace(/\s+/g," ").trim(),e.brand=e.brand.replace(/CPU+/g,"").replace(/\s+/g," ").trim(),e.manufacturer=e.brand.split(" ")[0];let t=e.brand.split(" ");return t.shift(),e.brand=t.join(" "),e}function S(e){let t="0";for(let n in E)if({}.hasOwnProperty.call(E,n)){let r=n.split("|"),i=0;r.forEach((t=>{e.indexOf(t)>-1&&i++})),i===r.length&&(t=E[n])}return parseFloat(t)}function I(){let e=r.cpus(),t=999999999,n=0,i=0,o=[];if(e&&e.length){for(let r in e)if({}.hasOwnProperty.call(e,r)){let s=e[r].speed>100?(e[r].speed+1)/1e3:e[r].speed/10;i+=s,s>n&&(n=s),s<t&&(t=s),o.push(parseFloat(s.toFixed(2)))}return i/=e.length,{min:parseFloat(t.toFixed(2)),max:parseFloat(n.toFixed(2)),avg:parseFloat(i.toFixed(2)),cores:o}}return{min:0,max:0,avg:0,cores:o}}function C(e){return new Promise((t=>{process.nextTick((()=>{let n="";if(p)try{i('reg query "HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0" /v FeatureSet',a.execOptsWin,(function(r,i){if(!r){let e=i.split("0x").pop().trim(),t=parseInt(e,16).toString(2),r="0".repeat(32-t.length)+t,o=["fpu","vme","de","pse","tsc","msr","pae","mce","cx8","apic","","sep","mtrr","pge","mca","cmov","pat","pse-36","psn","clfsh","","ds","acpi","mmx","fxsr","sse","sse2","ss","htt","tm","ia64","pbe"];for(let e=0;e<o.length;e++)"1"===r[e]&&""!==o[e]&&(n+=" "+o[e]);n=n.trim().toLowerCase()}e&&e(n),t(n)}))}catch(r){e&&e(n),t(n)}if(u)try{i("export LC_ALL=C; lscpu; unset LC_ALL",(function(r,i){if(!r){i.toString().split("\n").forEach((function(e){-1!==e.split(":")[0].toUpperCase().indexOf("FLAGS")&&(n=e.split(":")[1].trim().toLowerCase())}))}n?(e&&e(n),t(n)):s.readFile("/proc/cpuinfo",(function(r,i){if(!r){let e=i.toString().split("\n");n=a.getValue(e,"features",":",!0).toLowerCase()}e&&e(n),t(n)}))}))}catch(r){e&&e(n),t(n)}(f||d||h)&&i("export LC_ALL=C; dmidecode -t 4 2>/dev/null; unset LC_ALL",(function(r,i){let o=[];if(!r){let e=i.toString().split("\tFlags:");(e.length>1?e[1].split("\tVersion:")[0].split["\n"]:[]).forEach((function(e){let t=(e.indexOf("(")?e.split("(")[0].toLowerCase():"").trim().replace(/\t/g,"");t&&o.push(t)}))}n=o.join(" ").trim().toLowerCase(),e&&e(n),t(n)})),l&&i("sysctl machdep.cpu.features",(function(r,i){if(!r){let e=i.toString().split("\n");e.length>0&&-1!==e[0].indexOf("machdep.cpu.features:")&&(n=e[0].split(":")[1].trim().toLowerCase())}e&&e(n),t(n)})),m&&(e&&e(n),t(n))}))}))}function x(e){return new Promise((t=>{process.nextTick((()=>{let n={l1d:null,l1i:null,l2:null,l3:null};if(u)try{i("export LC_ALL=C; lscpu; unset LC_ALL",(function(r,i){if(!r){i.toString().split("\n").forEach((function(e){let t=e.split(":");-1!==t[0].toUpperCase().indexOf("L1D CACHE")&&(n.l1d=parseInt(t[1].trim())*(-1!==t[1].indexOf("K")?1024:1)),-1!==t[0].toUpperCase().indexOf("L1I CACHE")&&(n.l1i=parseInt(t[1].trim())*(-1!==t[1].indexOf("K")?1024:1)),-1!==t[0].toUpperCase().indexOf("L2 CACHE")&&(n.l2=parseInt(t[1].trim())*(-1!==t[1].indexOf("K")?1024:1)),-1!==t[0].toUpperCase().indexOf("L3 CACHE")&&(n.l3=parseInt(t[1].trim())*(-1!==t[1].indexOf("K")?1024:1))}))}e&&e(n),t(n)}))}catch(r){e&&e(n),t(n)}if((f||d||h)&&i("export LC_ALL=C; dmidecode -t 7 2>/dev/null; unset LC_ALL",(function(r,i){let o=[];if(!r){o=i.toString().split("Cache Information"),o.shift()}for(let e=0;e<o.length;e++){const t=o[e].split("\n");let r=a.getValue(t,"Socket Designation").toLowerCase().replace(" ","-").split("-");r=r.length?r[0]:"";const i=a.getValue(t,"Installed Size").split(" ");let s=parseInt(i[0],10);const c=i.length>1?i[1]:"kb";s*="kb"===c?1024:"mb"===c?1048576:"gb"===c?1073741824:1,r&&("l1"===r?(n.cache[r+"d"]=s/2,n.cache[r+"i"]=s/2):n.cache[r]=s)}e&&e(n),t(n)})),l&&i("sysctl hw.l1icachesize hw.l1dcachesize hw.l2cachesize hw.l3cachesize",(function(r,i){if(!r){i.toString().split("\n").forEach((function(e){let t=e.split(":");-1!==t[0].toLowerCase().indexOf("hw.l1icachesize")&&(n.l1d=parseInt(t[1].trim())*(-1!==t[1].indexOf("K")?1024:1)),-1!==t[0].toLowerCase().indexOf("hw.l1dcachesize")&&(n.l1i=parseInt(t[1].trim())*(-1!==t[1].indexOf("K")?1024:1)),-1!==t[0].toLowerCase().indexOf("hw.l2cachesize")&&(n.l2=parseInt(t[1].trim())*(-1!==t[1].indexOf("K")?1024:1)),-1!==t[0].toLowerCase().indexOf("hw.l3cachesize")&&(n.l3=parseInt(t[1].trim())*(-1!==t[1].indexOf("K")?1024:1))}))}e&&e(n),t(n)})),m&&(e&&e(n),t(n)),p)try{a.wmic("cpu get l2cachesize, l3cachesize /value").then(((r,i)=>{if(!i){let e=r.split("\r\n");n.l1d=0,n.l1i=0,n.l2=a.getValue(e,"l2cachesize","="),n.l3=a.getValue(e,"l3cachesize","="),n.l2&&(n.l2=1024*parseInt(n.l2,10)),n.l3&&(n.l3=1024*parseInt(n.l3,10))}a.wmic("path Win32_CacheMemory get CacheType,InstalledSize,Purpose").then(((r,i)=>{if(!i){r.split("\r\n").filter((e=>""!==e.trim())).filter(((e,t)=>t>0)).forEach((function(e){""!==e&&("L1 Cache"===(e=e.trim().split(/\s\s+/))[2]&&"3"===e[0]&&(n.l1i=parseInt(e[1],10)),"L1 Cache"===e[2]&&"4"===e[0]&&(n.l1d=parseInt(e[1],10)))}))}e&&e(n),t(n)}))}))}catch(r){e&&e(n),t(n)}}))}))}t.cpu=function(e){return new Promise((t=>{process.nextTick((()=>{new Promise((e=>{process.nextTick((()=>{const t="unknown";let n={manufacturer:t,brand:t,vendor:"",family:"",model:"",stepping:"",revision:"",voltage:"",speed:0,speedMin:0,speedMax:0,governor:"",cores:a.cores(),physicalCores:a.cores(),processors:1,socket:"",flags:"",virtualization:!1,cache:{}};C().then((t=>{if(n.flags=t,n.virtualization=t.indexOf("vmx")>-1||t.indexOf("svm")>-1,p)try{const e=o("systeminfo",a.execOptsWin).toString();n.virtualization=n.virtualization||-1!==e.indexOf("Virtualization Enabled In Firmware: Yes")||-1!==e.indexOf("Virtualisierung in Firmware aktiviert: Ja")||-1!==e.indexOf("Virtualisation activée dans le microprogramme : Qiu")}catch(e){a.noop()}if(l&&i("sysctl machdep.cpu hw.cpufrequency_max hw.cpufrequency_min hw.packages hw.physicalcpu_max hw.ncpu hw.tbfrequency hw.cpufamily hw.cpusubfamily",(function(t,i){let s=i.toString().split("\n");const c=a.getValue(s,"machdep.cpu.brand_string").split("@");n.brand=c[0].trim();const u=c[1]?c[1].trim():"0";n.speed=parseFloat(u.replace(/GHz+/g,""));let l=a.getValue(s,"hw.tbfrequency")/1e9;l=l<.1?100*l:l,n.speed=0===n.speed?l:n.speed,g=n.speed,n=w(n),n.speedMin=a.getValue(s,"hw.cpufrequency_min")?a.getValue(s,"hw.cpufrequency_min")/1e9:n.speed,n.speedMax=a.getValue(s,"hw.cpufrequency_max")?a.getValue(s,"hw.cpufrequency_max")/1e9:n.speed,n.vendor=a.getValue(s,"machdep.cpu.vendor")||"Apple",n.family=a.getValue(s,"machdep.cpu.family")||a.getValue(s,"hw.cpufamily"),n.model=a.getValue(s,"machdep.cpu.model"),n.stepping=a.getValue(s,"machdep.cpu.stepping")||a.getValue(s,"hw.cpusubfamily");const p=a.getValue(s,"hw.packages"),f=a.getValue(s,"hw.physicalcpu_max"),d=a.getValue(s,"hw.ncpu");if("arm64"===r.arch()){const e=o("ioreg -c IOPlatformDevice -d 3 -r | grep cluster-type").toString().split("\n"),t=e.filter((e=>e.indexOf('"E"')>=0)).length,r=e.filter((e=>e.indexOf('"P"')>=0)).length;n.socket="SOC",n.efficiencyCores=t,n.performanceCores=r}p&&(n.processors=parseInt(p)||1),f&&d&&(n.cores=parseInt(d)||a.cores(),n.physicalCores=parseInt(f)||a.cores()),x().then((t=>{n.cache=t,e(n)}))})),u){let t="",o=[];r.cpus()[0]&&r.cpus()[0].model&&(t=r.cpus()[0].model),i('export LC_ALL=C; lscpu; echo -n "Governor: "; cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 2>/dev/null; echo; unset LC_ALL',(function(r,c){r||(o=c.toString().split("\n")),t=a.getValue(o,"model name")||t;const u=t.split("@");if(n.brand=u[0].trim(),n.speed=u[1]?parseFloat(u[1].trim()):0,0===n.speed&&(n.brand.indexOf("AMD")>-1||n.brand.toLowerCase().indexOf("ryzen")>-1)&&(n.speed=S(n.brand)),0===n.speed){const e=I();0!==e.avg&&(n.speed=e.avg)}g=n.speed,n.speedMin=Math.round(parseFloat(a.getValue(o,"cpu min mhz").replace(/,/g,"."))/10)/100,n.speedMax=Math.round(parseFloat(a.getValue(o,"cpu max mhz").replace(/,/g,"."))/10)/100,n=w(n),n.vendor=a.getValue(o,"vendor id"),n.family=a.getValue(o,"cpu family"),n.model=a.getValue(o,"model:"),n.stepping=a.getValue(o,"stepping"),n.revision=a.getValue(o,"cpu revision"),n.cache.l1d=a.getValue(o,"l1d cache"),n.cache.l1d&&(n.cache.l1d=parseInt(n.cache.l1d)*(-1!==n.cache.l1d.indexOf("K")?1024:1)),n.cache.l1i=a.getValue(o,"l1i cache"),n.cache.l1i&&(n.cache.l1i=parseInt(n.cache.l1i)*(-1!==n.cache.l1i.indexOf("K")?1024:1)),n.cache.l2=a.getValue(o,"l2 cache"),n.cache.l2&&(n.cache.l2=parseInt(n.cache.l2)*(-1!==n.cache.l2.indexOf("K")?1024:1)),n.cache.l3=a.getValue(o,"l3 cache"),n.cache.l3&&(n.cache.l3=parseInt(n.cache.l3)*(-1!==n.cache.l3.indexOf("K")?1024:1));const l=a.getValue(o,"thread(s) per core")||"1",p=a.getValue(o,"socket(s)")||"1";let f=parseInt(l,10),d=parseInt(p,10);if(n.physicalCores=n.cores/f,n.processors=d,n.governor=a.getValue(o,"governor")||"","ARM"===n.vendor){const e=s.readFileSync("/proc/cpuinfo").toString().split("\n"),t=a.decodePiCpuinfo(e);t.model.toLowerCase().indexOf("raspberry")>=0&&(n.family=n.manufacturer,n.manufacturer=t.manufacturer,n.brand=t.processor,n.revision=t.revisionCode,n.socket="SOC")}let h=[];i('export LC_ALL=C; dmidecode t 4 2>/dev/null | grep "Upgrade: Socket"; unset LC_ALL',(function(t,r){h=r.toString().split("\n"),h&&h.length&&(n.socket=a.getValue(h,"Upgrade").replace("Socket","").trim()||n.socket),e(n)}))}))}if(f||d||h){let t="",o=[];r.cpus()[0]&&r.cpus()[0].model&&(t=r.cpus()[0].model),i("export LC_ALL=C; dmidecode -t 4; dmidecode -t 7 unset LC_ALL",(function(r,i){let s=[];if(!r){const e=i.toString().split("# dmidecode"),t=e.length>1?e[1]:"";s=e.length>2?e[2].split("Cache Information"):[],o=t.split("\n")}if(n.brand=t.split("@")[0].trim(),n.speed=t.split("@")[1]?parseFloat(t.split("@")[1].trim()):0,0===n.speed&&(n.brand.indexOf("AMD")>-1||n.brand.toLowerCase().indexOf("ryzen")>-1)&&(n.speed=S(n.brand)),0===n.speed){const e=I();0!==e.avg&&(n.speed=e.avg)}g=n.speed,n.speedMin=n.speed,n.speedMax=Math.round(parseFloat(a.getValue(o,"max speed").replace(/Mhz/g,""))/10)/100,n=w(n),n.vendor=a.getValue(o,"manufacturer");let c=a.getValue(o,"signature");c=c.split(",");for(var u=0;u<c.length;u++)c[u]=c[u].trim();n.family=a.getValue(c,"Family"," ",!0),n.model=a.getValue(c,"Model"," ",!0),n.stepping=a.getValue(c,"Stepping"," ",!0),n.revision="";const l=parseFloat(a.getValue(o,"voltage"));n.voltage=isNaN(l)?"":l.toFixed(2);for(let e=0;e<s.length;e++){o=s[e].split("\n");let t=a.getValue(o,"Socket Designation").toLowerCase().replace(" ","-").split("-");t=t.length?t[0]:"";const r=a.getValue(o,"Installed Size").split(" ");let i=parseInt(r[0],10);const c=r.length>1?r[1]:"kb";i*="kb"===c?1024:"mb"===c?1048576:"gb"===c?1073741824:1,t&&("l1"===t?(n.cache[t+"d"]=i/2,n.cache[t+"i"]=i/2):n.cache[t]=i)}n.socket=a.getValue(o,"Upgrade").replace("Socket","").trim();const p=a.getValue(o,"thread count").trim(),f=a.getValue(o,"core count").trim();f&&p&&(n.cores=p,n.physicalCores=f),e(n)}))}if(m&&e(n),p)try{const t=[];t.push(a.wmic("cpu get /value")),t.push(a.wmic("path Win32_CacheMemory get CacheType,InstalledSize,Purpose")),Promise.all(t).then((t=>{let r=t[0].split("\r\n"),i=a.getValue(r,"name","=")||"";i.indexOf("@")>=0?(n.brand=i.split("@")[0].trim(),n.speed=i.split("@")[1]?parseFloat(i.split("@")[1].trim()):0,g=n.speed):(n.brand=i.trim(),n.speed=0),n=w(n),n.revision=a.getValue(r,"revision","="),n.cache.l1d=0,n.cache.l1i=0,n.cache.l2=a.getValue(r,"l2cachesize","="),n.cache.l3=a.getValue(r,"l3cachesize","="),n.cache.l2&&(n.cache.l2=1024*parseInt(n.cache.l2,10)),n.cache.l3&&(n.cache.l3=1024*parseInt(n.cache.l3,10)),n.vendor=a.getValue(r,"manufacturer","="),n.speedMax=Math.round(parseFloat(a.getValue(r,"maxclockspeed","=").replace(/,/g,"."))/10)/100,0===n.speed&&(n.brand.indexOf("AMD")>-1||n.brand.toLowerCase().indexOf("ryzen")>-1)&&(n.speed=S(n.brand)),0===n.speed&&(n.speed=n.speedMax),n.speedMin=n.speed;let o=a.getValue(r,"description","=").split(" ");for(let e=0;e<o.length;e++)o[e].toLowerCase().startsWith("family")&&e+1<o.length&&o[e+1]&&(n.family=o[e+1]),o[e].toLowerCase().startsWith("model")&&e+1<o.length&&o[e+1]&&(n.model=o[e+1]),o[e].toLowerCase().startsWith("stepping")&&e+1<o.length&&o[e+1]&&(n.stepping=o[e+1]);const s=a.getValue(r,"UpgradeMethod","=");b[s]&&(n.socket=b[s]);const c=a.countLines(r,"Caption"),u=a.getValue(r,"NumberOfLogicalProcessors","="),l=a.getValue(r,"NumberOfCores","=");c&&(n.processors=parseInt(c)||1),l&&u&&(n.cores=parseInt(u)||a.cores(),n.physicalCores=parseInt(l)||a.cores()),c>1&&(n.cores=n.cores*c,n.physicalCores=n.physicalCores*c),r=t[1].split("\r\n").filter((e=>""!==e.trim())).filter(((e,t)=>t>0)),r.forEach((function(e){""!==e&&("L1 Cache"===(e=e.trim().split(/\s\s+/))[2]&&"3"===e[0]&&(n.cache.l1i=parseInt(e[1],10)),"L1 Cache"===e[2]&&"4"===e[0]&&(n.cache.l1d=parseInt(e[1],10)))})),e(n)}))}catch(t){e(n)}}))}))})).then((n=>{e&&e(n),t(n)}))}))}))},t.cpuCurrentSpeed=function(e){return new Promise((t=>{process.nextTick((()=>{let n=I();if(0===n.avg&&0!==g){const e=parseFloat(g);n={min:e,max:e,avg:e,cores:[]}}e&&e(n),t(n)}))}))},t.cpuTemperature=function(e){return new Promise((t=>{process.nextTick((()=>{let r={main:null,cores:[],max:null,socket:[],chipset:null};if(u){try{const e=o('cat /sys/class/thermal/thermal_zone*/type 2>/dev/null; echo "-----"; cat /sys/class/thermal/thermal_zone*/temp 2>/dev/null;').toString().split("-----\n");if(2===e.length){const t=e[0].split("\n"),n=e[1].split("\n");for(let e=0;e<t.length;e++){const i=t[e].trim();i.startsWith("acpi")&&n[e]&&r.socket.push(Math.round(parseInt(n[e],10)/100)/10),i.startsWith("pch")&&n[e]&&(r.chipset=Math.round(parseInt(n[e],10)/100)/10)}}}catch(e){a.noop()}const n='for mon in /sys/class/hwmon/hwmon*; do for label in "$mon"/temp*_label; do if [ -f $label ]; then value=$(echo $label | rev | cut -c 7- | rev)_input; if [ -f "$value" ]; then echo $(cat "$label")___$(cat "$value"); fi; fi; done; done;';try{i(n,(function(n,o){if(o.toString().split("\n").forEach((e=>{const t=e.split("___"),n=t[0],i=t.length>1&&t[1]?t[1]:"0";i&&(void 0===n||n&&n.toLowerCase().startsWith("core"))?r.cores.push(Math.round(parseInt(i,10)/100)/10):i&&n&&null===r.main&&(r.main=Math.round(parseInt(i,10)/100)/10)})),r.cores.length>0){null===r.main&&(r.main=Math.round(r.cores.reduce(((e,t)=>e+t),0)/r.cores.length));let e=Math.max.apply(Math,r.cores);r.max=e>r.main?e:r.main}if(null!==r.main)return null===r.max&&(r.max=r.main),e&&e(r),void t(r);i("sensors",(function(n,o){if(!n){let n=o.toString().split("\n"),i=null,s=!0,a="";if(n.forEach((function(e){""===e.trim()?s=!0:s&&(e.trim().toLowerCase().startsWith("acpi")&&(a="acpi"),e.trim().toLowerCase().startsWith("pch")&&(a="pch"),e.trim().toLowerCase().startsWith("core")&&(a="core"),s=!1);let t=e.match(/[+-]([^°]*)/g),n=e.split(":")[0].toUpperCase();"acpi"===a?-1!==n.indexOf("TEMP")&&r.socket.push(parseFloat(t)):"pch"===a&&-1!==n.indexOf("TEMP")&&(r.chipset=parseFloat(t)),-1===n.indexOf("PHYSICAL")&&-1===n.indexOf("PACKAGE")||(r.main=parseFloat(t)),-1!==n.indexOf("CORE ")&&r.cores.push(parseFloat(t)),-1!==n.indexOf("TDIE")&&null===i&&(i=parseFloat(t))})),r.cores.length>0){null===r.main&&(r.main=Math.round(r.cores.reduce(((e,t)=>e+t),0)/r.cores.length));let e=Math.max.apply(Math,r.cores);r.max=e>r.main?e:r.main}else null===r.main&&null!==i&&(r.main=i,r.max=i);if(null!==r.main||null!==r.max)return e&&e(r),void t(r)}s.stat("/sys/class/thermal/thermal_zone0/temp",(function(n){null===n?s.readFile("/sys/class/thermal/thermal_zone0/temp",(function(n,i){if(!n){let e=i.toString().split("\n");e.length>0&&(r.main=parseFloat(e[0])/1e3,r.max=r.main)}e&&e(r),t(r)})):i("/opt/vc/bin/vcgencmd measure_temp",(function(n,i){if(!n){let e=i.toString().split("\n");e.length>0&&e[0].indexOf("=")&&(r.main=parseFloat(e[0].split("=")[1]),r.max=r.main)}e&&e(r),t(r)}))}))}))}))}catch(n){e&&e(r),t(r)}}if((f||d||h)&&i("sysctl dev.cpu | grep temp",(function(n,i){if(!n){let e=i.toString().split("\n"),t=0;e.forEach((function(e){const n=e.split(":");if(n.length>1){const e=parseFloat(n[1].replace(",","."));e>r.max&&(r.max=e),t+=e,r.cores.push(e)}})),r.cores.length&&(r.main=Math.round(t/r.cores.length*100)/100)}e&&e(r),t(r)})),l){let i=null;try{i=n(Object(function(){var e=new Error("Cannot find module 'osx-temperature-sensor'");throw e.code="MODULE_NOT_FOUND",e}()))}catch(e){i=null}i&&(r=i.cpuTemperature()),e&&e(r),t(r)}if(m&&(e&&e(r),t(r)),p)try{a.wmic("/namespace:\\\\root\\wmi PATH MSAcpi_ThermalZoneTemperature get CurrentTemperature").then(((n,i)=>{if(!i){let e=0;n.split("\r\n").filter((e=>""!==e.trim())).filter(((e,t)=>t>0)).forEach((function(t){let n=(parseInt(t,10)-2732)/10;e+=n,n>r.max&&(r.max=n),r.cores.push(n)})),r.cores.length&&(r.main=e/r.cores.length)}e&&e(r),t(r)}))}catch(n){e&&e(r),t(r)}}))}))},t.cpuFlags=C,t.cpuCache=x,t.currentLoad=function(e){return new Promise((t=>{process.nextTick((()=>{new Promise((e=>{process.nextTick((()=>{let t=r.loadavg().map((function(e){return e/a.cores()})),n=parseFloat(Math.max.apply(Math,t).toFixed(2)),i={};if(Date.now()-v.ms>=200){v.ms=Date.now();const e=r.cpus();let t=0,o=0,s=0,a=0,c=0,u=[];_=e&&e.length?e.length:0;for(let n=0;n<_;n++){const r=e[n].times;t+=r.user,o+=r.sys,s+=r.nice,c+=r.idle,a+=r.irq;let i=y&&y[n]&&y[n].totalTick?y[n].totalTick:0,l=y&&y[n]&&y[n].totalLoad?y[n].totalLoad:0,p=y&&y[n]&&y[n].user?y[n].user:0,f=y&&y[n]&&y[n].sys?y[n].sys:0,d=y&&y[n]&&y[n].nice?y[n].nice:0,h=y&&y[n]&&y[n].idle?y[n].idle:0,m=y&&y[n]&&y[n].irq?y[n].irq:0;y[n]=r,y[n].totalTick=y[n].user+y[n].sys+y[n].nice+y[n].irq+y[n].idle,y[n].totalLoad=y[n].user+y[n].sys+y[n].nice+y[n].irq,y[n].currentTick=y[n].totalTick-i,y[n].load=y[n].totalLoad-l,y[n].loadUser=y[n].user-p,y[n].loadSystem=y[n].sys-f,y[n].loadNice=y[n].nice-d,y[n].loadIdle=y[n].idle-h,y[n].loadIrq=y[n].irq-m,u[n]={},u[n].load=y[n].load/y[n].currentTick*100,u[n].loadUser=y[n].loadUser/y[n].currentTick*100,u[n].loadSystem=y[n].loadSystem/y[n].currentTick*100,u[n].loadNice=y[n].loadNice/y[n].currentTick*100,u[n].loadIdle=y[n].loadIdle/y[n].currentTick*100,u[n].loadIrq=y[n].loadIrq/y[n].currentTick*100,u[n].rawLoad=y[n].load,u[n].rawLoadUser=y[n].loadUser,u[n].rawLoadSystem=y[n].loadSystem,u[n].rawLoadNice=y[n].loadNice,u[n].rawLoadIdle=y[n].loadIdle,u[n].rawLoadIrq=y[n].loadIrq}let l=t+o+s+a+c,p=t+o+s+a,f=l-v.tick;i={avgLoad:n,currentLoad:(p-v.load)/f*100,currentLoadUser:(t-v.user)/f*100,currentLoadSystem:(o-v.system)/f*100,currentLoadNice:(s-v.nice)/f*100,currentLoadIdle:(c-v.idle)/f*100,currentLoadIrq:(a-v.irq)/f*100,rawCurrentLoad:p-v.load,rawCurrentLoadUser:t-v.user,rawCurrentLoadSystem:o-v.system,rawCurrentLoadNice:s-v.nice,rawCurrentLoadIdle:c-v.idle,rawCurrentLoadIrq:a-v.irq,cpus:u},v={user:t,nice:s,system:o,idle:c,irq:a,tick:l,load:p,ms:v.ms,currentLoad:i.currentLoad,currentLoadUser:i.currentLoadUser,currentLoadSystem:i.currentLoadSystem,currentLoadNice:i.currentLoadNice,currentLoadIdle:i.currentLoadIdle,currentLoadIrq:i.currentLoadIrq,rawCurrentLoad:i.rawCurrentLoad,rawCurrentLoadUser:i.rawCurrentLoadUser,rawCurrentLoadSystem:i.rawCurrentLoadSystem,rawCurrentLoadNice:i.rawCurrentLoadNice,rawCurrentLoadIdle:i.rawCurrentLoadIdle,rawCurrentLoadIrq:i.rawCurrentLoadIrq}}else{let e=[];for(let t=0;t<_;t++)e[t]={},e[t].load=y[t].load/y[t].currentTick*100,e[t].loadUser=y[t].loadUser/y[t].currentTick*100,e[t].loadSystem=y[t].loadSystem/y[t].currentTick*100,e[t].loadNice=y[t].loadNice/y[t].currentTick*100,e[t].loadIdle=y[t].loadIdle/y[t].currentTick*100,e[t].loadIrq=y[t].loadIrq/y[t].currentTick*100,e[t].rawLoad=y[t].load,e[t].rawLoadUser=y[t].loadUser,e[t].rawLoadSystem=y[t].loadSystem,e[t].rawLoadNice=y[t].loadNice,e[t].rawLoadIdle=y[t].loadIdle,e[t].rawLoadIrq=y[t].loadIrq;i={avgLoad:n,currentload:v.currentload,currentloadUser:v.currentloadUser,currentloadSystem:v.currentloadSystem,currentloadNice:v.currentloadNice,currentloadIdle:v.currentloadIdle,currentloadIrq:v.currentloadIrq,rawCurrentload:v.rawCurrentload,rawCurrentloadUser:v.rawCurrentloadUser,rawCurrentloadSystem:v.rawCurrentloadSystem,rawCurrentloadNice:v.rawCurrentloadNice,rawCurrentloadIdle:v.rawCurrentloadIdle,rawCurrentloadIrq:v.rawCurrentloadIrq,cpus:e}}e(i)}))})).then((n=>{e&&e(n),t(n)}))}))}))},t.fullLoad=function(e){return new Promise((t=>{process.nextTick((()=>{new Promise((e=>{process.nextTick((()=>{const t=r.cpus();let n=0,i=0,o=0,s=0,a=0,c=0;if(t&&t.length){for(let e=0,r=t.length;e<r;e++){const r=t[e].times;n+=r.user,i+=r.sys,o+=r.nice,s+=r.irq,a+=r.idle}let e=a+s+o+i+n;c=(e-a)/e*100}else c=0;e(c)}))})).then((n=>{e&&e(n),t(n)}))}))}))}},8725:(e,t,n)=>{"use strict";const r=n(1453),i=n(3568);const o="win32"===process.platform;let s,a={},c=0;function u(e,t){function n(e,t){return e.filter((e=>e.Id&&e.Id===t)).length>0}r.isFunction(e)&&!t&&(t=e,e=!1),"string"==typeof e&&"true"===e&&(e=!0),"boolean"!=typeof e&&void 0!==e&&(e=!1),e=e||!1;let o=[];return new Promise((c=>{process.nextTick((()=>{s||(s=new i);const u=[];s.listContainers(e,(e=>{let l={};try{if(l=e,l&&"[object Array]"===Object.prototype.toString.call(l)&&l.length>0){for(let e in a)({}).hasOwnProperty.call(a,e)&&(n(l,e)||delete a[e]);l.forEach((function(e){var t,n;e.Names&&"[object Array]"===Object.prototype.toString.call(e.Names)&&e.Names.length>0&&(e.Name=e.Names[0].replace(/^\/|\/$/g,"")),u.push((t=e.Id.trim(),n=e,new Promise((e=>{process.nextTick((()=>{"string"!=typeof(t=t||"")&&e();const o=(r.isPrototypePolluted()?"":r.sanitizeShellString(t,!0)).trim();o?(s||(s=new i),s.getInspect(o.trim(),(t=>{try{e({id:n.Id,name:n.Name,image:n.Image,imageID:n.ImageID,command:n.Command,created:n.Created,started:t.State&&t.State.StartedAt?Math.round(new Date(t.State.StartedAt).getTime()/1e3):0,finished:t.State&&t.State.FinishedAt&&!t.State.FinishedAt.startsWith("0001-01-01")?Math.round(new Date(t.State.FinishedAt).getTime()/1e3):0,createdAt:t.Created?t.Created:"",startedAt:t.State&&t.State.StartedAt?t.State.StartedAt:"",finishedAt:t.State&&t.State.FinishedAt&&!t.State.FinishedAt.startsWith("0001-01-01")?t.State.FinishedAt:"",state:n.State,restartCount:t.RestartCount||0,platform:t.Platform||"",driver:t.Driver||"",ports:n.Ports,mounts:n.Mounts})}catch(t){e()}}))):e()}))}))))})),u.length?Promise.all(u).then((e=>{t&&t(e),c(e)})):(t&&t(o),c(o))}else t&&t(o),c(o)}catch(e){for(let e in a)({}).hasOwnProperty.call(a,e)&&(n(l,e)||delete a[e]);t&&t(o),c(o)}}))}))}))}function l(e,t){let n=[];return new Promise((i=>{process.nextTick((()=>{if(r.isFunction(e)&&!t)t=e,n=["*"];else{if("string"!=typeof(e=e||"*"))return t&&t([]),i([]);let o="";if(o.__proto__.toLowerCase=r.stringToLower,o.__proto__.replace=r.stringReplace,o.__proto__.trim=r.stringTrim,o=e,o=o.trim(),"*"!==o){o="";const t=(r.isPrototypePolluted()?"":r.sanitizeShellString(e,!0)).trim();for(let e=0;e<=r.mathMin(t.length,2e3);e++)if(void 0!==t[e]){t[e].__proto__.toLowerCase=r.stringToLower;const n=t[e].toLowerCase();n&&n[0]&&!n[1]&&(o+=n[0])}}o=o.trim().toLowerCase().replace(/,+/g,"|"),n=o.split("|")}const o=[],s=[];if(n.length&&"*"===n[0].trim())n=[],u().then((e=>{for(let t of e)n.push(t.id);n.length?l(n.join(",")).then((e=>{t&&t(e),i(e)})):(t&&t(o),i(o))}));else{for(let e of n)s.push(p(e.trim()));s.length?Promise.all(s).then((e=>{t&&t(e),i(e)})):(t&&t(o),i(o))}}))}))}function p(e){let t={id:e=e||"",memUsage:0,memLimit:0,memPercent:0,cpuPercent:0,pids:0,netIO:{rx:0,wx:0},blockIO:{r:0,w:0}};return new Promise((n=>{process.nextTick((()=>{e?(s||(s=new i),s.getInspect(e,(i=>{try{s.getStats(e,(e=>{try{let n=e;n.message||(t.memUsage=n.memory_stats&&n.memory_stats.usage?n.memory_stats.usage:0,t.memLimit=n.memory_stats&&n.memory_stats.limit?n.memory_stats.limit:0,t.memPercent=n.memory_stats&&n.memory_stats.usage&&n.memory_stats.limit?n.memory_stats.usage/n.memory_stats.limit*100:0,t.cpuPercent=n.cpu_stats&&n.precpu_stats?function(e,t){if(o){let n=r.nanoSeconds(),i=0;if(c>0){let r=n-c,o=e.cpu_usage.total_usage-t.cpu_usage.total_usage;r>0&&(i=100*o/r)}return c=n,i}{let n=0,r=e.cpu_usage.total_usage-t.cpu_usage.total_usage,i=e.system_cpu_usage-t.system_cpu_usage;return i>0&&r>0&&(n=r/i*e.cpu_usage.percpu_usage.length*100),n}}(n.cpu_stats,n.precpu_stats):0,t.pids=n.pids_stats&&n.pids_stats.current?n.pids_stats.current:0,t.restartCount=i.RestartCount?i.RestartCount:0,n.networks&&(t.netIO=function(e){let t,n;for(let r in e){if(!{}.hasOwnProperty.call(e,r))continue;let i=e[r];t=+i.rx_bytes,n=+i.tx_bytes}return{rx:t,wx:n}}(n.networks)),n.blkio_stats&&(t.blockIO=function(e){let t={r:0,w:0};return e&&e.io_service_bytes_recursive&&"[object Array]"===Object.prototype.toString.call(e.io_service_bytes_recursive)&&e.io_service_bytes_recursive.length>0&&e.io_service_bytes_recursive.forEach((function(e){e.op&&"read"===e.op.toLowerCase()&&e.value&&(t.r+=e.value),e.op&&"write"===e.op.toLowerCase()&&e.value&&(t.w+=e.value)})),t}(n.blkio_stats)),t.cpuStats=n.cpu_stats?n.cpu_stats:{},t.precpuStats=n.precpu_stats?n.precpu_stats:{},t.memoryStats=n.memory_stats?n.memory_stats:{},t.networks=n.networks?n.networks:{})}catch(e){r.noop()}n(t)}))}catch(e){r.noop()}}))):n(t)}))}))}function f(e,t){let n=[];return new Promise((o=>{process.nextTick((()=>{"string"!=typeof(e=e||"")&&o(n);const a=(r.isPrototypePolluted()?"":r.sanitizeShellString(e,!0)).trim();a?(s||(s=new i),s.getProcesses(a,(e=>{try{if(e&&e.Titles&&e.Processes){let t=e.Titles.map((function(e){return e.toUpperCase()})),r=t.indexOf("PID"),i=t.indexOf("PPID"),o=t.indexOf("PGID"),s=t.indexOf("VSZ"),a=t.indexOf("TIME"),c=t.indexOf("ELAPSED"),u=t.indexOf("NI"),l=t.indexOf("RUSER"),p=t.indexOf("USER"),f=t.indexOf("RGROUP"),d=t.indexOf("GROUP"),h=t.indexOf("STAT"),m=t.indexOf("RSS"),g=t.indexOf("COMMAND");e.Processes.forEach((e=>{n.push({pidHost:r>=0?e[r]:"",ppid:i>=0?e[i]:"",pgid:o>=0?e[o]:"",user:p>=0?e[p]:"",ruser:l>=0?e[l]:"",group:d>=0?e[d]:"",rgroup:f>=0?e[f]:"",stat:h>=0?e[h]:"",time:a>=0?e[a]:"",elapsed:c>=0?e[c]:"",nice:u>=0?e[u]:"",rss:m>=0?e[m]:"",vsz:s>=0?e[s]:"",command:g>=0?e[g]:""})}))}}catch(e){r.noop()}t&&t(n),o(n)}))):(t&&t(n),o(n))}))}))}t.dockerInfo=function(e){return new Promise((t=>{process.nextTick((()=>{s||(s=new i);const n={};s.getInfo((r=>{n.id=r.ID,n.containers=r.Containers,n.containersRunning=r.ContainersRunning,n.containersPaused=r.ContainersPaused,n.containersStopped=r.ContainersStopped,n.images=r.Images,n.driver=r.Driver,n.memoryLimit=r.MemoryLimit,n.swapLimit=r.SwapLimit,n.kernelMemory=r.KernelMemory,n.cpuCfsPeriod=r.CpuCfsPeriod,n.cpuCfsQuota=r.CpuCfsQuota,n.cpuShares=r.CPUShares,n.cpuSet=r.CPUSet,n.ipv4Forwarding=r.IPv4Forwarding,n.bridgeNfIptables=r.BridgeNfIptables,n.bridgeNfIp6tables=r.BridgeNfIp6tables,n.debug=r.Debug,n.nfd=r.NFd,n.oomKillDisable=r.OomKillDisable,n.ngoroutines=r.NGoroutines,n.systemTime=r.SystemTime,n.loggingDriver=r.LoggingDriver,n.cgroupDriver=r.CgroupDriver,n.nEventsListener=r.NEventsListener,n.kernelVersion=r.KernelVersion,n.operatingSystem=r.OperatingSystem,n.osType=r.OSType,n.architecture=r.Architecture,n.ncpu=r.NCPU,n.memTotal=r.MemTotal,n.dockerRootDir=r.DockerRootDir,n.httpProxy=r.HttpProxy,n.httpsProxy=r.HttpsProxy,n.noProxy=r.NoProxy,n.name=r.Name,n.labels=r.Labels,n.experimentalBuild=r.ExperimentalBuild,n.serverVersion=r.ServerVersion,n.clusterStore=r.ClusterStore,n.clusterAdvertise=r.ClusterAdvertise,n.defaultRuntime=r.DefaultRuntime,n.liveRestoreEnabled=r.LiveRestoreEnabled,n.isolation=r.Isolation,n.initBinary=r.InitBinary,n.productLicense=r.ProductLicense,e&&e(n),t(n)}))}))}))},t.dockerImages=function(e,t){r.isFunction(e)&&!t&&(t=e,e=!1),"string"==typeof e&&"true"===e&&(e=!0),"boolean"!=typeof e&&void 0!==e&&(e=!1),e=e||!1;let n=[];return new Promise((o=>{process.nextTick((()=>{s||(s=new i);const a=[];s.listImages(e,(e=>{let c={};try{c=e,c&&"[object Array]"===Object.prototype.toString.call(c)&&c.length>0?(c.forEach((function(e){var t,n;e.Names&&"[object Array]"===Object.prototype.toString.call(e.Names)&&e.Names.length>0&&(e.Name=e.Names[0].replace(/^\/|\/$/g,"")),a.push((t=e.Id.trim(),n=e,new Promise((e=>{process.nextTick((()=>{"string"!=typeof(t=t||"")&&e();const o=(r.isPrototypePolluted()?"":r.sanitizeShellString(t,!0)).trim();o?(s||(s=new i),s.inspectImage(o.trim(),(t=>{try{e({id:n.Id,container:t.Container,comment:t.Comment,os:t.Os,architecture:t.Architecture,parent:t.Parent,dockerVersion:t.DockerVersion,size:t.Size,sharedSize:n.SharedSize,virtualSize:t.VirtualSize,author:t.Author,created:t.Created?Math.round(new Date(t.Created).getTime()/1e3):0,containerConfig:t.ContainerConfig?t.ContainerConfig:{},graphDriver:t.GraphDriver?t.GraphDriver:{},repoDigests:t.RepoDigests?t.RepoDigests:{},repoTags:t.RepoTags?t.RepoTags:{},config:t.Config?t.Config:{},rootFS:t.RootFS?t.RootFS:{}})}catch(t){e()}}))):e()}))}))))})),a.length?Promise.all(a).then((e=>{t&&t(e),o(e)})):(t&&t(n),o(n))):(t&&t(n),o(n))}catch(e){t&&t(n),o(n)}}))}))}))},t.dockerContainers=u,t.dockerContainerStats=l,t.dockerContainerProcesses=f,t.dockerVolumes=function(e){let t=[];return new Promise((n=>{process.nextTick((()=>{s||(s=new i),s.listVolumes((r=>{let i={};try{i=r,i&&i.Volumes&&"[object Array]"===Object.prototype.toString.call(i.Volumes)&&i.Volumes.length>0?(i.Volumes.forEach((function(e){t.push({name:e.Name,driver:e.Driver,labels:e.Labels,mountpoint:e.Mountpoint,options:e.Options,scope:e.Scope,created:e.CreatedAt?Math.round(new Date(e.CreatedAt).getTime()/1e3):0})})),e&&e(t),n(t)):(e&&e(t),n(t))}catch(r){e&&e(t),n(t)}}))}))}))},t.dockerAll=function(e){return new Promise((t=>{process.nextTick((()=>{u(!0).then((n=>{if(n&&"[object Array]"===Object.prototype.toString.call(n)&&n.length>0){let r=n.length;n.forEach((function(i){l(i.id).then((o=>{i.memUsage=o[0].memUsage,i.memLimit=o[0].memLimit,i.memPercent=o[0].memPercent,i.cpuPercent=o[0].cpuPercent,i.pids=o[0].pids,i.netIO=o[0].netIO,i.blockIO=o[0].blockIO,i.cpuStats=o[0].cpuStats,i.precpuStats=o[0].precpuStats,i.memoryStats=o[0].memoryStats,i.networks=o[0].networks,f(i.id).then((o=>{i.processes=o,r-=1,0===r&&(e&&e(n),t(n))}))}))}))}else e&&e(n),t(n)}))}))}))}},3568:(e,t,n)=>{"use strict";const r=n(1631),i="Windows_NT"===n(2087).type()?"//./pipe/docker_engine":"/var/run/docker.sock";e.exports=class{getInfo(e){try{let t,n=r.createConnection({path:i}),o="";n.on("connect",(()=>{n.write("GET http:/info HTTP/1.0\r\n\r\n")})),n.on("data",(e=>{o+=e.toString()})),n.on("error",(()=>{n=!1,e({})})),n.on("end",(()=>{let r=o.indexOf("\r\n\r\n");o=o.substring(r+4),n=!1;try{t=JSON.parse(o),e(t)}catch(t){e({})}}))}catch(t){e({})}}listImages(e,t){try{let n,o=r.createConnection({path:i}),s="";o.on("connect",(()=>{o.write("GET http:/images/json"+(e?"?all=1":"")+" HTTP/1.0\r\n\r\n")})),o.on("data",(e=>{s+=e.toString()})),o.on("error",(()=>{o=!1,t({})})),o.on("end",(()=>{let e=s.indexOf("\r\n\r\n");s=s.substring(e+4),o=!1;try{n=JSON.parse(s),t(n)}catch(e){t({})}}))}catch(e){t({})}}inspectImage(e,t){if(e=e||"")try{let n,o=r.createConnection({path:i}),s="";o.on("connect",(()=>{o.write("GET http:/images/"+e+"/json?stream=0 HTTP/1.0\r\n\r\n")})),o.on("data",(e=>{s+=e.toString()})),o.on("error",(()=>{o=!1,t({})})),o.on("end",(()=>{let e=s.indexOf("\r\n\r\n");s=s.substring(e+4),o=!1;try{n=JSON.parse(s),t(n)}catch(e){t({})}}))}catch(e){t({})}else t({})}listContainers(e,t){try{let n,o=r.createConnection({path:i}),s="";o.on("connect",(()=>{o.write("GET http:/containers/json"+(e?"?all=1":"")+" HTTP/1.0\r\n\r\n")})),o.on("data",(e=>{s+=e.toString()})),o.on("error",(()=>{o=!1,t({})})),o.on("end",(()=>{let e=s.indexOf("\r\n\r\n");s=s.substring(e+4),o=!1;try{n=JSON.parse(s),t(n)}catch(e){t({})}}))}catch(e){t({})}}getStats(e,t){if(e=e||"")try{let n,o=r.createConnection({path:i}),s="";o.on("connect",(()=>{o.write("GET http:/containers/"+e+"/stats?stream=0 HTTP/1.0\r\n\r\n")})),o.on("data",(e=>{s+=e.toString()})),o.on("error",(()=>{o=!1,t({})})),o.on("end",(()=>{let e=s.indexOf("\r\n\r\n");s=s.substring(e+4),o=!1;try{n=JSON.parse(s),t(n)}catch(e){t({})}}))}catch(e){t({})}else t({})}getInspect(e,t){if(e=e||"")try{let n,o=r.createConnection({path:i}),s="";o.on("connect",(()=>{o.write("GET http:/containers/"+e+"/json?stream=0 HTTP/1.0\r\n\r\n")})),o.on("data",(e=>{s+=e.toString()})),o.on("error",(()=>{o=!1,t({})})),o.on("end",(()=>{let e=s.indexOf("\r\n\r\n");s=s.substring(e+4),o=!1;try{n=JSON.parse(s),t(n)}catch(e){t({})}}))}catch(e){t({})}else t({})}getProcesses(e,t){if(e=e||"")try{let n,o=r.createConnection({path:i}),s="";o.on("connect",(()=>{o.write("GET http:/containers/"+e+"/top?ps_args=-opid,ppid,pgid,vsz,time,etime,nice,ruser,user,rgroup,group,stat,rss,args HTTP/1.0\r\n\r\n")})),o.on("data",(e=>{s+=e.toString()})),o.on("error",(()=>{o=!1,t({})})),o.on("end",(()=>{let e=s.indexOf("\r\n\r\n");s=s.substring(e+4),o=!1;try{n=JSON.parse(s),t(n)}catch(e){t({})}}))}catch(e){t({})}else t({})}listVolumes(e){try{let t,n=r.createConnection({path:i}),o="";n.on("connect",(()=>{n.write("GET http:/volumes HTTP/1.0\r\n\r\n")})),n.on("data",(e=>{o+=e.toString()})),n.on("error",(()=>{n=!1,e({})})),n.on("end",(()=>{let r=o.indexOf("\r\n\r\n");o=o.substring(r+4),n=!1;try{t=JSON.parse(o),e(t)}catch(t){e({})}}))}catch(t){e({})}}}},2683:(e,t,n)=>{"use strict";const r=n(3129).exec,i=n(3129).execSync,o=n(1453),s=n(5747);let a=process.platform;const c="linux"===a,u="darwin"===a,l="win32"===a,p="freebsd"===a,f="openbsd"===a,d="netbsd"===a,h="sunos"===a;let m={},g={};function v(e){let t=[],n=0;return e.forEach((e=>{if(e.length>0)if("*"===e[0])n++;else{let i=e.split(":");i.length>1&&(t[n]||(t[n]={name:"",identifier:"",type:"disk",fsType:"",mount:"",size:0,physical:"HDD",uuid:"",label:"",model:"",serial:"",removable:!1,protocol:""}),i[0]=i[0].trim().toUpperCase().replace(/ +/g,""),i[1]=i[1].trim(),"DEVICEIDENTIFIER"===i[0]&&(t[n].identifier=i[1]),"DEVICENODE"===i[0]&&(t[n].name=i[1]),"VOLUMENAME"===i[0]&&-1===i[1].indexOf("Not applicable")&&(t[n].label=i[1]),"PROTOCOL"===i[0]&&(t[n].protocol=i[1]),"DISKSIZE"===i[0]&&(t[n].size=(r=i[1],parseInt(r.substr(r.indexOf(" (")+2,r.indexOf(" Bytes)")-10)))),"FILESYSTEMPERSONALITY"===i[0]&&(t[n].fsType=i[1]),"MOUNTPOINT"===i[0]&&(t[n].mount=i[1]),"VOLUMEUUID"===i[0]&&(t[n].uuid=i[1]),"READ-ONLYMEDIA"===i[0]&&"Yes"===i[1]&&(t[n].physical="CD/DVD"),"SOLIDSTATE"===i[0]&&"Yes"===i[1]&&(t[n].physical="SSD"),"VIRTUAL"===i[0]&&(t[n].type="virtual"),"REMOVABLEMEDIA"===i[0]&&(t[n].removable="Removable"===i[1]),"PARTITIONTYPE"===i[0]&&(t[n].type="part"),"DEVICE/MEDIANAME"===i[0]&&(t[n].model=i[1]))}var r})),t}function y(e){let t=[];return e.filter((e=>""!==e)).forEach((e=>{try{e=(e=decodeURIComponent(e.replace(/\\x/g,"%"))).replace(/\\/g,"\\\\");let n=JSON.parse(e);t.push({name:n.name,type:n.type,fsType:n.fsType,mount:n.mountpoint,size:parseInt(n.size),physical:"disk"===n.type?"0"===n.rota?"SSD":"HDD":"rom"===n.type?"CD/DVD":"",uuid:n.uuid,label:n.label,model:n.model,serial:n.serial,removable:"1"===n.rm,protocol:n.tran,group:n.group})}catch(e){o.noop()}})),t=o.unique(t),t=o.sortByKey(t,["type","name"]),t}function _(e){return e.toString().replace(/NAME=/g,'{"name":').replace(/FSTYPE=/g,',"fsType":').replace(/TYPE=/g,',"type":').replace(/SIZE=/g,',"size":').replace(/MOUNTPOINT=/g,',"mountpoint":').replace(/UUID=/g,',"uuid":').replace(/ROTA=/g,',"rota":').replace(/RO=/g,',"ro":').replace(/RM=/g,',"rm":').replace(/TRAN=/g,',"tran":').replace(/SERIAL=/g,',"serial":').replace(/LABEL=/g,',"label":').replace(/MODEL=/g,',"model":').replace(/OWNER=/g,',"owner":').replace(/GROUP=/g,',"group":').replace(/\n/g,"}\n")}function E(e,t){let n={rx:0,wx:0,tx:0,rx_sec:null,wx_sec:null,tx_sec:null,ms:0};return m&&m.ms?(n.rx=e,n.wx=t,n.tx=n.rx+n.wx,n.ms=Date.now()-m.ms,n.rx_sec=(n.rx-m.bytes_read)/(n.ms/1e3),n.wx_sec=(n.wx-m.bytes_write)/(n.ms/1e3),n.tx_sec=n.rx_sec+n.wx_sec,m.rx_sec=n.rx_sec,m.wx_sec=n.wx_sec,m.tx_sec=n.tx_sec,m.bytes_read=n.rx,m.bytes_write=n.wx,m.bytes_overall=n.rx+n.wx,m.ms=Date.now(),m.last_ms=n.ms):(n.rx=e,n.wx=t,n.tx=n.rx+n.wx,m.rx_sec=null,m.wx_sec=null,m.tx_sec=null,m.bytes_read=n.rx,m.bytes_write=n.wx,m.bytes_overall=n.rx+n.wx,m.ms=Date.now(),m.last_ms=0),n}function b(e,t){let n={rIO:0,wIO:0,tIO:0,rIO_sec:null,wIO_sec:null,tIO_sec:null,ms:0};return g&&g.ms?(n.rIO=e,n.wIO=t,n.tIO=e+t,n.ms=Date.now()-g.ms,n.rIO_sec=(n.rIO-g.rIO)/(n.ms/1e3),n.wIO_sec=(n.wIO-g.wIO)/(n.ms/1e3),n.tIO_sec=n.rIO_sec+n.wIO_sec,g.rIO=e,g.wIO=t,g.rIO_sec=n.rIO_sec,g.wIO_sec=n.wIO_sec,g.tIO_sec=n.tIO_sec,g.last_ms=n.ms,g.ms=Date.now()):(n.rIO=e,n.wIO=t,n.tIO=e+t,g.rIO=e,g.wIO=t,g.rIO_sec=null,g.wIO_sec=null,g.tIO_sec=null,g.last_ms=0,g.ms=Date.now()),n}t.fsSize=function(e){let t=[];function n(e){let n=[];return e.forEach((function(e){if(""!==e&&(e=e.replace(/ +/g," ").split(" "))&&(e[0].startsWith("/")||e[6]&&"/"===e[6]||e[0].indexOf("/")>0||1===e[0].indexOf(":"))){const r=e[0],i=c||p||f||d?e[1]:function(e){if(!e.startsWith("/"))return"NFS";const n=e.split("/"),r=n[n.length-1],i=t.filter((e=>e.indexOf(r)>=0));return 1===i.length&&i[0].indexOf("APFS")>=0?"APFS":"HFS"}(e[0]),o=1024*parseInt(c||p||f||d?e[2]:e[1]),s=1024*parseInt(c||p||f||d?e[3]:e[2]),a=1024*parseInt(c||p||f||d?e[4]:e[3]),u=parseFloat((s/(s+a)*100).toFixed(2));e.splice(0,c||p||f||d?6:5);const l=e.join(" ");n.find((e=>e.fs===r&&e.type===i))||n.push({fs:r,type:i,size:o,used:s,available:a,use:u,mount:l})}})),n}return new Promise((s=>{process.nextTick((()=>{let a=[];if(c||p||f||d||u){let o="";if(u){o="df -kP";try{t=i("diskutil list").toString().split("\n").filter((e=>!e.startsWith("/")&&e.indexOf(":")>0))}catch(e){t=[]}}c&&(o='df -lkPTx squashfs | grep -E "^/|^.\\:"'),(p||f||d)&&(o="df -lkPT"),r(o,(function(t,i){if(t)r("df -kPT",(function(t,r){if(!t){let e=r.toString().split("\n");a=n(e)}e&&e(a),s(a)}));else{let t=i.toString().split("\n");a=n(t),e&&e(a),s(a)}}))}if(h&&(e&&e(a),s(a)),l)try{o.wmic("logicaldisk get Caption,FileSystem,FreeSpace,Size").then((t=>{t.split("\r\n").filter((e=>""!==e.trim())).filter(((e,t)=>t>0)).forEach((function(e){""!==e&&(e=e.trim().split(/\s\s+/)).length>=4&&parseInt(e[3],10)&&a.push({fs:e[0],type:e[1],size:parseInt(e[3],10),used:parseInt(e[3],10)-parseInt(e[2],10),available:parseInt(e[2],10),use:parseFloat((100*(parseInt(e[3])-parseInt(e[2]))/parseInt(e[3])).toFixed(2)),mount:e[0]})})),e&&e(a),s(a)}))}catch(t){e&&e(a),s(a)}}))}))},t.fsOpenFiles=function(e){return new Promise((t=>{process.nextTick((()=>{const n={max:null,allocated:null,available:null};if(p||f||d||u){r("sysctl -a | grep 'kern.*files'",(function(r,i){if(!r){let e=i.toString().split("\n");n.max=parseInt(o.getValue(e,"kern.maxfiles",":"),10),n.allocated=parseInt(o.getValue(e,"kern.num_files",":"),10),n.available=n.max-n.allocated}e&&e(n),t(n)}))}c&&s.readFile("/proc/sys/fs/file-nr",(function(r,i){if(r)s.readFile("/proc/sys/fs/file-max",(function(r,i){if(!r){let e=i.toString().split("\n");e[0]&&(n.max=parseInt(e[0],10))}e&&e(n),t(n)}));else{let r=i.toString().split("\n");if(r[0]){const e=r[0].replace(/\s+/g," ").split(" ");3===e.length&&(n.allocated=parseInt(e[0],10),n.available=parseInt(e[1],10),n.max=parseInt(e[2],10),n.available||(n.available=n.max-n.allocated))}e&&e(n),t(n)}})),h&&(e&&e(null),t(null)),l&&(e&&e(null),t(null))}))}))},t.blockDevices=function(e){return new Promise((t=>{process.nextTick((()=>{let n=[];if(c&&r("lsblk -bPo NAME,TYPE,SIZE,FSTYPE,MOUNTPOINT,UUID,ROTA,RO,RM,TRAN,SERIAL,LABEL,MODEL,OWNER 2>/dev/null",(function(i,o){if(i)r("lsblk -bPo NAME,TYPE,SIZE,FSTYPE,MOUNTPOINT,UUID,ROTA,RO,RM,LABEL,MODEL,OWNER 2>/dev/null",(function(r,i){if(!r){let e=_(i).split("\n");n=y(e)}e&&e(n),t(n)}));else{let r=_(o).split("\n");n=y(r),e&&e(n),t(n)}})),u&&r("diskutil info -all",(function(r,i){if(!r){let e=i.toString().split("\n");n=v(e)}e&&e(n),t(n)})),h&&(e&&e(n),t(n)),l){let r=["Unknown","NoRoot","Removable","Local","Network","CD/DVD","RAM"];try{o.wmic("logicaldisk get Caption,Description,DeviceID,DriveType,FileSystem,FreeSpace,Name,Size,VolumeName,VolumeSerialNumber /value").then(((i,s)=>{if(!s){i.toString().split(/\n\s*\n/).forEach((function(e){let t=e.split("\r\n"),i=o.getValue(t,"drivetype","=");i&&n.push({name:o.getValue(t,"name","="),identifier:o.getValue(t,"caption","="),type:"disk",fsType:o.getValue(t,"filesystem","=").toLowerCase(),mount:o.getValue(t,"caption","="),size:o.getValue(t,"size","="),physical:i>=0&&i<=6?r[i]:r[0],uuid:o.getValue(t,"volumeserialnumber","="),label:o.getValue(t,"volumename","="),model:"",serial:o.getValue(t,"volumeserialnumber","="),removable:"2"===i,protocol:""})}))}e&&e(n),t(n)}))}catch(r){e&&e(n),t(n)}}(p||f||d)&&(e&&e(null),t(null))}))}))},t.fsStats=function(e){return new Promise((t=>{process.nextTick((()=>{l&&t(null);let n={rx:0,wx:0,tx:0,rx_sec:null,wx_sec:null,tx_sec:null,ms:0},i=0,o=0;m&&!m.ms||m&&m.ms&&Date.now()-m.ms>=500?(c&&r("lsblk -r 2>/dev/null | grep /",(function(s,a){if(s)e&&e(n),t(n);else{let s=a.toString().split("\n"),c=[];s.forEach((function(e){""!==e&&(e=e.trim().split(" "),-1===c.indexOf(e[0])&&c.push(e[0]))}));let u=c.join("|");r('cat /proc/diskstats | egrep "'+u+'"',(function(r,s){if(!r){s.toString().split("\n").forEach((function(e){""!==(e=e.trim())&&(e=e.replace(/ +/g," ").split(" "),i+=512*parseInt(e[5]),o+=512*parseInt(e[9]))})),n=E(i,o)}e&&e(n),t(n)}))}})),u&&r('ioreg -c IOBlockStorageDriver -k Statistics -r -w0 | sed -n "/IOBlockStorageDriver/,/Statistics/p" | grep "Statistics" | tr -cd "01234567890,\n"',(function(r,s){if(!r){s.toString().split("\n").forEach((function(e){""!==(e=e.trim())&&(e=e.split(","),i+=parseInt(e[2]),o+=parseInt(e[9]))})),n=E(i,o)}e&&e(n),t(n)}))):(n.ms=m.last_ms,n.rx=m.bytes_read,n.wx=m.bytes_write,n.tx=m.bytes_read+m.bytes_write,n.rx_sec=m.rx_sec,n.wx_sec=m.wx_sec,n.tx_sec=m.tx_sec,e&&e(n),t(n))}))}))},t.disksIO=function(e){return new Promise((t=>{process.nextTick((()=>{l&&t(null),h&&t(null);let n={rIO:0,wIO:0,tIO:0,rIO_sec:null,wIO_sec:null,tIO_sec:null,ms:0},i=0,o=0;if(g&&!g.ms||g&&g.ms&&Date.now()-g.ms>=500){if(c||p||f||d){r('for mount in `lsblk 2>/dev/null | grep " disk " | sed "s/[│└─├]//g" | awk \'{$1=$1};1\' | cut -d " " -f 1 | sort -u`; do cat /sys/block/$mount/stat | sed -r "s/ +/;/g" | sed -r "s/^;//"; done',(function(r,s){if(r)e&&e(n),t(n);else{s.split("\n").forEach((function(e){if(!e)return;let t=e.split(";");i+=parseInt(t[0]),o+=parseInt(t[4])})),n=b(i,o),e&&e(n),t(n)}}))}u&&r('ioreg -c IOBlockStorageDriver -k Statistics -r -w0 | sed -n "/IOBlockStorageDriver/,/Statistics/p" | grep "Statistics" | tr -cd "01234567890,\n"',(function(r,s){if(!r){s.toString().split("\n").forEach((function(e){""!==(e=e.trim())&&(e=e.split(","),i+=parseInt(e[10]),o+=parseInt(e[0]))})),n=b(i,o)}e&&e(n),t(n)}))}else n.rIO=g.rIO,n.wIO=g.wIO,n.tIO=g.rIO+g.wIO,n.ms=g.last_ms,n.rIO_sec=g.rIO_sec,n.wIO_sec=g.wIO_sec,n.tIO_sec=g.tIO_sec,e&&e(n),t(n)}))}))},t.diskLayout=function(e){function t(e){const t=[{pattern:"^WESTERN.+",manufacturer:"Western Digital"},{pattern:"^WDC.+",manufacturer:"Western Digital"},{pattern:"WD.+",manufacturer:"Western Digital"},{pattern:"^TOSHIBA.+",manufacturer:"Toshiba"},{pattern:"^HITACHI.+",manufacturer:"Hitachi"},{pattern:"^IC.+",manufacturer:"Hitachi"},{pattern:"^HTS.+",manufacturer:"Hitachi"},{pattern:"^SANDISK.+",manufacturer:"SanDisk"},{pattern:"^KINGSTON.+",manufacturer:"Kingston Technonogy"},{pattern:"^SONY.+",manufacturer:"Sony"},{pattern:"^TRANSCEND.+",manufacturer:"Transcend"},{pattern:"SAMSUNG.+",manufacturer:"Samsung"},{pattern:"^ST(?!I\\ ).+",manufacturer:"Seagate"},{pattern:"^STI\\ .+",manufacturer:"SimpleTech"},{pattern:"^D...-.+",manufacturer:"IBM"},{pattern:"^IBM.+",manufacturer:"IBM"},{pattern:"^FUJITSU.+",manufacturer:"Fujitsu"},{pattern:"^MP.+",manufacturer:"Fujitsu"},{pattern:"^MK.+",manufacturer:"Toshiba"},{pattern:"^MAXTOR.+",manufacturer:"Maxtor"},{pattern:"^Pioneer.+",manufacturer:"Pioneer"},{pattern:"^PHILIPS.+",manufacturer:"Philips"},{pattern:"^QUANTUM.+",manufacturer:"Quantum Technology"},{pattern:"FIREBALL.+",manufacturer:"Quantum Technology"},{pattern:"^VBOX.+",manufacturer:"VirtualBox"},{pattern:"CORSAIR.+",manufacturer:"Corsair Components"},{pattern:"CRUCIAL.+",manufacturer:"Crucial"},{pattern:"ECM.+",manufacturer:"ECM"},{pattern:"INTEL.+",manufacturer:"INTEL"},{pattern:".+EVO",manufacturer:"Samsung"},{pattern:"APPLE.+",manufacturer:"Apple"}];let n="";return e&&(e=e.toUpperCase(),t.forEach((t=>{RegExp(t.pattern).test(e)&&(n=t.manufacturer)}))),n}return new Promise((n=>{process.nextTick((()=>{const s=t=>{for(let e=0;e<t.length;e++)delete t[e].BSDName;e&&e(t),n(t)};let a=[],m="";if(c){let e="";r("export LC_ALL=C; lsblk -ablJO 2>/dev/null; unset LC_ALL",(function(n,c){if(!n)try{const n=c.toString().trim();let r=[];try{const e=JSON.parse(n);e&&{}.hasOwnProperty.call(e,"blockdevices")&&(r=e.blockdevices.filter((e=>"disk"===e.type&&e.size>0&&(null!==e.model||null===e.mountpoint&&null===e.label&&null===e.fsType&&null===e.parttype))))}catch(e){let t=_(i("export LC_ALL=C; lsblk -bPo NAME,TYPE,SIZE,FSTYPE,MOUNTPOINT,UUID,ROTA,RO,RM,LABEL,MODEL,OWNER,GROUP 2>/dev/null; unset LC_ALL").toString()).split("\n");r=y(t).filter((e=>"disk"===e.type&&e.size>0&&(null!==e.model&&""!==e.model||""===e.mount&&""===e.label&&""===e.fsType)))}r.forEach((n=>{let r="";const s="/dev/"+n.name,c=n.name;try{r=i("cat /sys/block/"+c+"/queue/rotational 2>/dev/null").toString().split("\n")[0]}catch(e){o.noop()}let u=n.tran?n.tran.toUpperCase().trim():"";"NVME"===u&&(r="2",u="PCIe"),a.push({device:s,type:"0"===r?"SSD":"1"===r?"HD":"2"===r?"NVMe":n.model&&n.model.indexOf("SSD")>-1?"SSD":n.model&&n.model.indexOf("NVM")>-1?"NVMe":"HD",name:n.model||"",vendor:t(n.model)||(n.vendor?n.vendor.trim():""),size:n.size||0,bytesPerSector:null,totalCylinders:null,totalHeads:null,totalSectors:null,totalTracks:null,tracksPerCylinder:null,sectorsPerTrack:null,firmwareRevision:n.rev?n.rev.trim():"",serialNum:n.serial?n.serial.trim():"",interfaceType:u,smartStatus:"unknown",temperature:null,BSDName:s}),m+=`printf "\n${s}|"; smartctl -H ${s} | grep overall;`,e+=`${e?'printf ",";':""}smartctl -a -j ${s};`}))}catch(e){o.noop()}e?r(e,(function(e,t){try{JSON.parse(`[${t}]`).forEach((e=>{const t=e.smartctl.argv[e.smartctl.argv.length-1];for(let n=0;n<a.length;n++)a[n].BSDName===t&&(a[n].smartStatus=e.smart_status.passed?"Ok":!1===e.smart_status.passed?"Predicted Failure":"unknown",e.temperature&&e.temperature.current&&(a[n].temperature=e.temperature.current),a[n].smartData=e)})),s(a)}catch(e){m?(m+='printf "\n"',r(m,(function(e,t){t.toString().split("\n").forEach((e=>{if(e){let t=e.split("|");if(2===t.length){let e=t[0];t[1]=t[1].trim();let n=t[1].split(":");if(2===n.length){n[1]=n[1].trim();let t=n[1].toLowerCase();for(let n=0;n<a.length;n++)a[n].BSDName===e&&(a[n].smartStatus="passed"===t?"Ok":"failed!"===t?"Predicted Failure":"unknown")}}}})),s(a)}))):s(a)}})):s(a)}))}if((p||f||d)&&(e&&e(a),n(a)),h&&(e&&e(a),n(a)),u&&r("system_profiler SPSerialATADataType SPNVMeDataType SPUSBDataType",(function(i,s){if(!i){let i=s.toString().split("\n"),c=[],u=[],l=[],p="SATA";i.forEach((e=>{"NVMExpress:"===e?p="NVMe":"USB:"===e?p="USB":"SATA/SATA Express:"===e?p="SATA":"SATA"===p?c.push(e):"NVMe"===p?u.push(e):"USB"===p&&l.push(e)}));try{let e=c.join("\n").split(" Physical Interconnect: ");e.shift(),e.forEach((function(e){let n=(e="InterfaceType: "+e).split("\n");const r=o.getValue(n,"Medium Type",":",!0).trim(),i=o.getValue(n,"capacity",":",!0).trim(),s=o.getValue(n,"BSD Name",":",!0).trim();if(i){let e=0;if(i.indexOf("(")>=0&&(e=parseInt(i.match(/\(([^)]+)\)/)[1].replace(/\./g,"").replace(/,/g,""))),e||(e=parseInt(i)),e){const i=o.getValue(n,"S.M.A.R.T. status",":",!0).trim().toLowerCase();a.push({device:s,type:r.startsWith("Solid")?"SSD":"HD",name:o.getValue(n,"Model",":",!0).trim(),vendor:t(o.getValue(n,"Model",":",!0).trim())||o.getValue(n,"Manufacturer",":",!0),size:e,bytesPerSector:null,totalCylinders:null,totalHeads:null,totalSectors:null,totalTracks:null,tracksPerCylinder:null,sectorsPerTrack:null,firmwareRevision:o.getValue(n,"Revision",":",!0).trim(),serialNum:o.getValue(n,"Serial Number",":",!0).trim(),interfaceType:o.getValue(n,"InterfaceType",":",!0).trim(),smartStatus:"verified"===i?"OK":i||"unknown",temperature:null,BSDName:s}),m=m+'printf "\n'+s+'|"; diskutil info /dev/'+s+" | grep SMART;"}}}))}catch(e){o.noop()}try{let e=u.join("\n").split("\n\n Capacity:");e.shift(),e.forEach((function(e){let n=(e="!Capacity: "+e).split("\n");const r=o.getValue(n,"link width",":",!0).trim(),i=o.getValue(n,"!capacity",":",!0).trim(),s=o.getValue(n,"BSD Name",":",!0).trim();if(i){let e=0;if(i.indexOf("(")>=0&&(e=parseInt(i.match(/\(([^)]+)\)/)[1].replace(/\./g,"").replace(/,/g,""))),e||(e=parseInt(i)),e){const i=o.getValue(n,"S.M.A.R.T. status",":",!0).trim().toLowerCase();a.push({device:s,type:"NVMe",name:o.getValue(n,"Model",":",!0).trim(),vendor:t(o.getValue(n,"Model",":",!0).trim()),size:e,bytesPerSector:null,totalCylinders:null,totalHeads:null,totalSectors:null,totalTracks:null,tracksPerCylinder:null,sectorsPerTrack:null,firmwareRevision:o.getValue(n,"Revision",":",!0).trim(),serialNum:o.getValue(n,"Serial Number",":",!0).trim(),interfaceType:("PCIe "+r).trim(),smartStatus:"verified"===i?"OK":i||"unknown",temperature:null,BSDName:s}),m=m+'printf "\n'+s+'|"; diskutil info /dev/'+s+" | grep SMART;"}}}))}catch(e){o.noop()}try{let e=l.join("\n").replaceAll("Media:\n ","Model:").split("\n\n Product ID:");e.shift(),e.forEach((function(e){let n=e.split("\n");const r=o.getValue(n,"Capacity",":",!0).trim(),i=o.getValue(n,"BSD Name",":",!0).trim();if(r){let e=0;if(r.indexOf("(")>=0&&(e=parseInt(r.match(/\(([^)]+)\)/)[1].replace(/\./g,"").replace(/,/g,""))),e||(e=parseInt(r)),e){const r=o.getValue(n,"S.M.A.R.T. status",":",!0).trim().toLowerCase();a.push({device:i,type:"USB",name:o.getValue(n,"Model",":",!0).trim().replaceAll(":",""),vendor:t(o.getValue(n,"Model",":",!0).trim()),size:e,bytesPerSector:null,totalCylinders:null,totalHeads:null,totalSectors:null,totalTracks:null,tracksPerCylinder:null,sectorsPerTrack:null,firmwareRevision:o.getValue(n,"Revision",":",!0).trim(),serialNum:o.getValue(n,"Serial Number",":",!0).trim(),interfaceType:"USB",smartStatus:"verified"===r?"OK":r||"unknown",temperature:null,BSDName:i}),m=m+'printf "\n'+i+'|"; diskutil info /dev/'+i+" | grep SMART;"}}}))}catch(e){o.noop()}if(m)m+='printf "\n"',r(m,(function(t,r){r.toString().split("\n").forEach((e=>{if(e){let t=e.split("|");if(2===t.length){let e=t[0];t[1]=t[1].trim();let n=t[1].split(":");if(2===n.length){n[1]=n[1].trim();let t=n[1].toLowerCase();for(let n=0;n<a.length;n++)a[n].BSDName===e&&(a[n].smartStatus="not supported"===t?"not supported":"verified"===t?"Ok":"failing"===t?"Predicted Failure":"unknown")}}}}));for(let e=0;e<a.length;e++)delete a[e].BSDName;e&&e(a),n(a)}));else{for(let e=0;e<a.length;e++)delete a[e].BSDName;e&&e(a),n(a)}}})),l)try{o.wmic("diskdrive get /value").then((t=>{t.toString().split(/\n\s*\n/).forEach((function(e){let t=e.split("\r\n");const n=o.getValue(t,"Size","=").trim(),r=o.getValue(t,"Status","=").trim().toLowerCase();n&&a.push({device:o.getValue(t,"PNPDeviceId","="),type:e.indexOf("SSD")>-1?"SSD":"HD",name:o.getValue(t,"Caption","="),vendor:o.getValue(t,"Manufacturer","="),size:parseInt(n),bytesPerSector:parseInt(o.getValue(t,"BytesPerSector","=")),totalCylinders:parseInt(o.getValue(t,"TotalCylinders","=")),totalHeads:parseInt(o.getValue(t,"TotalHeads","=")),totalSectors:parseInt(o.getValue(t,"TotalSectors","=")),totalTracks:parseInt(o.getValue(t,"TotalTracks","=")),tracksPerCylinder:parseInt(o.getValue(t,"TracksPerCylinder","=")),sectorsPerTrack:parseInt(o.getValue(t,"SectorsPerTrack","=")),firmwareRevision:o.getValue(t,"FirmwareRevision","=").trim(),serialNum:o.getValue(t,"SerialNumber","=").trim(),interfaceType:o.getValue(t,"InterfaceType","=").trim(),smartStatus:"ok"===r?"Ok":"degraded"===r?"Degraded":"pred fail"===r?"Predicted Failure":"Unknown",temperature:null})})),o.powerShell("Get-PhysicalDisk | Format-List").then((t=>{t.split(/\n\s*\n/).forEach((function(e){let t=e.split("\r\n");const n=o.getValue(t,"SerialNumber",":").trim(),r=o.getValue(t,"FriendlyName",":").trim().replace("Msft ","Microsoft"),i=o.getValue(t,"Size",":").trim(),s=o.getValue(t,"Model",":").trim(),c=o.getValue(t,"BusType",":").trim();let u=o.getValue(t,"MediaType",":").trim();if("3"!==u&&"HDD"!==u||(u="HD"),"4"===u&&(u="SSD"),"5"===u&&(u="SCM"),"Unspecified"===u&&(s.toLowerCase().indexOf("virtual")>-1||s.toLowerCase().indexOf("vbox")>-1)&&(u="Virtual"),i){let e=o.findObjectByKey(a,"serialNum",n);-1!==e&&""!==n||(e=o.findObjectByKey(a,"name",r)),-1!=e&&(a[e].type=u,a[e].interfaceType=c)}})),e&&e(a),n(a)})).catch((()=>{e&&e(a),n(a)}))}))}catch(t){e&&e(a),n(a)}}))}))}},559:(e,t,n)=>{"use strict";const r=n(2087),i=n(5747),o=n(3129).exec,s=n(3129).execSync,a=n(1453);let c=process.platform,u="";const l="linux"===c,p="darwin"===c,f="win32"===c,d="freebsd"===c,h="openbsd"===c,m="netbsd"===c,g="sunos"===c;let v=0,y=0,_=0,E=0;const b={"-2":"UNINITIALIZED","-1":"OTHER",0:"HD15",1:"SVIDEO",2:"Composite video",3:"Component video",4:"DVI",5:"HDMI",6:"LVDS",8:"D_JPN",9:"SDI",10:"DP",11:"DP embedded",12:"UDI",13:"UDI embedded",14:"SDTVDONGLE",15:"MIRACAST",2147483648:"INTERNAL"};t.graphics=function(e){function t(e){const t=function(){if(u)return u;if(f)try{const e=a.WINDIR+"\\System32\\DriverStore\\FileRepository",t=i.readdirSync(e).filter((t=>i.readdirSync([e,t].join("/")).includes("nvidia-smi.exe"))).reduce(((t,n)=>{const r=i.statSync([e,t,"nvidia-smi.exe"].join("/")),o=i.statSync([e,n,"nvidia-smi.exe"].join("/"));return r.ctimeMs>o.ctimeMs?t:n}));t&&(u=[e,t,"nvidia-smi.exe"].join("/"))}catch(e){a.noop()}else l&&(u="nvidia-smi");return u}();if(e=e||a.execOptsWin,t){const n=t+" "+"--query-gpu=driver_version,pci.sub_device_id,name,pci.bus_id,fan.speed,memory.total,memory.used,memory.free,utilization.gpu,utilization.memory,temperature.gpu,temperature.memory,power.draw,power.limit,clocks.gr,clocks.mem --format=csv,noheader,nounits"+(l?" 2>/dev/null":"");try{return s(n,e).toString()}catch(e){a.noop()}}return""}function n(){function e(e){return[null,void 0].includes(e)?e:parseFloat(e)}const n=t();if(!n)return[];return n.split("\n").filter(Boolean).map((t=>{const n=t.split(", ").map((e=>e.includes("N/A")?void 0:e));if(16===n.length)return{driverVersion:n[0],subDeviceId:n[1],name:n[2],pciBus:n[3],fanSpeed:e(n[4]),memoryTotal:e(n[5]),memoryUsed:e(n[6]),memoryFree:e(n[7]),utilizationGpu:e(n[8]),utilizationMemory:e(n[9]),temperatureGpu:e(n[10]),temperatureMemory:e(n[11]),powerDraw:e(n[12]),powerLimit:e(n[13]),clockCore:e(n[14]),clockMemory:e(n[15])}}))}function c(e,t){return t.driverVersion&&(e.driverVersion=t.driverVersion),t.subDeviceId&&(e.subDeviceId=t.subDeviceId),t.name&&(e.name=t.name),t.pciBus&&(e.pciBus=t.pciBus),t.fanSpeed&&(e.fanSpeed=t.fanSpeed),t.memoryTotal&&(e.memoryTotal=t.memoryTotal,e.vram=t.memoryTotal,e.vramDynamic=!1),t.memoryUsed&&(e.memoryUsed=t.memoryUsed),t.memoryFree&&(e.memoryFree=t.memoryFree),t.utilizationGpu&&(e.utilizationGpu=t.utilizationGpu),t.utilizationMemory&&(e.utilizationMemory=t.utilizationMemory),t.temperatureGpu&&(e.temperatureGpu=t.temperatureGpu),t.temperatureMemory&&(e.temperatureMemory=t.temperatureMemory),t.powerDraw&&(e.powerDraw=t.powerDraw),t.powerLimit&&(e.powerLimit=t.powerLimit),t.clockCore&&(e.clockCore=t.clockCore),t.clockMemory&&(e.clockMemory=t.clockMemory),e}function w(e){let t={vendor:"",model:"",deviceName:"",main:!1,builtin:!1,connection:"",sizeX:null,sizeY:null,pixelDepth:null,resolutionX:null,resolutionY:null,currentResX:null,currentResY:null,positionX:0,positionY:0,currentRefreshRate:null},n=108;if("000000"===e.substr(n,6)&&(n+=36),"000000"===e.substr(n,6)&&(n+=36),"000000"===e.substr(n,6)&&(n+=36),"000000"===e.substr(n,6)&&(n+=36),t.resolutionX=parseInt("0x0"+e.substr(n+8,1)+e.substr(n+4,2)),t.resolutionY=parseInt("0x0"+e.substr(n+14,1)+e.substr(n+10,2)),t.sizeX=parseInt("0x0"+e.substr(n+28,1)+e.substr(n+24,2)),t.sizeY=parseInt("0x0"+e.substr(n+29,1)+e.substr(n+26,2)),n=e.indexOf("000000fc00"),n>=0){let r=e.substr(n+10,26);-1!==r.indexOf("0a")&&(r=r.substr(0,r.indexOf("0a")));try{r.length>2&&(t.model=r.match(/.{1,2}/g).map((function(e){return String.fromCharCode(parseInt(e,16))})).join(""))}catch(e){a.noop()}}else t.model="";return t}return new Promise((t=>{process.nextTick((()=>{let i={controllers:[],displays:[]};if(p){o("system_profiler SPDisplaysDataType",(function(n,r){if(!n){let e=r.toString().split("\n");i=function(e){let t=[],n=-1,r=-1,i=[],o=[],s={vendor:"",model:"",bus:"",vram:null,vramDynamic:!1},a={vendor:"",model:"",deviceName:"",main:!1,builtin:!1,connection:"",sizeX:null,sizeY:null,pixelDepth:null,resolutionX:null,resolutionY:null,currentResX:null,currentResY:null,positionX:0,positionY:0,currentRefreshRate:null};for(let c=0;c<e.length;c++)if(""!==e[c].trim()){let u=e[c].search(/\S|$/);-1===t.indexOf(u)&&t.push(u),n=t.indexOf(u),n<r&&(Object.keys(s).length>0&&(i.push(s),s={vendor:"",model:"",bus:"",vram:null,vramDynamic:!1}),Object.keys(a).length>0&&(o.push(a),a={vendor:"",model:"",deviceName:"",main:!1,builtin:!1,connection:"",sizeX:null,sizeY:null,pixelDepth:null,resolutionX:null,resolutionY:null,currentResX:null,currentResY:null,positionX:0,positionY:0,currentRefreshRate:null})),r=n;let l=e[c].split(":");if(2===n&&(l.length>1&&-1!==l[0].replace(/ +/g,"").toLowerCase().indexOf("chipsetmodel")&&(s.model=l[1].trim()),l.length>1&&-1!==l[0].replace(/ +/g,"").toLowerCase().indexOf("vendor")&&(s.vendor=l[1].split("(")[0].trim()),l.length>1&&-1!==l[0].replace(/ +/g,"").toLowerCase().indexOf("vram(total)")&&(s.vram=parseInt(l[1]),-1!==l[1].toLowerCase().indexOf("gb")&&(s.vram=1024*s.vram),s.vramDynamic=!1),l.length>1&&-1!==l[0].replace(/ +/g,"").toLowerCase().indexOf("vram(dynamic,max)")&&(s.vram=parseInt(l[1]),-1!==l[1].toLowerCase().indexOf("gb")&&(s.vram=1024*s.vram),s.vramDynamic=!0),l.length>1&&-1!==l[0].replace(/ +/g,"").toLowerCase().indexOf("bus")&&(s.bus=l[1].trim(),"built-in"===s.bus.toLowerCase()&&(s.vramDynamic=!0))),3===n&&l.length>1&&""===l[1]&&(a.vendor="",a.model=l[0].trim(),a.main=!1,a.builtin=!1,a.connection="",a.sizeX=null,a.sizeY=null,a.positionX=0,a.positionY=0,a.pixelDepth=null),4===n){if(l.length>1&&-1!==l[0].replace(/ +/g,"").toLowerCase().indexOf("resolution")){let e=l[1].split("x");a.resolutionX=e.length>1?parseInt(e[0]):0,a.resolutionY=e.length>1?parseInt(e[1]):0,a.currentResX=a.resolutionX,a.currentResY=a.resolutionY}l.length>1&&-1!==l[0].replace(/ +/g,"").toLowerCase().indexOf("pixeldepth")&&(a.pixelDepth=parseInt(l[1])),l.length>1&&-1!==l[0].replace(/ +/g,"").toLowerCase().indexOf("framebufferdepth")&&(a.pixelDepth=parseInt(l[1])),l.length>1&&-1!==l[0].replace(/ +/g,"").toLowerCase().indexOf("maindisplay")&&"yes"===l[1].replace(/ +/g,"").toLowerCase()&&(a.main=!0),l.length>1&&-1!==l[0].replace(/ +/g,"").toLowerCase().indexOf("built-in")&&"yes"===l[1].replace(/ +/g,"").toLowerCase()&&(a.vendor="Apple",a.builtin=!0,a.connection=""),l.length>1&&-1!==l[0].replace(/ +/g,"").toLowerCase().indexOf("connectiontype")&&(a.builtin=!1,a.connection=l[1].trim(),"Internal"===a.connection&&(a.vendor="Apple",a.builtin=!0))}}return Object.keys(s).length>0&&i.push(s),Object.keys(a).length>0&&o.push(a),{controllers:i,displays:o}}(e)}e&&e(i),t(i)}))}if(l)if(a.isRaspberry()&&a.isRaspbian()){o("fbset -s | grep 'mode \"'; vcgencmd get_mem gpu; tvservice -s; tvservice -n;",(function(n,r){let o=r.toString().split("\n");if(o.length>3&&o[0].indexOf('mode "')>=-1&&o[2].indexOf("0x12000a")>-1){const e=o[0].replace("mode","").replace(/"/g,"").trim().split("x");2===e.length&&i.displays.push({vendor:"",model:a.getValue(o,"device_name","="),main:!0,builtin:!1,connection:"HDMI",sizeX:null,sizeY:null,pixelDepth:null,resolutionX:parseInt(e[0],10),resolutionY:parseInt(e[1],10),currentResX:null,currentResY:null,positionX:0,positionY:0,currentRefreshRate:null})}o.length>1&&r.toString().indexOf("gpu=")>=-1&&i.controllers.push({vendor:"Broadcom",model:"VideoCore IV",bus:"",vram:a.getValue(o,"gpu","=").replace("M",""),vramDynamic:!0}),e&&e(i),t(i)}))}else{o("lspci -vvv 2>/dev/null",(function(r,u){if(!r){let e=u.toString().split("\n");i.controllers=function(e){let t=[],n={vendor:"",model:"",bus:"",busAddress:"",vram:null,vramDynamic:!1,pciID:""},r=!1,i=[];try{i=s('export LC_ALL=C; dmidecode -t 9 2>/dev/null; unset LC_ALL | grep "Bus Address: "').toString().split("\n");for(let e=0;e<i.length;e++)i[e]=i[e].replace("Bus Address:","").replace("0000:","").trim();i=i.filter((function(e){return null!=e&&e}))}catch(e){a.noop()}for(let o=0;o<e.length;o++)if(""!==e[o].trim()){if(" "!==e[o][0]&&"\t"!==e[o][0]){let s=i.indexOf(e[o].split(" ")[0])>=0,a=e[o].toLowerCase().indexOf(" vga "),c=e[o].toLowerCase().indexOf("3d controller");if(-1!==a||-1!==c){-1!==c&&-1===a&&(a=c),(n.vendor||n.model||n.bus||null!==n.vram||n.vramDynamic)&&(t.push(n),n={vendor:"",model:"",bus:"",busAddress:"",vram:null,vramDynamic:!1});const u=e[o].split(" ")[0];/[\da-fA-F]{2}:[\da-fA-F]{2}\.[\da-fA-F]/.test(u)&&(n.busAddress=u),r=!0;let l=e[o].search(/\[[0-9a-f]{4}:[0-9a-f]{4}]|$/),p=e[o].substr(a,l-a).split(":");n.busAddress=e[o].substr(0,a).trim(),p.length>1&&(p[1]=p[1].trim(),p[1].toLowerCase().indexOf("corporation")>=0?(n.vendor=p[1].substr(0,p[1].toLowerCase().indexOf("corporation")+11).trim(),n.model=p[1].substr(p[1].toLowerCase().indexOf("corporation")+11,200).trim().split("(")[0],n.bus=i.length>0&&s?"PCIe":"Onboard",n.vram=null,n.vramDynamic=!1):p[1].toLowerCase().indexOf(" inc.")>=0?((p[1].match(new RegExp("]","g"))||[]).length>1?(n.vendor=p[1].substr(0,p[1].toLowerCase().indexOf("]")+1).trim(),n.model=p[1].substr(p[1].toLowerCase().indexOf("]")+1,200).trim().split("(")[0].trim()):(n.vendor=p[1].substr(0,p[1].toLowerCase().indexOf(" inc.")+5).trim(),n.model=p[1].substr(p[1].toLowerCase().indexOf(" inc.")+5,200).trim().split("(")[0].trim()),n.bus=i.length>0&&s?"PCIe":"Onboard",n.vram=null,n.vramDynamic=!1):p[1].toLowerCase().indexOf(" ltd.")>=0&&((p[1].match(new RegExp("]","g"))||[]).length>1?(n.vendor=p[1].substr(0,p[1].toLowerCase().indexOf("]")+1).trim(),n.model=p[1].substr(p[1].toLowerCase().indexOf("]")+1,200).trim().split("(")[0].trim()):(n.vendor=p[1].substr(0,p[1].toLowerCase().indexOf(" ltd.")+5).trim(),n.model=p[1].substr(p[1].toLowerCase().indexOf(" ltd.")+5,200).trim().split("(")[0].trim())))}else r=!1}if(r){let t=e[o].split(":");if(t.length>1&&-1!==t[0].replace(/ +/g,"").toLowerCase().indexOf("devicename")&&-1!==t[1].toLowerCase().indexOf("onboard")&&(n.bus="Onboard"),t.length>1&&-1!==t[0].replace(/ +/g,"").toLowerCase().indexOf("region")&&-1!==t[1].toLowerCase().indexOf("memory")){let e=t[1].split("=");e.length>1&&(n.vram=parseInt(e[1]))}}}return(n.vendor||n.model||n.bus||n.busAddress||null!==n.vram||n.vramDynamic)&&t.push(n),t}(e);const t=n();i.controllers=i.controllers.map((e=>c(e,t.find((({pciBus:t})=>t.toLowerCase().endsWith(e.busAddress.toLowerCase())))||{})))}o("clinfo --raw",(function(n,r){if(!n){let e=r.toString().split("\n");i.controllers=function(e,t){const n=/\[([^\]]+)\]\s+(\w+)\s+(.*)/,r=t.reduce(((e,t)=>{const r=n.exec(t.trim());return r&&(e[r[1]]||(e[r[1]]={}),e[r[1]][r[2]]=r[3]),e}),{});for(let t in r){const n=r[t];if("CL_DEVICE_TYPE_GPU"===n.CL_DEVICE_TYPE){let t;if(n.CL_DEVICE_TOPOLOGY_AMD){const e=n.CL_DEVICE_TOPOLOGY_AMD.match(/[a-zA-Z0-9]+:\d+\.\d+/);e&&(t=e[0])}else if(n.CL_DEVICE_PCI_BUS_ID_NV&&n.CL_DEVICE_PCI_SLOT_ID_NV){const e=parseInt(n.CL_DEVICE_PCI_BUS_ID_NV),r=parseInt(n.CL_DEVICE_PCI_SLOT_ID_NV);if(!isNaN(e)&&!isNaN(r)){const n=r>>3&255,i=7&r;t=`${(255&e).toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}.${i}`}}if(t){let r=e.find((e=>e.busAddress===t));r||(r={vendor:"",model:"",bus:"",busAddress:t,vram:null,vramDynamic:!1},e.push(r)),r.vendor=n.CL_DEVICE_VENDOR,n.CL_DEVICE_BOARD_NAME_AMD?r.model=n.CL_DEVICE_BOARD_NAME_AMD:r.model=n.CL_DEVICE_NAME;const i=parseInt(n.CL_DEVICE_GLOBAL_MEM_SIZE);isNaN(i)||(r.vram=Math.round(i/1024/1024))}}}return e}(i.controllers,e)}o("xdpyinfo 2>/dev/null | grep 'depth of root window' | awk '{ print $5 }'",(function(n,r){let s=0;if(!n){let e=r.toString().split("\n");s=parseInt(e[0])||0}o("xrandr --verbose 2>/dev/null",(function(n,r){if(!n){let e=r.toString().split("\n");i.displays=function(e,t){let n=[],r={vendor:"",model:"",deviceName:"",main:!1,builtin:!1,connection:"",sizeX:null,sizeY:null,pixelDepth:null,resolutionX:null,resolutionY:null,currentResX:null,currentResY:null,positionX:0,positionY:0,currentRefreshRate:null},i=!1,o=!1,s="",c=0;for(let u=1;u<e.length;u++)if(""!==e[u].trim()){if(" "!==e[u][0]&&"\t"!==e[u][0]&&-1!==e[u].toLowerCase().indexOf(" connected ")){(r.model||r.main||r.builtin||r.connection||null!==r.sizeX||null!==r.pixelDepth||null!==r.resolutionX)&&(n.push(r),r={vendor:"",model:"",main:!1,builtin:!1,connection:"",sizeX:null,sizeY:null,pixelDepth:null,resolutionX:null,resolutionY:null,currentResX:null,currentResY:null,positionX:0,positionY:0,currentRefreshRate:null});let t=e[u].split(" ");r.connection=t[0],r.main=e[u].toLowerCase().indexOf(" primary ")>=0,r.builtin=t[0].toLowerCase().indexOf("edp")>=0}if(i)if(e[u].search(/\S|$/)>c)s+=e[u].toLowerCase().trim();else{let e=w(s);r.vendor=e.vendor,r.model=e.model,r.resolutionX=e.resolutionX,r.resolutionY=e.resolutionY,r.sizeX=e.sizeX,r.sizeY=e.sizeY,r.pixelDepth=t,i=!1}if(e[u].toLowerCase().indexOf("edid:")>=0&&(i=!0,c=e[u].search(/\S|$/)),e[u].toLowerCase().indexOf("*current")>=0){const t=e[u].split("(");if(t&&t.length>1&&t[0].indexOf("x")>=0){const e=t[0].trim().split("x");r.currentResX=a.toInt(e[0]),r.currentResY=a.toInt(e[1])}o=!0}if(o&&e[u].toLowerCase().indexOf("clock")>=0&&e[u].toLowerCase().indexOf("hz")>=0&&e[u].toLowerCase().indexOf("v: height")>=0){const t=e[u].split("clock");t&&t.length>1&&t[1].toLowerCase().indexOf("hz")>=0&&(r.currentRefreshRate=a.toInt(t[1])),o=!1}}return(r.model||r.main||r.builtin||r.connection||null!==r.sizeX||null!==r.pixelDepth||null!==r.resolutionX)&&n.push(r),n}(e,s)}e&&e(i),t(i)}))}))}))}))}if((d||h||m)&&(e&&e(null),t(null)),g&&(e&&e(null),t(null)),f)try{const o=[];o.push(a.wmic("path win32_VideoController get /value")),o.push(a.wmic("path win32_desktopmonitor get /value")),o.push(a.powerShell("Get-CimInstance -Namespace root\\wmi -ClassName WmiMonitorBasicDisplayParams | fl")),o.push(a.powerShell("Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.Screen]::AllScreens")),o.push(a.powerShell("Get-CimInstance -Namespace root\\wmi -ClassName WmiMonitorConnectionParams | fl")),o.push(a.powerShell('gwmi WmiMonitorID -Namespace root\\wmi | ForEach-Object {(($_.ManufacturerName -notmatch 0 | foreach {[char]$_}) -join "") + "|" + (($_.ProductCodeID -notmatch 0 | foreach {[char]$_}) -join "") + "|" + (($_.UserFriendlyName -notmatch 0 | foreach {[char]$_}) -join "") + "|" + (($_.SerialNumberID -notmatch 0 | foreach {[char]$_}) -join "") + "|" + $_.InstanceName}'));const s=n();Promise.all(o).then((n=>{let o=n[0].split(/\n\s*\n/);i.controllers=function(e){let t=[];for(let n in e)if({}.hasOwnProperty.call(e,n)&&""!==e[n].trim()){let r=e[n].trim().split("\r\n"),i=a.getValue(r,"PNPDeviceID","=").match(/SUBSYS_[a-fA-F\d]{8}/),o=null;i&&(o=i[0],o&&(o=o.split("_")[1])),t.push({vendor:a.getValue(r,"AdapterCompatibility","="),model:a.getValue(r,"name","="),bus:a.getValue(r,"PNPDeviceID","=").startsWith("PCI")?"PCI":"",vram:a.toInt(a.getValue(r,"AdapterRAM","="))/1024/1024,vramDynamic:"2"===a.getValue(r,"VideoMemoryType","="),subDeviceId:o}),v=a.toInt(a.getValue(r,"CurrentHorizontalResolution","="))||v,y=a.toInt(a.getValue(r,"CurrentVerticalResolution","="))||y,E=a.toInt(a.getValue(r,"CurrentRefreshRate","="))||E,_=a.toInt(a.getValue(r,"CurrentBitsPerPixel","="))||_}return t}(o),i.controllers=i.controllers.map((e=>"nvidia"===e.vendor.toLowerCase()?c(e,s.find((t=>{let n=e.subDeviceId.toLowerCase();const r=t.subDeviceId.split("x");let i=r.length>1?r[1].toLowerCase():r[0].toLowerCase();const o=Math.abs(n.length-i.length);if(n.length>i.length)for(let e=0;e<o;e++)i="0"+i;else if(n.length<i.length)for(let e=0;e<o;e++)n="0"+n;return n===i}))||{}):e));let u=n[1].split(/\n\s*\n/);u.shift(),u.pop();let l=n[2].split("Active ");l.shift();let p=n[3].split("BitsPerPixel ");p.shift();let f=n[4].split(/\n\s*\n/);f.shift();const d=n[5].split(/\r\n/);let h=[];d.forEach((e=>{const t=e.split("|");5===t.length&&h.push({vendor:t[0],code:t[1],model:t[2],serial:t[3],instanceId:t[4]})})),i.displays=function(e,t,n,i,o){let s=[],c="",u="",l="",p=0,f=0;if(n&&n.length){let e=n[0].split(r.EOL);c=a.getValue(e,"MonitorManufacturer","="),u=a.getValue(e,"Name","="),l=a.getValue(e,"PNPDeviceID","=").replace(/&amp;/g,"&").toLowerCase(),p=a.toInt(a.getValue(e,"ScreenWidth","=")),f=a.toInt(a.getValue(e,"ScreenHeight","="))}for(let n=0;n<e.length;n++)if(""!==e[n].trim()){e[n]="BitsPerPixel "+e[n],t[n]="Active "+t[n],0!==i.length&&void 0!==i[n]||(i[n]="Unknown");let p=e[n].split(r.EOL),f=t[n].split(r.EOL),d=i[n].split(r.EOL);const h=a.getValue(p,"BitsPerPixel"),m=a.getValue(p,"Bounds").replace("{","").replace("}","").split(","),g=a.getValue(p,"Primary"),v=a.getValue(f,"MaxHorizontalImageSize"),y=a.getValue(f,"MaxVerticalImageSize"),_=a.getValue(f,"InstanceName").toLowerCase(),E=a.getValue(d,"VideoOutputTechnology"),w=a.getValue(p,"DeviceName");let S="",I="";o.forEach((e=>{e.instanceId.toLowerCase().startsWith(_)&&c.startsWith("(")&&u.startsWith("PnP")&&(S=e.vendor,I=e.model)})),s.push({vendor:_.startsWith(l)&&""===S?c:S,model:_.startsWith(l)&&""===I?u:I,deviceName:w,main:"true"===g.toLowerCase(),builtin:"2147483648"===E,connection:E&&b[E]?b[E]:"",resolutionX:a.toInt(a.getValue(m,"Width","=")),resolutionY:a.toInt(a.getValue(m,"Height","=")),sizeX:v?parseInt(v,10):null,sizeY:y?parseInt(y,10):null,pixelDepth:h,currentResX:a.toInt(a.getValue(m,"Width","=")),currentResY:a.toInt(a.getValue(m,"Height","=")),positionX:a.toInt(a.getValue(m,"X","=")),positionY:a.toInt(a.getValue(m,"Y","="))})}0===e.length&&s.push({vendor:c,model:u,main:!0,sizeX:null,sizeY:null,resolutionX:p,resolutionY:f,pixelDepth:null,currentResX:p,currentResY:f,positionX:0,positionY:0});return s}(p,l,u,f,h),1===i.displays.length&&(v&&(i.displays[0].resolutionX=v,i.displays[0].currentResX||(i.displays[0].currentResX=v)),y&&(i.displays[0].resolutionY=y,0===i.displays[0].currentResY&&(i.displays[0].currentResY=y)),_&&(i.displays[0].pixelDepth=_),E&&!i.displays[0].refreshRate&&(i.displays[0].currentRefreshRate=E)),e&&e(i),t(i)})).catch((()=>{e&&e(i),t(i)}))}catch(n){e&&e(i),t(i)}}))}))}},294:(e,t,n)=>{"use strict";const r=n(702).i8,i=n(1453),o=n(1617),s=n(6599),a=n(51),c=n(6144),u=n(5953),l=n(559),p=n(2683),f=n(6926),d=n(2023),h=n(1111),m=n(840),g=n(2795),v=n(8725),y=n(4869),_=n(8958),E=n(3932),b=n(7250),w=n(7381);let S=process.platform;const I="win32"===S,C="freebsd"===S,x="openbsd"===S,O="netbsd"===S,T="sunos"===S;function A(){return r}function N(e){return new Promise((t=>{process.nextTick((()=>{let n={};n.version=A(),Promise.all([o.system(),o.bios(),o.baseboard(),o.chassis(),s.osInfo(),s.uuid(),s.versions(),a.cpu(),a.cpuFlags(),l.graphics(),f.networkInterfaces(),c.memLayout(),p.diskLayout()]).then((r=>{n.system=r[0],n.bios=r[1],n.baseboard=r[2],n.chassis=r[3],n.os=r[4],n.uuid=r[5],n.versions=r[6],n.cpu=r[7],n.cpu.flags=r[8],n.graphics=r[9],n.net=r[10],n.memLayout=r[11],n.diskLayout=r[12],e&&e(n),t(n)}))}))}))}function P(e,t,n){return i.isFunction(t)&&(n=t,t=""),i.isFunction(e)&&(n=e,e=""),new Promise((r=>{process.nextTick((()=>{t=t||f.getDefaultNetworkInterface(),e=e||"";let i=function(){let e=15;return I&&(e=13),(C||x||O)&&(e=11),T&&(e=6),function(){0==--e&&(n&&n(o),r(o))}}(),o={};o.time=s.time(),o.node=process.versions.node,o.v8=process.versions.v8,a.cpuCurrentSpeed().then((e=>{o.cpuCurrentSpeed=e,i()})),m.users().then((e=>{o.users=e,i()})),h.processes().then((e=>{o.processes=e,i()})),a.currentLoad().then((e=>{o.currentLoad=e,i()})),T||a.cpuTemperature().then((e=>{o.temp=e,i()})),x||C||O||T||f.networkStats(t).then((e=>{o.networkStats=e,i()})),T||f.networkConnections().then((e=>{o.networkConnections=e,i()})),c.mem().then((e=>{o.mem=e,i()})),T||u().then((e=>{o.battery=e,i()})),T||h.services(e).then((e=>{o.services=e,i()})),T||p.fsSize().then((e=>{o.fsSize=e,i()})),I||x||C||O||T||p.fsStats().then((e=>{o.fsStats=e,i()})),I||x||C||O||T||p.disksIO().then((e=>{o.disksIO=e,i()})),x||C||O||T||d.wifiNetworks().then((e=>{o.wifiNetworks=e,i()})),g.inetLatency().then((e=>{o.inetLatency=e,i()}))}))}))}function L(e,n){return new Promise((r=>{process.nextTick((()=>{const i=Object.keys(e).filter((e=>({}.hasOwnProperty.call(t,e)))).map((n=>{const r=e[n].substring(e[n].lastIndexOf("(")+1,e[n].lastIndexOf(")"));let i=n.indexOf(")")>=0?n.split(")")[1].trim():n;return i=n.indexOf("|")>=0?n.split("|")[0].trim():i,r?t[i](r):t[i]("")}));Promise.all(i).then((i=>{const o={};let s=0;for(let n in e)if({}.hasOwnProperty.call(e,n)&&{}.hasOwnProperty.call(t,n)&&i.length>s){if("*"===e[n]||"all"===e[n])o[n]=i[s];else{let t=e[n],r="",a=[];if(t.indexOf(")")>=0&&(t=t.split(")")[1].trim()),t.indexOf("|")>=0&&(r=t.split("|")[1].trim(),a=r.split(":"),t=t.split("|")[0].trim()),t=t.replace(/,/g," ").replace(/ +/g," ").split(" "),i[s])if(Array.isArray(i[s])){const e=[];i[s].forEach((n=>{let i={};if(1!==t.length||"*"!==t[0]&&"all"!==t[0]?t.forEach((e=>{({}).hasOwnProperty.call(n,e)&&(i[e]=n[e])})):i=n,r&&2===a.length){if({}.hasOwnProperty.call(i,a[0].trim())){const t=i[a[0].trim()];"number"==typeof t?t===parseFloat(a[1].trim())&&e.push(i):"string"==typeof t&&t.toLowerCase()===a[1].trim().toLowerCase()&&e.push(i)}}else e.push(i)})),o[n]=e}else{const e={};t.forEach((t=>{({}).hasOwnProperty.call(i[s],t)&&(e[t]=i[s][t])})),o[n]=e}else o[n]={}}s++}n&&n(o),r(o)}))}))}))}I&&i.getCodepage(),t.version=A,t.system=o.system,t.bios=o.bios,t.baseboard=o.baseboard,t.chassis=o.chassis,t.time=s.time,t.osInfo=s.osInfo,t.versions=s.versions,t.shell=s.shell,t.uuid=s.uuid,t.cpu=a.cpu,t.cpuFlags=a.cpuFlags,t.cpuCache=a.cpuCache,t.cpuCurrentSpeed=a.cpuCurrentSpeed,t.cpuTemperature=a.cpuTemperature,t.currentLoad=a.currentLoad,t.fullLoad=a.fullLoad,t.mem=c.mem,t.memLayout=c.memLayout,t.battery=u,t.graphics=l.graphics,t.fsSize=p.fsSize,t.fsOpenFiles=p.fsOpenFiles,t.blockDevices=p.blockDevices,t.fsStats=p.fsStats,t.disksIO=p.disksIO,t.diskLayout=p.diskLayout,t.networkInterfaceDefault=f.networkInterfaceDefault,t.networkGatewayDefault=f.networkGatewayDefault,t.networkInterfaces=f.networkInterfaces,t.networkStats=f.networkStats,t.networkConnections=f.networkConnections,t.wifiNetworks=d.wifiNetworks,t.wifiInterfaces=d.wifiInterfaces,t.wifiConnections=d.wifiConnections,t.services=h.services,t.processes=h.processes,t.processLoad=h.processLoad,t.users=m.users,t.inetChecksite=g.inetChecksite,t.inetLatency=g.inetLatency,t.dockerInfo=v.dockerInfo,t.dockerImages=v.dockerImages,t.dockerContainers=v.dockerContainers,t.dockerContainerStats=v.dockerContainerStats,t.dockerContainerProcesses=v.dockerContainerProcesses,t.dockerVolumes=v.dockerVolumes,t.dockerAll=v.dockerAll,t.vboxInfo=y.vboxInfo,t.printer=_.printer,t.usb=E.usb,t.audio=b.audio,t.bluetoothDevices=w.bluetoothDevices,t.getStaticData=N,t.getDynamicData=P,t.getAllData=function(e,t,n){return new Promise((r=>{process.nextTick((()=>{let o={};t&&i.isFunction(t)&&!n&&(n=t,t=""),e&&i.isFunction(e)&&!t&&!n&&(n=e,e="",t=""),N().then((i=>{o=i,P(e,t).then((e=>{for(let t in e)({}).hasOwnProperty.call(e,t)&&(o[t]=e[t]);n&&n(o),r(o)}))}))}))}))},t.get=L,t.observe=function(e,t,n){let r=null;return setInterval((()=>{L(e).then((e=>{JSON.stringify(r)!==JSON.stringify(e)&&(r=Object.assign({},e),n(e))}))}),t)}},2795:(e,t,n)=>{"use strict";const r=n(1453);let i=process.platform;const o="linux"===i,s="darwin"===i,a="win32"===i,c="freebsd"===i,u="openbsd"===i,l="netbsd"===i,p="sunos"===i;t.inetChecksite=function(e,t){return new Promise((i=>{process.nextTick((()=>{let f={url:e,ok:!1,status:404,ms:null};if("string"!=typeof e)return t&&t(f),i(f);let d="";const h=r.sanitizeShellString(e,!0);for(let e=0;e<=r.mathMin(h.length,2e3);e++)if(void 0!==h[e]){h[e].__proto__.toLowerCase=r.stringToLower;const t=h[e].toLowerCase();t&&t[0]&&!t[1]&&1===t[0].length&&(d+=t[0])}f.url=d;try{if(d&&!r.isPrototypePolluted()){if(d.__proto__.startsWith=r.stringStartWith,d.startsWith("file:")||d.startsWith("gopher:")||d.startsWith("telnet:")||d.startsWith("mailto:")||d.startsWith("news:")||d.startsWith("nntp:"))return t&&t(f),i(f);let e=Date.now();if(o||c||u||l||s||p){let n=["-I","--connect-timeout","5","-m","5"];n.push(d);let o="curl";r.execSafe(o,n).then((n=>{const r=n.split("\n");let o=r[0]&&r[0].indexOf(" ")>=0?parseInt(r[0].split(" ")[1],10):404;f.status=o||404,f.ok=200===o||301===o||302===o||304===o,f.ms=f.ok?Date.now()-e:null,t&&t(f),i(f)}))}if(a){const r=d.startsWith("https:")?n(7211):n(8605);try{r.get(d,(n=>{const r=n.statusCode;f.status=r||404,f.ok=200===r||301===r||302===r||304===r,200!==r?(n.resume(),f.ms=f.ok?Date.now()-e:null,t&&t(f),i(f)):(n.on("data",(()=>{})),n.on("end",(()=>{f.ms=f.ok?Date.now()-e:null,t&&t(f),i(f)})))})).on("error",(()=>{t&&t(f),i(f)}))}catch(e){t&&t(f),i(f)}}}else t&&t(f),i(f)}catch(e){t&&t(f),i(f)}}))}))},t.inetLatency=function(e,t){return r.isFunction(e)&&!t&&(t=e,e=""),e=e||"8.8.8.8",new Promise((n=>{process.nextTick((()=>{if("string"!=typeof e)return t&&t(null),n(null);let i="";const f=(r.isPrototypePolluted()?"8.8.8.8":r.sanitizeShellString(e,!0)).trim();for(let e=0;e<=r.mathMin(f.length,2e3);e++)if(void 0!==f[e]){f[e].__proto__.toLowerCase=r.stringToLower;const t=f[e].toLowerCase();t&&t[0]&&!t[1]&&(i+=t[0])}if(i.__proto__.startsWith=r.stringStartWith,i.startsWith("file:")||i.startsWith("gopher:")||i.startsWith("telnet:")||i.startsWith("mailto:")||i.startsWith("news:")||i.startsWith("nntp:"))return t&&t(null),n(null);let d,h;if((o||c||u||l||s)&&(o&&(d=["-c","2","-w","3",i],h="rtt"),(c||u||l)&&(d=["-c","2","-t","3",i],h="round-trip"),s&&(d=["-c2","-t3",i],h="avg"),r.execSafe("ping",d).then((e=>{let r=null;if(e){const t=e.split("\n").filter((e=>e.indexOf(h)>=0)).join("\n").split("=");if(t.length>1){const e=t[1].split("/");e.length>1&&(r=parseFloat(e[1]))}}t&&t(r),n(r)}))),p){const e=["-s","-a",i,"56","2"],o="avg";r.execSafe("ping",e,{timeout:3e3}).then((e=>{let r=null;if(e){const t=e.split("\n").filter((e=>e.indexOf(o)>=0)).join("\n").split("=");if(t.length>1){const e=t[1].split("/");e.length>1&&(r=parseFloat(e[1].replace(",",".")))}}t&&t(r),n(r)}))}if(a){let e=null;try{const o=[i,"-n","1"];r.execSafe("ping",o,r.execOptsWin).then((r=>{if(r){let t=r.split("\r\n");t.shift(),t.forEach((function(t){if(3===(t.toLowerCase().match(/ms/g)||[]).length){let n=t.replace(/ +/g," ").split(" ");n.length>6&&(e=parseFloat(n[n.length-1]))}}))}t&&t(e),n(e)}))}catch(r){t&&t(e),n(e)}}}))}))}},6144:(e,t,n)=>{"use strict";const r=n(2087),i=n(3129).exec,o=n(3129).execSync,s=n(1453),a=n(5747);let c=process.platform;const u="linux"===c,l="darwin"===c,p="win32"===c,f="freebsd"===c,d="openbsd"===c,h="netbsd"===c,m="sunos"===c,g={"0x014F":"Transcend Information","0x2C00":"Micron Technology Inc.","0x802C":"Micron Technology Inc.","0x80AD":"Hynix Semiconductor Inc.","0x80CE":"Samsung Electronics Inc.","0xAD00":"Hynix Semiconductor Inc.","0xCE00":"Samsung Electronics Inc.","0x02FE":"Elpida","0x5105":"Qimonda AG i. In.","0x8551":"Qimonda AG i. In.","0x859B":"Crucial","0x04CD":"G-Skill"},v={"017A":"Apacer","0198":"HyperX","029E":"Corsair","04CB":"A-DATA","04CD":"G-Skill","059B":"Crucial","00CE":"Samsung",1315:"Crutial","014F":"Transcend Information","2C00":"Micron Technology Inc.","802C":"Micron Technology Inc.","80AD":"Hynix Semiconductor Inc.","80CE":"Samsung Electronics Inc.",AD00:"Hynix Semiconductor Inc.",CE00:"Samsung Electronics Inc.","02FE":"Elpida",5105:"Qimonda AG i. In.",8551:"Qimonda AG i. In.","859B":"Crucial"};t.mem=function(e){return new Promise((t=>{process.nextTick((()=>{let n={total:r.totalmem(),free:r.freemem(),used:r.totalmem()-r.freemem(),active:r.totalmem()-r.freemem(),available:r.freemem(),buffers:0,cached:0,slab:0,buffcache:0,swaptotal:0,swapused:0,swapfree:0};if(u&&a.readFile("/proc/meminfo",(function(i,o){if(!i){const e=o.toString().split("\n");n.total=parseInt(s.getValue(e,"memtotal"),10),n.total=n.total?1024*n.total:r.totalmem(),n.free=parseInt(s.getValue(e,"memfree"),10),n.free=n.free?1024*n.free:r.freemem(),n.used=n.total-n.free,n.buffers=parseInt(s.getValue(e,"buffers"),10),n.buffers=n.buffers?1024*n.buffers:0,n.cached=parseInt(s.getValue(e,"cached"),10),n.cached=n.cached?1024*n.cached:0,n.slab=parseInt(s.getValue(e,"slab"),10),n.slab=n.slab?1024*n.slab:0,n.buffcache=n.buffers+n.cached+n.slab;let t=parseInt(s.getValue(e,"memavailable"),10);n.available=t?1024*t:n.free+n.buffcache,n.active=n.total-n.available,n.swaptotal=parseInt(s.getValue(e,"swaptotal"),10),n.swaptotal=n.swaptotal?1024*n.swaptotal:0,n.swapfree=parseInt(s.getValue(e,"swapfree"),10),n.swapfree=n.swapfree?1024*n.swapfree:0,n.swapused=n.swaptotal-n.swapfree}e&&e(n),t(n)})),(f||d||h)&&i('/sbin/sysctl -a 2>/dev/null | grep -E "hw.realmem|hw.physmem|vm.stats.vm.v_page_count|vm.stats.vm.v_wire_count|vm.stats.vm.v_active_count|vm.stats.vm.v_inactive_count|vm.stats.vm.v_cache_count|vm.stats.vm.v_free_count|vm.stats.vm.v_page_size"',(function(r,i){if(!r){let e=i.toString().split("\n");const t=parseInt(s.getValue(e,"vm.stats.vm.v_page_size"),10),r=parseInt(s.getValue(e,"vm.stats.vm.v_inactive_count"),10)*t,o=parseInt(s.getValue(e,"vm.stats.vm.v_cache_count"),10)*t;n.total=parseInt(s.getValue(e,"hw.realmem"),10),isNaN(n.total)&&(n.total=parseInt(s.getValue(e,"hw.physmem"),10)),n.free=parseInt(s.getValue(e,"vm.stats.vm.v_free_count"),10)*t,n.buffcache=r+o,n.available=n.buffcache+n.free,n.active=n.total-n.free-n.buffcache,n.swaptotal=0,n.swapfree=0,n.swapused=0}e&&e(n),t(n)})),m&&(e&&e(n),t(n)),l&&i('vm_stat 2>/dev/null | grep "Pages active"',(function(r,o){if(!r){let e=o.toString().split("\n");n.active=4096*parseInt(e[0].split(":")[1],10),n.buffcache=n.used-n.active,n.available=n.free+n.buffcache}i("sysctl -n vm.swapusage 2>/dev/null",(function(r,i){if(!r){let e=i.toString().split("\n");if(e.length>0){let t=e[0].replace(/,/g,".").replace(/M/g,"");t=t.trim().split(" ");for(let e=0;e<t.length;e++)-1!==t[e].toLowerCase().indexOf("total")&&(n.swaptotal=1024*parseFloat(t[e].split("=")[1].trim())*1024),-1!==t[e].toLowerCase().indexOf("used")&&(n.swapused=1024*parseFloat(t[e].split("=")[1].trim())*1024),-1!==t[e].toLowerCase().indexOf("free")&&(n.swapfree=1024*parseFloat(t[e].split("=")[1].trim())*1024)}}e&&e(n),t(n)}))})),p){let r=0,i=0;try{s.wmic("pagefile get AllocatedBaseSize, CurrentUsage").then(((o,s)=>{if(!s){o.split("\r\n").filter((e=>""!==e.trim())).filter(((e,t)=>t>0)).forEach((function(e){""!==e&&(e=e.trim().split(/\s\s+/),r+=parseInt(e[0],10),i+=parseInt(e[1],10))}))}n.swaptotal=1024*r*1024,n.swapused=1024*i*1024,n.swapfree=n.swaptotal-n.swapused,e&&e(n),t(n)}))}catch(r){e&&e(n),t(n)}}}))}))},t.memLayout=function(e){function t(e){const t=e.replace("0x","").toUpperCase();return 4===t.length&&{}.hasOwnProperty.call(v,t)?v[t]:e}return new Promise((n=>{process.nextTick((()=>{let a=[];if((u||f||d||h)&&i('export LC_ALL=C; dmidecode -t memory 2>/dev/null | grep -iE "Size:|Type|Speed|Manufacturer|Form Factor|Locator|Memory Device|Serial Number|Voltage|Part Number"; unset LC_ALL',(function(i,c){if(!i){let e=c.toString().split("Memory Device");e.shift(),e.forEach((function(e){let n=e.split("\n");const r=s.getValue(n,"Size"),i=r.indexOf("GB")>=0?1024*parseInt(r,10)*1024*1024:1024*parseInt(r,10)*1024;if(parseInt(s.getValue(n,"Size"),10)>0){const e=s.toInt(s.getValue(n,"Total Width")),r=s.toInt(s.getValue(n,"Data Width"));a.push({size:i,bank:s.getValue(n,"Bank Locator"),type:s.getValue(n,"Type:"),ecc:!(!r||!e)&&e>r,clockSpeed:s.getValue(n,"Configured Clock Speed:")?parseInt(s.getValue(n,"Configured Clock Speed:"),10):s.getValue(n,"Speed:")?parseInt(s.getValue(n,"Speed:"),10):null,formFactor:s.getValue(n,"Form Factor:"),manufacturer:t(s.getValue(n,"Manufacturer:")),partNum:s.getValue(n,"Part Number:"),serialNum:s.getValue(n,"Serial Number:"),voltageConfigured:parseFloat(s.getValue(n,"Configured Voltage:")||null),voltageMin:parseFloat(s.getValue(n,"Minimum Voltage:")||null),voltageMax:parseFloat(s.getValue(n,"Maximum Voltage:")||null)})}else a.push({size:0,bank:s.getValue(n,"Bank Locator"),type:"Empty",ecc:null,clockSpeed:0,formFactor:s.getValue(n,"Form Factor:"),partNum:"",serialNum:"",voltageConfigured:null,voltageMin:null,voltageMax:null})}))}if(!a.length){a.push({size:r.totalmem(),bank:"",type:"",ecc:null,clockSpeed:0,formFactor:"",partNum:"",serialNum:"",voltageConfigured:null,voltageMin:null,voltageMax:null});try{let e=o("cat /proc/cpuinfo 2>/dev/null"),t=e.toString().split("\n"),n=s.getValue(t,"hardware",":",!0).toUpperCase(),r=s.getValue(t,"revision",":",!0).toLowerCase();if("BCM2835"===n||"BCM2708"===n||"BCM2709"===n||"BCM2835"===n||"BCM2837"===n){const n={0:400,1:450,2:450,3:3200};a[0].type="LPDDR2",a[0].type=r&&r[2]&&"3"===r[2]?"LPDDR4":a[0].type,a[0].ecc=!1,a[0].clockSpeed=r&&r[2]&&n[r[2]]||400,a[0].clockSpeed=r&&r[4]&&"d"===r[4]?"500":a[0].clockSpeed,a[0].formFactor="SoC",e=o("vcgencmd get_config sdram_freq 2>/dev/null"),t=e.toString().split("\n");let i=parseInt(s.getValue(t,"sdram_freq","=",!0),10)||0;i&&(a.clockSpeed=i),e=o("vcgencmd measure_volts sdram_p 2>/dev/null"),t=e.toString().split("\n");let c=parseFloat(s.getValue(t,"volt","=",!0))||0;c&&(a[0].voltageConfigured=c,a[0].voltageMin=c,a[0].voltageMax=c)}}catch(e){s.noop()}}e&&e(a),n(a)})),l&&i("system_profiler SPMemoryDataType",(function(t,r){if(!t){const e=r.toString().split("\n"),t=s.getValue(e,"ecc",":",!0).toLowerCase();let n=r.toString().split(" BANK "),i=!0;1===n.length&&(n=r.toString().split(" DIMM"),i=!1),n.shift(),n.forEach((function(e){let n=e.split("\n");const r=(i?"BANK ":"DIMM")+n[0].trim().split("/")[0],o=parseInt(s.getValue(n," Size"));var c;o?a.push({size:1024*o*1024*1024,bank:r,type:s.getValue(n," Type:"),ecc:t?"enabled"===t:null,clockSpeed:parseInt(s.getValue(n," Speed:"),10),formFactor:"",manufacturer:(c=s.getValue(n," Manufacturer:"),{}.hasOwnProperty.call(g,c)?g[c]:c),partNum:s.getValue(n," Part Number:"),serialNum:s.getValue(n," Serial Number:"),voltageConfigured:null,voltageMin:null,voltageMax:null}):a.push({size:0,bank:r,type:"Empty",ecc:null,clockSpeed:0,formFactor:"",manufacturer:"",partNum:"",serialNum:"",voltageConfigured:null,voltageMin:null,voltageMax:null})}))}if(!a.length){const e=r.toString().split("\n"),t=parseInt(s.getValue(e," Memory:")),n=s.getValue(e," Type:");t&&n&&a.push({size:1024*t*1024*1024,bank:0,type:n,ecc:!1,clockSpeed:0,formFactor:"",manufacturer:"Apple",partNum:"",serialNum:"",voltageConfigured:null,voltageMin:null,voltageMax:null})}e&&e(a),n(a)})),m&&(e&&e(a),n(a)),p){const t="Unknown|Other|DRAM|Synchronous DRAM|Cache DRAM|EDO|EDRAM|VRAM|SRAM|RAM|ROM|FLASH|EEPROM|FEPROM|EPROM|CDRAM|3DRAM|SDRAM|SGRAM|RDRAM|DDR|DDR2|DDR2 FB-DIMM|Reserved|DDR3|FBD2|DDR4|LPDDR|LPDDR2|LPDDR3|LPDDR4".split("|"),r="Unknown|Other|SIP|DIP|ZIP|SOJ|Proprietary|SIMM|DIMM|TSOP|PGA|RIMM|SODIMM|SRIMM|SMD|SSMP|QFP|TQFP|SOIC|LCC|PLCC|BGA|FPBGA|LGA".split("|");try{s.wmic("memorychip get /value").then(((i,o)=>{if(!o){let e=i.toString().split("BankL");e.shift(),e.forEach((function(e){let n=e.split("\r\n");const i=s.toInt(s.getValue(n,"DataWidth","=")),o=s.toInt(s.getValue(n,"TotalWidth","="));a.push({size:parseInt(s.getValue(n,"Capacity","="),10)||0,bank:s.getValue(n,"abel","="),type:t[parseInt(s.getValue(n,"MemoryType","="),10)],ecc:!(!i||!o)&&o>i,clockSpeed:parseInt(s.getValue(n,"ConfiguredClockSpeed","="),10)||0,formFactor:r[parseInt(s.getValue(n,"FormFactor","="),10)||0],manufacturer:s.getValue(n,"Manufacturer","="),partNum:s.getValue(n,"PartNumber","="),serialNum:s.getValue(n,"SerialNumber","="),voltageConfigured:(parseInt(s.getValue(n,"ConfiguredVoltage","="),10)||0)/1e3,voltageMin:(parseInt(s.getValue(n,"MinVoltage","="),10)||0)/1e3,voltageMax:(parseInt(s.getValue(n,"MaxVoltage","="),10)||0)/1e3})}))}e&&e(a),n(a)}))}catch(t){e&&e(a),n(a)}}}))}))}},6926:(e,t,n)=>{"use strict";const r=n(2087),i=n(3129).exec,o=n(3129).execSync,s=n(5747),a=n(1453);let c=process.platform;const u="linux"===c,l="darwin"===c,p="win32"===c,f="freebsd"===c,d="openbsd"===c,h="netbsd"===c,m="sunos"===c;let g,v={},y="",_={},E=[],b=[],w={};function S(){let e=r.networkInterfaces(),t="",n="",i=9999;for(let r in e)({}).hasOwnProperty.call(e,r)&&e[r].forEach((function(e){e&&!1===e.internal&&(n=n||r,e.scopeid&&e.scopeid<i&&(t=r,i=e.scopeid))}));t=t||n||"";try{if(p){let n="";const i=o("netstat -r",a.execOptsWin);if(i.toString().split(r.EOL).forEach((e=>{if((e=e.replace(/\s+/g," ").trim()).indexOf("0.0.0.0 0.0.0.0")>-1&&!/[a-zA-Z]/.test(e)){const t=e.split(" ");t.length>=5&&(n=t[t.length-2])}})),n)for(let r in e)({}).hasOwnProperty.call(e,r)&&e[r].forEach((function(e){e&&e.address&&e.address===n&&(t=r)}))}if(u){let e=o("ip route 2> /dev/null | grep default").toString().split("\n")[0].split(/\s+/);"none"===e[0]&&e[5]?t=e[5]:e[4]&&(t=e[4]),t.indexOf(":")>-1&&(t=t.split(":")[1].trim())}if(l||f||d||h||m){let e="";u&&(e="ip route 2> /dev/null | grep default | awk '{print $5}'"),l&&(e="route -n get default 2>/dev/null | grep interface: | awk '{print $2}'"),(f||d||h||m)&&(e="route get 0.0.0.0 | grep interface:");let n=o(e);t=n.toString().split("\n")[0],t.indexOf(":")>-1&&(t=t.split(":")[1].trim())}}catch(e){a.noop()}return t&&(y=t),y}function I(){let e="",t="",n={};if(u||f||d||h){if(void 0===g)try{const e=o("which ip").toString().split("\n");g=e.length&&-1===e[0].indexOf(":")&&0===e[0].indexOf("/")?e[0]:""}catch(e){g=""}try{const r=o("export LC_ALL=C; "+(g?g+" link show up":"/sbin/ifconfig")+"; unset LC_ALL").toString().split("\n");for(let i=0;i<r.length;i++)if(r[i]&&" "!==r[i][0]){if(g){let n=r[i+1].trim().split(" ");"link/ether"===n[0]&&(e=r[i].split(" ")[1],e=e.slice(0,e.length-1),t=n[1])}else e=r[i].split(" ")[0],t=r[i].split("HWaddr ")[1];e&&t&&(n[e]=t.trim(),e="",t="")}}catch(e){a.noop()}}if(l)try{const r=o("/sbin/ifconfig").toString().split("\n");for(let i=0;i<r.length;i++)r[i]&&"\t"!==r[i][0]&&r[i].indexOf(":")>0?e=r[i].split(":")[0]:0===r[i].indexOf("\tether ")&&(t=r[i].split("\tether ")[1],e&&t&&(n[e]=t.trim(),e="",t=""))}catch(e){a.noop()}return n}function C(){const e=a.getWmic()+" nic get MACAddress, name, NetConnectionId, NetEnabled, Speed, NetConnectionStatus, AdapterTypeId /value",t=a.getWmic()+" nicconfig get dhcpEnabled /value";try{const n=o(e,a.execOptsWin).split(/\n\s*\n/);return function(e,t){let n=[];for(let r in e)if({}.hasOwnProperty.call(e,r)&&""!==e[r].trim()){let i=e[r].trim().split("\r\n"),o=t[r].trim().split("\r\n"),s=a.getValue(i,"NetEnabled","="),c="9"===a.getValue(i,"AdapterTypeID","=")?"wireless":"wired",u=a.getValue(i,"Name","=").replace(/\]/g,")").replace(/\[/g,"("),l=a.getValue(i,"NetConnectionID","=").replace(/\]/g,")").replace(/\[/g,"(");if((u.toLowerCase().indexOf("wi-fi")>=0||u.toLowerCase().indexOf("wireless")>=0)&&(c="wireless"),""!==s){const e=parseInt(a.getValue(i,"speed","=").trim(),10)/1e6;n.push({mac:a.getValue(i,"MACAddress","=").toLowerCase(),dhcp:a.getValue(o,"dhcpEnabled","=").toLowerCase(),name:u,iface:l,netEnabled:"TRUE"===s,speed:isNaN(e)?null:e,operstate:"2"===a.getValue(i,"NetConnectionStatus","=")?"up":"down",type:c})}}return n}(n,o(t,a.execOptsWin).split(/\n\s*\n/))}catch(e){return[]}}function x(e,t){let n="";const r=t+".";try{const t=e.filter((e=>r.includes(e.name+"."))).map((e=>e.dnsSuffix));return t[0]&&(n=t[0]),n||(n=""),n}catch(e){return"Unknown"}}function O(e,t,n){let r={state:"Unknown",protocol:"Unknown"};if("Disabled"===n)return r.state="Disabled",r.protocol="Not defined",r;if("wired"==e&&n.length>0)try{const e=n.find((e=>e.includes(t+"\r\n"))).split("\r\n"),i=e.find((e=>e.includes("802.1x")));if(i.includes("Disabled"))r.state="Disabled",r.protocol="Not defined";else if(i.includes("Enabled")){const t=e.find((e=>e.includes("EAP")));r.protocol=t.split(":").pop(),r.state="Enabled"}}catch(e){return r}else if("wireless"==e){let e="",n="";try{const i=function(e){try{return o(`netsh wlan show interface name="${e}" | findstr "SSID"`,a.execOptsWin).split("\r\n").shift().split(":").pop()}catch(e){return"Unknown"}}(t);"Unknown"!==i&&(e=o(`netsh wlan show profiles "${i}" | findstr "802.1X"`,a.execOptsWin),n=o(`netsh wlan show profiles "${i}" | findstr "EAP"`,a.execOptsWin)),e.includes(":")&&n.includes(":")&&(r.state=e.split(":").pop(),r.protocol=n.split(":").pop())}catch(e){return 1===e.status&&e.stdout.includes("AutoConfig")&&(r.state="Disabled",r.protocol="Not defined"),r}}return r}function T(e){const t=[];let n=[];return e.forEach((function(e){e.startsWith("\t")||e.startsWith(" ")||n.length&&(t.push(n),n=[]),n.push(e)})),n.length&&t.push(n),t}function A(){try{const e=o("/sbin/ifconfig -v",{maxBuffer:2048e4}).toString().split("\n");return function(e){let t=[];return e.forEach((e=>{let n={iface:"",mtu:null,mac:"",ip6:"",ip4:"",speed:null,type:"",operstate:"",duplex:"",internal:!1};const r=e[0];n.iface=r.split(":")[0].trim();let i=r.split("> mtu");n.mtu=i.length>1?parseInt(i[1],10):null,isNaN(n.mtu)&&(n.mtu=null),n.internal=i[0].toLowerCase().indexOf("loopback")>-1,e.forEach((e=>{e.trim().startsWith("ether ")&&(n.mac=e.split("ether ")[1].toLowerCase().trim()),e.trim().startsWith("inet6 ")&&!n.ip6&&(n.ip6=e.split("inet6 ")[1].toLowerCase().split("%")[0].split(" ")[0]),e.trim().startsWith("inet ")&&!n.ip4&&(n.ip4=e.split("inet ")[1].toLowerCase().split(" ")[0])}));let o=a.getValue(e,"link rate");n.speed=o?parseFloat(o):null,null===n.speed?(o=a.getValue(e,"uplink rate"),n.speed=o?parseFloat(o):null,null!==n.speed&&o.toLowerCase().indexOf("gbps")>=0&&(n.speed=1e3*n.speed)):o.toLowerCase().indexOf("gbps")>=0&&(n.speed=1e3*n.speed),n.type=a.getValue(e,"type").toLowerCase().indexOf("wi-fi")>-1?"wireless":"wired",n.operstate=a.getValue(e,"status").toLowerCase().indexOf("active")>-1?"up":"down",n.duplex=a.getValue(e,"media").toLowerCase().indexOf("half-duplex")>-1?"half":"full",(n.ip6||n.ip4||n.mac)&&t.push(n)})),t}(T(e))}catch(e){return[]}}function N(e){const t=`nmcli device status 2>/dev/null | grep ${e}`;try{const e=o(t).toString().replace(/\s+/g," ").trim(),n=e.split(" ").slice(3).join(" ");return"--"!=n?n:""}catch(e){return""}}function P(e){let t=[];try{let n=`cat ${e} 2> /dev/null | grep 'iface\\|source'`;o(n,{maxBuffer:2048e4}).toString().split("\n").forEach((e=>{const n=e.replace(/\s+/g," ").trim().split(" ");if(n.length>=4&&e.toLowerCase().indexOf(" inet ")>=0&&e.toLowerCase().indexOf("dhcp")>=0&&t.push(n[1]),e.toLowerCase().includes("source")){let n=e.split(" ")[1];t=t.concat(P(n))}}))}catch(e){a.noop()}return t}function L(){let e=[];try{const t=o("ip a 2> /dev/null",{maxBuffer:2048e4}).toString().split("\n");e=function(e){const t=[];e&&e.length&&e.forEach((e=>{if(e&&e.length){if(e[0].split(":").length>2)for(let n of e)if(n.indexOf(" inet ")>=0&&n.indexOf(" dynamic ")>=0){const e=n.split(" "),r=e[e.length-1].trim();t.push(r);break}}}));return t}(T(t))}catch(e){a.noop()}try{e=P("/etc/network/interfaces")}catch(e){a.noop()}return e}function R(e,t,n){let r=!1;if(!t)return n.indexOf(e)>=0;{const i=`nmcli connection show "${t}" 2>/dev/null | grep ipv4.method;`;try{const e=o(i).toString();switch(e.replace(/\s+/g," ").trim().split(" ").slice(1).toString()){case"auto":r=!0;break;default:r=!1}return r}catch(t){return n.indexOf(e)>=0}}}function k(e){let t=!1;const n=`ipconfig getpacket "${e}" 2>/dev/null | grep lease_time;`;try{const e=o(n).toString().split("\n");e.length&&e[0].startsWith("lease_time")&&(t=!0)}catch(e){a.noop()}return t}function D(e){if(!e)return"Unknown";{const t=`nmcli connection show "${e}" 2>/dev/null | grep ipv4.dns-search;`;try{const e=o(t).toString(),n=e.replace(/\s+/g," ").trim().split(" ").slice(1).toString();return"--"==n?"Not defined":n}catch(e){return"Unknown"}}}function M(e){if(!e)return"Not defined";{const t=`nmcli connection show "${e}" 2>/dev/null | grep 802-1x.eap;`;try{const e=o(t).toString(),n=e.replace(/\s+/g," ").trim().split(" ").slice(1).toString();return"--"==n?"":n}catch(e){return"Not defined"}}}function V(e,t,n){return!!n&&(["00:00:00:00:00:00","00:03:FF","00:05:69","00:0C:29","00:0F:4B","00:0F:4B","00:13:07","00:13:BE","00:15:5d","00:16:3E","00:1C:42","00:21:F6","00:21:F6","00:24:0B","00:24:0B","00:50:56","00:A0:B1","00:E0:C8","08:00:27","0A:00:27","18:92:2C","16:DF:49","3C:F3:92","54:52:00","FC:15:97"].filter((e=>n.toUpperCase().toUpperCase().startsWith(e.substr(0,n.length)))).length>0||e.toLowerCase().indexOf(" virtual ")>-1||t.toLowerCase().indexOf(" virtual ")>-1||e.toLowerCase().indexOf("vethernet ")>-1||t.toLowerCase().indexOf("vethernet ")>-1||e.toLowerCase().startsWith("veth")||t.toLowerCase().startsWith("veth")||e.toLowerCase().startsWith("vboxnet")||t.toLowerCase().startsWith("vboxnet"))}function F(e,t=!0){return"boolean"==typeof e&&(t=e,e=null),new Promise((n=>{process.nextTick((()=>{let i=r.networkInterfaces(),s=[],c=[],m=[],g=[];if(l||f||d||h)c=A(),c.forEach((e=>{({}).hasOwnProperty.call(i,e.iface)&&i[e.iface].forEach((function(t){"IPv4"===t.family&&(e.ip4subnet=t.netmask),"IPv6"===t.family&&(e.ip6subnet=t.netmask)})),s.push({iface:e.iface,ifaceName:e.iface,ip4:e.ip4,ip4subnet:e.ip4subnet||"",ip6:e.ip6,ip6subnet:e.ip6subnet||"",mac:e.mac,internal:e.internal,virtual:!e.internal&&V(e.iface,e.iface,e.mac),operstate:e.operstate,type:e.type,duplex:e.duplex,mtu:e.mtu,speed:e.speed,dhcp:k(e.iface),dnsSuffix:"",ieee8021xAuth:"",ieee8021xState:"",carrierChanges:0})})),b=s,e&&e(s),n(s);else if(JSON.stringify(i)!==JSON.stringify(_)||t){_=Object.assign({},i),p&&(c=C(),c.forEach((e=>{let t=!1;Object.keys(i).forEach((n=>{t||i[n].forEach((n=>{Object.keys(n).indexOf("mac")>=0&&(t=n.mac===e.mac)}))})),t||(i[e.name]=[{mac:e.mac}])})),g=function(){try{return o("netsh lan show profiles",a.execOptsWin).split("\r\nProfile on interface")}catch(e){return 1===e.status&&e.stdout.includes("AutoConfig")?"Disabled":[]}}(),m=function(){let e={},t={primaryDNS:"",exitCode:0,ifaces:[]};try{return o("ipconfig /all",a.execOptsWin).split("\r\n\r\n").forEach(((n,r)=>{if(1==r){const e=n.split("\r\n").filter((e=>e.toUpperCase().includes("DNS"))),r=e[0].substring(e[0].lastIndexOf(":")+1);t.primaryDNS=r.trim(),t.primaryDNS||(t.primaryDNS="Not defined")}if(r>1)if(r%2==0){const t=n.substring(n.lastIndexOf(" ")+1).replace(":","");e.name=t}else{const r=n.split("\r\n").filter((e=>e.toUpperCase().includes("DNS"))),i=r[0].substring(r[0].lastIndexOf(":")+1);e.dnsSuffix=i.trim(),t.ifaces.push(e),e={}}})),t}catch(e){return{primaryDNS:"",exitCode:0,ifaces:[]}}}()),u&&(E=L());for(let e in i){let t=e,n="",r="",f="",d="",h="",y="",_="",b=null,S=0,C="down",T=!1,A="",P="",L="",k="";if({}.hasOwnProperty.call(i,e)){let F=e;if(i[e].forEach((function(t){"IPv4"===t.family&&(n=t.address,r=t.netmask),"IPv6"===t.family&&(f&&!f.match(/^fe80::/i)||(f=t.address,d=t.netmask)),h=t.mac;const i=parseInt(process.versions.node.split("."),10);h.indexOf("00:00:0")>-1&&(u||l)&&!t.internal&&i>=8&&i<=11&&(0===Object.keys(w).length&&(w=I()),h=w[e]||"")})),u){let t=e.split(":")[0].trim().toLowerCase();const n=`echo -n "addr_assign_type: "; cat /sys/class/net/${t}/addr_assign_type 2>/dev/null; echo;\n echo -n "address: "; cat /sys/class/net/${t}/address 2>/dev/null; echo;\n echo -n "addr_len: "; cat /sys/class/net/${t}/addr_len 2>/dev/null; echo;\n echo -n "broadcast: "; cat /sys/class/net/${t}/broadcast 2>/dev/null; echo;\n echo -n "carrier: "; cat /sys/class/net/${t}/carrier 2>/dev/null; echo;\n echo -n "carrier_changes: "; cat /sys/class/net/${t}/carrier_changes 2>/dev/null; echo;\n echo -n "dev_id: "; cat /sys/class/net/${t}/dev_id 2>/dev/null; echo;\n echo -n "dev_port: "; cat /sys/class/net/${t}/dev_port 2>/dev/null; echo;\n echo -n "dormant: "; cat /sys/class/net/${t}/dormant 2>/dev/null; echo;\n echo -n "duplex: "; cat /sys/class/net/${t}/duplex 2>/dev/null; echo;\n echo -n "flags: "; cat /sys/class/net/${t}/flags 2>/dev/null; echo;\n echo -n "gro_flush_timeout: "; cat /sys/class/net/${t}/gro_flush_timeout 2>/dev/null; echo;\n echo -n "ifalias: "; cat /sys/class/net/${t}/ifalias 2>/dev/null; echo;\n echo -n "ifindex: "; cat /sys/class/net/${t}/ifindex 2>/dev/null; echo;\n echo -n "iflink: "; cat /sys/class/net/${t}/iflink 2>/dev/null; echo;\n echo -n "link_mode: "; cat /sys/class/net/${t}/link_mode 2>/dev/null; echo;\n echo -n "mtu: "; cat /sys/class/net/${t}/mtu 2>/dev/null; echo;\n echo -n "netdev_group: "; cat /sys/class/net/${t}/netdev_group 2>/dev/null; echo;\n echo -n "operstate: "; cat /sys/class/net/${t}/operstate 2>/dev/null; echo;\n echo -n "proto_down: "; cat /sys/class/net/${t}/proto_down 2>/dev/null; echo;\n echo -n "speed: "; cat /sys/class/net/${t}/speed 2>/dev/null; echo;\n echo -n "tx_queue_len: "; cat /sys/class/net/${t}/tx_queue_len 2>/dev/null; echo;\n echo -n "type: "; cat /sys/class/net/${t}/type 2>/dev/null; echo;\n echo -n "wireless: "; cat /proc/net/wireless 2>/dev/null | grep ${t}; echo;\n echo -n "wirelessspeed: "; iw dev ${t} link 2>&1 | grep bitrate; echo;`;let r=[];try{r=o(n).toString().split("\n");const e=N(t);T=R(t,e,E),A=D(e),P=M(e),L=(v=P)?"Not defined"==v?"Disabled":"Enabled":"Unknown"}catch(e){a.noop()}y=a.getValue(r,"duplex"),y=y.startsWith("cat")?"":y,_=parseInt(a.getValue(r,"mtu"),10);let i=parseInt(a.getValue(r,"speed"),10);b=isNaN(i)?null:i;let s=a.getValue(r,"wirelessspeed").split("tx bitrate: ");null===b&&2===s.length&&(i=parseFloat(s[1]),b=isNaN(i)?null:i),S=parseInt(a.getValue(r,"carrier_changes"),10),C=a.getValue(r,"operstate"),k="up"===C?a.getValue(r,"wireless").trim()?"wireless":"wired":"unknown",("lo"===t||t.startsWith("bond"))&&(k="virtual")}if(p){A=x(m.ifaces,e);let n=!1;c.forEach((e=>{e.mac!==h||n||(t=e.iface||t,F=e.name,T=e.dhcp,C=e.operstate,b=e.speed,k=e.type,n=!0)})),(e.toLowerCase().indexOf("wlan")>=0||F.toLowerCase().indexOf("wlan")>=0||F.toLowerCase().indexOf("802.11n")>=0||F.toLowerCase().indexOf("wireless")>=0||F.toLowerCase().indexOf("wi-fi")>=0||F.toLowerCase().indexOf("wifi")>=0)&&(k="wireless");const r=O(k,e,g);P=r.protocol,L=r.state}let j=!(!i[e]||!i[e][0])&&i[e][0].internal;(e.toLowerCase().indexOf("loopback")>-1||F.toLowerCase().indexOf("loopback")>-1)&&(j=!0);const B=!j&&V(e,F,h);s.push({iface:t,ifaceName:F,ip4:n,ip4subnet:r,ip6:f,ip6subnet:d,mac:h,internal:j,virtual:B,operstate:C,type:k,duplex:y,mtu:_,speed:b,dhcp:T,dnsSuffix:A,ieee8021xAuth:P,ieee8021xState:L,carrierChanges:S})}}b=s,e&&e(s),n(s)}else s=b,e&&e(s),n(s);var v}))}))}function j(e,t,n,r,i,o,s,a){let c={iface:e,operstate:r,rx_bytes:t,rx_dropped:i,rx_errors:o,tx_bytes:n,tx_dropped:s,tx_errors:a,rx_sec:null,tx_sec:null,ms:0};return v[e]&&v[e].ms?(c.ms=Date.now()-v[e].ms,c.rx_sec=t-v[e].rx_bytes>=0?(t-v[e].rx_bytes)/(c.ms/1e3):0,c.tx_sec=n-v[e].tx_bytes>=0?(n-v[e].tx_bytes)/(c.ms/1e3):0,v[e].rx_bytes=t,v[e].tx_bytes=n,v[e].rx_sec=c.rx_sec,v[e].tx_sec=c.tx_sec,v[e].ms=Date.now(),v[e].last_ms=c.ms,v[e].operstate=r):(v[e]||(v[e]={}),v[e].rx_bytes=t,v[e].tx_bytes=n,v[e].rx_sec=null,v[e].tx_sec=null,v[e].ms=Date.now(),v[e].last_ms=0,v[e].operstate=r),c}function B(e){return new Promise((t=>{process.nextTick((()=>{let n="";const r=a.isPrototypePolluted()?"---":a.sanitizeShellString(e);for(let e=0;e<=a.mathMin(r.length,2e3);e++)void 0!==r[e]&&(n+=r[e]);let o,c,m,g={iface:n,operstate:"unknown",rx_bytes:0,rx_dropped:0,rx_errors:0,tx_bytes:0,tx_dropped:0,tx_errors:0,rx_sec:null,tx_sec:null,ms:0},y="unknown",_=0,E=0,b=0,w=0,S=0,I=0;if(!v[n]||v[n]&&!v[n].ms||v[n]&&v[n].ms&&Date.now()-v[n].ms>=500){if(u&&(s.existsSync("/sys/class/net/"+n)?(o="cat /sys/class/net/"+n+"/operstate; cat /sys/class/net/"+n+"/statistics/rx_bytes; cat /sys/class/net/"+n+"/statistics/tx_bytes; cat /sys/class/net/"+n+"/statistics/rx_dropped; cat /sys/class/net/"+n+"/statistics/rx_errors; cat /sys/class/net/"+n+"/statistics/tx_dropped; cat /sys/class/net/"+n+"/statistics/tx_errors; ",i(o,(function(e,r){e||(c=r.toString().split("\n"),y=c[0].trim(),_=parseInt(c[1],10),E=parseInt(c[2],10),b=parseInt(c[3],10),w=parseInt(c[4],10),S=parseInt(c[5],10),I=parseInt(c[6],10),g=j(n,_,E,y,b,w,S,I)),t(g)}))):t(g)),(f||d||h)&&(o="netstat -ibndI "+n,i(o,(function(e,r){if(!e){c=r.toString().split("\n");for(let e=1;e<c.length;e++){const t=c[e].replace(/ +/g," ").split(" ");t&&t[0]&&t[7]&&t[10]&&(_+=parseInt(t[7]),"-"!==t[6].trim()&&(b+=parseInt(t[6])),"-"!==t[5].trim()&&(w+=parseInt(t[5])),E+=parseInt(t[10]),"-"!==t[12].trim()&&(S+=parseInt(t[12])),"-"!==t[9].trim()&&(I+=parseInt(t[9])),y="up")}g=j(n,_,E,y,b,w,S,I)}t(g)}))),l&&(o="ifconfig "+n+' | grep "status"',i(o,(function(e,r){g.operstate=(r.toString().split(":")[1]||"").trim(),g.operstate=(g.operstate||"").toLowerCase(),g.operstate="active"===g.operstate?"up":"inactive"===g.operstate?"down":"unknown",o="netstat -bdI "+n,i(o,(function(e,r){if(!e&&(c=r.toString().split("\n"),c.length>1&&""!==c[1].trim())){m=c[1].replace(/ +/g," ").split(" ");const e=m.length>11?1:0;_=parseInt(m[e+5]),b=parseInt(m[e+10]),w=parseInt(m[e+4]),E=parseInt(m[e+8]),S=parseInt(m[e+10]),I=parseInt(m[e+7]),g=j(n,_,E,g.operstate,b,w,S,I)}t(g)}))}))),p){let e=[],r=n;a.wmic("path Win32_PerfRawData_Tcpip_NetworkInterface Get name,BytesReceivedPersec,BytesSentPersec,BytesTotalPersec,PacketsOutboundDiscarded,PacketsOutboundErrors,PacketsReceivedDiscarded,PacketsReceivedErrors /value").then(((i,o)=>{if(!o){const t=i.toString().split(/\n\s*\n/);e=function(e){let t=[];for(let n in e)if({}.hasOwnProperty.call(e,n)&&""!==e[n].trim()){let r=e[n].trim().split("\r\n");t.push({name:a.getValue(r,"Name","=").replace(/[()[\] ]+/g,"").replace("#","_").toLowerCase(),rx_bytes:parseInt(a.getValue(r,"BytesReceivedPersec","="),10),rx_errors:parseInt(a.getValue(r,"PacketsReceivedErrors","="),10),rx_dropped:parseInt(a.getValue(r,"PacketsReceivedDiscarded","="),10),tx_bytes:parseInt(a.getValue(r,"BytesSentPersec","="),10),tx_errors:parseInt(a.getValue(r,"PacketsOutboundErrors","="),10),tx_dropped:parseInt(a.getValue(r,"PacketsOutboundDiscarded","="),10)})}return t}(t)}F(!1).then((i=>{_=0,E=0,e.forEach((e=>{i.forEach((t=>{t.iface.toLowerCase()!==n.toLowerCase()&&t.mac.toLowerCase()!==n.toLowerCase()&&t.ip4.toLowerCase()!==n.toLowerCase()&&t.ip6.toLowerCase()!==n.toLowerCase()&&t.ifaceName.replace(/[()[\] ]+/g,"").replace("#","_").toLowerCase()!==n.replace(/[()[\] ]+/g,"").replace("#","_").toLowerCase()||t.ifaceName.replace(/[()[\] ]+/g,"").replace("#","_").toLowerCase()!==e.name||(r=t.iface,_=e.rx_bytes,b=e.rx_dropped,w=e.rx_errors,E=e.tx_bytes,S=e.tx_dropped,I=e.tx_errors,y=t.operstate)}))})),_&&E&&(g=j(r,parseInt(_),parseInt(E),y,b,w,S,I)),t(g)}))}))}}else g.rx_bytes=v[n].rx_bytes,g.tx_bytes=v[n].tx_bytes,g.rx_sec=v[n].rx_sec,g.tx_sec=v[n].tx_sec,g.ms=v[n].last_ms,g.operstate=v[n].operstate,t(g)}))}))}t.getDefaultNetworkInterface=S,t.networkInterfaceDefault=function(e){return new Promise((t=>{process.nextTick((()=>{let n=S();e&&e(n),t(n)}))}))},t.networkInterfaces=F,t.networkStats=function e(t,n){let r=[];return new Promise((i=>{process.nextTick((()=>{if(a.isFunction(t)&&!n)n=t,r=[S()];else{if("string"!=typeof t&&void 0!==t)return n&&n([]),i([]);(t=t||S()).__proto__.toLowerCase=a.stringToLower,t.__proto__.replace=a.stringReplace,t.__proto__.trim=a.stringTrim,t=t.trim().toLowerCase().replace(/,+/g,"|"),r=t.split("|")}const o=[],s=[];if(r.length&&"*"===r[0].trim())r=[],F(!1).then((t=>{for(let e of t)r.push(e.iface);e(r.join(",")).then((e=>{n&&n(e),i(e)}))}));else{for(let e of r)s.push(B(e.trim()));s.length?Promise.all(s).then((e=>{n&&n(e),i(e)})):(n&&n(o),i(o))}}))}))},t.networkConnections=function(e){return new Promise((t=>{process.nextTick((()=>{let n=[];if(u||f||d||h){let r='export LC_ALL=C; netstat -tunap | grep "ESTABLISHED\\|SYN_SENT\\|SYN_RECV\\|FIN_WAIT1\\|FIN_WAIT2\\|TIME_WAIT\\|CLOSE\\|CLOSE_WAIT\\|LAST_ACK\\|LISTEN\\|CLOSING\\|UNKNOWN"; unset LC_ALL';(f||d||h)&&(r='export LC_ALL=C; netstat -na | grep "ESTABLISHED\\|SYN_SENT\\|SYN_RECV\\|FIN_WAIT1\\|FIN_WAIT2\\|TIME_WAIT\\|CLOSE\\|CLOSE_WAIT\\|LAST_ACK\\|LISTEN\\|CLOSING\\|UNKNOWN"; unset LC_ALL'),i(r,{maxBuffer:2048e4},(function(o,s){let a=s.toString().split("\n");!o&&(a.length>1||""!=a[0])?(a.forEach((function(e){if((e=e.replace(/ +/g," ").split(" ")).length>=7){let t=e[3],r="",i=e[3].split(":");i.length>1&&(r=i[i.length-1],i.pop(),t=i.join(":"));let o=e[4],s="",a=e[4].split(":");a.length>1&&(s=a[a.length-1],a.pop(),o=a.join(":"));let c=e[5],u=e[6].split("/");c&&n.push({protocol:e[0],localAddress:t,localPort:r,peerAddress:o,peerPort:s,state:c,pid:u[0]&&"-"!==u[0]?parseInt(u[0],10):null,process:u[1]?u[1].split(" ")[0]:""})}})),e&&e(n),t(n)):(r='ss -tunap | grep "ESTAB\\|SYN-SENT\\|SYN-RECV\\|FIN-WAIT1\\|FIN-WAIT2\\|TIME-WAIT\\|CLOSE\\|CLOSE-WAIT\\|LAST-ACK\\|LISTEN\\|CLOSING"',i(r,{maxBuffer:2048e4},(function(r,i){if(!r){i.toString().split("\n").forEach((function(e){if((e=e.replace(/ +/g," ").split(" ")).length>=6){let t=e[4],r="",i=e[4].split(":");i.length>1&&(r=i[i.length-1],i.pop(),t=i.join(":"));let o=e[5],s="",a=e[5].split(":");a.length>1&&(s=a[a.length-1],a.pop(),o=a.join(":"));let c=e[1];"ESTAB"===c&&(c="ESTABLISHED"),"TIME-WAIT"===c&&(c="TIME_WAIT");let u=null,l="";if(e.length>=7&&e[6].indexOf("users:")>-1){let t=e[6].replace('users:(("',"").replace(/"/g,"").split(",");t.length>2&&(l=t[0].split(" ")[0],u=parseInt(t[1],10))}c&&n.push({protocol:e[0],localAddress:t,localPort:r,peerAddress:o,peerPort:s,state:c,pid:u,process:l})}}))}e&&e(n),t(n)})))}))}if(l){i('netstat -natv | grep "ESTABLISHED\\|SYN_SENT\\|SYN_RECV\\|FIN_WAIT1\\|FIN_WAIT2\\|TIME_WAIT\\|CLOSE\\|CLOSE_WAIT\\|LAST_ACK\\|LISTEN\\|CLOSING\\|UNKNOWN"',{maxBuffer:2048e4},(function(r,i){if(!r){i.toString().split("\n").forEach((function(e){if((e=e.replace(/ +/g," ").split(" ")).length>=8){let t=e[3],r="",i=e[3].split(".");i.length>1&&(r=i[i.length-1],i.pop(),t=i.join("."));let o=e[4],s="",a=e[4].split(".");a.length>1&&(s=a[a.length-1],a.pop(),o=a.join("."));let c=e[5],u=parseInt(e[8],10);c&&n.push({protocol:e[0],localAddress:t,localPort:r,peerAddress:o,peerPort:s,state:c,pid:u,process:""})}})),e&&e(n),t(n)}}))}if(p){let r="netstat -nao";try{i(r,a.execOptsWin,(function(r,i){if(!r){i.toString().split("\r\n").forEach((function(e){if((e=e.trim().replace(/ +/g," ").split(" ")).length>=4){let t=e[1],r="",i=e[1].split(":");i.length>1&&(r=i[i.length-1],i.pop(),t=i.join(":"));let o=e[2],s="",a=e[2].split(":");a.length>1&&(s=a[a.length-1],a.pop(),o=a.join(":"));let c=e[4],u=e[3];"HERGESTELLT"===u&&(u="ESTABLISHED"),u.startsWith("ABH")&&(u="LISTEN"),"SCHLIESSEN_WARTEN"===u&&(u="CLOSE_WAIT"),"WARTEND"===u&&(u="TIME_WAIT"),"SYN_GESENDET"===u&&(u="SYN_SENT"),"LISTENING"===u&&(u="LISTEN"),"SYN_RECEIVED"===u&&(u="SYN_RECV"),"FIN_WAIT_1"===u&&(u="FIN_WAIT1"),"FIN_WAIT_2"===u&&(u="FIN_WAIT2"),u&&n.push({protocol:e[0].toLowerCase(),localAddress:t,localPort:r,peerAddress:o,peerPort:s,state:u,pid:c,process:""})}})),e&&e(n),t(n)}}))}catch(r){e&&e(n),t(n)}}}))}))},t.networkGatewayDefault=function(e){return new Promise((t=>{process.nextTick((()=>{let n="";if(u||f||d||h){let r="ip route get 1";try{i(r,{maxBuffer:2048e4},(function(r,i){if(r)e&&e(n),t(n);else{let r=i.toString().split("\n");let o=(r&&r[0]?r[0]:"").split(" via ");o&&o[1]&&(o=o[1].split(" "),n=o[0]),e&&e(n),t(n)}}))}catch(r){e&&e(n),t(n)}}if(l){let r="route -n get default";try{i(r,{maxBuffer:2048e4},(function(r,i){if(r)e&&e(n),t(n);else{let r=i.toString().split("\n").map((e=>e.trim()));n=a.getValue(r,"gateway"),e&&e(n),t(n)}}))}catch(r){e&&e(n),t(n)}}if(p)try{i("netstat -r",a.execOptsWin,(function(i,o){o.toString().split(r.EOL).forEach((e=>{if((e=e.replace(/\s+/g," ").trim()).indexOf("0.0.0.0 0.0.0.0")>-1&&!/[a-zA-Z]/.test(e)){const t=e.split(" ");t.length>=5&&t[t.length-3].indexOf(".")>-1&&(n=t[t.length-3])}})),n?(e&&e(n),t(n)):a.powerShell("Get-CimInstance -ClassName Win32_IP4RouteTable | Where-Object { $_.Destination -eq '0.0.0.0' -and $_.Mask -eq '0.0.0.0' }").then((r=>{let i=r.toString().split("\r\n");i.length>1&&!n&&(n=a.getValue(i,"NextHop"),e&&e(n),t(n))}))}))}catch(r){e&&e(n),t(n)}}))}))}},6599:(e,t,n)=>{"use strict";const r=n(2087),i=n(5747),o=n(1453),s=n(3129).exec,a=n(3129).execSync,c=o.promisify(n(3129).exec);let u=process.platform;const l="linux"===u,p="darwin"===u,f="win32"===u,d="freebsd"===u,h="openbsd"===u,m="netbsd"===u,g="sunos"===u;function v(e){e=(e=e||"").toLowerCase();let t=u;return f?t="windows":-1!==e.indexOf("mac os")?t="apple":-1!==e.indexOf("arch")?t="arch":-1!==e.indexOf("centos")?t="centos":-1!==e.indexOf("coreos")?t="coreos":-1!==e.indexOf("debian")?t="debian":-1!==e.indexOf("deepin")?t="deepin":-1!==e.indexOf("elementary")?t="elementary":-1!==e.indexOf("fedora")?t="fedora":-1!==e.indexOf("gentoo")?t="gentoo":-1!==e.indexOf("mageia")?t="mageia":-1!==e.indexOf("mandriva")?t="mandriva":-1!==e.indexOf("manjaro")?t="manjaro":-1!==e.indexOf("mint")?t="mint":-1!==e.indexOf("mx")?t="mx":-1!==e.indexOf("openbsd")?t="openbsd":-1!==e.indexOf("freebsd")?t="freebsd":-1!==e.indexOf("opensuse")?t="opensuse":-1!==e.indexOf("pclinuxos")?t="pclinuxos":-1!==e.indexOf("puppy")?t="puppy":-1!==e.indexOf("raspbian")?t="raspbian":-1!==e.indexOf("reactos")?t="reactos":-1!==e.indexOf("redhat")?t="redhat":-1!==e.indexOf("slackware")?t="slackware":-1!==e.indexOf("sugar")?t="sugar":-1!==e.indexOf("steam")?t="steam":-1!==e.indexOf("suse")?t="suse":-1!==e.indexOf("mate")?t="ubuntu-mate":-1!==e.indexOf("lubuntu")?t="lubuntu":-1!==e.indexOf("xubuntu")?t="xubuntu":-1!==e.indexOf("ubuntu")?t="ubuntu":-1!==e.indexOf("solaris")?t="solaris":-1!==e.indexOf("tails")?t="tails":-1!==e.indexOf("feren")?t="ferenos":-1!==e.indexOf("robolinux")?t="robolinux":l&&e&&(t=e.toLowerCase().trim().replace(/\s+/g,"-")),t}function y(){let e=r.hostname;if(l||p||d||h||m)try{e=a("hostname -f").toString().split(r.EOL)[0]}catch(e){o.noop()}if(f)try{e=a("echo %COMPUTERNAME%.%USERDNSDOMAIN%",o.execOptsWin).toString().replace(".%USERDNSDOMAIN%","").split(r.EOL)[0]}catch(e){o.noop()}return e}function _(){const e=r.networkInterfaces();let t=[];for(let n in e)({}).hasOwnProperty.call(e,n)&&e[n].forEach((function(e){if(e&&e.mac&&"00:00:00:00:00:00"!==e.mac){const n=e.mac.toLowerCase();-1===t.indexOf(n)&&t.push(n)}}));return t=t.sort((function(e,t){return e<t?-1:e>t?1:0})),t}function E(e){return new Promise((t=>{process.nextTick((()=>{let n,r={os:"",hardware:"",macs:_()};if(p&&s("system_profiler SPHardwareDataType -json",(function(n,i){if(!n)try{const e=JSON.parse(i.toString());if(e.SPHardwareDataType&&e.SPHardwareDataType.length>0){const t=e.SPHardwareDataType[0];r.os=t.platform_UUID.toLowerCase(),r.hardware=t.serial_number}}catch(e){o.noop()}e&&e(r),t(r)})),l){s('echo -n "os: "; cat /var/lib/dbus/machine-id 2> /dev/null; echo;\necho -n "os: "; cat /etc/machine-id 2> /dev/null; echo;\necho -n "hardware: "; cat /sys/class/dmi/id/product_uuid 2> /dev/null; echo;',(function(n,s){const a=s.toString().split("\n");if(r.os=o.getValue(a,"os").toLowerCase(),r.hardware=o.getValue(a,"hardware").toLowerCase(),!r.hardware){const e=i.readFileSync("/proc/cpuinfo",{encoding:"utf8"}).toString().split("\n"),t=o.getValue(e,"serial");r.hardware=t||""}e&&e(r),t(r)}))}if(d||h||m){s('echo -n "os: "; sysctl -n kern.hostid; echo;\necho -n "hardware: "; sysctl -n kern.hostuuid; echo;',(function(n,i){const s=i.toString().split("\n");r.os=o.getValue(s,"os").toLowerCase(),r.hardware=o.getValue(s,"hardware").toLowerCase(),r.os.indexOf("unknown")>=0&&(r.os=""),r.hardware.indexOf("unknown")>=0&&(r.hardware=""),e&&e(r),t(r)}))}f&&s('%windir%\\System32\\reg query "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography" /v MachineGuid',o.execOptsWin,(function(i,s){n=s.toString().split("\n\r")[0].split("REG_SZ"),r.os=n.length>1?n[1].replace(/\r+|\n+|\s+/gi,"").toLowerCase():"",o.wmic("csproduct get /value").then((n=>{let i=n.split("\r\n");r.hardware=o.getValue(i,"uuid","=").toLowerCase(),e&&e(r),t(r)}))}))}))}))}t.time=function(){let e=(new Date).toString().split(" ");return{current:Date.now(),uptime:r.uptime(),timezone:e.length>=7?e[5]:"",timezoneName:e.length>=7?e.slice(6).join(" ").replace(/\(/g,"").replace(/\)/g,""):""}},t.osInfo=function(e){return new Promise((t=>{process.nextTick((()=>{let n={platform:"Windows_NT"===u?"Windows":u,distro:"unknown",release:"unknown",codename:"",kernel:r.release(),arch:r.arch(),hostname:r.hostname(),fqdn:y(),codepage:"",logofile:"",serial:"",build:"",servicepack:"",uefi:!1};if(l&&s("cat /etc/*-release; cat /usr/lib/os-release; cat /etc/openwrt_release",(function(r,a){let c={};a.toString().split("\n").forEach((function(e){-1!==e.indexOf("=")&&(c[e.split("=")[0].trim().toUpperCase()]=e.split("=")[1].trim())}));let u=(c.VERSION||"").replace(/"/g,""),l=(c.DISTRIB_CODENAME||c.VERSION_CODENAME||"").replace(/"/g,"");u.indexOf("(")>=0&&(l=u.split("(")[1].replace(/[()]/g,"").trim(),u=u.split("(")[0].trim()),n.distro=(c.DISTRIB_ID||c.NAME||"unknown").replace(/"/g,""),n.logofile=v(n.distro),n.release=(u||c.DISTRIB_RELEASE||c.VERSION_ID||"unknown").replace(/"/g,""),n.codename=l,n.codepage=o.getCodepage(),n.build=(c.BUILD_ID||"").replace(/"/g,"").trim(),new Promise((e=>{process.nextTick((()=>{i.stat("/sys/firmware/efi",(function(t){t?s('dmesg | grep -E "EFI v"',(function(t,n){if(!t){const t=n.toString().split("\n");e(t.length>0)}e(!1)})):e(!0)}))}))})).then((r=>{n.uefi=r,E().then((r=>{n.serial=r.os,e&&e(n),t(n)}))}))})),(d||h||m)&&s("sysctl kern.ostype kern.osrelease kern.osrevision kern.hostuuid machdep.bootmethod",(function(r,i){if(!r){let e=i.toString().split("\n");n.distro=o.getValue(e,"kern.ostype"),n.logofile=v(n.distro),n.release=o.getValue(e,"kern.osrelease").split("-")[0],n.serial=o.getValue(e,"kern.uuid"),n.codename="",n.codepage=o.getCodepage(),n.uefi=o.getValue(e,"machdep.bootmethod").toLowerCase().indexOf("uefi")>=0}e&&e(n),t(n)})),p&&s("sw_vers; sysctl kern.ostype kern.osrelease kern.osrevision kern.uuid",(function(r,i){let s=i.toString().split("\n");n.serial=o.getValue(s,"kern.uuid"),n.distro=o.getValue(s,"ProductName"),n.release=o.getValue(s,"ProductVersion"),n.build=o.getValue(s,"BuildVersion"),n.logofile=v(n.distro),n.codename="macOS",n.codename=n.release.indexOf("10.4")>-1?"Mac OS X Tiger":n.codename,n.codename=n.release.indexOf("10.4")>-1?"Mac OS X Tiger":n.codename,n.codename=n.release.indexOf("10.4")>-1?"Mac OS X Tiger":n.codename,n.codename=n.release.indexOf("10.5")>-1?"Mac OS X Leopard":n.codename,n.codename=n.release.indexOf("10.6")>-1?"Mac OS X Snow Leopard":n.codename,n.codename=n.release.indexOf("10.7")>-1?"Mac OS X Lion":n.codename,n.codename=n.release.indexOf("10.8")>-1?"OS X Mountain Lion":n.codename,n.codename=n.release.indexOf("10.9")>-1?"OS X Mavericks":n.codename,n.codename=n.release.indexOf("10.10")>-1?"OS X Yosemite":n.codename,n.codename=n.release.indexOf("10.11")>-1?"OS X El Capitan":n.codename,n.codename=n.release.indexOf("10.12")>-1?"macOS Sierra":n.codename,n.codename=n.release.indexOf("10.13")>-1?"macOS High Sierra":n.codename,n.codename=n.release.indexOf("10.14")>-1?"macOS Mojave":n.codename,n.codename=n.release.indexOf("10.15")>-1?"macOS Catalina":n.codename,n.codename=n.release.startsWith("11.")?"macOS Big Sur":n.codename,n.uefi=!0,n.codepage=o.getCodepage(),e&&e(n),t(n)})),g&&(n.release=n.kernel,s("uname -o",(function(r,i){let o=i.toString().split("\n");n.distro=o[0],n.logofile=v(n.distro),e&&e(n),t(n)}))),f){n.logofile=v(),n.release=n.kernel;try{const r=[];r.push(o.wmic("os get /value")),r.push(c("systeminfo",o.execOptsWin)),r.push(o.powerShell("Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.SystemInformation]::TerminalServerSession")),o.promiseAll(r).then((r=>{let i=r.results[0]?r.results[0].toString().split("\r\n"):[""];n.distro=o.getValue(i,"Caption","=").trim(),n.serial=o.getValue(i,"SerialNumber","=").trim(),n.build=o.getValue(i,"BuildNumber","=").trim(),n.servicepack=o.getValue(i,"ServicePackMajorVersion","=").trim()+"."+o.getValue(i,"ServicePackMinorVersion","=").trim(),n.codepage=o.getCodepage();const a=r.results[1]?r.results[1].toString():"";n.hypervisor=-1!==a.indexOf("hypervisor has been detected")||-1!==a.indexOf("Es wurde ein Hypervisor erkannt")||-1!==a.indexOf("Un hyperviseur a ");const c=r.results[2]?r.results[2].toString():"";n.remoteSession=c.toString().toLowerCase().indexOf("true")>=0,new Promise((e=>{process.nextTick((()=>{try{s('findstr /C:"Detected boot environment" "%windir%\\Panther\\setupact.log"',o.execOptsWin,(function(t,n){if(t)s("$env:firmware_type",o.execOptsWin,(function(t,n){if(!t){const t=n.toString()||"";e(t.toLowerCase().indexOf("uefi")>=0)}e(!1)})),e(!1);else{const t=n.toString().split("\n\r")[0];e(t.toLowerCase().indexOf("uefi")>=0)}}))}catch(t){e(!1)}}))})).then((r=>{n.uefi=r,e&&e(n),t(n)}))}))}catch(r){e&&e(n),t(n)}}}))}))},t.versions=function(e,t){let n={kernel:r.release(),openssl:"",systemOpenssl:"",systemOpensslLib:"",node:process.versions.node,v8:process.versions.v8,npm:"",yarn:"",pm2:"",gulp:"",grunt:"",git:"",tsc:"",mysql:"",redis:"",mongodb:"",apache:"",nginx:"",php:"",docker:"",postfix:"",postgresql:"",perl:"",python:"",python3:"",pip:"",pip3:"",java:"",gcc:"",virtualbox:"",bash:"",zsh:"",fish:"",powershell:"",dotnet:""};return new Promise((r=>{process.nextTick((()=>{if(o.isFunction(e)&&!t)t=e,e="*";else if("string"!=typeof(e=e||"*"))return t&&t({}),r({});const a=function(e){if("*"===e)return{versions:n,counter:30};if(!Array.isArray(e)){e=(e=e.trim().toLowerCase().replace(/,+/g,"|").replace(/ /g,"|")).split("|");const t={versions:{},counter:0};return e.forEach((e=>{if(e)for(let r in n)({}).hasOwnProperty.call(n,r)&&(r.toLowerCase()!==e.toLowerCase()||{}.hasOwnProperty.call(t.versions,r)||(t.versions[r]=n[r],"openssl"===r&&(t.versions.systemOpenssl="",t.versions.systemOpensslLib=""),t.versions[r]||t.counter++))})),t}}(e);let c=a.counter,u=function(){0==--c&&(t&&t(a.versions),r(a.versions))},d="";try{if({}.hasOwnProperty.call(a.versions,"openssl")&&(a.versions.openssl=process.versions.openssl,s("openssl version",(function(e,t){if(!e){let e=t.toString().split("\n")[0].trim().split(" ");a.versions.systemOpenssl=e.length>0?e[1]:e[0],a.versions.systemOpensslLib=e.length>0?e[0]:"openssl"}u()}))),{}.hasOwnProperty.call(a.versions,"npm")&&s("npm -v",(function(e,t){e||(a.versions.npm=t.toString().split("\n")[0]),u()})),{}.hasOwnProperty.call(a.versions,"pm2")&&(d="pm2",f&&(d+=".cmd"),s(`${d} -v`,(function(e,t){if(!e){let e=t.toString().split("\n")[0].trim();e.startsWith("[PM2]")||(a.versions.pm2=e)}u()}))),{}.hasOwnProperty.call(a.versions,"yarn")&&s("yarn --version",(function(e,t){e||(a.versions.yarn=t.toString().split("\n")[0]),u()})),{}.hasOwnProperty.call(a.versions,"gulp")&&(d="gulp",f&&(d+=".cmd"),s(`${d} --version`,(function(e,t){if(!e){const e=t.toString().split("\n")[0]||"";a.versions.gulp=(e.toLowerCase().split("version")[1]||"").trim()}u()}))),{}.hasOwnProperty.call(a.versions,"tsc")&&(d="tsc",f&&(d+=".cmd"),s(`${d} --version`,(function(e,t){if(!e){const e=t.toString().split("\n")[0]||"";a.versions.tsc=(e.toLowerCase().split("version")[1]||"").trim()}u()}))),{}.hasOwnProperty.call(a.versions,"grunt")&&(d="grunt",f&&(d+=".cmd"),s(`${d} --version`,(function(e,t){if(!e){const e=t.toString().split("\n")[0]||"";a.versions.grunt=(e.toLowerCase().split("cli v")[1]||"").trim()}u()}))),{}.hasOwnProperty.call(a.versions,"git"))if(p){const e=i.existsSync("/usr/local/Cellar/git");o.darwinXcodeExists()||e?s("git --version",(function(e,t){if(!e){let e=t.toString().split("\n")[0]||"";e=(e.toLowerCase().split("version")[1]||"").trim(),a.versions.git=(e.split(" ")[0]||"").trim()}u()})):u()}else s("git --version",(function(e,t){if(!e){let e=t.toString().split("\n")[0]||"";e=(e.toLowerCase().split("version")[1]||"").trim(),a.versions.git=(e.split(" ")[0]||"").trim()}u()}));if({}.hasOwnProperty.call(a.versions,"apache")&&s("apachectl -v 2>&1",(function(e,t){if(!e){const e=(t.toString().split("\n")[0]||"").split(":");a.versions.apache=e.length>1?e[1].replace("Apache","").replace("/","").split("(")[0].trim():""}u()})),{}.hasOwnProperty.call(a.versions,"nginx")&&s("nginx -v 2>&1",(function(e,t){if(!e){const e=t.toString().split("\n")[0]||"";a.versions.nginx=(e.toLowerCase().split("/")[1]||"").trim()}u()})),{}.hasOwnProperty.call(a.versions,"mysql")&&s("mysql -V",(function(e,t){if(!e){let e=t.toString().split("\n")[0]||"";if(e=e.toLowerCase(),e.indexOf(",")>-1){e=(e.split(",")[0]||"").trim();const t=e.split(" ");a.versions.mysql=(t[t.length-1]||"").trim()}else e.indexOf(" ver ")>-1&&(e=e.split(" ver ")[1],a.versions.mysql=e.split(" ")[0])}u()})),{}.hasOwnProperty.call(a.versions,"php")&&s("php -v",(function(e,t){if(!e){let e=(t.toString().split("\n")[0]||"").split("(");e[0].indexOf("-")&&(e=e[0].split("-")),a.versions.php=e[0].replace(/[^0-9.]/g,"")}u()})),{}.hasOwnProperty.call(a.versions,"redis")&&s("redis-server --version",(function(e,t){if(!e){const e=(t.toString().split("\n")[0]||"").split(" ");a.versions.redis=o.getValue(e,"v","=",!0)}u()})),{}.hasOwnProperty.call(a.versions,"docker")&&s("docker --version",(function(e,t){if(!e){const e=(t.toString().split("\n")[0]||"").split(" ");a.versions.docker=e.length>2&&e[2].endsWith(",")?e[2].slice(0,-1):""}u()})),{}.hasOwnProperty.call(a.versions,"postfix")&&s("postconf -d | grep mail_version",(function(e,t){if(!e){const e=t.toString().split("\n")||[];a.versions.postfix=o.getValue(e,"mail_version","=",!0)}u()})),{}.hasOwnProperty.call(a.versions,"mongodb")&&s("mongod --version",(function(e,t){if(!e){const e=t.toString().split("\n")[0]||"";a.versions.mongodb=(e.toLowerCase().split(",")[0]||"").replace(/[^0-9.]/g,"")}u()})),{}.hasOwnProperty.call(a.versions,"postgresql")&&(l?s("locate bin/postgres",(function(e,t){if(e)s("psql -V",(function(e,t){if(!e){const e=t.toString().split("\n")[0].split(" ")||[];a.versions.postgresql=e.length?e[e.length-1]:"",a.versions.postgresql=a.versions.postgresql.split("-")[0]}u()})),u();else{const e=t.toString().split("\n").sort();e.length?s(e[e.length-1]+" -V",(function(e,t){if(!e){const e=t.toString().split("\n")[0].split(" ")||[];a.versions.postgresql=e.length?e[e.length-1]:""}u()})):u()}})):f?o.wmic("service get /value").then((e=>{let t=e.split(/\n\s*\n/);for(let e=0;e<t.length;e++)if(""!==t[e].trim()){let n=t[e].trim().split("\r\n"),r=o.getValue(n,"caption","=",!0).toLowerCase();if(r.indexOf("postgresql")>-1){const e=r.split(" server ");e.length>1&&(a.versions.postgresql=e[1])}}u()})):s("postgres -V",(function(e,t){if(!e){const e=t.toString().split("\n")[0].split(" ")||[];a.versions.postgresql=e.length?e[e.length-1]:""}u()}))),{}.hasOwnProperty.call(a.versions,"perl")&&s("perl -v",(function(e,t){if(!e){const e=t.toString().split("\n")||"";for(;e.length>0&&""===e[0].trim();)e.shift();e.length>0&&(a.versions.perl=e[0].split("(").pop().split(")")[0].replace("v",""))}u()})),{}.hasOwnProperty.call(a.versions,"python"))if(p){const e=i.existsSync("/usr/local/Cellar/python");o.darwinXcodeExists()||e?s("python -V 2>&1",(function(e,t){if(!e){const e=t.toString().split("\n")[0]||"";a.versions.python=e.toLowerCase().replace("python","").trim()}u()})):u()}else s("python -V 2>&1",(function(e,t){if(!e){const e=t.toString().split("\n")[0]||"";a.versions.python=e.toLowerCase().replace("python","").trim()}u()}));if({}.hasOwnProperty.call(a.versions,"python3"))if(p){const e=i.existsSync("/usr/local/Cellar/python3");o.darwinXcodeExists()||e?s("python3 -V 2>&1",(function(e,t){if(!e){const e=t.toString().split("\n")[0]||"";a.versions.python3=e.toLowerCase().replace("python","").trim()}u()})):u()}else s("python3 -V 2>&1",(function(e,t){if(!e){const e=t.toString().split("\n")[0]||"";a.versions.python3=e.toLowerCase().replace("python","").trim()}u()}));if({}.hasOwnProperty.call(a.versions,"pip"))if(p){const e=i.existsSync("/usr/local/Cellar/pip");o.darwinXcodeExists()||e?s("pip -V 2>&1",(function(e,t){if(!e){const e=(t.toString().split("\n")[0]||"").split(" ");a.versions.pip=e.length>=2?e[1]:""}u()})):u()}else s("pip -V 2>&1",(function(e,t){if(!e){const e=(t.toString().split("\n")[0]||"").split(" ");a.versions.pip=e.length>=2?e[1]:""}u()}));if({}.hasOwnProperty.call(a.versions,"pip3"))if(p){const e=i.existsSync("/usr/local/Cellar/pip3");o.darwinXcodeExists()||e?s("pip3 -V 2>&1",(function(e,t){if(!e){const e=(t.toString().split("\n")[0]||"").split(" ");a.versions.pip3=e.length>=2?e[1]:""}u()})):u()}else s("pip3 -V 2>&1",(function(e,t){if(!e){const e=(t.toString().split("\n")[0]||"").split(" ");a.versions.pip3=e.length>=2?e[1]:""}u()}));({}).hasOwnProperty.call(a.versions,"java")&&(p?s("/usr/libexec/java_home -V 2>&1",(function(e,t){e||-1!==t.toString().toLowerCase().indexOf("no java runtime")?u():s("java -version 2>&1",(function(e,t){if(!e){const e=(t.toString().split("\n")[0]||"").split('"');a.versions.java=3===e.length?e[1].trim():""}u()}))})):s("java -version 2>&1",(function(e,t){if(!e){const e=(t.toString().split("\n")[0]||"").split('"');a.versions.java=3===e.length?e[1].trim():""}u()}))),{}.hasOwnProperty.call(a.versions,"gcc")&&(p&&o.darwinXcodeExists()||!p?s("gcc -dumpversion",(function(e,t){e||(a.versions.gcc=t.toString().split("\n")[0].trim()||""),a.versions.gcc.indexOf(".")>-1?u():s("gcc --version",(function(e,t){if(!e){const e=t.toString().split("\n")[0].trim();if(e.indexOf("gcc")>-1&&e.indexOf(")")>-1){const t=e.split(")");a.versions.gcc=t[1].trim()||a.versions.gcc}}u()}))})):u()),{}.hasOwnProperty.call(a.versions,"virtualbox")&&s(o.getVboxmanage()+" -v 2>&1",(function(e,t){if(!e){const e=(t.toString().split("\n")[0]||"").split("r");a.versions.virtualbox=e[0]}u()})),{}.hasOwnProperty.call(a.versions,"bash")&&s("bash --version",(function(e,t){if(!e){const e=t.toString().split("\n")[0].split(" version ");e.length>1&&(a.versions.bash=e[1].split(" ")[0].split("(")[0])}u()})),{}.hasOwnProperty.call(a.versions,"zsh")&&s("zsh --version",(function(e,t){if(!e){const e=t.toString().split("\n")[0].split("zsh ");e.length>1&&(a.versions.zsh=e[1].split(" ")[0])}u()})),{}.hasOwnProperty.call(a.versions,"fish")&&s("fish --version",(function(e,t){if(!e){const e=t.toString().split("\n")[0].split(" version ");e.length>1&&(a.versions.fish=e[1].split(" ")[0])}u()})),{}.hasOwnProperty.call(a.versions,"powershell")&&(f?o.powerShell("$PSVersionTable").then((e=>{const t=e.toString().split("\n").map((e=>e.replace(/ +/g," ").replace(/ +/g,":")));a.versions.powershell=o.getValue(t,"psversion"),u()})):u()),{}.hasOwnProperty.call(a.versions,"dotnet")&&o.powerShell('gci "HKLM:\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP" -recurse | gp -name Version,Release -EA 0 | where { $_.PSChildName -match "^(?!S)\\p{L}"} | select PSChildName, Version, Release').then((e=>{const t=e.toString().split("\r\n");let n="";t.forEach((e=>{const t=(e=e.replace(/ +/g," ")).split(" ");n=n||(t[0].toLowerCase().startsWith("client")&&t.length>2||t[0].toLowerCase().startsWith("full")&&t.length>2?t[1].trim():"")})),a.versions.dotnet=n.trim(),u()}))}catch(e){t&&t(a.versions),r(a.versions)}}))}))},t.shell=function(e){return new Promise((t=>{process.nextTick((()=>{f&&t("cmd");let n="";s("echo $SHELL",(function(r,i){r||(n=i.toString().split("\n")[0]),e&&e(n),t(n)}))}))}))},t.uuid=E},8958:(e,t,n)=>{"use strict";const r=n(3129).exec,i=n(1453);let o=process.platform;const s="linux"===o,a="darwin"===o,c="win32"===o,u="freebsd"===o,l="openbsd"===o,p="netbsd"===o,f="sunos"===o,d={1:"Other",2:"Unknown",3:"Idle",4:"Printing",5:"Warmup",6:"Stopped Printing",7:"Offline"};function h(e){const t={},n=i.getValue(e,"PrinterId"," ");return t.id=n?parseInt(n,10):null,t.name=i.getValue(e,"Info"," "),t.model=e.length>0&&e[0]?e[0].split(" ")[0]:"",t.uri=i.getValue(e,"DeviceURI"," "),t.uuid=i.getValue(e,"UUID"," "),t.status=i.getValue(e,"State"," "),t.local=i.getValue(e,"Location"," ").toLowerCase().startsWith("local"),t.default=null,t.shared=i.getValue(e,"Shared"," ").toLowerCase().startsWith("yes"),t}function m(e,t){const n={};return n.id=t,n.name=i.getValue(e,"Description",":",!0),n.model=e.length>0&&e[0]?e[0].split(" ")[0]:"",n.uri=null,n.uuid=null,n.status=e.length>0&&e[0]?e[0].indexOf(" idle")>0?"idle":e[0].indexOf(" printing")>0?"printing":"unknown":null,n.local=i.getValue(e,"Location",":",!0).toLowerCase().startsWith("local"),n.default=null,n.shared=i.getValue(e,"Shared"," ").toLowerCase().startsWith("yes"),n}function g(e,t){const n={},r=e.uri.split("/");return n.id=t,n.name=e._name,n.model=r.length?r[r.length-1]:"",n.uri=e.uri,n.uuid=null,n.status=e.status,n.local="local"===e.printserver,n.default="yes"===e.default,n.shared="yes"===e.shared,n}function v(e,t){const n={},r=parseInt(i.getValue(e,"PrinterStatus","="),10);return n.id=t,n.name=i.getValue(e,"name","="),n.model=i.getValue(e,"DriverName","="),n.uri=null,n.uuid=null,n.status=d[r]?d[r]:null,n.local="TRUE"===i.getValue(e,"Local","="),n.default="TRUE"===i.getValue(e,"Default","="),n.shared="TRUE"===i.getValue(e,"Shared","="),n}t.printer=function(e){return new Promise((t=>{process.nextTick((()=>{let n=[];if(s||u||l||p){let i="cat /etc/cups/printers.conf 2>/dev/null";r(i,(function(o,a){if(!o){const e=a.toString().split("<Printer "),t=function(e){const t={};if(e&&e.length&&e[0].indexOf(" CUPS v")>0){const n=e[0].split(" CUPS v");t.cupsVersion=n[1]}return t}(e[0]);for(let r=1;r<e.length;r++){const i=h(e[r].split("\n"));i.name&&(i.engine="CUPS",i.engineVersion=t.cupsVersion,n.push(i))}}0===n.length&&s?(i="export LC_ALL=C; lpstat -lp 2>/dev/null; unset LC_ALL",r(i,(function(e,t){const r=("\n"+t.toString()).split("\nprinter ");for(let e=1;e<r.length;e++){const t=m(r[e].split("\n"),e);n.push(t)}})),e&&e(n),t(n)):(e&&e(n),t(n))}))}if(a){r("system_profiler SPPrintersDataType -json",(function(r,o){if(!r)try{const e=JSON.parse(o.toString());if(e.SPPrintersDataType&&e.SPPrintersDataType.length)for(let t=0;t<e.SPPrintersDataType.length;t++){const r=g(e.SPPrintersDataType[t],t);n.push(r)}}catch(e){i.noop()}e&&e(n),t(n)}))}c&&i.wmic("printer get /value",(function(r,i){if(!r){const e=i.toString().split(/\n\s*\n/);for(let t=0;t<e.length;t++){const r=v(e[t].split("\n"),t);(r.name||r.model)&&n.push(v(e[t].split("\n"),t))}}e&&e(n),t(n)})),f&&t(null)}))}))}},1111:(e,t,n)=>{"use strict";const r=n(2087),i=n(5747),o=n(5622),s=n(3129).exec,a=n(3129).execSync,c=n(1453);let u=process.platform;const l="linux"===u,p="darwin"===u,f="win32"===u,d="freebsd"===u,h="openbsd"===u,m="netbsd"===u,g="sunos"===u,v={all:0,list:{},ms:0,result:{}},y={all:0,list:{},ms:0,result:{}},_={all:0,list:{},ms:0,result:{}},E={0:"unknown",1:"other",2:"ready",3:"running",4:"blocked",5:"suspended blocked",6:"suspended ready",7:"terminated",8:"stopped",9:"growing"};function b(e){let t=e.replace(/ +/g," ").split(" ");return(t.length>=2?parseInt(t[1]):0)+(t.length>=3?parseInt(t[2]):0)+(t.length>=4?parseInt(t[3]):0)+(t.length>=5?parseInt(t[4]):0)+(t.length>=6?parseInt(t[5]):0)+(t.length>=7?parseInt(t[6]):0)+(t.length>=8?parseInt(t[7]):0)+(t.length>=9?parseInt(t[8]):0)+(t.length>=10?parseInt(t[9]):0)+(t.length>=11?parseInt(t[10]):0)}function w(e,t,n){let r=e.replace(/ +/g," ").split(")");if(r.length>=2){let e=r[1].split(" ");if(e.length>=16){let i=parseInt(r[0].split(" ")[0]),o=parseInt(e[12]),s=parseInt(e[13]),a=parseInt(e[14]),c=parseInt(e[15]),u=0,l=0;return n.all>0&&n.list[i]?(u=(o+a-n.list[i].utime-n.list[i].cutime)/(t-n.all)*100,l=(s+c-n.list[i].stime-n.list[i].cstime)/(t-n.all)*100):(u=(o+a)/t*100,l=(s+c)/t*100),{pid:i,utime:o,stime:s,cutime:a,cstime:c,cpuu:u,cpus:l}}return{pid:0,utime:0,stime:0,cutime:0,cstime:0,cpuu:0,cpus:0}}return{pid:0,utime:0,stime:0,cutime:0,cstime:0,cpuu:0,cpus:0}}function S(e,t,n){let r=0,i=0;return n.all>0&&n.list[e.pid]?(r=(e.utime-n.list[e.pid].utime)/(t-n.all)*100,i=(e.stime-n.list[e.pid].stime)/(t-n.all)*100):(r=e.utime/t*100,i=e.stime/t*100),{pid:e.pid,utime:e.utime,stime:e.stime,cpuu:r,cpus:i}}t.services=function(e,t){return c.isFunction(e)&&!t&&(t=e,e=""),new Promise((n=>{process.nextTick((()=>{if("string"!=typeof e)return t&&t([]),n([]);if(e){let r="";r.__proto__.toLowerCase=c.stringToLower,r.__proto__.replace=c.stringReplace,r.__proto__.trim=c.stringTrim;const i=c.sanitizeShellString(e);for(let e=0;e<=c.mathMin(i.length,2e3);e++)void 0!==i[e]&&(r+=i[e]);r=r.trim().toLowerCase().replace(/, /g,"|").replace(/,+/g,"|"),""===r&&(r="*"),c.isPrototypePolluted()&&"*"!==r&&(r="------");let o=r.split("|"),u=[],g=[];if(l||d||h||m||p){if((l||d||h||m)&&"*"===r)try{r="";const e=a("service --status-all 2> /dev/null").toString().split("\n");for(const t of e){const e=t.split("]");2===e.length&&(r+=(""!==r?"|":"")+e[1].trim())}o=r.split("|")}catch(e){try{const e=a("ls /etc/init.d/ -m 2> /dev/null").toString().split("\n").join("");if(r="",e){const t=e.split(",");for(const e of t){const t=e.trim();t&&(r+=(""!==r?"|":"")+t)}o=r.split("|")}}catch(e){r="",o=[]}}p&&"*"===r&&(t&&t(u),n(u));let e=p?["-caxo","pcpu,pmem,pid,command"]:["-axo","pcpu,pmem,pid,command"];""!==r&&o.length>0?c.execSafe("ps",e).then((r=>{if(r){let e=r.replace(/ +/g," ").replace(/,+/g,".").split("\n");if(o.forEach((function(t){let n;n=p?e.filter((function(e){return-1!==e.toLowerCase().indexOf(t)})):e.filter((function(e){return-1!==e.toLowerCase().indexOf(" "+t+":")||-1!==e.toLowerCase().indexOf("/"+t)}));const r=[];for(const e of n){const t=e.trim().split(" ")[2];t&&r.push(parseInt(t,10))}u.push({name:t,running:n.length>0,startmode:"",pids:r,cpu:parseFloat(n.reduce((function(e,t){return e+parseFloat(t.trim().split(" ")[0])}),0).toFixed(2)),mem:parseFloat(n.reduce((function(e,t){return e+parseFloat(t.trim().split(" ")[1])}),0).toFixed(2))})})),l){let e='cat /proc/stat | grep "cpu "';for(let t in u)for(let n in u[t].pids)e+=";cat /proc/"+u[t].pids[n]+"/stat";s(e,{maxBuffer:2048e4},(function(e,r){let i=r.toString().split("\n"),o=b(i.shift()),s={},a={};for(let e=0;e<i.length;e++)if(a=w(i[e],o,y),a.pid){let e=-1;for(let t in u)for(let n in u[t].pids)parseInt(u[t].pids[n])===parseInt(a.pid)&&(e=t);e>=0&&(u[e].cpu+=a.cpuu+a.cpus),s[a.pid]={cpuu:a.cpuu,cpus:a.cpus,utime:a.utime,stime:a.stime,cutime:a.cutime,cstime:a.cstime}}y.all=o,y.list=Object.assign({},s),y.ms=Date.now()-y.ms,y.result=Object.assign({},u),t&&t(u),n(u)}))}else t&&t(u),n(u)}else e=["-o","comm"],c.execSafe("ps",e).then((e=>{if(e){let r=e.replace(/ +/g," ").replace(/,+/g,".").split("\n");o.forEach((function(e){let t=r.filter((function(t){return-1!==t.indexOf(e)}));u.push({name:e,running:t.length>0,startmode:"",cpu:0,mem:0})})),t&&t(u),n(u)}else o.forEach((function(e){u.push({name:e,running:!1,startmode:"",cpu:0,mem:0})})),t&&t(u),n(u)}))})):(t&&t(u),n(u))}if(f)try{c.wmic("service get /value").then(((e,i)=>{if(i)o.forEach((function(e){u.push({name:e,running:!1,startmode:"",cpu:0,mem:0})})),t&&t(u),n(u);else{let i=e.split(/\n\s*\n/);for(let e=0;e<i.length;e++)if(""!==i[e].trim()){let t=i[e].trim().split("\r\n"),n=c.getValue(t,"Name","=",!0).toLowerCase(),s=c.getValue(t,"Caption","=",!0).toLowerCase(),a=c.getValue(t,"Started","=",!0),l=c.getValue(t,"StartMode","=",!0),p=c.getValue(t,"ProcessId","=",!0);("*"===r||o.indexOf(n)>=0||o.indexOf(s)>=0)&&(u.push({name:n,running:"TRUE"===a,startmode:l,pids:[p],cpu:0,mem:0}),g.push(n),g.push(s))}if("*"!==r){o.filter((function(e){return-1===g.indexOf(e)})).forEach((function(e){u.push({name:e,running:!1,startmode:"",pids:[],cpu:0,mem:0})}))}t&&t(u),n(u)}}))}catch(e){t&&t(u),n(u)}}else t&&t([]),n([])}))}))},t.processes=function(e){let t=[];function n(e){let t=(e=e||"").split(" ")[0];if(":"===t.substr(-1)&&(t=t.substr(0,t.length-1)),"["!==t.substr(0,1)){let e=t.split("/");t=isNaN(parseInt(e[e.length-1]))?e[e.length-1]:e[0]}return t}function a(e){let r=[];if(e.length>1){let s=e[0];t=c.parseHead(s,8),e.shift(),e.forEach((function(e){""!==e.trim()&&r.push(function(e){let r=0,s=0;function a(n){r=s,s=t[n]?e.substring(t[n].to+r,1e4).indexOf(" "):1e4}a(0);const c=parseInt(e.substring(t[0].from+r,t[0].to+s));a(1);const u=parseInt(e.substring(t[1].from+r,t[1].to+s));a(2);const p=parseFloat(e.substring(t[2].from+r,t[2].to+s).replace(/,/g,"."));a(3);const f=parseFloat(e.substring(t[3].from+r,t[3].to+s).replace(/,/g,"."));a(4);const d=parseInt(e.substring(t[4].from+r,t[4].to+s));a(5);const h=parseInt(e.substring(t[5].from+r,t[5].to+s));a(6);const m=parseInt(e.substring(t[6].from+r,t[6].to+s));a(7);const g=parseInt(e.substring(t[7].from+r,t[7].to+s))||0;a(8);const v=function(e){let t=e,n=e.replace(/ +/g," ").split(" ");return 5===n.length&&(t=n[4]+"-"+("0"+("JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC".indexOf(n[1].toUpperCase())/3+1)).slice(-2)+"-"+("0"+n[2]).slice(-2)+" "+n[3]),t}(e.substring(t[8].from+r,t[8].to+s).trim());a(9);let y=e.substring(t[9].from+r,t[9].to+s).trim();y="R"===y[0]?"running":"S"===y[0]?"sleeping":"T"===y[0]?"stopped":"W"===y[0]?"paging":"X"===y[0]?"dead":"Z"===y[0]?"zombie":"D"===y[0]||"U"===y[0]?"blocked":"unknown",a(10);let _=e.substring(t[10].from+r,t[10].to+s).trim();"?"!==_&&"??"!==_||(_=""),a(11);const E=e.substring(t[11].from+r,t[11].to+s).trim();a(12);let b="",w="",S="",I=e.substring(t[12].from+r,t[12].to+s).trim();if("]"===I.substr(I.length-1)&&(I=I.slice(0,-1)),"["===I.substr(0,1))w=I.substring(1);else{let e=I.indexOf(" -"),t=I.indexOf(" /");e=e>=0?e:1e4,t=t>=0?t:1e4;const n=Math.min(e,t);let r=I.substr(0,n);const s=I.substr(n),a=r.lastIndexOf("/");if(a>=0&&(b=r.substr(0,a),r=r.substr(a+1)),1e4===n&&r.indexOf(" ")>-1){const e=r.split(" ");i.existsSync(o.join(b,e[0]))?(w=e.shift(),S=(e.join(" ")+" "+s).trim()):(w=r.trim(),S=s.trim())}else w=r.trim(),S=s.trim()}return{pid:c,parentPid:u,name:l?n(w):w,cpu:p,cpuu:0,cpus:0,mem:f,priority:d,memVsz:h,memRss:m,nice:g,started:v,state:y,tty:_,user:E,command:w,params:S,path:b}}(e))}))}return r}return new Promise((t=>{process.nextTick((()=>{let i={all:0,running:0,blocked:0,sleeping:0,unknown:0,list:[]},o="";if(v.ms&&Date.now()-v.ms>=500||0===v.ms)if(l||d||h||m||p||g)l&&(o="export LC_ALL=C; ps -axo pid:11,ppid:11,pcpu:6,pmem:6,pri:5,vsz:11,rss:11,ni:5,lstart:30,state:5,tty:15,user:20,command; unset LC_ALL"),(d||h||m)&&(o="export LC_ALL=C; ps -axo pid,ppid,pcpu,pmem,pri,vsz,rss,ni,lstart,state,tty,user,command; unset LC_ALL"),p&&(o="export LC_ALL=C; ps -axo pid,ppid,pcpu,pmem,pri,vsz,rss,nice,lstart,state,tty,user,command -r; unset LC_ALL"),g&&(o="ps -Ao pid,ppid,pcpu,pmem,pri,vsz,rss,nice,stime,s,tty,user,comm"),s(o,{maxBuffer:2048e4},(function(c,u){if(c)o="ps -o pid,ppid,vsz,rss,nice,etime,stat,tty,user,comm",g&&(o="ps -o pid,ppid,vsz,rss,nice,etime,s,tty,user,comm"),s(o,{maxBuffer:2048e4},(function(o,s){if(o)e&&e(i),t(i);else{let o=s.toString().split("\n");o.shift(),i.list=function(e){let t=[];return e.forEach((function(e){if(""!==e.trim()){const i=(e=e.trim().replace(/ +/g," ").replace(/,+/g,".")).split(" "),o=i.slice(9).join(" "),s=parseFloat((1*parseInt(i[3])*1024/r.totalmem()).toFixed(1)),a=i[5].split(":"),c=function(e){const t=("0"+(e.getMonth()+1).toString()).substr(-2);return e.getFullYear().toString()+"-"+t+"-"+("0"+e.getDay().toString()).substr(-2)+" "+e.getHours().toString()+":"+e.getMinutes().toString()+":"+("0"+e.getSeconds().toString()).substr(-2)}(new Date(Date.now()-(a.length>1?1e3*(60*a[0]+a[1]):1e3*a[0])));t.push({pid:parseInt(i[0]),parentPid:parseInt(i[1]),name:n(o),cpu:0,cpuu:0,cpus:0,mem:s,priority:0,memVsz:parseInt(i[2]),memRss:parseInt(i[3]),nice:parseInt(i[4]),started:c,state:"R"===i[6]?"running":"S"===i[6]?"sleeping":"T"===i[6]?"stopped":"W"===i[6]?"paging":"X"===i[6]?"dead":"Z"===i[6]?"zombie":"D"===i[6]||"U"===i[6]?"blocked":"unknown",tty:i[7],user:i[8],command:o})}})),t}(o).slice(),i.all=i.list.length,i.running=i.list.filter((function(e){return"running"===e.state})).length,i.blocked=i.list.filter((function(e){return"blocked"===e.state})).length,i.sleeping=i.list.filter((function(e){return"sleeping"===e.state})).length,e&&e(i),t(i)}}));else if(i.list=a(u.toString().split("\n")).slice(),i.all=i.list.length,i.running=i.list.filter((function(e){return"running"===e.state})).length,i.blocked=i.list.filter((function(e){return"blocked"===e.state})).length,i.sleeping=i.list.filter((function(e){return"sleeping"===e.state})).length,l){o='cat /proc/stat | grep "cpu "';for(let e=0;e<i.list.length;e++)o+=";cat /proc/"+i.list[e].pid+"/stat";s(o,{maxBuffer:2048e4},(function(n,r){let o=r.toString().split("\n"),s=b(o.shift()),a={},c={};for(let e=0;e<o.length;e++)if(c=w(o[e],s,v),c.pid){let e=i.list.map((function(e){return e.pid})).indexOf(c.pid);e>=0&&(i.list[e].cpu=c.cpuu+c.cpus,i.list[e].cpuu=c.cpuu,i.list[e].cpus=c.cpus),a[c.pid]={cpuu:c.cpuu,cpus:c.cpus,utime:c.utime,stime:c.stime,cutime:c.cutime,cstime:c.cstime}}v.all=s,v.list=Object.assign({},a),v.ms=Date.now()-v.ms,v.result=Object.assign({},i),e&&e(i),t(i)}))}else e&&e(i),t(i)}));else if(f)try{c.wmic("process get /value").then(((n,o)=>{if(!o){let e=n.split(/\n\s*\n/),t=[],o=[],a={},u=0,l=0;for(let n=0;n<e.length;n++)if(""!==e[n].trim()){let a=e[n].trim().split("\r\n"),p=parseInt(c.getValue(a,"ProcessId","=",!0),10),f=parseInt(c.getValue(a,"ParentProcessId","=",!0),10),d=c.getValue(a,"ExecutionState","="),h=c.getValue(a,"Caption","=",!0),m=c.getValue(a,"CommandLine","=",!0),g=c.getValue(a,"ExecutablePath","=",!0),v=parseInt(c.getValue(a,"UserModeTime","=",!0),10),y=parseInt(c.getValue(a,"KernelModeTime","=",!0),10),_=parseInt(c.getValue(a,"WorkingSetSize","=",!0),10);u+=v,l+=y,i.all++,d||i.unknown++,"3"===d&&i.running++,"4"!==d&&"5"!==d||i.blocked++,o.push({pid:p,utime:v,stime:y,cpu:0,cpuu:0,cpus:0}),t.push({pid:p,parentPid:f,name:h,cpu:0,cpuu:0,cpus:0,pmem:_/r.totalmem()*100,priority:parseInt(c.getValue(a,"Priority","=",!0),10),memVsz:parseInt(c.getValue(a,"PageFileUsage","=",!0),10),memRss:Math.floor(parseInt(c.getValue(a,"WorkingSetSize","=",!0),10)/1024),nice:0,started:(s=c.getValue(a,"CreationDate","=",!0),(s=s||"")?s.substr(0,4)+"-"+s.substr(4,2)+"-"+s.substr(6,2)+" "+s.substr(8,2)+":"+s.substr(10,2)+":"+s.substr(12,2):""),state:d?E[d]:E[0],tty:"",user:"",command:m||h,path:g,params:""})}i.sleeping=i.all-i.running-i.blocked-i.unknown,i.list=t;for(let e=0;e<o.length;e++){let t=S(o[e],u+l,v),n=i.list.map((function(e){return e.pid})).indexOf(t.pid);n>=0&&(i.list[n].cpu=t.cpuu+t.cpus,i.list[n].cpuu=t.cpuu,i.list[n].cpus=t.cpus),a[t.pid]={cpuu:t.cpuu,cpus:t.cpus,utime:t.utime,stime:t.stime}}v.all=u+l,v.list=Object.assign({},a),v.ms=Date.now()-v.ms,v.result=Object.assign({},i)}var s;e&&e(i),t(i)}))}catch(n){e&&e(i),t(i)}else e&&e(i),t(i);else e&&e(v.result),t(v.result)}))}))},t.processLoad=function(e,t){return c.isFunction(e)&&!t&&(t=e,e=""),new Promise((n=>{process.nextTick((()=>{if("string"!=typeof(e=e||""))return t&&t([]),n([]);let i="";i.__proto__.toLowerCase=c.stringToLower,i.__proto__.replace=c.stringReplace,i.__proto__.trim=c.stringTrim;const o=c.sanitizeShellString(e);for(let e=0;e<=c.mathMin(o.length,2e3);e++)void 0!==o[e]&&(i+=o[e]);i=i.trim().toLowerCase().replace(/, /g,"|").replace(/,+/g,"|"),""===i&&(i="*"),c.isPrototypePolluted()&&"*"!==i&&(i="------");let a=i.split("|"),u=[];if((c.isPrototypePolluted()?"":c.sanitizeShellString(e))&&a.length&&"------"!==a[0]){if(f)try{c.wmic("process get /value").then(((e,o)=>{if(!o){let o=e.split(/\n\s*\n/),s=[],l={},p=0,f=0;for(let e=0;e<o.length;e++)if(""!==o[e].trim()){let t=o[e].trim().split("\r\n"),n=parseInt(c.getValue(t,"ProcessId","=",!0),10),l=c.getValue(t,"Caption","=",!0),d=parseInt(c.getValue(t,"UserModeTime","=",!0),10),h=parseInt(c.getValue(t,"KernelModeTime","=",!0),10),m=parseInt(c.getValue(t,"WorkingSetSize","=",!0),10);p+=d,f+=h,s.push({pid:n,name:l,utime:d,stime:h,cpu:0,cpuu:0,cpus:0,mem:m});let g="",v=!1;if(a.forEach((function(e){l.toLowerCase().indexOf(e.toLowerCase())>=0&&!v&&(v=!0,g=e)})),"*"===i||v){let e=!1;u.forEach((function(t){t.proc.toLowerCase()===g.toLowerCase()&&(t.pids.push(n),t.mem+=m/r.totalmem()*100,e=!0)})),e||u.push({proc:g,pid:n,pids:[n],cpu:0,mem:m/r.totalmem()*100})}}if("*"!==i){a.filter((function(e){return 0===s.filter((function(t){return t.name.toLowerCase().indexOf(e)>=0})).length})).forEach((function(e){u.push({proc:e,pid:null,pids:[],cpu:0,mem:0})}))}for(let e=0;e<s.length;e++){let t=S(s[e],p+f,_),n=-1;for(let e=0;e<u.length;e++)(u[e].pid===t.pid||u[e].pids.indexOf(t.pid)>=0)&&(n=e);n>=0&&(u[n].cpu+=t.cpuu+t.cpus),l[t.pid]={cpuu:t.cpuu,cpus:t.cpus,utime:t.utime,stime:t.stime}}_.all=p+f,_.list=Object.assign({},l),_.ms=Date.now()-_.ms,_.result=JSON.parse(JSON.stringify(u)),t&&t(u),n(u)}}))}catch(e){t&&t(u),n(u)}if(p||l||d||h||m){const e=["-axo","pid,pcpu,pmem,comm"];c.execSafe("ps",e).then((e=>{if(e){let r=[];if(e.toString().split("\n").filter((function(e){if("*"===i)return!0;if(-1!==e.toLowerCase().indexOf("grep"))return!1;let t=!1;return a.forEach((function(n){t=t||e.toLowerCase().indexOf(n.toLowerCase())>=0})),t})).forEach((function(e){let t=e.trim().replace(/ +/g," ").split(" ");t.length>3&&r.push({name:t[3].substring(t[3].lastIndexOf("/")+1),pid:parseInt(t[0])||0,cpu:parseFloat(t[1].replace(",",".")),mem:parseFloat(t[2].replace(",","."))})})),r.forEach((function(e){let t=-1,n=!1,r="";for(let n=0;n<u.length;n++)e.name.toLowerCase().indexOf(u[n].proc.toLowerCase())>=0&&(t=n);a.forEach((function(t){e.name.toLowerCase().indexOf(t.toLowerCase())>=0&&!n&&(n=!0,r=t)})),("*"===i||n)&&(t<0?u.push({proc:r,pid:e.pid,pids:[e.pid],cpu:e.cpu,mem:e.mem}):(u[t].pids.push(e.pid),u[t].cpu+=e.cpu,u[t].mem+=e.mem))})),"*"!==i){a.filter((function(e){return 0===r.filter((function(t){return t.name.toLowerCase().indexOf(e)>=0})).length})).forEach((function(e){u.push({proc:e,pid:null,pids:[],cpu:0,mem:0})}))}if(l){u.forEach((function(e){e.cpu=0}));let e='cat /proc/stat | grep "cpu "';for(let t in u)for(let n in u[t].pids)e+=";cat /proc/"+u[t].pids[n]+"/stat";s(e,{maxBuffer:2048e4},(function(e,r){let i=r.toString().split("\n"),o=b(i.shift()),s={},a={};for(let e=0;e<i.length;e++)if(a=w(i[e],o,_),a.pid){let e=-1;for(let t in u)u[t].pids.indexOf(a.pid)>=0&&(e=t);e>=0&&(u[e].cpu+=a.cpuu+a.cpus),s[a.pid]={cpuu:a.cpuu,cpus:a.cpus,utime:a.utime,stime:a.stime,cutime:a.cutime,cstime:a.cstime}}u.forEach((function(e){e.cpu=Math.round(100*e.cpu)/100})),_.all=o,_.list=Object.assign({},s),_.ms=Date.now()-_.ms,_.result=Object.assign({},u),t&&t(u),n(u)}))}else t&&t(u),n(u)}else t&&t(u),n(u)}))}}}))}))}},1617:(e,t,n)=>{"use strict";const r=n(5747),i=n(2087),o=n(1453),s=n(3129).exec,a=n(3129).execSync,c=o.promisify(n(3129).exec);let u=process.platform;const l="linux"===u,p="darwin"===u,f="win32"===u,d="freebsd"===u,h="openbsd"===u,m="netbsd"===u,g="sunos"===u;t.system=function(e){return new Promise((t=>{process.nextTick((()=>{let n={manufacturer:"",model:"Computer",version:"",serial:"-",uuid:"-",sku:"-",virtual:!1};if((l||d||h||m)&&s("export LC_ALL=C; dmidecode -t system 2>/dev/null; unset LC_ALL",(function(i,s){let c=s.toString().split("\n");n.manufacturer=o.getValue(c,"manufacturer"),n.model=o.getValue(c,"product name"),n.version=o.getValue(c,"version"),n.serial=o.getValue(c,"serial number"),n.uuid=o.getValue(c,"uuid").toLowerCase(),n.sku=o.getValue(c,"sku number");try{c=a('echo -n "product_name: "; cat /sys/devices/virtual/dmi/id/product_name 2>/dev/null; echo;\n echo -n "product_serial: "; cat /sys/devices/virtual/dmi/id/product_serial 2>/dev/null; echo;\n echo -n "product_uuid: "; cat /sys/devices/virtual/dmi/id/product_uuid 2>/dev/null; echo;\n echo -n "product_version: "; cat /sys/devices/virtual/dmi/id/product_version 2>/dev/null; echo;\n echo -n "sys_vendor: "; cat /sys/devices/virtual/dmi/id/sys_vendor 2>/dev/null; echo;').toString().split("\n"),n.manufacturer=""===n.manufacturer?o.getValue(c,"sys_vendor"):n.manufacturer,n.model=""===n.model?o.getValue(c,"product_name"):n.model,n.version=""===n.version?o.getValue(c,"product_version"):n.version,n.serial=""===n.serial?o.getValue(c,"product_serial"):n.serial,n.uuid=""===n.uuid?o.getValue(c,"product_uuid").toLowerCase():n.uuid}catch(e){o.noop()}if(n.serial&&-1===n.serial.toLowerCase().indexOf("o.e.m.")||(n.serial="-"),n.manufacturer&&-1===n.manufacturer.toLowerCase().indexOf("o.e.m.")||(n.manufacturer=""),n.model&&-1===n.model.toLowerCase().indexOf("o.e.m.")||(n.model="Computer"),n.version&&-1===n.version.toLowerCase().indexOf("o.e.m.")||(n.version=""),n.sku&&-1===n.sku.toLowerCase().indexOf("o.e.m.")||(n.sku="-"),"virtualbox"===n.model.toLowerCase()||"kvm"===n.model.toLowerCase()||"virtual machine"===n.model.toLowerCase()||"bochs"===n.model.toLowerCase()||n.model.toLowerCase().startsWith("vmware")||n.model.toLowerCase().startsWith("droplet"))switch(n.virtual=!0,n.model.toLowerCase()){case"virtualbox":n.virtualHost="VirtualBox";break;case"vmware":n.virtualHost="VMware";break;case"kvm":n.virtualHost="KVM";break;case"bochs":n.virtualHost="bochs"}if(n.manufacturer.toLowerCase().startsWith("vmware")||"xen"===n.manufacturer.toLowerCase())switch(n.virtual=!0,n.manufacturer.toLowerCase()){case"vmware":n.virtualHost="VMware";break;case"xen":n.virtualHost="Xen"}if(!n.virtual)try{const e=a("ls -1 /dev/disk/by-id/ 2>/dev/null").toString();e.indexOf("_QEMU_")>=0&&(n.virtual=!0,n.virtualHost="QEMU"),e.indexOf("_VBOX_")>=0&&(n.virtual=!0,n.virtualHost="VirtualBox")}catch(e){o.noop()}if(!n.virtual&&o.linuxVersion().toLowerCase().indexOf("microsoft")>=0){let e=o.linuxVersion().toLowerCase();e=e.split("-")[0].replace("#","");const t=parseInt(e,10)||null;n.virtual=!0,n.manufacturer="Microsoft",n.model="WSL",n.version=t}if((d||h||m)&&!n.virtualHost)try{const e=a("dmidecode -t 4").toString().split("\n");switch(o.getValue(e,"manufacturer",":",!0).toLowerCase()){case"virtualbox":n.virtualHost="VirtualBox";break;case"vmware":n.virtualHost="VMware";break;case"kvm":n.virtualHost="KVM";break;case"bochs":n.virtualHost="bochs"}}catch(e){o.noop()}(r.existsSync("/.dockerenv")||r.existsSync("/.dockerinit"))&&(n.model="Docker Container");try{const e=a('dmesg 2>/dev/null | grep -iE "virtual|hypervisor" | grep -iE "vmware|qemu|kvm|xen"');e.toString().split("\n").length>0&&("Computer"===n.model&&(n.model="Virtual machine"),n.virtual=!0,e.toString().toLowerCase().indexOf("vmware")&&!n.virtualHost&&(n.virtualHost="VMware"),e.toString().toLowerCase().indexOf("qemu")&&!n.virtualHost&&(n.virtualHost="QEMU"),e.toString().toLowerCase().indexOf("xen")&&!n.virtualHost&&(n.virtualHost="Xen"),e.toString().toLowerCase().indexOf("kvm")&&!n.virtualHost&&(n.virtualHost="KVM"))}catch(e){o.noop()}""===n.manufacturer&&"Computer"===n.model&&""===n.version?r.readFile("/proc/cpuinfo",(function(r,i){if(!r){let e=i.toString().split("\n");n.model=o.getValue(e,"hardware",":",!0).toUpperCase(),n.version=o.getValue(e,"revision",":",!0).toLowerCase(),n.serial=o.getValue(e,"serial",":",!0);const t=o.getValue(e,"model:",":",!0);if(("BCM2835"===n.model||"BCM2708"===n.model||"BCM2709"===n.model||"BCM2710"===n.model||"BCM2711"===n.model||"BCM2836"===n.model||"BCM2837"===n.model)&&t.toLowerCase().indexOf("raspberry")>=0){const t=o.decodePiCpuinfo(e);n.model=t.model,n.version=t.revisionCode,n.manufacturer="Raspberry Pi Foundation",n.raspberry={manufacturer:t.manufacturer,processor:t.processor,type:t.type,revision:t.revision}}}e&&e(n),t(n)})):(e&&e(n),t(n))})),p&&s("ioreg -c IOPlatformExpertDevice -d 2",(function(r,i){if(!r){let e=i.toString().replace(/[<>"]/g,"").split("\n");n.manufacturer=o.getValue(e,"manufacturer","=",!0),n.model=o.getValue(e,"model","=",!0),n.version=o.getValue(e,"version","=",!0),n.serial=o.getValue(e,"ioplatformserialnumber","=",!0),n.uuid=o.getValue(e,"ioplatformuuid","=",!0).toLowerCase(),n.sku=o.getValue(e,"board-id","=",!0)}e&&e(n),t(n)})),g&&(e&&e(n),t(n)),f)try{o.wmic("csproduct get /value").then(((r,i)=>{if(i)e&&e(n),t(n);else{let i=r.split("\r\n");if(n.manufacturer=o.getValue(i,"vendor","="),n.model=o.getValue(i,"name","="),n.version=o.getValue(i,"version","="),n.serial=o.getValue(i,"identifyingnumber","="),n.uuid=o.getValue(i,"uuid","=").toLowerCase(),"virtualbox"===n.model.toLowerCase()||"kvm"===n.model.toLowerCase()||"virtual machine"===n.model.toLowerCase()||"bochs"===n.model.toLowerCase()||n.model.toLowerCase().startsWith("vmware"))switch(n.virtual=!0,n.model.toLowerCase()){case"virtualbox":n.virtualHost="VirtualBox";break;case"vmware":n.virtualHost="VMware";break;case"kvm":n.virtualHost="KVM";break;case"bochs":n.virtualHost="bochs"}if(n.manufacturer.toLowerCase().startsWith("vmware")||"xen"===n.manufacturer.toLowerCase())switch(n.virtual=!0,n.manufacturer.toLowerCase()){case"vmware":n.virtualHost="VMware";break;case"xen":n.virtualHost="Xen"}o.wmic("/namespace:\\\\root\\wmi path MS_SystemInformation get /value").then(((r,i)=>{if(!i){let e=r.split("\r\n");n.sku=o.getValue(e,"systemsku","=")}n.virtual?(e&&e(n),t(n)):o.wmic("bios get Version, SerialNumber, SMBIOSBIOSVersion").then(((r,i)=>{if(i)e&&e(n),t(n);else{let i=r.toString();(i.indexOf("VRTUAL")>=0||i.indexOf("A M I ")>=0||i.indexOf("VirtualBox")>=0||i.indexOf("VMWare")>=0||i.indexOf("Xen")>=0)&&(n.virtual=!0,i.indexOf("VirtualBox")>=0&&!n.virtualHost&&(n.virtualHost="VirtualBox"),i.indexOf("VMware")>=0&&!n.virtualHost&&(n.virtualHost="VMware"),i.indexOf("Xen")>=0&&!n.virtualHost&&(n.virtualHost="Xen"),i.indexOf("VRTUAL")>=0&&!n.virtualHost&&(n.virtualHost="Hyper-V"),i.indexOf("A M I")>=0&&!n.virtualHost&&(n.virtualHost="Virtual PC")),e&&e(n),t(n)}}))}))}}))}catch(r){e&&e(n),t(n)}}))}))},t.bios=function(e){return new Promise((t=>{process.nextTick((()=>{let n={vendor:"",version:"",releaseDate:"",revision:""},r="";if((l||d||h||m)&&(r="arm"===process.arch?"cat /proc/cpuinfo | grep Serial":"export LC_ALL=C; dmidecode -t bios 2>/dev/null; unset LC_ALL",s(r,(function(r,i){let s=i.toString().split("\n");n.vendor=o.getValue(s,"Vendor"),n.version=o.getValue(s,"Version");let c=o.getValue(s,"Release Date");n.releaseDate=o.parseDateTime(c).date,n.revision=o.getValue(s,"BIOS Revision");let u=o.getValue(s,"Currently Installed Language").split("|")[0];if(u&&(n.language=u),s.length&&i.toString().indexOf("Characteristics:")>=0){const e=[];s.forEach((t=>{if(t.indexOf(" is supported")>=0){const n=t.split(" is supported")[0].trim();e.push(n)}})),n.features=e}try{s=a('echo -n "bios_date: "; cat /sys/devices/virtual/dmi/id/bios_date 2>/dev/null; echo;\n echo -n "bios_vendor: "; cat /sys/devices/virtual/dmi/id/bios_vendor 2>/dev/null; echo;\n echo -n "bios_version: "; cat /sys/devices/virtual/dmi/id/bios_version 2>/dev/null; echo;').toString().split("\n"),n.vendor=n.vendor?n.vendor:o.getValue(s,"bios_vendor"),n.version=n.version?n.version:o.getValue(s,"bios_version"),c=o.getValue(s,"bios_date"),n.releaseDate=n.releaseDate?n.releaseDate:o.parseDateTime(c).date}catch(e){o.noop()}e&&e(n),t(n)}))),p&&(n.vendor="Apple Inc.",s("system_profiler SPHardwareDataType -json",(function(r,i){try{const e=JSON.parse(i.toString());if(e&&e.SPHardwareDataType&&e.SPHardwareDataType.length){let t=e.SPHardwareDataType[0].boot_rom_version;t=t?t.split("(")[0].trim():null,n.version=t}}catch(e){o.noop()}e&&e(n),t(n)}))),g&&(n.vendor="Sun Microsystems",e&&e(n),t(n)),f)try{o.wmic("bios get /value").then(((r,i)=>{if(!i){let e=r.toString().split("\r\n");const t=o.getValue(e,"description","=");-1!==t.indexOf(" Version ")?(n.vendor=t.split(" Version ")[0].trim(),n.version=t.split(" Version ")[1].trim()):-1!==t.indexOf(" Ver: ")?(n.vendor=o.getValue(e,"manufacturer","="),n.version=t.split(" Ver: ")[1].trim()):(n.vendor=o.getValue(e,"manufacturer","="),n.version=o.getValue(e,"version","=")),n.releaseDate=o.getValue(e,"releasedate","="),n.releaseDate.length>=10&&(n.releaseDate=n.releaseDate.substr(0,4)+"-"+n.releaseDate.substr(4,2)+"-"+n.releaseDate.substr(6,2)),n.revision=o.getValue(e,"buildnumber","=")}e&&e(n),t(n)}))}catch(r){e&&e(n),t(n)}}))}))},t.baseboard=function(e){return new Promise((t=>{process.nextTick((()=>{let n={manufacturer:"",model:"",version:"",serial:"-",assetTag:"-",memMax:null,memSlots:null},s="";if(l||d||h||m){s="arm"===process.arch?"cat /proc/cpuinfo | grep Serial":"export LC_ALL=C; dmidecode -t 2 2>/dev/null; unset LC_ALL";const u=[];u.push(c(s)),u.push(c("export LC_ALL=C; dmidecode -t memory 2>/dev/null")),o.promiseAll(u).then((s=>{let c=s.results[0]?s.results[0].toString().split("\n"):[""];n.manufacturer=o.getValue(c,"Manufacturer"),n.model=o.getValue(c,"Product Name"),n.version=o.getValue(c,"Version"),n.serial=o.getValue(c,"Serial Number"),n.assetTag=o.getValue(c,"Asset Tag");try{c=a('echo -n "board_asset_tag: "; cat /sys/devices/virtual/dmi/id/board_asset_tag 2>/dev/null; echo;\n echo -n "board_name: "; cat /sys/devices/virtual/dmi/id/board_name 2>/dev/null; echo;\n echo -n "board_serial: "; cat /sys/devices/virtual/dmi/id/board_serial 2>/dev/null; echo;\n echo -n "board_vendor: "; cat /sys/devices/virtual/dmi/id/board_vendor 2>/dev/null; echo;\n echo -n "board_version: "; cat /sys/devices/virtual/dmi/id/board_version 2>/dev/null; echo;').toString().split("\n"),n.manufacturer=n.manufacturer?n.manufacturer:o.getValue(c,"board_vendor"),n.model=n.model?n.model:o.getValue(c,"board_name"),n.version=n.version?n.version:o.getValue(c,"board_version"),n.serial=n.serial?n.serial:o.getValue(c,"board_serial"),n.assetTag=n.assetTag?n.assetTag:o.getValue(c,"board_asset_tag")}catch(e){o.noop()}-1!==n.serial.toLowerCase().indexOf("o.e.m.")&&(n.serial="-"),-1!==n.assetTag.toLowerCase().indexOf("o.e.m.")&&(n.assetTag="-"),c=s.results[1]?s.results[1].toString().split("\n"):[""],n.memMax=1024*o.toInt(o.getValue(c,"Maximum Capacity"))*1024*1024||null,n.memSlots=o.toInt(o.getValue(c,"Number Of Devices"))||null;const u=r.readFileSync("/proc/cpuinfo").toString().split("\n");if(o.getValue(u,"hardware").startsWith("BCM")){const e=o.decodePiCpuinfo(u);n.manufacturer=e.manufacturer,n.model="Raspberry Pi",n.serial=e.serial,n.version=e.type+" - "+e.revision,n.memMax=i.totalmem(),n.memSlots=0}e&&e(n),t(n)}))}if(p){const r=[];r.push(c("ioreg -c IOPlatformExpertDevice -d 2")),r.push(c("system_profiler SPMemoryDataType")),o.promiseAll(r).then((r=>{let s=r.results[0]?r.results[0].toString().replace(/[<>"]/g,"").split("\n"):[""];n.manufacturer=o.getValue(s,"manufacturer","=",!0),n.model=o.getValue(s,"model","=",!0),n.version=o.getValue(s,"version","=",!0),n.serial=o.getValue(s,"ioplatformserialnumber","=",!0),n.assetTag=o.getValue(s,"board-id","=",!0);let a=r.results[1]?r.results[1].toString().split(" BANK "):[""];1===a.length&&(a=r.results[1]?r.results[1].toString().split(" DIMM"):[""]),a.shift(),n.memSlots=a.length,"arm64"===i.arch()&&(n.memSlots=0,n.memMax=i.totalmem()),e&&e(n),t(n)}))}if(g&&(e&&e(n),t(n)),f)try{const r=[];r.push(o.wmic("baseboard get /value")),r.push(o.wmic("memphysical get MaxCapacity, MemoryDevices\t/value")),o.promiseAll(r).then((r=>{let i=r.results[0]?r.results[0].toString().split("\r\n"):[""];n.manufacturer=o.getValue(i,"manufacturer","="),n.model=o.getValue(i,"model","="),n.model||(n.model=o.getValue(i,"product","=")),n.version=o.getValue(i,"version","="),n.serial=o.getValue(i,"serialnumber","="),n.assetTag=o.getValue(i,"partnumber","="),n.assetTag||(n.assetTag=o.getValue(i,"sku","=")),i=r.results[1]?r.results[1].toString().split("\r\n"):[""],n.memMax=o.toInt(o.getValue(i,"MaxCapacity","="))||null,n.memSlots=o.toInt(o.getValue(i,"MemoryDevices","="))||null,e&&e(n),t(n)}))}catch(r){e&&e(n),t(n)}}))}))},t.chassis=function(e){const t=["Other","Unknown","Desktop","Low Profile Desktop","Pizza Box","Mini Tower","Tower","Portable","Laptop","Notebook","Hand Held","Docking Station","All in One","Sub Notebook","Space-Saving","Lunch Box","Main System Chassis","Expansion Chassis","SubChassis","Bus Expansion Chassis","Peripheral Chassis","Storage Chassis","Rack Mount Chassis","Sealed-Case PC","Multi-System Chassis","Compact PCI","Advanced TCA","Blade","Blade Enclosure","Tablet","Concertible","Detachable","IoT Gateway ","Embedded PC","Mini PC","Stick PC"];return new Promise((n=>{process.nextTick((()=>{let r={manufacturer:"",model:"",type:"",version:"",serial:"-",assetTag:"-",sku:""};if(l||d||h||m){s('echo -n "chassis_asset_tag: "; cat /sys/devices/virtual/dmi/id/chassis_asset_tag 2>/dev/null; echo;\n echo -n "chassis_serial: "; cat /sys/devices/virtual/dmi/id/chassis_serial 2>/dev/null; echo;\n echo -n "chassis_type: "; cat /sys/devices/virtual/dmi/id/chassis_type 2>/dev/null; echo;\n echo -n "chassis_vendor: "; cat /sys/devices/virtual/dmi/id/chassis_vendor 2>/dev/null; echo;\n echo -n "chassis_version: "; cat /sys/devices/virtual/dmi/id/chassis_version 2>/dev/null; echo;',(function(i,s){let a=s.toString().split("\n");r.manufacturer=o.getValue(a,"chassis_vendor");const c=parseInt(o.getValue(a,"chassis_type").replace(/\D/g,""));r.type=c&&!isNaN(c)&&c<t.length?t[c-1]:"",r.version=o.getValue(a,"chassis_version"),r.serial=o.getValue(a,"chassis_serial"),r.assetTag=o.getValue(a,"chassis_asset_tag"),-1!==r.manufacturer.toLowerCase().indexOf("o.e.m.")&&(r.manufacturer="-"),-1!==r.version.toLowerCase().indexOf("o.e.m.")&&(r.version="-"),-1!==r.serial.toLowerCase().indexOf("o.e.m.")&&(r.serial="-"),-1!==r.assetTag.toLowerCase().indexOf("o.e.m.")&&(r.assetTag="-"),e&&e(r),n(r)}))}if(p&&s("ioreg -c IOPlatformExpertDevice -d 2",(function(t,i){if(!t){let e=i.toString().replace(/[<>"]/g,"").split("\n");r.manufacturer=o.getValue(e,"manufacturer","=",!0),r.model=o.getValue(e,"model","=",!0),r.version=o.getValue(e,"version","=",!0),r.serial=o.getValue(e,"ioplatformserialnumber","=",!0),r.assetTag=o.getValue(e,"board-id","=",!0)}e&&e(r),n(r)})),g&&(e&&e(r),n(r)),f)try{o.wmic("path Win32_SystemEnclosure get /value").then(((i,s)=>{if(!s){let e=i.toString().split("\r\n");r.manufacturer=o.getValue(e,"manufacturer","="),r.model=o.getValue(e,"model","=");const n=parseInt(o.getValue(e,"ChassisTypes","=").replace(/\D/g,""));r.type=n&&!isNaN(n)&&n<t.length?t[n-1]:"",r.version=o.getValue(e,"version","="),r.serial=o.getValue(e,"serialnumber","="),r.assetTag=o.getValue(e,"partnumber","="),r.sku=o.getValue(e,"sku","="),-1!==r.manufacturer.toLowerCase().indexOf("o.e.m.")&&(r.manufacturer="-"),-1!==r.version.toLowerCase().indexOf("o.e.m.")&&(r.version="-"),-1!==r.serial.toLowerCase().indexOf("o.e.m.")&&(r.serial="-"),-1!==r.assetTag.toLowerCase().indexOf("o.e.m.")&&(r.assetTag="-")}e&&e(r),n(r)}))}catch(t){e&&e(r),n(r)}}))}))}},3932:(e,t,n)=>{"use strict";const r=n(3129).exec,i=n(1453);let o=process.platform;const s="linux"===o,a="darwin"===o,c="win32"===o,u="freebsd"===o,l="openbsd"===o,p="netbsd"===o,f="sunos"===o;function d(e){const t={},n=e.split("\n");if(n&&n.length&&n[0].indexOf("Device")>=0){const e=n[0].split(" ");t.bus=parseInt(e[0],10),e[2]?t.deviceId=parseInt(e[2],10):t.deviceId=null}else t.bus=null,t.deviceId=null;const r=i.getValue(n,"idVendor"," ",!0).trim();let o=r.split(" ");o.shift();const s=o.join(" "),a=i.getValue(n,"idProduct"," ",!0).trim();let c=a.split(" ");c.shift();const u=c.join(" ");let l=i.getValue(n,"bInterfaceClass"," ",!0).trim().split(" ");l.shift();const p=l.join(" ");let f=i.getValue(n,"iManufacturer"," ",!0).trim().split(" ");f.shift();const d=f.join(" ");return t.id=(r.startsWith("0x")?r.split(" ")[0].substr(2,10):"")+":"+(a.startsWith("0x")?a.split(" ")[0].substr(2,10):""),t.name=u,t.type=function(e,t){let n=e;const r=(t+" "+e).toLowerCase();return r.indexOf("camera")>=0?n="Camera":r.indexOf("hub")>=0?n="Hub":r.indexOf("keybrd")>=0||r.indexOf("keyboard")>=0?n="Keyboard":r.indexOf("mouse")>=0?n="Mouse":r.indexOf("stora")>=0?n="Storage":r.indexOf("mic")>=0?n="Microphone":(r.indexOf("headset")>=0||r.indexOf("audio")>=0)&&(n="Audio"),n}(p,u),t.removable=null,t.vendor=s,t.manufacturer=d,t.maxPower=i.getValue(n,"MaxPower"," ",!0),t.serialNumber=null,t}function h(e,t){const n={};n.id=t;let r=(e=(e=e.replace(/ \|/g,"")).trim()).split("\n");r.shift();try{for(let e=0;e<r.length;e++)r[e]=r[e].trim(),r[e]=r[e].replace(/=/g,":"),"{"!==r[e]&&"}"!==r[e]&&r[e+1]&&"}"!==r[e+1].trim()&&(r[e]=r[e]+","),r[e]=r[e].replace(": Yes,",': "Yes",'),r[e]=r[e].replace(": No,",': "No",');const e=JSON.parse(r.join("\n")),t="yes"!==e["Built-In"].toLowerCase()&&"no"===e["non-removable"].toLowerCase();return n.bus=null,n.deviceId=null,n.id=e["USB Address"]||null,n.name=e.kUSBProductString||e["USB Product Name"]||null,n.type=function(e){let t="";return e.indexOf("camera")>=0?t="Camera":e.indexOf("touch bar")>=0?t="Touch Bar":e.indexOf("controller")>=0?t="Controller":e.indexOf("headset")>=0?t="Audio":e.indexOf("keyboard")>=0?t="Keyboard":e.indexOf("trackpad")>=0?t="Trackpad":e.indexOf("sensor")>=0?t="Sensor":e.indexOf("bthusb")>=0||e.indexOf("bth")>=0||e.indexOf("rfcomm")>=0?t="Bluetooth":e.indexOf("usbhub")>=0||e.indexOf(" hub")>=0?t="Hub":e.indexOf("mouse")>=0?t="Mouse":e.indexOf("mic")>=0?t="Microphone":e.indexOf("removable")>=0&&(t="Storage"),t}((e.kUSBProductString||e["USB Product Name"]||"").toLowerCase()+(t?" removable":"")),n.removable="no"===e["non-removable"].toLowerCase(),n.vendor=e.kUSBVendorString||e["USB Vendor Name"]||null,n.manufacturer=e.kUSBVendorString||e["USB Vendor Name"]||null,n.maxPower=null,n.serialNumber=e.kUSBSerialNumberString||null,n.name?n:null}catch(e){return null}}function m(e,t){const n=function(e,t){let n="";return t.indexOf("storage")>=0||t.indexOf("speicher")>=0?n="Storage":e.indexOf("usbhub")>=0?n="Hub":e.indexOf("storage")>=0?n="Storage":e.indexOf("usbcontroller")>=0?n="Controller":e.indexOf("keyboard")>=0?n="Keyboard":e.indexOf("pointing")>=0?n="Mouse":e.indexOf("disk")>=0&&(n="Storage"),n}(i.getValue(e,"CreationClassName","=").toLowerCase(),i.getValue(e,"name","=").toLowerCase());if(n){const r={bus:null};return r.deviceId=i.getValue(e,"deviceid","="),r.id=t,r.name=i.getValue(e,"name","="),r.type=n,r.removable=null,r.vendor=null,r.manufacturer=i.getValue(e,"Manufacturer","="),r.maxPower=null,r.serialNumber=null,r}return null}t.usb=function(e){return new Promise((t=>{process.nextTick((()=>{let n=[];if(s){r("export LC_ALL=C; lsusb -v 2>/dev/null; unset LC_ALL",{maxBuffer:134217728},(function(r,i){if(!r){const e=("\n\n"+i.toString()).split("\n\nBus ");for(let t=1;t<e.length;t++){const r=d(e[t]);n.push(r)}}e&&e(n),t(n)}))}if(a){r("ioreg -p IOUSB -c AppleUSBRootHubDevice -w0 -l",{maxBuffer:134217728},(function(r,i){if(!r){const r=i.toString().split(" +-o ");for(let e=1;e<r.length;e++){const t=h(r[e]);t&&n.push(t)}e&&e(n),t(n)}e&&e(n),t(n)}))}c&&i.wmic("Path CIM_LogicalDevice where \"Description like 'USB%'\" get /value",(function(r,i){if(!r){const e=i.toString().split(/\n\s*\n/);for(let t=0;t<e.length;t++){const r=m(e[t].split("\n"),t);r&&n.push(r)}}e&&e(n),t(n)})),(f||u||l||p)&&t(null)}))}))}},840:(e,t,n)=>{"use strict";const r=n(3129).exec,i=n(1453);let o=process.platform;const s="linux"===o,a="darwin"===o,c="win32"===o,u="freebsd"===o,l="openbsd"===o,p="netbsd"===o,f="sunos"===o;let d={dateFormat:"",dateSeperator:"",timeFormat:"",timeSeperator:"",amDesignator:"",pmDesignator:""};function h(e,t){let n=[],r=[],i={},o=!0,s=[],a=[],c={},u=!0;return e.forEach((function(e){if("---"===e)u=!1;else{let t=e.replace(/ +/g," ").split(" ");u?r.push({user:t[0],tty:t[1],date:t[2],time:t[3],ip:t&&t.length>4?t[4].replace(/\(/g,"").replace(/\)/g,""):""}):o?(s=t,s.forEach((function(t){a.push(e.indexOf(t))})),o=!1):(i.user=e.substring(a[0],a[1]-1).trim(),i.tty=e.substring(a[1],a[2]-1).trim(),i.ip=e.substring(a[2],a[3]-1).replace(/\(/g,"").replace(/\)/g,"").trim(),i.command=e.substring(a[7],1e3).trim(),c=r.filter((function(e){return e.user.substring(0,8).trim()===i.user&&e.tty===i.tty})),1===c.length&&n.push({user:c[0].user,tty:c[0].tty,date:c[0].date,time:c[0].time,ip:c[0].ip,command:i.command}))}})),0===n.length&&2===t?r:n}function m(e){let t=[],n=[],r={},i={},o=!0;return e.forEach((function(e){if("---"===e)o=!1;else{let s=e.replace(/ +/g," ").split(" ");o?n.push({user:s[0],tty:s[1],date:(new Date).getFullYear()+"-"+("0"+("JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC".indexOf(s[2].toUpperCase())/3+1)).slice(-2)+"-"+("0"+s[3]).slice(-2),time:s[4]}):(r.user=s[0],r.tty=s[1],r.ip="-"!==s[2]?s[2]:"",r.command=s.slice(5,1e3).join(" "),i=n.filter((function(e){return e.user===r.user&&(e.tty.substring(3,1e3)===r.tty||e.tty===r.tty)})),1===i.length&&t.push({user:i[0].user,tty:i[0].tty,date:i[0].date,time:i[0].time,ip:r.ip,command:r.command}))}})),t}t.users=function(e){return new Promise((t=>{process.nextTick((()=>{let n=[];if(s&&r('who --ips; echo "---"; w | tail -n +2',(function(i,o){if(i)e&&e(n),t(n);else{let i=o.toString().split("\n");n=h(i,1),0===n.length?r('who; echo "---"; w | tail -n +2',(function(r,o){r||(i=o.toString().split("\n"),n=h(i,2)),e&&e(n),t(n)})):(e&&e(n),t(n))}})),(u||l||p)&&r('who; echo "---"; w -ih',(function(r,i){if(!r){let e=i.toString().split("\n");n=m(e)}e&&e(n),t(n)})),f&&r('who; echo "---"; w -h',(function(r,i){if(!r){let e=i.toString().split("\n");n=m(e)}e&&e(n),t(n)})),a&&r('who; echo "---"; w -ih',(function(r,i){if(!r){let e=i.toString().split("\n");n=m(e)}e&&e(n),t(n)})),c)try{r("query user",i.execOptsWin,(function(r,o){if(o){let r=o.toString().split("\r\n");new Promise((e=>{process.nextTick((()=>{d.dateFormat?e(d):i.powerShell("(get-culture).DateTimeFormat").then((t=>{let n=t.toString().split("\r\n");d.dateFormat=i.getValue(n,"ShortDatePattern",":"),d.dateSeperator=i.getValue(n,"DateSeparator",":"),d.timeFormat=i.getValue(n,"ShortTimePattern",":"),d.timeSeperator=i.getValue(n,"TimeSeparator",":"),d.amDesignator=i.getValue(n,"AMDesignator",":"),d.pmDesignator=i.getValue(n,"PMDesignator",":"),e(d)})).catch((()=>{e(d)}))}))})).then((o=>{n=function(e,t){let n=[];const r=e[0],o=[];if(r){const s=" "===r[0]?1:0;o.push(s-1);let a=0;for(let e=s+1;e<r.length;e++)" "!==r[e]||" "!==r[e-1]&&"."!==r[e-1]?a&&(o.push(a),a=0):a=e;for(let r=1;r<e.length;r++)if(e[r].trim()){const s=e[r].substring(o[0]+1,o[1]).trim()||"",a=e[r].substring(o[1]+1,o[2]-2).trim()||"",c=i.parseDateTime(e[r].substring(o[5]+1,2e3).trim(),t)||"";n.push({user:s,tty:a,date:c.date,time:c.time,ip:"",command:""})}}return n}(r,o),e&&e(n),t(n)}))}else e&&e(n),t(n)}))}catch(r){e&&e(n),t(n)}}))}))}},1453:(e,t,n)=>{"use strict";const r=n(2087),i=n(5747),o=n(5622),s=n(3129).spawn,a=n(3129).exec,c=n(3129).execSync,u=n(1669);let l=process.platform;const p="linux"===l,f="darwin"===l,d="win32"===l,h="freebsd"===l,m="openbsd"===l,g="netbsd"===l;let v=0,y="",_="";const E=process.env.WINDIR||"C:\\Windows",b={windowsHide:!0,maxBuffer:2048e4,encoding:"UTF-8",env:u._extend({},process.env,{LANG:"en_US.UTF-8"})};const w=(new String).replace,S=(new String).toLowerCase,I=(new String).toString,C=(new String).substr,x=(new String).trim,O=(new String).startsWith,T=Math.min;function A(e,t,n,r){n=n||":",t=t.toLowerCase(),r=r||!1;for(let i=0;i<e.length;i++){let o=e[i].toLowerCase().replace(/\t/g,"");if(r&&(o=o.trim()),o.startsWith(t)){const t=r?e[i].trim().split(n):e[i].split(n);return t.length>=2?(t.shift(),t.join(n).trim()):""}}return""}function N(){if("Windows_NT"===r.type()&&!y&&(y=E+"\\system32\\wbem\\wmic.exe",!i.existsSync(y)))try{const e=c("WHERE WMIC",b).toString().split("\r\n");y=e&&e.length?e[0]:"wmic"}catch(e){y="wmic"}return y}t.toInt=function(e){let t=parseInt(e,10);return isNaN(t)&&(t=0),t},t.execOptsWin=b,t.getCodepage=function(){if(d){if(!_)try{const e=c("chcp",b),t=e.toString().split("\r\n")[0].split(":");_=t.length>1?t[1].replace(".",""):""}catch(e){_="437"}return _}if(p||f||h||m||g){if(!_)try{const e=c("echo $LANG"),t=e.toString().split("\r\n")[0].split(".");_=t.length>1?t[1].trim():"",_||(_="UTF-8")}catch(e){_="UTF-8"}return _}},t.execWin=function(e,t,n){n||(n=t,t=b),a("chcp 65001 > nul && cmd /C "+e+" && chcp "+_+" > nul",t,(function(e,t){n(e,t)}))},t.isFunction=function(e){return e&&"[object Function]"==={}.toString.call(e)},t.unique=function(e){let t=[],n={};for(let r=0;r<e.length;r++){let i=Object.keys(e[r]);i.sort((function(e,t){return e-t}));let o="";for(let t=0;t<i.length;t++)o+=JSON.stringify(i[t]),o+=JSON.stringify(e[r][i[t]]);({}).hasOwnProperty.call(n,o)||(t.push(e[r]),n[o]=!0)}return t},t.sortByKey=function(e,t){return e.sort((function(e,n){let r="",i="";return t.forEach((function(t){r+=e[t],i+=n[t]})),r<i?-1:r>i?1:0}))},t.cores=function(){return 0===v&&(v=r.cpus().length),v},t.getValue=A,t.decodeEscapeSequence=function(e,t){return t=t||16,e.replace(/\\x([0-9A-Fa-f]{2})/g,(function(){return String.fromCharCode(parseInt(arguments[1],t))}))},t.parseDateTime=function(e,t){const n={date:"",time:""};let r=((t=t||{}).dateFormat||"").toLowerCase(),i=t.pmDesignator||"";const o=e.split(" ");if(o[0]){if(o[0].indexOf("/")>=0){const t=o[0].split("/");if(3===t.length)if(4===t[0].length)n.date=t[0]+"-"+("0"+t[1]).substr(-2)+"-"+("0"+t[2]).substr(-2);else if(2===t[2].length)r.indexOf("/d/")>-1||r.indexOf("/dd/"),n.date="20"+t[2]+"-"+("0"+t[1]).substr(-2)+"-"+("0"+t[0]).substr(-2);else{(e.toLowerCase().indexOf("pm")>-1||e.toLowerCase().indexOf("p.m.")>-1||e.toLowerCase().indexOf("p. m.")>-1||e.toLowerCase().indexOf("am")>-1||e.toLowerCase().indexOf("a.m.")>-1||e.toLowerCase().indexOf("a. m.")>-1||r.indexOf("/d/")>-1||r.indexOf("/dd/")>-1)&&0!==r.indexOf("dd/")?n.date=t[2]+"-"+("0"+t[0]).substr(-2)+"-"+("0"+t[1]).substr(-2):n.date=t[2]+"-"+("0"+t[1]).substr(-2)+"-"+("0"+t[0]).substr(-2)}}if(o[0].indexOf(".")>=0){const e=o[0].split(".");3===e.length&&(r.indexOf(".d.")>-1||r.indexOf(".dd.")>-1?n.date=e[2]+"-"+("0"+e[0]).substr(-2)+"-"+("0"+e[1]).substr(-2):n.date=e[2]+"-"+("0"+e[1]).substr(-2)+"-"+("0"+e[0]).substr(-2))}if(o[0].indexOf("-")>=0){const e=o[0].split("-");3===e.length&&(n.date=e[0]+"-"+("0"+e[1]).substr(-2)+"-"+("0"+e[2]).substr(-2))}}if(o[1]){o.shift();let e=o.join(" ");n.time=function(e,t){t=t||"";let n=0,r=0,i=function(e){let t="",n=0;return e.split("").forEach((e=>{e>="0"&&e<="9"?1===n&&n++:(0===n&&n++,1===n&&(t+=e))})),t}(e=e.toUpperCase()),o=e.split(i);if(o.length>=2){o[2]&&(o[1]+=o[2]);let e=o[1]&&o[1].toLowerCase().indexOf("pm")>-1||o[1].toLowerCase().indexOf("p.m.")>-1||o[1].toLowerCase().indexOf("p. m.")>-1||o[1].toLowerCase().indexOf("n")>-1||o[1].toLowerCase().indexOf("ch")>-1||o[1].toLowerCase().indexOf("ös")>-1||t&&o[1].toLowerCase().indexOf(t)>-1;return n=parseInt(o[0],10),r=parseInt(o[1],10),n=e&&n<12?n+12:n,("0"+n).substr(-2)+":"+("0"+r).substr(-2)}}(e,i)}return n},t.parseHead=function(e,t){let n=t>0,r=1,i=0,o=0,s=[];for(let a=0;a<e.length;a++)r<=t?(/\s/.test(e[a])&&!n&&(o=a-1,s.push({from:i,to:o+1,cap:e.substring(i,o+1)}),i=o+2,r++),n=" "===e[a]):(!/\s/.test(e[a])&&n&&(o=a-1,i<o&&s.push({from:i,to:o,cap:e.substring(i,o)}),i=o+1,r++),n=" "===e[a]);o=1e3,s.push({from:i,to:o,cap:e.substring(i,o)});let a=s.length;for(var c=0;c<a;c++)0===s[c].cap.replace(/\s/g,"").length&&c+1<a&&(s[c].to=s[c+1].to,s[c].cap=s[c].cap+s[c+1].cap,s.splice(c+1,1),a-=1);return s},t.findObjectByKey=function(e,t,n){for(let r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1},t.getWmic=N,t.wmic=function(e,t){return t=t||b,new Promise((n=>{process.nextTick((()=>{try{a(E+"\\system32\\chcp.com 65001 | "+N()+" "+e,t,(function(e,t){n(t,e)})).stdin.end()}catch(e){n("",e)}}))}))},t.darwinXcodeExists=function(){const e=i.existsSync("/Library/Developer/CommandLineTools/usr/bin/"),t=i.existsSync("/Applications/Xcode.app/Contents/Developer/Tools"),n=i.existsSync("/Library/Developer/Xcode/");return e||n||t},t.getVboxmanage=function(){return d?`"${process.env.VBOX_INSTALL_PATH||process.env.VBOX_MSI_INSTALL_PATH}\\VBoxManage.exe"`:"vboxmanage"},t.powerShell=function(e){let t="";return new Promise((n=>{process.nextTick((()=>{try{const i=s("powershell.exe",["-NoLogo","-InputFormat","Text","-NoExit","-ExecutionPolicy","Unrestricted","-Command","-"],{stdio:"pipe",windowsHide:!0,maxBuffer:2048e4,encoding:"UTF-8",env:u._extend({},process.env,{LANG:"en_US.UTF-8"})});if(i&&!i.pid&&i.on("error",(function(){n(t)})),i&&i.pid){i.stdout.on("data",(function(e){t+=e.toString("utf8")})),i.stderr.on("data",(function(){i.kill(),n(t)})),i.on("close",(function(){i.kill(),n(t)})),i.on("error",(function(){i.kill(),n(t)}));try{i.stdin.write(e+r.EOL),i.stdin.write("exit"+r.EOL),i.stdin.end()}catch(e){i.kill(),n(t)}}else n(t)}catch(e){n(t)}}))}))},t.execSafe=function(e,t,n){let r="";return n=n||{},new Promise((i=>{process.nextTick((()=>{try{const o=s(e,t,n);o&&!o.pid&&o.on("error",(function(){i(r)})),o&&o.pid?(o.stdout.on("data",(function(e){r+=e.toString()})),o.on("close",(function(){o.kill(),i(r)})),o.on("error",(function(){o.kill(),i(r)}))):i(r)}catch(e){i(r)}}))}))},t.nanoSeconds=function(){const e=process.hrtime();return Array.isArray(e)&&2===e.length?1e9*+e[0]+ +e[1]:0},t.countUniqueLines=function(e,t){t=t||"";const n=[];return e.forEach((e=>{e.startsWith(t)&&-1===n.indexOf(e)&&n.push(e)})),n.length},t.countLines=function(e,t){t=t||"";const n=[];return e.forEach((e=>{e.startsWith(t)&&n.push(e)})),n.length},t.noop=function(){},t.isRaspberry=function(){let e=[];try{e=i.readFileSync("/proc/cpuinfo",{encoding:"utf8"}).toString().split("\n")}catch(e){return!1}const t=A(e,"hardware");return t&&["BCM2708","BCM2709","BCM2710","BCM2711","BCM2835","BCM2836","BCM2837","BCM2837B0"].indexOf(t)>-1},t.isRaspbian=function(){let e=[];try{e=i.readFileSync("/etc/os-release",{encoding:"utf8"}).toString().split("\n")}catch(e){return!1}const t=A(e,"id","=");return t&&t.indexOf("raspbian")>-1},t.sanitizeShellString=function(e,t=!1){const n=e||"";let r="";for(let e=0;e<=T(n.length,2e3);e++)void 0===n[e]||">"===n[e]||"<"===n[e]||"*"===n[e]||"?"===n[e]||"["===n[e]||"]"===n[e]||"|"===n[e]||"˚"===n[e]||"$"===n[e]||";"===n[e]||"&"===n[e]||"("===n[e]||")"===n[e]||"]"===n[e]||"#"===n[e]||"\\"===n[e]||"\t"===n[e]||"\n"===n[e]||"'"===n[e]||"`"===n[e]||'"'===n[e]||n[e].length>1||t&&"@"===n[e]||t&&" "===n[e]||t&&"{"==n[e]||t&&")"==n[e]||(r+=n[e]);return r},t.isPrototypePolluted=function(){const e="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";let t=!0,n="";n.__proto__.replace=w,n.__proto__.toLowerCase=S,n.__proto__.toString=I,n.__proto__.substr=C,t=t||!(62===e.length);const r=Date.now();if("number"==typeof r&&r>16e11){const i=r%100+15;for(let r=0;r<i;r++){const r=61.99999999*Math.random()+1,i=parseInt(Math.floor(r).toString(),10),o=parseInt(r.toString().split(".")[0],10),s=61.99999999*Math.random()+1,a=parseInt(Math.floor(s).toString(),10),c=parseInt(s.toString().split(".")[0],10);t=t&&!(r===s),t=t&&i===o&&a===c,n+=e[i-1]}t=t&&n.length===i;let o=Math.random()*i*.9999999999,s=n.substr(0,o)+" "+n.substr(o,2e3);s.__proto__.replace=w;let a=s.replace(/ /g,"");t=t&&n===a,o=Math.random()*i*.9999999999,s=n.substr(0,o)+"{"+n.substr(o,2e3),a=s.replace(/{/g,""),t=t&&n===a,o=Math.random()*i*.9999999999,s=n.substr(0,o)+"*"+n.substr(o,2e3),a=s.replace(/\*/g,""),t=t&&n===a,o=Math.random()*i*.9999999999,s=n.substr(0,o)+"$"+n.substr(o,2e3),a=s.replace(/\$/g,""),t=t&&n===a;const c=n.toLowerCase();t=t&&c.length===i&&c[i-1]&&!c[i];for(let e=0;e<i;e++){const r=n[e];r.__proto__.toLowerCase=S;const i=c?c[e]:"",o=r.toLowerCase();t=t&&o[0]===i&&o[0]&&!o[1]}}return!t},t.decodePiCpuinfo=function(e){const t={"0002":{type:"B",revision:"1.0",memory:256,manufacturer:"Egoman",processor:"BCM2835"},"0003":{type:"B",revision:"1.0",memory:256,manufacturer:"Egoman",processor:"BCM2835"},"0004":{type:"B",revision:"2.0",memory:256,manufacturer:"Sony UK",processor:"BCM2835"},"0005":{type:"B",revision:"2.0",memory:256,manufacturer:"Qisda",processor:"BCM2835"},"0006":{type:"B",revision:"2.0",memory:256,manufacturer:"Egoman",processor:"BCM2835"},"0007":{type:"A",revision:"2.0",memory:256,manufacturer:"Egoman",processor:"BCM2835"},"0008":{type:"A",revision:"2.0",memory:256,manufacturer:"Sony UK",processor:"BCM2835"},"0009":{type:"A",revision:"2.0",memory:256,manufacturer:"Qisda",processor:"BCM2835"},"000d":{type:"B",revision:"2.0",memory:512,manufacturer:"Egoman",processor:"BCM2835"},"000e":{type:"B",revision:"2.0",memory:512,manufacturer:"Sony UK",processor:"BCM2835"},"000f":{type:"B",revision:"2.0",memory:512,manufacturer:"Egoman",processor:"BCM2835"},"0010":{type:"B+",revision:"1.2",memory:512,manufacturer:"Sony UK",processor:"BCM2835"},"0011":{type:"CM1",revision:"1.0",memory:512,manufacturer:"Sony UK",processor:"BCM2835"},"0012":{type:"A+",revision:"1.1",memory:256,manufacturer:"Sony UK",processor:"BCM2835"},"0013":{type:"B+",revision:"1.2",memory:512,manufacturer:"Embest",processor:"BCM2835"},"0014":{type:"CM1",revision:"1.0",memory:512,manufacturer:"Embest",processor:"BCM2835"},"0015":{type:"A+",revision:"1.1",memory:256,manufacturer:"512MB\tEmbest",processor:"BCM2835"}},n=["BCM2835","BCM2836","BCM2837","BCM2711"],r=["Sony UK","Egoman","Embest","Sony Japan","Embest","Stadium"],i={"00":"A","01":"B","02":"A+","03":"B+","04":"2B","05":"Alpha (early prototype)","06":"CM1","08":"3B","09":"Zero","0a":"CM3","0c":"Zero W","0d":"3B+","0e":"3A+","0f":"Internal use only",10:"CM3+",11:"4B",13:"400",14:"CM4"},o=A(e,"revision",":",!0),s=A(e,"model:",":",!0),a=A(e,"serial",":",!0);let c={};if({}.hasOwnProperty.call(t,o))c={model:s,serial:a,revisionCode:o,memory:t[o].memory,manufacturer:t[o].manufacturer,processor:t[o].processor,type:t[o].type,revision:t[o].revision};else{const t=("00000000"+A(e,"revision",":",!0).toLowerCase()).substr(-8),l=parseInt((u=t.substr(2,1),("00000000"+parseInt(u,16).toString(2)).substr(-8)).substr(5,3),2)||0,p=r[parseInt(t.substr(3,1),10)],f=n[parseInt(t.substr(4,1),10)],d=t.substr(5,2);c={model:s,serial:a,revisionCode:o,memory:256*Math.pow(2,l),manufacturer:p,processor:f,type:{}.hasOwnProperty.call(i,d)?i[d]:"",revision:"1."+t.substr(7,1)}}var u;return c},t.promiseAll=function(e){const t=e.map((function(e){return new Promise((function(t){var n=new Array(2);e.then((function(e){n[0]=e})).catch((function(e){n[1]=e})).then((function(){t(n)}))}))}));var n=[],r=[];return Promise.all(t).then((function(e){return e.forEach((function(e){e[1]?(n.push(e[1]),r.push(null)):(n.push(null),r.push(e[0]))})),{errors:n,results:r}}))},t.promisify=function(e){return function(){var t=Array.prototype.slice.call(arguments);return new Promise((function(n,r){t.push((function(e,t){e?r(e):n(t)})),e.apply(null,t)}))}},t.linuxVersion=function(){let e="";if(p)try{e=c("uname -v").toString()}catch(t){e=""}return e},t.stringReplace=w,t.stringToLower=S,t.stringToString=I,t.stringSubstr=C,t.stringTrim=x,t.stringStartWith=O,t.mathMin=T,t.WINDIR=E,t.getFilesInPath=function(e){const t=i.lstatSync,n=i.readdirSync,r=o.join;function s(e){return t(e).isDirectory()}function a(e){return t(e).isFile()}return i.existsSync(e)?function e(t){return function(e){return n(e).map((function(t){return r(e,t)})).filter(s)}(t).map((function(t){return e(t)})).reduce((function(e,t){return e.concat(t)}),[]).concat(function(e){return n(e).map((function(t){return r(e,t)})).filter(a)}(t))}(e):[]}},4869:(e,t,n)=>{"use strict";const r=n(2087),i=n(3129).exec,o=n(1453);t.vboxInfo=function(e){let t=[];return new Promise((n=>{process.nextTick((()=>{try{i(o.getVboxmanage()+" list vms --long",(function(i,s){let a=(r.EOL+s.toString()).split(r.EOL+"Name:");a.shift(),a.forEach((e=>{const n=("Name:"+e).split(r.EOL),i=o.getValue(n,"State"),s=i.startsWith("running"),a=s?i.replace("running (since ","").replace(")","").trim():"";let c=0;try{if(s){const e=new Date(a),t=e.getTimezoneOffset();c=Math.round((Date.now()-Date.parse(e))/1e3)+60*t}}catch(e){o.noop()}const u=s?"":i.replace("powered off (since","").replace(")","").trim();let l=0;try{if(!s){const e=new Date(u),t=e.getTimezoneOffset();l=Math.round((Date.now()-Date.parse(e))/1e3)+60*t}}catch(e){o.noop()}t.push({id:o.getValue(n,"UUID"),name:o.getValue(n,"Name"),running:s,started:a,runningSince:c,stopped:u,stoppedSince:l,guestOS:o.getValue(n,"Guest OS"),hardwareUUID:o.getValue(n,"Hardware UUID"),memory:parseInt(o.getValue(n,"Memory size"," "),10),vram:parseInt(o.getValue(n,"VRAM size"),10),cpus:parseInt(o.getValue(n,"Number of CPUs"),10),cpuExepCap:o.getValue(n,"CPU exec cap"),cpuProfile:o.getValue(n,"CPUProfile"),chipset:o.getValue(n,"Chipset"),firmware:o.getValue(n,"Firmware"),pageFusion:"enabled"===o.getValue(n,"Page Fusion"),configFile:o.getValue(n,"Config file"),snapshotFolder:o.getValue(n,"Snapshot folder"),logFolder:o.getValue(n,"Log folder"),hpet:"enabled"===o.getValue(n,"HPET"),pae:"enabled"===o.getValue(n,"PAE"),longMode:"enabled"===o.getValue(n,"Long Mode"),tripleFaultReset:"enabled"===o.getValue(n,"Triple Fault Reset"),apic:"enabled"===o.getValue(n,"APIC"),x2Apic:"enabled"===o.getValue(n,"X2APIC"),acpi:"enabled"===o.getValue(n,"ACPI"),ioApic:"enabled"===o.getValue(n,"IOAPIC"),biosApicMode:o.getValue(n,"BIOS APIC mode"),bootMenuMode:o.getValue(n,"Boot menu mode"),bootDevice1:o.getValue(n,"Boot Device 1"),bootDevice2:o.getValue(n,"Boot Device 2"),bootDevice3:o.getValue(n,"Boot Device 3"),bootDevice4:o.getValue(n,"Boot Device 4"),timeOffset:o.getValue(n,"Time offset"),rtc:o.getValue(n,"RTC")})})),e&&e(t),n(t)}))}catch(r){e&&e(t),n(t)}}))}))}},2023:(e,t,n)=>{"use strict";const r=n(2087),i=n(3129).exec,o=n(3129).execSync,s=n(1453);let a=process.platform;const c="linux"===a,u="darwin"===a,l="win32"===a;function p(e){return parseFloat(e)/2-100}function f(e){const t=2*(parseFloat(e)+100);return t<=100?t:100}const d={1:2412,2:2417,3:2422,4:2427,5:2432,6:2437,7:2442,8:2447,9:2452,10:2457,11:2462,12:2467,13:2472,14:2484,32:5160,34:5170,36:5180,38:5190,40:5200,42:5210,44:5220,46:5230,48:5240,50:5250,52:5260,54:5270,56:5280,58:5290,60:5300,62:5310,64:5320,68:5340,96:5480,100:5500,102:5510,104:5520,106:5530,108:5540,110:5550,112:5560,114:5570,116:5580,118:5590,120:5600,122:5610,124:5620,126:5630,128:5640,132:5660,134:5670,136:5680,138:5690,140:5700,142:5710,144:5720,149:5745,151:5755,153:5765,155:5775,157:5785,159:5795,161:5805,165:5825,169:5845,173:5865,183:4915,184:4920,185:4925,187:4935,188:4940,189:4945,192:4960,196:4980};function h(e){return{}.hasOwnProperty.call(d,e)?d[e]:null}function m(e){let t=0;for(let n in d)({}).hasOwnProperty.call(d,n)&&d[n]===e&&(t=s.toInt(n));return t}function g(){const e=[];try{const t=o("iw dev").toString().split("\n").map((e=>e.trim())).join("\n").split("\nInterface ");return t.shift(),t.forEach((t=>{const n=t.split("\n"),r=n[0],i=s.toInt(s.getValue(n,"ifindex"," ")),o=s.getValue(n,"addr"," "),a=s.toInt(s.getValue(n,"channel"," "));e.push({id:i,iface:r,mac:o,channel:a})})),e}catch(e){return[]}}function v(e){const t=`nmcli -t -f general,wifi-properties,capabilities,ip4,ip6 device show ${e} 2>/dev/null`;try{const n=o(t).toString().split("\n"),r=s.getValue(n,"GENERAL.CONNECTION");return{iface:e,type:s.getValue(n,"GENERAL.TYPE"),vendor:s.getValue(n,"GENERAL.VENDOR"),product:s.getValue(n,"GENERAL.PRODUCT"),mac:s.getValue(n,"GENERAL.HWADDR").toLowerCase(),ssid:"--"!==r?r:null}}catch(e){return{}}}function y(){const e=[];try{const t=o("nmcli -t -m multiline --fields active,ssid,bssid,mode,chan,freq,signal,security,wpa-flags,rsn-flags device wifi list 2>/dev/null",{maxBuffer:2048e4}).toString().split("ACTIVE:");return t.shift(),t.forEach((t=>{const n=(t="ACTIVE:"+t).split(r.EOL),i=s.getValue(n,"CHAN"),o=s.getValue(n,"FREQ").toLowerCase().replace("mhz","").trim(),a=s.getValue(n,"SECURITY").replace("(","").replace(")",""),c=s.getValue(n,"WPA-FLAGS").replace("(","").replace(")",""),u=s.getValue(n,"RSN-FLAGS").replace("(","").replace(")","");e.push({ssid:s.getValue(n,"SSID"),bssid:s.getValue(n,"BSSID").toLowerCase(),mode:s.getValue(n,"MODE"),channel:i?parseInt(i,10):null,frequency:o?parseInt(o,10):null,signalLevel:p(s.getValue(n,"SIGNAL")),quality:parseFloat(s.getValue(n,"SIGNAL")),security:a&&"none"!==a?a.split(" "):[],wpaFlags:c&&"none"!==c?c.split(" "):[],rsnFlags:u&&"none"!==u?u.split(" "):[]})})),e}catch(e){return[]}}function _(e){const t=[];try{let n=o(`export LC_ALL=C; iwlist ${e} scan 2>&1; unset LC_ALL`).toString().split(" Cell ");if(n[0].indexOf("resource busy")>=0)return-1;if(n.length>1){n.shift();for(let e=0;e<n.length;e++){const r=n[e].split("\n"),i=s.getValue(r,"channel",":",!0),o=r&&r.length&&r[0].indexOf("Address:")>=0?r[0].split("Address:")[1].trim().toLowerCase():"",a=s.getValue(r,"mode",":",!0),c=s.getValue(r,"frequency",":",!0),u=s.getValue(r,"Quality","=",!0).toLowerCase().split("signal level="),l=u.length>1?s.toInt(u[1]):0,p=l?f(l):0,d=s.getValue(r,"essid",":",!0),h=n[e].indexOf(" WPA ")>=0,m=n[e].indexOf("WPA2 ")>=0,g=[];h&&g.push("WPA"),m&&g.push("WPA2");const v=[];let y="";r.forEach((function(e){const t=e.trim().toLowerCase();if(t.indexOf("group cipher")>=0){y&&v.push(y);const e=t.split(":");e.length>1&&(y=e[1].trim().toUpperCase())}if(t.indexOf("pairwise cipher")>=0){const e=t.split(":");e.length>1&&(e[1].indexOf("tkip")?y=y?"TKIP/"+y:"TKIP":e[1].indexOf("ccmp")?y=y?"CCMP/"+y:"CCMP":e[1].indexOf("proprietary")&&(y=y?"PROP/"+y:"PROP"))}if(t.indexOf("authentication suites")>=0){const e=t.split(":");e.length>1&&(e[1].indexOf("802.1x")?y=y?"802.1x/"+y:"802.1x":e[1].indexOf("psk")&&(y=y?"PSK/"+y:"PSK"))}})),y&&v.push(y),t.push({ssid:d,bssid:o,mode:a,channel:i?s.toInt(i):null,frequency:c?s.toInt(c.replace(".","")):null,signalLevel:l,quality:p,security:g,wpaFlags:v,rsnFlags:[]})}}return t}catch(e){return-1}}t.wifiNetworks=function(e){return new Promise((t=>{process.nextTick((()=>{let n=[];if(c)if(n=y(),0===n.length)try{const r=o("export LC_ALL=C; iwconfig 2>/dev/null; unset LC_ALL").toString().split("\n\n");let i="";for(let e=0;e<r.length;e++)-1===r[e].indexOf("no wireless")&&""!==r[e].trim()&&(i=r[e].split(" ")[0]);if(i){const r=_(i);-1===r?setTimeout((function(r){const i=_(r);-1!=i&&(n=i),e&&e(n),t(n)}),4e3):(n=r,e&&e(n),t(n))}else e&&e(n),t(n)}catch(r){e&&e(n),t(n)}else e&&e(n),t(n);else if(u){i("/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s",{maxBuffer:2048e4},(function(i,o){const a=o.toString().split(r.EOL);if(a&&a.length>1){const e=s.parseHead(a[0],1);e.length>=7&&(a.shift(),a.forEach((t=>{if(t.trim()){const r=t.substring(e[3].from,e[3].to).trim(),i=r?parseInt(r,10):null,o=t.substring(e[2].from,e[2].to).trim(),s=t.substring(e[6].from,1e3).trim().split(" ");let a=[],c=[];s.forEach((e=>{if(e.indexOf("(")>0){const t=e.split("(");a.push(t[0]),c=c.concat(t[1].replace(")","").split(","))}})),c=Array.from(new Set(c)),n.push({ssid:t.substring(e[0].from,e[0].to).trim(),bssid:t.substring(e[1].from,e[1].to).trim().toLowerCase(),mode:"",channel:i,frequency:h(i),signalLevel:o?parseInt(o,10):null,quality:f(o),security:a,wpaFlags:c,rsnFlags:[]})}})))}e&&e(n),t(n)}))}else if(l){i("chcp 65001 && netsh wlan show networks mode=Bssid",s.execOptsWin,(function(i,o){const s=o.toString("utf8").split(r.EOL+r.EOL+"SSID ");s.shift(),s.forEach((e=>{const t=e.split(r.EOL);if(t&&t.length>=8&&t[0].indexOf(":")>=0){let e=t[4].split(":");e.shift(),e=e.join(":").trim().toLowerCase();const r=t[7].split(":").pop().trim(),i=t[5].split(":").pop().trim();n.push({ssid:t[0].split(":").pop().trim(),bssid:e,mode:"",channel:r?parseInt(r,10):null,frequency:h(r),signalLevel:p(i),quality:i?parseInt(i,10):null,security:[t[2].split(":").pop().trim()],wpaFlags:[t[3].split(":").pop().trim()],rsnFlags:[]})}})),e&&e(n),t(n)}))}else e&&e(n),t(n)}))}))},t.wifiConnections=function(e){return new Promise((t=>{process.nextTick((()=>{const n=[];if(c){const r=g(),i=y();r.forEach((e=>{const t=v(e.iface),r=function(e){const t=`wpa_cli -i ${e} status 2>&1`;try{const e=o(t).toString().split("\n"),n=s.toInt(s.getValue(e,"freq","="));return{ssid:s.getValue(e,"ssid","="),uuid:s.getValue(e,"uuid","="),security:s.getValue(e,"key_mgmt","="),freq:n,channel:m(n),bssid:s.getValue(e,"bssid","=").toLowerCase()}}catch(e){return{}}}(e.iface),a=t.ssid||r.ssid,c=i.filter((e=>e.ssid===a)),u=function(e){const t=`nmcli -t --show-secrets connection show ${e} 2>/dev/null`;try{const n=o(t).toString().split("\n"),r=s.getValue(n,"802-11-wireless.seen-bssids").toLowerCase();return{ssid:"--"!==e?e:null,uuid:s.getValue(n,"connection.uuid"),type:s.getValue(n,"connection.type"),autoconnect:"yes"===s.getValue(n,"connection.autoconnect"),security:s.getValue(n,"802-11-wireless-security.key-mgmt"),bssid:"--"!==r?r:null}}catch(e){return{}}}(a),l=c&&c.length&&c[0].channel?c[0].channel:r.channel?r.channel:null,p=c&&c.length&&c[0].bssid?c[0].bssid:r.bssid?r.bssid:null;a&&p&&n.push({id:e.id,iface:e.iface,model:t.product,ssid:a,bssid:c&&c.length&&c[0].bssid?c[0].bssid:r.bssid?r.bssid:null,channel:l,frequency:l?h(l):null,type:u.type?u.type:"802.11",security:u.security?u.security:r.security?r.security:null,signalLevel:c&&c.length&&c[0].signalLevel?c[0].signalLevel:null,txRate:null})})),e&&e(n),t(n)}else if(u){let r="system_profiler SPNetworkDataType";i(r,(function(o,a){const c=a.toString().split("\n\n Wi-Fi:\n\n");if(c.length>1){const o=c[1].split("\n\n")[0].split("\n"),a=s.getValue(o,"BSD Device Name",":",!0),u=s.getValue(o,"hardware",":",!0);r="/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I",i(r,(function(r,i){const c=i.toString().split("\n");if(o.length>10){const e=s.getValue(c,"ssid",":",!0),t=s.getValue(c,"bssid",":",!0),r=s.getValue(c,"link auth",":",!0),i=s.getValue(c,"lastTxRate",":",!0),o=s.getValue(c,"channel",":",!0).split(",")[0],l="802.11",p=s.toInt(s.getValue(c,"agrCtlRSSI",":",!0))-s.toInt(s.getValue(c,"agrCtlNoise",":",!0));e&&t&&n.push({id:"Wi-Fi",iface:a,model:u,ssid:e,bssid:t,channel:s.toInt(o),frequency:o?h(o):null,type:l,security:r,signalLevel:p,txRate:i})}e&&e(n),t(n)}))}}))}else if(l){i("netsh wlan show interfaces",s.execOptsWin,(function(r,i){const o=i.toString().split(":\r\n\r\n");o.shift(),o.forEach((e=>{const t=e.split("\r\n");if(t.length>=5){const e=t[0].indexOf(":")>=0?t[0].split(":")[1].trim():"",r=t[1].indexOf(":")>=0?t[1].split(":")[1].trim():"",i=t[2].indexOf(":")>=0?t[2].split(":")[1].trim():"",o=s.getValue(t,"SSID",":",!0),a=s.getValue(t,"BSSID",":",!0),c=s.getValue(t,"Signal",":",!0),u=s.getValue(t,"Radio type",":",!0)||s.getValue(t,"Type de radio",":",!0)||s.getValue(t,"Funktyp",":",!0)||null,l=s.getValue(t,"authentication",":",!0)||s.getValue(t,"Authentification",":",!0)||s.getValue(t,"Authentifizierung",":",!0)||null,p=s.getValue(t,"Channel",":",!0)||s.getValue(t,"Canal",":",!0)||s.getValue(t,"Kanal",":",!0)||null,f=s.getValue(t,"Transmit rate (mbps)",":",!0)||s.getValue(t,"Transmission (mbit/s)",":",!0)||s.getValue(t,"Empfangsrate (MBit/s)",":",!0)||null;r&&i&&o&&a&&n.push({id:i,iface:e,model:r,ssid:o,bssid:a,channel:s.toInt(p),frequency:p?h(p):null,type:u,security:l,signalLevel:c,txRate:s.toInt(f)||null})}})),e&&e(n),t(n)}))}else e&&e(n),t(n)}))}))},t.wifiInterfaces=function(e){return new Promise((t=>{process.nextTick((()=>{const n=[];if(c){g().forEach((e=>{const t=v(e.iface);n.push({id:e.id,iface:e.iface,model:t.product?t.product:null,vendor:t.vendor?t.vendor:null,mac:e.mac})})),e&&e(n),t(n)}else if(u){i("system_profiler SPNetworkDataType",(function(r,i){const o=i.toString().split("\n\n Wi-Fi:\n\n");if(o.length>1){const e=o[1].split("\n\n")[0].split("\n"),t=s.getValue(e,"BSD Device Name",":",!0),r=s.getValue(e,"MAC Address",":",!0),i=s.getValue(e,"hardware",":",!0);n.push({id:"Wi-Fi",iface:t,model:i,vendor:"",mac:r})}e&&e(n),t(n)}))}else if(l){i("netsh wlan show interfaces",s.execOptsWin,(function(r,i){const o=i.toString().split(":\r\n\r\n");o.shift(),o.forEach((e=>{const t=e.split("\r\n");if(t.length>=5){const e=t[0].indexOf(":")>=0?t[0].split(":")[1].trim():"",r=t[1].indexOf(":")>=0?t[1].split(":")[1].trim():"",i=t[2].indexOf(":")>=0?t[2].split(":")[1].trim():"",o=t[3].indexOf(":")>=0?t[3].split(":"):[];o.shift();const s=o.join(":").trim(),a=function(e){let t="";return(e=e.toLowerCase()).indexOf("intel")>=0?t="Intel":e.indexOf("realtek")>=0?t="Realtek":e.indexOf("qualcom")>=0?t="Qualcom":e.indexOf("broadcom")>=0?t="Broadcom":e.indexOf("cavium")>=0?t="Cavium":e.indexOf("cisco")>=0?t="Cisco":e.indexOf("marvel")>=0?t="Marvel":e.indexOf("zyxel")>=0?t="Zyxel":e.indexOf("melanox")>=0?t="Melanox":e.indexOf("d-link")>=0?t="D-Link":e.indexOf("tp-link")>=0?t="TP-Link":e.indexOf("asus")>=0?t="Asus":e.indexOf("linksys")>=0&&(t="Linksys"),t}(r);e&&r&&i&&s&&n.push({id:i,iface:e,model:r,vendor:a,mac:s})}})),e&&e(n),t(n)}))}else e&&e(n),t(n)}))}))}},702:e=>{"use strict";e.exports={i8:"5.6.12"}},6276:(e,t,n)=>{
/*!
* Tmp
*
* Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
*
* MIT Licensed
*/
const r=n(5747),i=n(2087),o=n(5622),s=n(6417),a={fs:r.constants,os:i.constants},c=n(984),u="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",l=/XXXXXX/,p=(a.O_CREAT||a.fs.O_CREAT)|(a.O_EXCL||a.fs.O_EXCL)|(a.O_RDWR||a.fs.O_RDWR),f="win32"===i.platform(),d=a.EBADF||a.os.errno.EBADF,h=a.ENOENT||a.os.errno.ENOENT,m=[],g=r.rmdirSync.bind(r),v=c.sync;let y=!1;function _(e,t){const n=A(e,t),i=n[0],o=n[1];try{P(i)}catch(e){return o(e)}let s=i.tries;!function e(){try{const t=N(i);r.stat(t,(function(n){if(!n)return s-- >0?e():o(new Error("Could not get a unique tmp filename, max tries reached "+t));o(null,t)}))}catch(e){o(e)}}()}function E(e){const t=A(e)[0];P(t);let n=t.tries;do{const e=N(t);try{r.statSync(e)}catch(t){return e}}while(n-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function b(e,t){const n=function(e){if(e&&!D(e))return t(e);t()};0<=e[0]?r.close(e[0],(function(){r.unlink(e[1],n)})):r.unlink(e[1],n)}function w(e){let t=null;try{0<=e[0]&&r.closeSync(e[0])}catch(e){if(!(n=e,M(n,-d,"EBADF")||D(e)))throw e}finally{try{r.unlinkSync(e[1])}catch(e){D(e)||(t=e)}}var n;if(null!==t)throw t}function S(e,t,n,r){const i=C(w,[t,e],r),o=C(b,[t,e],r,i);return n.keep||m.unshift(i),r?i:o}function I(e,t,n){const i=t.unsafeCleanup?c:r.rmdir.bind(r),o=C(t.unsafeCleanup?v:g,e,n),s=C(i,e,n,o);return t.keep||m.unshift(o),n?o:s}function C(e,t,n,r){let i=!1;return function o(s){if(!i){const a=r||o,c=m.indexOf(a);return c>=0&&m.splice(c,1),i=!0,n||e===g||e===v?e(t):e(t,s||function(){})}}}function x(e){let t=[],n=null;try{n=s.randomBytes(e)}catch(t){n=s.pseudoRandomBytes(e)}for(var r=0;r<e;r++)t.push(u[n[r]%u.length]);return t.join("")}function O(e){return null===e||T(e)||!e.trim()}function T(e){return void 0===e}function A(e,t){if("function"==typeof e)return[{},e];if(T(e))return[{},t];const n={};for(const t of Object.getOwnPropertyNames(e))n[t]=e[t];return[n,t]}function N(e){const t=e.tmpdir;if(!T(e.name))return o.join(t,e.dir,e.name);if(!T(e.template))return o.join(t,e.dir,e.template).replace(l,x(6));const n=[e.prefix?e.prefix:"tmp","-",process.pid,"-",x(12),e.postfix?"-"+e.postfix:""].join("");return o.join(t,e.dir,n)}function P(e){e.tmpdir=V(e);const t=e.tmpdir;if(T(e.name)||k(e.name,"name",t),T(e.dir)||k(e.dir,"dir",t),!T(e.template)&&(k(e.template,"template",t),!e.template.match(l)))throw new Error(`Invalid template, found "${e.template}".`);if(!T(e.tries)&&isNaN(e.tries)||e.tries<0)throw new Error(`Invalid tries, found "${e.tries}".`);e.tries=T(e.name)?e.tries||3:1,e.keep=!!e.keep,e.detachDescriptor=!!e.detachDescriptor,e.discardDescriptor=!!e.discardDescriptor,e.unsafeCleanup=!!e.unsafeCleanup,e.dir=T(e.dir)?"":o.relative(t,L(e.dir,t)),e.template=T(e.template)?void 0:o.relative(t,L(e.template,t)),e.template=O(e.template)?void 0:o.relative(e.dir,e.template),e.name=T(e.name)?void 0:R(e.name),e.prefix=T(e.prefix)?"":e.prefix,e.postfix=T(e.postfix)?"":e.postfix}function L(e,t){const n=R(e);return n.startsWith(t)?o.resolve(n):o.resolve(o.join(t,n))}function R(e){return O(e)?e:e.replace(/["']/g,"")}function k(e,t,n){if("name"===t){if(o.isAbsolute(e))throw new Error(`${t} option must not contain an absolute path, found "${e}".`);let n=o.basename(e);if(".."===n||"."===n||n!==e)throw new Error(`${t} option must not contain a path, found "${e}".`)}else{if(o.isAbsolute(e)&&!e.startsWith(n))throw new Error(`${t} option must be relative to "${n}", found "${e}".`);let r=L(e,n);if(!r.startsWith(n))throw new Error(`${t} option must be relative to "${n}", found "${r}".`)}}function D(e){return M(e,-h,"ENOENT")}function M(e,t,n){return f?e.code===n:e.code===n&&e.errno===t}function V(e){return o.resolve(R(e&&e.tmpdir||i.tmpdir()))}process.addListener("exit",(function(){if(y)for(;m.length;)try{m[0]()}catch(e){}})),Object.defineProperty(e.exports,"tmpdir",{enumerable:!0,configurable:!1,get:function(){return V()}}),e.exports.dir=function(e,t){const n=A(e,t),i=n[0],o=n[1];_(i,(function(e,t){if(e)return o(e);r.mkdir(t,i.mode||448,(function(e){if(e)return o(e);o(null,t,I(t,i,!1))}))}))},e.exports.dirSync=function(e){const t=A(e)[0],n=E(t);return r.mkdirSync(n,t.mode||448),{name:n,removeCallback:I(n,t,!0)}},e.exports.file=function(e,t){const n=A(e,t),i=n[0],o=n[1];_(i,(function(e,t){if(e)return o(e);r.open(t,p,i.mode||384,(function(e,n){if(e)return o(e);if(i.discardDescriptor)return r.close(n,(function(e){return o(e,t,void 0,S(t,-1,i,!1))}));{const e=i.discardDescriptor||i.detachDescriptor;o(null,t,n,S(t,e?-1:n,i,!1))}}))}))},e.exports.fileSync=function(e){const t=A(e)[0],n=t.discardDescriptor||t.detachDescriptor,i=E(t);var o=r.openSync(i,p,t.mode||384);return t.discardDescriptor&&(r.closeSync(o),o=void 0),{name:i,fd:o,removeCallback:S(i,n?-1:o,t,!0)}},e.exports.tmpName=_,e.exports.tmpNameSync=E,e.exports.setGracefulCleanup=function(){y=!0}},6291:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.LOCAL="LOCAL",e.CLOUD="CLOUD",e.VANILLA="VANILLA",e.VANILLA_KEYWORD="VANILLA_KEYWORD",e.LSP="LSP",e.UNKNOWN="UNKNOWN"}(n||(n={})),t.default=n},6817:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i=n(5104),o=n(7054),s=n(2478),a=n(7498),c=n(8083),u=n(4372),l=n(6136),p=n(4365);t.default=async function(e,t){await r.commands.executeCommand("setContext",p.CAPABILITY_KEY,!0),l.setAssistantMode(l.AssistantMode.Background);let n=!0;o.isCapabilityEnabled(o.Capability.ASSISTANT_BACKGROUND_CAPABILITY)||o.isCapabilityEnabled(o.Capability.ASSISTANT_PASTE_CAPABILITY)&&(n=!1,l.setAssistantMode(l.AssistantMode.Paste)),await r.commands.executeCommand("setContext",p.BACKGROUND_KEY,n);let f=e.globalState.get(p.ACTIVE_STATE_KEY,n);if(null==f&&(f=!0),function(e,t){e.subscriptions.push(r.commands.registerCommand(p.ASSISTANT_TOGGLE_COMMAND,(async()=>{const n=t?"Off":"On",o=`Please reload Visual Studio Code to turn Assistant ${n}.`;await r.window.showInformationMessage(o,"Reload Now")&&(i.default({[s.StatePayload.STATE]:{state_type:c.StateType.toggle,state:n}}),await e.globalState.update(p.ACTIVE_STATE_KEY,!t),r.commands.executeCommand("workbench.action.reloadWindow"))})))}(e,f),f){await c.downloadAssistantBinary()&&(t.dispose(),await a.default(e,t),e.subscriptions.push(r.commands.registerTextEditorCommand(p.ASSISTANT_SELECTION_COMMAND,((e,t,n)=>{u.assistantSelectionHandler(e,t,n)}))),e.subscriptions.push(r.commands.registerTextEditorCommand(p.ASSISTANT_IGNORE_COMMAND,((e,t,n)=>{u.assistantIgnoreHandler(e,t,n)}))),n&&e.subscriptions.push(r.commands.registerCommand(p.ASSISTANT_CLEAR_CACHE_COMMAND,u.assistantClearCacheHandler)),await r.commands.executeCommand("setContext",p.ENABLED_KEY,!0))}}},6167:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i=n(6136),o=n(4365);class s{provideCodeActions(e,t,n){const s=[];return n.diagnostics.filter((e=>e.code===o.TABNINE_DIAGNOSTIC_CODE)).forEach((t=>{t.choices.forEach((n=>{s.push(function(e,t,n){const{range:s}=t,a=`${n.message} '${n.value}'`,c=new r.CodeAction(a,r.CodeActionKind.QuickFix);c.edit=new r.WorkspaceEdit,c.edit.replace(e.uri,new r.Range(s.start,s.end),n.value),i.getAssistantMode()===i.AssistantMode.Paste&&t.references.forEach((t=>{var r;return null===(r=c.edit)||void 0===r?void 0:r.replace(e.uri,t,n.value)}));return c.diagnostics=[t],c.command={arguments:[{currentSuggestion:n,allSuggestions:t.choices,reference:t.reference,threshold:t.threshold}],command:o.ASSISTANT_SELECTION_COMMAND,title:"accept replacement"},c}(e,t,n))}));const n=new r.CodeAction("Ignore TabNine Assistant suggestions at this spot",r.CodeActionKind.QuickFix);n.command={arguments:[{allSuggestions:t.choices,reference:t.reference,threshold:t.threshold,responseId:t.responseId}],command:o.ASSISTANT_IGNORE_COMMAND,title:"ignore replacement"},s.push(n)})),s}}t.default=s,s.providedCodeActionKinds=[r.CodeActionKind.QuickFix]},4372:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assistantIgnoreHandler=t.assistantSelectionHandler=t.assistantClearCacheHandler=void 0;const r=n(7549),i=n(5104),o=n(6291),s=n(2478),a=n(8083),c=n(6835),u=n(7007),l=n(3934),p=n(4365),f=n(7498);function d(e,t,n,r,i,s=!1,a){let c=n.findIndex((e=>e===t));-1===c&&(c=n.length);const u=n.map((e=>({length:e.value.length,strength:h(e),origin:o.default.CLOUD}))),{length:l}=t.value,p=t.value,f=h(t),d=o.default.CLOUD;return{AssistantSelection:{language:e.document.fileName.split(".").pop()||"",length:l,strength:f,origin:d,index:c,threshold:i,num_of_suggestions:n.length,suggestions:u,selected_suggestion:p,reference:r,reference_length:r.length,is_ignore:s,assistant_version:a}}}function h(e){return`${e.score}%`}t.assistantClearCacheHandler=async function(){await c.default(),i.default({[s.StatePayload.STATE]:{state_type:a.StateType.clearCache}})},t.assistantSelectionHandler=async function(e,t,{currentSuggestion:n,allSuggestions:o,reference:s,threshold:a}){try{f.setDecorators([]),await r.commands.executeCommand(p.ASSISTANT_IGNORE_REFRESH_COMMAND);const t=d(e,n,o,s,a,!1,await l.getAssistantVersion());i.default(t)}catch(e){console.error(e)}},t.assistantIgnoreHandler=async function(e,t,{allSuggestions:n,reference:o,threshold:s,responseId:a}){try{await u.default(a),f.setDecorators([]);const t=await l.getAssistantVersion();r.commands.executeCommand(p.ASSISTANT_IGNORE_REFRESH_COMMAND);const c=d(e,{value:"__IGNORE__",score:0,message:""},n,o,s,!0,t);i.default(c)}catch(e){console.error(e)}}},6136:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.getAssistantMode=t.setAssistantMode=t.AssistantMode=void 0,function(e){e[e.Background=0]="Background",e[e.Paste=1]="Paste"}(n=t.AssistantMode||(t.AssistantMode={}));let r=n.Background;t.setAssistantMode=function(e){r=e},t.getAssistantMode=function(){return r}},9158:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4017),i=n(1058),o=n(9688);t.default=class{constructor(){this.numRestarts=0,this.childDead=!1,this.mutex=new r.Mutex,this.resolveMap=new Map,this.isShutdown=!1,this.restartChild()}async post(e,t,n=1e4){var r,i;const o=await this.mutex.acquire();try{this.isChildAlive()||this.restartChild();const s=`${JSON.stringify(e)}\n`;return null===(i=null===(r=this.proc)||void 0===r?void 0:r.stdin)||void 0===i||i.write(s,"utf8"),await new Promise(((e,r)=>{this.resolveMap.set(t,e),setTimeout((()=>{this.resolveMap.delete(t),r(new Error("Timeout"))}),n)}))}catch(e){return void console.log(`interacting with tabnine assistant: ${e}`)}finally{o()}}get shutdowned(){return this.isShutdown}set shutdowned(e){this.isShutdown=e}isChildAlive(){return!!this.proc&&!this.childDead}onChildDeath(){this.childDead=!0,setTimeout((()=>{this.isChildAlive()||this.restartChild()}),1e4)}restartChild(){var e,t;this.numRestarts>=10||(this.numRestarts+=1,this.proc&&this.proc.kill(),this.proc=o.default(),this.childDead=!1,this.proc.on("exit",(()=>{this.shutdowned||this.onChildDeath()})),null===(e=this.proc.stdin)||void 0===e||e.on("error",(e=>{console.log("assistant binary stdin error: ",e),this.onChildDeath()})),null===(t=this.proc.stdout)||void 0===t||t.on("error",(e=>{console.log("assistant binary stdout error:",e),this.onChildDeath()})),this.proc.unref(),this.rl=i.createInterface({input:this.proc.stdout,output:this.proc.stdin}),this.rl.on("line",(e=>{const t=JSON.parse(e),{id:n}=t,{body:r}=t,i=this.resolveMap.get(n);i&&(i(r),this.resolveMap.delete(n))})))}}},3847:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this.cancelled=!1,this.callbacks=[]}isCancelled(){return this.cancelled}cancel(){this.isCancelled()||(this.cancelled=!0,this.callbacks.forEach((([e,t])=>e(t))))}reset(){this.cancelled=!1,this.callbacks=[]}registerCallback(e,...t){this.isCancelled()?e(...t):this.callbacks.push([e,t])}}},9064:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentValidator=void 0;const r=n(6151),i=n(6394);class o{constructor(e,t){this.validLanguages=e,this.validExtensions=t}isValid(e){var t,n;const{fileName:r}=e,i=`.${(null==r?void 0:r.split(".").pop())||""}`;return(null===(t=this.validExtensions)||void 0===t?void 0:t.includes(i))&&(null===(n=this.validLanguages)||void 0===n?void 0:n.includes(e.languageId))}}t.DocumentValidator=o,t.default=async function(){const e=await i.default(),t=await r.default();return new o(e,t)}},6680:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549);class i extends r.Diagnostic{constructor(e,t,n,r,i,o,s,a,c){super(e,t,c),this.choices=[],this.references=[],this.choices=n,this.reference=r,this.references=i,this.assistantRange=o,this.responseId=s,this.threshold=a}}t.default=i},7498:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setDecorators=void 0;const r=n(7549),i=n(4017),o=n(3847),s=n(6136),a=n(8083),c=n(5104),u=n(9064),l=n(8967),p=n(1785),f=n(6167),d=n(6394),h=n(6680),m=n(4365),g=n(3226),v=r.window.createTextEditorDecorationType({border:"#3794FF 2px",borderStyle:"none none solid none"}),y=new Map;function _(e){const t=r.window.activeTextEditor,n=(null==e?void 0:e.map((({range:e})=>({range:e}))))||[];t&&t.setDecorations(v,n)}function E(e,t=3e4){(null==e?void 0:e.length)&&r.window.setStatusBarMessage(`${e}`,t)}t.setDecorators=_;const b=new i.Mutex,w=new o.default;async function S(e,t,n){var i;w.cancel();const o=await b.acquire();w.reset(),w.registerCallback(E);try{let u=0;const p=function(e,t){const n=y.get(e.uri),i=t.reduce(((e,t)=>e.union(t)));return n&&i.intersection(new r.Range(n,i.end))}(e,n);if(!p)return;const f=e.offsetAt(p.start),d=e.offsetAt(p.end),v=s.getAssistantMode()===s.AssistantMode.Background?g.getBackgroundThreshold():m.PASTE_THRESHOLD,b=e.getText(),S=await a.getAPIKey();if(w.isCancelled())return;const I=await l.default(b,e.fileName,{start:f,end:d},v,m.EDIT_DISTANCE,S,w);if(w.isCancelled())return;const C=[];null==I||I.forEach((t=>{const n=t.completionList.filter((e=>e.value!==t.reference)),i=n.map((e=>`${e.message} '${e.value}'\t${e.score}%`));if(n.length>0){const o=t.references.filter((e=>e.start<t.range.start)),a=C.filter((e=>o.includes(e.assistantRange)));if(s.getAssistantMode()===s.AssistantMode.Background||0===o.length||o.length>0&&a.length>0){const o=new r.Range(e.positionAt(t.range.start),e.positionAt(t.range.end)),s=t.references.map((t=>new r.Range(e.positionAt(t.start),e.positionAt(t.end)))),a=new h.default(o,`${i.join("\n")}`,n,t.reference,s,t.range,t.responseId,v,r.DiagnosticSeverity.Information);a.code=m.TABNINE_DIAGNOSTIC_CODE,C.push(a),u+=1}}})),C.length>0&&c.default({ValidatorState:{num_of_diagnostics:C.length,num_of_locations:(null==I?void 0:I.length)||0}}),(null===(i=t.get(e.uri))||void 0===i?void 0:i.length)!==C.length&&(_(C),t.set(e.uri,C));const x=u?`${u}`:"";console.log(x),E("$(pass)")}catch(e){E(),console.error("tabnine assistant: error: ",e)}finally{o()}}const I=a.debounce(S);let C=null,x=!1;t.default=async function(e,t){const n=r.languages.createDiagnosticCollection("tabnine");e.subscriptions.push(n);const i=await u.default();var o,a;g.initAssistantThreshold(e),function(e,t,n){e.subscriptions.push(r.commands.registerCommand(m.ASSISTANT_IGNORE_REFRESH_COMMAND,(()=>{const e=r.window.activeTextEditor;if(e){const{document:r,visibleRanges:i}=e;t.isValid(r)&&(s.getAssistantMode()===s.AssistantMode.Paste?C&&S(r,n,[null==C?void 0:C.range]):S(r,n,i))}})))}(e,i,n),o=n,a=i,r.commands.registerCommand(m.ASSISTANT_MODE_TOGGLE_COMMAND,(()=>{w.cancel(),r.window.activeTextEditor&&o.delete(r.window.activeTextEditor.document.uri),_([]);const e=s.getAssistantMode()===s.AssistantMode.Background?s.AssistantMode.Paste:s.AssistantMode.Background;s.setAssistantMode(e),s.getAssistantMode()===s.AssistantMode.Paste?(r.window.showInformationMessage("tabnine assistant paste mode"),console.log("paste validation mode")):(r.window.showInformationMessage("tabnine assistant background mode"),console.log("background validation mode")),r.window.activeTextEditor&&a.isValid(r.window.activeTextEditor.document)&&function(e,t){s.getAssistantMode()===s.AssistantMode.Background?r.window.activeTextEditor&&S(e,t,r.window.activeTextEditor.visibleRanges):p.default(e.getText(),e.fileName)}(r.window.activeTextEditor.document,o)})),function(e,t,n){e.subscriptions.push(r.window.onDidChangeTextEditorVisibleRanges((e=>{s.getAssistantMode()===s.AssistantMode.Background&&t.isValid(e.textEditor.document)&&I(e.textEditor.document,n,e.textEditor.visibleRanges)})))}(e,i,n),t.dispose(),function(e,t,n){e.subscriptions.push(r.commands.registerCommand(m.PASTE_COMMAND,(async e=>{x=!0;const{start:i}=e.selection;await r.commands.executeCommand("editor.action.clipboardPasteAction");const{end:o}=e.selection;if(r.window.activeTextEditor){const{document:e}=r.window.activeTextEditor;if(!t.isValid(e)||s.getAssistantMode()===s.AssistantMode.Background)return void(x=!1);C={range:new r.Range(i,o),length:e.offsetAt(o)-e.offsetAt(i)},x=!1,n.delete(e.uri),_([]),S(e,n,[C.range])}})))}(e,i,n),function(e,t,n){e.subscriptions.push(r.workspace.onDidChangeTextDocument((e=>{var i;if(s.getAssistantMode()===s.AssistantMode.Paste&&!x&&n.isValid(e.document)){let n=null,o=0;if(e.contentChanges.forEach((e=>{(null===n||e.range.start.isBefore(n))&&(n=e.range.start),null!==C&&(!e.range.start.isAfterOrEqual(C.range.start)||!e.range.end.isBefore(C.range.end)||e.range.start.isEqual(C.range.start)&&e.range.end.isEqual(C.range.end)?C=null:o+=-e.rangeLength+(e.text.length||0))})),null!==n&&null!==C){const s=null===(i=t.get(e.document.uri))||void 0===i?void 0:i.filter((e=>e.range.end.isBefore(n)));if(t.set(e.document.uri,s),_(s),0!==o){const t=C.length+o,n=e.document.positionAt(e.document.offsetAt(C.range.start)+t);C={range:new r.Range(C.range.start,n),length:t}}I(e.document,t,[C.range])}else t.delete(e.document.uri),_([])}})))}(e,n,i),function(e,t,n){e.subscriptions.push(r.workspace.onDidChangeTextDocument((e=>{var i,o;if(s.getAssistantMode()===s.AssistantMode.Background&&n.isValid(e.document)&&e.contentChanges.length){const n=e.contentChanges.map((e=>e.range.start)).reduce(((e,t)=>null===e||t.isBefore(e)?t:e),null);if(null!==n){const r=null===(i=t.get(e.document.uri))||void 0===i?void 0:i.filter((e=>e.range.end.isBefore(n)));t.set(e.document.uri,r),(null===(o=t.get(e.document.uri))||void 0===o?void 0:o.length)!==(null==r?void 0:r.length)&&_(r),y.has(e.document.uri)||y.set(e.document.uri,n)}else t.delete(e.document.uri),_([]);r.window.activeTextEditor&&I(r.window.activeTextEditor.document,t,r.window.activeTextEditor.visibleRanges)}})))}(e,n,i),async function(e){const t=await d.default();e.subscriptions.push(r.languages.registerCodeActionsProvider(t,new f.default,{providedCodeActionKinds:f.default.providedCodeActionKinds}))}(e)}},4703:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7054);t.default=function(){return r.isCapabilityEnabled(r.Capability.ASSISTANT_MODE_A_CAPABILITY_KEY)?"A":r.isCapabilityEnabled(r.Capability.ASSISTANT_MODE_B_CAPABILITY_KEY)?"B":"A"}},4365:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ASSISTANT_TOGGLE_COMMAND=t.ASSISTANT_SET_THRESHOLD_COMMAND=t.ASSISTANT_CLEAR_CACHE_COMMAND=t.PASTE_COMMAND=t.ASSISTANT_MODE_TOGGLE_COMMAND=t.ASSISTANT_IGNORE_REFRESH_COMMAND=t.ASSISTANT_IGNORE_COMMAND=t.ASSISTANT_SELECTION_COMMAND=t.EDIT_DISTANCE=t.PASTE_THRESHOLD=t.THRESHOLD_STATE_KEY=t.CAPABILITY_KEY=t.BACKGROUND_KEY=t.ENABLED_KEY=t.ACTIVE_STATE_KEY=t.TABNINE_DIAGNOSTIC_CODE=t.ASSISTANT_API_VERSION=void 0,t.ASSISTANT_API_VERSION="1.0.0",t.TABNINE_DIAGNOSTIC_CODE="tabnine",t.ACTIVE_STATE_KEY="tabnine-assistant-active",t.ENABLED_KEY="tabnine-assistant:enabled",t.BACKGROUND_KEY="tabnine-assistant:background",t.CAPABILITY_KEY="tabnine-assistant:capability",t.THRESHOLD_STATE_KEY="tabnine-assistant-threshold",t.PASTE_THRESHOLD="Paste",t.EDIT_DISTANCE=2,t.ASSISTANT_SELECTION_COMMAND="tabnine-assistant-select",t.ASSISTANT_IGNORE_COMMAND="tabnine-assistant-ignore",t.ASSISTANT_IGNORE_REFRESH_COMMAND="tabnine-assistant-ignore-refresh",t.ASSISTANT_MODE_TOGGLE_COMMAND="TabNine::assistantModeToggle",t.PASTE_COMMAND="TabNine::paste",t.ASSISTANT_CLEAR_CACHE_COMMAND="TabNine::assistantClearCache",t.ASSISTANT_SET_THRESHOLD_COMMAND="TabNine::assistantSetThreshold",t.ASSISTANT_TOGGLE_COMMAND="TabNine::assistantToggle"},3226:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBackgroundThreshold=t.initAssistantThreshold=void 0;const r=n(7549),i=n(6136),o=n(8083),s=n(5104),a=n(2478),c=n(4365);let u="Medium";t.initAssistantThreshold=function(e){u=e.workspaceState.get(c.THRESHOLD_STATE_KEY,u)||u,function(e){i.getAssistantMode()===i.AssistantMode.Background&&e.subscriptions.push(r.commands.registerCommand(c.ASSISTANT_SET_THRESHOLD_COMMAND,(async()=>{const t=u,n={canPickMany:!1,placeHolder:`Pick threshold (Currently: ${u})`},i=["Low","Medium","High"],l=await r.window.showQuickPick(i,n);l&&i.includes(l)&&(u=l,await e.workspaceState.update(c.THRESHOLD_STATE_KEY,u),s.default({[a.StatePayload.STATE]:{state_type:o.StateType.threshold,state:JSON.stringify({from:t,to:u})}}),r.commands.executeCommand(c.ASSISTANT_IGNORE_REFRESH_COMMAND))})))}(e)},t.getBackgroundThreshold=function(){return u}},6835:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3934);t.default=function(){const e={method:"clear_cache",params:{}};return r.request(e)}},8967:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4703),i=n(3934);t.default=function(e,t,n,o,s,a,c){const u={method:"get_assistant_diagnostics",params:{code:e,fileName:t,visibleRange:n,mode:r.default(),threshold:o,editDistance:s,apiKey:a}};return i.request(u,c)}},1785:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3934);t.default=function(e,t){const n={method:"get_compiler_diagnostics",params:{code:e,fileName:t}};return r.request(n)}},6151:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3934);t.default=function(){const e={method:"get_valid_extensions",params:{}};return r.request(e)}},6394:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3934);t.default=function(){const e={method:"get_valid_languages",params:{}};return r.request(e)}},3934:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closeAssistant=t.request=t.getAssistantVersion=void 0;const r=n(9158),i=n(4365),o=n(8083);let s,a=null;async function c(e,t){if(null===a&&(a=new r.default),!a.shutdowned)return new Promise(((n,r)=>{const s=o.getNanoSecTime();null==t||t.registerCallback(n,void 0),null==a||a.post({...e,id:s,version:i.ASSISTANT_API_VERSION},s).then(n,r)}))}t.getAssistantVersion=async function(){return s||(s=await c({method:"get_version",params:{}})),s},t.request=c,t.closeAssistant=function(){if(console.log("assistant is closing"),a){const e={method:"shutdown",params:{}};return a.shutdowned=!0,c(e)}return Promise.resolve()}},7007:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3934);t.default=function(e){const t={method:"set_ignore",params:{responseId:e}};return r.request(t)}},9688:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3129),i=n(8083);t.default=function(e=[],t=!1){const n=[...e],o=i.getFullPathToAssistantBinary();return r.spawn(o,n,{stdio:t?"inherit":"pipe"})}},8083:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=t.getNanoSecTime=t.getFullPathToAssistantBinary=t.downloadAssistantBinary=t.getAPIKey=t.StateType=void 0;const r=n(5747),i=n(7211),o=n(7549),s=n(4381),a=n(9973),c=n(1357),u=n(7225),l=r.promises,p="update.tabnine.com",f="tabnine-assistant",d=o.window.createStatusBarItem(o.StatusBarAlignment.Right);t.StateType={threshold:"assistant-set-threshold-from-to",toggle:"assistant-toggle",clearCache:"validtor-clear-cache"};let h=null;function m(e){const t=function(){if("x64"===process.arch)return"x86_64";if("arm64"===process.arch)return"arm64";throw new Error(`Architecture "${process.arch}" is not supported by tabnine assistant`)}(),{target:n,filename:i}=function(){if("win32"===process.platform)return{target:"pc-windows-gnu",filename:"tabnine-assistant.exe"};if("darwin"===process.platform)return{target:"apple-darwin",filename:f};if("linux"===process.platform)return{target:"unknown-linux-musl",filename:f};throw new Error(`Platform "${process.platform}" is not supported by TabNine Assistant`)}(),o=s.getAssistantRootPath();if(void 0===e){const e=u.default(r.readdirSync(o)),s=e.map((e=>`${o}/${e}/${t}-${n}/${i}`)).find((e=>r.existsSync(e)));if(!s)throw new Error(`Couldn't find a TabNine Assistant binary (tried the following local versions: ${e.join(", ")})`);return s}return`${o}/${e}/${t}-${n}/${i}`}t.getAPIKey=async function(){return null===h&&(h=await a.getState()),(null==h?void 0:h.api_key)||""},t.downloadAssistantBinary=async function(){if(null===h&&(h=await a.getState()),!(null==h?void 0:h.cloud_enabled))return!1;let e;try{e=await async function(){return new Promise(((e,t)=>{const n=i.get({timeout:1e4,hostname:p,path:"/assistant/version"},(n=>{let r="";n.on("data",(e=>{r+=e})),n.on("end",(()=>e(r.trim()))),n.on("error",(e=>t(e)))}));n.on("timeout",(()=>t(new Error("Request to assistant version timed out")))),n.on("error",(e=>t(e)))}))}()}catch(e){try{return m(),!0}catch(e){return!1}}return!!await c.asyncExists(m(e))||o.window.withProgress({location:o.ProgressLocation.Notification,cancellable:!0,title:"downloading tabnine assistant..."},((t,n)=>new Promise(((s,a)=>{try{const c=m(e),u=c.slice(0,c.lastIndexOf("/"));l.mkdir(u,{recursive:!0}).then((()=>{let u;const f=i.get({timeout:1e4,hostname:p,path:`/assistant/${c.slice(c.indexOf(e))}`},(i=>{const l=r.createWriteStream(c,{mode:493});l.on("error",(e=>a(e)));let p=0,f=0;i.on("data",(e=>{if(!u)return;p+=e.length;const n=Number((100*p/Number.parseInt(u,10)).toFixed());0===f?t.report({increment:0}):n>f&&t.report({increment:1}),f=n})).on("error",(e=>a(e))).on("end",(()=>{n.isCancellationRequested||(t.report({increment:100}),o.window.showInformationMessage(`TabNine Assistant ${e} binary is successfully downloaded`),s(!0))})).pipe(l).on("error",(e=>a(e))),n.onCancellationRequested((()=>{i.destroy(),l.destroy()}))}));f.on("response",(t=>{d.text="tabnine assistant: $(sync~spin)",d.tooltip=`downloading tabnine assistant ${e} binary`,u=t.headers["content-length"]})),f.on("timeout",(()=>a(new Error("Request to assistant timed out")))),f.on("error",(e=>a(e))),n.onCancellationRequested((()=>{l.unlink(c).catch((e=>a(e))),f.destroy(new Error("Canceled")),a(new Error("Download of tabnine assistant binary has been cancelled"))}))}))}catch(e){a(e)}}))))},t.getFullPathToAssistantBinary=m,t.getNanoSecTime=function(){const[e,t]=process.hrtime();return 1e9*e+t},t.debounce=function(e,t=500){let n;return(...r)=>{clearTimeout(n),n=setTimeout((()=>{e.apply(this,r)}),t)}}},4533:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i=n(8614),o=n(9973),s=n(2478),a=n(974),c=n(7332),u=n(3926),l="loginHappened";t.default=class{constructor(){this.id=s.BRAND_NAME,this.label=s.BRAND_NAME,this.onDidLogin=new i.EventEmitter,this.myOnDidChangeSessions=new r.EventEmitter,this.initializedDisposable=r.Disposable.from(this.handleSessionChange(),this.pollState())}get onDidChangeSessions(){return this.myOnDidChangeSessions.event}async getSessions(){const e=await this.lastState;return(null==e?void 0:e.is_logged_in)?[new u.default(null==e?void 0:e.user_name)]:[]}async createSession(){await c.callForLogin();const e=await this.waitForLogin();return new u.default(null==e?void 0:e.user_name)}async removeSession(){await c.callForLogout(),this.myOnDidChangeSessions.fire({removed:[(await this.getSessions())[0]]}),await a.sleep(5e3)}dispose(){var e;null===(e=this.initializedDisposable)||void 0===e||e.dispose()}async waitForLogin(){return(await i.once(this.onDidLogin,l))[0]}handleSessionChange(){return r.authentication.onDidChangeSessions((e=>{e.provider.id===s.BRAND_NAME&&this.checkForUpdates()}))}pollState(){const e=setInterval((()=>{this.checkForUpdates()}),1e4);return new r.Disposable((()=>{clearInterval(e)}))}async checkForUpdates(){const e=[],t=[],n=o.getState(),{lastState:r}=this;this.lastState=n;const i=await this.lastState,s=await r;if((null==i?void 0:i.is_logged_in)&&this.onDidLogin.emit(l,i),!(null==s?void 0:s.is_logged_in)&&(null==i?void 0:i.is_logged_in))e.push((await this.getSessions())[0]);else{if(!i||i.is_logged_in||!(null==s?void 0:s.is_logged_in))return;t.push((await this.getSessions())[0])}this.myOnDidChangeSessions.fire({added:e,removed:t})}}},3926:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2478);t.default=class{constructor(e="Tabnine Authentication"){this.id=r.BRAND_NAME,this.scopes=[],this.accessToken="",this.account={id:e,label:e}}}},7332:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callForLogout=t.callForLogin=void 0;const r=n(9973),i=n(9549),o=n(8675);t.callForLogin=function(){return o.default?i.default():r.tabNineProcess.request({Login:{}})},t.callForLogout=async function(){return r.tabNineProcess.request({Logout:{}})}},9342:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4017),i=n(545),o=n(5220),s=n(2478),a=n(974);t.default=class{constructor(){this.mutex=new r.Mutex,this.innerBinary=new i.default,this.consecutiveRestarts=0,this.requestFailures=0,this.isRestarting=!1}init(){return this.startChild()}async request(e,t=1e3){const n=await this.mutex.acquire();try{if(this.isRestarting)return null;if(this.isBinaryDead())return console.warn("Binary died. It is being restarted."),await this.restartChild(),null;const r=await this.innerBinary.request(e,t);return this.consecutiveRestarts=0,this.requestFailures=0,r}catch(e){console.error(e),this.requestFailures+=1,this.requestFailures>s.REQUEST_FAILURES_THRESHOLD&&(console.warn("Binary not returning results, it is being restarted."),await this.restartChild())}finally{n()}return null}isBinaryDead(){var e,t;return null!==(t=null===(e=this.proc)||void 0===e?void 0:e.killed)&&void 0!==t&&t}async resetBinaryForTesting(){const{proc:e,readLine:t}=await o.default([]);this.proc=e,this.innerBinary.init(e,t)}async restartChild(){var e,t;null===(e=this.proc)||void 0===e||e.removeAllListeners(),null===(t=this.proc)||void 0===t||t.kill(),this.isRestarting=!0,this.consecutiveRestarts+=1,this.consecutiveRestarts>=s.CONSECUTIVE_RESTART_THRESHOLD||(await a.sleep(s.restartBackoff(this.consecutiveRestarts)),await this.startChild())}async startChild(){var e,t;const{proc:n,readLine:r}=await o.default([`ide-restart-counter=${this.consecutiveRestarts}`]);this.proc=n,this.proc.unref(),this.proc.on("exit",((e,t)=>{console.warn(`Binary child process exited with code ${null!=e?e:"unknown"} signal ${null!=t?t:"unknown"}`),this.restartChild()})),this.proc.on("error",(e=>{console.warn(`Binary child process error: ${e.message}`),this.restartChild()})),null===(e=this.proc.stdin)||void 0===e||e.on("error",(e=>{console.warn(`Binary child process stdin error: ${e.message}`),this.restartChild()})),null===(t=this.proc.stdout)||void 0===t||t.on("error",(e=>{console.warn(`Binary child process stdout error: ${e.message}`),this.restartChild()})),this.innerBinary.init(n,r),this.isRestarting=!1}}},545:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2478),i=n(8060);t.default=class{init(e,t){this.proc=e,this.onceReader=new i.default(t)}async request(e,t=1e3){const n=await this.requestWithTimeout(e,t);return JSON.parse(n.toString())}requestWithTimeout(e,t){return new Promise(((n,i)=>{var o,s,a;setTimeout((()=>{i(new Error(`Binary request timed out. ${JSON.stringify(e)}`))}),t),null===(o=this.onceReader)||void 0===o||o.onLineRead(n),null===(a=null===(s=this.proc)||void 0===s?void 0:s.stdin)||void 0===a||a.write(`${JSON.stringify({version:r.API_VERSION,request:e})}\n`,"utf8")}))}}},8060:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e){this.callbackQueue=[],e.on("line",(e=>{const t=this.callbackQueue.shift();if(!t)throw new Error("Read a response from the engine before a request was written.");t(e)}))}onLineRead(e){this.callbackQueue.push(e)}}},1713:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(5747),i=n(4381),o=n(4256);t.default=function(){try{const e=i.getActivePath();if(r.existsSync(e)){const t=r.readFileSync(e,"utf-8").trim();if(t===o.BAD_VERSION)return null;const n=i.versionPath(t);if(r.existsSync(n))return n}}catch(e){console.error("Error handling .active file. Falling back to semver sorting",e)}return null}},4256:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BAD_VERSION=void 0;const r=n(1249),i=n(1357),o=n(8638);t.BAD_VERSION="4.0.47";t.default=async function(e){if(e===t.BAD_VERSION||!await i.asyncExists(e))return!1;const{proc:n,readLine:s}=o.runProcess(e,["--print-version"]);return new Promise((t=>{setTimeout((()=>{console.error(`validating ${e} timeout`),t(!1)}),2e3),n.on("exit",((e,n)=>{n&&t(!1)})),n.on("error",(()=>{t(!1)})),s.once("line",(e=>{r.valid(e)?t(!0):t(!1)}))}))}},8022:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(5747),i=n(5622),o=n(2106),s=n(1249),a=n(2497),c=n(4381),u=n(9142);async function l(e){try{await r.promises.unlink(e)}catch(e){}}t.default=async function(){const{bundlePath:e,bundleDownloadUrl:t,bundleDirectory:n,executablePath:p}=await async function(){const e=await async function(){const e=c.getUpdateVersionFileUrl(),t=await a.downloadFileToStr(e);return function(e){if(!s.valid(e))throw new Error(`invalid version: ${e}`)}(t),t}(),t=c.getBundlePath(e),n=c.getDownloadVersionUrl(e),r=i.dirname(t),o=c.versionPath(e);return{bundlePath:t,bundleDownloadUrl:n,bundleDirectory:r,executablePath:o}}();try{return await function(e){return r.promises.mkdir(e,{recursive:!0})}(n),await a.downloadFileToDestination(t,e),await async function(e,t){return o(e,{dir:t})}(e,n),await l(e),await async function(e){if(c.isWindows())return Promise.resolve([]);const t=await r.promises.readdir(e);return Promise.all(t.map((t=>r.promises.chmod(i.join(e,t),493))))}(n),u.report(u.EventName.BUNDLE_DOWNLOAD_SUCCESS),p}finally{await l(e)}}},6123:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(5747),i=n(7225),o=n(974),s=n(4256),a=n(4381);t.default=async function(){try{const e=await r.promises.readdir(a.getRootPath()),t=i.default(e).map(a.versionPath);return await o.asyncFind(t,s.default)}catch(e){console.error("Error handling existing version. Falling back to downloading",e)}return null}},507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i=n(2478),o=n(9142),s=n(1713),a=n(8022),c=n(6123);t.default=async function(){const e=s.default();if(e)return e;const t=await c.default();return t||async function(){try{return await async function(){return r.window.withProgress({location:r.ProgressLocation.Notification,title:"Initializing Tabnine"},a.default)}()}catch(e){const t=await c.default();return t||async function(e){return o.reportErrorEvent(o.EventName.BUNDLE_DOWNLOAD_FAILURE,e),o.reportException(e),new Promise(((t,n)=>{r.window.showErrorMessage(i.BUNDLE_DOWNLOAD_FAILURE_MESSAGE,i.RELOAD_BUTTON,i.OPEN_NETWORK_SETUP_HELP).then((t=>{t===i.OPEN_NETWORK_SETUP_HELP?(r.env.openExternal(r.Uri.parse("https://code.visualstudio.com/docs/setup/network")),n(e)):t===i.RELOAD_BUTTON?(r.commands.executeCommand("workbench.action.reloadWindow"),n(e)):n(e)}),n)}))}(e)}}()}},7719:(e,t,n)=>{"use strict";t.mC=t.Lv=t.$m=t.EM=t.eL=void 0;const r=n(4351),i=n(974),o=n(7054);t.eL=r.mock(),t.EM=r.mock(),t.$m=r.mock(),t.Lv=r.mock();let s=()=>{};const a=new Promise((e=>{s=e}));t.mC=[],t.ZP=function(){return r.when(t.eL.killed).thenReturn(!1),r.when(t.eL.stdin).thenReturn(r.instance(t.$m)),r.when(t.eL.stdout).thenReturn(r.instance(t.Lv)),r.when(t.EM.once("line",r.anyFunction())).thenCall(((e,t)=>{t("1.2.3")})),function(){let e=null;r.when(t.EM.on("line",r.anyFunction())).thenCall(((t,n)=>{e=n})),r.when(t.$m.write(r.anyString(),"utf8")).thenCall((n=>{const r=t.mC.find((({isQualified:e})=>e(n)));return null==e||e(r?function(e,t){return JSON.stringify(i.isFunction(t)?t(e):t)}(n,r.result):"null"),!0}))}(),t.mC.push({isQualified:e=>{var t;const n=JSON.parse(e);return!!(null===(t=null==n?void 0:n.request)||void 0===t?void 0:t.Features)},result:{enabled_features:[o.Capability.ALPHA_CAPABILITY,o.Capability.SAVE_SNIPPETS]}}),s(),{proc:r.instance(t.eL),readLine:r.instance(t.EM)}}},4381:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWindows=t.getUpdateVersionFileUrl=t.getActivePath=t.getAssistantRootPath=t.getRootPath=t.getDownloadVersionUrl=t.getBundlePath=t.versionPath=t.setBinaryRootPath=void 0;const r=n(5747),i=n(5622),o=n(7549),s=n(2478);let a;const c=function(){if("darwin"===process.platform&&"arm64"===process.arch)return"aarch64";if("x32"===process.arch||"ia32"===process.arch)return"i686";if("x64"===process.arch)return"x86_64";throw new Error(`Sorry, the architecture '${process.arch}' is not supported by TabNine.`)}(),u=function(){switch(process.platform){case"win32":return"pc-windows-gnu/TabNine.exe";case"darwin":return"apple-darwin/TabNine";case"linux":return"unknown-linux-musl/TabNine";default:throw new Error(`Sorry, the platform '${process.platform}' is not supported by TabNine.`)}}(),l=`${u.replace(".exe","")}.zip`;t.setBinaryRootPath=async function(e){a=e.extensionMode===o.ExtensionMode.Test?i.join(__dirname,"..","..","binaries"):i.join(e.globalStorageUri.fsPath,"binaries");try{await r.promises.mkdir(a,{recursive:!0})}catch(e){}},t.versionPath=function(e){if(!a)throw new Error("Binary root path not set");return i.join(a,e,`${c}-${u}`)},t.getBundlePath=function(e){if(!a)throw new Error("Binary root path not set");return i.join(a,e,`${c}-${l}`)},t.getDownloadVersionUrl=function(e){return`${s.BINARY_UPDATE_URL}/${e}/${c}-${l}`},t.getRootPath=function(){if(!a)throw new Error("Binary root path not set");return a},t.getAssistantRootPath=function(){if(!a)throw new Error("Binary root path not set");return i.join(a,"..","assistant-binaries")},t.getActivePath=function(){if(!a)throw new Error("Binary root path not set");return i.join(a,".active")},t.getUpdateVersionFileUrl=function(){return s.BINARY_UPDATE_VERSION_FILE_URL},t.isWindows=function(){return"win32"===process.platform}},9838:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9973),i=n(5104),o=n(2478),s=n(7962),a=n(974),c=n(8433),u=1500;function l(e){return Math.floor(e/1024/1024)}t.default=function(){a.withPolling((e=>{r.getState().then((t=>{var n,a;!function(e){var t,n,r;return!(null==e?void 0:e.local_enabled)||(null==e?void 0:e.local_enabled)&&!(null==e?void 0:e.is_cpu_supported)&&!(null==e?void 0:e.cloud_enabled)||(null===(t=null==e?void 0:e.download_state)||void 0===t?void 0:t.status)===c.DownloadStatus.FINISHED||(null===(n=null==e?void 0:e.download_state)||void 0===n?void 0:n.status)===c.DownloadStatus.NOT_STARTED&&!!(null===(r=null==e?void 0:e.download_state)||void 0===r?void 0:r.last_failure)}(t)?(null===(n=null==t?void 0:t.download_state)||void 0===n?void 0:n.status)===c.DownloadStatus.IN_PROGRESS&&(null===(a=null==t?void 0:t.download_state)||void 0===a?void 0:a.kind)===c.DownloadProgress.DOWNLOADING&&(e(),function(){i.default({[o.StatePayload.MESSAGE]:{message_type:o.StateType.PROGRESS}}),s.setLoadingStatus("Initializing... 0%");const e=setInterval((()=>{r.getState().then((t=>{(null==t?void 0:t.download_state.status)===c.DownloadStatus.FINISHED||(null==t?void 0:t.download_state.last_failure)?(s.setDefaultStatus(),clearInterval(e)):s.setLoadingStatus(`Initializing... ${function(e){if(!e)return"0";return(null==e?void 0:e.kind)===c.DownloadProgress.DOWNLOADING?Math.round(l(e.crnt_bytes||0)/l(e.total_bytes||1)*100).toString():"100"}(null==t?void 0:t.download_state)}%`)}))}),u)}()):(e(),s.setDefaultStatus())}))}),u,6e4)}},1666:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendHoverAction=t.getHover=t.HoverActions=void 0;const r=n(9973);!function(e){e[e.NONE=0]="NONE"}(t.HoverActions||(t.HoverActions={})),t.getHover=function(){return r.tabNineProcess.request({Hover:{}})},t.sendHoverAction=async function(e,t,n,i,o){return r.tabNineProcess.request({HoverAction:{id:e,actions:n,notification_type:i,state:o,selected:t}})}},2189:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendNotificationAction=t.getNotifications=void 0;const r=n(9973);t.getNotifications=function(){return r.tabNineProcess.request({Notifications:{}})},t.sendNotificationAction=async function(e,t,n,i,o,s){return r.tabNineProcess.request({NotificationAction:{id:e,selected:n,message:t,notification_type:i,actions:o,state:s}})}},5157:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9973);t.default=function(e){return r.tabNineProcess.request({NotifyWorkspaceChanged:{workspace_folders:e}},5e3).catch(console.error)}},5103:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9973);t.default=function(e){return r.tabNineProcess.request({OpenUrl:{url:e}})}},9973:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.saveSnippet=t.getCapabilities=t.uninstalling=t.deactivate=t.fireEvent=t.getState=t.configuration=t.autocomplete=t.SnippetRequestTrigger=t.resetBinaryForTesting=t.initBinary=t.UserIntent=t.CompletionKind=t.tabNineProcess=void 0;const r=n(9342);t.tabNineProcess=new r.default,function(e){e.Classic="Classic",e.Line="Line",e.Snippet="Snippet"}(t.CompletionKind||(t.CompletionKind={})),function(e){e[e.Comment=0]="Comment",e[e.Block=1]="Block",e[e.FunctionDeclaration=2]="FunctionDeclaration",e[e.NoScope=3]="NoScope",e[e.NewLine=4]="NewLine"}(t.UserIntent||(t.UserIntent={})),t.initBinary=function(){return t.tabNineProcess.init()},t.resetBinaryForTesting=function(){t.tabNineProcess.resetBinaryForTesting()},function(e){e.Auto="Auto",e.User="User"}(t.SnippetRequestTrigger||(t.SnippetRequestTrigger={})),t.autocomplete=function(e,n){return t.tabNineProcess.request({Autocomplete:e},n)},t.configuration=function(e){return t.tabNineProcess.request({Configuration:e},5e3)},t.getState=function(e={}){return t.tabNineProcess.request({State:e})},t.fireEvent=function(e){return t.tabNineProcess.request({Event:e})},t.deactivate=function(){return t.tabNineProcess?t.tabNineProcess.request({Deactivate:{}}):(console.error("No TabNine process"),Promise.resolve(null))},t.uninstalling=function(){return t.tabNineProcess.request({Uninstalling:{}})},t.getCapabilities=async function(){try{const e=await t.tabNineProcess.request({Features:{}},7e3);if(!Array.isArray(null==e?void 0:e.enabled_features))throw new Error("Could not get enabled capabilities");return e}catch(e){return console.error(e),{enabled_features:[]}}},t.saveSnippet=async function(e){return t.tabNineProcess.request({SaveSnippet:e})}},5104:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9973);t.default=function(e){return r.tabNineProcess.request({SetState:{state_type:e}})}},9014:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getStartupActions=void 0;const r=n(9973);t.getStartupActions=function(){return r.tabNineProcess.request({StartupActions:{}})}},9851:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendStatusBarAction=t.getStatus=void 0;const r=n(9973);t.getStatus=function(){return r.tabNineProcess.request({StatusBar:{}})},t.sendStatusBarAction=async function(e,t,n,i,o){return r.tabNineProcess.request({StatusBarAction:{id:e,selected:t,notification_type:n,actions:i,state:o}})}},5220:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i=n(7348),o=n(507),s=n(8638);t.default=async function(e=[],t=!1){var n,a,c,u,l;const p=await o.default(),f=["--client=vscode","--no-lsp=true",i.default.logFilePath?`--log-file-path=${i.default.logFilePath}`:null,i.default.logLevel?`--log-level=${i.default.logLevel}`:null,"--client-metadata",`clientVersion=${i.default.vscodeVersion}`,`pluginVersion=${null!==(n=i.default.version)&&void 0!==n?n:"unknown"}`,`t9-vscode-AutoImportEnabled=${i.default.isTabNineAutoImportEnabled}`,`t9-vscode-TSAutoImportEnabled=${null!==(a=i.default.isTypeScriptAutoImports)&&void 0!==a?a:"unknown"}`,`t9-vscode-JSAutoImportEnabled=${null!==(c=i.default.isJavaScriptAutoImports)&&void 0!==c?c:"unknown"}`,`vscode-telemetry-enabled=${i.default.isVscodeTelemetryEnabled}`,`vscode-remote=${i.default.isRemote}`,`vscode-remote-name=${i.default.remoteName}`,`vscode-extension-kind=${i.default.extensionKind}`,`vscode-theme-name=${null!==(u=i.default.themeName)&&void 0!==u?u:"unknown"}`,`vscode-theme-kind=${i.default.themeKind}`,`vscode-machine-id=${r.env.machineId}`,`vscode-is-new-app-install=${r.env.isNewAppInstall}`,`vscode-session-id=${r.env.sessionId}`,`vscode-language=${r.env.language}`,`vscode-app-name=${r.env.appName}`,`vscode-beta-channel-enabled=${i.default.isExtentionBetaChannelEnabled}`,`vscode-status-customization=${null!==(l=i.default.statusBarColorCustomizations)&&void 0!==l?l:"unknown"}`,...e].filter((e=>null!==e));return s.runProcess(p,f,{stdio:t?"inherit":"pipe"})}},8638:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.runProcess=void 0;const r=n(3129),i=n(1058),o=n(7549),s=n(6096),a=n(9142);t.runProcess=function(e,t,c={}){var u;if((null===(u=s.getTabnineExtensionContext())||void 0===u?void 0:u.extensionMode)===o.ExtensionMode.Test)return n(7719).ZP();a.report(a.EventName.START_BINARY);const l=t?r.spawn(e,t,c):r.spawn(e,c),p=l.stdout;return{proc:l,readLine:i.createInterface({input:p,output:l.stdin})}}},4905:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2478),i=n(9913),o=n(9014),s=n(974);t.default=async function(){await s.sleep(r.BINARY_STARTUP_GRACE);const e=await o.getStartupActions();return(null==e?void 0:e.actions.includes(r.MessageActions.OPEN_HUB))?i.openConfigWithSource(r.StateType.STARTUP)():Promise.resolve()}},8433:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmuMode=t.Mode=t.OSArchTarget=t.DownloadProgress=t.DownloadStatus=void 0,function(e){e.FINISHED="Finished",e.NOT_STARTED="NotStarted",e.IN_PROGRESS="InProgress"}(t.DownloadStatus||(t.DownloadStatus={})),function(e){e.DOWNLOADING="Downloading",e.RETRIEVING_METADATA="RetrievingMetadata",e.VERIFYING_CHECKSUM="VerifyingChecksum"}(t.DownloadProgress||(t.DownloadProgress={})),function(e){e.APPLE_64="x86_64-apple-darwin"}(t.OSArchTarget||(t.OSArchTarget={})),function(e){e.RELEASE="Release"}(t.Mode||(t.Mode={})),function(e){e.NATIVE="Native"}(t.EmuMode||(t.EmuMode={}))},7054:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchCapabilitiesOnFocus=t.isCapabilityEnabled=t.Capability=void 0;const r=n(7549),i=n(9973);!function(e){e.ON_BOARDING_CAPABILITY="vscode.onboarding",e.ASSISTANT_CAPABILITY="vscode.assistant",e.ASSISTANT_MODE_A_CAPABILITY_KEY="vscode.assistant.mode.A",e.ASSISTANT_MODE_B_CAPABILITY_KEY="vscode.assistant.mode.B",e.ASSISTANT_BACKGROUND_CAPABILITY="vscode.assistant.background",e.ASSISTANT_PASTE_CAPABILITY="vscode.assistant.paste",e.SUGGESTIONS_SINGLE="suggestions-single",e.SUGGESTIONS_TWO="suggestions-two",e.SUGGESTIONS_ORIGINAL="suggestions-original",e.ALPHA_CAPABILITY="vscode.validator",e.SHOW_AGRESSIVE_STATUS_BAR_UNTIL_CLICKED="promoteHub1",e.INLINE_SUGGESTIONS="inline_suggestions_mode",e.SNIPPET_SUGGESTIONS="snippet_suggestions",e.SNIPPET_AUTO_TRIGGER="snippet_auto_trigger",e.LEFT_TREE_VIEW="vscode.left_tree_view",e.EMPTY_LINE_SUGGESTIONS="empty_line_suggestions",e.AUTHENTICATION="vscode.authentication",e.NOTIFICATIONS_WIDGET="vscode.notifications-widget",e.TABNINE_TODAY_WIDGET="vscode.tabnine-today-widget",e.CODE_REVIEW="vscode.code-review",e.SAVE_SNIPPETS="save_snippets",e.BETA_CAPABILITY="beta"}(t.Capability||(t.Capability={}));const o={};function s(e){i.getCapabilities().then((t=>{null==t||t.enabled_features.forEach((e=>{o[e]=!0})),e()}))}t.isCapabilityEnabled=function(e){return o[e]},t.fetchCapabilitiesOnFocus=function(){return new Promise((e=>{if(r.window.state.focused)console.log("capabilities resolved immediately"),s(e);else{const t=r.window.onDidChangeWindowState((({focused:n})=>{t.dispose(),console.log(`capabilities resolved on focus ${n}`),s(e)}))}}))}},1988:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SuggestionsMode=void 0;const r=n(7054);var i;!function(e){e[e.INLINE=0]="INLINE",e[e.AUTOCOMPLETE=1]="AUTOCOMPLETE"}(i=t.SuggestionsMode||(t.SuggestionsMode={})),t.default=function(){return r.isCapabilityEnabled(r.Capability.INLINE_SUGGESTIONS)?i.INLINE:i.AUTOCOMPLETE}},2617:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TABNINE_CONFIG_CONTEXT_KEY=t.TABNINE_TOKEN_CONTEXT_KEY=t.TABNINE_CONFIG_FILE_PATH=t.TABNINE_CONFIG_FILE_NAME=t.TABNINE_TOKEN_FILE_PATH=t.TABNINE_TOKEN_FILE_NAME=t.TABNINE_CONFIG_DIR=void 0;const r=n(5622),i=n(2087);t.TABNINE_CONFIG_DIR=r.join(i.homedir(),".config","TabNine"),t.TABNINE_TOKEN_FILE_NAME=".refresh_token_v2",t.TABNINE_TOKEN_FILE_PATH=r.join(t.TABNINE_CONFIG_DIR,t.TABNINE_TOKEN_FILE_NAME),t.TABNINE_CONFIG_FILE_NAME="tabnine_config.json",t.TABNINE_CONFIG_FILE_PATH=r.join(t.TABNINE_CONFIG_DIR,t.TABNINE_CONFIG_FILE_NAME),t.TABNINE_TOKEN_CONTEXT_KEY="TABNINE_TOKEN_V2",t.TABNINE_CONFIG_CONTEXT_KEY="TABNINE_CONFIG"},8675:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=!!process.env.GITPOD_REPO_ROOT||!!process.env.CODESPACES},9549:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i=n(9973),o=n(2478),s=n(9980);t.default=async function(){const e=await i.configuration({quiet:!0,source:o.StateType.AUTH});if(e&&e.message){const t=await r.env.asExternalUri(r.Uri.parse(e.message)),n=`https://app.tabnine.com/auth/sign-in?tabnineUrl=${t.toString()}&sync=false`;await s.default(t),r.env.openExternal(r.Uri.parse(n))}}},9191:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(5747),i=n(2617),o=n(1357);t.default=async function(e){await o.ensureExists(i.TABNINE_CONFIG_DIR),e.globalState.setKeysForSync([i.TABNINE_TOKEN_CONTEXT_KEY,i.TABNINE_CONFIG_CONTEXT_KEY]),await async function(e){const t=e.globalState.get(i.TABNINE_TOKEN_CONTEXT_KEY),n=e.globalState.get(i.TABNINE_CONFIG_CONTEXT_KEY);t&&await r.promises.writeFile(i.TABNINE_TOKEN_FILE_PATH,t).catch((e=>{console.error("Error occurred while trying to load Tabnine token",e)}));n&&await r.promises.writeFile(i.TABNINE_CONFIG_FILE_PATH,n).catch((e=>{console.error("Error occurred while trying to load Tabnine config",e)}))}(e),function(e){o.watch(i.TABNINE_CONFIG_DIR,((t,n)=>{switch(n){case i.TABNINE_TOKEN_FILE_NAME:"rename"===t?e.globalState.update(i.TABNINE_TOKEN_CONTEXT_KEY,void 0):r.promises.readFile(i.TABNINE_TOKEN_FILE_PATH,"utf8").then((t=>e.globalState.update(i.TABNINE_TOKEN_CONTEXT_KEY,t))).catch((e=>{console.error("Error occurred while trying to persist Tabnine token",e)}));break;case i.TABNINE_CONFIG_FILE_NAME:r.promises.readFile(i.TABNINE_CONFIG_FILE_PATH,"utf8").then((t=>e.globalState.update(i.TABNINE_CONFIG_CONTEXT_KEY,t))).catch((e=>{console.error("Error occurred while trying to persist Tabnine config",e)}))}}))}(e)}},4803:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e,t){this.uri=e,this.threads=t}dispose(){this.threads.forEach((e=>e.dispose()))}}},7350:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i=n(9973);function o(e){return r.workspace.textDocuments.find((t=>t.uri===e.uri))}t.default=class{constructor(e,t,n){this.oldValue=e,this.suggestion=t,this.language=n}get body(){return(new r.MarkdownString).appendCodeblock(this.suggestion.value,this.language)}get mode(){return r.CommentMode.Preview}get author(){return{name:"Tabnine",iconPath:r.Uri.parse("https://www.tabnine.com/favicons/favicon-32x32.png")}}apply(e){const t=o(e);if(!t)return this.fireEvent("comment-applied",e,{success:!1,failureReason:"doument not found"}),!1;const n=t.getText(e.range);if(this.oldValue!==n.trim())return this.fireEvent("comment-applied",e,{success:!1,failureReason:"text did not match"}),!1;const i=new r.WorkspaceEdit;return i.replace(e.uri,e.range,this.suggestion.value),r.workspace.applyEdit(i),this.fireEvent("comment-applied",e,{success:!0}),!0}hide(e){this.fireEvent("comment-hidden",e),e.dispose()}fireEvent(e,t,n={}){var r;i.fireEvent({name:`code-review-${e}`,lineIndex:t.range.start.line,file:t.uri.path,lineCount:null===(r=o(t))||void 0===r?void 0:r.lineCount,...n})}}},4754:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.querySuggestions=t.supportedExtensions=void 0;const r=n(9669),i=n(7348),o=r.default.create({baseURL:i.default.codeReviewBaseUrl,timeout:3e4});t.supportedExtensions=async function(){return(await o.get("languages/extensions")).data},t.querySuggestions=async function(e){return(await o.post("suggestions",e)).data}},1852:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i=n(7054),o=n(8444);let s=null;function a(e){if("git"===e.document.uri.scheme){const t=JSON.parse(e.document.uri.query);return"HEAD"===t.ref||"~"===t.ref}return!1}t.default=function(){const e=r.comments.createCommentController("tabnine.commentController","");e.options={placeHolder:"",prompt:""},r.commands.registerCommand("Tabnine.hideSuggestion",(e=>{const t=e.comments[0];t&&t.hide(e)})),r.commands.registerCommand("Tabnine.applySuggestion",(e=>{const t=e.comments[0];t&&t.apply(e)&&e.dispose()})),r.window.onDidChangeActiveTextEditor((async()=>{if(!i.isCapabilityEnabled(i.Capability.CODE_REVIEW))return;const t=function(){const e=r.window.visibleTextEditors;if(2!==e.length)return null;if(e[0].document.uri.path!==e[1].document.uri.path)return null;const t=e.find(a),n=e.find((e=>"file"===e.document.uri.scheme));if(t&&n)return{oldEditor:t,newEditor:n};return null}();let n=null;t&&(n=await o.default(e,t.newEditor.document,t.oldEditor.document)),s&&s.dispose(),s=n}))}},8444:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i=n(5622),o=n(9479),s=n(4754),a=n(7350),c=n(9973),u=n(4803);t.default=async function(e,t,n){const p=(new Date).getTime();try{if(!(await async function(){l||(l=(await s.supportedExtensions()).extensions);return l}()).includes(i.extname(t.uri.path)))return null;const f=t.getText(),d=[],h=o.diffLines(f,n.getText());let m=0;h.forEach((e=>{e.removed&&d.push({start:m,end:m+e.value.length}),e.added||(m+=e.value.length)}));const g=r.window.createStatusBarItem(r.StatusBarAlignment.Left,-1);let v;g.text="Fecthing Tabnine code review suggestions...",g.show();try{v=await s.querySuggestions({filename:i.basename(t.uri.path),buffer:f,ranges:d,threshold:"review"})}finally{g.dispose()}const y=[];return v.focus.forEach((n=>{const i=n.suggestions.find((e=>"other"===e.classification.type));if(!i)return;const o=t.lineAt(t.positionAt(n.start)),s=e.createCommentThread(t.uri,o.range,[new a.default(n.old_value,i,t.languageId)]);s.canReply=!1,s.collapsibleState=r.CommentThreadCollapsibleState.Expanded,s.label=i.classification.description,y.push(s)})),c.fireEvent({name:"code-review-diff-task-success",durationMs:(new Date).getTime()-p,suggestions:v.focus.length,file:t.uri.path,lineCount:t.lineCount}),new u.default(t.uri,y)}catch(e){throw c.fireEvent({name:"code-review-diff-task-error",durationMs:(new Date).getTime()-p,file:t.uri.path,lineCount:t.lineCount,error:e.message||e.toString()}),e}};let l=null;setInterval((()=>{l=null}),6e5)},9913:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openConfigWithSource=t.registerCommands=t.SAVE_SNIPPET_COMMAND=t.STATUS_BAR_COMMAND=t.CONFIG_COMMAND=void 0;const r=n(7549),i=n(9980),o=n(2478),s=n(9973),a=n(5104),c=n(7054),u=n(663);function l(e){return async(t=null)=>{const n=await s.configuration({quiet:!0,source:e});if(n&&n.message){const e=await r.env.asExternalUri(r.Uri.parse(n.message));i.default(e)}a.default({[o.StatePayload.STATE]:{state_type:(null==t?void 0:t.join("-"))||e}})}}t.CONFIG_COMMAND="TabNine::config",t.STATUS_BAR_COMMAND="TabNine.statusBar",t.SAVE_SNIPPET_COMMAND="Tabnine.saveSnippet",t.registerCommands=async function(e){e.subscriptions.push(r.commands.registerCommand(t.CONFIG_COMMAND,l(o.StateType.PALLETTE))),e.subscriptions.push(r.commands.registerCommand(t.STATUS_BAR_COMMAND,function(e){const t=l(o.StateType.STATUS);return async(n=null)=>{await t(n),c.isCapabilityEnabled(c.Capability.SHOW_AGRESSIVE_STATUS_BAR_UNTIL_CLICKED)&&await e.globalState.update(o.STATUS_BAR_FIRST_TIME_CLICKED,!0)}}(e))),c.isCapabilityEnabled(c.Capability.SAVE_SNIPPETS)&&(await u.enableSaveSnippetContext(),e.subscriptions.push(r.commands.registerCommand(t.SAVE_SNIPPET_COMMAND,u.default)))},t.openConfigWithSource=l},1880:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[/Import ([\S]*) from module [\S]*/,/Add ([\S]*) to existing import declaration from [\S]*/,/Import default ([\S]*) from module [\S]*/,/Add default import ([\S]*) to existing import declaration from [\S]*/];function r({title:e}){const t=n.map((t=>t.exec(e))).find(Boolean);return t&&t[1]}t.default=function(e=[]){const t=e.filter((({title:e})=>n.some((t=>t.test(e))))),i=t.map(r);return t.filter((e=>i.filter((t=>t===r(e))).length<=1))}},2478:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TABNINE_APP_URL=t.TABNINE_OPEN_APP_COMMAND=t.SNIPPET_COMMAND=t.TABNINE_TREE_NAVIGATION_COMMAND=t.PREV_INLINE_COMMAND=t.NEXT_INLINE_COMMAND=t.ESCAPE_INLINE_COMMAND=t.ACCEPT_INLINE_COMMAND=t.SLEEP_TIME_BEFORE_OPEN_HUB=t.IS_OSX=t.restartBackoff=t.MessageActions=t.StatePayload=t.StateType=t.COMPLETION_TRIGGERS=t.PROGRESS_KEY=t.DEFAULT_DETAIL=t.BETA_CHANNEL_MESSAGE_SHOWN_KEY=t.ALPHA_VERSION_KEY=t.MINIMAL_SUPPORTED_VSCODE_API=t.LATEST_RELEASE_URL=t.INSTALL_COMMAND=t.OPEN_LP_FROM_STATUS_BAR=t.STATUS_BAR_FIRST_TIME_CLICKED=t.STATUS_BAR_NOTIFICATION_PERIOD=t.BINARY_STATUS_BAR_FIRST_MESSAGE_POLLING_INTERVAL=t.BINARY_STATUS_BAR_POLLING_INTERVAL=t.BINARY_NOTIFICATION_POLLING_INTERVAL=t.BINARY_STARTUP_GRACE=t.DELAY_FOR_CODE_ACTION_PROVIDER=t.WAIT_BEFORE_RESTART_MILLIS=t.REQUEST_FAILURES_THRESHOLD=t.CONSECUTIVE_RESTART_THRESHOLD=t.MAX_NUM_RESULTS=t.CHAR_LIMIT=t.INSTRUMENTATION_KEY=t.STATUS_NAME=t.OPEN_ISSUE_LINK=t.RELOAD_BUTTON=t.DOWNLOAD_RETRY=t.OPEN_NETWORK_SETUP_HELP=t.OPEN_ISSUE_BUTTON=t.BUNDLE_DOWNLOAD_FAILURE_MESSAGE=t.FULL_BRAND_REPRESENTATION=t.LIMITATION_SYMBOL=t.BRAND_NAME=t.ATTRIBUTION_BRAND=t.BINARY_UPDATE_VERSION_FILE_URL=t.BINARY_UPDATE_URL=t.API_VERSION=void 0,t.URI_SCHEME_FILE=void 0;const r=n(8675);t.API_VERSION="4.1.21",t.BINARY_UPDATE_URL="https://update.tabnine.com/bundles",t.BINARY_UPDATE_VERSION_FILE_URL=`${t.BINARY_UPDATE_URL}/version`,t.ATTRIBUTION_BRAND="⌬ ",t.BRAND_NAME="tabnine",t.LIMITATION_SYMBOL="🔒",t.FULL_BRAND_REPRESENTATION=t.ATTRIBUTION_BRAND+t.BRAND_NAME,t.BUNDLE_DOWNLOAD_FAILURE_MESSAGE="Tabnine Extension was unable to download its dependencies. Please check your internet connection. If you use a proxy server, please visit https://code.visualstudio.com/docs/setup/network",t.OPEN_ISSUE_BUTTON="Open issue",t.OPEN_NETWORK_SETUP_HELP="Help",t.DOWNLOAD_RETRY="Retry",t.RELOAD_BUTTON="Reload",t.OPEN_ISSUE_LINK="https://github.com/codota/tabnine-vscode/issues/new",t.STATUS_NAME="Tabnine",t.INSTRUMENTATION_KEY="38efe475-3afd-4e03-8af2-bbcfdeee3b7a",t.CHAR_LIMIT=1e5,t.MAX_NUM_RESULTS=5,t.CONSECUTIVE_RESTART_THRESHOLD=100,t.REQUEST_FAILURES_THRESHOLD=20,t.WAIT_BEFORE_RESTART_MILLIS=1e3,t.DELAY_FOR_CODE_ACTION_PROVIDER=800,t.BINARY_STARTUP_GRACE=+(process.env.BINARY_NOTIFICATION_POLLING_INTERVAL||9e3),t.BINARY_NOTIFICATION_POLLING_INTERVAL=+(process.env.BINARY_NOTIFICATION_POLLING_INTERVAL||1e4),t.BINARY_STATUS_BAR_POLLING_INTERVAL=+(process.env.BINARY_STATUS_BAR_POLLING_INTERVAL||36e5),t.BINARY_STATUS_BAR_FIRST_MESSAGE_POLLING_INTERVAL=+(process.env.BINARY_NOTIFICATION_POLLING_INTERVAL||1e4),t.STATUS_BAR_NOTIFICATION_PERIOD=+(process.env.STATUS_BAR_NOTIFICATION_PERIOD||12e4),t.STATUS_BAR_FIRST_TIME_CLICKED="status-bar-first-time-clicked",t.OPEN_LP_FROM_STATUS_BAR="tabnine:open_lp",t.INSTALL_COMMAND="workbench.extensions.installExtension",t.LATEST_RELEASE_URL="https://api.github.com/repos/codota/tabnine-vscode/releases",t.MINIMAL_SUPPORTED_VSCODE_API="1.35.0",t.ALPHA_VERSION_KEY="tabnine.alpha.version",t.BETA_CHANNEL_MESSAGE_SHOWN_KEY="tabnine.joinBetaChannelMessageShown",t.DEFAULT_DETAIL=t.BRAND_NAME,t.PROGRESS_KEY="tabnine.hide.progress",t.COMPLETION_TRIGGERS=[" ",".","(",")","{","}","[","]",",",":","'",'"',"=","<",">","/","\\","+","-","|","&","*","%","=","$","#","@","!"],function(e){e.ERROR="error",e.INFO="info",e.PROGRESS="progress",e.STATUS="status",e.PALLETTE="pallette",e.NOTIFICATION="notification",e.STARTUP="startup",e.TREE_VIEW="treeView",e.NOTIFICATIONS_WIDGET_WEBVIEW="notificationsWidgetWebview",e.TABNINE_TODAY_WIDGET_WEBVIEW="tabnineTodayWidgetWebview",e.AUTH="auth"}(t.StateType||(t.StateType={})),function(e){e.MESSAGE="Message",e.STATE="State",e.NOTIFICATION_SHOWN="NotificationShown",e.STATUS_SHOWN="StatusShown",e.HOVER_SHOWN="HoverShown",e.HINT_SHOWN="HintShown",e.SNIPPET_SHOWN="SnippetShown"}(t.StatePayload||(t.StatePayload={})),function(e){e.NONE="None",e.OPEN_HUB="OpenHub",e.OPEN_LP="OpenLp",e.OPEN_BUY="OpenBuy",e.OPEN_SIGNUP="OpenSignup"}(t.MessageActions||(t.MessageActions={}));t.restartBackoff=function(e){return Math.min(1e3*2**Math.min(e,10),36e5)},t.IS_OSX="darwin"===process.platform,t.SLEEP_TIME_BEFORE_OPEN_HUB=r.default?1e4:0,t.ACCEPT_INLINE_COMMAND="tabnine.accept-inline-suggestion",t.ESCAPE_INLINE_COMMAND="tabnine.escape-inline-suggestion",t.NEXT_INLINE_COMMAND="tabnine.next-inline-suggestion",t.PREV_INLINE_COMMAND="tabnine.prev-inline-suggestion",t.TABNINE_TREE_NAVIGATION_COMMAND="tabnine:navigation",t.SNIPPET_COMMAND="tabnine.snippet-suggestion",t.TABNINE_OPEN_APP_COMMAND="tabnine:open-app",t.TABNINE_APP_URL="https://app.tabnine.com",t.URI_SCHEME_FILE="file"},4401:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(5747),i=n(7549),o=n(5622),s=n(2087),a=n(9030),c="TabNine.tabnine-vscode",u="argv.json",l=o.join(i.env.appRoot,"product.json"),p=["",`\t"enable-proposed-api": ["${c}"]`,"}"];t.default=async function(){return async function(){const e=await async function(){const e=await r.promises.readFile(l),t=JSON.parse(e.toString("utf8"));return null==t?void 0:t.dataFolderName}();if(e){const t=function(e){const t=process.env.VSCODE_PORTABLE;if(t)return o.join(t,u);return o.join(s.homedir(),e,u)}(e),n=(await r.promises.readFile(t)).toString();if(n.includes(`${c}`))return!0;const l=function(e){return e.substring(0,e.length-2).concat(",\n",p.join("\n"))}(n);await r.promises.writeFile(t,Buffer.from(l)),a.default({messageId:"inline-update",messageText:"Please reload the window for the Tabnine inline completions to take effect.",buttonText:"Reload",action:()=>{i.commands.executeCommand("workbench.action.reloadWindow")}})}return!1}().catch((e=>(console.error("failed to enable proposedAPI",e),!1)))}},6096:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTabnineExtensionContext=t.setTabnineExtensionContext=void 0;let n=null;t.setTabnineExtensionContext=function(e){n=e},t.getTabnineExtensionContext=function(){return n}},7348:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i="tabnine-vscode";function o(){return r.workspace.getConfiguration("workbench")}const s=function(){const e=r.extensions.all.find((e=>e.id.includes(i))),t=r.workspace.getConfiguration(),n=t.get("javascript.suggest.autoImports"),s=t.get("typescript.suggest.autoImports"),a="tabnine.experimentalAutoImports",c=t.get("tabnine.logFilePath"),u=t.get("tabnine.logLevel");let l=t.get(a);const{remoteName:p}=r.env,{extensionKind:f}=e,d=!!p&&2===f,h=null===l;!1!==l&&(l=!0,t.update(a,l,!0));const m=t.get("tabnine.receiveBetaChannelUpdates")||!1,g=r.env.appName.toLocaleLowerCase().includes("insider");return{get extensionPath(){return null==e?void 0:e.extensionPath},get version(){return(null==e?void 0:e.packageJSON).version},get id(){return null==e?void 0:e.id},get name(){var e;return`tabnine-vscode-${null!==(e=this.version)&&void 0!==e?e:"unknown"}`},get vscodeVersion(){return r.version},get isTabNineAutoImportEnabled(){return!!l},get isJavaScriptAutoImports(){return n},get isTypeScriptAutoImports(){return s},get logFilePath(){return c?`${c}-${process.pid}`:""},get logLevel(){return u},get isRemote(){return d},get remoteName(){return p},get extensionKind(){return f},get themeKind(){return r.ColorThemeKind[r.window.activeColorTheme.kind]},get themeName(){return o().get("colorTheme")},get statusBarColorCustomizations(){const e=o().get("colorCustomizations");return null==e?void 0:e["statusBar.background"]},get isInstalled(){return h},get isVscodeTelemetryEnabled(){return r.workspace.getConfiguration("telemetry").get("enableTelemetry",!0)},get isExtentionBetaChannelEnabled(){return m},get isVscodeInsiders(){return g},get codeReviewBaseUrl(){var e;return null!==(e=t.get("tabnine.codeReviewBaseUrl"))&&void 0!==e?e:"https://api.tabnine.com/code-review/"}}}();t.default=s},5011:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInlineSuggestionApiSupported=void 0;const r=n(1249),i=n(7348);t.default=function(){return r.gte(i.default.vscodeVersion,"1.54.0")},t.isInlineSuggestionApiSupported=function(){return r.gte(i.default.vscodeVersion,"1.58.0")}},3329:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(5747),i=n(5622),o=n(7348);t.default=function(e){var t;try{const n=i.dirname(null!==(t=o.default.extensionPath)&&void 0!==t?t:""),s=i.join(n,".obsolete"),a=e=>0!==e.size,c=(e,t)=>new Date(e.mtimeMs)>=new Date(t.atimeMs),u=e=>1!==e.filter((e=>!!o.default.id&&e.toLowerCase().includes(o.default.id.toLowerCase()))).length,l=(t,i)=>{a(t)&&c(t,i)&&r.readFile(s,((t,i)=>{if(t)throw console.error("failed to read .obsolete file:",t),t;r.readdir(n,((t,a)=>{if(t)throw console.error(`failed to read ${n} directory:`,t),t;!u(a)&&i.includes(o.default.name)&&e().then((()=>{r.unwatchFile(s,l)})).catch((e=>{console.error("failed to report uninstall:",e)}))}))}))};r.watchFile(s,l)}catch(e){console.error("failed to invoke uninstall:",e)}}},5784:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDecorationContains=void 0;const r=n(7549),i=n(5104),o=n(2478),s=n(678),a=r.window.createTextEditorDecorationType({after:{margin:"0 0 0 1rem"}});let c,u;function l(e,t){var n;const i=s.getLogoPath(e),o=null===(n=t.options[0])||void 0===n?void 0:n.key,a=o?`command:${o}`:"https://www.tabnine.com",c=t.message?`[![tabnine](${i}|width=100)](${a}) \n${t.message}`:"",u=new r.MarkdownString(c,!0);return u.isTrusted=!0,u}t.default=function(e,t,n){c={renderOptions:{after:{contentText:n.title,color:"gray"}},range:new r.Range(new r.Position(e.line,e.character),new r.Position(e.line,1024)),hoverMessage:l(t,n)},function(e=10){u&&clearTimeout(u);u=setTimeout((()=>{var e;return c&&(null===(e=r.window.activeTextEditor)||void 0===e?void 0:e.setDecorations(a,[c]))}),e)}(),i.default({[o.StatePayload.HINT_SHOWN]:{id:n.id,text:n.title,notification_type:n.notification_type,state:null}})},t.isDecorationContains=function(e){return!!(null==c?void 0:c.range.contains(e))},r.workspace.onDidChangeTextDocument((()=>{return null===(e=r.window.activeTextEditor)||void 0===e||e.setDecorations(a,[]),void(c=null);var e}))},5955:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i=n(1666);let o=[];t.default=function(e,t){o.forEach((e=>!!e.dispose())),o=[],e.options.forEach((n=>{const s=r.commands.registerCommand(n.key,(()=>{i.sendHoverAction(e.id,n.key,n.actions,e.notification_type,e.state)}));o.push(s),t.subscriptions.push(s)}))}},8806:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.provideHover=void 0;const r=n(1666),i=n(2478),o=n(5104),s=n(5955),a=n(5784);let c=null;t.provideHover=function(e,t){return function(e){c&&a.isDecorationContains(e)&&o.default({[i.StatePayload.HOVER_SHOWN]:{id:c.id,text:c.message,notification_type:c.notification_type,state:c.state}})}(t),null},t.default=async function(e,t){c=await r.getHover(),(null==c?void 0:c.title)&&(s.default(c,e),a.default(t,e,c))}},9136:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2478),i=n(1264);t.default=function(){return{setLoading:function(){return i.default('<div\n id="loading"\n frameborder="0"\n style="\n display: block;\n margin: 0;\n padding: 0;\n position: absolute;\n min-width: 100%;\n min-height: 100%;\n visibility: visible;\n background: rgb(37, 37, 38);\n color: white;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n "\n >\n Loading ...\n </div>\n ')},setUrl:function(e){return i.default(`\n <iframe src="${e}" id="config" frameborder="0" style="display: block; margin: 0; padding: 0; position: absolute; min-width: 100%; min-height: 100%; visibility: visible;"></iframe>\n <script>\n window.onfocus = config.onload = function() {\n setTimeout(function() {\n document.getElementById("config").contentWindow.focus();\n }, 100);\n };\n window.addEventListener("message", (e) => {\n let data = e.data;\n switch (data.type) {\n case "keydown": {\n if (${r.IS_OSX}) {\n window.dispatchEvent(new KeyboardEvent('keydown',data.event));\n }\n break;\n }\n case "link-click": {\n let tempRef = document.createElement("a");\n tempRef.setAttribute("href", data.href);\n config.appendChild(tempRef);\n tempRef.click();\n tempRef.parentNode.removeChild(tempRef);\n break;\n }\n case "navigation": {\n document.getElementById("config").contentWindow.postMessage({type: "navigation", view: data.view}, '*');\n break;\n } \n }\n }, false);\n <\/script>\n `)}}}},9980:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i=n(5622),o=n(2478),s=n(9973),a=n(974),c=n(9136);let u,l=o.SLEEP_TIME_BEFORE_OPEN_HUB;t.default=async function(e,t){const{setLoading:n,setUrl:p}=c.default();return u||(u=r.window.createWebviewPanel("tabnine.settings","Tabnine Hub",{viewColumn:r.ViewColumn.Active,preserveFocus:!1},{retainContextWhenHidden:!0,enableFindWidget:!0,enableCommandUris:!0,enableScripts:!0}),u.onDidChangeViewState((({webviewPanel:e})=>{s.fireEvent({name:"hub-view-state-changed",active:e.active,visible:e.visible,hub_title:e.title})})),u.onDidDispose((()=>{u=void 0,s.fireEvent({name:"hub-view-closed"})})),u.iconPath=r.Uri.file(i.resolve(__dirname,"..","small_logo.png")),l>0&&(u.webview.html=n(),await a.sleep(o.SLEEP_TIME_BEFORE_OPEN_HUB),l=0),u.webview.html=p(e.toString())),t&&u.webview.postMessage({type:"navigation",view:`#${t}`}),u.reveal(),u}},3981:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i=n(9810),o=n(974),s=n(966),a=n(5970),c=n(8578);t.default=async function(e){const t=a.getCurrentSuggestion(),n=e.selection.active,u=a.getCurrentPrefix(),l=a.getAllSuggestions();t&&n&&l&&await(o.isMultiline(null==t?void 0:t.new_prefix)?c.default(e,t,n,l,u):async function(e,t,n,a,c,u){const l=function(e,t,n){return new r.Range(e.translate(void 0,-t.trim().length),e.translate(void 0,n.trim().length))}(e,t,n.old_suffix),p=function({new_prefix:e,new_suffix:t}){const n=new r.SnippetString(o.escapeTabStopSign(e));t&&n.appendTabstop(0).appendText(o.escapeTabStopSign(t));return n}(n),f={currentCompletion:n.new_prefix,completions:a,position:e,limited:!1,oldPrefix:u};await s.default(),await c.insertSnippet(p,l),r.commands.executeCommand(i.COMPLETION_IMPORTS,f)}(n,u,t,l,e,u))}},966:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(5970),i=n(1414);t.default=async function(){await i.clearInlineDecoration(),await r.clearState()}},2005:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549);t.default=function(){return r.workspace.getConfiguration().get("tabnine.inlineHintColor")||"gray"}},513:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i=n(7054),o=n(2478),s=n(5970),a="&nbsp;&nbsp;&nbsp;",c=o.IS_OSX?"⌥":"alt",u=`${`[Next \\(${c}\\]\\)](command:${o.NEXT_INLINE_COMMAND})`}${a}${`[Prev \\(${c}\\[\\)](command:${o.PREV_INLINE_COMMAND})`}${a}${`[Accept \\(Tab\\)](command:${o.ACCEPT_INLINE_COMMAND})`}${a}${`[Escape \\(Esc\\)](command:${o.ESCAPE_INLINE_COMMAND})`}${a}${o.FULL_BRAND_REPRESENTATION}`;new r.MarkdownString(u,!0).isTrusted=!0,t.default=function(){var e;const t=null!==(e=function(){var e;if(i.isCapabilityEnabled(i.Capability.ALPHA_CAPABILITY)){const{completion_kind:t="none",origin:n="none"}=null!==(e=s.getCurrentSuggestion())&&void 0!==e?e:{};return`context - origin: ${n} - kind: ${t}`}return null}())&&void 0!==e?e:u,n=new r.MarkdownString(t,!0);return n.isTrusted=!0,n}},5970:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllSuggestions=t.getCurrentPrefix=t.getCurrentSuggestion=t.getPrevSuggestion=t.getNextSuggestion=t.clearState=t.setSuggestionsState=void 0;const r=n(7549),i=n(7448);let o,s=i.rotate(0);async function a(e){await r.commands.executeCommand("setContext","tabnine.in-inline-suggestions",e)}function c(){return null==o?void 0:o.results}t.setSuggestionsState=async function(e){var t;o=e,(null===(t=null==o?void 0:o.results)||void 0===t?void 0:t.length)?(s=i.rotate(o.results.length-1),await a(!0)):(s=i.rotate(0),await a(!1))},t.clearState=async function(){o=null,s=i.rotate(0),await a(!1)},t.getNextSuggestion=function(){var e;return null===(e=c())||void 0===e?void 0:e[s.next()]},t.getPrevSuggestion=function(){var e;return null===(e=c())||void 0===e?void 0:e[s.prev()]},t.getCurrentSuggestion=function(){var e;return null===(e=c())||void 0===e?void 0:e[s.current()]},t.getCurrentPrefix=function(){return(null==o?void 0:o.old_prefix)||""},t.getAllSuggestions=function(){return c()}},2818:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyLinesWithNewlineAutoInsert=t.isOnlyWhitespaces=void 0;const r=n(2087);function i(e){return""===e.trim()}function o(e){return s(e.text).length>2&&i(e.text)}function s(e){return e.split(r.EOL)}t.default=function(e){const{linesDelta:t,characterDelta:n,lastLineLength:r}=function(e){const t=s(e.text);let n=t.length-1;o(e)&&(n-=1);const r=e.text.length,i=t[n].length;return{linesDelta:n,characterDelta:r,lastLineLength:i}}(e);return e.range.start.translate(t,0===t?n:-e.range.start.character+r)},t.isOnlyWhitespaces=i,t.isEmptyLinesWithNewlineAutoInsert=o},4624:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decorationType=void 0;const r=n(7549),i=n(9973),o=n(5104),s=n(7054),a=n(1988),c=n(2478),u=n(4401),l=n(4735),p=n(3981),f=n(966),d=n(5970),h=n(1414),m=n(1216),g=n(248),v=n(973),y=n(1086),_=n(5011);t.decorationType=r.window.createTextEditorDecorationType({}),t.default=async function(e){const t=function(e){return a.default()===a.SuggestionsMode.INLINE||e.extensionMode===r.ExtensionMode.Test}(e),E=function(e){return s.isCapabilityEnabled(s.Capability.SNIPPET_SUGGESTIONS)||e.extensionMode===r.ExtensionMode.Test}(e);if(t||E){if(await async function(){return s.isCapabilityEnabled(s.Capability.BETA_CAPABILITY)&&_.isInlineSuggestionApiSupported()&&await u.default()}()){const t={provideInlineCompletionItems:(await Promise.resolve().then((()=>n(1465)))).default};return e.subscriptions.push(r.languages.registerInlineCompletionItemProvider({pattern:"**"},t),...l.initTracker()),void r.window.getInlineCompletionItemController(t).onDidShowCompletionItem((e=>{var t;if(void 0===e.completionItem.isCached)return;if(e.completionItem.completionKind===i.CompletionKind.Snippet&&!e.completionItem.isCached){const n=null===(t=r.window.activeTextEditor)||void 0===t?void 0:t.document.fileName,i=e.completionItem.snippetIntent;if(!i||!n)return void console.warn(`Could not send SnippetShown request. intent is null: ${!i}, filename is null: ${!n}`);o.default({[c.StatePayload.SNIPPET_SHOWN]:{filename:n,intent:i}})}}))}t&&(await async function(){await r.commands.executeCommand("setContext","tabnine.inline-suggestion:enabled",!0)}(),r.workspace.onDidChangeTextDocument(y.default)),E&&(await async function(){await r.commands.executeCommand("setContext","tabnine.snippet-suggestion:enabled",!0)}(),s.isCapabilityEnabled(s.Capability.SNIPPET_AUTO_TRIGGER)&&r.workspace.onDidChangeTextDocument(m.default),e.subscriptions.push(r.commands.registerTextEditorCommand(`${c.SNIPPET_COMMAND}`,(({document:e,selection:t})=>{v.default(e,t.active)})))),e.subscriptions.push(r.commands.registerTextEditorCommand(`${c.ACCEPT_INLINE_COMMAND}`,(e=>{p.default(e)})),r.commands.registerTextEditorCommand(`${c.ESCAPE_INLINE_COMMAND}`,(()=>{f.default()})),r.commands.registerTextEditorCommand(`${c.NEXT_INLINE_COMMAND}`,(({document:e,selection:t})=>{const n=d.getNextSuggestion();n&&h.default(e,t.active,n)})),r.commands.registerTextEditorCommand(`${c.PREV_INLINE_COMMAND}`,(({document:e,selection:t})=>{const n=d.getPrevSuggestion();n&&h.default(e,t.active,n)}))),r.window.onDidChangeTextEditorSelection((e=>{const t=g.isInSnippetInsertion(),n=h.isShowingDecoration();t&&!n||e.kind===r.TextEditorSelectionChangeKind.Command||f.default()}))}}},1414:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isShowingDecoration=t.clearInlineDecoration=void 0;const r=n(7549),i=n(9973),o=n(5970),s=n(513),a=n(974),c=n(7704),u=n(2005),l=r.window.createTextEditorDecorationType({});let p=!1;async function f(){var e;null===(e=r.window.activeTextEditor)||void 0===e||e.setDecorations(l,[]),await c.handleClearSnippetDecoration(),p=!1}t.default=async function(e,t,n){await f();const d=o.getCurrentPrefix();if(function(e,t,n,i){return!function(e,t){var n;return null===(n=t.new_prefix)||void 0===n?void 0:n.includes(e)}(e,t)||function(e,t){const n=e.getText(new r.Range(t,t.translate(0,1)));return!function(e){return['"',"'","`","]",")","}",">"].includes(e)}(n)&&!!n.trim()}(n,i)}(d,n,e,t))return void o.clearState();const h=function(e,t,n,i){const o=function(e,t){return null==e?void 0:e.replace(t,"")}((null==n?void 0:n.new_prefix)||"",i||""),s=e.getText(new r.Range(t,t.translate(0,o.length)));return a.trimEnd(o,s)}(e,t,n,d);!async function(e,t){var n,a;const f=(null===(n=o.getCurrentSuggestion())||void 0===n?void 0:n.completion_kind)===i.CompletionKind.Snippet?await c.getSnippetDecorations(e,t):function(e,t){const n=[];return n.push({renderOptions:{after:{color:u.default(),contentText:e,margin:"0 0 0 0",textDecoration:"none; white-space: pre;"}},range:new r.Range(t,t)}),n.push({hoverMessage:s.default(),range:new r.Range(t,t.translate(void 0,e.length))}),n}(t,e);null===(a=r.window.activeTextEditor)||void 0===a||a.setDecorations(l,f),p=!0}(t,h)},t.clearInlineDecoration=f,t.isShowingDecoration=function(){return p}},8578:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i=n(9810),o=n(974),s=n(966);t.default=async function(e,t,n,a,c){const u=n.with(void 0,0),l=function({new_prefix:e},t){const n=new r.SnippetString(" ".repeat(t));return n.appendText(o.escapeTabStopSign(e)),n.appendTabstop(0),n}(t,function(e,t){return e.selection.active.character-e.document.lineAt(t).text.trim().length}(e,u)),p={currentCompletion:t.new_prefix,completions:a,position:n,limited:!1,oldPrefix:c};await s.default();const f=new r.Range(u,n);await e.insertSnippet(l,f),r.commands.executeCommand(i.COMPLETION_IMPORTS,p)}},1216:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2087),i=n(2818),o=n(248),s=n(973);t.default=async function({document:e,contentChanges:t}){const[n]=t;if(!n)return;const a=i.default(n),c=n.text.includes(r.EOL),u=""===e.lineAt(a.line).text.trim();!o.isInSnippetInsertion()&&c&&u&&await s.default(e,a)}},248:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeBlankSnippet=t.insertBlankSnippet=t.getSnippetBlankRange=t.isInSnippetInsertion=void 0;const r=n(2087),i=n(7549);let o;t.isInSnippetInsertion=function(){return!!o},t.getSnippetBlankRange=function(){return o},t.insertBlankSnippet=async function(e,t){var n;o=void 0;const s=null===(n=i.window.activeTextEditor)||void 0===n?void 0:n.document.lineAt(t).text;0===(null==s?void 0:s.trim().length)?await async function(e,t){var n;const s=new i.SnippetString(" ".repeat(t.character));s.appendTabstop(0),s.appendText(r.EOL.repeat(e.length-1)),o=new i.Range(t,t.translate(e.length-1,-t.character)),await(null===(n=i.window.activeTextEditor)||void 0===n?void 0:n.insertSnippet(s,t.with(t.line,0)))}(e,t):await async function(e,t){var n;const s=new i.SnippetString;s.appendTabstop(0),s.appendText(r.EOL.repeat(e.length-1)),o=new i.Range(t,t.translate(e.length-1,-t.character)),await(null===(n=i.window.activeTextEditor)||void 0===n?void 0:n.insertSnippet(s,t.with(t.line+1,0))),await async function(e){await i.commands.executeCommand("cursorMove",{to:"up",by:"line"}),await i.commands.executeCommand("cursorMove",{to:"right",by:"character",value:e.character})}(t)}(e,t)},t.removeBlankSnippet=async function(){var e,t;if(o){const n=function(e){var t,n;const o=null===(t=i.window.activeTextEditor)||void 0===t?void 0:t.selection.active,s=null===(n=i.window.activeTextEditor)||void 0===n?void 0:n.document.getText(e),a=""!==(null==s?void 0:s.replace(new RegExp(r.EOL,"g"),""));if(o&&a){const t=o.line-e.start.line,n=o.character-e.start.character;return new i.Range(e.start.translate(t,n),e.end.translate(t))}return}(o)||o,s=null===(e=i.window.activeTextEditor)||void 0===e?void 0:e.document.lineAt(n.end).text,a=null==s?void 0:s.length;await(null===(t=i.window.activeTextEditor)||void 0===t?void 0:t.edit((e=>{e.delete(new i.Range(n.start,n.end.translate(0,a)))}))),o=void 0}}},7704:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleClearSnippetDecoration=t.getSnippetDecorations=void 0;const r=n(7549),i=n(2005),o=n(513),s=n(248);t.getSnippetDecorations=async function(e,t){const n=t.split("\n"),a=n[n.length-1].length;await s.insertBlankSnippet(n,e);const c=n.map(((t,n)=>function(e,t,n){const o=Math.max(0,-t.character)+e.length;return{renderOptions:{after:{color:i.default(),contentText:e,margin:"0 0 0 0",textDecoration:"none; white-space: pre;"}},range:new r.Range(t.translate(n,0),t.translate(n,0===n?0:o))}}(t,e,n)));return c.push({hoverMessage:o.default(),range:new r.Range(e,e.translate(n.length,a))}),c},t.handleClearSnippetDecoration=async function(){await s.removeBlankSnippet()}},973:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i=n(5970),o=n(3875),s=n(1414);t.default=async function(e,t){var n;const a=await o.default(e,t);if((null===(n=r.window.activeTextEditor)||void 0===n?void 0:n.document.uri)!==e.uri)return;await i.setSuggestionsState(a);const c=i.getCurrentSuggestion();c&&await s.default(e,t,c)}},4735:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initTracker=t.getShouldComplete=void 0;const r=n(7549);let i=!1,o=!1;function s(){o?(i=!0,o=!1):i=!1}t.getShouldComplete=function(){return i},t.initTracker=function(){return[r.workspace.onDidChangeTextDocument((({contentChanges:e})=>{const t=e[0];(null==t?void 0:t.rangeLength)>=0&&""!==(null==t?void 0:t.text)&&(o=!0)})),r.window.onDidChangeTextEditorSelection(s)]}},4234:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549);class i extends r.InlineCompletionItem{constructor(e,t,n,r,i,o){super(e,t,n),this.isCached=i,this.completionKind=r,this.snippetIntent=o}}t.default=i},1086:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSingleTypingChange=void 0;const r=n(296),i=n(5970),o=n(3875),s=n(1414),a=n(966),c=n(248),u=n(2478),l=n(974),p=n(7054),f=n(2818),d=r.debounce(((e,t)=>{o.default(e,t).then((n=>h(n,e,t))).catch((e=>console.error("Could not request completion at empty line: ",e)))}),550);async function h(e,t,n){await i.setSuggestionsState(e);const r=i.getCurrentSuggestion();r?await s.default(t,n,r):a.default()}function m(e,t){const n=1===e.length,r=1===t.text.length;return n&&r}t.default=async function({document:e,contentChanges:t}){const[n]=t;if(!n)return;const r=f.default(n),i=p.isCapabilityEnabled(p.Capability.EMPTY_LINE_SUGGESTIONS)&&function(e,t){return f.isEmptyLinesWithNewlineAutoInsert(e)||f.isOnlyWhitespaces(t.text)}(n,e.lineAt(r.line))&&!c.isInSnippetInsertion();if(d.clear(),i)return await o.default(e,r),await l.sleep(250),void d(e,r);if((i||m(t,n))&&e.uri.scheme===u.URI_SCHEME_FILE){const t=await o.default(e,r);await h(t,e,r)}},t.isSingleTypingChange=m},5787:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9913),i=n(2478);t.default=async function(e){return(null==e?void 0:e.includes(i.MessageActions.OPEN_HUB))?r.openConfigWithSource(i.StateType.NOTIFICATION)():Promise.resolve()}},1201:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doPollNotifications=t.cancelNotificationsPolling=void 0;const r=n(7549),i=n(2189),o=n(5787),s=n(2478),a=n(974),c=n(5104);let u=null;async function l(e){const t=await i.getNotifications();t&&t.notifications&&t.notifications.forEach((t=>{!async function({id:e,message:t,notification_type:n,options:u,state:l},p){try{await a.assertFirstTimeReceived(e,p),c.default({[s.StatePayload.NOTIFICATION_SHOWN]:{id:e,text:t,notification_type:n,state:l}}),await r.window.showInformationMessage(t,...u.map((e=>e.key))).then((r=>{const s=u.find((({key:e})=>e===r));i.sendNotificationAction(e,t,r,n,null==s?void 0:s.actions,l),o.default(null==s?void 0:s.actions)}))}catch(e){return Promise.resolve()}}(t,e)}))}t.default=function(e){u=setInterval((()=>{l(e)}),s.BINARY_NOTIFICATION_POLLING_INTERVAL)},t.cancelNotificationsPolling=function(){u&&clearInterval(u)},t.doPollNotifications=l},1449:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7054),i=n(9973),o=n(2478),s=n(3583);t.default=function(e){s.default(e,{capability:r.Capability.NOTIFICATIONS_WIDGET,getHubBaseUrlSource:o.StateType.NOTIFICATIONS_WIDGET_WEBVIEW,hubPath:"/notifications-widget",viewId:"tabnine-notifications",readyCommand:"tabnine.notifications-ready",onWebviewLoaded:()=>{i.fireEvent({name:"loaded-notificaitons-widget-as-webview"}).catch(console.error)}})}},8204:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1249),i=n(7549),o=n(2478),s=n(2497),a=n(7348),c=n(1357),u=n(9030),l=n(3738),p=n(7054),f="9999.9999.9999";t.default=async function(e){try{if(async function(e){const t=e.globalState.get(o.BETA_CHANNEL_MESSAGE_SHOWN_KEY);if(!l.isPreReleaseChannelSupported()||!a.default.isVscodeInsiders&&!p.isCapabilityEnabled(p.Capability.ALPHA_CAPABILITY)||t||a.default.isExtentionBetaChannelEnabled)return;await u.default({messageId:"vscode-join-beta-channel",messageText:"Do you wish to help Tabnine get better? Enable Tabnine's extension beta channel if so!",buttonText:"Open Settings",action:()=>{i.commands.executeCommand("workbench.action.openSettings","tabnine.receiveBetaChannelUpdates")}}),await e.globalState.update(o.BETA_CHANNEL_MESSAGE_SHOWN_KEY,!0)}(e),l.userConsumesPreReleaseChannelUpdates()){const t=await async function(){return JSON.parse(await s.downloadFileToStr(o.LATEST_RELEASE_URL))[0].assets[0].browser_download_url}(),n=l.getAvailableAlphaVersion(t);if(function(e,t){var n,i;const o=l.getCurrentVersion(e),s=(null===(n=r.coerce(t))||void 0===n?void 0:n.version)||"",a=!!o&&r.gt(t,o)&&r.neq(s,f),c=!!(null===(i=r.prerelease(t))||void 0===i?void 0:i.includes("alpha")),u=!!o&&r.eq(s,o)&&c;return c&&a||u}(e,n)){const{name:r}=await c.default(".vsix");await s.downloadFileToDestination(t,r),await i.commands.executeCommand(o.INSTALL_COMMAND,i.Uri.file(r)),await l.updatePersistedAlphaVersion(e,n),u.default({messageId:"prerelease-installer-update",messageText:`TabNine has been updated to ${n} version. Please reload the window for the changes to take effect.`,buttonText:"Reload",action:()=>{i.commands.executeCommand("workbench.action.reloadWindow")}})}}}catch(e){console.error(e)}}},9030:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i=n(9973),o=n(5104),s=n(2478);t.default=async function(e){o.default({[s.StatePayload.NOTIFICATION_SHOWN]:{id:e.messageId,text:e.messageText,notification_type:"System",state:null}}),await r.window.showInformationMessage(e.messageText,e.buttonText).then((t=>{t===e.buttonText&&e.action(),i.fireEvent({name:"Notification "+(t?"Clicked":"Dismissed"),action_type:"button",message_name:e.messageId,source:"ide",type:"System",message_text:e.messageText,action_name:t||"dismissed"})}))}},3738:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.userConsumesPreReleaseChannelUpdates=t.isPreReleaseChannelSupported=t.getAvailableAlphaVersion=t.updatePersistedAlphaVersion=t.getPersistedAlphaVersion=t.getCurrentVersion=void 0;const r=n(1249),i=n(7054),o=n(2478),s=n(7348);function a(e){return e.globalState.get(o.ALPHA_VERSION_KEY)}function c(){return r.gte(s.default.vscodeVersion,o.MINIMAL_SUPPORTED_VSCODE_API)}t.getCurrentVersion=function(e){return a(e)||s.default.version},t.getPersistedAlphaVersion=a,t.updatePersistedAlphaVersion=function(e,t){return e.globalState.update(o.ALPHA_VERSION_KEY,t)},t.getAvailableAlphaVersion=function(e){const t=e.match(/(?<=download\/)(.*)(?=\/tabnine-vscode)/gi);return t&&t[0]||""},t.isPreReleaseChannelSupported=c,t.userConsumesPreReleaseChannelUpdates=function(){return c()&&(i.isCapabilityEnabled(i.Capability.ALPHA_CAPABILITY)||s.default.isExtentionBetaChannelEnabled)}},5844:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.completionIsAllowed=void 0;const r=n(7549),i=n(2478),o=n(7348),s=n(3875),a=n(9810),c=n(7962),u=n(974);function l(e){return(e.user_message||[]).join("\n")||i.DEFAULT_DETAIL}function p(e,t){const n=r.workspace.getConfiguration();let i=n.get("tabnine.disable_line_regex");void 0===i&&(i=[]);const o=e.getText(new r.Range(t.with({character:0}),t.with({character:500})));if(i.some((e=>new RegExp(e).test(o))))return!1;let s=n.get("tabnine.disable_file_regex");return void 0===s&&(s=[]),!s.some((t=>new RegExp(t).test(e.fileName)))}t.default=async function(e,t){return new r.CompletionList(await async function(e,t){try{if(!p(e,t))return[];const n=await s.default(e,t);if(c.setCompletionStatus(null==n?void 0:n.is_locked),!n||0===(null==n?void 0:n.results.length))return[];const f=function(e,t,n){if(e.results.some((e=>e.kind||e.documentation)))return!1;const i=n.translate(0,-e.old_prefix.length),o=t.getText(new r.Range(t.lineAt(i).range.start,i));return o.endsWith(".")||o.endsWith("::")}(n,e,t)||n.is_locked?1:n.results.length;return n.results.slice(0,f).map(((s,c)=>function(e){const t=new r.CompletionItem(i.ATTRIBUTION_BRAND+e.entry.new_prefix);e.limited?t.detail=`${i.LIMITATION_SYMBOL} ${i.BRAND_NAME}`:t.detail=i.BRAND_NAME;t.sortText=String.fromCharCode(0)+String.fromCharCode(e.index),t.insertText=new r.SnippetString(u.escapeTabStopSign(e.entry.new_prefix)),t.filterText=e.entry.new_prefix,t.preselect=0===e.index,t.kind=e.entry.kind,t.range=new r.Range(e.position.translate(0,-e.oldPrefix.length),e.position.translate(0,e.entry.old_suffix.length)),o.default.isTabNineAutoImportEnabled&&(t.command={arguments:[{currentCompletion:e.entry.new_prefix,completions:e.results,position:e.position,limited:e.limited,oldPrefix:e.oldPrefix}],command:a.COMPLETION_IMPORTS,title:"accept completion"});e.entry.new_suffix&&t.insertText.appendTabstop(0).appendText(u.escapeTabStopSign(e.entry.new_suffix));e.entry.documentation&&(t.documentation=function(e){if(t=e,"string"!=typeof t)return"markdown"===e.kind?new r.MarkdownString(e.value):e.value;var t;return e}(e.entry.documentation));return t}({document:e,index:c,position:t,detailMessage:l(n),oldPrefix:null==n?void 0:n.old_prefix,entry:s,results:null==n?void 0:n.results,limited:null==n?void 0:n.is_locked})))}catch(e){return console.error(`Error setting up request: ${e}`),[]}}(e,t),true)},t.completionIsAllowed=p},1465:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i=n(4234),o=n(5844),s=n(3875),a=n(9810),c=n(4735),u=n(8325);function l(e,t,n){return{arguments:[{currentCompletion:e.new_prefix,completions:null==t?void 0:t.results,position:n,limited:null==t?void 0:t.is_locked,snippetIntent:null==t?void 0:t.snippet_intent,oldPrefix:null==t?void 0:t.old_prefix}],command:a.COMPLETION_IMPORTS,title:"accept completion"}}t.default=async function(e,t,n){try{if(!o.completionIsAllowed(e,t)||function(e,t){const n=e.getText(new r.Range(t,t.translate(0,1)));return!function(e){return['"',"'","`","]",")","}",">"].includes(e)}(n)&&!!n.trim()}(e,t)||!c.getShouldComplete())return new r.InlineCompletionList([]);const a=n.selectedCompletionInfo;return a?await async function(e,t,n){const o=await u.default((()=>s.default(e,t.range.start,void 0,t.text)),(e=>!(null==e?void 0:e.results.length)),2),a=function(e,t){return null==e?void 0:e.results.filter((({new_prefix:e})=>e.startsWith(t.text))).sort(((e,t)=>parseInt(t.detail||"",10)-parseInt(e.detail||"",10)))[0]}(o,t),c=a&&o&&new i.default(a.new_prefix.replace(o.old_prefix,t.text),t.range,l(a,o,n),a.completion_kind,a.is_cached,o.snippet_intent);return new r.InlineCompletionList(c&&[c]||[])}(e,a,t):await async function(e,t){const n=0===e.lineAt(t.line).text.trim().length,o=await s.default(e,t,n?3e3:void 0),a=null==o?void 0:o.results.map((e=>new i.default(e.new_prefix,function(e,t,n){return new r.Range(e.translate(0,-t.old_prefix.length),e.translate(0,n.old_suffix.length))}(t,o,e),l(e,o,t),e.completion_kind,e.is_cached,o.snippet_intent)));return new r.InlineCompletionList(a||[])}(e,t)}catch(e){return console.error(`Error setting up request: ${e}`),new r.InlineCompletionList([])}}},9471:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9146),i=n(8835),o=n(7549);t.default=function(){const e=function(){let e=o.workspace.getConfiguration().get("http.proxy");e||(e=process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy);return e}();if(!e)return{agent:void 0,rejectUnauthorized:!1};const t=i.parse(e);if("https:"!==t.protocol&&"http:"!==t.protocol)return{agent:void 0,rejectUnauthorized:!1};const n=o.workspace.getConfiguration().get("http.proxyStrictSSL",!0),s=t.port?parseInt(t.port,10):void 0,a=Number.isNaN(s)?void 0:s,c={host:t.hostname,port:a,auth:t.auth,rejectUnauthorized:n};return{agent:new r.default(c),rejectUnauthorized:n}}},9011:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(294);let i;async function o(){return i||(i=async function(){var e,t,n,i,o,s,a,c;const[u,l,p]=await Promise.all([r.cpu(),r.osInfo(),r.mem()]);return{os:{platform:null!==(e=null==l?void 0:l.platform)&&void 0!==e?e:"unknown-platform",distro:null!==(t=null==l?void 0:l.distro)&&void 0!==t?t:"unknown-distro",arch:null!==(n=null==l?void 0:l.arch)&&void 0!==n?n:"unknown-arch",kernel:null!==(i=null==l?void 0:l.kernel)&&void 0!==i?i:"unknown-kernel"},cpu:{manufacturer:null!==(o=null==u?void 0:u.manufacturer)&&void 0!==o?o:"unknown-manufacturer",brand:null!==(s=null==u?void 0:u.brand)&&void 0!==s?s:"unknown-brand",speed_ghz:null!==(a=null==u?void 0:u.speed)&&void 0!==a?a:-1,cores:null!==(c=null==u?void 0:u.cores)&&void 0!==c?c:-1},memory_gb:(null==p?void 0:p.total)?Math.round((f=p.total,f/1e9)):-1};var f}()),i}t.default=async function(){try{const e=await o();return{timestamp:(new Date).toISOString(),platform:`${e.os.platform}`,distro:`${e.os.distro}`,arch:`${e.os.arch}`,kernel:`${e.os.kernel}`,cpu_manufacturer:`${e.cpu.manufacturer}`,cpu_brand:`${e.cpu.brand}`,cores:`${e.cpu.cores}`,speed_ghz:`${e.cpu.speed_ghz}`,memory_gb:`${e.memory_gb}`}}catch(e){return void console.log(`Could not fetch specs data, skipping: ${e}`)}}},9142:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.disposeReporter=t.reportException=t.reportErrorEvent=t.report=t.initReporter=t.EventName=void 0;const r=n(7549),i=n(4398),o=n(9011);!function(e){e.EXTENSION_INSTALLED="extension-installed",e.EXTENSION_ACTIVATED="extension-activated",e.EXTENSION_UNINSTALLED="extension-uninstalled",e.BUNDLE_DOWNLOAD_SUCCESS="bundle-download-success",e.BUNDLE_DOWNLOAD_FAILURE="bundle-download-failure",e.START_BINARY="tabnine-binary-run"}(t.EventName||(t.EventName={}));let s,a=!1;t.initReporter=function(e,t,n,o){a=e.extensionMode===r.ExtensionMode.Test,a||(s=new i.default(t,n,o),e.subscriptions.push(s))},t.report=function(e){a||o.default().then((t=>s.sendTelemetryEvent(e,t)))},t.reportErrorEvent=function(e,t){a||o.default().then((n=>{const r={...null!=n?n:{},error:t.message};s.sendTelemetryErrorEvent(e,r)}))},t.reportException=function(e){a||o.default().then((t=>{s.sendTelemetryException(e,t)}))},t.disposeReporter=function(){s.dispose()}},3875:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i=n(9973),o=n(7054),s=n(2478);function a(){return o.isCapabilityEnabled(o.Capability.SUGGESTIONS_SINGLE)?1:o.isCapabilityEnabled(o.Capability.SUGGESTIONS_TWO)?2:s.MAX_NUM_RESULTS}t.default=async function(e,t,n,o=""){const c=e.offsetAt(t),u=Math.max(0,c-s.CHAR_LIMIT),l=c+s.CHAR_LIMIT,p=e.positionAt(u),f=e.positionAt(l),d={filename:e.fileName,before:e.getText(new r.Range(p,t))+o,after:e.getText(new r.Range(t,f)),region_includes_beginning:0===u,region_includes_end:e.offsetAt(f)!==l,max_num_results:a(),offset:c,line:t.line,character:t.character};return i.autocomplete(d,n)}},663:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.enableSaveSnippetContext=t.OK_BUTTON=t.NO_RESPONSE_ERROR_MESSAGE=t.ERROR_MESSAGE_PREFIX=t.SUCCESS_MESSAGE=void 0;const r=n(7549),i=n(9973);t.SUCCESS_MESSAGE="Snippet saved successfully!",t.ERROR_MESSAGE_PREFIX="Failed to save snippet",t.NO_RESPONSE_ERROR_MESSAGE="No response from Tabnine Engine",t.OK_BUTTON="Ok",t.default=async function(){const e=r.window.activeTextEditor;if(!e)return;const{document:n,selection:o}=e,s={code:n.getText(o),filename:n.fileName,start_offset:n.offsetAt(o.start),end_offset:n.offsetAt(o.end)},a=await i.saveSnippet(s),c=(u=a)?u.result.Error:t.NO_RESPONSE_ERROR_MESSAGE;var u;await r.window.showInformationMessage(function(e){return e?`${t.ERROR_MESSAGE_PREFIX}: ${e}`:t.SUCCESS_MESSAGE}(c),t.OK_BUTTON)},t.enableSaveSnippetContext=async function(){await r.commands.executeCommand("setContext","tabnine.save-snippets:enabled",!0)}},9810:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleImports=t.getSelectionHandler=t.HANDLE_IMPORTS=t.COMPLETION_IMPORTS=void 0;const r=n(7549),i=n(1880),o=n(6291),s=n(2478),a=n(5104),c=n(80),u=n(8806),l=n(1201);function p(e){return e.origin===o.default.LSP?"":e.detail}function f(e){var t;const n=e.document.fileName.split(".");return null!==(t=n[Math.max(1,n.length-1)])&&void 0!==t?t:"undefined"}t.COMPLETION_IMPORTS="tabnine-completion-imports",t.HANDLE_IMPORTS="tabnine-handle-imports",t.getSelectionHandler=function(e){return function(n,i,{currentCompletion:s,completions:d,position:h,limited:m,snippetIntent:g,oldPrefix:v}){try{!function(t,n,i,s,d,h,m){if(t&&(null==n?void 0:n.length)){const g=function(e,t,n,i,s,a,c){const u=e.findIndex((({new_prefix:e})=>e===t));let l=0,d=0,h=0,m=0,g=0;const v=e[u],y=e.map((e=>{var t;switch(e.origin){case o.default.VANILLA:l+=1;break;case o.default.LOCAL:d+=1;break;case o.default.CLOUD:h+=1;break;case o.default.LSP:m+=1;break;case o.default.VANILLA_KEYWORD:g+=1}return{length:e.new_prefix.length,strength:p(e),origin:null!==(t=e.origin)&&void 0!==t?t:o.default.UNKNOWN}})),{length:_}=t,E=_-((null==a?void 0:a.length)||0),b=p(v),{origin:w}=v,S=i.document.getText(new r.Range(new r.Position(s.line,0),s)).trimLeft().length,I=S-(_-E),C=v.new_prefix.includes("\n")?0:i.document.lineAt(s).text.trim().length-(S+E),x=e.length;return{Selection:{language:f(i),length:_,net_length:E,strength:b,origin:null!=w?w:o.default.UNKNOWN,index:u,line_prefix_length:S,line_net_prefix_length:I,line_suffix_length:C,num_of_suggestions:x,num_of_vanilla_suggestions:l,num_of_deep_local_suggestions:d,num_of_deep_cloud_suggestions:h,num_of_lsp_suggestions:m,num_of_vanilla_keyword_suggestions:g,suggestions:y,is_locked:n,completion_kind:v.completion_kind,snippet_intent:c}}}(n,i,s,d,t,h,m);a.default(g).then((()=>{l.doPollNotifications(e),c.doPollStatus(e),u.default(e,t)}))}}(h,d,s,m,n,v,g),r.commands.executeCommand(t.HANDLE_IMPORTS,{completion:s})}catch(e){console.error(e)}}},t.handleImports=function(e,n,{completion:o}){const a=o.split("\n"),{selection:c}=e,u=new r.Selection(c.active.translate(-(a.length-1),a.length>1?-c.active.character:-o.length),c.active);setTimeout((()=>{!async function(e,n,o){try{const s=await r.commands.executeCommand("vscode.executeCodeActionProvider",e.document.uri,n,r.CodeActionKind.QuickFix.value),a=i.default(s)[0];a&&a.edit&&(await r.workspace.applyEdit(a.edit),await r.commands.executeCommand(t.HANDLE_IMPORTS,{completion:o}))}catch(e){console.error(e)}}(e,u,o)}),s.DELAY_FOR_CODE_ACTION_PROVIDER)}},2323:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7054),i=n(2478),o=n(3738);t.default=class{constructor(e,t){this._statusBarItem=e,this._context=t,this._limited=!1}set limited(e){this._limited=e,this.updateStatusBar()}set serviceLevel(e){this._serviceLevel=e,this.updateStatusBar()}get serviceLevel(){return this._serviceLevel}set icon(e){this._icon=e||void 0,this.updateStatusBar()}get icon(){return this._icon}set text(e){this._text=e||void 0,this.updateStatusBar()}get text(){return this._text}updateStatusBar(){var e;const t=this._text?`: ${this._text}`:"",n=this.getDisplayServiceLevel(),s=this._limited?` ${i.LIMITATION_SYMBOL}`:"";this._statusBarItem.text=`${i.FULL_BRAND_REPRESENTATION}${n}${this.getIconText()}${t.trimEnd()}${s}`,this._statusBarItem.tooltip=r.isCapabilityEnabled(r.Capability.SHOW_AGRESSIVE_STATUS_BAR_UNTIL_CLICKED)&&!this._context.globalState.get(i.STATUS_BAR_FIRST_TIME_CLICKED)?"Click 'tabnine' for settings and more information":`${i.FULL_BRAND_REPRESENTATION} (Click to open settings)${null!==(e=o.getPersistedAlphaVersion(this._context))&&void 0!==e?e:""}`}getDisplayServiceLevel(){return"Business"===this._serviceLevel?" business":"Trial"===this._serviceLevel?" pro":"Pro"===this._serviceLevel?" team":""}getIconText(){return this._icon?` ${this._icon}`:r.isCapabilityEnabled(r.Capability.SHOW_AGRESSIVE_STATUS_BAR_UNTIL_CLICKED)&&!this._context.globalState.get(i.STATUS_BAR_FIRST_TIME_CLICKED)?" 👈":""}}},7584:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e,t){this.id=t,this.item=e}}},80:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.disposeStatus=t.doPollStatus=void 0;const r=n(9851),i=n(2478),o=n(7962),s=n(4492);let a=null;async function c(e){const t=await r.getStatus();(null==t?void 0:t.message)&&s.default(e,t)}t.default=function(e){a=setInterval((()=>{c(e),o.pollServiceLevel()}),i.BINARY_STATUS_BAR_FIRST_MESSAGE_POLLING_INTERVAL),o.onStartServiceLevel()},t.doPollStatus=c,t.disposeStatus=function(){s.disposeStatusBarCommand(),a&&clearInterval(a),o.resetDefaultStatus()}},7962:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearPromotion=t.setPromotionStatus=t.setCompletionStatus=t.setLoadingStatus=t.resetDefaultStatus=t.setDefaultStatus=t.onStartServiceLevel=t.promotionTextIs=t.pollServiceLevel=t.registerStatusBar=void 0;const r=n(7549),i=n(9973),o=n(9913),s=n(2478),a=n(2323),c=n(7584);let u,l;function p(){u&&(u.icon=null,u.text=null)}function f(e){u&&(u.text=e,u.icon="$(sync~spin)")}function d(){l&&(l.item.text="",l.item.tooltip="",l.item.hide())}t.registerStatusBar=function(e){if(u)return;const t=r.window.createStatusBarItem(r.StatusBarAlignment.Left,-1);l=new c.default(r.window.createStatusBarItem(r.StatusBarAlignment.Left,-1)),u=new a.default(t,e),t.command=o.STATUS_BAR_COMMAND,t.show();try{t.name=s.STATUS_NAME,l.item.name=s.STATUS_NAME}catch(e){console.error("failed to rename status bar")}f("Starting..."),e.subscriptions.push(t),e.subscriptions.push(l.item)},t.pollServiceLevel=async function(){if(!u)return;const e=await i.getState();u.serviceLevel=null==e?void 0:e.service_level},t.promotionTextIs=function(e){var t;return(null===(t=null==l?void 0:l.item)||void 0===t?void 0:t.text)===e},t.onStartServiceLevel=async function(){if(!u)return;const e=await i.getState();u.serviceLevel=null==e?void 0:e.service_level},t.setDefaultStatus=p,t.resetDefaultStatus=function(e){(!e||l&&l.id&&l.id===e)&&(p(),d())},t.setLoadingStatus=f,t.setCompletionStatus=function(e=!1){u&&(u.limited=e)},t.setPromotionStatus=function(e,t,n,r){u&&l&&(l.id=e,l.item.text=t,l.item.command=r,l.item.tooltip=`${s.FULL_BRAND_REPRESENTATION}${n?` - ${n}`:""}`,l.item.color="yellow",u.text=" ",l.item.show())},t.clearPromotion=d},4492:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.disposeStatusBarCommand=void 0;const r=n(7549),i=n(5104),o=n(9851),s=n(2478),a=n(7962),c=n(974),u=n(9913);let l;t.default=function(e,t){!function(e,t){null==l||l.dispose(),l=r.commands.registerCommand(s.OPEN_LP_FROM_STATUS_BAR,(()=>{!function(e){const t=e.actions;(null==t?void 0:t.includes(s.MessageActions.OPEN_HUB))&&u.openConfigWithSource(s.StateType.STATUS)();a.resetDefaultStatus(e.id)}(e),o.sendStatusBarAction(e.id,e.message,e.notification_type,e.actions,e.state)})),t.subscriptions.push(l)}(t,e),a.promotionTextIs(t.message)||i.default({[s.StatePayload.STATUS_SHOWN]:{id:t.id,text:t.message,notification_type:t.notification_type,state:t.state}}),a.setPromotionStatus(t.id,t.message,t.title,s.OPEN_LP_FROM_STATUS_BAR);let n=s.STATUS_BAR_NOTIFICATION_PERIOD;t.duration_seconds&&(n=1e3*t.duration_seconds),async function(e,t){await c.sleep(t),a.resetDefaultStatus(e)}(t.id,n)},t.disposeStatusBarCommand=function(){l&&l.dispose()}},6362:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9973),i=n(7054),o=n(2478),s=n(3583);t.default=function(e){s.default(e,{capability:i.Capability.TABNINE_TODAY_WIDGET,getHubBaseUrlSource:o.StateType.TABNINE_TODAY_WIDGET_WEBVIEW,hubPath:"/tabnine-today-widget",readyCommand:"tabnine.tabnine-today-ready",viewId:"tabnine-today",onWebviewLoaded:()=>{r.fireEvent({name:"loaded-tabnine-today-widget-as-webview"}).catch(console.error)}})}},5517:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549);class i extends r.TreeItem{constructor(e,t){super(e,r.TreeItemCollapsibleState.None),this.label=e,this.command=t,this.contextValue="tabnine",this.tooltip=`${this.label}`}}t.default=i},870:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2478),i=n(5517);t.default=class{getTreeItem(e){return e}getChildren(){return[new i.default("Manage your team",{title:"Manage your team",command:r.TABNINE_OPEN_APP_COMMAND,arguments:[]}),new i.default("Configure your IDE",{title:"Configure your IDE",command:r.TABNINE_TREE_NAVIGATION_COMMAND,arguments:[]})]}}},396:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i=n(9973),o=n(2478),s=n(9980);t.default=async function(e){const t=await i.configuration({quiet:!0,source:o.StateType.TREE_VIEW});if(t&&t.message){const n=await r.env.asExternalUri(r.Uri.parse(t.message));s.default(n,e)}}},3470:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i=n(5103),o=n(9973),s=n(7054),a=n(2478),c=n(396),u=n(870);t.default=function(e){try{e.subscriptions.push(r.window.registerTreeDataProvider("tabnine-home",new u.default),r.commands.registerCommand(a.TABNINE_TREE_NAVIGATION_COMMAND,(e=>{c.default(e),o.fireEvent({name:"hub-opened-from-sidebar"})})),r.commands.registerCommand(a.TABNINE_OPEN_APP_COMMAND,(()=>{s.isCapabilityEnabled(s.Capability.NOTIFICATIONS_WIDGET)?i.default(a.TABNINE_APP_URL):r.env.openExternal(r.Uri.parse(a.TABNINE_APP_URL)),o.fireEvent({name:"tabnine-app-opened-from-sidebar"})}))),r.commands.executeCommand("setContext","tabnine.tabnine-navigation-ready",!0)}catch(e){console.error("Error in registerTreeView",e)}}},9613:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHubBaseUrl=void 0;const r=n(9973);t.getHubBaseUrl=async function(e){const t=await r.configuration({quiet:!0,source:e});return null==t?void 0:t.message}},2497:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.downloadResource=t.downloadFileToDestination=t.downloadFileToStr=void 0;const r=n(7211),i=n(5747),o=n(8835),s=n(9471);function a(e,t){return new Promise(((n,i)=>{const u=o.parse(e),{agent:l,rejectUnauthorized:p}=s.default(),f=r.request({host:u.host,path:u.path,port:c(u),agent:l,rejectUnauthorized:p,headers:{"User-Agent":"TabNine.tabnine-vscode"},timeout:3e4},(e=>{if(301===e.statusCode||302===e.statusCode){let r;if("string"==typeof e.headers.location)r=e.headers.location;else{if(!e.headers.location||e.headers.location)return i(new Error("Invalid download location received"));[r]=e.headers.location}return n(a(r,t))}if(200!==e.statusCode&&403!==e.statusCode)return i(new Error(`Failed request statusCode ${e.statusCode||""}`));t(e,n,i),e.on("error",(e=>{i(e)}))}));f.on("error",(e=>{i(e)})),f.end()}))}function c(e){return e.port&&Number(e.port)||("https:"===e.protocol?443:80)}t.downloadFileToStr=function(e){return a(e,((e,t,n)=>{let r="";e.on("data",(e=>{r+=e})),e.on("error",(e=>{n(e)})),e.on("end",(()=>{t(r)}))}))},t.downloadFileToDestination=function(e,t){return a(e,((e,n,r)=>{const o=i.createWriteStream(t);o.on("finish",(()=>{n()})),e.on("error",(e=>{r(e)})),e.pipe(o)}))},t.downloadResource=a},1357:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watch=t.ensureExists=t.asyncExists=void 0;const r=n(6276),i=n(5747),o=n(5622);async function s(e){try{return await i.promises.access(e),!0}catch(e){return!1}}t.default=function(e){return new Promise(((t,n)=>{r.file({postfix:e},((e,r,i,o)=>e?n(e):t({name:r,fd:i,removeCallback:o})))}))},t.asyncExists=s,t.ensureExists=async function(e,t={recursive:!0}){await s(e)||await i.promises.mkdir(e,t)},t.watch=function(e,t){return i.watch(e,((n,r)=>{"rename"===n?s(o.join(e.toString(),r)).then((e=>t(e?"created":"rename",r))):t(n,r)}))}},678:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLogoPath=t.LOGO_BY_THEME=void 0;const r=n(5622),i=n(7549);t.LOGO_BY_THEME={[i.ColorThemeKind.Light]:"logo-dark.svg",[i.ColorThemeKind.Dark]:"logo-light.svg",[i.ColorThemeKind.HighContrast]:"logo.svg"},t.getLogoPath=function(e){return i.Uri.file(r.join(e.extensionPath,t.LOGO_BY_THEME[i.window.activeColorTheme.kind])).toString()}},8325:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=async function e(t,n,r=1,i=1){const o=await t();return i>=r||n(o)?o:e(t,n,r,i+1)}},7448:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rotate=void 0,t.rotate=function(e){let t=0;return{next:()=>(t+=1,t>e&&(t=0),t),prev:()=>(t-=1,t<0&&(t=e),t),current:()=>t}}},7225:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1249);function i(e,t){const n=r.valid(e),i=r.valid(t);return n&&i?r.rcompare(e,t):n?-1:i?1:e<t?-1:e>t?1:0}t.default=function(e){return e.sort(i),e}},974:(e,t)=>{"use strict";function n(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}Object.defineProperty(t,"__esModule",{value:!0}),t.isMultiline=t.escapeTabStopSign=t.trimEnd=t.escapeRegExp=t.formatError=t.asyncFind=t.isFunction=t.sleep=t.assertFirstTimeReceived=t.withPolling=void 0,t.withPolling=function(e,t,n){const r=setInterval((()=>e(o)),t),i=setTimeout((()=>{clearInterval(r)}),n);function o(){clearInterval(r),clearTimeout(i)}},t.assertFirstTimeReceived=async function(e,t){return new Promise(((n,r)=>{t.globalState.get(e)?r(new Error("Already happened")):t.globalState.update(e,!0).then(n,r)}))},t.sleep=function(e){return new Promise((t=>setTimeout(t,e)))},t.isFunction=function(e){return e&&"[object Function]"==={}.toString.call(e)},t.asyncFind=async function(e,t){for await(const n of e)if(await t(n))return n;return null},t.formatError=function(e){return`OS: ${process.platform} - ${process.arch}\n Error: ${e.name}\nMessage: ${e.message}\nStack: ${e.stack||""}`},t.escapeRegExp=n,t.trimEnd=function(e,t){return e.replace(new RegExp(`${n(t)}$`),"")},t.escapeTabStopSign=function(e){return e.replace(new RegExp("\\$","g"),"\\$")},t.isMultiline=function(e){return(null==e?void 0:e.includes("\n"))||!1}},1264:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=e=>`\n<!DOCTYPE html>\n<html lang="en" style="margin: 0; padding: 0; min-width: 100%; min-height: 100%">\n <head>\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <title>Tabnine Hub</title>\n </head>\n <body style="margin: 0; padding: 0; min-width: 100%; min-height: 100%">\n ${e}\n </body>\n</html>`},5573:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2478),i=n(9136),o=n(9613),s=n(974),a=n(1264);t.default=class{constructor(e,t,n){this.source=e,this.hubPath=t,this.onWebviewLoaded=n}resolveWebviewView(e){return e.webview.options={enableScripts:!0,enableCommandUris:!0},async function(e,t,n,u){try{const l=await o.getHubBaseUrl(t),{setLoading:p}=i.default();if(l){const t=`${l}${n}`;c>0&&(e.webview.html=p(),await s.sleep(r.SLEEP_TIME_BEFORE_OPEN_HUB),c=0),e.webview.html=a.default(`\n <iframe src=${t} id="active-frame" frameborder="0" sandbox="allow-same-origin allow-pointer-lock allow-scripts allow-downloads allow-forms" allow="clipboard-read; clipboard-write;" style="display: block; margin: 0px; overflow: hidden; position: absolute; width: 100%; height: 100%; visibility: visible;"></iframe>\n `),u()}else e.webview.html=a.default("\n <div>Failed to load webview</div>\n ")}catch(t){console.error(t),e.webview.html=a.default("\n <div>Failed to load webview</div>\n ")}}(e,this.source,this.hubPath,this.onWebviewLoaded)}};let c=r.SLEEP_TIME_BEFORE_OPEN_HUB},3583:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7549),i=n(7054),o=n(5573);t.default=function(e,t){const n=new o.default(t.getHubBaseUrlSource,t.hubPath,t.onWebviewLoaded);var s,a;e.subscriptions.push(r.window.registerWebviewViewProvider(t.viewId,n)),s=t.capability,a=t.readyCommand,i.isCapabilityEnabled(s)&&r.commands.executeCommand("setContext",a,!0)}},5842:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t,n){this.methodName=t,this.args=n,this.callIndex=++e.globalCallIndex}return e.prototype.isApplicable=function(e,t){var n=this,r=this.methodName===e,i=this.args.length===t.length;return!(!r||!i)&&t.every((function(e,t){return e.match(n.args[t])}))},e.prototype.getCallIndex=function(){return this.callIndex},e.prototype.hasBeenCalledBefore=function(e){return this.getCallIndex()<e.getCallIndex()},e.globalCallIndex=0,e}();t.MethodAction=n},907:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6486),i=function(){function e(){this.items=[]}return e.prototype.add=function(e){this.items.push(e)},e.prototype.getLastMatchingGroupIndex=function(e){var t=r.clone(this.items).reverse().find((function(t){return t.isApplicable(e)}));return t?t.getGroupIndex():-1},e.prototype.getFirstMatchingFromGroupAndRemoveIfNotLast=function(e,t){var n=this.getFirstMatchingFromGroup(e,t);return this.removeIfNotLast(e,t),n},e.prototype.hasMatchingInAnyGroup=function(e){return this.items.some((function(t){return t.isApplicable(e)}))},e.prototype.removeIfNotLast=function(e,t){var n=this.getFirstMatchingIndexFromGroup(e,t);n>-1&&this.getItemsCountInGroup(e)>1&&this.items.splice(n,1)},e.prototype.getFirstMatchingFromGroup=function(e,t){return this.items.find((function(n){return n.getGroupIndex()===e&&n.isApplicable(t)}))},e.prototype.getFirstMatchingIndexFromGroup=function(e,t){return this.items.findIndex((function(n){return n.getGroupIndex()===e&&n.isApplicable(t)}))},e.prototype.getItemsCountInGroup=function(e){return this.items.filter((function(t){return t.getGroupIndex()===e})).length},e}();t.MethodStubCollection=i},990:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4397),i=n(1206),o=n(8763),s=n(3428),a=n(1759),c=function(){function e(t){this.methodToStub=t,this.groupIndex=++e.globalGroupIndex}return e.prototype.thenReturn=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this.convertToPropertyIfIsNotAFunction(),t.forEach((function(t){e.methodToStub.methodStubCollection.add(new s.ReturnValueMethodStub(e.groupIndex,e.methodToStub.matchers,t))})),this},e.prototype.thenThrow=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this.convertToPropertyIfIsNotAFunction(),t.forEach((function(t){e.methodToStub.methodStubCollection.add(new a.ThrowErrorMethodStub(e.groupIndex,e.methodToStub.matchers,t))})),this},e.prototype.thenCall=function(e){return this.convertToPropertyIfIsNotAFunction(),this.methodToStub.methodStubCollection.add(new r.CallFunctionMethodStub(this.groupIndex,this.methodToStub.matchers,e)),this},e.prototype.thenResolve=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this.convertToPropertyIfIsNotAFunction(),0===t.length&&t.push(void 0),t.forEach((function(t){e.methodToStub.methodStubCollection.add(new o.ResolvePromiseMethodStub(e.groupIndex,e.methodToStub.matchers,t))})),this},e.prototype.thenReject=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this.convertToPropertyIfIsNotAFunction(),0===t.length&&t.push(new Error("mocked '"+this.methodToStub.name+"' rejected")),t.forEach((function(t){e.methodToStub.methodStubCollection.add(new i.RejectPromiseMethodStub(e.groupIndex,e.methodToStub.matchers,t))})),this},e.prototype.thenDoNothing=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.convertToPropertyIfIsNotAFunction(),this},e.prototype.convertToPropertyIfIsNotAFunction=function(){if(!this.methodToStub.methodStubCollection){var e=this.methodToStub("__tsMockitoGetInfo");delete e.mocker.mock[e.key],delete e.mocker.instance[e.key],e.mocker.createPropertyStub(e.key),e.mocker.createInstancePropertyDescriptorListener(e.key,{},void 0),e.mocker.createInstanceActionListener(e.key,void 0),this.methodToStub=e.mocker.mock[e.key]}},e.globalGroupIndex=0,e}();t.MethodStubSetter=c},2045:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2439),i=function(){function e(e){this.methodToVerify=e,this.methodCallToStringConverter=new r.MethodCallToStringConverter}return e.prototype.called=function(){this.atLeast(1)},e.prototype.never=function(){this.times(0)},e.prototype.once=function(){this.times(1)},e.prototype.twice=function(){this.times(2)},e.prototype.thrice=function(){this.times(3)},e.prototype.times=function(e){var t=this.methodToVerify.mocker.getAllMatchingActions(this.methodToVerify.name,this.methodToVerify.matchers);if(e!==t.length){var n=this.methodCallToStringConverter.convert(this.methodToVerify);throw new Error('Expected "'+n+"to be called "+e+" time(s). But has been called "+t.length+" time(s).")}},e.prototype.atLeast=function(e){var t=this.methodToVerify.mocker.getAllMatchingActions(this.methodToVerify.name,this.methodToVerify.matchers);if(e>t.length){var n=this.methodCallToStringConverter.convert(this.methodToVerify);throw new Error('Expected "'+n+"to be called at least "+e+" time(s). But has been called "+t.length+" time(s).")}},e.prototype.atMost=function(e){var t=this.methodToVerify.mocker.getAllMatchingActions(this.methodToVerify.name,this.methodToVerify.matchers);if(e<t.length){var n=this.methodCallToStringConverter.convert(this.methodToVerify);throw new Error('Expected "'+n+"to be called at least "+e+" time(s). But has been called "+t.length+" time(s).")}},e.prototype.calledBefore=function(e){var t=this.methodToVerify.mocker.getFirstMatchingAction(this.methodToVerify.name,this.methodToVerify.matchers),n=e.mocker.getFirstMatchingAction(e.name,e.matchers),r=this.methodCallToStringConverter.convert(this.methodToVerify),i=this.methodCallToStringConverter.convert(e),o='Expected "'+r+" to be called before "+i;if(!t||!n)throw t&&!n?new Error(o+"but "+i+"has never been called."):!t&&n?new Error(o+"but "+r+"has never been called."):new Error(o+"but none of them has been called.");if(!t.hasBeenCalledBefore(n))throw new Error(o+"but has been called after.")},e.prototype.calledAfter=function(e){var t=this.methodToVerify.mocker.getFirstMatchingAction(this.methodToVerify.name,this.methodToVerify.matchers),n=e.mocker.getFirstMatchingAction(e.name,e.matchers),r=this.methodCallToStringConverter.convert(this.methodToVerify),i=this.methodCallToStringConverter.convert(e),o='Expected "'+r+"to be called after "+i;if(!t||!n)throw t&&!n?new Error(o+"but "+i+"has never been called."):!t&&n?new Error(o+"but "+r+"has never been called."):new Error(o+"but none of them has been called.");if(t.hasBeenCalledBefore(n))throw new Error(o+"but has been called before.")},e}();t.MethodStubVerificator=i},9951:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,n,r){this.methodStubCollection=e,this.matchers=t,this.mocker=n,this.name=r};t.MethodToStub=n},9404:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6486),i=n(7562),o=n(5842),s=n(907),a=n(9951),c=n(3428),u=n(4351),l=n(1526),p=n(4675),f=n(2418),d=function(){function e(e,t){void 0===t&&(t={});var n=this;this.clazz=e,this.instance=t,this.mock={},this.objectInspector=new p.ObjectInspector,this.methodStubCollections={},this.methodActions=[],this.mockableFunctionsFinder=new l.MockableFunctionsFinder,this.objectPropertyCodeRetriever=new f.ObjectPropertyCodeRetriever,this.excludedPropertyNames=["hasOwnProperty"],this.mock.__tsmockitoInstance=this.instance,this.mock.__tsmockitoMocker=this,r.isObject(this.clazz)&&r.isObject(this.instance)&&(this.processProperties(this.clazz.prototype),this.processClassCode(this.clazz),this.processFunctionsCode(this.clazz.prototype)),"undefined"!=typeof Proxy&&this.clazz?this.mock.__tsmockitoInstance=new Proxy(this.instance,this.createCatchAllHandlerForRemainingPropertiesWithoutGetters()):"undefined"==typeof Proxy||this.clazz||(this.instance=new Proxy(this.instance,{get:function(e,t){return n.excludedPropertyNames.indexOf(t.toString())>=0||t in e?e[t]:n.createActionListener(t.toString())}}),this.mock.__tsmockitoInstance=this.instance)}return e.prototype.getMock=function(){var e=this;return"undefined"==typeof Proxy?this.mock:"undefined"!=typeof Proxy&&this.clazz?new Proxy(this.mock,this.createCatchAllHandlerForRemainingPropertiesWithoutGetters()):new Proxy(this.mock,{get:function(t,n){return n in t?t[n]:(n in t||(e.createMethodStub(n.toString()),e.createInstanceActionListener(n.toString(),{})),e.mock[n.toString()])}})},e.prototype.createCatchAllHandlerForRemainingPropertiesWithoutGetters=function(){var e=this;return{get:function(t,n){return n in t||(e.createPropertyStub(n.toString()),e.createInstancePropertyDescriptorListener(n.toString(),{},e.clazz.prototype)),t[n]}}},e.prototype.reset=function(){this.methodStubCollections={},this.methodActions=[]},e.prototype.resetCalls=function(){this.methodActions=[]},e.prototype.getAllMatchingActions=function(e,t){var n=[];return this.methodActions.forEach((function(r){r.isApplicable(e,t)&&n.push(r)})),n},e.prototype.getFirstMatchingAction=function(e,t){return this.getAllMatchingActions(e,t)[0]},e.prototype.getActionsByName=function(e){return this.methodActions.filter((function(t){return t.methodName===e}))},e.prototype.processProperties=function(e){var t=this;this.objectInspector.getObjectPrototypes(e).forEach((function(e){t.objectInspector.getObjectOwnPropertyNames(e).forEach((function(n){if(!(t.excludedPropertyNames.indexOf(n)>=0)){var r=Object.getOwnPropertyDescriptor(e,n);r.get?(t.createPropertyStub(n),t.createInstancePropertyDescriptorListener(n,r,e),t.createInstanceActionListener(n,e)):"function"==typeof r.value&&(t.createMethodStub(n),t.createInstanceActionListener(n,e))}}))}))},e.prototype.createInstancePropertyDescriptorListener=function(e,t,n){this.instance.hasOwnProperty(e)||Object.defineProperty(this.instance,e,{get:this.createActionListener(e)})},e.prototype.createInstanceActionListener=function(e,t){this.instance.hasOwnProperty(e)||(this.instance[e]=this.createActionListener(e))},e.prototype.createActionListener=function(e){var t=this;return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=new o.MethodAction(e,n);t.methodActions.push(i);var s=t.getMethodStub(e,n);return s.execute(n),s.getValue()}},e.prototype.getEmptyMethodStub=function(e,t){return new c.ReturnValueMethodStub(-1,[],null)},e.prototype.processClassCode=function(e){var t=this,n=void 0!==e.toString?e.toString():"";this.mockableFunctionsFinder.find(n).forEach((function(e){t.createMethodStub(e),t.createInstanceActionListener(e,t.clazz.prototype)}))},e.prototype.processFunctionsCode=function(e){var t=this;this.objectInspector.getObjectPrototypes(e).forEach((function(e){t.objectInspector.getObjectOwnPropertyNames(e).forEach((function(n){t.mockableFunctionsFinder.find(t.objectPropertyCodeRetriever.get(e,n)).forEach((function(e){t.createMethodStub(e),t.createInstanceActionListener(e,t.clazz.prototype)}))}))}))},e.prototype.createPropertyStub=function(e){this.mock.hasOwnProperty(e)||Object.defineProperty(this.mock,e,{get:this.createMethodToStub(e)})},e.prototype.createMethodStub=function(e){this.mock.hasOwnProperty(e)||(this.mock[e]=this.createMethodToStub(e))},e.prototype.createMethodToStub=function(e){var t=this;return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(1===n.length&&"__tsMockitoGetInfo"===n[0])return{key:e,mocker:t};t.methodStubCollections[e]||(t.methodStubCollections[e]=new s.MethodStubCollection);for(var o=[],c=0,l=n;c<l.length;c++){var p=l[c];p instanceof i.Matcher?o.push(p):o.push(u.strictEqual(p))}return new a.MethodToStub(t.methodStubCollections[e],o,t,e)}},e.prototype.getMethodStub=function(e,t){var n=this.methodStubCollections[e];if(n&&n.hasMatchingInAnyGroup(t)){var r=n.getLastMatchingGroupIndex(t);return n.getFirstMatchingFromGroupAndRemoveIfNotLast(r,t)}return this.getEmptyMethodStub(e,t)},e}();t.Mocker=d},2692:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(6486),s=n(9404),a=n(9503),c=n(9354),u=function(e){function t(t){var n=e.call(this,t.constructor,t)||this;return o.isObject(t)&&n.processProperties(t),n}return i(t,e),t.prototype.reset=function(){var t=this;o.forEach(this.realMethods,(function(e,n){e.instance?Object.defineProperty(t.instance,n,e.descriptor):delete t.instance[n]})),e.prototype.reset.call(this)},t.prototype.getEmptyMethodStub=function(t,n){var r=this.realMethods[t];if(r){var i=r.descriptor.get||r.descriptor.value;return new c.CallThroughMethodStub(this.instance,i)}return e.prototype.getEmptyMethodStub.call(this,t,n)},t.prototype.createInstancePropertyDescriptorListener=function(e,t,n){this.realMethods||(this.realMethods={}),this.realMethods[e]||(this.realMethods[e]=new a.RealMethod(t,n===this.instance),Object.defineProperty(this.instance,e,{get:this.createActionListener(e),configurable:!0}))},t.prototype.createInstanceActionListener=function(e,t){if(this.realMethods||(this.realMethods={}),!this.realMethods[e]){var n=Object.getOwnPropertyDescriptor(t,e);this.realMethods[e]=new a.RealMethod(n,t===this.instance),this.instance[e]=this.createActionListener(e)}},t}(s.Mocker);t.Spy=u},9130:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.actions=e}return e.prototype.first=function(){return this.byCallIndex(0)},e.prototype.second=function(){return this.byCallIndex(1)},e.prototype.third=function(){return this.byCallIndex(2)},e.prototype.beforeLast=function(){return this.byCallIndex(this.actions.length-2)},e.prototype.last=function(){return this.byCallIndex(this.actions.length-1)},e.prototype.byCallIndex=function(e){if(e>=this.actions.length)throw new Error("Cannot capture arguments, method has not been called so many times: "+(e+1));return this.actions[e].args},e}();t.ArgCaptor=n},1459:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.validate=function(e,t){return e.length===t.length&&e.every((function(e,n){return e.match(t[n])}))},e}();t.ArgsToMatchersValidator=n},139:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(6486),s=function(e){function t(){return e.call(this)||this}return i(t,e),t.prototype.match=function(e){return o.isFunction(e)},t.prototype.toString=function(){return"anyFunction()"},t}(n(7562).Matcher);t.AnyFunctionMatcher=s},698:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(6486),s=function(e){function t(){return e.call(this)||this}return i(t,e),t.prototype.match=function(e){return o.isNumber(e)},t.prototype.toString=function(){return"anyNumber()"},t}(n(7562).Matcher);t.AnyNumberMatcher=s},4291:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this)||this;if(n.expectedClass=t,null===t)throw new Error("The expected class cannot be null.");return n}return i(t,e),t.prototype.match=function(e){return e instanceof this.expectedClass},t.prototype.toString=function(){return"anyOfClass("+this.expectedClass.name+")"},t}(n(7562).Matcher);t.AnyOfClassMatcher=o},490:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(6486),s=function(e){function t(){return e.call(this)||this}return i(t,e),t.prototype.match=function(e){return o.isString(e)},t.prototype.toString=function(){return"anyString()"},t}(n(7562).Matcher);t.AnyStringMatcher=s},128:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return e.call(this)||this}return i(t,e),t.prototype.match=function(e){return!0},t.prototype.toString=function(){return"anything()"},t}(n(7562).Matcher);t.AnythingMatcher=o},6617:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t,n){var r=e.call(this)||this;if(r.min=t,r.max=n,t>n)throw new Error("between matcher error: min value can't be greater than max");return r}return i(t,e),t.prototype.match=function(e){return e>=this.min&&e<=this.max},t.prototype.toString=function(){return"between("+this.min+", "+this.max+")"},t}(n(7562).Matcher);t.BetweenMatcher=o},6169:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(6486),s=n(7562),a=function(e){function t(t){var n=e.call(this)||this;return n.expectedValue=t,n}return i(t,e),t.prototype.match=function(e){return o.isEqualWith(this.expectedValue,e,(function(e,t){if(e instanceof s.Matcher)return e.match(t)}))},t.prototype.toString=function(){return this.expectedValue instanceof Array?"deepEqual(["+this.expectedValue+"])":"deepEqual("+this.expectedValue+")"},t}(s.Matcher);t.DeepEqualMatcher=a},7562:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.match=function(e){return!1},e.prototype.toString=function(){return""},e}();t.Matcher=n},7946:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this)||this;return n.expectedValue=t,n}return i(t,e),t.prototype.match=function(e){return e.match(this.expectedValue)},t.prototype.toString=function(){return"match("+this.expectedValue+")"},t}(n(7562).Matcher);t.MatchingStringMatcher=o},7345:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(6486),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.match=function(e){return!o.isNull(e)},t.prototype.toString=function(){return"notNull()"},t}(n(7562).Matcher);t.NotNullMatcher=s},7142:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(6486),s=function(e){function t(t){var n=e.call(this)||this;return n.expectedValue=t,n}return i(t,e),t.prototype.match=function(e){return o.isMatch(e,this.expectedValue)},t.prototype.toString=function(){return"objectContaining("+this.expectedValue+")"},t}(n(7562).Matcher);t.ObjectContainingMatcher=s},3513:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this)||this;return n.expectedValue=t,n}return i(t,e),t.prototype.match=function(e){return this.expectedValue===e},t.prototype.toString=function(){return this.expectedValue instanceof Array?"strictEqual(["+this.expectedValue+"])":"strictEqual("+this.expectedValue+")"},t}(n(7562).Matcher);t.StrictEqualMatcher=o},9503:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){this.descriptor=e,this.instance=t};t.RealMethod=n},4406:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.getGroupIndex=function(){return this.groupIndex},e}();t.AbstractMethodStub=n},4397:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(1459),s=function(e){function t(t,n,r){var i=e.call(this)||this;return i.groupIndex=t,i.matchers=n,i.func=r,i.validator=new o.ArgsToMatchersValidator,i}return i(t,e),t.prototype.isApplicable=function(e){return this.validator.validate(this.matchers,e)},t.prototype.execute=function(e){this.functionResult=this.func.apply(this,e)},t.prototype.getValue=function(){return this.functionResult},t}(n(4406).AbstractMethodStub);t.CallFunctionMethodStub=s},9354:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.instance=e,this.method=t}return e.prototype.getGroupIndex=function(){return-1},e.prototype.isApplicable=function(e){return!1},e.prototype.execute=function(e){this.result=this.method.apply(this.instance,e)},e.prototype.getValue=function(){return this.result},e}();t.CallThroughMethodStub=n},1206:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(1459),s=function(e){function t(t,n,r){var i=e.call(this)||this;return i.groupIndex=t,i.matchers=n,i.value=r,i.validator=new o.ArgsToMatchersValidator,i}return i(t,e),t.prototype.isApplicable=function(e){return this.validator.validate(this.matchers,e)},t.prototype.execute=function(e){},t.prototype.getValue=function(){return Promise.reject(this.value)},t}(n(4406).AbstractMethodStub);t.RejectPromiseMethodStub=s},8763:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(1459),s=function(e){function t(t,n,r){var i=e.call(this)||this;return i.groupIndex=t,i.matchers=n,i.value=r,i.validator=new o.ArgsToMatchersValidator,i}return i(t,e),t.prototype.isApplicable=function(e){return this.validator.validate(this.matchers,e)},t.prototype.execute=function(e){},t.prototype.getValue=function(){return Promise.resolve(this.value)},t}(n(4406).AbstractMethodStub);t.ResolvePromiseMethodStub=s},3428:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(1459),s=function(e){function t(t,n,r){var i=e.call(this)||this;return i.groupIndex=t,i.matchers=n,i.returns=r,i.validator=new o.ArgsToMatchersValidator,i}return i(t,e),t.prototype.isApplicable=function(e){return this.validator.validate(this.matchers,e)},t.prototype.execute=function(e){},t.prototype.getValue=function(){return this.returns},t}(n(4406).AbstractMethodStub);t.ReturnValueMethodStub=s},1759:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(1459),s=function(e){function t(t,n,r){var i=e.call(this)||this;return i.groupIndex=t,i.matchers=n,i.error=r,i.validator=new o.ArgsToMatchersValidator,i}return i(t,e),t.prototype.isApplicable=function(e){return this.validator.validate(this.matchers,e)},t.prototype.execute=function(e){throw this.error},t.prototype.getValue=function(){return null},t}(n(4406).AbstractMethodStub);t.ThrowErrorMethodStub=s},4351:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9130),i=n(139),o=n(698),s=n(4291),a=n(490),c=n(128),u=n(6617),l=n(6169),p=n(7946),f=n(7345),d=n(7142),h=n(3513),m=n(990),g=n(2045),v=n(9951),y=n(9404),_=n(2692);function E(e){return new _.Spy(e).getMock()}function b(e){return new y.Mocker(e).getMock()}function w(e){return new g.MethodStubVerificator(e)}function S(e){return new m.MethodStubSetter(e)}function I(e){return e.__tsmockitoInstance}function C(e){var t=e();if(t instanceof v.MethodToStub){var n=t.mocker.getActionsByName(t.name);return new r.ArgCaptor(n)}throw Error("Cannot capture from not mocked object.")}function x(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];e.forEach((function(e){return e.__tsmockitoMocker.reset()}))}function O(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];e.forEach((function(e){return e.__tsmockitoMocker.resetCalls()}))}function T(e){return new s.AnyOfClassMatcher(e)}function A(){return new i.AnyFunctionMatcher}function N(){return new o.AnyNumberMatcher}function P(){return new a.AnyStringMatcher}function L(){return new c.AnythingMatcher}function R(e,t){return new u.BetweenMatcher(e,t)}function k(e){return new l.DeepEqualMatcher(e)}function D(){return new f.NotNullMatcher}function M(e){return new h.StrictEqualMatcher(e)}function V(e){return new p.MatchingStringMatcher(e)}function F(e){return new d.ObjectContainingMatcher(e)}t.spy=E,t.mock=b,t.verify=w,t.when=S,t.instance=I,t.capture=C,t.reset=x,t.resetCalls=O,t.anyOfClass=T,t.anyFunction=A,t.anyNumber=N,t.anyString=P,t.anything=L,t.between=R,t.deepEqual=k,t.notNull=D,t.strictEqual=M,t.match=V,t.objectContaining=F,t.default={spy:E,mock:b,verify:w,when:S,instance:I,capture:C,reset:x,resetCalls:O,anyOfClass:T,anyFunction:A,anyNumber:N,anyString:P,anything:L,between:R,deepEqual:k,notNull:D,strictEqual:M,match:V,objectContaining:F}},2439:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.convert=function(e){var t=e.matchers.map((function(e){return e.toString()})).join(", ");return e.name+"("+t+')" '},e}();t.MethodCallToStringConverter=n},1526:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.functionNameRegex=/[.\s]([^.\s]+?)(?:\(|\s+=\s+(?:function\s*(?:[^.\s]+?\s*)?)?\()/g,this.cleanFunctionNameRegex=/^[.\s]([^.\s]+?)[\s(]/,this.excludedFunctionNames=["hasOwnProperty","function"]}return e.prototype.find=function(e){var t=this;return(e.match(this.functionNameRegex)||[]).map((function(e){return e.match(t.cleanFunctionNameRegex)[1]})).filter((function(e){return t.isMockable(e)}))},e.prototype.isMockable=function(e){return this.excludedFunctionNames.indexOf(e)<0},e}();t.MockableFunctionsFinder=n},4675:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6486),i=function(){function e(){}return e.prototype.getObjectPrototypes=function(e){for(var t=[];r.isObject(e)&&e!==Object.prototype&&e!==Function.prototype;)t.push(e),e=Object.getPrototypeOf(e);return t},e.prototype.getObjectOwnPropertyNames=function(e){return r.isObject(e)?Object.getOwnPropertyNames(e):[]},e}();t.ObjectInspector=i},2418:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.get=function(e,t){var n=Object.getOwnPropertyDescriptor(e,t);if(!n)return"";var r=[];return n.get&&r.push(n.get.toString()),n.set&&r.push(n.set.toString()),r.join(" ")||String(e[t])},e}();t.ObjectPropertyCodeRetriever=n},4398:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL=!0;var r=n(5747),i=n(2087),o=n(5622),s=n(7549),a=n(9574),c=function(){function e(e,t,n,i){var a=this;this.extensionId=e,this.extensionVersion=t,this.firstParty=!1,this.userOptIn=!1,this.firstParty=!!i;var c=process.env.VSCODE_LOGS||"";c&&e&&"trace"===process.env.VSCODE_LOG_LEVEL&&(c=o.join(c,e+".txt"),this.logStream=r.createWriteStream(c,{flags:"a",encoding:"utf8",autoClose:!0})),this.updateUserOptIn(n),void 0!==s.env.onDidChangeTelemetryEnabled?this.optOutListener=s.env.onDidChangeTelemetryEnabled((function(){return a.updateUserOptIn(n)})):this.optOutListener=s.workspace.onDidChangeConfiguration((function(){return a.updateUserOptIn(n)}))}return e.prototype.updateUserOptIn=function(t){var n=s.workspace.getConfiguration(e.TELEMETRY_CONFIG_ID),r=void 0===s.env.isTelemetryEnabled?n.get(e.TELEMETRY_CONFIG_ENABLED_ID,!0):s.env.isTelemetryEnabled;this.userOptIn!==r&&(this.userOptIn=r,this.userOptIn?this.createAppInsightsClient(t):this.dispose())},e.prototype.createAppInsightsClient=function(e){a.defaultClient?(this.appInsightsClient=new a.TelemetryClient(e),this.appInsightsClient.channel.setUseDiskRetryCaching(!0)):(a.setup(e).setAutoCollectRequests(!1).setAutoCollectPerformance(!1).setAutoCollectExceptions(!1).setAutoCollectDependencies(!1).setAutoDependencyCorrelation(!1).setAutoCollectConsole(!1).setUseDiskRetryCaching(!0).start(),this.appInsightsClient=a.defaultClient),this.appInsightsClient.commonProperties=this.getCommonProperties(),s&&s.env&&(this.appInsightsClient.context.tags[this.appInsightsClient.context.keys.userId]=s.env.machineId,this.appInsightsClient.context.tags[this.appInsightsClient.context.keys.sessionId]=s.env.sessionId),e&&0===e.indexOf("AIF-")&&(this.appInsightsClient.config.endpointUrl="https://vortex.data.microsoft.com/collect/v1",this.firstParty=!0)},e.prototype.getCommonProperties=function(){var e=Object.create(null);if(e["common.os"]=i.platform(),e["common.platformversion"]=(i.release()||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),e["common.extname"]=this.extensionId,e["common.extversion"]=this.extensionVersion,s&&s.env){switch(e["common.vscodemachineid"]=s.env.machineId,e["common.vscodesessionid"]=s.env.sessionId,e["common.vscodeversion"]=s.version,e["common.isnewappinstall"]=s.env.isNewAppInstall,s.env.uiKind){case s.UIKind.Web:e["common.uikind"]="web";break;case s.UIKind.Desktop:e["common.uikind"]="desktop";break;default:e["common.uikind"]="unknown"}e["common.remotename"]=this.cleanRemoteName(s.env.remoteName)}return e},e.prototype.cleanRemoteName=function(e){if(!e)return"none";var t="other";return["ssh-remote","dev-container","attached-container","wsl"].forEach((function(n){0===e.indexOf(n+"+")&&(t=n)})),t},e.prototype.shouldSendErrorTelemetry=function(){return!this.firstParty||("other"!==this.cleanRemoteName(s.env.remoteName)||void 0!==this.extension&&this.extension.extensionKind!==s.ExtensionKind.Workspace&&s.env.uiKind!==s.UIKind.Web)},Object.defineProperty(e.prototype,"extension",{get:function(){return void 0===this._extension&&(this._extension=s.extensions.getExtension(this.extensionId)),this._extension},enumerable:!1,configurable:!0}),e.prototype.cloneAndChange=function(e,t){if(null===e||"object"!=typeof e)return e;if("function"!=typeof t)return e;var n={};for(var r in e)n[r]=t(r,e[r]);return n},e.prototype.anonymizeFilePaths=function(e,t){if(null==e)return"";var n=[new RegExp(s.env.appRoot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi")];this.extension&&n.push(new RegExp(this.extension.extensionPath.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi"));var r=e;if(t){for(var i=[],o=0,a=n;o<a.length;o++)for(var c=a[o];;){var u=c.exec(e);if(!u)break;i.push([u.index,c.lastIndex])}var l=/^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/,p=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g,f=0;r="";for(var d=function(){var t=p.exec(e);if(!t)return"break";!l.test(t[0])&&i.every((function(e){var n=e[0],r=e[1];return t.index<n||t.index>=r}))&&(r+=e.substring(f,t.index)+"<REDACTED: user-file-path>",f=p.lastIndex)};;){if("break"===d())break}f<e.length&&(r+=e.substr(f))}for(var h=0,m=n;h<m.length;h++){c=m[h];r=r.replace(c,"")}return r},e.prototype.sendTelemetryEvent=function(e,t,n){var r=this;if(this.userOptIn&&e&&this.appInsightsClient){var i=this.cloneAndChange(t,(function(e,t){return r.anonymizeFilePaths(t,r.firstParty)}));this.appInsightsClient.trackEvent({name:this.extensionId+"/"+e,properties:i,measurements:n}),this.logStream&&this.logStream.write("telemetry/"+e+" "+JSON.stringify({properties:t,measurements:n})+"\n")}},e.prototype.sendTelemetryErrorEvent=function(e,t,n,r){var i=this;if(this.userOptIn&&e&&this.appInsightsClient){var o=this.cloneAndChange(t,(function(e,t){return i.shouldSendErrorTelemetry()?i.anonymizeFilePaths(t,i.firstParty):void 0===r||-1!==r.indexOf(e)?"REDACTED":i.anonymizeFilePaths(t,i.firstParty)}));this.appInsightsClient.trackEvent({name:this.extensionId+"/"+e,properties:o,measurements:n}),this.logStream&&this.logStream.write("telemetry/"+e+" "+JSON.stringify({properties:t,measurements:n})+"\n")}},e.prototype.sendTelemetryException=function(e,t,n){var r=this;if(this.shouldSendErrorTelemetry()&&this.userOptIn&&e&&this.appInsightsClient){var i=this.cloneAndChange(t,(function(e,t){return r.anonymizeFilePaths(t,r.firstParty)}));this.appInsightsClient.trackException({exception:e,properties:i,measurements:n}),this.logStream&&this.logStream.write("telemetry/"+e.name+" "+e.message+" "+JSON.stringify({properties:t,measurements:n})+"\n")}},e.prototype.dispose=function(){var e=this;this.optOutListener.dispose();var t=new Promise((function(t){if(!e.logStream)return t(void 0);e.logStream.on("finish",t),e.logStream.end()})),n=new Promise((function(t){e.appInsightsClient?e.appInsightsClient.flush({callback:function(){e.appInsightsClient=void 0,t(void 0)}}):t(void 0)}));return Promise.all([n,t])},e.TELEMETRY_CONFIG_ID="telemetry",e.TELEMETRY_CONFIG_ENABLED_ID="enableTelemetry",e}();t.default=c},2479:e=>{e.exports=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),i=e[e.length-1];return"function"==typeof r&&r!==i&&Object.keys(i).forEach((function(e){r[e]=i[e]})),r}}},9602:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},4411:(e,t,n)=>{"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,i=arguments.length;n<i;n++)t.push(arguments[n]);return t}function i(e,t,n){var r=t===e.head?new a(n,null,t,e):new a(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function s(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,n,r){if(!(this instanceof a))return new a(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=r,r.Node=a,r.create=r,r.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},r.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},r.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},r.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},r.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)s(this,arguments[e]);return this.length},r.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},r.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},r.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},r.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},r.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},r.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},r.prototype.map=function(e,t){t=t||this;for(var n=new r,i=this.head;null!==i;)n.push(e.call(t,i.value,this)),i=i.next;return n},r.prototype.mapReverse=function(e,t){t=t||this;for(var n=new r,i=this.tail;null!==i;)n.push(e.call(t,i.value,this)),i=i.prev;return n},r.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)n.push(o.value);return n},r.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)n.push(o.value);return n},r.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,o=this.head;null!==o&&r<e;r++)o=o.next;var s=[];for(r=0;o&&r<t;r++)s.push(o.value),o=this.removeNode(o);null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev);for(r=0;r<n.length;r++)o=i(this,o,n[r]);return s},r.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{n(9602)(r)}catch(e){}},7766:(e,t,n)=>{var r=n(5747),i=n(8761),o=n(8913),s=n(2779),a=n(1669),c=n(8614).EventEmitter,u=n(2413).Transform,l=n(2413).PassThrough,p=n(2413).Writable;function f(e,t,n){"function"==typeof t&&(n=t,t=null),null==t&&(t={}),null==t.autoClose&&(t.autoClose=!1),null==t.lazyEntries&&(t.lazyEntries=!1),null==t.decodeStrings&&(t.decodeStrings=!0),null==t.validateEntrySizes&&(t.validateEntrySizes=!0),null==t.strictFileNames&&(t.strictFileNames=!1),null==n&&(n=O),r.fstat(e,(function(r,i){if(r)return n(r);d(o.createFromFd(e,{autoClose:!0}),i.size,t,n)}))}function d(e,t,n,r){"function"==typeof n&&(r=n,n=null),null==n&&(n={}),null==n.autoClose&&(n.autoClose=!0),null==n.lazyEntries&&(n.lazyEntries=!1),null==n.decodeStrings&&(n.decodeStrings=!0);var i=!!n.decodeStrings;if(null==n.validateEntrySizes&&(n.validateEntrySizes=!0),null==n.strictFileNames&&(n.strictFileNames=!1),null==r&&(r=O),"number"!=typeof t)throw new Error("expected totalSize parameter to be a number");if(t>Number.MAX_SAFE_INTEGER)throw new Error("zip file too large. only file sizes up to 2^52 are supported due to JavaScript's Number type being an IEEE 754 double.");e.ref();var o=Math.min(65557,t),s=I(o),a=t-s.length;E(e,s,0,o,a,(function(c){if(c)return r(c);for(var u=o-22;u>=0;u-=1)if(101010256===s.readUInt32LE(u)){var l=s.slice(u),p=l.readUInt16LE(4);if(0!==p)return r(new Error("multi-disk zip files are not supported: found disk number: "+p));var f=l.readUInt16LE(10),d=l.readUInt32LE(16),m=l.readUInt16LE(20),g=l.length-22;if(m!==g)return r(new Error("invalid comment length. expected: "+g+". found: "+m));var v=i?C(l,22,l.length,!1):l.slice(22);if(65535!==f&&4294967295!==d)return r(null,new h(e,d,t,f,v,n.autoClose,n.lazyEntries,i,n.validateEntrySizes,n.strictFileNames));var y=I(20),_=a+u-y.length;return void E(e,y,0,y.length,_,(function(o){if(o)return r(o);if(117853008!==y.readUInt32LE(0))return r(new Error("invalid zip64 end of central directory locator signature"));var s=x(y,8),a=I(56);E(e,a,0,a.length,s,(function(o){return o?r(o):101075792!==a.readUInt32LE(0)?r(new Error("invalid zip64 end of central directory record signature")):(f=x(a,32),d=x(a,48),r(null,new h(e,d,t,f,v,n.autoClose,n.lazyEntries,i,n.validateEntrySizes,n.strictFileNames)))}))}))}r(new Error("end of central directory record signature not found"))}))}function h(e,t,n,r,i,o,s,a,u,l){var p=this;c.call(p),p.reader=e,p.reader.on("error",(function(e){g(p,e)})),p.reader.once("close",(function(){p.emit("close")})),p.readEntryCursor=t,p.fileSize=n,p.entryCount=r,p.comment=i,p.entriesRead=0,p.autoClose=!!o,p.lazyEntries=!!s,p.decodeStrings=!!a,p.validateEntrySizes=!!u,p.strictFileNames=!!l,p.isOpen=!0,p.emittedError=!1,p.lazyEntries||p._readEntry()}function m(e,t){e.autoClose&&e.close(),g(e,t)}function g(e,t){e.emittedError||(e.emittedError=!0,e.emit("error",t))}function v(){}function y(e,t){return new Date(1980+(e>>9&127),(e>>5&15)-1,31&e,t>>11&31,t>>5&63,2*(31&t),0)}function _(e){return-1!==e.indexOf("\\")?"invalid characters in fileName: "+e:/^[a-zA-Z]:/.test(e)||/^\//.test(e)?"absolute path: "+e:-1!==e.split("/").indexOf("..")?"invalid relative path: "+e:null}function E(e,t,n,r,i,o){if(0===r)return setImmediate((function(){o(null,I(0))}));e.read(t,n,r,i,(function(e,t){return e?o(e):t<r?o(new Error("unexpected EOF")):void o()}))}function b(e){u.call(this),this.actualByteCount=0,this.expectedByteCount=e}function w(){c.call(this),this.refCount=0}function S(e){l.call(this),this.context=e,this.context.ref(),this.unreffedYet=!1}t.open=function(e,t,n){"function"==typeof t&&(n=t,t=null);null==t&&(t={});null==t.autoClose&&(t.autoClose=!0);null==t.lazyEntries&&(t.lazyEntries=!1);null==t.decodeStrings&&(t.decodeStrings=!0);null==t.validateEntrySizes&&(t.validateEntrySizes=!0);null==t.strictFileNames&&(t.strictFileNames=!1);null==n&&(n=O);r.open(e,"r",(function(e,i){if(e)return n(e);f(i,t,(function(e,t){e&&r.close(i,O),n(e,t)}))}))},t.fromFd=f,t.fromBuffer=function(e,t,n){"function"==typeof t&&(n=t,t=null);null==t&&(t={});t.autoClose=!1,null==t.lazyEntries&&(t.lazyEntries=!1);null==t.decodeStrings&&(t.decodeStrings=!0);null==t.validateEntrySizes&&(t.validateEntrySizes=!0);null==t.strictFileNames&&(t.strictFileNames=!1);d(o.createFromBuffer(e,{maxChunkSize:65536}),e.length,t,n)},t.fromRandomAccessReader=d,t.dosDateTimeToDate=y,t.validateFileName=_,t.ZipFile=h,t.Entry=v,t.RandomAccessReader=w,a.inherits(h,c),h.prototype.close=function(){this.isOpen&&(this.isOpen=!1,this.reader.unref())},h.prototype.readEntry=function(){if(!this.lazyEntries)throw new Error("readEntry() called without lazyEntries:true");this._readEntry()},h.prototype._readEntry=function(){var e=this;if(e.entryCount!==e.entriesRead){if(!e.emittedError){var t=I(46);E(e.reader,t,0,t.length,e.readEntryCursor,(function(n){if(n)return m(e,n);if(!e.emittedError){var r=new v,i=t.readUInt32LE(0);if(33639248!==i)return m(e,new Error("invalid central directory file header signature: 0x"+i.toString(16)));if(r.versionMadeBy=t.readUInt16LE(4),r.versionNeededToExtract=t.readUInt16LE(6),r.generalPurposeBitFlag=t.readUInt16LE(8),r.compressionMethod=t.readUInt16LE(10),r.lastModFileTime=t.readUInt16LE(12),r.lastModFileDate=t.readUInt16LE(14),r.crc32=t.readUInt32LE(16),r.compressedSize=t.readUInt32LE(20),r.uncompressedSize=t.readUInt32LE(24),r.fileNameLength=t.readUInt16LE(28),r.extraFieldLength=t.readUInt16LE(30),r.fileCommentLength=t.readUInt16LE(32),r.internalFileAttributes=t.readUInt16LE(36),r.externalFileAttributes=t.readUInt32LE(38),r.relativeOffsetOfLocalHeader=t.readUInt32LE(42),64&r.generalPurposeBitFlag)return m(e,new Error("strong encryption is not supported"));e.readEntryCursor+=46,t=I(r.fileNameLength+r.extraFieldLength+r.fileCommentLength),E(e.reader,t,0,t.length,e.readEntryCursor,(function(n){if(n)return m(e,n);if(!e.emittedError){var i=0!=(2048&r.generalPurposeBitFlag);r.fileName=e.decodeStrings?C(t,0,r.fileNameLength,i):t.slice(0,r.fileNameLength);var o=r.fileNameLength+r.extraFieldLength,a=t.slice(r.fileNameLength,o);r.extraFields=[];for(var c=0;c<a.length-3;){var u=a.readUInt16LE(c+0),l=a.readUInt16LE(c+2),p=c+4,f=p+l;if(f>a.length)return m(e,new Error("extra field length exceeds extra field buffer size"));var d=I(l);a.copy(d,0,p,f),r.extraFields.push({id:u,data:d}),c=f}if(r.fileComment=e.decodeStrings?C(t,o,o+r.fileCommentLength,i):t.slice(o,o+r.fileCommentLength),r.comment=r.fileComment,e.readEntryCursor+=t.length,e.entriesRead+=1,4294967295===r.uncompressedSize||4294967295===r.compressedSize||4294967295===r.relativeOffsetOfLocalHeader){var h=null;for(c=0;c<r.extraFields.length;c++){if(1===(v=r.extraFields[c]).id){h=v.data;break}}if(null==h)return m(e,new Error("expected zip64 extended information extra field"));var g=0;if(4294967295===r.uncompressedSize){if(g+8>h.length)return m(e,new Error("zip64 extended information extra field does not include uncompressed size"));r.uncompressedSize=x(h,g),g+=8}if(4294967295===r.compressedSize){if(g+8>h.length)return m(e,new Error("zip64 extended information extra field does not include compressed size"));r.compressedSize=x(h,g),g+=8}if(4294967295===r.relativeOffsetOfLocalHeader){if(g+8>h.length)return m(e,new Error("zip64 extended information extra field does not include relative header offset"));r.relativeOffsetOfLocalHeader=x(h,g),g+=8}}if(e.decodeStrings)for(c=0;c<r.extraFields.length;c++){var v;if(28789===(v=r.extraFields[c]).id){if(v.data.length<6)continue;if(1!==v.data.readUInt8(0))continue;var y=v.data.readUInt32LE(1);if(s.unsigned(t.slice(0,r.fileNameLength))!==y)continue;r.fileName=C(v.data,5,v.data.length,!0);break}}if(e.validateEntrySizes&&0===r.compressionMethod){var E=r.uncompressedSize;if(r.isEncrypted()&&(E+=12),r.compressedSize!==E){var b="compressed/uncompressed size mismatch for stored file: "+r.compressedSize+" != "+r.uncompressedSize;return m(e,new Error(b))}}if(e.decodeStrings){e.strictFileNames||(r.fileName=r.fileName.replace(/\\/g,"/"));var w=_(r.fileName,e.validateFileNameOptions);if(null!=w)return m(e,new Error(w))}e.emit("entry",r),e.lazyEntries||e._readEntry()}}))}}))}}else setImmediate((function(){e.autoClose&&e.close(),e.emittedError||e.emit("end")}))},h.prototype.openReadStream=function(e,t,n){var r=this,o=0,s=e.compressedSize;if(null==n)n=t,t={};else{if(null!=t.decrypt){if(!e.isEncrypted())throw new Error("options.decrypt can only be specified for encrypted entries");if(!1!==t.decrypt)throw new Error("invalid options.decrypt value: "+t.decrypt);if(e.isCompressed()&&!1!==t.decompress)throw new Error("entry is encrypted and compressed, and options.decompress !== false")}if(null!=t.decompress){if(!e.isCompressed())throw new Error("options.decompress can only be specified for compressed entries");if(!1!==t.decompress&&!0!==t.decompress)throw new Error("invalid options.decompress value: "+t.decompress)}if(null!=t.start||null!=t.end){if(e.isCompressed()&&!1!==t.decompress)throw new Error("start/end range not allowed for compressed entry without options.decompress === false");if(e.isEncrypted()&&!1!==t.decrypt)throw new Error("start/end range not allowed for encrypted entry without options.decrypt === false")}if(null!=t.start){if((o=t.start)<0)throw new Error("options.start < 0");if(o>e.compressedSize)throw new Error("options.start > entry.compressedSize")}if(null!=t.end){if((s=t.end)<0)throw new Error("options.end < 0");if(s>e.compressedSize)throw new Error("options.end > entry.compressedSize");if(s<o)throw new Error("options.end < options.start")}}if(!r.isOpen)return n(new Error("closed"));if(e.isEncrypted()&&!1!==t.decrypt)return n(new Error("entry is encrypted, and options.decrypt !== false"));r.reader.ref();var a=I(30);E(r.reader,a,0,a.length,e.relativeOffsetOfLocalHeader,(function(c){try{if(c)return n(c);var u=a.readUInt32LE(0);if(67324752!==u)return n(new Error("invalid local file header signature: 0x"+u.toString(16)));var l,p=a.readUInt16LE(26),f=a.readUInt16LE(28),d=e.relativeOffsetOfLocalHeader+a.length+p+f;if(0===e.compressionMethod)l=!1;else{if(8!==e.compressionMethod)return n(new Error("unsupported compression method: "+e.compressionMethod));l=null==t.decompress||t.decompress}var h=d,m=h+e.compressedSize;if(0!==e.compressedSize&&m>r.fileSize)return n(new Error("file data overflows file bounds: "+h+" + "+e.compressedSize+" > "+r.fileSize));var g=r.reader.createReadStream({start:h+o,end:h+s}),v=g;if(l){var y=!1,_=i.createInflateRaw();g.on("error",(function(e){setImmediate((function(){y||_.emit("error",e)}))})),g.pipe(_),r.validateEntrySizes?(v=new b(e.uncompressedSize),_.on("error",(function(e){setImmediate((function(){y||v.emit("error",e)}))})),_.pipe(v)):v=_,v.destroy=function(){y=!0,_!==v&&_.unpipe(v),g.unpipe(_),g.destroy()}}n(null,v)}finally{r.reader.unref()}}))},v.prototype.getLastModDate=function(){return y(this.lastModFileDate,this.lastModFileTime)},v.prototype.isEncrypted=function(){return 0!=(1&this.generalPurposeBitFlag)},v.prototype.isCompressed=function(){return 8===this.compressionMethod},a.inherits(b,u),b.prototype._transform=function(e,t,n){if(this.actualByteCount+=e.length,this.actualByteCount>this.expectedByteCount){var r="too many bytes in the stream. expected "+this.expectedByteCount+". got at least "+this.actualByteCount;return n(new Error(r))}n(null,e)},b.prototype._flush=function(e){if(this.actualByteCount<this.expectedByteCount){var t="not enough bytes in the stream. expected "+this.expectedByteCount+". got only "+this.actualByteCount;return e(new Error(t))}e()},a.inherits(w,c),w.prototype.ref=function(){this.refCount+=1},w.prototype.unref=function(){var e=this;if(e.refCount-=1,!(e.refCount>0)){if(e.refCount<0)throw new Error("invalid unref");e.close((function(t){if(t)return e.emit("error",t);e.emit("close")}))}},w.prototype.createReadStream=function(e){var t=e.start,n=e.end;if(t===n){var r=new l;return setImmediate((function(){r.end()})),r}var i=this._readStreamForRange(t,n),o=!1,s=new S(this);i.on("error",(function(e){setImmediate((function(){o||s.emit("error",e)}))})),s.destroy=function(){i.unpipe(s),s.unref(),i.destroy()};var a=new b(n-t);return s.on("error",(function(e){setImmediate((function(){o||a.emit("error",e)}))})),a.destroy=function(){o=!0,s.unpipe(a),s.destroy()},i.pipe(s).pipe(a)},w.prototype._readStreamForRange=function(e,t){throw new Error("not implemented")},w.prototype.read=function(e,t,n,r,i){var o=this.createReadStream({start:r,end:r+n}),s=new p,a=0;s._write=function(n,r,i){n.copy(e,t+a,0,n.length),a+=n.length,i()},s.on("finish",i),o.on("error",(function(e){i(e)})),o.pipe(s)},w.prototype.close=function(e){setImmediate(e)},a.inherits(S,l),S.prototype._flush=function(e){this.unref(),e()},S.prototype.unref=function(e){this.unreffedYet||(this.unreffedYet=!0,this.context.unref())};var I;function C(e,t,n,r){if(r)return e.toString("utf8",t,n);for(var i="",o=t;o<n;o++)i+="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "[e[o]];return i}function x(e,t){var n=e.readUInt32LE(t);return 4294967296*e.readUInt32LE(t+4)+n}function O(e){if(e)throw e}I="function"==typeof Buffer.allocUnsafe?function(e){return Buffer.allocUnsafe(e)}:function(e){return new Buffer(e)}},2357:e=>{"use strict";e.exports=require("assert")},7303:e=>{"use strict";e.exports=require("async_hooks")},4293:e=>{"use strict";e.exports=require("buffer")},3129:e=>{"use strict";e.exports=require("child_process")},7082:e=>{"use strict";e.exports=require("console")},7619:e=>{"use strict";e.exports=require("constants")},6417:e=>{"use strict";e.exports=require("crypto")},881:e=>{"use strict";e.exports=require("dns")},8614:e=>{"use strict";e.exports=require("events")},5747:e=>{"use strict";e.exports=require("fs")},8605:e=>{"use strict";e.exports=require("http")},7211:e=>{"use strict";e.exports=require("https")},2282:e=>{"use strict";e.exports=require("module")},1631:e=>{"use strict";e.exports=require("net")},2087:e=>{"use strict";e.exports=require("os")},5622:e=>{"use strict";e.exports=require("path")},1058:e=>{"use strict";e.exports=require("readline")},2413:e=>{"use strict";e.exports=require("stream")},8213:e=>{"use strict";e.exports=require("timers")},4016:e=>{"use strict";e.exports=require("tls")},3867:e=>{"use strict";e.exports=require("tty")},8835:e=>{"use strict";e.exports=require("url")},1669:e=>{"use strict";e.exports=require("util")},7549:e=>{"use strict";e.exports=require("vscode")},8761:e=>{"use strict";e.exports=require("zlib")}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.deactivate=e.activate=void 0;const t=n(7549),i=n(8204),o=n(9838),s=n(9973),a=n(7054),c=n(9913),u=n(2478),l=n(7348),p=n(3329),f=n(8806),d=n(1201),h=n(5844),m=n(9810),g=n(80),v=n(7962),y=n(4905),_=n(9142),E=n(4381),b=n(6096),w=n(3738),S=n(4624),I=n(1988),C=n(8675),x=n(9191),O=n(3470),T=n(3934),A=n(6817),N=n(4533),P=n(5011),L=n(1449),R=n(5157),k=n(6362),D=n(1852);function M(){const e=t.workspace.workspaceFolders?t.workspace.workspaceFolders.map((e=>e.uri.path)):[];R.default(e)}e.activate=async function(e){return C.default&&await x.default(e),function(e){b.setTabnineExtensionContext(e),_.initReporter(e,l.default.id||"",l.default.version||"",u.INSTRUMENTATION_KEY),_.report(_.EventName.EXTENSION_ACTIVATED),l.default.isInstalled&&_.report(_.EventName.EXTENSION_INSTALLED)}(e),function(e){l.default.isTabNineAutoImportEnabled&&e.subscriptions.push(t.commands.registerTextEditorCommand(m.COMPLETION_IMPORTS,m.getSelectionHandler(e)),t.commands.registerTextEditorCommand(m.HANDLE_IMPORTS,m.handleImports))}(e),p.default((()=>function(e){return w.updatePersistedAlphaVersion(e,void 0),_.report(_.EventName.EXTENSION_UNINSTALLED),s.uninstalling()}(e))),D.default(),v.registerStatusBar(e),async function(e){await E.setBinaryRootPath(e),await s.initBinary(),await a.fetchCapabilitiesOnFocus(),M(),t.workspace.onDidChangeWorkspaceFolders(M),a.isCapabilityEnabled(a.Capability.AUTHENTICATION)&&P.default()&&(e.subscriptions.push(t.authentication.registerAuthenticationProvider(u.BRAND_NAME,u.BRAND_NAME,new N.default)),await t.authentication.getSession(u.BRAND_NAME,[],{clearSessionPreference:!0}));e.extensionMode!==t.ExtensionMode.Test&&i.default(e);(a.isCapabilityEnabled(a.Capability.ALPHA_CAPABILITY)||a.isCapabilityEnabled(a.Capability.ASSISTANT_CAPABILITY))&&A.default(e,{dispose:()=>{}});O.default(e),d.default(e),g.default(e),v.setDefaultStatus(),c.registerCommands(e),o.default(),y.default(),L.default(e),k.default(e),await S.default(e),function(e){return I.default()===I.SuggestionsMode.AUTOCOMPLETE||e.extensionMode===t.ExtensionMode.Test}(e)&&t.languages.registerCompletionItemProvider({pattern:"**"},{provideCompletionItems:h.default},...u.COMPLETION_TRIGGERS);t.languages.registerHoverProvider({pattern:"**"},{provideHover:f.provideHover})}(e),Promise.resolve()},e.deactivate=async function(){return _.disposeReporter(),T.closeAssistant(),d.cancelNotificationsPolling(),g.disposeStatus(),s.deactivate()}})(),module.exports=r})();
//# sourceMappingURL=extension.js.map