diff --git a/README.md b/README.md index daff6fb..24bae0e 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,11 @@ Install pnpm package manager. ### `version` -**Required** Version of pnpm to install. It supports npm versioning scheme, it could be an exact version (such as `6.24.1`), or a version range (such as `6`, `6.x.x`, `6.24.x`, `^6.24.1`, `*`, etc.), or `latest`. +Version of pnpm to install. + +**Optional** when there is a [`packageManager` field in the `package.json`](https://nodejs.org/api/corepack.html). + +otherwise, this field is **required** It supports npm versioning scheme, it could be an exact version (such as `6.24.1`), or a version range (such as `6`, `6.x.x`, `6.24.x`, `^6.24.1`, `*`, etc.), or `latest`. ### `dest` diff --git a/dist/index.js b/dist/index.js index b1e96f9..ca73795 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1 +1,38 @@ -module.exports=(()=>{var __webpack_modules__={2492:e=>{"use strict";e.exports=JSON.parse('{"anyOf":[{"$ref":"#/definitions/RunInstall"},{"type":"array","items":{"$ref":"#/definitions/RunInstall"}},{"type":["null","boolean"]}],"definitions":{"RunInstall":{"type":"object","properties":{"recursive":{"type":"boolean"},"cwd":{"type":"string"},"args":{"type":"array","items":{"type":"string"}}}}},"$schema":"http://json-schema.org/draft-07/schema#"}')},6152:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});const i=r(6105);const f=s(r(539));const l=s(r(7701));const t=s(r(9875));const o=s(r(4882));const c=s(r(4424));async function main(){const e=(0,f.default)();const n=(0,i.getState)("is_post");if(n==="true")return(0,c.default)(e);(0,i.saveState)("is_post","true");await(0,t.default)(e);console.log("Installation Completed!");(0,l.default)(e);(0,o.default)(e)}main().catch(e=>{console.error(e);(0,i.setFailed)(e)})},539:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.getInputs=void 0;const i=r(6105);const f=s(r(9413));const l=r(4019);const t={required:true};const o=e=>(0,f.default)((0,i.getInput)(e,t));const c=()=>({version:(0,i.getInput)("version",t),dest:o("dest"),runInstall:(0,l.parseRunInstall)("run_install")});n.getInputs=c;n.default=n.getInputs},4019:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.parseRunInstall=void 0;const i=s(r(1765));const f=r(6070);const l=s(r(6562));const t=r(6105);const o=s(r(2492));const c={required:true};function parseRunInstall(e){const n=(0,f.load)((0,t.getInput)(e,c));const r=new l.default({allErrors:true});const s=r.compile(o.default);if(!s(n)){for(const e of s.errors){(0,t.error)(`with.run_install${e.dataPath}: ${e.message}`)}return i.default.exit(1)}if(!n)return[];if(n===true)return[{recursive:true}];if(Array.isArray(n))return n;return[n]}n.parseRunInstall=parseRunInstall},9875:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.install=n.runSelfInstaller=void 0;const i=r(6105);const f=s(r(7529));n.runSelfInstaller=f.default;async function install(e){(0,i.startGroup)("Running self-installer...");const n=await(0,f.default)(e);(0,i.endGroup)();if(n){return(0,i.setFailed)(`Something went wrong, self-installer exits with code ${n}`)}}n.install=install;n.default=install},7529:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.runSelfInstaller=void 0;const i=r(6105);const f=r(3129);const l=r(1765);const t=s(r(5622));const o=r(4982);const c=s(r(1868));async function runSelfInstaller(e){const{version:n,dest:r}=e;const s=n?`pnpm@${n}`:"pnpm";const a=t.default.join(r,"package.json");await(0,o.remove)(r);await(0,o.ensureFile)(a);await(0,o.writeFile)(a,JSON.stringify({private:true}));const d=(0,f.spawn)(l.execPath,["-","install",s,"--no-lockfile"],{cwd:r,stdio:["pipe","inherit","inherit"]});const p=await(0,c.default)("https://get.pnpm.io/v6.16.js");if(!p.body)throw new Error("Did not receive response body");p.body.pipe(d.stdin);const u=await new Promise((e,n)=>{d.on("error",n);d.on("close",e)});if(u===0){const e=t.default.join(r,"node_modules/.bin");(0,i.addPath)(e);(0,i.exportVariable)("PNPM_HOME",e)}return u}n.runSelfInstaller=runSelfInstaller;n.default=runSelfInstaller},7701:(e,n,r)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.setOutputs=void 0;const s=r(6105);const i=r(6656);function setOutputs(e){const n=(0,i.getBinDest)(e);(0,s.addPath)(n);(0,s.setOutput)("dest",e.dest);(0,s.setOutput)("bin_dest",n)}n.setOutputs=setOutputs;n.default=setOutputs},4882:(e,n,r)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.runPnpmInstall=void 0;const s=r(3129);const i=r(6105);const f=r(6656);function runPnpmInstall(e){const n=(0,f.patchPnpmEnv)(e);for(const r of e.runInstall){const e=["install"];if(r.recursive)e.unshift("recursive");if(r.args)e.push(...r.args);const f=["pnpm",...e].join(" ");(0,i.startGroup)(`Running ${f}...`);const{error:l,status:t}=(0,s.spawnSync)("pnpm",e,{stdio:"inherit",cwd:r.cwd,shell:true,env:n});(0,i.endGroup)();if(l){(0,i.setFailed)(l);continue}if(t){(0,i.setFailed)(`Command ${f} (cwd: ${r.cwd}) exits with status ${t}`);continue}}}n.runPnpmInstall=runPnpmInstall;n.default=runPnpmInstall},4424:(e,n,r)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.pruneStore=void 0;const s=r(3129);const i=r(6105);const f=r(6656);function pruneStore(e){if(e.runInstall.length===0){console.log("Pruning is unnecessary.");return}(0,i.startGroup)("Running pnpm store prune...");const{error:n,status:r}=(0,s.spawnSync)("pnpm",["store","prune"],{stdio:"inherit",shell:true,env:(0,f.patchPnpmEnv)(e)});(0,i.endGroup)();if(n){(0,i.warning)(n);return}if(r){(0,i.warning)(`command pnpm store prune exits with code ${r}`);return}}n.pruneStore=pruneStore;n.default=pruneStore},6656:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.patchPnpmEnv=n.getBinDest=void 0;const i=s(r(1765));const f=s(r(5622));const l=e=>f.default.join(e.dest,"node_modules",".bin");n.getBinDest=l;const t=e=>({...i.default.env,PATH:(0,n.getBinDest)(e)+f.default.delimiter+i.default.env.PATH});n.patchPnpmEnv=t},5791:function(e,n,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,n,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return n[r]}})}:function(e,n,r,s){if(s===undefined)s=r;e[s]=n[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:true,value:n})}:function(e,n){e["default"]=n});var f=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))s(n,e,r);i(n,e);return n};Object.defineProperty(n,"__esModule",{value:true});n.issue=n.issueCommand=void 0;const l=f(r(2087));const t=r(1831);function issueCommand(e,n,r){const s=new Command(e,n,r);process.stdout.write(s.toString()+l.EOL)}n.issueCommand=issueCommand;function issue(e,n=""){issueCommand(e,{},n)}n.issue=issue;const o="::";class Command{constructor(e,n,r){if(!e){e="missing.command"}this.command=e;this.properties=n;this.message=r}toString(){let e=o+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let n=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const s=this.properties[r];if(s){if(n){n=false}else{e+=","}e+=`${r}=${escapeProperty(s)}`}}}}e+=`${o}${escapeData(this.message)}`;return e}}function escapeData(e){return t.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return t.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},6105:function(e,n,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,n,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return n[r]}})}:function(e,n,r,s){if(s===undefined)s=r;e[s]=n[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:true,value:n})}:function(e,n){e["default"]=n});var f=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))s(n,e,r);i(n,e);return n};var l=this&&this.__awaiter||function(e,n,r,s){function adopt(e){return e instanceof r?e:new r(function(n){n(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,n||[])).next())})};Object.defineProperty(n,"__esModule",{value:true});n.getIDToken=n.getState=n.saveState=n.group=n.endGroup=n.startGroup=n.info=n.notice=n.warning=n.error=n.debug=n.isDebug=n.setFailed=n.setCommandEcho=n.setOutput=n.getBooleanInput=n.getMultilineInput=n.getInput=n.addPath=n.setSecret=n.exportVariable=n.ExitCode=void 0;const t=r(5791);const o=r(9111);const c=r(1831);const a=f(r(2087));const d=f(r(5622));const p=r(441);var u;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(u=n.ExitCode||(n.ExitCode={}));function exportVariable(e,n){const r=c.toCommandValue(n);process.env[e]=r;const s=process.env["GITHUB_ENV"]||"";if(s){const n="_GitHubActionsFileCommandDelimeter_";const s=`${e}<<${n}${a.EOL}${r}${a.EOL}${n}`;o.issueCommand("ENV",s)}else{t.issueCommand("set-env",{name:e},r)}}n.exportVariable=exportVariable;function setSecret(e){t.issueCommand("add-mask",{},e)}n.setSecret=setSecret;function addPath(e){const n=process.env["GITHUB_PATH"]||"";if(n){o.issueCommand("PATH",e)}else{t.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${d.delimiter}${process.env["PATH"]}`}n.addPath=addPath;function getInput(e,n){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(n&&n.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}if(n&&n.trimWhitespace===false){return r}return r.trim()}n.getInput=getInput;function getMultilineInput(e,n){const r=getInput(e,n).split("\n").filter(e=>e!=="");return r}n.getMultilineInput=getMultilineInput;function getBooleanInput(e,n){const r=["true","True","TRUE"];const s=["false","False","FALSE"];const i=getInput(e,n);if(r.includes(i))return true;if(s.includes(i))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}n.getBooleanInput=getBooleanInput;function setOutput(e,n){process.stdout.write(a.EOL);t.issueCommand("set-output",{name:e},n)}n.setOutput=setOutput;function setCommandEcho(e){t.issue("echo",e?"on":"off")}n.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=u.Failure;error(e)}n.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}n.isDebug=isDebug;function debug(e){t.issueCommand("debug",{},e)}n.debug=debug;function error(e,n={}){t.issueCommand("error",c.toCommandProperties(n),e instanceof Error?e.toString():e)}n.error=error;function warning(e,n={}){t.issueCommand("warning",c.toCommandProperties(n),e instanceof Error?e.toString():e)}n.warning=warning;function notice(e,n={}){t.issueCommand("notice",c.toCommandProperties(n),e instanceof Error?e.toString():e)}n.notice=notice;function info(e){process.stdout.write(e+a.EOL)}n.info=info;function startGroup(e){t.issue("group",e)}n.startGroup=startGroup;function endGroup(){t.issue("endgroup")}n.endGroup=endGroup;function group(e,n){return l(this,void 0,void 0,function*(){startGroup(e);let r;try{r=yield n()}finally{endGroup()}return r})}n.group=group;function saveState(e,n){t.issueCommand("save-state",{name:e},n)}n.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}n.getState=getState;function getIDToken(e){return l(this,void 0,void 0,function*(){return yield p.OidcClient.getIDToken(e)})}n.getIDToken=getIDToken},9111:function(e,n,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,n,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return n[r]}})}:function(e,n,r,s){if(s===undefined)s=r;e[s]=n[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:true,value:n})}:function(e,n){e["default"]=n});var f=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))s(n,e,r);i(n,e);return n};Object.defineProperty(n,"__esModule",{value:true});n.issueCommand=void 0;const l=f(r(5747));const t=f(r(2087));const o=r(1831);function issueCommand(e,n){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!l.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}l.appendFileSync(r,`${o.toCommandValue(n)}${t.EOL}`,{encoding:"utf8"})}n.issueCommand=issueCommand},441:function(e,n,r){"use strict";var s=this&&this.__awaiter||function(e,n,r,s){function adopt(e){return e instanceof r?e:new r(function(n){n(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,n||[])).next())})};Object.defineProperty(n,"__esModule",{value:true});n.OidcClient=void 0;const i=r(8389);const f=r(1960);const l=r(6105);class OidcClient{static createHttpClient(e=true,n=10){const r={allowRetries:e,maxRetries:n};return new i.HttpClient("actions/oidc-client",[new f.BearerCredentialHandler(OidcClient.getRequestToken())],r)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var n;return s(this,void 0,void 0,function*(){const r=OidcClient.createHttpClient();const s=yield r.getJson(e).catch(e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.result.message}`)});const i=(n=s.result)===null||n===void 0?void 0:n.value;if(!i){throw new Error("Response json body do not have ID Token field")}return i})}static getIDToken(e){return s(this,void 0,void 0,function*(){try{let n=OidcClient.getIDTokenUrl();if(e){const r=encodeURIComponent(e);n=`${n}&audience=${r}`}l.debug(`ID token url is ${n}`);const r=yield OidcClient.getCall(n);l.setSecret(r);return r}catch(e){throw new Error(`Error message: ${e.message}`)}})}}n.OidcClient=OidcClient},1831:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.toCommandProperties=n.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}n.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}n.toCommandProperties=toCommandProperties},1960:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});class BasicCredentialHandler{constructor(e,n){this.username=e;this.password=n}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from(this.username+":"+this.password).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,n,r){return null}}n.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Bearer "+this.token}canHandleAuthentication(e){return false}handleAuthentication(e,n,r){return null}}n.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from("PAT:"+this.token).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,n,r){return null}}n.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},8389:(e,n,r)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});const s=r(8605);const i=r(7211);const f=r(9242);let l;var t;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(t=n.HttpCodes||(n.HttpCodes={}));var o;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(o=n.Headers||(n.Headers={}));var c;(function(e){e["ApplicationJson"]="application/json"})(c=n.MediaTypes||(n.MediaTypes={}));function getProxyUrl(e){let n=f.getProxyUrl(new URL(e));return n?n.href:""}n.getProxyUrl=getProxyUrl;const a=[t.MovedPermanently,t.ResourceMoved,t.SeeOther,t.TemporaryRedirect,t.PermanentRedirect];const d=[t.BadGateway,t.ServiceUnavailable,t.GatewayTimeout];const p=["OPTIONS","GET","DELETE","HEAD"];const u=10;const h=5;class HttpClientError extends Error{constructor(e,n){super(e);this.name="HttpClientError";this.statusCode=n;Object.setPrototypeOf(this,HttpClientError.prototype)}}n.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return new Promise(async(e,n)=>{let r=Buffer.alloc(0);this.message.on("data",e=>{r=Buffer.concat([r,e])});this.message.on("end",()=>{e(r.toString())})})}}n.HttpClientResponse=HttpClientResponse;function isHttps(e){let n=new URL(e);return n.protocol==="https:"}n.isHttps=isHttps;class HttpClient{constructor(e,n,r){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=n||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,n){return this.request("OPTIONS",e,null,n||{})}get(e,n){return this.request("GET",e,null,n||{})}del(e,n){return this.request("DELETE",e,null,n||{})}post(e,n,r){return this.request("POST",e,n,r||{})}patch(e,n,r){return this.request("PATCH",e,n,r||{})}put(e,n,r){return this.request("PUT",e,n,r||{})}head(e,n){return this.request("HEAD",e,null,n||{})}sendStream(e,n,r,s){return this.request(e,n,r,s)}async getJson(e,n={}){n[o.Accept]=this._getExistingOrDefaultHeader(n,o.Accept,c.ApplicationJson);let r=await this.get(e,n);return this._processResponse(r,this.requestOptions)}async postJson(e,n,r={}){let s=JSON.stringify(n,null,2);r[o.Accept]=this._getExistingOrDefaultHeader(r,o.Accept,c.ApplicationJson);r[o.ContentType]=this._getExistingOrDefaultHeader(r,o.ContentType,c.ApplicationJson);let i=await this.post(e,s,r);return this._processResponse(i,this.requestOptions)}async putJson(e,n,r={}){let s=JSON.stringify(n,null,2);r[o.Accept]=this._getExistingOrDefaultHeader(r,o.Accept,c.ApplicationJson);r[o.ContentType]=this._getExistingOrDefaultHeader(r,o.ContentType,c.ApplicationJson);let i=await this.put(e,s,r);return this._processResponse(i,this.requestOptions)}async patchJson(e,n,r={}){let s=JSON.stringify(n,null,2);r[o.Accept]=this._getExistingOrDefaultHeader(r,o.Accept,c.ApplicationJson);r[o.ContentType]=this._getExistingOrDefaultHeader(r,o.ContentType,c.ApplicationJson);let i=await this.patch(e,s,r);return this._processResponse(i,this.requestOptions)}async request(e,n,r,s){if(this._disposed){throw new Error("Client has already been disposed.")}let i=new URL(n);let f=this._prepareRequest(e,i,s);let l=this._allowRetries&&p.indexOf(e)!=-1?this._maxRetries+1:1;let o=0;let c;while(o0){const l=c.message.headers["location"];if(!l){break}let t=new URL(l);if(i.protocol=="https:"&&i.protocol!=t.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}await c.readBody();if(t.hostname!==i.hostname){for(let e in s){if(e.toLowerCase()==="authorization"){delete s[e]}}}f=this._prepareRequest(e,t,s);c=await this.requestRaw(f,r);n--}if(d.indexOf(c.message.statusCode)==-1){return c}o+=1;if(o{let i=function(e,n){if(e){s(e)}r(n)};this.requestRawWithCallback(e,n,i)})}requestRawWithCallback(e,n,r){let s;if(typeof n==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(n,"utf8")}let i=false;let f=(e,n)=>{if(!i){i=true;r(e,n)}};let l=e.httpModule.request(e.options,e=>{let n=new HttpClientResponse(e);f(null,n)});l.on("socket",e=>{s=e});l.setTimeout(this._socketTimeout||3*6e4,()=>{if(s){s.end()}f(new Error("Request timeout: "+e.options.path),null)});l.on("error",function(e){f(e,null)});if(n&&typeof n==="string"){l.write(n,"utf8")}if(n&&typeof n!=="string"){n.on("close",function(){l.end()});n.pipe(l)}else{l.end()}}getAgent(e){let n=new URL(e);return this._getAgent(n)}_prepareRequest(e,n,r){const f={};f.parsedUrl=n;const l=f.parsedUrl.protocol==="https:";f.httpModule=l?i:s;const t=l?443:80;f.options={};f.options.host=f.parsedUrl.hostname;f.options.port=f.parsedUrl.port?parseInt(f.parsedUrl.port):t;f.options.path=(f.parsedUrl.pathname||"")+(f.parsedUrl.search||"");f.options.method=e;f.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){f.options.headers["user-agent"]=this.userAgent}f.options.agent=this._getAgent(f.parsedUrl);if(this.handlers){this.handlers.forEach(e=>{e.prepareRequest(f.options)})}return f}_mergeHeaders(e){const n=e=>Object.keys(e).reduce((n,r)=>(n[r.toLowerCase()]=e[r],n),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},n(this.requestOptions.headers),n(e))}return n(e||{})}_getExistingOrDefaultHeader(e,n,r){const s=e=>Object.keys(e).reduce((n,r)=>(n[r.toLowerCase()]=e[r],n),{});let i;if(this.requestOptions&&this.requestOptions.headers){i=s(this.requestOptions.headers)[n]}return e[n]||i||r}_getAgent(e){let n;let t=f.getProxyUrl(e);let o=t&&t.hostname;if(this._keepAlive&&o){n=this._proxyAgent}if(this._keepAlive&&!o){n=this._agent}if(!!n){return n}const c=e.protocol==="https:";let a=100;if(!!this.requestOptions){a=this.requestOptions.maxSockets||s.globalAgent.maxSockets}if(o){if(!l){l=r(3695)}const e={maxSockets:a,keepAlive:this._keepAlive,proxy:{...(t.username||t.password)&&{proxyAuth:`${t.username}:${t.password}`},host:t.hostname,port:t.port}};let s;const i=t.protocol==="https:";if(c){s=i?l.httpsOverHttps:l.httpsOverHttp}else{s=i?l.httpOverHttps:l.httpOverHttp}n=s(e);this._proxyAgent=n}if(this._keepAlive&&!n){const e={keepAlive:this._keepAlive,maxSockets:a};n=c?new i.Agent(e):new s.Agent(e);this._agent=n}if(!n){n=c?i.globalAgent:s.globalAgent}if(c&&this._ignoreSslError){n.options=Object.assign(n.options||{},{rejectUnauthorized:false})}return n}_performExponentialBackoff(e){e=Math.min(u,e);const n=h*Math.pow(2,e);return new Promise(e=>setTimeout(()=>e(),n))}static dateTimeDeserializer(e,n){if(typeof n==="string"){let e=new Date(n);if(!isNaN(e.valueOf())){return e}}return n}async _processResponse(e,n){return new Promise(async(r,s)=>{const i=e.message.statusCode;const f={statusCode:i,result:null,headers:{}};if(i==t.NotFound){r(f)}let l;let o;try{o=await e.readBody();if(o&&o.length>0){if(n&&n.deserializeDates){l=JSON.parse(o,HttpClient.dateTimeDeserializer)}else{l=JSON.parse(o)}f.result=l}f.headers=e.message.headers}catch(e){}if(i>299){let e;if(l&&l.message){e=l.message}else if(o&&o.length>0){e=o}else{e="Failed request: ("+i+")"}let n=new HttpClientError(e,i);n.result=f.result;s(n)}else{r(f)}})}}n.HttpClient=HttpClient},9242:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});function getProxyUrl(e){let n=e.protocol==="https:";let r;if(checkBypass(e)){return r}let s;if(n){s=process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{s=process.env["http_proxy"]||process.env["HTTP_PROXY"]}if(s){r=new URL(s)}return r}n.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}let n=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!n){return false}let r;if(e.port){r=Number(e.port)}else if(e.protocol==="http:"){r=80}else if(e.protocol==="https:"){r=443}let s=[e.hostname.toUpperCase()];if(typeof r==="number"){s.push(`${s[0]}:${r}`)}for(let e of n.split(",").map(e=>e.trim().toUpperCase()).filter(e=>e)){if(s.some(n=>n===e)){return true}}return false}n.checkBypass=checkBypass},6453:function(e,n,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,n,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return n[r]}})}:function(e,n,r,s){if(s===undefined)s=r;e[s]=n[r]});var i=this&&this.__exportStar||function(e,n){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r))s(n,e,r)};Object.defineProperty(n,"__esModule",{value:true});i(r(7950),n);i(r(1586),n);i(r(537),n);i(r(3375),n);i(r(9307),n);i(r(8444),n);i(r(8785),n);i(r(1949),n);i(r(728),n);i(r(8436),n);i(r(7868),n);i(r(1615),n);i(r(1571),n);i(r(3485),n);i(r(9465),n);i(r(5773),n);i(r(5339),n);i(r(2048),n);i(r(941),n);i(r(2723),n);i(r(8789),n)},7950:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.contextLogger=void 0;const i=s(r(690));n.contextLogger=(0,i.default)("context")},1586:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.deprecationLogger=void 0;const i=s(r(690));n.deprecationLogger=(0,i.default)("deprecation")},537:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.fetchingProgressLogger=void 0;const i=s(r(690));n.fetchingProgressLogger=(0,i.default)("fetching-progress")},3375:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.hookLogger=void 0;const i=s(r(690));n.hookLogger=(0,i.default)("hook")},8962:function(e,n,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,n,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return n[r]}})}:function(e,n,r,s){if(s===undefined)s=r;e[s]=n[r]});var i=this&&this.__exportStar||function(e,n){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r))s(n,e,r)};Object.defineProperty(n,"__esModule",{value:true});i(r(6453),n)},9307:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.installCheckLogger=void 0;const i=s(r(690));n.installCheckLogger=(0,i.default)("install-check")},8444:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.lifecycleLogger=void 0;const i=s(r(690));n.lifecycleLogger=(0,i.default)("lifecycle")},8785:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.linkLogger=void 0;const i=s(r(690));n.linkLogger=(0,i.default)("link")},1949:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.packageImportMethodLogger=void 0;const i=s(r(690));n.packageImportMethodLogger=(0,i.default)("package-import-method")},728:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.packageManifestLogger=void 0;const i=s(r(690));n.packageManifestLogger=(0,i.default)("package-manifest")},8436:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.peerDependencyIssuesLogger=void 0;const i=s(r(690));n.peerDependencyIssuesLogger=(0,i.default)("peer-dependency-issues")},7868:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.progressLogger=void 0;const i=s(r(690));n.progressLogger=(0,i.default)("progress")},1615:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true})},1571:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.removalLogger=void 0;const i=s(r(690));n.removalLogger=(0,i.default)("removal")},3485:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.requestRetryLogger=void 0;const i=s(r(690));n.requestRetryLogger=(0,i.default)("request-retry")},9465:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.rootLogger=void 0;const i=s(r(690));n.rootLogger=(0,i.default)("root")},5773:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.scopeLogger=void 0;const i=s(r(690));n.scopeLogger=(0,i.default)("scope")},5339:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.skippedOptionalDependencyLogger=void 0;const i=s(r(690));n.skippedOptionalDependencyLogger=(0,i.default)("skipped-optional-dependency")},2048:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.stageLogger=void 0;const i=s(r(690));n.stageLogger=(0,i.default)("stage")},941:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.statsLogger=void 0;const i=s(r(690));n.statsLogger=(0,i.default)("stats")},2723:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.summaryLogger=void 0;const i=s(r(690));n.summaryLogger=(0,i.default)("summary")},8789:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.updateCheckLogger=void 0;const i=s(r(690));n.updateCheckLogger=(0,i.default)("update-check")},1046:function(e,n,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,n,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return n[r]}})}:function(e,n,r,s){if(s===undefined)s=r;e[s]=n[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:true,value:n})}:function(e,n){e["default"]=n});var f=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))s(n,e,r);i(n,e);return n};Object.defineProperty(n,"__esModule",{value:true});n.ResponseError=n.isRedirect=n.Response=void 0;const l=r(8962);const t=r(8983);const o=f(r(5999));Object.defineProperty(n,"Response",{enumerable:true,get:function(){return o.Response}});n.isRedirect=o.default.isRedirect;async function fetchRetry(e,n={}){var r,s,i,f,c;const a=(r=n.retry)!==null&&r!==void 0?r:{};const d=(s=a.retries)!==null&&s!==void 0?s:2;const p=(0,t.operation)({factor:(i=a.factor)!==null&&i!==void 0?i:10,maxTimeout:(f=a.maxTimeout)!==null&&f!==void 0?f:6e4,minTimeout:(c=a.minTimeout)!==null&&c!==void 0?c:1e4,randomize:false,retries:d});try{return await new Promise((r,s)=>p.attempt(async i=>{var f;try{const t=await(0,o.default)(e,n);if(t.status>=500&&t.status<600||[408,409,420,429].includes(t.status)){throw new ResponseError(t)}else{r(t);return}}catch(r){const t=p.retry(r);if(t===false){s(p.mainError());return}l.requestRetryLogger.debug({attempt:i,error:r,maxRetries:d,method:(f=n.method)!==null&&f!==void 0?f:"GET",timeout:t,url:e.toString()})}}))}catch(e){if(e instanceof ResponseError){return e.res}throw e}}n.default=fetchRetry;class ResponseError extends Error{constructor(e){super(e.statusText);if(Error.captureStackTrace){Error.captureStackTrace(this,ResponseError)}this.name=this.constructor.name;this.res=e;this.code=this.status=this.statusCode=e.status;this.url=e.url}}n.ResponseError=ResponseError},7640:function(e,n,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,n,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return n[r]}})}:function(e,n,r,s){if(s===undefined)s=r;e[s]=n[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:true,value:n})}:function(e,n){e["default"]=n});var f=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))s(n,e,r);i(n,e);return n};var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.fetchWithAgent=void 0;const t=r(8835);const o=l(r(4167));const c=f(r(1046));const a="pnpm";const d="application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*";const p="application/json";const u=20;function fetchWithAgent(e,n){var r,s;const i=(0,o.default)(e.toString(),{...n.agentOptions,strictSsl:(r=n.agentOptions.strictSsl)!==null&&r!==void 0?r:true});const f=(s=n.headers)!==null&&s!==void 0?s:{};f["connection"]=i?"keep-alive":"close";return(0,c.default)(e,{...n,agent:i})}n.fetchWithAgent=fetchWithAgent;function default_1(e){return async(n,r)=>{var s,i,f;const l={"user-agent":a,...getHeaders({auth:r===null||r===void 0?void 0:r.authHeaderValue,fullMetadata:e.fullMetadata,userAgent:e.userAgent})};let o=0;let d=new t.URL(n);const p=d.host;while(true){const n={...e,...r,strictSsl:(s=e.strictSsl)!==null&&s!==void 0?s:true};const a=await fetchWithAgent(d,{agentOptions:n,compress:(i=r===null||r===void 0?void 0:r.compress)!==null&&i!==void 0?i:false,headers:l,redirect:"manual",retry:r===null||r===void 0?void 0:r.retry,timeout:(f=r===null||r===void 0?void 0:r.timeout)!==null&&f!==void 0?f:6e4});if(!(0,c.isRedirect)(a.status)||o>=u){return a}o++;d=new t.URL(a.headers.get("location"));if(!l["authorization"]||p===d.host)continue;delete l.authorization}}}n.default=default_1;function getHeaders(e){const n={accept:e.fullMetadata===true?p:d};if(e.auth){n["authorization"]=e.auth}if(e.userAgent){n["user-agent"]=e.userAgent}return n}},1868:function(e,n,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,n,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return n[r]}})}:function(e,n,r,s){if(s===undefined)s=r;e[s]=n[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:true,value:n})}:function(e,n){e["default"]=n});var f=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))s(n,e,r);i(n,e);return n};var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.fetchWithAgent=n.createFetchFromRegistry=void 0;const t=l(r(1046));const o=f(r(7640));n.createFetchFromRegistry=o.default;Object.defineProperty(n,"fetchWithAgent",{enumerable:true,get:function(){return o.fetchWithAgent}});n.default=t.default},690:(e,n,r)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.writeToConsole=n.createStreamParser=n.streamParser=n.globalWarn=n.globalInfo=void 0;const s=r(2824);Object.defineProperty(n,"globalInfo",{enumerable:true,get:function(){return s.globalInfo}});Object.defineProperty(n,"globalWarn",{enumerable:true,get:function(){return s.globalWarn}});const i=r(1906);n.streamParser=i.default;Object.defineProperty(n,"createStreamParser",{enumerable:true,get:function(){return i.createStreamParser}});const f=r(1554);n.writeToConsole=f.default;n.default=s.default},2824:(e,n,r)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.globalInfo=n.globalWarn=void 0;const s=r(3802);s.setFastTime();n.default=s("pnpm");const i=s("pnpm:global");function globalWarn(e){i.warn(e)}n.globalWarn=globalWarn;function globalInfo(e){i.info(e)}n.globalInfo=globalInfo},1906:(e,n,r)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.createStreamParser=void 0;const s=r(3802);const i=r(3290);n.default=createStreamParser();function createStreamParser(){const e=i.parse();s.output([{level:"debug",stream:e}]);return e}n.createStreamParser=createStreamParser},1554:(e,n,r)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});const s=r(3802);function default_1(){s.output([{level:"debug",stream:process.stdout}])}n.default=default_1},4167:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});const i=r(8835);const f=s(r(9838));const l=s(r(5865));const t=s(r(7052));const o=s(r(7140));const c=s(r(7039));const a=f.default.HttpsAgent;const d=50;const p=new o.default({max:50});function getAgent(e,n){var r,s,l;const t=new i.URL(e);const o=t.protocol==="https:";const c=getProxyUri(e,n);const u=[`https:${o.toString()}`,c?`proxy:${c.protocol}//${c.username}:${c.password}@${c.host}:${c.port}`:">no-proxy<",`local-address:${(r=n.localAddress)!==null&&r!==void 0?r:">no-local-address<"}`,`strict-ssl:${o?Boolean(n.strictSsl).toString():">no-strict-ssl<"}`,`ca:${o&&n.ca||">no-ca<"}`,`cert:${o&&n.cert||">no-cert<"}`,`key:${o&&n.key||">no-key<"}`].join(":");if(p.peek(u)){return p.get(u)}if(c){const e=getProxy(c,n,o);p.set(u,e);return e}const h=typeof n.timeout!=="number"||n.timeout===0?0:n.timeout+1;const v=o?new a({ca:n.ca,cert:n.cert,key:n.key,localAddress:n.localAddress,maxSockets:(s=n.maxSockets)!==null&&s!==void 0?s:d,rejectUnauthorized:n.strictSsl,timeout:h}):new f.default({localAddress:n.localAddress,maxSockets:(l=n.maxSockets)!==null&&l!==void 0?l:d,timeout:h});p.set(u,v);return v}n.default=getAgent;function checkNoProxy(e,n){const r=new i.URL(e).hostname.split(".").filter(e=>e).reverse();if(typeof n.noProxy==="string"){const e=n.noProxy.split(/\s*,\s*/g);return e.some(e=>{const n=e.split(".").filter(e=>e).reverse();if(n.length===0){return false}for(let e=0;e{"use strict";Object.defineProperty(n,"__esModule",{value:true});function once(e,n,{signal:r}={}){return new Promise((s,i)=>{function cleanup(){r===null||r===void 0?void 0:r.removeEventListener("abort",cleanup);e.removeListener(n,onEvent);e.removeListener("error",onError)}function onEvent(...e){cleanup();s(e)}function onError(e){cleanup();i(e)}r===null||r===void 0?void 0:r.addEventListener("abort",cleanup);e.on(n,onEvent);e.on("error",onError)})}n.default=once},8983:(e,n,r)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.createTimeout=n.createTimeouts=n.operation=void 0;const s=r(6352);function operation(e){var n=createTimeouts(e);return new s.default(n,{maxRetryTime:e&&e.maxRetryTime})}n.operation=operation;function createTimeouts(e){var n={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:Infinity,randomize:false,...e};if(n.minTimeout>n.maxTimeout){throw new Error("minTimeout is greater than maxTimeout")}var r=[];for(var s=0;s{"use strict";Object.defineProperty(n,"__esModule",{value:true});class RetryOperation{constructor(e,n){var r;this._originalTimeouts=[...e];this._timeouts=e;this._maxRetryTime=(r=n===null||n===void 0?void 0:n.maxRetryTime)!==null&&r!==void 0?r:Infinity;this._fn=null;this._errors=[];this._attempts=1;this._operationStart=null;this._timer=null}reset(){this._attempts=1;this._timeouts=this._originalTimeouts}stop(){if(this._timer){clearTimeout(this._timer)}this._timeouts=[]}retry(e){if(!e){return false}var n=(new Date).getTime();if(e&&n-this._operationStart>=this._maxRetryTime){this._errors.unshift(new Error("RetryOperation timeout occurred"));return false}this._errors.push(e);var r=this._timeouts.shift();if(r===undefined){return false}this._timer=setTimeout(()=>this._fn(++this._attempts),r);return r}attempt(e){this._fn=e;this._operationStart=(new Date).getTime();this._fn(this._attempts)}errors(){return this._errors}attempts(){return this._attempts}mainError(){if(this._errors.length===0){return null}var e={};var n=null;var r=0;for(var s=0;s=r){n=i;r=l}}return n}}n.default=RetryOperation},44:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const i=r(8614);const f=s(r(6782));const l=s(r(1197));const t=f.default("agent-base");function isAgent(e){return Boolean(e)&&typeof e.addRequest==="function"}function isSecureEndpoint(){const{stack:e}=new Error;if(typeof e!=="string")return false;return e.split("\n").some(e=>e.indexOf("(https.js:")!==-1||e.indexOf("node:https:")!==-1)}function createAgent(e,n){return new createAgent.Agent(e,n)}(function(e){class Agent extends i.EventEmitter{constructor(e,n){super();let r=n;if(typeof e==="function"){this.callback=e}else if(e){r=e}this.timeout=null;if(r&&typeof r.timeout==="number"){this.timeout=r.timeout}this.maxFreeSockets=1;this.maxSockets=1;this.maxTotalSockets=Infinity;this.sockets={};this.freeSockets={};this.requests={};this.options={}}get defaultPort(){if(typeof this.explicitDefaultPort==="number"){return this.explicitDefaultPort}return isSecureEndpoint()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){if(typeof this.explicitProtocol==="string"){return this.explicitProtocol}return isSecureEndpoint()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,n,r){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,n){const r=Object.assign({},n);if(typeof r.secureEndpoint!=="boolean"){r.secureEndpoint=isSecureEndpoint()}if(r.host==null){r.host="localhost"}if(r.port==null){r.port=r.secureEndpoint?443:80}if(r.protocol==null){r.protocol=r.secureEndpoint?"https:":"http:"}if(r.host&&r.path){delete r.path}delete r.agent;delete r.hostname;delete r._defaultAgent;delete r.defaultPort;delete r.createConnection;e._last=true;e.shouldKeepAlive=false;let s=false;let i=null;const f=r.timeout||this.timeout;const o=n=>{if(e._hadError)return;e.emit("error",n);e._hadError=true};const c=()=>{i=null;s=true;const e=new Error(`A "socket" was not created for HTTP request before ${f}ms`);e.code="ETIMEOUT";o(e)};const a=e=>{if(s)return;if(i!==null){clearTimeout(i);i=null}o(e)};const d=n=>{if(s)return;if(i!=null){clearTimeout(i);i=null}if(isAgent(n)){t("Callback returned another Agent instance %o",n.constructor.name);n.addRequest(e,r);return}if(n){n.once("free",()=>{this.freeSocket(n,r)});e.onSocket(n);return}const f=new Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``);o(f)};if(typeof this.callback!=="function"){o(new Error("`callback` is not defined"));return}if(!this.promisifiedCallback){if(this.callback.length>=3){t("Converting legacy callback function to promise");this.promisifiedCallback=l.default(this.callback)}else{this.promisifiedCallback=this.callback}}if(typeof f==="number"&&f>0){i=setTimeout(c,f)}if("port"in r&&typeof r.port!=="number"){r.port=Number(r.port)}try{t("Resolving socket for %o request: %o",r.protocol,`${e.method} ${e.path}`);Promise.resolve(this.promisifiedCallback(e,r)).then(d,a)}catch(e){Promise.reject(e).catch(a)}}freeSocket(e,n){t("Freeing socket %o %o",e.constructor.name,n);e.destroy()}destroy(){t("Destroying agent %o",this.constructor.name)}}e.Agent=Agent;e.prototype=e.Agent.prototype})(createAgent||(createAgent={}));e.exports=createAgent},1197:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});function promisify(e){return function(n,r){return new Promise((s,i)=>{e.call(this,n,r,(e,n)=>{if(e){i(e)}else{s(n)}})})}}n.default=promisify},9838:(e,n,r)=>{"use strict";e.exports=r(3734);e.exports.HttpsAgent=r(6310);e.exports.constants=r(6071)},3734:(e,n,r)=>{"use strict";const s=r(8605).Agent;const i=r(3499);const f=r(6782)("agentkeepalive");const l=r(2527)("agentkeepalive");const{INIT_SOCKET:t,CURRENT_ID:o,CREATE_ID:c,SOCKET_CREATED_TIME:a,SOCKET_NAME:d,SOCKET_REQUEST_COUNT:p,SOCKET_REQUEST_FINISHED_COUNT:u}=r(6071);let h=1;const v=parseInt(process.version.split(".",1)[0].substring(1));if(v>=11&&v<=12){h=2}else if(v>=13){h=3}class Agent extends s{constructor(e){e=e||{};e.keepAlive=e.keepAlive!==false;if(e.freeSocketTimeout===undefined){e.freeSocketTimeout=4e3}if(e.keepAliveTimeout){l("options.keepAliveTimeout is deprecated, please use options.freeSocketTimeout instead");e.freeSocketTimeout=e.keepAliveTimeout;delete e.keepAliveTimeout}if(e.freeSocketKeepAliveTimeout){l("options.freeSocketKeepAliveTimeout is deprecated, please use options.freeSocketTimeout instead");e.freeSocketTimeout=e.freeSocketKeepAliveTimeout;delete e.freeSocketKeepAliveTimeout}if(e.timeout===undefined){e.timeout=Math.max(e.freeSocketTimeout*2,8e3)}e.timeout=i(e.timeout);e.freeSocketTimeout=i(e.freeSocketTimeout);e.socketActiveTTL=e.socketActiveTTL?i(e.socketActiveTTL):0;super(e);this[o]=0;this.createSocketCount=0;this.createSocketCountLastCheck=0;this.createSocketErrorCount=0;this.createSocketErrorCountLastCheck=0;this.closeSocketCount=0;this.closeSocketCountLastCheck=0;this.errorSocketCount=0;this.errorSocketCountLastCheck=0;this.requestCount=0;this.requestCountLastCheck=0;this.timeoutSocketCount=0;this.timeoutSocketCountLastCheck=0;this.on("free",e=>{const n=this.calcSocketTimeout(e);if(n>0&&e.timeout!==n){e.setTimeout(n)}})}get freeSocketKeepAliveTimeout(){l("agent.freeSocketKeepAliveTimeout is deprecated, please use agent.options.freeSocketTimeout instead");return this.options.freeSocketTimeout}get timeout(){l("agent.timeout is deprecated, please use agent.options.timeout instead");return this.options.timeout}get socketActiveTTL(){l("agent.socketActiveTTL is deprecated, please use agent.options.socketActiveTTL instead");return this.options.socketActiveTTL}calcSocketTimeout(e){let n=this.options.freeSocketTimeout;const r=this.options.socketActiveTTL;if(r){const s=Date.now()-e[a];const i=r-s;if(i<=0){return i}if(n&&i{if(r)return;r=true;if(s){this.createSocketErrorCount++;return n(s)}this[t](i,e);n(s,i)};const i=super.createConnection(e,s);if(i)s(null,i)}get statusChanged(){const e=this.createSocketCount!==this.createSocketCountLastCheck||this.createSocketErrorCount!==this.createSocketErrorCountLastCheck||this.closeSocketCount!==this.closeSocketCountLastCheck||this.errorSocketCount!==this.errorSocketCountLastCheck||this.timeoutSocketCount!==this.timeoutSocketCountLastCheck||this.requestCount!==this.requestCountLastCheck;if(e){this.createSocketCountLastCheck=this.createSocketCount;this.createSocketErrorCountLastCheck=this.createSocketErrorCount;this.closeSocketCountLastCheck=this.closeSocketCount;this.errorSocketCountLastCheck=this.errorSocketCount;this.timeoutSocketCountLastCheck=this.timeoutSocketCount;this.requestCountLastCheck=this.requestCount}return e}getCurrentStatus(){return{createSocketCount:this.createSocketCount,createSocketErrorCount:this.createSocketErrorCount,closeSocketCount:this.closeSocketCount,errorSocketCount:this.errorSocketCount,timeoutSocketCount:this.timeoutSocketCount,requestCount:this.requestCount,freeSockets:inspect(this.freeSockets),sockets:inspect(this.sockets),requests:inspect(this.requests)}}}function getSocketTimeout(e){return e.timeout||e._idleTimeout}function installListeners(e,n,r){f("%s create, timeout %sms",n[d],getSocketTimeout(n));function onFree(){if(!n._httpMessage&&n[p]===1)return;n[u]++;e.requestCount++;f("%s(requests: %s, finished: %s) free",n[d],n[p],n[u]);const s=e.getName(r);if(n.writable&&e.requests[s]&&e.requests[s].length){n[p]++;f("%s(requests: %s, finished: %s) will be reuse on agent free event",n[d],n[p],n[u])}}n.on("free",onFree);function onClose(r){f("%s(requests: %s, finished: %s) close, isError: %s",n[d],n[p],n[u],r);e.closeSocketCount++}n.on("close",onClose);function onTimeout(){const s=n.listeners("timeout").length;const i=getSocketTimeout(n);const l=n._httpMessage;const t=l&&l.listeners("timeout").length||0;f("%s(requests: %s, finished: %s) timeout after %sms, listeners %s, defaultTimeoutListenerCount %s, hasHttpRequest %s, HttpRequest timeoutListenerCount %s",n[d],n[p],n[u],i,s,h,!!l,t);if(f.enabled){f("timeout listeners: %s",n.listeners("timeout").map(e=>e.name).join(", "))}e.timeoutSocketCount++;const o=e.getName(r);if(e.freeSockets[o]&&e.freeSockets[o].indexOf(n)!==-1){n.destroy();e.removeSocket(n,r);f("%s is free, destroy quietly",n[d])}else{if(t===0){const s=new Error("Socket timeout");s.code="ERR_SOCKET_TIMEOUT";s.timeout=i;n.destroy(s);e.removeSocket(n,r);f("%s destroy with timeout error",n[d])}}}n.on("timeout",onTimeout);function onError(r){const s=n.listeners("error").length;f("%s(requests: %s, finished: %s) error: %s, listenerCount: %s",n[d],n[p],n[u],r,s);e.errorSocketCount++;if(s===1){f("%s emit uncaught error event",n[d]);n.removeListener("error",onError);n.emit("error",r)}}n.on("error",onError);function onRemove(){f("%s(requests: %s, finished: %s) agentRemove",n[d],n[p],n[u]);n.removeListener("close",onClose);n.removeListener("error",onError);n.removeListener("free",onFree);n.removeListener("timeout",onTimeout);n.removeListener("agentRemove",onRemove)}n.on("agentRemove",onRemove)}e.exports=Agent;function inspect(e){const n={};for(const r in e){n[r]=e[r].length}return n}},6071:e=>{"use strict";e.exports={CURRENT_ID:Symbol("agentkeepalive#currentId"),CREATE_ID:Symbol("agentkeepalive#createId"),INIT_SOCKET:Symbol("agentkeepalive#initSocket"),CREATE_HTTPS_CONNECTION:Symbol("agentkeepalive#createHttpsConnection"),SOCKET_CREATED_TIME:Symbol("agentkeepalive#socketCreatedTime"),SOCKET_NAME:Symbol("agentkeepalive#socketName"),SOCKET_REQUEST_COUNT:Symbol("agentkeepalive#socketRequestCount"),SOCKET_REQUEST_FINISHED_COUNT:Symbol("agentkeepalive#socketRequestFinishedCount")}},6310:(e,n,r)=>{"use strict";const s=r(7211).Agent;const i=r(3734);const{INIT_SOCKET:f,CREATE_HTTPS_CONNECTION:l}=r(6071);class HttpsAgent extends i{constructor(e){super(e);this.defaultPort=443;this.protocol="https:";this.maxCachedSessions=this.options.maxCachedSessions;if(this.maxCachedSessions===undefined){this.maxCachedSessions=100}this._sessionCache={map:{},list:[]}}createConnection(e){const n=this[l](e);this[f](n,e);return n}}HttpsAgent.prototype[l]=s.prototype.createConnection;["getName","_getSession","_cacheSession","_evictSession"].forEach(function(e){if(typeof s.prototype[e]==="function"){HttpsAgent.prototype[e]=s.prototype[e]}});e.exports=HttpsAgent},6562:(e,n,r)=>{"use strict";var s=r(8077),i=r(3664),f=r(7647),l=r(7721),t=r(7692),o=r(1538),c=r(2170),a=r(4178),d=r(2657);e.exports=Ajv;Ajv.prototype.validate=validate;Ajv.prototype.compile=compile;Ajv.prototype.addSchema=addSchema;Ajv.prototype.addMetaSchema=addMetaSchema;Ajv.prototype.validateSchema=validateSchema;Ajv.prototype.getSchema=getSchema;Ajv.prototype.removeSchema=removeSchema;Ajv.prototype.addFormat=addFormat;Ajv.prototype.errorsText=errorsText;Ajv.prototype._addSchema=_addSchema;Ajv.prototype._compile=_compile;Ajv.prototype.compileAsync=r(9533);var p=r(5413);Ajv.prototype.addKeyword=p.add;Ajv.prototype.getKeyword=p.get;Ajv.prototype.removeKeyword=p.remove;Ajv.prototype.validateKeyword=p.validate;var u=r(3023);Ajv.ValidationError=u.Validation;Ajv.MissingRefError=u.MissingRef;Ajv.$dataMetaSchema=a;var h="http://json-schema.org/draft-07/schema";var v=["removeAdditional","useDefaults","coerceTypes","strictDefaults"];var g=["/properties"];function Ajv(e){if(!(this instanceof Ajv))return new Ajv(e);e=this._opts=d.copy(e)||{};setLogger(this);this._schemas={};this._refs={};this._fragments={};this._formats=o(e.format);this._cache=e.cache||new f;this._loadingSchemas={};this._compilations=[];this.RULES=c();this._getId=chooseGetId(e);e.loopRequired=e.loopRequired||Infinity;if(e.errorDataPath=="property")e._errorDataPathProperty=true;if(e.serialize===undefined)e.serialize=t;this._metaOpts=getMetaSchemaOptions(this);if(e.formats)addInitialFormats(this);if(e.keywords)addInitialKeywords(this);addDefaultMetaSchema(this);if(typeof e.meta=="object")this.addMetaSchema(e.meta);if(e.nullable)this.addKeyword("nullable",{metaSchema:{type:"boolean"}});addInitialSchemas(this)}function validate(e,n){var r;if(typeof e=="string"){r=this.getSchema(e);if(!r)throw new Error('no schema with key or ref "'+e+'"')}else{var s=this._addSchema(e);r=s.validate||this._compile(s)}var i=r(n);if(r.$async!==true)this.errors=r.errors;return i}function compile(e,n){var r=this._addSchema(e,undefined,n);return r.validate||this._compile(r)}function addSchema(e,n,r,s){if(Array.isArray(e)){for(var f=0;f{"use strict";var n=e.exports=function Cache(){this._cache={}};n.prototype.put=function Cache_put(e,n){this._cache[e]=n};n.prototype.get=function Cache_get(e){return this._cache[e]};n.prototype.del=function Cache_del(e){delete this._cache[e]};n.prototype.clear=function Cache_clear(){this._cache={}}},9533:(e,n,r)=>{"use strict";var s=r(3023).MissingRef;e.exports=compileAsync;function compileAsync(e,n,r){var i=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");if(typeof n=="function"){r=n;n=undefined}var f=loadMetaSchemaOf(e).then(function(){var r=i._addSchema(e,undefined,n);return r.validate||_compileAsync(r)});if(r){f.then(function(e){r(null,e)},r)}return f;function loadMetaSchemaOf(e){var n=e.$schema;return n&&!i.getSchema(n)?compileAsync.call(i,{$ref:n},true):Promise.resolve()}function _compileAsync(e){try{return i._compile(e)}catch(e){if(e instanceof s)return loadMissingSchema(e);throw e}function loadMissingSchema(r){var s=r.missingSchema;if(added(s))throw new Error("Schema "+s+" is loaded but "+r.missingRef+" cannot be resolved");var f=i._loadingSchemas[s];if(!f){f=i._loadingSchemas[s]=i._opts.loadSchema(s);f.then(removePromise,removePromise)}return f.then(function(e){if(!added(s)){return loadMetaSchemaOf(e).then(function(){if(!added(s))i.addSchema(e,s,undefined,n)})}}).then(function(){return _compileAsync(e)});function removePromise(){delete i._loadingSchemas[s]}function added(e){return i._refs[e]||i._schemas[e]}}}}},3023:(e,n,r)=>{"use strict";var s=r(3664);e.exports={Validation:errorSubclass(ValidationError),MissingRef:errorSubclass(MissingRefError)};function ValidationError(e){this.message="validation failed";this.errors=e;this.ajv=this.validation=true}MissingRefError.message=function(e,n){return"can't resolve reference "+n+" from id "+e};function MissingRefError(e,n,r){this.message=r||MissingRefError.message(e,n);this.missingRef=s.url(e,n);this.missingSchema=s.normalizeId(s.fullPath(this.missingRef))}function errorSubclass(e){e.prototype=Object.create(Error.prototype);e.prototype.constructor=e;return e}},1538:(e,n,r)=>{"use strict";var s=r(2657);var i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;var f=[0,31,28,31,30,31,30,31,31,30,31,30,31];var l=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;var t=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;var o=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var c=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var a=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;var d=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;var p=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;var u=/^(?:\/(?:[^~/]|~0|~1)*)*$/;var h=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;var v=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;e.exports=formats;function formats(e){e=e=="full"?"full":"fast";return s.copy(formats[e])}formats.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":a,url:d,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:t,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:p,"json-pointer":u,"json-pointer-uri-fragment":h,"relative-json-pointer":v};formats.full={date:date,time:time,"date-time":date_time,uri:uri,"uri-reference":c,"uri-template":a,url:d,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:t,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:p,"json-pointer":u,"json-pointer-uri-fragment":h,"relative-json-pointer":v};function isLeapYear(e){return e%4===0&&(e%100!==0||e%400===0)}function date(e){var n=e.match(i);if(!n)return false;var r=+n[1];var s=+n[2];var l=+n[3];return s>=1&&s<=12&&l>=1&&l<=(s==2&&isLeapYear(r)?29:f[s])}function time(e,n){var r=e.match(l);if(!r)return false;var s=r[1];var i=r[2];var f=r[3];var t=r[5];return(s<=23&&i<=59&&f<=59||s==23&&i==59&&f==60)&&(!n||t)}var g=/t|\s/i;function date_time(e){var n=e.split(g);return n.length==2&&date(n[0])&&time(n[1],true)}var b=/\/|:/;function uri(e){return b.test(e)&&o.test(e)}var w=/[^\\]\\Z/;function regex(e){if(w.test(e))return false;try{new RegExp(e);return true}catch(e){return false}}},8077:(e,n,r)=>{"use strict";var s=r(3664),i=r(2657),f=r(3023),l=r(7692);var t=r(7752);var o=i.ucs2length;var c=r(7988);var a=f.Validation;e.exports=compile;function compile(e,n,r,d){var p=this,u=this._opts,h=[undefined],v={},g=[],b={},w=[],y={},m=[];n=n||{schema:e,refVal:h,refs:v};var E=checkCompiling.call(this,e,n,d);var S=this._compilations[E.index];if(E.compiling)return S.callValidate=callValidate;var C=this._formats;var O=this.RULES;try{var A=localCompile(e,n,r,d);S.validate=A;var R=S.callValidate;if(R){R.schema=A.schema;R.errors=null;R.refs=A.refs;R.refVal=A.refVal;R.root=A.root;R.$async=A.$async;if(u.sourceCode)R.source=A.source}return A}finally{endCompiling.call(this,e,n,d)}function callValidate(){var e=S.validate;var n=e.apply(this,arguments);callValidate.errors=e.errors;return n}function localCompile(e,r,l,d){var b=!r||r&&r.schema==e;if(r.schema!=n.schema)return compile.call(p,e,r,l,d);var y=e.$async===true;var E=t({isTop:true,schema:e,isRoot:b,baseId:d,root:r,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:f.MissingRef,RULES:O,validate:t,util:i,resolve:s,resolveRef:resolveRef,usePattern:usePattern,useDefault:useDefault,useCustomRule:useCustomRule,opts:u,formats:C,logger:p.logger,self:p});E=vars(h,refValCode)+vars(g,patternCode)+vars(w,defaultCode)+vars(m,customRuleCode)+E;if(u.processCode)E=u.processCode(E,e);var S;try{var A=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",E);S=A(p,O,C,n,h,w,m,c,o,a);h[0]=S}catch(e){p.logger.error("Error compiling schema, function code:",E);throw e}S.schema=e;S.errors=null;S.refs=v;S.refVal=h;S.root=b?S:r;if(y)S.$async=true;if(u.sourceCode===true){S.source={code:E,patterns:g,defaults:w}}return S}function resolveRef(e,i,f){i=s.url(e,i);var l=v[i];var t,o;if(l!==undefined){t=h[l];o="refVal["+l+"]";return resolvedRef(t,o)}if(!f&&n.refs){var c=n.refs[i];if(c!==undefined){t=n.refVal[c];o=addLocalRef(i,t);return resolvedRef(t,o)}}o=addLocalRef(i);var a=s.call(p,localCompile,n,i);if(a===undefined){var d=r&&r[i];if(d){a=s.inlineRef(d,u.inlineRefs)?d:compile.call(p,d,n,r,e)}}if(a===undefined){removeLocalRef(i)}else{replaceLocalRef(i,a);return resolvedRef(a,o)}}function addLocalRef(e,n){var r=h.length;h[r]=n;v[e]=r;return"refVal"+r}function removeLocalRef(e){delete v[e]}function replaceLocalRef(e,n){var r=v[e];h[r]=n}function resolvedRef(e,n){return typeof e=="object"||typeof e=="boolean"?{code:n,schema:e,inline:true}:{code:n,$async:e&&!!e.$async}}function usePattern(e){var n=b[e];if(n===undefined){n=b[e]=g.length;g[n]=e}return"pattern"+n}function useDefault(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return i.toQuotedString(e);case"object":if(e===null)return"null";var n=l(e);var r=y[n];if(r===undefined){r=y[n]=w.length;w[r]=e}return"default"+r}}function useCustomRule(e,n,r,s){if(p._opts.validateSchema!==false){var i=e.definition.dependencies;if(i&&!i.every(function(e){return Object.prototype.hasOwnProperty.call(r,e)}))throw new Error("parent schema must have all required keywords: "+i.join(","));var f=e.definition.validateSchema;if(f){var l=f(n);if(!l){var t="keyword schema is invalid: "+p.errorsText(f.errors);if(p._opts.validateSchema=="log")p.logger.error(t);else throw new Error(t)}}}var o=e.definition.compile,c=e.definition.inline,a=e.definition.macro;var d;if(o){d=o.call(p,n,r,s)}else if(a){d=a.call(p,n,r,s);if(u.validateSchema!==false)p.validateSchema(d,true)}else if(c){d=c.call(p,s,e.keyword,n,r)}else{d=e.definition.validate;if(!d)return}if(d===undefined)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=m.length;m[h]=d;return{code:"customRule"+h,validate:d}}}function checkCompiling(e,n,r){var s=compIndex.call(this,e,n,r);if(s>=0)return{index:s,compiling:true};s=this._compilations.length;this._compilations[s]={schema:e,root:n,baseId:r};return{index:s,compiling:false}}function endCompiling(e,n,r){var s=compIndex.call(this,e,n,r);if(s>=0)this._compilations.splice(s,1)}function compIndex(e,n,r){for(var s=0;s{"use strict";var s=r(3786),i=r(7988),f=r(2657),l=r(7721),t=r(7438);e.exports=resolve;resolve.normalizeId=normalizeId;resolve.fullPath=getFullPath;resolve.url=resolveUrl;resolve.ids=resolveIds;resolve.inlineRef=inlineRef;resolve.schema=resolveSchema;function resolve(e,n,r){var s=this._refs[r];if(typeof s=="string"){if(this._refs[s])s=this._refs[s];else return resolve.call(this,e,n,s)}s=s||this._schemas[r];if(s instanceof l){return inlineRef(s.schema,this._opts.inlineRefs)?s.schema:s.validate||this._compile(s)}var i=resolveSchema.call(this,n,r);var f,t,o;if(i){f=i.schema;n=i.root;o=i.baseId}if(f instanceof l){t=f.validate||e.call(this,f.schema,n,undefined,o)}else if(f!==undefined){t=inlineRef(f,this._opts.inlineRefs)?f:e.call(this,f,n,undefined,o)}return t}function resolveSchema(e,n){var r=s.parse(n),i=_getFullPath(r),f=getFullPath(this._getId(e.schema));if(Object.keys(e.schema).length===0||i!==f){var t=normalizeId(i);var o=this._refs[t];if(typeof o=="string"){return resolveRecursive.call(this,e,o,r)}else if(o instanceof l){if(!o.validate)this._compile(o);e=o}else{o=this._schemas[t];if(o instanceof l){if(!o.validate)this._compile(o);if(t==normalizeId(n))return{schema:o,root:e,baseId:f};e=o}else{return}}if(!e.schema)return;f=getFullPath(this._getId(e.schema))}return getJsonPointer.call(this,r,f,e.schema,e)}function resolveRecursive(e,n,r){var s=resolveSchema.call(this,e,n);if(s){var i=s.schema;var f=s.baseId;e=s.root;var l=this._getId(i);if(l)f=resolveUrl(f,l);return getJsonPointer.call(this,r,f,i,e)}}var o=f.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(e,n,r,s){e.fragment=e.fragment||"";if(e.fragment.slice(0,1)!="/")return;var i=e.fragment.split("/");for(var l=1;l{"use strict";var s=r(1676),i=r(2657).toHash;e.exports=function rules(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}];var n=["type","$comment"];var r=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"];var f=["number","integer","string","array","object","boolean","null"];e.all=i(n);e.types=i(f);e.forEach(function(r){r.rules=r.rules.map(function(r){var i;if(typeof r=="object"){var f=Object.keys(r)[0];i=r[f];r=f;i.forEach(function(r){n.push(r);e.all[r]=true})}n.push(r);var l=e.all[r]={keyword:r,code:s[r],implements:i};return l});e.all.$comment={keyword:"$comment",code:s.$comment};if(r.type)e.types[r.type]=r});e.keywords=i(n.concat(r));e.custom={};return e}},7721:(e,n,r)=>{"use strict";var s=r(2657);e.exports=SchemaObject;function SchemaObject(e){s.copy(e,this)}},5584:e=>{"use strict";e.exports=function ucs2length(e){var n=0,r=e.length,s=0,i;while(s=55296&&i<=56319&&s{"use strict";e.exports={copy:copy,checkDataType:checkDataType,checkDataTypes:checkDataTypes,coerceToTypes:coerceToTypes,toHash:toHash,getProperty:getProperty,escapeQuotes:escapeQuotes,equal:r(7988),ucs2length:r(5584),varOccurences:varOccurences,varReplace:varReplace,schemaHasRules:schemaHasRules,schemaHasRulesExcept:schemaHasRulesExcept,schemaUnknownRules:schemaUnknownRules,toQuotedString:toQuotedString,getPathExpr:getPathExpr,getPath:getPath,getData:getData,unescapeFragment:unescapeFragment,unescapeJsonPointer:unescapeJsonPointer,escapeFragment:escapeFragment,escapeJsonPointer:escapeJsonPointer};function copy(e,n){n=n||{};for(var r in e)n[r]=e[r];return n}function checkDataType(e,n,r,s){var i=s?" !== ":" === ",f=s?" || ":" && ",l=s?"!":"",t=s?"":"!";switch(e){case"null":return n+i+"null";case"array":return l+"Array.isArray("+n+")";case"object":return"("+l+n+f+"typeof "+n+i+'"object"'+f+t+"Array.isArray("+n+"))";case"integer":return"(typeof "+n+i+'"number"'+f+t+"("+n+" % 1)"+f+n+i+n+(r?f+l+"isFinite("+n+")":"")+")";case"number":return"(typeof "+n+i+'"'+e+'"'+(r?f+l+"isFinite("+n+")":"")+")";default:return"typeof "+n+i+'"'+e+'"'}}function checkDataTypes(e,n,r){switch(e.length){case 1:return checkDataType(e[0],n,r,true);default:var s="";var i=toHash(e);if(i.array&&i.object){s=i.null?"(":"(!"+n+" || ";s+="typeof "+n+' !== "object")';delete i.null;delete i.array;delete i.object}if(i.number)delete i.integer;for(var f in i)s+=(s?" && ":"")+checkDataType(f,n,r,true);return s}}var s=toHash(["string","number","integer","boolean","null"]);function coerceToTypes(e,n){if(Array.isArray(n)){var r=[];for(var i=0;i=n)throw new Error("Cannot access property/index "+s+" levels up, current level is "+n);return r[n-s]}if(s>n)throw new Error("Cannot access data "+s+" levels up, current level is "+n);f="data"+(n-s||"");if(!i)return f}var c=f;var a=i.split("/");for(var d=0;d{"use strict";var n=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,r){for(var s=0;s{"use strict";var s=r(1742);e.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:s.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:s.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}},5702:e=>{"use strict";e.exports=function generate__limit(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.schemaPath+e.util.getProperty(n);var o=e.errSchemaPath+"/"+n;var c=!e.opts.allErrors;var a;var d="data"+(f||"");var p=e.opts.$data&&l&&l.$data,u;if(p){s+=" var schema"+i+" = "+e.util.getData(l.$data,f,e.dataPathArr)+"; ";u="schema"+i}else{u=l}var h=n=="maximum",v=h?"exclusiveMaximum":"exclusiveMinimum",g=e.schema[v],b=e.opts.$data&&g&&g.$data,w=h?"<":">",y=h?">":"<",a=undefined;if(!(p||typeof l=="number"||l===undefined)){throw new Error(n+" must be number")}if(!(b||g===undefined||typeof g=="number"||typeof g=="boolean")){throw new Error(v+" must be number or boolean")}if(b){var m=e.util.getData(g.$data,f,e.dataPathArr),E="exclusive"+i,S="exclType"+i,C="exclIsNumber"+i,O="op"+i,A="' + "+O+" + '";s+=" var schemaExcl"+i+" = "+m+"; ";m="schemaExcl"+i;s+=" var "+E+"; var "+S+" = typeof "+m+"; if ("+S+" != 'boolean' && "+S+" != 'undefined' && "+S+" != 'number') { ";var a=v;var R=R||[];R.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(a||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(o)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: '"+v+" should be boolean' "}if(e.opts.verbose){s+=" , schema: validate.schema"+t+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "}s+=" } "}else{s+=" {} "}var k=s;s=R.pop();if(!e.compositeRule&&c){if(e.async){s+=" throw new ValidationError(["+k+"]); "}else{s+=" validate.errors = ["+k+"]; return false; "}}else{s+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else if ( ";if(p){s+=" ("+u+" !== undefined && typeof "+u+" != 'number') || "}s+=" "+S+" == 'number' ? ( ("+E+" = "+u+" === undefined || "+m+" "+w+"= "+u+") ? "+d+" "+y+"= "+m+" : "+d+" "+y+" "+u+" ) : ( ("+E+" = "+m+" === true) ? "+d+" "+y+"= "+u+" : "+d+" "+y+" "+u+" ) || "+d+" !== "+d+") { var op"+i+" = "+E+" ? '"+w+"' : '"+w+"='; ";if(l===undefined){a=v;o=e.errSchemaPath+"/"+v;u=m;p=b}}else{var C=typeof g=="number",A=w;if(C&&p){var O="'"+A+"'";s+=" if ( ";if(p){s+=" ("+u+" !== undefined && typeof "+u+" != 'number') || "}s+=" ( "+u+" === undefined || "+g+" "+w+"= "+u+" ? "+d+" "+y+"= "+g+" : "+d+" "+y+" "+u+" ) || "+d+" !== "+d+") { "}else{if(C&&l===undefined){E=true;a=v;o=e.errSchemaPath+"/"+v;u=g;y+="="}else{if(C)u=Math[h?"min":"max"](g,l);if(g===(C?u:true)){E=true;a=v;o=e.errSchemaPath+"/"+v;y+="="}else{E=false;A+="="}}var O="'"+A+"'";s+=" if ( ";if(p){s+=" ("+u+" !== undefined && typeof "+u+" != 'number') || "}s+=" "+d+" "+y+" "+u+" || "+d+" !== "+d+") { "}}a=a||n;var R=R||[];R.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(a||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(o)+" , params: { comparison: "+O+", limit: "+u+", exclusive: "+E+" } ";if(e.opts.messages!==false){s+=" , message: 'should be "+A+" ";if(p){s+="' + "+u}else{s+=""+u+"'"}}if(e.opts.verbose){s+=" , schema: ";if(p){s+="validate.schema"+t}else{s+=""+l}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "}s+=" } "}else{s+=" {} "}var k=s;s=R.pop();if(!e.compositeRule&&c){if(e.async){s+=" throw new ValidationError(["+k+"]); "}else{s+=" validate.errors = ["+k+"]; return false; "}}else{s+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";if(c){s+=" else { "}return s}},2931:e=>{"use strict";e.exports=function generate__limitItems(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.schemaPath+e.util.getProperty(n);var o=e.errSchemaPath+"/"+n;var c=!e.opts.allErrors;var a;var d="data"+(f||"");var p=e.opts.$data&&l&&l.$data,u;if(p){s+=" var schema"+i+" = "+e.util.getData(l.$data,f,e.dataPathArr)+"; ";u="schema"+i}else{u=l}if(!(p||typeof l=="number")){throw new Error(n+" must be number")}var h=n=="maxItems"?">":"<";s+="if ( ";if(p){s+=" ("+u+" !== undefined && typeof "+u+" != 'number') || "}s+=" "+d+".length "+h+" "+u+") { ";var a=n;var v=v||[];v.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(a||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(o)+" , params: { limit: "+u+" } ";if(e.opts.messages!==false){s+=" , message: 'should NOT have ";if(n=="maxItems"){s+="more"}else{s+="fewer"}s+=" than ";if(p){s+="' + "+u+" + '"}else{s+=""+l}s+=" items' "}if(e.opts.verbose){s+=" , schema: ";if(p){s+="validate.schema"+t}else{s+=""+l}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "}s+=" } "}else{s+=" {} "}var g=s;s=v.pop();if(!e.compositeRule&&c){if(e.async){s+=" throw new ValidationError(["+g+"]); "}else{s+=" validate.errors = ["+g+"]; return false; "}}else{s+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(c){s+=" else { "}return s}},4583:e=>{"use strict";e.exports=function generate__limitLength(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.schemaPath+e.util.getProperty(n);var o=e.errSchemaPath+"/"+n;var c=!e.opts.allErrors;var a;var d="data"+(f||"");var p=e.opts.$data&&l&&l.$data,u;if(p){s+=" var schema"+i+" = "+e.util.getData(l.$data,f,e.dataPathArr)+"; ";u="schema"+i}else{u=l}if(!(p||typeof l=="number")){throw new Error(n+" must be number")}var h=n=="maxLength"?">":"<";s+="if ( ";if(p){s+=" ("+u+" !== undefined && typeof "+u+" != 'number') || "}if(e.opts.unicode===false){s+=" "+d+".length "}else{s+=" ucs2length("+d+") "}s+=" "+h+" "+u+") { ";var a=n;var v=v||[];v.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(a||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(o)+" , params: { limit: "+u+" } ";if(e.opts.messages!==false){s+=" , message: 'should NOT be ";if(n=="maxLength"){s+="longer"}else{s+="shorter"}s+=" than ";if(p){s+="' + "+u+" + '"}else{s+=""+l}s+=" characters' "}if(e.opts.verbose){s+=" , schema: ";if(p){s+="validate.schema"+t}else{s+=""+l}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "}s+=" } "}else{s+=" {} "}var g=s;s=v.pop();if(!e.compositeRule&&c){if(e.async){s+=" throw new ValidationError(["+g+"]); "}else{s+=" validate.errors = ["+g+"]; return false; "}}else{s+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(c){s+=" else { "}return s}},1679:e=>{"use strict";e.exports=function generate__limitProperties(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.schemaPath+e.util.getProperty(n);var o=e.errSchemaPath+"/"+n;var c=!e.opts.allErrors;var a;var d="data"+(f||"");var p=e.opts.$data&&l&&l.$data,u;if(p){s+=" var schema"+i+" = "+e.util.getData(l.$data,f,e.dataPathArr)+"; ";u="schema"+i}else{u=l}if(!(p||typeof l=="number")){throw new Error(n+" must be number")}var h=n=="maxProperties"?">":"<";s+="if ( ";if(p){s+=" ("+u+" !== undefined && typeof "+u+" != 'number') || "}s+=" Object.keys("+d+").length "+h+" "+u+") { ";var a=n;var v=v||[];v.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(a||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(o)+" , params: { limit: "+u+" } ";if(e.opts.messages!==false){s+=" , message: 'should NOT have ";if(n=="maxProperties"){s+="more"}else{s+="fewer"}s+=" than ";if(p){s+="' + "+u+" + '"}else{s+=""+l}s+=" properties' "}if(e.opts.verbose){s+=" , schema: ";if(p){s+="validate.schema"+t}else{s+=""+l}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "}s+=" } "}else{s+=" {} "}var g=s;s=v.pop();if(!e.compositeRule&&c){if(e.async){s+=" throw new ValidationError(["+g+"]); "}else{s+=" validate.errors = ["+g+"]; return false; "}}else{s+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(c){s+=" else { "}return s}},6981:e=>{"use strict";e.exports=function generate_allOf(e,n,r){var s=" ";var i=e.schema[n];var f=e.schemaPath+e.util.getProperty(n);var l=e.errSchemaPath+"/"+n;var t=!e.opts.allErrors;var o=e.util.copy(e);var c="";o.level++;var a="valid"+o.level;var d=o.baseId,p=true;var u=i;if(u){var h,v=-1,g=u.length-1;while(v0||h===false:e.util.schemaHasRules(h,e.RULES.all)){p=false;o.schema=h;o.schemaPath=f+"["+v+"]";o.errSchemaPath=l+"/"+v;s+=" "+e.validate(o)+" ";o.baseId=d;if(t){s+=" if ("+a+") { ";c+="}"}}}}if(t){if(p){s+=" if (true) { "}else{s+=" "+c.slice(0,-1)+" "}}return s}},8138:e=>{"use strict";e.exports=function generate_anyOf(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.schemaPath+e.util.getProperty(n);var o=e.errSchemaPath+"/"+n;var c=!e.opts.allErrors;var a="data"+(f||"");var d="valid"+i;var p="errs__"+i;var u=e.util.copy(e);var h="";u.level++;var v="valid"+u.level;var g=l.every(function(n){return e.opts.strictKeywords?typeof n=="object"&&Object.keys(n).length>0||n===false:e.util.schemaHasRules(n,e.RULES.all)});if(g){var b=u.baseId;s+=" var "+p+" = errors; var "+d+" = false; ";var w=e.compositeRule;e.compositeRule=u.compositeRule=true;var y=l;if(y){var m,E=-1,S=y.length-1;while(E{"use strict";e.exports=function generate_comment(e,n,r){var s=" ";var i=e.schema[n];var f=e.errSchemaPath+"/"+n;var l=!e.opts.allErrors;var t=e.util.toQuotedString(i);if(e.opts.$comment===true){s+=" console.log("+t+");"}else if(typeof e.opts.$comment=="function"){s+=" self._opts.$comment("+t+", "+e.util.toQuotedString(f)+", validate.root.schema);"}return s}},2645:e=>{"use strict";e.exports=function generate_const(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.schemaPath+e.util.getProperty(n);var o=e.errSchemaPath+"/"+n;var c=!e.opts.allErrors;var a="data"+(f||"");var d="valid"+i;var p=e.opts.$data&&l&&l.$data,u;if(p){s+=" var schema"+i+" = "+e.util.getData(l.$data,f,e.dataPathArr)+"; ";u="schema"+i}else{u=l}if(!p){s+=" var schema"+i+" = validate.schema"+t+";"}s+="var "+d+" = equal("+a+", schema"+i+"); if (!"+d+") { ";var h=h||[];h.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"const"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(o)+" , params: { allowedValue: schema"+i+" } ";if(e.opts.messages!==false){s+=" , message: 'should be equal to constant' "}if(e.opts.verbose){s+=" , schema: validate.schema"+t+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+a+" "}s+=" } "}else{s+=" {} "}var v=s;s=h.pop();if(!e.compositeRule&&c){if(e.async){s+=" throw new ValidationError(["+v+"]); "}else{s+=" validate.errors = ["+v+"]; return false; "}}else{s+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" }";if(c){s+=" else { "}return s}},640:e=>{"use strict";e.exports=function generate_contains(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.schemaPath+e.util.getProperty(n);var o=e.errSchemaPath+"/"+n;var c=!e.opts.allErrors;var a="data"+(f||"");var d="valid"+i;var p="errs__"+i;var u=e.util.copy(e);var h="";u.level++;var v="valid"+u.level;var g="i"+i,b=u.dataLevel=e.dataLevel+1,w="data"+b,y=e.baseId,m=e.opts.strictKeywords?typeof l=="object"&&Object.keys(l).length>0||l===false:e.util.schemaHasRules(l,e.RULES.all);s+="var "+p+" = errors;var "+d+";";if(m){var E=e.compositeRule;e.compositeRule=u.compositeRule=true;u.schema=l;u.schemaPath=t;u.errSchemaPath=o;s+=" var "+v+" = false; for (var "+g+" = 0; "+g+" < "+a+".length; "+g+"++) { ";u.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,true);var S=a+"["+g+"]";u.dataPathArr[b]=g;var C=e.validate(u);u.baseId=y;if(e.util.varOccurences(C,w)<2){s+=" "+e.util.varReplace(C,w,S)+" "}else{s+=" var "+w+" = "+S+"; "+C+" "}s+=" if ("+v+") break; } ";e.compositeRule=u.compositeRule=E;s+=" "+h+" if (!"+v+") {"}else{s+=" if ("+a+".length == 0) {"}var O=O||[];O.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"contains"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(o)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: 'should contain a valid item' "}if(e.opts.verbose){s+=" , schema: validate.schema"+t+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+a+" "}s+=" } "}else{s+=" {} "}var A=s;s=O.pop();if(!e.compositeRule&&c){if(e.async){s+=" throw new ValidationError(["+A+"]); "}else{s+=" validate.errors = ["+A+"]; return false; "}}else{s+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else { ";if(m){s+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } "}if(e.opts.allErrors){s+=" } "}return s}},4741:e=>{"use strict";e.exports=function generate_custom(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.schemaPath+e.util.getProperty(n);var o=e.errSchemaPath+"/"+n;var c=!e.opts.allErrors;var a;var d="data"+(f||"");var p="valid"+i;var u="errs__"+i;var h=e.opts.$data&&l&&l.$data,v;if(h){s+=" var schema"+i+" = "+e.util.getData(l.$data,f,e.dataPathArr)+"; ";v="schema"+i}else{v=l}var g=this,b="definition"+i,w=g.definition,y="";var m,E,S,C,O;if(h&&w.$data){O="keywordValidate"+i;var A=w.validateSchema;s+=" var "+b+" = RULES.custom['"+n+"'].definition; var "+O+" = "+b+".validate;"}else{C=e.useCustomRule(g,l,e.schema,e);if(!C)return;v="validate.schema"+t;O=C.code;m=w.compile;E=w.inline;S=w.macro}var R=O+".errors",k="i"+i,I="ruleErr"+i,T=w.async;if(T&&!e.async)throw new Error("async keyword in sync schema");if(!(E||S)){s+=""+R+" = null;"}s+="var "+u+" = errors;var "+p+";";if(h&&w.$data){y+="}";s+=" if ("+v+" === undefined) { "+p+" = true; } else { ";if(A){y+="}";s+=" "+p+" = "+b+".validateSchema("+v+"); if ("+p+") { "}}if(E){if(w.statements){s+=" "+C.validate+" "}else{s+=" "+p+" = "+C.validate+"; "}}else if(S){var x=e.util.copy(e);var y="";x.level++;var F="valid"+x.level;x.schema=C.validate;x.schemaPath="";var j=e.compositeRule;e.compositeRule=x.compositeRule=true;var B=e.validate(x).replace(/validate\.schema/g,O);e.compositeRule=x.compositeRule=j;s+=" "+B}else{var L=L||[];L.push(s);s="";s+=" "+O+".call( ";if(e.opts.passContext){s+="this"}else{s+="self"}if(m||w.schema===false){s+=" , "+d+" "}else{s+=" , "+v+" , "+d+" , validate.schema"+e.schemaPath+" "}s+=" , (dataPath || '')";if(e.errorPath!='""'){s+=" + "+e.errorPath}var M=f?"data"+(f-1||""):"parentData",U=f?e.dataPathArr[f]:"parentDataProperty";s+=" , "+M+" , "+U+" , rootData ) ";var D=s;s=L.pop();if(w.errors===false){s+=" "+p+" = ";if(T){s+="await "}s+=""+D+"; "}else{if(T){R="customErrors"+i;s+=" var "+R+" = null; try { "+p+" = await "+D+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+R+" = e.errors; else throw e; } "}else{s+=" "+R+" = null; "+p+" = "+D+"; "}}}if(w.modifying){s+=" if ("+M+") "+d+" = "+M+"["+U+"];"}s+=""+y;if(w.valid){if(c){s+=" if (true) { "}}else{s+=" if ( ";if(w.valid===undefined){s+=" !";if(S){s+=""+F}else{s+=""+p}}else{s+=" "+!w.valid+" "}s+=") { ";a=g.keyword;var L=L||[];L.push(s);s="";var L=L||[];L.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(o)+" , params: { keyword: '"+g.keyword+"' } ";if(e.opts.messages!==false){s+=" , message: 'should pass \""+g.keyword+"\" keyword validation' "}if(e.opts.verbose){s+=" , schema: validate.schema"+t+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "}s+=" } "}else{s+=" {} "}var N=s;s=L.pop();if(!e.compositeRule&&c){if(e.async){s+=" throw new ValidationError(["+N+"]); "}else{s+=" validate.errors = ["+N+"]; return false; "}}else{s+=" var err = "+N+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}var q=s;s=L.pop();if(E){if(w.errors){if(w.errors!="full"){s+=" for (var "+k+"="+u+"; "+k+"{"use strict";e.exports=function generate_dependencies(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.schemaPath+e.util.getProperty(n);var o=e.errSchemaPath+"/"+n;var c=!e.opts.allErrors;var a="data"+(f||"");var d="errs__"+i;var p=e.util.copy(e);var u="";p.level++;var h="valid"+p.level;var v={},g={},b=e.opts.ownProperties;for(E in l){if(E=="__proto__")continue;var w=l[E];var y=Array.isArray(w)?g:v;y[E]=w}s+="var "+d+" = errors;";var m=e.errorPath;s+="var missing"+i+";";for(var E in g){y=g[E];if(y.length){s+=" if ( "+a+e.util.getProperty(E)+" !== undefined ";if(b){s+=" && Object.prototype.hasOwnProperty.call("+a+", '"+e.util.escapeQuotes(E)+"') "}if(c){s+=" && ( ";var S=y;if(S){var C,O=-1,A=S.length-1;while(O0||w===false:e.util.schemaHasRules(w,e.RULES.all)){s+=" "+h+" = true; if ( "+a+e.util.getProperty(E)+" !== undefined ";if(b){s+=" && Object.prototype.hasOwnProperty.call("+a+", '"+e.util.escapeQuotes(E)+"') "}s+=") { ";p.schema=w;p.schemaPath=t+e.util.getProperty(E);p.errSchemaPath=o+"/"+e.util.escapeFragment(E);s+=" "+e.validate(p)+" ";p.baseId=M;s+=" } ";if(c){s+=" if ("+h+") { ";u+="}"}}}if(c){s+=" "+u+" if ("+d+" == errors) {"}return s}},4684:e=>{"use strict";e.exports=function generate_enum(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.schemaPath+e.util.getProperty(n);var o=e.errSchemaPath+"/"+n;var c=!e.opts.allErrors;var a="data"+(f||"");var d="valid"+i;var p=e.opts.$data&&l&&l.$data,u;if(p){s+=" var schema"+i+" = "+e.util.getData(l.$data,f,e.dataPathArr)+"; ";u="schema"+i}else{u=l}var h="i"+i,v="schema"+i;if(!p){s+=" var "+v+" = validate.schema"+t+";"}s+="var "+d+";";if(p){s+=" if (schema"+i+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+i+")) "+d+" = false; else {"}s+=""+d+" = false;for (var "+h+"=0; "+h+"<"+v+".length; "+h+"++) if (equal("+a+", "+v+"["+h+"])) { "+d+" = true; break; }";if(p){s+=" } "}s+=" if (!"+d+") { ";var g=g||[];g.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"enum"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(o)+" , params: { allowedValues: schema"+i+" } ";if(e.opts.messages!==false){s+=" , message: 'should be equal to one of the allowed values' "}if(e.opts.verbose){s+=" , schema: validate.schema"+t+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+a+" "}s+=" } "}else{s+=" {} "}var b=s;s=g.pop();if(!e.compositeRule&&c){if(e.async){s+=" throw new ValidationError(["+b+"]); "}else{s+=" validate.errors = ["+b+"]; return false; "}}else{s+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" }";if(c){s+=" else { "}return s}},924:e=>{"use strict";e.exports=function generate_format(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.schemaPath+e.util.getProperty(n);var o=e.errSchemaPath+"/"+n;var c=!e.opts.allErrors;var a="data"+(f||"");if(e.opts.format===false){if(c){s+=" if (true) { "}return s}var d=e.opts.$data&&l&&l.$data,p;if(d){s+=" var schema"+i+" = "+e.util.getData(l.$data,f,e.dataPathArr)+"; ";p="schema"+i}else{p=l}var u=e.opts.unknownFormats,h=Array.isArray(u);if(d){var v="format"+i,g="isObject"+i,b="formatType"+i;s+=" var "+v+" = formats["+p+"]; var "+g+" = typeof "+v+" == 'object' && !("+v+" instanceof RegExp) && "+v+".validate; var "+b+" = "+g+" && "+v+".type || 'string'; if ("+g+") { ";if(e.async){s+=" var async"+i+" = "+v+".async; "}s+=" "+v+" = "+v+".validate; } if ( ";if(d){s+=" ("+p+" !== undefined && typeof "+p+" != 'string') || "}s+=" (";if(u!="ignore"){s+=" ("+p+" && !"+v+" ";if(h){s+=" && self._opts.unknownFormats.indexOf("+p+") == -1 "}s+=") || "}s+=" ("+v+" && "+b+" == '"+r+"' && !(typeof "+v+" == 'function' ? ";if(e.async){s+=" (async"+i+" ? await "+v+"("+a+") : "+v+"("+a+")) "}else{s+=" "+v+"("+a+") "}s+=" : "+v+".test("+a+"))))) {"}else{var v=e.formats[l];if(!v){if(u=="ignore"){e.logger.warn('unknown format "'+l+'" ignored in schema at path "'+e.errSchemaPath+'"');if(c){s+=" if (true) { "}return s}else if(h&&u.indexOf(l)>=0){if(c){s+=" if (true) { "}return s}else{throw new Error('unknown format "'+l+'" is used in schema at path "'+e.errSchemaPath+'"')}}var g=typeof v=="object"&&!(v instanceof RegExp)&&v.validate;var b=g&&v.type||"string";if(g){var w=v.async===true;v=v.validate}if(b!=r){if(c){s+=" if (true) { "}return s}if(w){if(!e.async)throw new Error("async format in sync schema");var y="formats"+e.util.getProperty(l)+".validate";s+=" if (!(await "+y+"("+a+"))) { "}else{s+=" if (! ";var y="formats"+e.util.getProperty(l);if(g)y+=".validate";if(typeof v=="function"){s+=" "+y+"("+a+") "}else{s+=" "+y+".test("+a+") "}s+=") { "}}var m=m||[];m.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"format"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(o)+" , params: { format: ";if(d){s+=""+p}else{s+=""+e.util.toQuotedString(l)}s+=" } ";if(e.opts.messages!==false){s+=" , message: 'should match format \"";if(d){s+="' + "+p+" + '"}else{s+=""+e.util.escapeQuotes(l)}s+="\"' "}if(e.opts.verbose){s+=" , schema: ";if(d){s+="validate.schema"+t}else{s+=""+e.util.toQuotedString(l)}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+a+" "}s+=" } "}else{s+=" {} "}var E=s;s=m.pop();if(!e.compositeRule&&c){if(e.async){s+=" throw new ValidationError(["+E+"]); "}else{s+=" validate.errors = ["+E+"]; return false; "}}else{s+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";if(c){s+=" else { "}return s}},3973:e=>{"use strict";e.exports=function generate_if(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.schemaPath+e.util.getProperty(n);var o=e.errSchemaPath+"/"+n;var c=!e.opts.allErrors;var a="data"+(f||"");var d="valid"+i;var p="errs__"+i;var u=e.util.copy(e);u.level++;var h="valid"+u.level;var v=e.schema["then"],g=e.schema["else"],b=v!==undefined&&(e.opts.strictKeywords?typeof v=="object"&&Object.keys(v).length>0||v===false:e.util.schemaHasRules(v,e.RULES.all)),w=g!==undefined&&(e.opts.strictKeywords?typeof g=="object"&&Object.keys(g).length>0||g===false:e.util.schemaHasRules(g,e.RULES.all)),y=u.baseId;if(b||w){var m;u.createErrors=false;u.schema=l;u.schemaPath=t;u.errSchemaPath=o;s+=" var "+p+" = errors; var "+d+" = true; ";var E=e.compositeRule;e.compositeRule=u.compositeRule=true;s+=" "+e.validate(u)+" ";u.baseId=y;u.createErrors=true;s+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ";e.compositeRule=u.compositeRule=E;if(b){s+=" if ("+h+") { ";u.schema=e.schema["then"];u.schemaPath=e.schemaPath+".then";u.errSchemaPath=e.errSchemaPath+"/then";s+=" "+e.validate(u)+" ";u.baseId=y;s+=" "+d+" = "+h+"; ";if(b&&w){m="ifClause"+i;s+=" var "+m+" = 'then'; "}else{m="'then'"}s+=" } ";if(w){s+=" else { "}}else{s+=" if (!"+h+") { "}if(w){u.schema=e.schema["else"];u.schemaPath=e.schemaPath+".else";u.errSchemaPath=e.errSchemaPath+"/else";s+=" "+e.validate(u)+" ";u.baseId=y;s+=" "+d+" = "+h+"; ";if(b&&w){m="ifClause"+i;s+=" var "+m+" = 'else'; "}else{m="'else'"}s+=" } "}s+=" if (!"+d+") { var err = ";if(e.createErrors!==false){s+=" { keyword: '"+"if"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(o)+" , params: { failingKeyword: "+m+" } ";if(e.opts.messages!==false){s+=" , message: 'should match \"' + "+m+" + '\" schema' "}if(e.opts.verbose){s+=" , schema: validate.schema"+t+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+a+" "}s+=" } "}else{s+=" {} "}s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!e.compositeRule&&c){if(e.async){s+=" throw new ValidationError(vErrors); "}else{s+=" validate.errors = vErrors; return false; "}}s+=" } ";if(c){s+=" else { "}}else{if(c){s+=" if (true) { "}}return s}},1676:(e,n,r)=>{"use strict";e.exports={$ref:r(9873),allOf:r(6981),anyOf:r(8138),$comment:r(3090),const:r(2645),contains:r(640),dependencies:r(9466),enum:r(4684),format:r(924),if:r(3973),items:r(5136),maximum:r(5702),minimum:r(5702),maxItems:r(2931),minItems:r(2931),maxLength:r(4583),minLength:r(4583),maxProperties:r(1679),minProperties:r(1679),multipleOf:r(9467),not:r(6223),oneOf:r(61),pattern:r(1819),properties:r(3548),propertyNames:r(2379),required:r(7805),uniqueItems:r(447),validate:r(7752)}},5136:e=>{"use strict";e.exports=function generate_items(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.schemaPath+e.util.getProperty(n);var o=e.errSchemaPath+"/"+n;var c=!e.opts.allErrors;var a="data"+(f||"");var d="valid"+i;var p="errs__"+i;var u=e.util.copy(e);var h="";u.level++;var v="valid"+u.level;var g="i"+i,b=u.dataLevel=e.dataLevel+1,w="data"+b,y=e.baseId;s+="var "+p+" = errors;var "+d+";";if(Array.isArray(l)){var m=e.schema.additionalItems;if(m===false){s+=" "+d+" = "+a+".length <= "+l.length+"; ";var E=o;o=e.errSchemaPath+"/additionalItems";s+=" if (!"+d+") { ";var S=S||[];S.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"additionalItems"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(o)+" , params: { limit: "+l.length+" } ";if(e.opts.messages!==false){s+=" , message: 'should NOT have more than "+l.length+" items' "}if(e.opts.verbose){s+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+a+" "}s+=" } "}else{s+=" {} "}var C=s;s=S.pop();if(!e.compositeRule&&c){if(e.async){s+=" throw new ValidationError(["+C+"]); "}else{s+=" validate.errors = ["+C+"]; return false; "}}else{s+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";o=E;if(c){h+="}";s+=" else { "}}var O=l;if(O){var A,R=-1,k=O.length-1;while(R0||A===false:e.util.schemaHasRules(A,e.RULES.all)){s+=" "+v+" = true; if ("+a+".length > "+R+") { ";var I=a+"["+R+"]";u.schema=A;u.schemaPath=t+"["+R+"]";u.errSchemaPath=o+"/"+R;u.errorPath=e.util.getPathExpr(e.errorPath,R,e.opts.jsonPointers,true);u.dataPathArr[b]=R;var T=e.validate(u);u.baseId=y;if(e.util.varOccurences(T,w)<2){s+=" "+e.util.varReplace(T,w,I)+" "}else{s+=" var "+w+" = "+I+"; "+T+" "}s+=" } ";if(c){s+=" if ("+v+") { ";h+="}"}}}}if(typeof m=="object"&&(e.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===false:e.util.schemaHasRules(m,e.RULES.all))){u.schema=m;u.schemaPath=e.schemaPath+".additionalItems";u.errSchemaPath=e.errSchemaPath+"/additionalItems";s+=" "+v+" = true; if ("+a+".length > "+l.length+") { for (var "+g+" = "+l.length+"; "+g+" < "+a+".length; "+g+"++) { ";u.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,true);var I=a+"["+g+"]";u.dataPathArr[b]=g;var T=e.validate(u);u.baseId=y;if(e.util.varOccurences(T,w)<2){s+=" "+e.util.varReplace(T,w,I)+" "}else{s+=" var "+w+" = "+I+"; "+T+" "}if(c){s+=" if (!"+v+") break; "}s+=" } } ";if(c){s+=" if ("+v+") { ";h+="}"}}}else if(e.opts.strictKeywords?typeof l=="object"&&Object.keys(l).length>0||l===false:e.util.schemaHasRules(l,e.RULES.all)){u.schema=l;u.schemaPath=t;u.errSchemaPath=o;s+=" for (var "+g+" = "+0+"; "+g+" < "+a+".length; "+g+"++) { ";u.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,true);var I=a+"["+g+"]";u.dataPathArr[b]=g;var T=e.validate(u);u.baseId=y;if(e.util.varOccurences(T,w)<2){s+=" "+e.util.varReplace(T,w,I)+" "}else{s+=" var "+w+" = "+I+"; "+T+" "}if(c){s+=" if (!"+v+") break; "}s+=" }"}if(c){s+=" "+h+" if ("+p+" == errors) {"}return s}},9467:e=>{"use strict";e.exports=function generate_multipleOf(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.schemaPath+e.util.getProperty(n);var o=e.errSchemaPath+"/"+n;var c=!e.opts.allErrors;var a="data"+(f||"");var d=e.opts.$data&&l&&l.$data,p;if(d){s+=" var schema"+i+" = "+e.util.getData(l.$data,f,e.dataPathArr)+"; ";p="schema"+i}else{p=l}if(!(d||typeof l=="number")){throw new Error(n+" must be number")}s+="var division"+i+";if (";if(d){s+=" "+p+" !== undefined && ( typeof "+p+" != 'number' || "}s+=" (division"+i+" = "+a+" / "+p+", ";if(e.opts.multipleOfPrecision){s+=" Math.abs(Math.round(division"+i+") - division"+i+") > 1e-"+e.opts.multipleOfPrecision+" "}else{s+=" division"+i+" !== parseInt(division"+i+") "}s+=" ) ";if(d){s+=" ) "}s+=" ) { ";var u=u||[];u.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"multipleOf"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(o)+" , params: { multipleOf: "+p+" } ";if(e.opts.messages!==false){s+=" , message: 'should be multiple of ";if(d){s+="' + "+p}else{s+=""+p+"'"}}if(e.opts.verbose){s+=" , schema: ";if(d){s+="validate.schema"+t}else{s+=""+l}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+a+" "}s+=" } "}else{s+=" {} "}var h=s;s=u.pop();if(!e.compositeRule&&c){if(e.async){s+=" throw new ValidationError(["+h+"]); "}else{s+=" validate.errors = ["+h+"]; return false; "}}else{s+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(c){s+=" else { "}return s}},6223:e=>{"use strict";e.exports=function generate_not(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.schemaPath+e.util.getProperty(n);var o=e.errSchemaPath+"/"+n;var c=!e.opts.allErrors;var a="data"+(f||"");var d="errs__"+i;var p=e.util.copy(e);p.level++;var u="valid"+p.level;if(e.opts.strictKeywords?typeof l=="object"&&Object.keys(l).length>0||l===false:e.util.schemaHasRules(l,e.RULES.all)){p.schema=l;p.schemaPath=t;p.errSchemaPath=o;s+=" var "+d+" = errors; ";var h=e.compositeRule;e.compositeRule=p.compositeRule=true;p.createErrors=false;var v;if(p.opts.allErrors){v=p.opts.allErrors;p.opts.allErrors=false}s+=" "+e.validate(p)+" ";p.createErrors=true;if(v)p.opts.allErrors=v;e.compositeRule=p.compositeRule=h;s+=" if ("+u+") { ";var g=g||[];g.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(o)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: 'should NOT be valid' "}if(e.opts.verbose){s+=" , schema: validate.schema"+t+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+a+" "}s+=" } "}else{s+=" {} "}var b=s;s=g.pop();if(!e.compositeRule&&c){if(e.async){s+=" throw new ValidationError(["+b+"]); "}else{s+=" validate.errors = ["+b+"]; return false; "}}else{s+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ";if(e.opts.allErrors){s+=" } "}}else{s+=" var err = ";if(e.createErrors!==false){s+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(o)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: 'should NOT be valid' "}if(e.opts.verbose){s+=" , schema: validate.schema"+t+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+a+" "}s+=" } "}else{s+=" {} "}s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c){s+=" if (false) { "}}return s}},61:e=>{"use strict";e.exports=function generate_oneOf(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.schemaPath+e.util.getProperty(n);var o=e.errSchemaPath+"/"+n;var c=!e.opts.allErrors;var a="data"+(f||"");var d="valid"+i;var p="errs__"+i;var u=e.util.copy(e);var h="";u.level++;var v="valid"+u.level;var g=u.baseId,b="prevValid"+i,w="passingSchemas"+i;s+="var "+p+" = errors , "+b+" = false , "+d+" = false , "+w+" = null; ";var y=e.compositeRule;e.compositeRule=u.compositeRule=true;var m=l;if(m){var E,S=-1,C=m.length-1;while(S0||E===false:e.util.schemaHasRules(E,e.RULES.all)){u.schema=E;u.schemaPath=t+"["+S+"]";u.errSchemaPath=o+"/"+S;s+=" "+e.validate(u)+" ";u.baseId=g}else{s+=" var "+v+" = true; "}if(S){s+=" if ("+v+" && "+b+") { "+d+" = false; "+w+" = ["+w+", "+S+"]; } else { ";h+="}"}s+=" if ("+v+") { "+d+" = "+b+" = true; "+w+" = "+S+"; }"}}e.compositeRule=u.compositeRule=y;s+=""+h+"if (!"+d+") { var err = ";if(e.createErrors!==false){s+=" { keyword: '"+"oneOf"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(o)+" , params: { passingSchemas: "+w+" } ";if(e.opts.messages!==false){s+=" , message: 'should match exactly one schema in oneOf' "}if(e.opts.verbose){s+=" , schema: validate.schema"+t+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+a+" "}s+=" } "}else{s+=" {} "}s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!e.compositeRule&&c){if(e.async){s+=" throw new ValidationError(vErrors); "}else{s+=" validate.errors = vErrors; return false; "}}s+="} else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; }";if(e.opts.allErrors){s+=" } "}return s}},1819:e=>{"use strict";e.exports=function generate_pattern(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.schemaPath+e.util.getProperty(n);var o=e.errSchemaPath+"/"+n;var c=!e.opts.allErrors;var a="data"+(f||"");var d=e.opts.$data&&l&&l.$data,p;if(d){s+=" var schema"+i+" = "+e.util.getData(l.$data,f,e.dataPathArr)+"; ";p="schema"+i}else{p=l}var u=d?"(new RegExp("+p+"))":e.usePattern(l);s+="if ( ";if(d){s+=" ("+p+" !== undefined && typeof "+p+" != 'string') || "}s+=" !"+u+".test("+a+") ) { ";var h=h||[];h.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"pattern"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(o)+" , params: { pattern: ";if(d){s+=""+p}else{s+=""+e.util.toQuotedString(l)}s+=" } ";if(e.opts.messages!==false){s+=" , message: 'should match pattern \"";if(d){s+="' + "+p+" + '"}else{s+=""+e.util.escapeQuotes(l)}s+="\"' "}if(e.opts.verbose){s+=" , schema: ";if(d){s+="validate.schema"+t}else{s+=""+e.util.toQuotedString(l)}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+a+" "}s+=" } "}else{s+=" {} "}var v=s;s=h.pop();if(!e.compositeRule&&c){if(e.async){s+=" throw new ValidationError(["+v+"]); "}else{s+=" validate.errors = ["+v+"]; return false; "}}else{s+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+="} ";if(c){s+=" else { "}return s}},3548:e=>{"use strict";e.exports=function generate_properties(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.schemaPath+e.util.getProperty(n);var o=e.errSchemaPath+"/"+n;var c=!e.opts.allErrors;var a="data"+(f||"");var d="errs__"+i;var p=e.util.copy(e);var u="";p.level++;var h="valid"+p.level;var v="key"+i,g="idx"+i,b=p.dataLevel=e.dataLevel+1,w="data"+b,y="dataProperties"+i;var m=Object.keys(l||{}).filter(notProto),E=e.schema.patternProperties||{},S=Object.keys(E).filter(notProto),C=e.schema.additionalProperties,O=m.length||S.length,A=C===false,R=typeof C=="object"&&Object.keys(C).length,k=e.opts.removeAdditional,I=A||R||k,T=e.opts.ownProperties,x=e.baseId;var F=e.schema.required;if(F&&!(e.opts.$data&&F.$data)&&F.length8){s+=" || validate.schema"+t+".hasOwnProperty("+v+") "}else{var B=m;if(B){var L,M=-1,U=B.length-1;while(M0||$===false:e.util.schemaHasRules($,e.RULES.all)){var ee=e.util.getProperty(L),X=a+ee,ne=V&&$.default!==undefined;p.schema=$;p.schemaPath=t+ee;p.errSchemaPath=o+"/"+e.util.escapeFragment(L);p.errorPath=e.util.getPath(e.errorPath,L,e.opts.jsonPointers);p.dataPathArr[b]=e.util.toQuotedString(L);var Z=e.validate(p);p.baseId=x;if(e.util.varOccurences(Z,w)<2){Z=e.util.varReplace(Z,w,X);var re=X}else{var re=w;s+=" var "+w+" = "+X+"; "}if(ne){s+=" "+Z+" "}else{if(j&&j[L]){s+=" if ( "+re+" === undefined ";if(T){s+=" || ! Object.prototype.hasOwnProperty.call("+a+", '"+e.util.escapeQuotes(L)+"') "}s+=") { "+h+" = false; ";var H=e.errorPath,Y=o,se=e.util.escapeQuotes(L);if(e.opts._errorDataPathProperty){e.errorPath=e.util.getPath(H,L,e.opts.jsonPointers)}o=e.errSchemaPath+"/required";var G=G||[];G.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(o)+" , params: { missingProperty: '"+se+"' } ";if(e.opts.messages!==false){s+=" , message: '";if(e.opts._errorDataPathProperty){s+="is a required property"}else{s+="should have required property \\'"+se+"\\'"}s+="' "}if(e.opts.verbose){s+=" , schema: validate.schema"+t+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+a+" "}s+=" } "}else{s+=" {} "}var Q=s;s=G.pop();if(!e.compositeRule&&c){if(e.async){s+=" throw new ValidationError(["+Q+"]); "}else{s+=" validate.errors = ["+Q+"]; return false; "}}else{s+=" var err = "+Q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}o=Y;e.errorPath=H;s+=" } else { "}else{if(c){s+=" if ( "+re+" === undefined ";if(T){s+=" || ! Object.prototype.hasOwnProperty.call("+a+", '"+e.util.escapeQuotes(L)+"') "}s+=") { "+h+" = true; } else { "}else{s+=" if ("+re+" !== undefined ";if(T){s+=" && Object.prototype.hasOwnProperty.call("+a+", '"+e.util.escapeQuotes(L)+"') "}s+=" ) { "}}s+=" "+Z+" } "}}if(c){s+=" if ("+h+") { ";u+="}"}}}}if(S.length){var ie=S;if(ie){var N,fe=-1,le=ie.length-1;while(fe0||$===false:e.util.schemaHasRules($,e.RULES.all)){p.schema=$;p.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(N);p.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(N);if(T){s+=" "+y+" = "+y+" || Object.keys("+a+"); for (var "+g+"=0; "+g+"<"+y+".length; "+g+"++) { var "+v+" = "+y+"["+g+"]; "}else{s+=" for (var "+v+" in "+a+") { "}s+=" if ("+e.usePattern(N)+".test("+v+")) { ";p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers);var X=a+"["+v+"]";p.dataPathArr[b]=v;var Z=e.validate(p);p.baseId=x;if(e.util.varOccurences(Z,w)<2){s+=" "+e.util.varReplace(Z,w,X)+" "}else{s+=" var "+w+" = "+X+"; "+Z+" "}if(c){s+=" if (!"+h+") break; "}s+=" } ";if(c){s+=" else "+h+" = true; "}s+=" } ";if(c){s+=" if ("+h+") { ";u+="}"}}}}}if(c){s+=" "+u+" if ("+d+" == errors) {"}return s}},2379:e=>{"use strict";e.exports=function generate_propertyNames(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.schemaPath+e.util.getProperty(n);var o=e.errSchemaPath+"/"+n;var c=!e.opts.allErrors;var a="data"+(f||"");var d="errs__"+i;var p=e.util.copy(e);var u="";p.level++;var h="valid"+p.level;s+="var "+d+" = errors;";if(e.opts.strictKeywords?typeof l=="object"&&Object.keys(l).length>0||l===false:e.util.schemaHasRules(l,e.RULES.all)){p.schema=l;p.schemaPath=t;p.errSchemaPath=o;var v="key"+i,g="idx"+i,b="i"+i,w="' + "+v+" + '",y=p.dataLevel=e.dataLevel+1,m="data"+y,E="dataProperties"+i,S=e.opts.ownProperties,C=e.baseId;if(S){s+=" var "+E+" = undefined; "}if(S){s+=" "+E+" = "+E+" || Object.keys("+a+"); for (var "+g+"=0; "+g+"<"+E+".length; "+g+"++) { var "+v+" = "+E+"["+g+"]; "}else{s+=" for (var "+v+" in "+a+") { "}s+=" var startErrs"+i+" = errors; ";var O=v;var A=e.compositeRule;e.compositeRule=p.compositeRule=true;var R=e.validate(p);p.baseId=C;if(e.util.varOccurences(R,m)<2){s+=" "+e.util.varReplace(R,m,O)+" "}else{s+=" var "+m+" = "+O+"; "+R+" "}e.compositeRule=p.compositeRule=A;s+=" if (!"+h+") { for (var "+b+"=startErrs"+i+"; "+b+"{"use strict";e.exports=function generate_ref(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.errSchemaPath+"/"+n;var o=!e.opts.allErrors;var c="data"+(f||"");var a="valid"+i;var d,p;if(l=="#"||l=="#/"){if(e.isRoot){d=e.async;p="validate"}else{d=e.root.schema.$async===true;p="root.refVal[0]"}}else{var u=e.resolveRef(e.baseId,l,e.isRoot);if(u===undefined){var h=e.MissingRefError.message(e.baseId,l);if(e.opts.missingRefs=="fail"){e.logger.error(h);var v=v||[];v.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"$ref"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(t)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ";if(e.opts.messages!==false){s+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "}if(e.opts.verbose){s+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}s+=" } "}else{s+=" {} "}var g=s;s=v.pop();if(!e.compositeRule&&o){if(e.async){s+=" throw new ValidationError(["+g+"]); "}else{s+=" validate.errors = ["+g+"]; return false; "}}else{s+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}if(o){s+=" if (false) { "}}else if(e.opts.missingRefs=="ignore"){e.logger.warn(h);if(o){s+=" if (true) { "}}else{throw new e.MissingRefError(e.baseId,l,h)}}else if(u.inline){var b=e.util.copy(e);b.level++;var w="valid"+b.level;b.schema=u.schema;b.schemaPath="";b.errSchemaPath=l;var y=e.validate(b).replace(/validate\.schema/g,u.code);s+=" "+y+" ";if(o){s+=" if ("+w+") { "}}else{d=u.$async===true||e.async&&u.$async!==false;p=u.code}}if(p){var v=v||[];v.push(s);s="";if(e.opts.passContext){s+=" "+p+".call(this, "}else{s+=" "+p+"( "}s+=" "+c+", (dataPath || '')";if(e.errorPath!='""'){s+=" + "+e.errorPath}var m=f?"data"+(f-1||""):"parentData",E=f?e.dataPathArr[f]:"parentDataProperty";s+=" , "+m+" , "+E+", rootData) ";var S=s;s=v.pop();if(d){if(!e.async)throw new Error("async schema referenced by sync schema");if(o){s+=" var "+a+"; "}s+=" try { await "+S+"; ";if(o){s+=" "+a+" = true; "}s+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ";if(o){s+=" "+a+" = false; "}s+=" } ";if(o){s+=" if ("+a+") { "}}else{s+=" if (!"+S+") { if (vErrors === null) vErrors = "+p+".errors; else vErrors = vErrors.concat("+p+".errors); errors = vErrors.length; } ";if(o){s+=" else { "}}}return s}},7805:e=>{"use strict";e.exports=function generate_required(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.schemaPath+e.util.getProperty(n);var o=e.errSchemaPath+"/"+n;var c=!e.opts.allErrors;var a="data"+(f||"");var d="valid"+i;var p=e.opts.$data&&l&&l.$data,u;if(p){s+=" var schema"+i+" = "+e.util.getData(l.$data,f,e.dataPathArr)+"; ";u="schema"+i}else{u=l}var h="schema"+i;if(!p){if(l.length0||m===false:e.util.schemaHasRules(m,e.RULES.all)))){v[v.length]=b}}}}else{var v=l}}if(p||v.length){var E=e.errorPath,S=p||v.length>=e.opts.loopRequired,C=e.opts.ownProperties;if(c){s+=" var missing"+i+"; ";if(S){if(!p){s+=" var "+h+" = validate.schema"+t+"; "}var O="i"+i,A="schema"+i+"["+O+"]",R="' + "+A+" + '";if(e.opts._errorDataPathProperty){e.errorPath=e.util.getPathExpr(E,A,e.opts.jsonPointers)}s+=" var "+d+" = true; ";if(p){s+=" if (schema"+i+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+i+")) "+d+" = false; else {"}s+=" for (var "+O+" = 0; "+O+" < "+h+".length; "+O+"++) { "+d+" = "+a+"["+h+"["+O+"]] !== undefined ";if(C){s+=" && Object.prototype.hasOwnProperty.call("+a+", "+h+"["+O+"]) "}s+="; if (!"+d+") break; } ";if(p){s+=" } "}s+=" if (!"+d+") { ";var k=k||[];k.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(o)+" , params: { missingProperty: '"+R+"' } ";if(e.opts.messages!==false){s+=" , message: '";if(e.opts._errorDataPathProperty){s+="is a required property"}else{s+="should have required property \\'"+R+"\\'"}s+="' "}if(e.opts.verbose){s+=" , schema: validate.schema"+t+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+a+" "}s+=" } "}else{s+=" {} "}var I=s;s=k.pop();if(!e.compositeRule&&c){if(e.async){s+=" throw new ValidationError(["+I+"]); "}else{s+=" validate.errors = ["+I+"]; return false; "}}else{s+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } else { "}else{s+=" if ( ";var T=v;if(T){var x,O=-1,F=T.length-1;while(O{"use strict";e.exports=function generate_uniqueItems(e,n,r){var s=" ";var i=e.level;var f=e.dataLevel;var l=e.schema[n];var t=e.schemaPath+e.util.getProperty(n);var o=e.errSchemaPath+"/"+n;var c=!e.opts.allErrors;var a="data"+(f||"");var d="valid"+i;var p=e.opts.$data&&l&&l.$data,u;if(p){s+=" var schema"+i+" = "+e.util.getData(l.$data,f,e.dataPathArr)+"; ";u="schema"+i}else{u=l}if((l||p)&&e.opts.uniqueItems!==false){if(p){s+=" var "+d+"; if ("+u+" === false || "+u+" === undefined) "+d+" = true; else if (typeof "+u+" != 'boolean') "+d+" = false; else { "}s+=" var i = "+a+".length , "+d+" = true , j; if (i > 1) { ";var h=e.schema.items&&e.schema.items.type,v=Array.isArray(h);if(!h||h=="object"||h=="array"||v&&(h.indexOf("object")>=0||h.indexOf("array")>=0)){s+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+a+"[i], "+a+"[j])) { "+d+" = false; break outer; } } } "}else{s+=" var itemIndices = {}, item; for (;i--;) { var item = "+a+"[i]; ";var g="checkDataType"+(v?"s":"");s+=" if ("+e.util[g](h,"item",e.opts.strictNumbers,true)+") continue; ";if(v){s+=" if (typeof item == 'string') item = '\"' + item; "}s+=" if (typeof itemIndices[item] == 'number') { "+d+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}s+=" } ";if(p){s+=" } "}s+=" if (!"+d+") { ";var b=b||[];b.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+"uniqueItems"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(o)+" , params: { i: i, j: j } ";if(e.opts.messages!==false){s+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "}if(e.opts.verbose){s+=" , schema: ";if(p){s+="validate.schema"+t}else{s+=""+l}s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+a+" "}s+=" } "}else{s+=" {} "}var w=s;s=b.pop();if(!e.compositeRule&&c){if(e.async){s+=" throw new ValidationError(["+w+"]); "}else{s+=" validate.errors = ["+w+"]; return false; "}}else{s+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}s+=" } ";if(c){s+=" else { "}}else{if(c){s+=" if (true) { "}}return s}},7752:e=>{"use strict";e.exports=function generate_validate(e,n,r){var s="";var i=e.schema.$async===true,f=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),l=e.self._getId(e.schema);if(e.opts.strictKeywords){var t=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(t){var o="unknown keyword: "+t;if(e.opts.strictKeywords==="log")e.logger.warn(o);else throw new Error(o)}}if(e.isTop){s+=" var validate = ";if(i){e.async=true;s+="async "}s+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ";if(l&&(e.opts.sourceCode||e.opts.processCode)){s+=" "+("/*# sourceURL="+l+" */")+" "}}if(typeof e.schema=="boolean"||!(f||e.schema.$ref)){var n="false schema";var c=e.level;var a=e.dataLevel;var d=e.schema[n];var p=e.schemaPath+e.util.getProperty(n);var u=e.errSchemaPath+"/"+n;var h=!e.opts.allErrors;var v;var g="data"+(a||"");var b="valid"+c;if(e.schema===false){if(e.isTop){h=true}else{s+=" var "+b+" = false; "}var w=w||[];w.push(s);s="";if(e.createErrors!==false){s+=" { keyword: '"+(v||"false schema")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ";if(e.opts.messages!==false){s+=" , message: 'boolean schema is false' "}if(e.opts.verbose){s+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+g+" "}s+=" } "}else{s+=" {} "}var y=s;s=w.pop();if(!e.compositeRule&&h){if(e.async){s+=" throw new ValidationError(["+y+"]); "}else{s+=" validate.errors = ["+y+"]; return false; "}}else{s+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}else{if(e.isTop){if(i){s+=" return data; "}else{s+=" validate.errors = null; return true; "}}else{s+=" var "+b+" = true; "}}if(e.isTop){s+=" }; return validate; "}return s}if(e.isTop){var m=e.isTop,c=e.level=0,a=e.dataLevel=0,g="data";e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema));e.baseId=e.baseId||e.rootId;delete e.isTop;e.dataPathArr=[""];if(e.schema.default!==undefined&&e.opts.useDefaults&&e.opts.strictDefaults){var E="default is ignored in the schema root";if(e.opts.strictDefaults==="log")e.logger.warn(E);else throw new Error(E)}s+=" var vErrors = null; ";s+=" var errors = 0; ";s+=" if (rootData === undefined) rootData = data; "}else{var c=e.level,a=e.dataLevel,g="data"+(a||"");if(l)e.baseId=e.resolve.url(e.baseId,l);if(i&&!e.async)throw new Error("async schema in sync schema");s+=" var errs_"+c+" = errors;"}var b="valid"+c,h=!e.opts.allErrors,S="",C="";var v;var O=e.schema.type,A=Array.isArray(O);if(O&&e.opts.nullable&&e.schema.nullable===true){if(A){if(O.indexOf("null")==-1)O=O.concat("null")}else if(O!="null"){O=[O,"null"];A=true}}if(A&&O.length==1){O=O[0];A=false}if(e.schema.$ref&&f){if(e.opts.extendRefs=="fail"){throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)')}else if(e.opts.extendRefs!==true){f=false;e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"')}}if(e.schema.$comment&&e.opts.$comment){s+=" "+e.RULES.all.$comment.code(e,"$comment")}if(O){if(e.opts.coerceTypes){var R=e.util.coerceToTypes(e.opts.coerceTypes,O)}var k=e.RULES.types[O];if(R||A||k===true||k&&!$shouldUseGroup(k)){var p=e.schemaPath+".type",u=e.errSchemaPath+"/type";var p=e.schemaPath+".type",u=e.errSchemaPath+"/type",I=A?"checkDataTypes":"checkDataType";s+=" if ("+e.util[I](O,g,e.opts.strictNumbers,true)+") { ";if(R){var T="dataType"+c,x="coerced"+c;s+=" var "+T+" = typeof "+g+"; var "+x+" = undefined; ";if(e.opts.coerceTypes=="array"){s+=" if ("+T+" == 'object' && Array.isArray("+g+") && "+g+".length == 1) { "+g+" = "+g+"[0]; "+T+" = typeof "+g+"; if ("+e.util.checkDataType(e.schema.type,g,e.opts.strictNumbers)+") "+x+" = "+g+"; } "}s+=" if ("+x+" !== undefined) ; ";var F=R;if(F){var j,B=-1,L=F.length-1;while(B{"use strict";var s=/^[a-z_$][a-z0-9_$-]*$/i;var i=r(4741);var f=r(2059);e.exports={add:addKeyword,get:getKeyword,remove:removeKeyword,validate:validateKeyword};function addKeyword(e,n){var r=this.RULES;if(r.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!s.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(n){this.validateKeyword(n,true);var f=n.type;if(Array.isArray(f)){for(var l=0;l{e.exports=(e=>{const n=process.versions.node.split(".").map(e=>parseInt(e,10));e=e.split(".").map(e=>parseInt(e,10));return n[0]>e[0]||n[0]===e[0]&&(n[1]>e[1]||n[1]===e[1]&&n[2]>=e[2])})},3802:(e,n,r)=>{"use strict";const s=r(1338);const i=r(4455)("$$bole",{fastTime:false});const f=r(4658);const l="debug info warn error".split(" ");const t=r(2087).hostname();const o=s(t);const c=process.pid;let a=false;const d=[];for(const e of l){d[e]=',"hostname":'+o+',"pid":'+c+',"level":"'+e;Number(d[e]);if(!Array.isArray(i[e])){i[e]=[]}}function stackToString(e){let n=e.stack;let r;if(typeof e.cause==="function"&&(r=e.cause())){n+="\nCaused by: "+stackToString(r)}return n}function errorToOut(e,n){n.err={name:e.name,message:e.message,code:e.code,stack:stackToString(e)}}function requestToOut(e,n){n.req={method:e.method,url:e.url,headers:e.headers,remoteAddress:e.connection.remoteAddress,remotePort:e.connection.remotePort}}function objectToOut(e,n){for(const r in e){if(Object.prototype.hasOwnProperty.call(e,r)&&e[r]!==undefined){n[r]=e[r]}}}function objectMode(e){return e._writableState&&e._writableState.objectMode===true}function stringify(e,n,r,f){let l='{"time":'+(i.fastTime?Date.now():'"'+(new Date).toISOString()+'"')+d[e]+'","name":'+n+(r!==undefined?',"message":'+s(r):"");for(const e in f){l+=","+s(e)+":"+s(f[e])}l+="}";Number(l);return l}function extend(e,n,r,s){const f={time:i.fastTime?Date.now():(new Date).toISOString(),hostname:t,pid:c,level:e,name:n};if(r!==undefined){s.message=r}for(const e in s){f[e]=s[e]}return f}function levelLogger(e,n){const r=i[e];const l=s(n);return function namedLevelLogger(s,i,t,o,c,d,p,u,h,v,g,b,w,y,m,E){if(r.length===0){return}const S={};let C;let O=0;const A=r.length;let R;let k;if(typeof s==="string"||s==null){if(!(k=f(s,i,t,o,c,d,p,u,h,v,g,b,w,y,m,E))){k=undefined}}else{if(s instanceof Error){if(typeof i==="object"){objectToOut(i,S);errorToOut(s,S);if(!(k=f(t,o,c,d,p,u,h,v,g,b,w,y,m,E))){k=undefined}}else{errorToOut(s,S);if(!(k=f(i,t,o,c,d,p,u,h,v,g,b,w,y,m,E))){k=undefined}}}else{if(!(k=f(i,t,o,c,d,p,u,h,v,g,b,w,y,m,E))){k=undefined}}if(typeof s==="boolean"){k=String(s)}else if(typeof s==="object"&&!(s instanceof Error)){if(s.method&&s.url&&s.headers&&s.socket){requestToOut(s,S)}else{objectToOut(s,S)}}}if(A===1&&!a){r[0].write(Buffer.from(stringify(e,l,k,S)+"\n"));return}for(;O{var s=r(1669).format;function format(e,n,r,i,f,l,t,o,c,a,d,p,u,h,v,g){if(g!==undefined){return s(e,n,r,i,f,l,t,o,c,a,d,p,u,h,v,g)}if(v!==undefined){return s(e,n,r,i,f,l,t,o,c,a,d,p,u,h,v)}if(h!==undefined){return s(e,n,r,i,f,l,t,o,c,a,d,p,u,h)}if(u!==undefined){return s(e,n,r,i,f,l,t,o,c,a,d,p,u)}if(p!==undefined){return s(e,n,r,i,f,l,t,o,c,a,d,p)}if(d!==undefined){return s(e,n,r,i,f,l,t,o,c,a,d)}if(a!==undefined){return s(e,n,r,i,f,l,t,o,c,a)}if(c!==undefined){return s(e,n,r,i,f,l,t,o,c)}if(o!==undefined){return s(e,n,r,i,f,l,t,o)}if(t!==undefined){return s(e,n,r,i,f,l,t)}if(l!==undefined){return s(e,n,r,i,f,l)}if(f!==undefined){return s(e,n,r,i,f)}if(i!==undefined){return s(e,n,r,i)}if(r!==undefined){return s(e,n,r)}if(n!==undefined){return s(e,n)}return e}e.exports=format},6551:e=>{"use strict";function dataUriToBuffer(e){if(!/^data:/i.test(e)){throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")')}e=e.replace(/\r?\n/g,"");const n=e.indexOf(",");if(n===-1||n<=4){throw new TypeError("malformed data: URI")}const r=e.substring(5,n).split(";");let s="";let i=false;const f=r[0]||"text/plain";let l=f;for(let e=1;e{n.formatArgs=formatArgs;n.save=save;n.load=load;n.useColors=useColors;n.storage=localstorage();n.destroy=(()=>{let e=false;return()=>{if(!e){e=true;console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}}})();n.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"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(n){n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}const r="color: "+this.color;n.splice(1,0,r,"color: inherit");let s=0;let i=0;n[0].replace(/%[a-zA-Z%]/g,e=>{if(e==="%%"){return}s++;if(e==="%c"){i=s}});n.splice(i,0,r)}n.log=console.debug||console.log||(()=>{});function save(e){try{if(e){n.storage.setItem("debug",e)}else{n.storage.removeItem("debug")}}catch(e){}}function load(){let e;try{e=n.storage.getItem("debug")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=r(5994)(n);const{formatters:s}=e.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},5994:(e,n,r)=>{function setup(e){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=r(892);createDebug.destroy=destroy;Object.keys(e).forEach(n=>{createDebug[n]=e[n]});createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(e){let n=0;for(let r=0;r{if(n==="%%"){return"%"}f++;const i=createDebug.formatters[s];if(typeof i==="function"){const s=e[f];n=i.call(r,s);e.splice(f,1);f--}return n});createDebug.formatArgs.call(r,e);const l=r.log||createDebug.log;l.apply(r,e)}debug.namespace=e;debug.useColors=createDebug.useColors();debug.color=createDebug.selectColor(e);debug.extend=extend;debug.destroy=createDebug.destroy;Object.defineProperty(debug,"enabled",{enumerable:true,configurable:false,get:()=>{if(r!==null){return r}if(s!==createDebug.namespaces){s=createDebug.namespaces;i=createDebug.enabled(e)}return i},set:e=>{r=e}});if(typeof createDebug.init==="function"){createDebug.init(debug)}return debug}function extend(e,n){const r=createDebug(this.namespace+(typeof n==="undefined"?":":n)+e);r.log=this.log;return r}function enable(e){createDebug.save(e);createDebug.namespaces=e;createDebug.names=[];createDebug.skips=[];let n;const r=(typeof e==="string"?e:"").split(/[\s,]+/);const s=r.length;for(n=0;n"-"+e)].join(",");createDebug.enable("");return e}function enabled(e){if(e[e.length-1]==="*"){return true}let n;let r;for(n=0,r=createDebug.skips.length;n{if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=r(4631)}else{e.exports=r(6752)}},6752:(e,n,r)=>{const s=r(3867);const i=r(1669);n.init=init;n.log=log;n.formatArgs=formatArgs;n.save=save;n.load=load;n.useColors=useColors;n.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`.");n.colors=[6,2,3,4,5,1];try{const e=r(1415);if(e&&(e.stderr||e).level>=2){n.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){}n.inspectOpts=Object.keys(process.env).filter(e=>{return/^debug_/i.test(e)}).reduce((e,n)=>{const r=n.substring(6).toLowerCase().replace(/_([a-z])/g,(e,n)=>{return n.toUpperCase()});let s=process.env[n];if(/^(yes|on|true|enabled)$/i.test(s)){s=true}else if(/^(no|off|false|disabled)$/i.test(s)){s=false}else if(s==="null"){s=null}else{s=Number(s)}e[r]=s;return e},{});function useColors(){return"colors"in n.inspectOpts?Boolean(n.inspectOpts.colors):s.isatty(process.stderr.fd)}function formatArgs(n){const{namespace:r,useColors:s}=this;if(s){const s=this.color;const i="[3"+(s<8?s:"8;5;"+s);const f=` ${i};1m${r} `;n[0]=f+n[0].split("\n").join("\n"+f);n.push(i+"m+"+e.exports.humanize(this.diff)+"")}else{n[0]=getDate()+r+" "+n[0]}}function getDate(){if(n.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(i.format(...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const r=Object.keys(n.inspectOpts);for(let s=0;se.trim()).join(" ")};f.O=function(e){this.inspectOpts.colors=this.useColors;return i.inspect(e,this.inspectOpts)}},2527:(module,__unused_webpack_exports,__nccwpck_require__)=>{var callSiteToString=__nccwpck_require__(5809).callSiteToString;var eventListenerCount=__nccwpck_require__(5809).eventListenerCount;var relative=__nccwpck_require__(5622).relative;module.exports=depd;var basePath=process.cwd();function containsNamespace(e,n){var r=e.split(/[ ,]+/);var s=String(n).toLowerCase();for(var i=0;i";var r=e.getLineNumber();var s=e.getColumnNumber();if(e.isEval()){n=e.getEvalOrigin()+", "+n}var i=[n,r,s];i.callSite=e;i.name=e.getFunctionName();return i}function defaultMessage(e){var n=e.callSite;var r=e.name;if(!r){r=""}var s=n.getThis();var i=s&&n.getTypeName();if(i==="Object"){i=undefined}if(i==="Function"){i=s.name||i}return i&&n.getMethodName()?i+"."+r:r}function formatPlain(e,n,r){var s=(new Date).toUTCString();var i=s+" "+this._namespace+" deprecated "+e;if(this._traced){for(var f=0;f{"use strict";e.exports=callSiteToString;function callSiteFileLocation(e){var n;var r="";if(e.isNative()){r="native"}else if(e.isEval()){n=e.getScriptNameOrSourceURL();if(!n){r=e.getEvalOrigin()}}else{n=e.getFileName()}if(n){r+=n;var s=e.getLineNumber();if(s!=null){r+=":"+s;var i=e.getColumnNumber();if(i){r+=":"+i}}}return r||"unknown source"}function callSiteToString(e){var n=true;var r=callSiteFileLocation(e);var s=e.getFunctionName();var i=e.isConstructor();var f=!(e.isToplevel()||i);var l="";if(f){var t=e.getMethodName();var o=getConstructorName(e);if(s){if(o&&s.indexOf(o)!==0){l+=o+"."}l+=s;if(t&&s.lastIndexOf("."+t)!==s.length-t.length-1){l+=" [as "+t+"]"}}else{l+=o+"."+(t||"")}}else if(i){l+="new "+(s||"")}else if(s){l+=s}else{n=false;l+=r}if(n){l+=" ("+r+")"}return l}function getConstructorName(e){var n=e.receiver;return n.constructor&&n.constructor.name||null}},8731:e=>{"use strict";e.exports=eventListenerCount;function eventListenerCount(e,n){return e.listeners(n).length}},5809:(e,n,r)=>{"use strict";var s=r(8614).EventEmitter;lazyProperty(e.exports,"callSiteToString",function callSiteToString(){var e=Error.stackTraceLimit;var n={};var s=Error.prepareStackTrace;function prepareObjectStackTrace(e,n){return n}Error.prepareStackTrace=prepareObjectStackTrace;Error.stackTraceLimit=2;Error.captureStackTrace(n);var i=n.stack.slice();Error.prepareStackTrace=s;Error.stackTraceLimit=e;return i[0].toString?toString:r(997)});lazyProperty(e.exports,"eventListenerCount",function eventListenerCount(){return s.listenerCount||r(8731)});function lazyProperty(e,n,r){function get(){var s=r();Object.defineProperty(e,n,{configurable:true,enumerable:true,value:s});return s}Object.defineProperty(e,n,{configurable:true,enumerable:true,get:get})}function toString(e){return e.toString()}},9413:(e,n,r)=>{var s=r(8915);var i=r(5622);e.exports=function expandTilde(e){var n=s();if(e.charCodeAt(0)===126){if(e.charCodeAt(1)===43){return i.join(process.cwd(),e.slice(2))}return n?i.join(n,e.slice(1)):e}return e}},7988:e=>{"use strict";e.exports=function equal(e,n){if(e===n)return true;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return false;var r,s,i;if(Array.isArray(e)){r=e.length;if(r!=n.length)return false;for(s=r;s--!==0;)if(!equal(e[s],n[s]))return false;return true}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();i=Object.keys(e);r=i.length;if(r!==Object.keys(n).length)return false;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[s]))return false;for(s=r;s--!==0;){var f=i[s];if(!equal(e[f],n[f]))return false}return true}return e!==e&&n!==n}},7692:e=>{"use strict";e.exports=function(e,n){if(!n)n={};if(typeof n==="function")n={cmp:n};var r=typeof n.cycles==="boolean"?n.cycles:false;var s=n.cmp&&function(e){return function(n){return function(r,s){var i={key:r,value:n[r]};var f={key:s,value:n[s]};return e(i,f)}}}(n.cmp);var i=[];return function stringify(e){if(e&&e.toJSON&&typeof e.toJSON==="function"){e=e.toJSON()}if(e===undefined)return;if(typeof e=="number")return isFinite(e)?""+e:"null";if(typeof e!=="object")return JSON.stringify(e);var n,f;if(Array.isArray(e)){f="[";for(n=0;n{e.exports=stringify;stringify.default=stringify;stringify.stable=deterministicStringify;stringify.stableStringify=deterministicStringify;var n="[...]";var r="[Circular]";var s=[];var i=[];function defaultOptions(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function stringify(e,n,r,f){if(typeof f==="undefined"){f=defaultOptions()}decirc(e,"",0,[],undefined,0,f);var l;try{if(i.length===0){l=JSON.stringify(e,n,r)}else{l=JSON.stringify(e,replaceGetterValues(n),r)}}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{while(s.length!==0){var t=s.pop();if(t.length===4){Object.defineProperty(t[0],t[1],t[3])}else{t[0][t[1]]=t[2]}}}return l}function setReplace(e,n,r,f){var l=Object.getOwnPropertyDescriptor(f,r);if(l.get!==undefined){if(l.configurable){Object.defineProperty(f,r,{value:e});s.push([f,r,n,l])}else{i.push([n,r,e])}}else{f[r]=e;s.push([f,r,n])}}function decirc(e,s,i,f,l,t,o){t+=1;var c;if(typeof e==="object"&&e!==null){for(c=0;co.depthLimit){setReplace(n,e,s,l);return}if(typeof o.edgesLimit!=="undefined"&&i+1>o.edgesLimit){setReplace(n,e,s,l);return}f.push(e);if(Array.isArray(e)){for(c=0;cn){return 1}return 0}function deterministicStringify(e,n,r,f){if(typeof f==="undefined"){f=defaultOptions()}var l=deterministicDecirc(e,"",0,[],undefined,0,f)||e;var t;try{if(i.length===0){t=JSON.stringify(l,n,r)}else{t=JSON.stringify(l,replaceGetterValues(n),r)}}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{while(s.length!==0){var o=s.pop();if(o.length===4){Object.defineProperty(o[0],o[1],o[3])}else{o[0][o[1]]=o[2]}}}return t}function deterministicDecirc(e,i,f,l,t,o,c){o+=1;var a;if(typeof e==="object"&&e!==null){for(a=0;ac.depthLimit){setReplace(n,e,i,t);return}if(typeof c.edgesLimit!=="undefined"&&f+1>c.edgesLimit){setReplace(n,e,i,t);return}l.push(e);if(Array.isArray(e)){for(a=0;a0){for(var s=0;s{const{Readable:s}=r(2413);const i=new WeakMap;async function*read(e){for(const n of e){if("stream"in n){yield*n.stream()}else{yield n}}}class Blob{constructor(e=[],n={}){let r=0;const s=e.map(e=>{let n;if(e instanceof Buffer){n=e}else if(ArrayBuffer.isView(e)){n=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}else if(e instanceof ArrayBuffer){n=Buffer.from(e)}else if(e instanceof Blob){n=e}else{n=Buffer.from(typeof e==="string"?e:String(e))}r+=n.length||n.size||0;return n});const f=n.type===undefined?"":String(n.type).toLowerCase();i.set(this,{type:/[^\u0020-\u007E]/.test(f)?"":f,size:r,parts:s})}get size(){return i.get(this).size}get type(){return i.get(this).type}async text(){return Buffer.from(await this.arrayBuffer()).toString()}async arrayBuffer(){const e=new Uint8Array(this.size);let n=0;for await(const r of this.stream()){e.set(r,n);n+=r.length}return e.buffer}stream(){return s.from(read(i.get(this).parts))}slice(e=0,n=this.size,r=""){const{size:s}=this;let f=e<0?Math.max(s+e,0):Math.min(e,s);let l=n<0?Math.max(s+n,0):Math.min(n,s);const t=Math.max(l-f,0);const o=i.get(this).parts.values();const c=[];let a=0;for(const e of o){const n=ArrayBuffer.isView(e)?e.byteLength:e.size;if(f&&n<=f){f-=n;l-=n}else{const r=e.slice(f,Math.min(n,l));c.push(r);a+=ArrayBuffer.isView(r)?r.byteLength:r.size;f=0;if(a>=t){break}}}const d=new Blob([],{type:String(r).toLowerCase()});Object.assign(i.get(d),{size:t,parts:c});return d}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](e){return e&&typeof e==="object"&&typeof e.stream==="function"&&e.stream.length===0&&typeof e.constructor==="function"&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}}Object.defineProperties(Blob.prototype,{size:{enumerable:true},type:{enumerable:true},slice:{enumerable:true}});e.exports=Blob},212:(e,n,r)=>{"use strict";const s=r(4742);const i=r(5622);const f=r(664).mkdirsSync;const l=r(9056).utimesMillisSync;const t=r(1757);function copySync(e,n,r){if(typeof r==="function"){r={filter:r}}r=r||{};r.clobber="clobber"in r?!!r.clobber:true;r.overwrite="overwrite"in r?!!r.overwrite:r.clobber;if(r.preserveTimestamps&&process.arch==="ia32"){console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269`)}const{srcStat:s,destStat:i}=t.checkPathsSync(e,n,"copy");t.checkParentPathsSync(e,s,n,"copy");return handleFilterAndCopy(i,e,n,r)}function handleFilterAndCopy(e,n,r,l){if(l.filter&&!l.filter(n,r))return;const t=i.dirname(r);if(!s.existsSync(t))f(t);return startCopy(e,n,r,l)}function startCopy(e,n,r,s){if(s.filter&&!s.filter(n,r))return;return getStats(e,n,r,s)}function getStats(e,n,r,i){const f=i.dereference?s.statSync:s.lstatSync;const l=f(n);if(l.isDirectory())return onDir(l,e,n,r,i);else if(l.isFile()||l.isCharacterDevice()||l.isBlockDevice())return onFile(l,e,n,r,i);else if(l.isSymbolicLink())return onLink(e,n,r,i)}function onFile(e,n,r,s,i){if(!n)return copyFile(e,r,s,i);return mayCopyFile(e,r,s,i)}function mayCopyFile(e,n,r,i){if(i.overwrite){s.unlinkSync(r);return copyFile(e,n,r,i)}else if(i.errorOnExist){throw new Error(`'${r}' already exists`)}}function copyFile(e,n,r,i){s.copyFileSync(n,r);if(i.preserveTimestamps)handleTimestamps(e.mode,n,r);return setDestMode(r,e.mode)}function handleTimestamps(e,n,r){if(fileIsNotWritable(e))makeFileWritable(r,e);return setDestTimestamps(n,r)}function fileIsNotWritable(e){return(e&128)===0}function makeFileWritable(e,n){return setDestMode(e,n|128)}function setDestMode(e,n){return s.chmodSync(e,n)}function setDestTimestamps(e,n){const r=s.statSync(e);return l(n,r.atime,r.mtime)}function onDir(e,n,r,s,i){if(!n)return mkDirAndCopy(e.mode,r,s,i);if(n&&!n.isDirectory()){throw new Error(`Cannot overwrite non-directory '${s}' with directory '${r}'.`)}return copyDir(r,s,i)}function mkDirAndCopy(e,n,r,i){s.mkdirSync(r);copyDir(n,r,i);return setDestMode(r,e)}function copyDir(e,n,r){s.readdirSync(e).forEach(s=>copyDirItem(s,e,n,r))}function copyDirItem(e,n,r,s){const f=i.join(n,e);const l=i.join(r,e);const{destStat:o}=t.checkPathsSync(f,l,"copy");return startCopy(o,f,l,s)}function onLink(e,n,r,f){let l=s.readlinkSync(n);if(f.dereference){l=i.resolve(process.cwd(),l)}if(!e){return s.symlinkSync(l,r)}else{let e;try{e=s.readlinkSync(r)}catch(e){if(e.code==="EINVAL"||e.code==="UNKNOWN")return s.symlinkSync(l,r);throw e}if(f.dereference){e=i.resolve(process.cwd(),e)}if(t.isSrcSubdir(l,e)){throw new Error(`Cannot copy '${l}' to a subdirectory of itself, '${e}'.`)}if(s.statSync(r).isDirectory()&&t.isSrcSubdir(e,l)){throw new Error(`Cannot overwrite '${e}' with '${l}'.`)}return copyLink(l,r)}}function copyLink(e,n){s.unlinkSync(n);return s.symlinkSync(e,n)}e.exports=copySync},3890:(e,n,r)=>{"use strict";e.exports={copySync:r(212)}},1448:(e,n,r)=>{"use strict";const s=r(4742);const i=r(5622);const f=r(664).mkdirs;const l=r(6564).pathExists;const t=r(9056).utimesMillis;const o=r(1757);function copy(e,n,r,s){if(typeof r==="function"&&!s){s=r;r={}}else if(typeof r==="function"){r={filter:r}}s=s||function(){};r=r||{};r.clobber="clobber"in r?!!r.clobber:true;r.overwrite="overwrite"in r?!!r.overwrite:r.clobber;if(r.preserveTimestamps&&process.arch==="ia32"){console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269`)}o.checkPaths(e,n,"copy",(i,f)=>{if(i)return s(i);const{srcStat:l,destStat:t}=f;o.checkParentPaths(e,l,n,"copy",i=>{if(i)return s(i);if(r.filter)return handleFilter(checkParentDir,t,e,n,r,s);return checkParentDir(t,e,n,r,s)})})}function checkParentDir(e,n,r,s,t){const o=i.dirname(r);l(o,(i,l)=>{if(i)return t(i);if(l)return startCopy(e,n,r,s,t);f(o,i=>{if(i)return t(i);return startCopy(e,n,r,s,t)})})}function handleFilter(e,n,r,s,i,f){Promise.resolve(i.filter(r,s)).then(l=>{if(l)return e(n,r,s,i,f);return f()},e=>f(e))}function startCopy(e,n,r,s,i){if(s.filter)return handleFilter(getStats,e,n,r,s,i);return getStats(e,n,r,s,i)}function getStats(e,n,r,i,f){const l=i.dereference?s.stat:s.lstat;l(n,(s,l)=>{if(s)return f(s);if(l.isDirectory())return onDir(l,e,n,r,i,f);else if(l.isFile()||l.isCharacterDevice()||l.isBlockDevice())return onFile(l,e,n,r,i,f);else if(l.isSymbolicLink())return onLink(e,n,r,i,f)})}function onFile(e,n,r,s,i,f){if(!n)return copyFile(e,r,s,i,f);return mayCopyFile(e,r,s,i,f)}function mayCopyFile(e,n,r,i,f){if(i.overwrite){s.unlink(r,s=>{if(s)return f(s);return copyFile(e,n,r,i,f)})}else if(i.errorOnExist){return f(new Error(`'${r}' already exists`))}else return f()}function copyFile(e,n,r,i,f){s.copyFile(n,r,s=>{if(s)return f(s);if(i.preserveTimestamps)return handleTimestampsAndMode(e.mode,n,r,f);return setDestMode(r,e.mode,f)})}function handleTimestampsAndMode(e,n,r,s){if(fileIsNotWritable(e)){return makeFileWritable(r,e,i=>{if(i)return s(i);return setDestTimestampsAndMode(e,n,r,s)})}return setDestTimestampsAndMode(e,n,r,s)}function fileIsNotWritable(e){return(e&128)===0}function makeFileWritable(e,n,r){return setDestMode(e,n|128,r)}function setDestTimestampsAndMode(e,n,r,s){setDestTimestamps(n,r,n=>{if(n)return s(n);return setDestMode(r,e,s)})}function setDestMode(e,n,r){return s.chmod(e,n,r)}function setDestTimestamps(e,n,r){s.stat(e,(e,s)=>{if(e)return r(e);return t(n,s.atime,s.mtime,r)})}function onDir(e,n,r,s,i,f){if(!n)return mkDirAndCopy(e.mode,r,s,i,f);if(n&&!n.isDirectory()){return f(new Error(`Cannot overwrite non-directory '${s}' with directory '${r}'.`))}return copyDir(r,s,i,f)}function mkDirAndCopy(e,n,r,i,f){s.mkdir(r,s=>{if(s)return f(s);copyDir(n,r,i,n=>{if(n)return f(n);return setDestMode(r,e,f)})})}function copyDir(e,n,r,i){s.readdir(e,(s,f)=>{if(s)return i(s);return copyDirItems(f,e,n,r,i)})}function copyDirItems(e,n,r,s,i){const f=e.pop();if(!f)return i();return copyDirItem(e,f,n,r,s,i)}function copyDirItem(e,n,r,s,f,l){const t=i.join(r,n);const c=i.join(s,n);o.checkPaths(t,c,"copy",(n,i)=>{if(n)return l(n);const{destStat:o}=i;startCopy(o,t,c,f,n=>{if(n)return l(n);return copyDirItems(e,r,s,f,l)})})}function onLink(e,n,r,f,l){s.readlink(n,(n,t)=>{if(n)return l(n);if(f.dereference){t=i.resolve(process.cwd(),t)}if(!e){return s.symlink(t,r,l)}else{s.readlink(r,(n,c)=>{if(n){if(n.code==="EINVAL"||n.code==="UNKNOWN")return s.symlink(t,r,l);return l(n)}if(f.dereference){c=i.resolve(process.cwd(),c)}if(o.isSrcSubdir(t,c)){return l(new Error(`Cannot copy '${t}' to a subdirectory of itself, '${c}'.`))}if(e.isDirectory()&&o.isSrcSubdir(c,t)){return l(new Error(`Cannot overwrite '${c}' with '${t}'.`))}return copyLink(t,r,l)})}})}function copyLink(e,n,r){s.unlink(n,i=>{if(i)return r(i);return s.symlink(e,n,r)})}e.exports=copy},6774:(e,n,r)=>{"use strict";const s=r(8522).fromCallback;e.exports={copy:s(r(1448))}},944:(e,n,r)=>{"use strict";const s=r(8522).fromCallback;const i=r(4742);const f=r(5622);const l=r(664);const t=r(6944);const o=s(function emptyDir(e,n){n=n||function(){};i.readdir(e,(r,s)=>{if(r)return l.mkdirs(e,n);s=s.map(n=>f.join(e,n));deleteItem();function deleteItem(){const e=s.pop();if(!e)return n();t.remove(e,e=>{if(e)return n(e);deleteItem()})}})});function emptyDirSync(e){let n;try{n=i.readdirSync(e)}catch{return l.mkdirsSync(e)}n.forEach(n=>{n=f.join(e,n);t.removeSync(n)})}e.exports={emptyDirSync:emptyDirSync,emptydirSync:emptyDirSync,emptyDir:o,emptydir:o}},5080:(e,n,r)=>{"use strict";const s=r(8522).fromCallback;const i=r(5622);const f=r(4742);const l=r(664);function createFile(e,n){function makeFile(){f.writeFile(e,"",e=>{if(e)return n(e);n()})}f.stat(e,(r,s)=>{if(!r&&s.isFile())return n();const t=i.dirname(e);f.stat(t,(e,r)=>{if(e){if(e.code==="ENOENT"){return l.mkdirs(t,e=>{if(e)return n(e);makeFile()})}return n(e)}if(r.isDirectory())makeFile();else{f.readdir(t,e=>{if(e)return n(e)})}})})}function createFileSync(e){let n;try{n=f.statSync(e)}catch{}if(n&&n.isFile())return;const r=i.dirname(e);try{if(!f.statSync(r).isDirectory()){f.readdirSync(r)}}catch(e){if(e&&e.code==="ENOENT")l.mkdirsSync(r);else throw e}f.writeFileSync(e,"")}e.exports={createFile:s(createFile),createFileSync:createFileSync}},6037:(e,n,r)=>{"use strict";const s=r(5080);const i=r(3921);const f=r(8073);e.exports={createFile:s.createFile,createFileSync:s.createFileSync,ensureFile:s.createFile,ensureFileSync:s.createFileSync,createLink:i.createLink,createLinkSync:i.createLinkSync,ensureLink:i.createLink,ensureLinkSync:i.createLinkSync,createSymlink:f.createSymlink,createSymlinkSync:f.createSymlinkSync,ensureSymlink:f.createSymlink,ensureSymlinkSync:f.createSymlinkSync}},3921:(e,n,r)=>{"use strict";const s=r(8522).fromCallback;const i=r(5622);const f=r(4742);const l=r(664);const t=r(6564).pathExists;function createLink(e,n,r){function makeLink(e,n){f.link(e,n,e=>{if(e)return r(e);r(null)})}t(n,(s,o)=>{if(s)return r(s);if(o)return r(null);f.lstat(e,s=>{if(s){s.message=s.message.replace("lstat","ensureLink");return r(s)}const f=i.dirname(n);t(f,(s,i)=>{if(s)return r(s);if(i)return makeLink(e,n);l.mkdirs(f,s=>{if(s)return r(s);makeLink(e,n)})})})})}function createLinkSync(e,n){const r=f.existsSync(n);if(r)return undefined;try{f.lstatSync(e)}catch(e){e.message=e.message.replace("lstat","ensureLink");throw e}const s=i.dirname(n);const t=f.existsSync(s);if(t)return f.linkSync(e,n);l.mkdirsSync(s);return f.linkSync(e,n)}e.exports={createLink:s(createLink),createLinkSync:createLinkSync}},7056:(e,n,r)=>{"use strict";const s=r(5622);const i=r(4742);const f=r(6564).pathExists;function symlinkPaths(e,n,r){if(s.isAbsolute(e)){return i.lstat(e,n=>{if(n){n.message=n.message.replace("lstat","ensureSymlink");return r(n)}return r(null,{toCwd:e,toDst:e})})}else{const l=s.dirname(n);const t=s.join(l,e);return f(t,(n,f)=>{if(n)return r(n);if(f){return r(null,{toCwd:t,toDst:e})}else{return i.lstat(e,n=>{if(n){n.message=n.message.replace("lstat","ensureSymlink");return r(n)}return r(null,{toCwd:e,toDst:s.relative(l,e)})})}})}}function symlinkPathsSync(e,n){let r;if(s.isAbsolute(e)){r=i.existsSync(e);if(!r)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}else{const f=s.dirname(n);const l=s.join(f,e);r=i.existsSync(l);if(r){return{toCwd:l,toDst:e}}else{r=i.existsSync(e);if(!r)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:s.relative(f,e)}}}}e.exports={symlinkPaths:symlinkPaths,symlinkPathsSync:symlinkPathsSync}},6003:(e,n,r)=>{"use strict";const s=r(4742);function symlinkType(e,n,r){r=typeof n==="function"?n:r;n=typeof n==="function"?false:n;if(n)return r(null,n);s.lstat(e,(e,s)=>{if(e)return r(null,"file");n=s&&s.isDirectory()?"dir":"file";r(null,n)})}function symlinkTypeSync(e,n){let r;if(n)return n;try{r=s.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}e.exports={symlinkType:symlinkType,symlinkTypeSync:symlinkTypeSync}},8073:(e,n,r)=>{"use strict";const s=r(8522).fromCallback;const i=r(5622);const f=r(4742);const l=r(664);const t=l.mkdirs;const o=l.mkdirsSync;const c=r(7056);const a=c.symlinkPaths;const d=c.symlinkPathsSync;const p=r(6003);const u=p.symlinkType;const h=p.symlinkTypeSync;const v=r(6564).pathExists;function createSymlink(e,n,r,s){s=typeof r==="function"?r:s;r=typeof r==="function"?false:r;v(n,(l,o)=>{if(l)return s(l);if(o)return s(null);a(e,n,(l,o)=>{if(l)return s(l);e=o.toDst;u(o.toCwd,r,(r,l)=>{if(r)return s(r);const o=i.dirname(n);v(o,(r,i)=>{if(r)return s(r);if(i)return f.symlink(e,n,l,s);t(o,r=>{if(r)return s(r);f.symlink(e,n,l,s)})})})})})}function createSymlinkSync(e,n,r){const s=f.existsSync(n);if(s)return undefined;const l=d(e,n);e=l.toDst;r=h(l.toCwd,r);const t=i.dirname(n);const c=f.existsSync(t);if(c)return f.symlinkSync(e,n,r);o(t);return f.symlinkSync(e,n,r)}e.exports={createSymlink:s(createSymlink),createSymlinkSync:createSymlinkSync}},3858:(e,n,r)=>{"use strict";const s=r(8522).fromCallback;const i=r(4742);const f=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(e=>{return typeof i[e]==="function"});Object.keys(i).forEach(e=>{if(e==="promises"){return}n[e]=i[e]});f.forEach(e=>{n[e]=s(i[e])});n.exists=function(e,n){if(typeof n==="function"){return i.exists(e,n)}return new Promise(n=>{return i.exists(e,n)})};n.read=function(e,n,r,s,f,l){if(typeof l==="function"){return i.read(e,n,r,s,f,l)}return new Promise((l,t)=>{i.read(e,n,r,s,f,(e,n,r)=>{if(e)return t(e);l({bytesRead:n,buffer:r})})})};n.write=function(e,n,...r){if(typeof r[r.length-1]==="function"){return i.write(e,n,...r)}return new Promise((s,f)=>{i.write(e,n,...r,(e,n,r)=>{if(e)return f(e);s({bytesWritten:n,buffer:r})})})};if(typeof i.writev==="function"){n.writev=function(e,n,...r){if(typeof r[r.length-1]==="function"){return i.writev(e,n,...r)}return new Promise((s,f)=>{i.writev(e,n,...r,(e,n,r)=>{if(e)return f(e);s({bytesWritten:n,buffers:r})})})}}if(typeof i.realpath.native==="function"){n.realpath.native=s(i.realpath.native)}},4982:(e,n,r)=>{"use strict";e.exports={...r(3858),...r(3890),...r(6774),...r(944),...r(6037),...r(7488),...r(664),...r(3740),...r(1365),...r(5181),...r(6564),...r(6944)};const s=r(5747);if(Object.getOwnPropertyDescriptor(s,"promises")){Object.defineProperty(e.exports,"promises",{get(){return s.promises}})}},7488:(e,n,r)=>{"use strict";const s=r(8522).fromPromise;const i=r(5570);i.outputJson=s(r(1452));i.outputJsonSync=r(153);i.outputJSON=i.outputJson;i.outputJSONSync=i.outputJsonSync;i.writeJSON=i.writeJson;i.writeJSONSync=i.writeJsonSync;i.readJSON=i.readJson;i.readJSONSync=i.readJsonSync;e.exports=i},5570:(e,n,r)=>{"use strict";const s=r(5221);e.exports={readJson:s.readFile,readJsonSync:s.readFileSync,writeJson:s.writeFile,writeJsonSync:s.writeFileSync}},153:(e,n,r)=>{"use strict";const{stringify:s}=r(1266);const{outputFileSync:i}=r(5181);function outputJsonSync(e,n,r){const f=s(n,r);i(e,f,r)}e.exports=outputJsonSync},1452:(e,n,r)=>{"use strict";const{stringify:s}=r(1266);const{outputFile:i}=r(5181);async function outputJson(e,n,r={}){const f=s(n,r);await i(e,f,r)}e.exports=outputJson},664:(e,n,r)=>{"use strict";const s=r(8522).fromPromise;const{makeDir:i,makeDirSync:f}=r(5193);const l=s(i);e.exports={mkdirs:l,mkdirsSync:f,mkdirp:l,mkdirpSync:f,ensureDir:l,ensureDirSync:f}},5193:(e,n,r)=>{"use strict";const s=r(3858);const i=r(5622);const f=r(7762);const l=f("10.12.0");const t=e=>{if(process.platform==="win32"){const n=/[<>:"|?*]/.test(e.replace(i.parse(e).root,""));if(n){const n=new Error(`Path contains invalid characters: ${e}`);n.code="EINVAL";throw n}}};const o=e=>{const n={mode:511};if(typeof e==="number")e={mode:e};return{...n,...e}};const c=e=>{const n=new Error(`operation not permitted, mkdir '${e}'`);n.code="EPERM";n.errno=-4048;n.path=e;n.syscall="mkdir";return n};e.exports.makeDir=(async(e,n)=>{t(e);n=o(n);if(l){const r=i.resolve(e);return s.mkdir(r,{mode:n.mode,recursive:true})}const r=async e=>{try{await s.mkdir(e,n.mode)}catch(n){if(n.code==="EPERM"){throw n}if(n.code==="ENOENT"){if(i.dirname(e)===e){throw c(e)}if(n.message.includes("null bytes")){throw n}await r(i.dirname(e));return r(e)}try{const r=await s.stat(e);if(!r.isDirectory()){throw new Error("The path is not a directory")}}catch{throw n}}};return r(i.resolve(e))});e.exports.makeDirSync=((e,n)=>{t(e);n=o(n);if(l){const r=i.resolve(e);return s.mkdirSync(r,{mode:n.mode,recursive:true})}const r=e=>{try{s.mkdirSync(e,n.mode)}catch(n){if(n.code==="EPERM"){throw n}if(n.code==="ENOENT"){if(i.dirname(e)===e){throw c(e)}if(n.message.includes("null bytes")){throw n}r(i.dirname(e));return r(e)}try{if(!s.statSync(e).isDirectory()){throw new Error("The path is not a directory")}}catch{throw n}}};return r(i.resolve(e))})},3740:(e,n,r)=>{"use strict";e.exports={moveSync:r(763)}},763:(e,n,r)=>{"use strict";const s=r(4742);const i=r(5622);const f=r(3890).copySync;const l=r(6944).removeSync;const t=r(664).mkdirpSync;const o=r(1757);function moveSync(e,n,r){r=r||{};const s=r.overwrite||r.clobber||false;const{srcStat:f}=o.checkPathsSync(e,n,"move");o.checkParentPathsSync(e,f,n,"move");t(i.dirname(n));return doRename(e,n,s)}function doRename(e,n,r){if(r){l(n);return rename(e,n,r)}if(s.existsSync(n))throw new Error("dest already exists.");return rename(e,n,r)}function rename(e,n,r){try{s.renameSync(e,n)}catch(s){if(s.code!=="EXDEV")throw s;return moveAcrossDevice(e,n,r)}}function moveAcrossDevice(e,n,r){const s={overwrite:r,errorOnExist:true};f(e,n,s);return l(e)}e.exports=moveSync},1365:(e,n,r)=>{"use strict";const s=r(8522).fromCallback;e.exports={move:s(r(2750))}},2750:(e,n,r)=>{"use strict";const s=r(4742);const i=r(5622);const f=r(6774).copy;const l=r(6944).remove;const t=r(664).mkdirp;const o=r(6564).pathExists;const c=r(1757);function move(e,n,r,s){if(typeof r==="function"){s=r;r={}}const f=r.overwrite||r.clobber||false;c.checkPaths(e,n,"move",(r,l)=>{if(r)return s(r);const{srcStat:o}=l;c.checkParentPaths(e,o,n,"move",r=>{if(r)return s(r);t(i.dirname(n),r=>{if(r)return s(r);return doRename(e,n,f,s)})})})}function doRename(e,n,r,s){if(r){return l(n,i=>{if(i)return s(i);return rename(e,n,r,s)})}o(n,(i,f)=>{if(i)return s(i);if(f)return s(new Error("dest already exists."));return rename(e,n,r,s)})}function rename(e,n,r,i){s.rename(e,n,s=>{if(!s)return i();if(s.code!=="EXDEV")return i(s);return moveAcrossDevice(e,n,r,i)})}function moveAcrossDevice(e,n,r,s){const i={overwrite:r,errorOnExist:true};f(e,n,i,n=>{if(n)return s(n);return l(e,s)})}e.exports=move},5181:(e,n,r)=>{"use strict";const s=r(8522).fromCallback;const i=r(4742);const f=r(5622);const l=r(664);const t=r(6564).pathExists;function outputFile(e,n,r,s){if(typeof r==="function"){s=r;r="utf8"}const o=f.dirname(e);t(o,(f,t)=>{if(f)return s(f);if(t)return i.writeFile(e,n,r,s);l.mkdirs(o,f=>{if(f)return s(f);i.writeFile(e,n,r,s)})})}function outputFileSync(e,...n){const r=f.dirname(e);if(i.existsSync(r)){return i.writeFileSync(e,...n)}l.mkdirsSync(r);i.writeFileSync(e,...n)}e.exports={outputFile:s(outputFile),outputFileSync:outputFileSync}},6564:(e,n,r)=>{"use strict";const s=r(8522).fromPromise;const i=r(3858);function pathExists(e){return i.access(e).then(()=>true).catch(()=>false)}e.exports={pathExists:s(pathExists),pathExistsSync:i.existsSync}},6944:(e,n,r)=>{"use strict";const s=r(8522).fromCallback;const i=r(5824);e.exports={remove:s(i),removeSync:i.sync}},5824:(e,n,r)=>{"use strict";const s=r(4742);const i=r(5622);const f=r(2357);const l=process.platform==="win32";function defaults(e){const n=["unlink","chmod","stat","lstat","rmdir","readdir"];n.forEach(n=>{e[n]=e[n]||s[n];n=n+"Sync";e[n]=e[n]||s[n]});e.maxBusyTries=e.maxBusyTries||3}function rimraf(e,n,r){let s=0;if(typeof n==="function"){r=n;n={}}f(e,"rimraf: missing path");f.strictEqual(typeof e,"string","rimraf: path should be a string");f.strictEqual(typeof r,"function","rimraf: callback function required");f(n,"rimraf: invalid options argument provided");f.strictEqual(typeof n,"object","rimraf: options should be object");defaults(n);rimraf_(e,n,function CB(i){if(i){if((i.code==="EBUSY"||i.code==="ENOTEMPTY"||i.code==="EPERM")&&srimraf_(e,n,CB),r)}if(i.code==="ENOENT")i=null}r(i)})}function rimraf_(e,n,r){f(e);f(n);f(typeof r==="function");n.lstat(e,(s,i)=>{if(s&&s.code==="ENOENT"){return r(null)}if(s&&s.code==="EPERM"&&l){return fixWinEPERM(e,n,s,r)}if(i&&i.isDirectory()){return rmdir(e,n,s,r)}n.unlink(e,s=>{if(s){if(s.code==="ENOENT"){return r(null)}if(s.code==="EPERM"){return l?fixWinEPERM(e,n,s,r):rmdir(e,n,s,r)}if(s.code==="EISDIR"){return rmdir(e,n,s,r)}}return r(s)})})}function fixWinEPERM(e,n,r,s){f(e);f(n);f(typeof s==="function");n.chmod(e,438,i=>{if(i){s(i.code==="ENOENT"?null:r)}else{n.stat(e,(i,f)=>{if(i){s(i.code==="ENOENT"?null:r)}else if(f.isDirectory()){rmdir(e,n,r,s)}else{n.unlink(e,s)}})}})}function fixWinEPERMSync(e,n,r){let s;f(e);f(n);try{n.chmodSync(e,438)}catch(e){if(e.code==="ENOENT"){return}else{throw r}}try{s=n.statSync(e)}catch(e){if(e.code==="ENOENT"){return}else{throw r}}if(s.isDirectory()){rmdirSync(e,n,r)}else{n.unlinkSync(e)}}function rmdir(e,n,r,s){f(e);f(n);f(typeof s==="function");n.rmdir(e,i=>{if(i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")){rmkids(e,n,s)}else if(i&&i.code==="ENOTDIR"){s(r)}else{s(i)}})}function rmkids(e,n,r){f(e);f(n);f(typeof r==="function");n.readdir(e,(s,f)=>{if(s)return r(s);let l=f.length;let t;if(l===0)return n.rmdir(e,r);f.forEach(s=>{rimraf(i.join(e,s),n,s=>{if(t){return}if(s)return r(t=s);if(--l===0){n.rmdir(e,r)}})})})}function rimrafSync(e,n){let r;n=n||{};defaults(n);f(e,"rimraf: missing path");f.strictEqual(typeof e,"string","rimraf: path should be a string");f(n,"rimraf: missing options");f.strictEqual(typeof n,"object","rimraf: options should be object");try{r=n.lstatSync(e)}catch(r){if(r.code==="ENOENT"){return}if(r.code==="EPERM"&&l){fixWinEPERMSync(e,n,r)}}try{if(r&&r.isDirectory()){rmdirSync(e,n,null)}else{n.unlinkSync(e)}}catch(r){if(r.code==="ENOENT"){return}else if(r.code==="EPERM"){return l?fixWinEPERMSync(e,n,r):rmdirSync(e,n,r)}else if(r.code!=="EISDIR"){throw r}rmdirSync(e,n,r)}}function rmdirSync(e,n,r){f(e);f(n);try{n.rmdirSync(e)}catch(s){if(s.code==="ENOTDIR"){throw r}else if(s.code==="ENOTEMPTY"||s.code==="EEXIST"||s.code==="EPERM"){rmkidsSync(e,n)}else if(s.code!=="ENOENT"){throw s}}}function rmkidsSync(e,n){f(e);f(n);n.readdirSync(e).forEach(r=>rimrafSync(i.join(e,r),n));if(l){const r=Date.now();do{try{const r=n.rmdirSync(e,n);return r}catch{}}while(Date.now()-r<500)}else{const r=n.rmdirSync(e,n);return r}}e.exports=rimraf;rimraf.sync=rimrafSync},1757:(e,n,r)=>{"use strict";const s=r(3858);const i=r(5622);const f=r(1669);const l=r(7762);const t=l("10.5.0");const o=e=>t?s.stat(e,{bigint:true}):s.stat(e);const c=e=>t?s.statSync(e,{bigint:true}):s.statSync(e);function getStats(e,n){return Promise.all([o(e),o(n).catch(e=>{if(e.code==="ENOENT")return null;throw e})]).then(([e,n])=>({srcStat:e,destStat:n}))}function getStatsSync(e,n){let r;const s=c(e);try{r=c(n)}catch(e){if(e.code==="ENOENT")return{srcStat:s,destStat:null};throw e}return{srcStat:s,destStat:r}}function checkPaths(e,n,r,s){f.callbackify(getStats)(e,n,(i,f)=>{if(i)return s(i);const{srcStat:l,destStat:t}=f;if(t&&areIdentical(l,t)){return s(new Error("Source and destination must not be the same."))}if(l.isDirectory()&&isSrcSubdir(e,n)){return s(new Error(errMsg(e,n,r)))}return s(null,{srcStat:l,destStat:t})})}function checkPathsSync(e,n,r){const{srcStat:s,destStat:i}=getStatsSync(e,n);if(i&&areIdentical(s,i)){throw new Error("Source and destination must not be the same.")}if(s.isDirectory()&&isSrcSubdir(e,n)){throw new Error(errMsg(e,n,r))}return{srcStat:s,destStat:i}}function checkParentPaths(e,n,r,f,l){const o=i.resolve(i.dirname(e));const c=i.resolve(i.dirname(r));if(c===o||c===i.parse(c).root)return l();const a=(s,i)=>{if(s){if(s.code==="ENOENT")return l();return l(s)}if(areIdentical(n,i)){return l(new Error(errMsg(e,r,f)))}return checkParentPaths(e,n,c,f,l)};if(t)s.stat(c,{bigint:true},a);else s.stat(c,a)}function checkParentPathsSync(e,n,r,s){const f=i.resolve(i.dirname(e));const l=i.resolve(i.dirname(r));if(l===f||l===i.parse(l).root)return;let t;try{t=c(l)}catch(e){if(e.code==="ENOENT")return;throw e}if(areIdentical(n,t)){throw new Error(errMsg(e,r,s))}return checkParentPathsSync(e,n,l,s)}function areIdentical(e,n){if(n.ino&&n.dev&&n.ino===e.ino&&n.dev===e.dev){if(t||n.inoe);const s=i.resolve(n).split(i.sep).filter(e=>e);return r.reduce((e,n,r)=>e&&s[r]===n,true)}function errMsg(e,n,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${n}'.`}e.exports={checkPaths:checkPaths,checkPathsSync:checkPathsSync,checkParentPaths:checkParentPaths,checkParentPathsSync:checkParentPathsSync,isSrcSubdir:isSrcSubdir}},9056:(e,n,r)=>{"use strict";const s=r(4742);function utimesMillis(e,n,r,i){s.open(e,"r+",(e,f)=>{if(e)return i(e);s.futimes(f,n,r,e=>{s.close(f,n=>{if(i)i(e||n)})})})}function utimesMillisSync(e,n,r){const i=s.openSync(e,"r+");s.futimesSync(i,n,r);return s.closeSync(i)}e.exports={utimesMillis:utimesMillis,utimesMillisSync:utimesMillisSync}},4823:e=>{"use strict";e.exports=clone;var n=Object.getPrototypeOf||function(e){return e.__proto__};function clone(e){if(e===null||typeof e!=="object")return e;if(e instanceof Object)var r={__proto__:n(e)};else var r=Object.create(null);Object.getOwnPropertyNames(e).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))});return r}},4742:(e,n,r)=>{var s=r(5747);var i=r(7136);var f=r(865);var l=r(4823);var t=r(1669);var o;var c;if(typeof Symbol==="function"&&typeof Symbol.for==="function"){o=Symbol.for("graceful-fs.queue");c=Symbol.for("graceful-fs.previous")}else{o="___graceful-fs.queue";c="___graceful-fs.previous"}function noop(){}function publishQueue(e,n){Object.defineProperty(e,o,{get:function(){return n}})}var a=noop;if(t.debuglog)a=t.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))a=function(){var e=t.format.apply(t,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: ");console.error(e)};if(!s[o]){var d=global[o]||[];publishQueue(s,d);s.close=function(e){function close(n,r){return e.call(s,n,function(e){if(!e){resetQueue()}if(typeof r==="function")r.apply(this,arguments)})}Object.defineProperty(close,c,{value:e});return close}(s.close);s.closeSync=function(e){function closeSync(n){e.apply(s,arguments);resetQueue()}Object.defineProperty(closeSync,c,{value:e});return closeSync}(s.closeSync);if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")){process.on("exit",function(){a(s[o]);r(2357).equal(s[o].length,0)})}}if(!global[o]){publishQueue(global,s[o])}e.exports=patch(l(s));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!s.__patched){e.exports=patch(s);s.__patched=true}function patch(e){i(e);e.gracefulify=patch;e.createReadStream=createReadStream;e.createWriteStream=createWriteStream;var n=e.readFile;e.readFile=readFile;function readFile(e,r,s){if(typeof r==="function")s=r,r=null;return go$readFile(e,r,s);function go$readFile(e,r,s,i){return n(e,r,function(n){if(n&&(n.code==="EMFILE"||n.code==="ENFILE"))enqueue([go$readFile,[e,r,s],n,i||Date.now(),Date.now()]);else{if(typeof s==="function")s.apply(this,arguments)}})}}var r=e.writeFile;e.writeFile=writeFile;function writeFile(e,n,s,i){if(typeof s==="function")i=s,s=null;return go$writeFile(e,n,s,i);function go$writeFile(e,n,s,i,f){return r(e,n,s,function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))enqueue([go$writeFile,[e,n,s,i],r,f||Date.now(),Date.now()]);else{if(typeof i==="function")i.apply(this,arguments)}})}}var s=e.appendFile;if(s)e.appendFile=appendFile;function appendFile(e,n,r,i){if(typeof r==="function")i=r,r=null;return go$appendFile(e,n,r,i);function go$appendFile(e,n,r,i,f){return s(e,n,r,function(s){if(s&&(s.code==="EMFILE"||s.code==="ENFILE"))enqueue([go$appendFile,[e,n,r,i],s,f||Date.now(),Date.now()]);else{if(typeof i==="function")i.apply(this,arguments)}})}}var l=e.copyFile;if(l)e.copyFile=copyFile;function copyFile(e,n,r,s){if(typeof r==="function"){s=r;r=0}return go$copyFile(e,n,r,s);function go$copyFile(e,n,r,s,i){return l(e,n,r,function(f){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))enqueue([go$copyFile,[e,n,r,s],f,i||Date.now(),Date.now()]);else{if(typeof s==="function")s.apply(this,arguments)}})}}var t=e.readdir;e.readdir=readdir;function readdir(e,n,r){if(typeof n==="function")r=n,n=null;return go$readdir(e,n,r);function go$readdir(e,n,r,s){return t(e,n,function(i,f){if(i&&(i.code==="EMFILE"||i.code==="ENFILE"))enqueue([go$readdir,[e,n,r],i,s||Date.now(),Date.now()]);else{if(f&&f.sort)f.sort();if(typeof r==="function")r.call(this,i,f)}})}}if(process.version.substr(0,4)==="v0.8"){var o=f(e);ReadStream=o.ReadStream;WriteStream=o.WriteStream}var c=e.ReadStream;if(c){ReadStream.prototype=Object.create(c.prototype);ReadStream.prototype.open=ReadStream$open}var a=e.WriteStream;if(a){WriteStream.prototype=Object.create(a.prototype);WriteStream.prototype.open=WriteStream$open}Object.defineProperty(e,"ReadStream",{get:function(){return ReadStream},set:function(e){ReadStream=e},enumerable:true,configurable:true});Object.defineProperty(e,"WriteStream",{get:function(){return WriteStream},set:function(e){WriteStream=e},enumerable:true,configurable:true});var d=ReadStream;Object.defineProperty(e,"FileReadStream",{get:function(){return d},set:function(e){d=e},enumerable:true,configurable:true});var p=WriteStream;Object.defineProperty(e,"FileWriteStream",{get:function(){return p},set:function(e){p=e},enumerable:true,configurable:true});function ReadStream(e,n){if(this instanceof ReadStream)return c.apply(this,arguments),this;else return ReadStream.apply(Object.create(ReadStream.prototype),arguments)}function ReadStream$open(){var e=this;open(e.path,e.flags,e.mode,function(n,r){if(n){if(e.autoClose)e.destroy();e.emit("error",n)}else{e.fd=r;e.emit("open",r);e.read()}})}function WriteStream(e,n){if(this instanceof WriteStream)return a.apply(this,arguments),this;else return WriteStream.apply(Object.create(WriteStream.prototype),arguments)}function WriteStream$open(){var e=this;open(e.path,e.flags,e.mode,function(n,r){if(n){e.destroy();e.emit("error",n)}else{e.fd=r;e.emit("open",r)}})}function createReadStream(n,r){return new e.ReadStream(n,r)}function createWriteStream(n,r){return new e.WriteStream(n,r)}var u=e.open;e.open=open;function open(e,n,r,s){if(typeof r==="function")s=r,r=null;return go$open(e,n,r,s);function go$open(e,n,r,s,i){return u(e,n,r,function(f,l){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))enqueue([go$open,[e,n,r,s],f,i||Date.now(),Date.now()]);else{if(typeof s==="function")s.apply(this,arguments)}})}}return e}function enqueue(e){a("ENQUEUE",e[0].name,e[1]);s[o].push(e);retry()}var p;function resetQueue(){var e=Date.now();for(var n=0;n2){s[o][n][3]=e;s[o][n][4]=e}}retry()}function retry(){clearTimeout(p);p=undefined;if(s[o].length===0)return;var e=s[o].shift();var n=e[0];var r=e[1];var i=e[2];var f=e[3];var l=e[4];if(f===undefined){a("RETRY",n.name,r);n.apply(null,r)}else if(Date.now()-f>=6e4){a("TIMEOUT",n.name,r);var t=r.pop();if(typeof t==="function")t.call(null,i)}else{var c=Date.now()-l;var d=Math.max(l-f,1);var u=Math.min(d*1.2,100);if(c>=u){a("RETRY",n.name,r);n.apply(null,r.concat([f]))}else{s[o].push(e)}}if(p===undefined){p=setTimeout(retry,0)}}},865:(e,n,r)=>{var s=r(2413).Stream;e.exports=legacy;function legacy(e){return{ReadStream:ReadStream,WriteStream:WriteStream};function ReadStream(n,r){if(!(this instanceof ReadStream))return new ReadStream(n,r);s.call(this);var i=this;this.path=n;this.fd=null;this.readable=true;this.paused=false;this.flags="r";this.mode=438;this.bufferSize=64*1024;r=r||{};var f=Object.keys(r);for(var l=0,t=f.length;lthis.end){throw new Error("start must be <= end")}this.pos=this.start}if(this.fd!==null){process.nextTick(function(){i._read()});return}e.open(this.path,this.flags,this.mode,function(e,n){if(e){i.emit("error",e);i.readable=false;return}i.fd=n;i.emit("open",n);i._read()})}function WriteStream(n,r){if(!(this instanceof WriteStream))return new WriteStream(n,r);s.call(this);this.path=n;this.fd=null;this.writable=true;this.flags="w";this.encoding="binary";this.mode=438;this.bytesWritten=0;r=r||{};var i=Object.keys(r);for(var f=0,l=i.length;f= zero")}this.pos=this.start}this.busy=false;this._queue=[];if(this.fd===null){this._open=e.open;this._queue.push([this._open,this.path,this.flags,this.mode,undefined]);this.flush()}}}},7136:(e,n,r)=>{var s=r(7619);var i=process.cwd;var f=null;var l=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!f)f=i.call(process);return f};try{process.cwd()}catch(e){}if(typeof process.chdir==="function"){var t=process.chdir;process.chdir=function(e){f=null;t.call(process,e)};if(Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,t)}e.exports=patch;function patch(e){if(s.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)){patchLchmod(e)}if(!e.lutimes){patchLutimes(e)}e.chown=chownFix(e.chown);e.fchown=chownFix(e.fchown);e.lchown=chownFix(e.lchown);e.chmod=chmodFix(e.chmod);e.fchmod=chmodFix(e.fchmod);e.lchmod=chmodFix(e.lchmod);e.chownSync=chownFixSync(e.chownSync);e.fchownSync=chownFixSync(e.fchownSync);e.lchownSync=chownFixSync(e.lchownSync);e.chmodSync=chmodFixSync(e.chmodSync);e.fchmodSync=chmodFixSync(e.fchmodSync);e.lchmodSync=chmodFixSync(e.lchmodSync);e.stat=statFix(e.stat);e.fstat=statFix(e.fstat);e.lstat=statFix(e.lstat);e.statSync=statFixSync(e.statSync);e.fstatSync=statFixSync(e.fstatSync);e.lstatSync=statFixSync(e.lstatSync);if(!e.lchmod){e.lchmod=function(e,n,r){if(r)process.nextTick(r)};e.lchmodSync=function(){}}if(!e.lchown){e.lchown=function(e,n,r,s){if(s)process.nextTick(s)};e.lchownSync=function(){}}if(l==="win32"){e.rename=function(n){return function(r,s,i){var f=Date.now();var l=0;n(r,s,function CB(t){if(t&&(t.code==="EACCES"||t.code==="EPERM")&&Date.now()-f<6e4){setTimeout(function(){e.stat(s,function(e,f){if(e&&e.code==="ENOENT")n(r,s,CB);else i(t)})},l);if(l<100)l+=10;return}if(i)i(t)})}}(e.rename)}e.read=function(n){function read(r,s,i,f,l,t){var o;if(t&&typeof t==="function"){var c=0;o=function(a,d,p){if(a&&a.code==="EAGAIN"&&c<10){c++;return n.call(e,r,s,i,f,l,o)}t.apply(this,arguments)}}return n.call(e,r,s,i,f,l,o)}if(Object.setPrototypeOf)Object.setPrototypeOf(read,n);return read}(e.read);e.readSync=function(n){return function(r,s,i,f,l){var t=0;while(true){try{return n.call(e,r,s,i,f,l)}catch(e){if(e.code==="EAGAIN"&&t<10){t++;continue}throw e}}}}(e.readSync);function patchLchmod(e){e.lchmod=function(n,r,i){e.open(n,s.O_WRONLY|s.O_SYMLINK,r,function(n,s){if(n){if(i)i(n);return}e.fchmod(s,r,function(n){e.close(s,function(e){if(i)i(n||e)})})})};e.lchmodSync=function(n,r){var i=e.openSync(n,s.O_WRONLY|s.O_SYMLINK,r);var f=true;var l;try{l=e.fchmodSync(i,r);f=false}finally{if(f){try{e.closeSync(i)}catch(e){}}else{e.closeSync(i)}}return l}}function patchLutimes(e){if(s.hasOwnProperty("O_SYMLINK")){e.lutimes=function(n,r,i,f){e.open(n,s.O_SYMLINK,function(n,s){if(n){if(f)f(n);return}e.futimes(s,r,i,function(n){e.close(s,function(e){if(f)f(n||e)})})})};e.lutimesSync=function(n,r,i){var f=e.openSync(n,s.O_SYMLINK);var l;var t=true;try{l=e.futimesSync(f,r,i);t=false}finally{if(t){try{e.closeSync(f)}catch(e){}}else{e.closeSync(f)}}return l}}else{e.lutimes=function(e,n,r,s){if(s)process.nextTick(s)};e.lutimesSync=function(){}}}function chmodFix(n){if(!n)return n;return function(r,s,i){return n.call(e,r,s,function(e){if(chownErOk(e))e=null;if(i)i.apply(this,arguments)})}}function chmodFixSync(n){if(!n)return n;return function(r,s){try{return n.call(e,r,s)}catch(e){if(!chownErOk(e))throw e}}}function chownFix(n){if(!n)return n;return function(r,s,i,f){return n.call(e,r,s,i,function(e){if(chownErOk(e))e=null;if(f)f.apply(this,arguments)})}}function chownFixSync(n){if(!n)return n;return function(r,s,i){try{return n.call(e,r,s,i)}catch(e){if(!chownErOk(e))throw e}}}function statFix(n){if(!n)return n;return function(r,s,i){if(typeof s==="function"){i=s;s=null}function callback(e,n){if(n){if(n.uid<0)n.uid+=4294967296;if(n.gid<0)n.gid+=4294967296}if(i)i.apply(this,arguments)}return s?n.call(e,r,s,callback):n.call(e,r,callback)}}function statFixSync(n){if(!n)return n;return function(r,s){var i=s?n.call(e,r,s):n.call(e,r);if(i){if(i.uid<0)i.uid+=4294967296;if(i.gid<0)i.gid+=4294967296}return i}}function chownErOk(e){if(!e)return true;if(e.code==="ENOSYS")return true;var n=!process.getuid||process.getuid()!==0;if(n){if(e.code==="EINVAL"||e.code==="EPERM")return true}return false}}},8915:(e,n,r)=>{"use strict";var s=r(2087);if(typeof s.homedir!=="undefined"){e.exports=s.homedir}else{e.exports=r(5662)}},5662:(e,n,r)=>{"use strict";var s=r(5747);var i=r(7795);function homedir(){if(process.platform==="win32"){if(process.env.USERPROFILE){return process.env.USERPROFILE}if(process.env.HOMEDRIVE&&process.env.HOMEPATH){return process.env.HOMEDRIVE+process.env.HOMEPATH}if(process.env.HOME){return process.env.HOME}return null}if(process.env.HOME){return process.env.HOME}var e=tryReadFileSync("/etc/passwd");var n=find(i(e),getuid());if(n){return n}var r=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;if(!r){return null}if(process.platform==="darwin"){return"/Users/"+r}return"/home/"+r}function find(e,n){var r=e.length;for(var s=0;s0){d("Patching connection write() output buffer with updated header");n=e.output[0];r=n.indexOf("\r\n\r\n")+4;e.output[0]=e._header+n.substring(r);d("Output buffer: %o",e.output)}else if(e.outputData&&e.outputData.length>0){d("Patching connection write() output buffer with updated header");n=e.outputData[0].data;r=n.indexOf("\r\n\r\n")+4;e.outputData[0].data=e._header+n.substring(r);d("Output buffer: %o",e.outputData[0].data)}}yield(0,c.default)(o,"connect");return o})}}n.default=HttpProxyAgent},5865:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const i=s(r(2872));function createHttpProxyAgent(e){return new i.default(e)}(function(e){e.HttpProxyAgent=i.default;e.prototype=i.default.prototype})(createHttpProxyAgent||(createHttpProxyAgent={}));e.exports=createHttpProxyAgent},8756:function(e,n,r){"use strict";var s=this&&this.__awaiter||function(e,n,r,s){function adopt(e){return e instanceof r?e:new r(function(n){n(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,n||[])).next())})};var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});const f=i(r(1631));const l=i(r(4016));const t=i(r(8835));const o=i(r(2357));const c=i(r(6782));const a=r(44);const d=i(r(6733));const p=c.default("https-proxy-agent:agent");class HttpsProxyAgent extends a.Agent{constructor(e){let n;if(typeof e==="string"){n=t.default.parse(e)}else{n=e}if(!n){throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!")}p("creating new HttpsProxyAgent instance: %o",n);super(n);const r=Object.assign({},n);this.secureProxy=n.secureProxy||isHTTPS(r.protocol);r.host=r.hostname||r.host;if(typeof r.port==="string"){r.port=parseInt(r.port,10)}if(!r.port&&r.host){r.port=this.secureProxy?443:80}if(this.secureProxy&&!("ALPNProtocols"in r)){r.ALPNProtocols=["http 1.1"]}if(r.host&&r.path){delete r.path;delete r.pathname}this.proxy=r}callback(e,n){return s(this,void 0,void 0,function*(){const{proxy:r,secureProxy:s}=this;let i;if(s){p("Creating `tls.Socket`: %o",r);i=l.default.connect(r)}else{p("Creating `net.Socket`: %o",r);i=f.default.connect(r)}const t=Object.assign({},r.headers);const c=`${n.host}:${n.port}`;let a=`CONNECT ${c} HTTP/1.1\r\n`;if(r.auth){t["Proxy-Authorization"]=`Basic ${Buffer.from(r.auth).toString("base64")}`}let{host:u,port:h,secureEndpoint:v}=n;if(!isDefaultPort(h,v)){u+=`:${h}`}t.Host=u;t.Connection="close";for(const e of Object.keys(t)){a+=`${e}: ${t[e]}\r\n`}const g=d.default(i);i.write(`${a}\r\n`);const{statusCode:b,buffered:w}=yield g;if(b===200){e.once("socket",resume);if(n.secureEndpoint){const e=n.servername||n.host;if(!e){throw new Error('Could not determine "servername"')}p("Upgrading socket connection to TLS");return l.default.connect(Object.assign(Object.assign({},omit(n,"host","hostname","path","port")),{socket:i,servername:e}))}return i}i.destroy();const y=new f.default.Socket;y.readable=true;e.once("socket",e=>{p("replaying proxy buffer for failed request");o.default(e.listenerCount("data")>0);e.push(w);e.push(null)});return y})}}n.default=HttpsProxyAgent;function resume(e){e.resume()}function isDefaultPort(e,n){return Boolean(!n&&e===80||n&&e===443)}function isHTTPS(e){return typeof e==="string"?/^https:?$/i.test(e):false}function omit(e,...n){const r={};let s;for(s in e){if(!n.includes(s)){r[s]=e[s]}}return r}},7052:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const i=s(r(8756));function createHttpsProxyAgent(e){return new i.default(e)}(function(e){e.HttpsProxyAgent=i.default;e.prototype=i.default.prototype})(createHttpsProxyAgent||(createHttpsProxyAgent={}));e.exports=createHttpsProxyAgent},6733:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});const i=s(r(6782));const f=i.default("https-proxy-agent:parse-proxy-response");function parseProxyResponse(e){return new Promise((n,r)=>{let s=0;const i=[];function read(){const n=e.read();if(n)ondata(n);else e.once("readable",read)}function cleanup(){e.removeListener("end",onend);e.removeListener("error",onerror);e.removeListener("close",onclose);e.removeListener("readable",read)}function onclose(e){f("onclose had error %o",e)}function onend(){f("onend")}function onerror(e){cleanup();f("onerror %o",e);r(e)}function ondata(e){i.push(e);s+=e.length;const r=Buffer.concat(i,s);const l=r.indexOf("\r\n\r\n");if(l===-1){f("have not received end of HTTP headers yet...");read();return}const t=r.toString("ascii",0,r.indexOf("\r\n"));const o=+t.split(" ")[1];f("got proxy server response: %o",t);n({statusCode:o,buffered:r})}e.on("error",onerror);e.on("close",onclose);e.on("end",onend);read()})}n.default=parseProxyResponse},3499:(e,n,r)=>{"use strict";var s=r(1669);var i=r(9474);e.exports=function(e){if(typeof e==="number")return e;var n=i(e);if(n===undefined){var r=new Error(s.format("humanize-ms(%j) result undefined",e));console.warn(r.stack)}return n}},4455:e=>{"use strict";var n=typeof window!=="undefined"?window:typeof global!=="undefined"?global:{};e.exports=Individual;function Individual(e,r){if(e in n){return n[e]}n[e]=r;return r}},3655:(e,n,r)=>{try{var s=r(1669);if(typeof s.inherits!=="function")throw"";e.exports=s.inherits}catch(n){e.exports=r(9857)}},9857:e=>{if(typeof Object.create==="function"){e.exports=function inherits(e,n){if(n){e.super_=n;e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,n){if(n){e.super_=n;var r=function(){};r.prototype=n.prototype;e.prototype=new r;e.prototype.constructor=e}}}},5316:(e,n,r)=>{"use strict";var s=n;var i=r(4293).Buffer;var f=r(2087);s.toBuffer=function(e,n,r){r=~~r;var s;if(this.isV4Format(e)){s=n||new i(r+4);e.split(/\./g).map(function(e){s[r++]=parseInt(e,10)&255})}else if(this.isV6Format(e)){var f=e.split(":",8);var l;for(l=0;l0;l--){c.push("0")}f.splice.apply(f,c)}s=n||new i(r+16);for(l=0;l>8&255;s[r++]=a&255}}if(!s){throw Error("Invalid ip address: "+e)}return s};s.toString=function(e,n,r){n=~~n;r=r||e.length-n;var s=[];if(r===4){for(var i=0;i32){n="ipv6"}else{n=_normalizeFamily(n)}var r=4;if(n==="ipv6"){r=16}var f=new i(r);for(var l=0,t=f.length;l>o)&255}return s.toString(f)};s.mask=function(e,n){e=s.toBuffer(e);n=s.toBuffer(n);var r=new i(Math.max(e.length,n.length));var f=0;if(e.length===n.length){for(f=0;fe.length){i=n;f=e}var l=i.length-f.length;for(var r=l;r>>0};s.fromLong=function(e){return(e>>>24)+"."+(e>>16&255)+"."+(e>>8&255)+"."+(e&255)}},6070:(e,n,r)=>{"use strict";var s=r(7372);var i=r(319);function renamed(e,n){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. "+"Use yaml."+n+" instead, which is now safe by default.")}}e.exports.Type=r(7060);e.exports.Schema=r(6435);e.exports.FAILSAFE_SCHEMA=r(7947);e.exports.JSON_SCHEMA=r(6918);e.exports.CORE_SCHEMA=r(6670);e.exports.DEFAULT_SCHEMA=r(3498);e.exports.load=s.load;e.exports.loadAll=s.loadAll;e.exports.dump=i.dump;e.exports.YAMLException=r(6141);e.exports.types={binary:r(2410),float:r(3760),map:r(5113),null:r(5711),pairs:r(8851),set:r(7282),timestamp:r(3637),bool:r(4719),int:r(436),merge:r(4789),omap:r(4189),seq:r(7331),str:r(1299)};e.exports.safeLoad=renamed("safeLoad","load");e.exports.safeLoadAll=renamed("safeLoadAll","loadAll");e.exports.safeDump=renamed("safeDump","dump")},130:e=>{"use strict";function isNothing(e){return typeof e==="undefined"||e===null}function isObject(e){return typeof e==="object"&&e!==null}function toArray(e){if(Array.isArray(e))return e;else if(isNothing(e))return[];return[e]}function extend(e,n){var r,s,i,f;if(n){f=Object.keys(n);for(r=0,s=f.length;r{"use strict";var s=r(130);var i=r(6141);var f=r(3498);var l=Object.prototype.toString;var t=Object.prototype.hasOwnProperty;var o=65279;var c=9;var a=10;var d=13;var p=32;var u=33;var h=34;var v=35;var g=37;var b=38;var w=39;var y=42;var m=44;var E=45;var S=58;var C=61;var O=62;var A=63;var R=64;var k=91;var I=93;var T=96;var x=123;var F=124;var j=125;var B={};B[0]="\\0";B[7]="\\a";B[8]="\\b";B[9]="\\t";B[10]="\\n";B[11]="\\v";B[12]="\\f";B[13]="\\r";B[27]="\\e";B[34]='\\"';B[92]="\\\\";B[133]="\\N";B[160]="\\_";B[8232]="\\L";B[8233]="\\P";var L=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];var M=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function compileStyleMap(e,n){var r,s,i,f,l,o,c;if(n===null)return{};r={};s=Object.keys(n);for(i=0,f=s.length;i=55296&&r<=56319&&n+1=56320&&s<=57343){return(r-55296)*1024+s-56320+65536}}return r}function needIndentIndicator(e){var n=/^\n* /;return n.test(e)}var N=1,q=2,z=3,H=4,W=5;function chooseScalarStyle(e,n,r,s,i,f,l,t){var o;var c=0;var d=null;var p=false;var u=false;var h=s!==-1;var v=-1;var g=isPlainSafeFirst(codePointAt(e,0))&&isPlainSafeLast(codePointAt(e,e.length-1));if(n||l){for(o=0;o=65536?o+=2:o++){c=codePointAt(e,o);if(!isPrintable(c)){return W}g=g&&isPlainSafe(c,d,t);d=c}}else{for(o=0;o=65536?o+=2:o++){c=codePointAt(e,o);if(c===a){p=true;if(h){u=u||o-v-1>s&&e[v+1]!==" ";v=o}}else if(!isPrintable(c)){return W}g=g&&isPlainSafe(c,d,t);d=c}u=u||h&&(o-v-1>s&&e[v+1]!==" ")}if(!p&&!u){if(g&&!l&&!i(e)){return N}return f===D?W:q}if(r>9&&needIndentIndicator(e)){return W}if(!l){return u?H:z}return f===D?W:q}function writeScalar(e,n,r,s,f){e.dump=function(){if(n.length===0){return e.quotingType===D?'""':"''"}if(!e.noCompatMode){if(L.indexOf(n)!==-1||M.test(n)){return e.quotingType===D?'"'+n+'"':"'"+n+"'"}}var l=e.indent*Math.max(1,r);var t=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-l);var o=s||e.flowLevel>-1&&r>=e.flowLevel;function testAmbiguity(n){return testImplicitResolving(e,n)}switch(chooseScalarStyle(n,o,e.indent,t,testAmbiguity,e.quotingType,e.forceQuotes&&!s,f)){case N:return n;case q:return"'"+n.replace(/'/g,"''")+"'";case z:return"|"+blockHeader(n,e.indent)+dropEndingNewline(indentString(n,l));case H:return">"+blockHeader(n,e.indent)+dropEndingNewline(indentString(foldString(n,t),l));case W:return'"'+escapeString(n,t)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function blockHeader(e,n){var r=needIndentIndicator(e)?String(n):"";var s=e[e.length-1]==="\n";var i=s&&(e[e.length-2]==="\n"||e==="\n");var f=i?"+":s?"":"-";return r+f+"\n"}function dropEndingNewline(e){return e[e.length-1]==="\n"?e.slice(0,-1):e}function foldString(e,n){var r=/(\n+)([^\n]*)/g;var s=function(){var s=e.indexOf("\n");s=s!==-1?s:e.length;r.lastIndex=s;return foldLine(e.slice(0,s),n)}();var i=e[0]==="\n"||e[0]===" ";var f;var l;while(l=r.exec(e)){var t=l[1],o=l[2];f=o[0]===" ";s+=t+(!i&&!f&&o!==""?"\n":"")+foldLine(o,n);i=f}return s}function foldLine(e,n){if(e===""||e[0]===" ")return e;var r=/ [^ ]/g;var s;var i=0,f,l=0,t=0;var o="";while(s=r.exec(e)){t=s.index;if(t-i>n){f=l>i?l:t;o+="\n"+e.slice(i,f);i=f+1}l=t}o+="\n";if(e.length-i>n&&l>i){o+=e.slice(i,l)+"\n"+e.slice(l+1)}else{o+=e.slice(i)}return o.slice(1)}function escapeString(e){var n="";var r=0;var s;for(var i=0;i=65536?i+=2:i++){r=codePointAt(e,i);s=B[r];if(!s&&isPrintable(r)){n+=e[i];if(r>=65536)n+=e[i+1]}else{n+=s||encodeHex(r)}}return n}function writeFlowSequence(e,n,r){var s="",i=e.tag,f,l,t;for(f=0,l=r.length;f1024)a+="? ";a+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" ");if(!writeNode(e,n,c,false,false)){continue}a+=e.dump;s+=a}e.tag=i;e.dump="{"+s+"}"}function writeBlockMapping(e,n,r,s){var f="",l=e.tag,t=Object.keys(r),o,c,d,p,u,h;if(e.sortKeys===true){t.sort()}else if(typeof e.sortKeys==="function"){t.sort(e.sortKeys)}else if(e.sortKeys){throw new i("sortKeys must be a boolean or a function")}for(o=0,c=t.length;o1024;if(u){if(e.dump&&a===e.dump.charCodeAt(0)){h+="?"}else{h+="? "}}h+=e.dump;if(u){h+=generateNextLine(e,n)}if(!writeNode(e,n+1,p,true,u)){continue}if(e.dump&&a===e.dump.charCodeAt(0)){h+=":"}else{h+=": "}h+=e.dump;f+=h}e.tag=l;e.dump=f||"{}"}function detectType(e,n,r){var s,f,o,c,a,d;f=r?e.explicitTypes:e.implicitTypes;for(o=0,c=f.length;o tag resolver accepts not "'+d+'" style')}e.dump=s}return true}}return false}function writeNode(e,n,r,s,f,t,o){e.tag=null;e.dump=r;if(!detectType(e,r,false)){detectType(e,r,true)}var c=l.call(e.dump);var a=s;var d;if(s){s=e.flowLevel<0||e.flowLevel>n}var p=c==="[object Object]"||c==="[object Array]",u,h;if(p){u=e.duplicates.indexOf(r);h=u!==-1}if(e.tag!==null&&e.tag!=="?"||h||e.indent!==2&&n>0){f=false}if(h&&e.usedDuplicates[u]){e.dump="*ref_"+u}else{if(p&&h&&!e.usedDuplicates[u]){e.usedDuplicates[u]=true}if(c==="[object Object]"){if(s&&Object.keys(e.dump).length!==0){writeBlockMapping(e,n,e.dump,f);if(h){e.dump="&ref_"+u+e.dump}}else{writeFlowMapping(e,n,e.dump);if(h){e.dump="&ref_"+u+" "+e.dump}}}else if(c==="[object Array]"){if(s&&e.dump.length!==0){if(e.noArrayIndent&&!o&&n>0){writeBlockSequence(e,n-1,e.dump,f)}else{writeBlockSequence(e,n,e.dump,f)}if(h){e.dump="&ref_"+u+e.dump}}else{writeFlowSequence(e,n,e.dump);if(h){e.dump="&ref_"+u+" "+e.dump}}}else if(c==="[object String]"){if(e.tag!=="?"){writeScalar(e,e.dump,n,t,a)}}else if(c==="[object Undefined]"){return false}else{if(e.skipInvalid)return false;throw new i("unacceptable kind of an object to dump "+c)}if(e.tag!==null&&e.tag!=="?"){d=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21");if(e.tag[0]==="!"){d="!"+d}else if(d.slice(0,18)==="tag:yaml.org,2002:"){d="!!"+d.slice(18)}else{d="!<"+d+">"}e.dump=d+" "+e.dump}}return true}function getDuplicateReferences(e,n){var r=[],s=[],i,f;inspectNode(e,r,s);for(i=0,f=s.length;i{"use strict";function formatError(e,n){var r="",s=e.reason||"(unknown reason)";if(!e.mark)return s;if(e.mark.name){r+='in "'+e.mark.name+'" '}r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")";if(!n&&e.mark.snippet){r+="\n\n"+e.mark.snippet}return s+" "+r}function YAMLException(e,n){Error.call(this);this.name="YAMLException";this.reason=e;this.mark=n;this.message=formatError(this,false);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack||""}}YAMLException.prototype=Object.create(Error.prototype);YAMLException.prototype.constructor=YAMLException;YAMLException.prototype.toString=function toString(e){return this.name+": "+formatError(this,e)};e.exports=YAMLException},7372:(e,n,r)=>{"use strict";var s=r(130);var i=r(6141);var f=r(163);var l=r(3498);var t=Object.prototype.hasOwnProperty;var o=1;var c=2;var a=3;var d=4;var p=1;var u=2;var h=3;var v=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var g=/[\x85\u2028\u2029]/;var b=/[,\[\]\{\}]/;var w=/^(?:!|!!|![a-z\-]+!)$/i;var y=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(e){return Object.prototype.toString.call(e)}function is_EOL(e){return e===10||e===13}function is_WHITE_SPACE(e){return e===9||e===32}function is_WS_OR_EOL(e){return e===9||e===32||e===10||e===13}function is_FLOW_INDICATOR(e){return e===44||e===91||e===93||e===123||e===125}function fromHexCode(e){var n;if(48<=e&&e<=57){return e-48}n=e|32;if(97<=n&&n<=102){return n-97+10}return-1}function escapedHexLen(e){if(e===120){return 2}if(e===117){return 4}if(e===85){return 8}return 0}function fromDecimalCode(e){if(48<=e&&e<=57){return e-48}return-1}function simpleEscapeSequence(e){return e===48?"\0":e===97?"":e===98?"\b":e===116?"\t":e===9?"\t":e===110?"\n":e===118?"\v":e===102?"\f":e===114?"\r":e===101?"":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function charFromCodepoint(e){if(e<=65535){return String.fromCharCode(e)}return String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var m=new Array(256);var E=new Array(256);for(var S=0;S<256;S++){m[S]=simpleEscapeSequence(S)?1:0;E[S]=simpleEscapeSequence(S)}function State(e,n){this.input=e;this.filename=n["filename"]||null;this.schema=n["schema"]||l;this.onWarning=n["onWarning"]||null;this.legacy=n["legacy"]||false;this.json=n["json"]||false;this.listener=n["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=e.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.firstTabInLine=-1;this.documents=[]}function generateError(e,n){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};r.snippet=f(r);return new i(n,r)}function throwError(e,n){throw generateError(e,n)}function throwWarning(e,n){if(e.onWarning){e.onWarning.call(null,generateError(e,n))}}var C={YAML:function handleYamlDirective(e,n,r){var s,i,f;if(e.version!==null){throwError(e,"duplication of %YAML directive")}if(r.length!==1){throwError(e,"YAML directive accepts exactly one argument")}s=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);if(s===null){throwError(e,"ill-formed argument of the YAML directive")}i=parseInt(s[1],10);f=parseInt(s[2],10);if(i!==1){throwError(e,"unacceptable YAML version of the document")}e.version=r[0];e.checkLineBreaks=f<2;if(f!==1&&f!==2){throwWarning(e,"unsupported YAML version of the document")}},TAG:function handleTagDirective(e,n,r){var s,i;if(r.length!==2){throwError(e,"TAG directive accepts exactly two arguments")}s=r[0];i=r[1];if(!w.test(s)){throwError(e,"ill-formed tag handle (first argument) of the TAG directive")}if(t.call(e.tagMap,s)){throwError(e,'there is a previously declared suffix for "'+s+'" tag handle')}if(!y.test(i)){throwError(e,"ill-formed tag prefix (second argument) of the TAG directive")}try{i=decodeURIComponent(i)}catch(n){throwError(e,"tag prefix is malformed: "+i)}e.tagMap[s]=i}};function captureSegment(e,n,r,s){var i,f,l,t;if(n1){e.result+=s.repeat("\n",n-1)}}function readPlainScalar(e,n,r){var s,i,f,l,t,o,c,a,d=e.kind,p=e.result,u;u=e.input.charCodeAt(e.position);if(is_WS_OR_EOL(u)||is_FLOW_INDICATOR(u)||u===35||u===38||u===42||u===33||u===124||u===62||u===39||u===34||u===37||u===64||u===96){return false}if(u===63||u===45){i=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(i)||r&&is_FLOW_INDICATOR(i)){return false}}e.kind="scalar";e.result="";f=l=e.position;t=false;while(u!==0){if(u===58){i=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(i)||r&&is_FLOW_INDICATOR(i)){break}}else if(u===35){s=e.input.charCodeAt(e.position-1);if(is_WS_OR_EOL(s)){break}}else if(e.position===e.lineStart&&testDocumentSeparator(e)||r&&is_FLOW_INDICATOR(u)){break}else if(is_EOL(u)){o=e.line;c=e.lineStart;a=e.lineIndent;skipSeparationSpace(e,false,-1);if(e.lineIndent>=n){t=true;u=e.input.charCodeAt(e.position);continue}else{e.position=l;e.line=o;e.lineStart=c;e.lineIndent=a;break}}if(t){captureSegment(e,f,l,false);writeFoldedLines(e,e.line-o);f=l=e.position;t=false}if(!is_WHITE_SPACE(u)){l=e.position+1}u=e.input.charCodeAt(++e.position)}captureSegment(e,f,l,false);if(e.result){return true}e.kind=d;e.result=p;return false}function readSingleQuotedScalar(e,n){var r,s,i;r=e.input.charCodeAt(e.position);if(r!==39){return false}e.kind="scalar";e.result="";e.position++;s=i=e.position;while((r=e.input.charCodeAt(e.position))!==0){if(r===39){captureSegment(e,s,e.position,true);r=e.input.charCodeAt(++e.position);if(r===39){s=e.position;e.position++;i=e.position}else{return true}}else if(is_EOL(r)){captureSegment(e,s,i,true);writeFoldedLines(e,skipSeparationSpace(e,false,n));s=i=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a single quoted scalar")}else{e.position++;i=e.position}}throwError(e,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(e,n){var r,s,i,f,l,t;t=e.input.charCodeAt(e.position);if(t!==34){return false}e.kind="scalar";e.result="";e.position++;r=s=e.position;while((t=e.input.charCodeAt(e.position))!==0){if(t===34){captureSegment(e,r,e.position,true);e.position++;return true}else if(t===92){captureSegment(e,r,e.position,true);t=e.input.charCodeAt(++e.position);if(is_EOL(t)){skipSeparationSpace(e,false,n)}else if(t<256&&m[t]){e.result+=E[t];e.position++}else if((l=escapedHexLen(t))>0){i=l;f=0;for(;i>0;i--){t=e.input.charCodeAt(++e.position);if((l=fromHexCode(t))>=0){f=(f<<4)+l}else{throwError(e,"expected hexadecimal character")}}e.result+=charFromCodepoint(f);e.position++}else{throwError(e,"unknown escape sequence")}r=s=e.position}else if(is_EOL(t)){captureSegment(e,r,s,true);writeFoldedLines(e,skipSeparationSpace(e,false,n));r=s=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a double quoted scalar")}else{e.position++;s=e.position}}throwError(e,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(e,n){var r=true,s,i,f,l=e.tag,t,c=e.anchor,a,d,p,u,h,v=Object.create(null),g,b,w,y;y=e.input.charCodeAt(e.position);if(y===91){d=93;h=false;t=[]}else if(y===123){d=125;h=true;t={}}else{return false}if(e.anchor!==null){e.anchorMap[e.anchor]=t}y=e.input.charCodeAt(++e.position);while(y!==0){skipSeparationSpace(e,true,n);y=e.input.charCodeAt(e.position);if(y===d){e.position++;e.tag=l;e.anchor=c;e.kind=h?"mapping":"sequence";e.result=t;return true}else if(!r){throwError(e,"missed comma between flow collection entries")}else if(y===44){throwError(e,"expected the node content, but found ','")}b=g=w=null;p=u=false;if(y===63){a=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(a)){p=u=true;e.position++;skipSeparationSpace(e,true,n)}}s=e.line;i=e.lineStart;f=e.position;composeNode(e,n,o,false,true);b=e.tag;g=e.result;skipSeparationSpace(e,true,n);y=e.input.charCodeAt(e.position);if((u||e.line===s)&&y===58){p=true;y=e.input.charCodeAt(++e.position);skipSeparationSpace(e,true,n);composeNode(e,n,o,false,true);w=e.result}if(h){storeMappingPair(e,t,v,b,g,w,s,i,f)}else if(p){t.push(storeMappingPair(e,null,v,b,g,w,s,i,f))}else{t.push(g)}skipSeparationSpace(e,true,n);y=e.input.charCodeAt(e.position);if(y===44){r=true;y=e.input.charCodeAt(++e.position)}else{r=false}}throwError(e,"unexpected end of the stream within a flow collection")}function readBlockScalar(e,n){var r,i,f=p,l=false,t=false,o=n,c=0,a=false,d,v;v=e.input.charCodeAt(e.position);if(v===124){i=false}else if(v===62){i=true}else{return false}e.kind="scalar";e.result="";while(v!==0){v=e.input.charCodeAt(++e.position);if(v===43||v===45){if(p===f){f=v===43?h:u}else{throwError(e,"repeat of a chomping mode identifier")}}else if((d=fromDecimalCode(v))>=0){if(d===0){throwError(e,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!t){o=n+d-1;t=true}else{throwError(e,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(v)){do{v=e.input.charCodeAt(++e.position)}while(is_WHITE_SPACE(v));if(v===35){do{v=e.input.charCodeAt(++e.position)}while(!is_EOL(v)&&v!==0)}}while(v!==0){readLineBreak(e);e.lineIndent=0;v=e.input.charCodeAt(e.position);while((!t||e.lineIndento){o=e.lineIndent}if(is_EOL(v)){c++;continue}if(e.lineIndentn)&&o!==0){throwError(e,"bad indentation of a sequence entry")}else if(e.lineIndentn){if(w){l=e.line;t=e.lineStart;o=e.position}if(composeNode(e,n,d,true,i)){if(w){g=e.result}else{b=e.result}}if(!w){storeMappingPair(e,u,h,v,g,b,l,t,o);v=g=b=null}skipSeparationSpace(e,true,-1);m=e.input.charCodeAt(e.position)}if((e.line===f||e.lineIndent>n)&&m!==0){throwError(e,"bad indentation of a mapping entry")}else if(e.lineIndentn){u=1}else if(e.lineIndent===n){u=0}else if(e.lineIndentn){u=1}else if(e.lineIndent===n){u=0}else if(e.lineIndent tag; it should be "scalar", not "'+e.kind+'"')}for(g=0,b=e.implicitTypes.length;g")}if(e.result!==null&&y.kind!==e.kind){throwError(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+y.kind+'", not "'+e.kind+'"')}if(!y.resolve(e.result,e.tag)){throwError(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}else{e.result=y.construct(e.result,e.tag);if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}if(e.listener!==null){e.listener("close",e)}return e.tag!==null||e.anchor!==null||v}function readDocument(e){var n=e.position,r,s,i,f=false,l;e.version=null;e.checkLineBreaks=e.legacy;e.tagMap=Object.create(null);e.anchorMap=Object.create(null);while((l=e.input.charCodeAt(e.position))!==0){skipSeparationSpace(e,true,-1);l=e.input.charCodeAt(e.position);if(e.lineIndent>0||l!==37){break}f=true;l=e.input.charCodeAt(++e.position);r=e.position;while(l!==0&&!is_WS_OR_EOL(l)){l=e.input.charCodeAt(++e.position)}s=e.input.slice(r,e.position);i=[];if(s.length<1){throwError(e,"directive name must not be less than one character in length")}while(l!==0){while(is_WHITE_SPACE(l)){l=e.input.charCodeAt(++e.position)}if(l===35){do{l=e.input.charCodeAt(++e.position)}while(l!==0&&!is_EOL(l));break}if(is_EOL(l))break;r=e.position;while(l!==0&&!is_WS_OR_EOL(l)){l=e.input.charCodeAt(++e.position)}i.push(e.input.slice(r,e.position))}if(l!==0)readLineBreak(e);if(t.call(C,s)){C[s](e,s,i)}else{throwWarning(e,'unknown document directive "'+s+'"')}}skipSeparationSpace(e,true,-1);if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45){e.position+=3;skipSeparationSpace(e,true,-1)}else if(f){throwError(e,"directives end mark is expected")}composeNode(e,e.lineIndent-1,d,false,true);skipSeparationSpace(e,true,-1);if(e.checkLineBreaks&&g.test(e.input.slice(n,e.position))){throwWarning(e,"non-ASCII line breaks are interpreted as content")}e.documents.push(e.result);if(e.position===e.lineStart&&testDocumentSeparator(e)){if(e.input.charCodeAt(e.position)===46){e.position+=3;skipSeparationSpace(e,true,-1)}return}if(e.position{"use strict";var s=r(6141);var i=r(7060);function compileList(e,n){var r=[];e[n].forEach(function(e){var n=r.length;r.forEach(function(r,s){if(r.tag===e.tag&&r.kind===e.kind&&r.multi===e.multi){n=s}});r[n]=e});return r}function compileMap(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,r;function collectType(n){if(n.multi){e.multi[n.kind].push(n);e.multi["fallback"].push(n)}else{e[n.kind][n.tag]=e["fallback"][n.tag]=n}}for(n=0,r=arguments.length;n{"use strict";e.exports=r(6918)},3498:(e,n,r)=>{"use strict";e.exports=r(6670).extend({implicit:[r(3637),r(4789)],explicit:[r(2410),r(4189),r(8851),r(7282)]})},7947:(e,n,r)=>{"use strict";var s=r(6435);e.exports=new s({explicit:[r(1299),r(7331),r(5113)]})},6918:(e,n,r)=>{"use strict";e.exports=r(7947).extend({implicit:[r(5711),r(4719),r(436),r(3760)]})},163:(e,n,r)=>{"use strict";var s=r(130);function getLine(e,n,r,s,i){var f="";var l="";var t=Math.floor(i/2)-1;if(s-n>t){f=" ... ";n=s-t+f.length}if(r-s>t){l=" ...";r=s+t-l.length}return{str:f+e.slice(n,r).replace(/\t/g,"→")+l,pos:s-n+f.length}}function padStart(e,n){return s.repeat(" ",n-e.length)+e}function makeSnippet(e,n){n=Object.create(n||null);if(!e.buffer)return null;if(!n.maxLength)n.maxLength=79;if(typeof n.indent!=="number")n.indent=1;if(typeof n.linesBefore!=="number")n.linesBefore=3;if(typeof n.linesAfter!=="number")n.linesAfter=2;var r=/\r?\n|\r|\0/g;var i=[0];var f=[];var l;var t=-1;while(l=r.exec(e.buffer)){f.push(l.index);i.push(l.index+l[0].length);if(e.position<=l.index&&t<0){t=i.length-2}}if(t<0)t=i.length-1;var o="",c,a;var d=Math.min(e.line+n.linesAfter,f.length).toString().length;var p=n.maxLength-(n.indent+d+3);for(c=1;c<=n.linesBefore;c++){if(t-c<0)break;a=getLine(e.buffer,i[t-c],f[t-c],e.position-(i[t]-i[t-c]),p);o=s.repeat(" ",n.indent)+padStart((e.line-c+1).toString(),d)+" | "+a.str+"\n"+o}a=getLine(e.buffer,i[t],f[t],e.position,p);o+=s.repeat(" ",n.indent)+padStart((e.line+1).toString(),d)+" | "+a.str+"\n";o+=s.repeat("-",n.indent+d+3+a.pos)+"^"+"\n";for(c=1;c<=n.linesAfter;c++){if(t+c>=f.length)break;a=getLine(e.buffer,i[t+c],f[t+c],e.position-(i[t]-i[t+c]),p);o+=s.repeat(" ",n.indent)+padStart((e.line+c+1).toString(),d)+" | "+a.str+"\n"}return o.replace(/\n$/,"")}e.exports=makeSnippet},7060:(e,n,r)=>{"use strict";var s=r(6141);var i=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"];var f=["scalar","sequence","mapping"];function compileStyleAliases(e){var n={};if(e!==null){Object.keys(e).forEach(function(r){e[r].forEach(function(e){n[String(e)]=r})})}return n}function Type(e,n){n=n||{};Object.keys(n).forEach(function(n){if(i.indexOf(n)===-1){throw new s('Unknown option "'+n+'" is met in definition of "'+e+'" YAML type.')}});this.options=n;this.tag=e;this.kind=n["kind"]||null;this.resolve=n["resolve"]||function(){return true};this.construct=n["construct"]||function(e){return e};this.instanceOf=n["instanceOf"]||null;this.predicate=n["predicate"]||null;this.represent=n["represent"]||null;this.representName=n["representName"]||null;this.defaultStyle=n["defaultStyle"]||null;this.multi=n["multi"]||false;this.styleAliases=compileStyleAliases(n["styleAliases"]||null);if(f.indexOf(this.kind)===-1){throw new s('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}}e.exports=Type},2410:(e,n,r)=>{"use strict";var s=r(7060);var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function resolveYamlBinary(e){if(e===null)return false;var n,r,s=0,f=e.length,l=i;for(r=0;r64)continue;if(n<0)return false;s+=6}return s%8===0}function constructYamlBinary(e){var n,r,s=e.replace(/[\r\n=]/g,""),f=s.length,l=i,t=0,o=[];for(n=0;n>16&255);o.push(t>>8&255);o.push(t&255)}t=t<<6|l.indexOf(s.charAt(n))}r=f%4*6;if(r===0){o.push(t>>16&255);o.push(t>>8&255);o.push(t&255)}else if(r===18){o.push(t>>10&255);o.push(t>>2&255)}else if(r===12){o.push(t>>4&255)}return new Uint8Array(o)}function representYamlBinary(e){var n="",r=0,s,f,l=e.length,t=i;for(s=0;s>18&63];n+=t[r>>12&63];n+=t[r>>6&63];n+=t[r&63]}r=(r<<8)+e[s]}f=l%3;if(f===0){n+=t[r>>18&63];n+=t[r>>12&63];n+=t[r>>6&63];n+=t[r&63]}else if(f===2){n+=t[r>>10&63];n+=t[r>>4&63];n+=t[r<<2&63];n+=t[64]}else if(f===1){n+=t[r>>2&63];n+=t[r<<4&63];n+=t[64];n+=t[64]}return n}function isBinary(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}e.exports=new s("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},4719:(e,n,r)=>{"use strict";var s=r(7060);function resolveYamlBoolean(e){if(e===null)return false;var n=e.length;return n===4&&(e==="true"||e==="True"||e==="TRUE")||n===5&&(e==="false"||e==="False"||e==="FALSE")}function constructYamlBoolean(e){return e==="true"||e==="True"||e==="TRUE"}function isBoolean(e){return Object.prototype.toString.call(e)==="[object Boolean]"}e.exports=new s("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},3760:(e,n,r)=>{"use strict";var s=r(130);var i=r(7060);var f=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(e){if(e===null)return false;if(!f.test(e)||e[e.length-1]==="_"){return false}return true}function constructYamlFloat(e){var n,r;n=e.replace(/_/g,"").toLowerCase();r=n[0]==="-"?-1:1;if("+-".indexOf(n[0])>=0){n=n.slice(1)}if(n===".inf"){return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(n===".nan"){return NaN}return r*parseFloat(n,10)}var l=/^[-+]?[0-9]+e/;function representYamlFloat(e,n){var r;if(isNaN(e)){switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===e){switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===e){switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(s.isNegativeZero(e)){return"-0.0"}r=e.toString(10);return l.test(r)?r.replace("e",".e"):r}function isFloat(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||s.isNegativeZero(e))}e.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},436:(e,n,r)=>{"use strict";var s=r(130);var i=r(7060);function isHexCode(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function isOctCode(e){return 48<=e&&e<=55}function isDecCode(e){return 48<=e&&e<=57}function resolveYamlInteger(e){if(e===null)return false;var n=e.length,r=0,s=false,i;if(!n)return false;i=e[r];if(i==="-"||i==="+"){i=e[++r]}if(i==="0"){if(r+1===n)return true;i=e[++r];if(i==="b"){r++;for(;r=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},5113:(e,n,r)=>{"use strict";var s=r(7060);e.exports=new s("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})},4789:(e,n,r)=>{"use strict";var s=r(7060);function resolveYamlMerge(e){return e==="<<"||e===null}e.exports=new s("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},5711:(e,n,r)=>{"use strict";var s=r(7060);function resolveYamlNull(e){if(e===null)return true;var n=e.length;return n===1&&e==="~"||n===4&&(e==="null"||e==="Null"||e==="NULL")}function constructYamlNull(){return null}function isNull(e){return e===null}e.exports=new s("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})},4189:(e,n,r)=>{"use strict";var s=r(7060);var i=Object.prototype.hasOwnProperty;var f=Object.prototype.toString;function resolveYamlOmap(e){if(e===null)return true;var n=[],r,s,l,t,o,c=e;for(r=0,s=c.length;r{"use strict";var s=r(7060);var i=Object.prototype.toString;function resolveYamlPairs(e){if(e===null)return true;var n,r,s,f,l,t=e;l=new Array(t.length);for(n=0,r=t.length;n{"use strict";var s=r(7060);e.exports=new s("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})},7282:(e,n,r)=>{"use strict";var s=r(7060);var i=Object.prototype.hasOwnProperty;function resolveYamlSet(e){if(e===null)return true;var n,r=e;for(n in r){if(i.call(r,n)){if(r[n]!==null)return false}}return true}function constructYamlSet(e){return e!==null?e:{}}e.exports=new s("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},1299:(e,n,r)=>{"use strict";var s=r(7060);e.exports=new s("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})},3637:(e,n,r)=>{"use strict";var s=r(7060);var i=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var f=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(e){if(e===null)return false;if(i.exec(e)!==null)return true;if(f.exec(e)!==null)return true;return false}function constructYamlTimestamp(e){var n,r,s,l,t,o,c,a=0,d=null,p,u,h;n=i.exec(e);if(n===null)n=f.exec(e);if(n===null)throw new Error("Date resolve error");r=+n[1];s=+n[2]-1;l=+n[3];if(!n[4]){return new Date(Date.UTC(r,s,l))}t=+n[4];o=+n[5];c=+n[6];if(n[7]){a=n[7].slice(0,3);while(a.length<3){a+="0"}a=+a}if(n[9]){p=+n[10];u=+(n[11]||0);d=(p*60+u)*6e4;if(n[9]==="-")d=-d}h=new Date(Date.UTC(r,s,l,t,o,c,a));if(d)h.setTime(h.getTime()-d);return h}function representYamlTimestamp(e){return e.toISOString()}e.exports=new s("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp})},7438:e=>{"use strict";var n=e.exports=function(e,n,r){if(typeof n=="function"){r=n;n={}}r=n.cb||r;var s=typeof r=="function"?r:r.pre||function(){};var i=r.post||function(){};_traverse(n,s,i,e,"",e)};n.keywords={additionalItems:true,items:true,contains:true,additionalProperties:true,propertyNames:true,not:true};n.arrayKeywords={items:true,allOf:true,anyOf:true,oneOf:true};n.propsKeywords={definitions:true,properties:true,patternProperties:true,dependencies:true};n.skipKeywords={default:true,enum:true,const:true,required:true,maximum:true,minimum:true,exclusiveMaximum:true,exclusiveMinimum:true,multipleOf:true,maxLength:true,minLength:true,pattern:true,format:true,maxItems:true,minItems:true,uniqueItems:true,maxProperties:true,minProperties:true};function _traverse(e,r,s,i,f,l,t,o,c,a){if(i&&typeof i=="object"&&!Array.isArray(i)){r(i,f,l,t,o,c,a);for(var d in i){var p=i[d];if(Array.isArray(p)){if(d in n.arrayKeywords){for(var u=0;u{n=e.exports=stringify;n.getSerialize=serializer;function stringify(e,n,r,s){return JSON.stringify(e,serializer(n,s),r)}function serializer(e,n){var r=[],s=[];if(n==null)n=function(e,n){if(r[0]===n)return"[Circular ~]";return"[Circular ~."+s.slice(0,r.indexOf(n)).join(".")+"]"};return function(i,f){if(r.length>0){var l=r.indexOf(this);~l?r.splice(l+1):r.push(this);~l?s.splice(l,Infinity,i):s.push(i);if(~r.indexOf(f))f=n.call(this,i,f)}else r.push(f);return e==null?f:e.call(this,i,f)}}},5221:(e,n,r)=>{let s;try{s=r(4742)}catch(e){s=r(5747)}const i=r(8522);const{stringify:f,stripBom:l}=r(1266);async function _readFile(e,n={}){if(typeof n==="string"){n={encoding:n}}const r=n.fs||s;const f="throws"in n?n.throws:true;let t=await i.fromCallback(r.readFile)(e,n);t=l(t);let o;try{o=JSON.parse(t,n?n.reviver:null)}catch(n){if(f){n.message=`${e}: ${n.message}`;throw n}else{return null}}return o}const t=i.fromPromise(_readFile);function readFileSync(e,n={}){if(typeof n==="string"){n={encoding:n}}const r=n.fs||s;const i="throws"in n?n.throws:true;try{let s=r.readFileSync(e,n);s=l(s);return JSON.parse(s,n.reviver)}catch(n){if(i){n.message=`${e}: ${n.message}`;throw n}else{return null}}}async function _writeFile(e,n,r={}){const l=r.fs||s;const t=f(n,r);await i.fromCallback(l.writeFile)(e,t,r)}const o=i.fromPromise(_writeFile);function writeFileSync(e,n,r={}){const i=r.fs||s;const l=f(n,r);return i.writeFileSync(e,l,r)}const c={readFile:t,readFileSync:readFileSync,writeFile:o,writeFileSync:writeFileSync};e.exports=c},1266:e=>{function stringify(e,{EOL:n="\n",finalEOL:r=true,replacer:s=null,spaces:i}={}){const f=r?n:"";const l=JSON.stringify(e,s,i);return l.replace(/\n/g,n)+f}function stripBom(e){if(Buffer.isBuffer(e))e=e.toString("utf8");return e.replace(/^\uFEFF/,"")}e.exports={stringify:stringify,stripBom:stripBom}},7140:(e,n,r)=>{"use strict";const s=r(7572);const i=Symbol("max");const f=Symbol("length");const l=Symbol("lengthCalculator");const t=Symbol("allowStale");const o=Symbol("maxAge");const c=Symbol("dispose");const a=Symbol("noDisposeOnSet");const d=Symbol("lruList");const p=Symbol("cache");const u=Symbol("updateAgeOnGet");const h=()=>1;class LRUCache{constructor(e){if(typeof e==="number")e={max:e};if(!e)e={};if(e.max&&(typeof e.max!=="number"||e.max<0))throw new TypeError("max must be a non-negative number");const n=this[i]=e.max||Infinity;const r=e.length||h;this[l]=typeof r!=="function"?h:r;this[t]=e.stale||false;if(e.maxAge&&typeof e.maxAge!=="number")throw new TypeError("maxAge must be a number");this[o]=e.maxAge||0;this[c]=e.dispose;this[a]=e.noDisposeOnSet||false;this[u]=e.updateAgeOnGet||false;this.reset()}set max(e){if(typeof e!=="number"||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||Infinity;b(this)}get max(){return this[i]}set allowStale(e){this[t]=!!e}get allowStale(){return this[t]}set maxAge(e){if(typeof e!=="number")throw new TypeError("maxAge must be a non-negative number");this[o]=e;b(this)}get maxAge(){return this[o]}set lengthCalculator(e){if(typeof e!=="function")e=h;if(e!==this[l]){this[l]=e;this[f]=0;this[d].forEach(e=>{e.length=this[l](e.value,e.key);this[f]+=e.length})}b(this)}get lengthCalculator(){return this[l]}get length(){return this[f]}get itemCount(){return this[d].length}rforEach(e,n){n=n||this;for(let r=this[d].tail;r!==null;){const s=r.prev;y(this,e,r,n);r=s}}forEach(e,n){n=n||this;for(let r=this[d].head;r!==null;){const s=r.next;y(this,e,r,n);r=s}}keys(){return this[d].toArray().map(e=>e.key)}values(){return this[d].toArray().map(e=>e.value)}reset(){if(this[c]&&this[d]&&this[d].length){this[d].forEach(e=>this[c](e.key,e.value))}this[p]=new Map;this[d]=new s;this[f]=0}dump(){return this[d].map(e=>g(this,e)?false:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[d]}set(e,n,r){r=r||this[o];if(r&&typeof r!=="number")throw new TypeError("maxAge must be a number");const s=r?Date.now():0;const t=this[l](n,e);if(this[p].has(e)){if(t>this[i]){w(this,this[p].get(e));return false}const l=this[p].get(e);const o=l.value;if(this[c]){if(!this[a])this[c](e,o.value)}o.now=s;o.maxAge=r;o.value=n;this[f]+=t-o.length;o.length=t;this.get(e);b(this);return true}const u=new Entry(e,n,t,s,r);if(u.length>this[i]){if(this[c])this[c](e,n);return false}this[f]+=u.length;this[d].unshift(u);this[p].set(e,this[d].head);b(this);return true}has(e){if(!this[p].has(e))return false;const n=this[p].get(e).value;return!g(this,n)}get(e){return v(this,e,true)}peek(e){return v(this,e,false)}pop(){const e=this[d].tail;if(!e)return null;w(this,e);return e.value}del(e){w(this,this[p].get(e))}load(e){this.reset();const n=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r];const i=s.e||0;if(i===0)this.set(s.k,s.v);else{const e=i-n;if(e>0){this.set(s.k,s.v,e)}}}}prune(){this[p].forEach((e,n)=>v(this,n,false))}}const v=(e,n,r)=>{const s=e[p].get(n);if(s){const n=s.value;if(g(e,n)){w(e,s);if(!e[t])return undefined}else{if(r){if(e[u])s.value.now=Date.now();e[d].unshiftNode(s)}}return n.value}};const g=(e,n)=>{if(!n||!n.maxAge&&!e[o])return false;const r=Date.now()-n.now;return n.maxAge?r>n.maxAge:e[o]&&r>e[o]};const b=e=>{if(e[f]>e[i]){for(let n=e[d].tail;e[f]>e[i]&&n!==null;){const r=n.prev;w(e,n);n=r}}};const w=(e,n)=>{if(n){const r=n.value;if(e[c])e[c](r.key,r.value);e[f]-=r.length;e[p].delete(r.key);e[d].removeNode(n)}};class Entry{constructor(e,n,r,s,i){this.key=e;this.value=n;this.length=r;this.now=s;this.maxAge=i||0}}const y=(e,n,r,s)=>{let i=r.value;if(g(e,i)){w(e,r);if(!e[t])i=undefined}if(i)n.call(s,i.value,i.key,e)};e.exports=LRUCache},892:e=>{var n=1e3;var r=n*60;var s=r*60;var i=s*24;var f=i*7;var l=i*365.25;e.exports=function(e,n){n=n||{};var r=typeof e;if(r==="string"&&e.length>0){return parse(e)}else if(r==="number"&&isFinite(e)){return n.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t){return}var o=parseFloat(t[1]);var c=(t[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return o*l;case"weeks":case"week":case"w":return o*f;case"days":case"day":case"d":return o*i;case"hours":case"hour":case"hrs":case"hr":case"h":return o*s;case"minutes":case"minute":case"mins":case"min":case"m":return o*r;case"seconds":case"second":case"secs":case"sec":case"s":return o*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return undefined}}function fmtShort(e){var f=Math.abs(e);if(f>=i){return Math.round(e/i)+"d"}if(f>=s){return Math.round(e/s)+"h"}if(f>=r){return Math.round(e/r)+"m"}if(f>=n){return Math.round(e/n)+"s"}return e+"ms"}function fmtLong(e){var f=Math.abs(e);if(f>=i){return plural(e,f,i,"day")}if(f>=s){return plural(e,f,s,"hour")}if(f>=r){return plural(e,f,r,"minute")}if(f>=n){return plural(e,f,n,"second")}return e+" ms"}function plural(e,n,r,s){var i=n>=r*1.5;return Math.round(e/r)+" "+s+(i?"s":"")}},9474:e=>{var n=1e3;var r=n*60;var s=r*60;var i=s*24;var f=i*7;var l=i*365.25;e.exports=function(e,n){n=n||{};var r=typeof e;if(r==="string"&&e.length>0){return parse(e)}else if(r==="number"&&isFinite(e)){return n.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t){return}var o=parseFloat(t[1]);var c=(t[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return o*l;case"weeks":case"week":case"w":return o*f;case"days":case"day":case"d":return o*i;case"hours":case"hour":case"hrs":case"hr":case"h":return o*s;case"minutes":case"minute":case"mins":case"min":case"m":return o*r;case"seconds":case"second":case"secs":case"sec":case"s":return o*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return undefined}}function fmtShort(e){var f=Math.abs(e);if(f>=i){return Math.round(e/i)+"d"}if(f>=s){return Math.round(e/s)+"h"}if(f>=r){return Math.round(e/r)+"m"}if(f>=n){return Math.round(e/n)+"s"}return e+"ms"}function fmtLong(e){var f=Math.abs(e);if(f>=i){return plural(e,f,i,"day")}if(f>=s){return plural(e,f,s,"hour")}if(f>=r){return plural(e,f,r,"minute")}if(f>=n){return plural(e,f,n,"second")}return e+" ms"}function plural(e,n,r,s){var i=n>=r*1.5;return Math.round(e/r)+" "+s+(i?"s":"")}},3290:(e,n,r)=>{const s=r(5585);const i=r(5844);const{EOL:f}=r(2087);const l=r(9297);e.exports.stringify=(e=>s.obj(e,(e,n,r)=>{r(null,l(e)+f)}));e.exports.parse=(e=>{e=e||{};e.strict=e.strict!==false;function parseRow(n){try{if(n)return JSON.parse(n)}catch(r){if(e.strict){this.emit("error",new Error("Could not parse row "+n.slice(0,50)+"..."))}}}return i(parseRow,e)})},7795:e=>{"use strict";e.exports=function(e){if(typeof e!=="string"){throw new Error("expected a string")}return e.split("\n").map(user).filter(Boolean)};function user(e,n){if(!e||!e.length||e.charAt(0)==="#"){return null}var r=e.split(":");return{username:r[0],password:r[1],uid:r[2],gid:r[3],gecos:r[4],homedir:r[5],shell:r[6]}}},5484:e=>{"use strict";const n={};function createErrorType(e,r,s){if(!s){s=Error}function getMessage(e,n,s){if(typeof r==="string"){return r}else{return r(e,n,s)}}class NodeError extends s{constructor(e,n,r){super(getMessage(e,n,r))}}NodeError.prototype.name=s.name;NodeError.prototype.code=e;n[e]=NodeError}function oneOf(e,n){if(Array.isArray(e)){const r=e.length;e=e.map(e=>String(e));if(r>2){return`one of ${n} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]}else if(r===2){return`one of ${n} ${e[0]} or ${e[1]}`}else{return`of ${n} ${e[0]}`}}else{return`of ${n} ${String(e)}`}}function startsWith(e,n,r){return e.substr(!r||r<0?0:+r,n.length)===n}function endsWith(e,n,r){if(r===undefined||r>e.length){r=e.length}return e.substring(r-n.length,r)===n}function includes(e,n,r){if(typeof r!=="number"){r=0}if(r+n.length>e.length){return false}else{return e.indexOf(n,r)!==-1}}createErrorType("ERR_INVALID_OPT_VALUE",function(e,n){return'The value "'+n+'" is invalid for option "'+e+'"'},TypeError);createErrorType("ERR_INVALID_ARG_TYPE",function(e,n,r){let s;if(typeof n==="string"&&startsWith(n,"not ")){s="must not be";n=n.replace(/^not /,"")}else{s="must be"}let i;if(endsWith(e," argument")){i=`The ${e} ${s} ${oneOf(n,"type")}`}else{const r=includes(e,".")?"property":"argument";i=`The "${e}" ${r} ${s} ${oneOf(n,"type")}`}i+=`. Received type ${typeof r}`;return i},TypeError);createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");createErrorType("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close");createErrorType("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times");createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end");createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);createErrorType("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");e.exports.q=n},6238:(e,n,r)=>{"use strict";var s=Object.keys||function(e){var n=[];for(var r in e){n.push(r)}return n};e.exports=Duplex;var i=r(7790);var f=r(8376);r(3655)(Duplex,i);{var l=s(f.prototype);for(var t=0;t{"use strict";e.exports=PassThrough;var s=r(1784);r(3655)(PassThrough,s);function PassThrough(e){if(!(this instanceof PassThrough))return new PassThrough(e);s.call(this,e)}PassThrough.prototype._transform=function(e,n,r){r(null,e)}},7790:(e,n,r)=>{"use strict";e.exports=Readable;var s;Readable.ReadableState=ReadableState;var i=r(8614).EventEmitter;var f=function EElistenerCount(e,n){return e.listeners(n).length};var l=r(4194);var t=r(4293).Buffer;var o=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return t.from(e)}function _isUint8Array(e){return t.isBuffer(e)||e instanceof o}var c=r(1669);var a;if(c&&c.debuglog){a=c.debuglog("stream")}else{a=function debug(){}}var d=r(8994);var p=r(8608);var u=r(9971),h=u.getHighWaterMark;var v=r(5484).q,g=v.ERR_INVALID_ARG_TYPE,b=v.ERR_STREAM_PUSH_AFTER_EOF,w=v.ERR_METHOD_NOT_IMPLEMENTED,y=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;var m;var E;var S;r(3655)(Readable,l);var C=p.errorOrDestroy;var O=["error","close","destroy","pause","resume"];function prependListener(e,n,r){if(typeof e.prependListener==="function")return e.prependListener(n,r);if(!e._events||!e._events[n])e.on(n,r);else if(Array.isArray(e._events[n]))e._events[n].unshift(r);else e._events[n]=[r,e._events[n]]}function ReadableState(e,n,i){s=s||r(6238);e=e||{};if(typeof i!=="boolean")i=n instanceof s;this.objectMode=!!e.objectMode;if(i)this.objectMode=this.objectMode||!!e.readableObjectMode;this.highWaterMark=h(this,e,"readableHighWaterMark",i);this.buffer=new d;this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.resumeScheduled=false;this.paused=true;this.emitClose=e.emitClose!==false;this.autoDestroy=!!e.autoDestroy;this.destroyed=false;this.defaultEncoding=e.defaultEncoding||"utf8";this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(e.encoding){if(!m)m=r(6745).s;this.decoder=new m(e.encoding);this.encoding=e.encoding}}function Readable(e){s=s||r(6238);if(!(this instanceof Readable))return new Readable(e);var n=this instanceof s;this._readableState=new ReadableState(e,this,n);this.readable=true;if(e){if(typeof e.read==="function")this._read=e.read;if(typeof e.destroy==="function")this._destroy=e.destroy}l.call(this)}Object.defineProperty(Readable.prototype,"destroyed",{enumerable:false,get:function get(){if(this._readableState===undefined){return false}return this._readableState.destroyed},set:function set(e){if(!this._readableState){return}this._readableState.destroyed=e}});Readable.prototype.destroy=p.destroy;Readable.prototype._undestroy=p.undestroy;Readable.prototype._destroy=function(e,n){n(e)};Readable.prototype.push=function(e,n){var r=this._readableState;var s;if(!r.objectMode){if(typeof e==="string"){n=n||r.defaultEncoding;if(n!==r.encoding){e=t.from(e,n);n=""}s=true}}else{s=true}return readableAddChunk(this,e,n,false,s)};Readable.prototype.unshift=function(e){return readableAddChunk(this,e,null,true,false)};function readableAddChunk(e,n,r,s,i){a("readableAddChunk",n);var f=e._readableState;if(n===null){f.reading=false;onEofChunk(e,f)}else{var l;if(!i)l=chunkInvalid(f,n);if(l){C(e,l)}else if(f.objectMode||n&&n.length>0){if(typeof n!=="string"&&!f.objectMode&&Object.getPrototypeOf(n)!==t.prototype){n=_uint8ArrayToBuffer(n)}if(s){if(f.endEmitted)C(e,new y);else addChunk(e,f,n,true)}else if(f.ended){C(e,new b)}else if(f.destroyed){return false}else{f.reading=false;if(f.decoder&&!r){n=f.decoder.write(n);if(f.objectMode||n.length!==0)addChunk(e,f,n,false);else maybeReadMore(e,f)}else{addChunk(e,f,n,false)}}}else if(!s){f.reading=false;maybeReadMore(e,f)}}return!f.ended&&(f.length=A){e=A}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function howMuchToRead(e,n){if(e<=0||n.length===0&&n.ended)return 0;if(n.objectMode)return 1;if(e!==e){if(n.flowing&&n.length)return n.buffer.head.data.length;else return n.length}if(e>n.highWaterMark)n.highWaterMark=computeNewHighWaterMark(e);if(e<=n.length)return e;if(!n.ended){n.needReadable=true;return 0}return n.length}Readable.prototype.read=function(e){a("read",e);e=parseInt(e,10);var n=this._readableState;var r=e;if(e!==0)n.emittedReadable=false;if(e===0&&n.needReadable&&((n.highWaterMark!==0?n.length>=n.highWaterMark:n.length>0)||n.ended)){a("read: emitReadable",n.length,n.ended);if(n.length===0&&n.ended)endReadable(this);else emitReadable(this);return null}e=howMuchToRead(e,n);if(e===0&&n.ended){if(n.length===0)endReadable(this);return null}var s=n.needReadable;a("need readable",s);if(n.length===0||n.length-e0)i=fromList(e,n);else i=null;if(i===null){n.needReadable=n.length<=n.highWaterMark;e=0}else{n.length-=e;n.awaitDrain=0}if(n.length===0){if(!n.ended)n.needReadable=true;if(r!==e&&n.ended)endReadable(this)}if(i!==null)this.emit("data",i);return i};function onEofChunk(e,n){a("onEofChunk");if(n.ended)return;if(n.decoder){var r=n.decoder.end();if(r&&r.length){n.buffer.push(r);n.length+=n.objectMode?1:r.length}}n.ended=true;if(n.sync){emitReadable(e)}else{n.needReadable=false;if(!n.emittedReadable){n.emittedReadable=true;emitReadable_(e)}}}function emitReadable(e){var n=e._readableState;a("emitReadable",n.needReadable,n.emittedReadable);n.needReadable=false;if(!n.emittedReadable){a("emitReadable",n.flowing);n.emittedReadable=true;process.nextTick(emitReadable_,e)}}function emitReadable_(e){var n=e._readableState;a("emitReadable_",n.destroyed,n.length,n.ended);if(!n.destroyed&&(n.length||n.ended)){e.emit("readable");n.emittedReadable=false}n.needReadable=!n.flowing&&!n.ended&&n.length<=n.highWaterMark;flow(e)}function maybeReadMore(e,n){if(!n.readingMore){n.readingMore=true;process.nextTick(maybeReadMore_,e,n)}}function maybeReadMore_(e,n){while(!n.reading&&!n.ended&&(n.length1&&indexOf(s.pipes,e)!==-1)&&!o){a("false write response, pause",s.awaitDrain);s.awaitDrain++}r.pause()}}function onerror(n){a("onerror",n);unpipe();e.removeListener("error",onerror);if(f(e,"error")===0)C(e,n)}prependListener(e,"error",onerror);function onclose(){e.removeListener("finish",onfinish);unpipe()}e.once("close",onclose);function onfinish(){a("onfinish");e.removeListener("close",onclose);unpipe()}e.once("finish",onfinish);function unpipe(){a("unpipe");r.unpipe(e)}e.emit("pipe",r);if(!s.flowing){a("pipe resume");r.resume()}return e};function pipeOnDrain(e){return function pipeOnDrainFunctionResult(){var n=e._readableState;a("pipeOnDrain",n.awaitDrain);if(n.awaitDrain)n.awaitDrain--;if(n.awaitDrain===0&&f(e,"data")){n.flowing=true;flow(e)}}}Readable.prototype.unpipe=function(e){var n=this._readableState;var r={hasUnpiped:false};if(n.pipesCount===0)return this;if(n.pipesCount===1){if(e&&e!==n.pipes)return this;if(!e)e=n.pipes;n.pipes=null;n.pipesCount=0;n.flowing=false;if(e)e.emit("unpipe",this,r);return this}if(!e){var s=n.pipes;var i=n.pipesCount;n.pipes=null;n.pipesCount=0;n.flowing=false;for(var f=0;f0;if(s.flowing!==false)this.resume()}else if(e==="readable"){if(!s.endEmitted&&!s.readableListening){s.readableListening=s.needReadable=true;s.flowing=false;s.emittedReadable=false;a("on readable",s.length,s.reading);if(s.length){emitReadable(this)}else if(!s.reading){process.nextTick(nReadingNextTick,this)}}}return r};Readable.prototype.addListener=Readable.prototype.on;Readable.prototype.removeListener=function(e,n){var r=l.prototype.removeListener.call(this,e,n);if(e==="readable"){process.nextTick(updateReadableListening,this)}return r};Readable.prototype.removeAllListeners=function(e){var n=l.prototype.removeAllListeners.apply(this,arguments);if(e==="readable"||e===undefined){process.nextTick(updateReadableListening,this)}return n};function updateReadableListening(e){var n=e._readableState;n.readableListening=e.listenerCount("readable")>0;if(n.resumeScheduled&&!n.paused){n.flowing=true}else if(e.listenerCount("data")>0){e.resume()}}function nReadingNextTick(e){a("readable nexttick read 0");e.read(0)}Readable.prototype.resume=function(){var e=this._readableState;if(!e.flowing){a("resume");e.flowing=!e.readableListening;resume(this,e)}e.paused=false;return this};function resume(e,n){if(!n.resumeScheduled){n.resumeScheduled=true;process.nextTick(resume_,e,n)}}function resume_(e,n){a("resume",n.reading);if(!n.reading){e.read(0)}n.resumeScheduled=false;e.emit("resume");flow(e);if(n.flowing&&!n.reading)e.read(0)}Readable.prototype.pause=function(){a("call pause flowing=%j",this._readableState.flowing);if(this._readableState.flowing!==false){a("pause");this._readableState.flowing=false;this.emit("pause")}this._readableState.paused=true;return this};function flow(e){var n=e._readableState;a("flow",n.flowing);while(n.flowing&&e.read()!==null){}}Readable.prototype.wrap=function(e){var n=this;var r=this._readableState;var s=false;e.on("end",function(){a("wrapped end");if(r.decoder&&!r.ended){var e=r.decoder.end();if(e&&e.length)n.push(e)}n.push(null)});e.on("data",function(i){a("wrapped data");if(r.decoder)i=r.decoder.write(i);if(r.objectMode&&(i===null||i===undefined))return;else if(!r.objectMode&&(!i||!i.length))return;var f=n.push(i);if(!f){s=true;e.pause()}});for(var i in e){if(this[i]===undefined&&typeof e[i]==="function"){this[i]=function methodWrap(n){return function methodWrapReturnFunction(){return e[n].apply(e,arguments)}}(i)}}for(var f=0;f=n.length){if(n.decoder)r=n.buffer.join("");else if(n.buffer.length===1)r=n.buffer.first();else r=n.buffer.concat(n.length);n.buffer.clear()}else{r=n.buffer.consume(e,n.decoder)}return r}function endReadable(e){var n=e._readableState;a("endReadable",n.endEmitted);if(!n.endEmitted){n.ended=true;process.nextTick(endReadableNT,n,e)}}function endReadableNT(e,n){a("endReadableNT",e.endEmitted,e.length);if(!e.endEmitted&&e.length===0){e.endEmitted=true;n.readable=false;n.emit("end");if(e.autoDestroy){var r=n._writableState;if(!r||r.autoDestroy&&r.finished){n.destroy()}}}}if(typeof Symbol==="function"){Readable.from=function(e,n){if(S===undefined){S=r(8831)}return S(Readable,e,n)}}function indexOf(e,n){for(var r=0,s=e.length;r{"use strict";e.exports=Transform;var s=r(5484).q,i=s.ERR_METHOD_NOT_IMPLEMENTED,f=s.ERR_MULTIPLE_CALLBACK,l=s.ERR_TRANSFORM_ALREADY_TRANSFORMING,t=s.ERR_TRANSFORM_WITH_LENGTH_0;var o=r(6238);r(3655)(Transform,o);function afterTransform(e,n){var r=this._transformState;r.transforming=false;var s=r.writecb;if(s===null){return this.emit("error",new f)}r.writechunk=null;r.writecb=null;if(n!=null)this.push(n);s(e);var i=this._readableState;i.reading=false;if(i.needReadable||i.length{"use strict";e.exports=Writable;function WriteReq(e,n,r){this.chunk=e;this.encoding=n;this.callback=r;this.next=null}function CorkedRequest(e){var n=this;this.next=null;this.entry=null;this.finish=function(){onCorkedFinish(n,e)}}var s;Writable.WritableState=WritableState;var i={deprecate:r(1202)};var f=r(4194);var l=r(4293).Buffer;var t=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return l.from(e)}function _isUint8Array(e){return l.isBuffer(e)||e instanceof t}var o=r(8608);var c=r(9971),a=c.getHighWaterMark;var d=r(5484).q,p=d.ERR_INVALID_ARG_TYPE,u=d.ERR_METHOD_NOT_IMPLEMENTED,h=d.ERR_MULTIPLE_CALLBACK,v=d.ERR_STREAM_CANNOT_PIPE,g=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,y=d.ERR_UNKNOWN_ENCODING;var m=o.errorOrDestroy;r(3655)(Writable,f);function nop(){}function WritableState(e,n,i){s=s||r(6238);e=e||{};if(typeof i!=="boolean")i=n instanceof s;this.objectMode=!!e.objectMode;if(i)this.objectMode=this.objectMode||!!e.writableObjectMode;this.highWaterMark=a(this,e,"writableHighWaterMark",i);this.finalCalled=false;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;this.destroyed=false;var f=e.decodeStrings===false;this.decodeStrings=!f;this.defaultEncoding=e.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(e){onwrite(n,e)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.emitClose=e.emitClose!==false;this.autoDestroy=!!e.autoDestroy;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var e=this.bufferedRequest;var n=[];while(e){n.push(e);e=e.next}return n};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:i.deprecate(function writableStateBufferGetter(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}})();var E;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){E=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function value(e){if(E.call(this,e))return true;if(this!==Writable)return false;return e&&e._writableState instanceof WritableState}})}else{E=function realHasInstance(e){return e instanceof this}}function Writable(e){s=s||r(6238);var n=this instanceof s;if(!n&&!E.call(Writable,this))return new Writable(e);this._writableState=new WritableState(e,this,n);this.writable=true;if(e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}f.call(this)}Writable.prototype.pipe=function(){m(this,new v)};function writeAfterEnd(e,n){var r=new w;m(e,r);process.nextTick(n,r)}function validChunk(e,n,r,s){var i;if(r===null){i=new b}else if(typeof r!=="string"&&!n.objectMode){i=new p("chunk",["string","Buffer"],r)}if(i){m(e,i);process.nextTick(s,i);return false}return true}Writable.prototype.write=function(e,n,r){var s=this._writableState;var i=false;var f=!s.objectMode&&_isUint8Array(e);if(f&&!l.isBuffer(e)){e=_uint8ArrayToBuffer(e)}if(typeof n==="function"){r=n;n=null}if(f)n="buffer";else if(!n)n=s.defaultEncoding;if(typeof r!=="function")r=nop;if(s.ending)writeAfterEnd(this,r);else if(f||validChunk(this,s,e,r)){s.pendingcb++;i=writeOrBuffer(this,s,f,e,n,r)}return i};Writable.prototype.cork=function(){this._writableState.corked++};Writable.prototype.uncork=function(){var e=this._writableState;if(e.corked){e.corked--;if(!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest)clearBuffer(this,e)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(e){if(typeof e==="string")e=e.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new y(e);this._writableState.defaultEncoding=e;return this};Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:false,get:function get(){return this._writableState&&this._writableState.getBuffer()}});function decodeChunk(e,n,r){if(!e.objectMode&&e.decodeStrings!==false&&typeof n==="string"){n=l.from(n,r)}return n}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function get(){return this._writableState.highWaterMark}});function writeOrBuffer(e,n,r,s,i,f){if(!r){var l=decodeChunk(n,s,i);if(s!==l){r=true;i="buffer";s=l}}var t=n.objectMode?1:s.length;n.length+=t;var o=n.length{"use strict";var s;function _defineProperty(e,n,r){if(n in e){Object.defineProperty(e,n,{value:r,enumerable:true,configurable:true,writable:true})}else{e[n]=r}return e}var i=r(6659);var f=Symbol("lastResolve");var l=Symbol("lastReject");var t=Symbol("error");var o=Symbol("ended");var c=Symbol("lastPromise");var a=Symbol("handlePromise");var d=Symbol("stream");function createIterResult(e,n){return{value:e,done:n}}function readAndResolve(e){var n=e[f];if(n!==null){var r=e[d].read();if(r!==null){e[c]=null;e[f]=null;e[l]=null;n(createIterResult(r,false))}}}function onReadable(e){process.nextTick(readAndResolve,e)}function wrapForNext(e,n){return function(r,s){e.then(function(){if(n[o]){r(createIterResult(undefined,true));return}n[a](r,s)},s)}}var p=Object.getPrototypeOf(function(){});var u=Object.setPrototypeOf((s={get stream(){return this[d]},next:function next(){var e=this;var n=this[t];if(n!==null){return Promise.reject(n)}if(this[o]){return Promise.resolve(createIterResult(undefined,true))}if(this[d].destroyed){return new Promise(function(n,r){process.nextTick(function(){if(e[t]){r(e[t])}else{n(createIterResult(undefined,true))}})})}var r=this[c];var s;if(r){s=new Promise(wrapForNext(r,this))}else{var i=this[d].read();if(i!==null){return Promise.resolve(createIterResult(i,false))}s=new Promise(this[a])}this[c]=s;return s}},_defineProperty(s,Symbol.asyncIterator,function(){return this}),_defineProperty(s,"return",function _return(){var e=this;return new Promise(function(n,r){e[d].destroy(null,function(e){if(e){r(e);return}n(createIterResult(undefined,true))})})}),s),p);var h=function createReadableStreamAsyncIterator(e){var n;var r=Object.create(u,(n={},_defineProperty(n,d,{value:e,writable:true}),_defineProperty(n,f,{value:null,writable:true}),_defineProperty(n,l,{value:null,writable:true}),_defineProperty(n,t,{value:null,writable:true}),_defineProperty(n,o,{value:e._readableState.endEmitted,writable:true}),_defineProperty(n,a,{value:function value(e,n){var s=r[d].read();if(s){r[c]=null;r[f]=null;r[l]=null;e(createIterResult(s,false))}else{r[f]=e;r[l]=n}},writable:true}),n));r[c]=null;i(e,function(e){if(e&&e.code!=="ERR_STREAM_PREMATURE_CLOSE"){var n=r[l];if(n!==null){r[c]=null;r[f]=null;r[l]=null;n(e)}r[t]=e;return}var s=r[f];if(s!==null){r[c]=null;r[f]=null;r[l]=null;s(createIterResult(undefined,true))}r[o]=true});e.on("readable",onReadable.bind(null,r));return r};e.exports=h},8994:(e,n,r)=>{"use strict";function ownKeys(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);if(n)s=s.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable});r.push.apply(r,s)}return r}function _objectSpread(e){for(var n=1;n0)this.tail.next=n;else this.head=n;this.tail=n;++this.length}},{key:"unshift",value:function unshift(e){var n={data:e,next:this.head};if(this.length===0)this.tail=n;this.head=n;++this.length}},{key:"shift",value:function shift(){if(this.length===0)return;var e=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return e}},{key:"clear",value:function clear(){this.head=this.tail=null;this.length=0}},{key:"join",value:function join(e){if(this.length===0)return"";var n=this.head;var r=""+n.data;while(n=n.next){r+=e+n.data}return r}},{key:"concat",value:function concat(e){if(this.length===0)return i.alloc(0);var n=i.allocUnsafe(e>>>0);var r=this.head;var s=0;while(r){copyBuffer(r.data,n,s);s+=r.data.length;r=r.next}return n}},{key:"consume",value:function consume(e,n){var r;if(ei.length?i.length:e;if(f===i.length)s+=i;else s+=i.slice(0,e);e-=f;if(e===0){if(f===i.length){++r;if(n.next)this.head=n.next;else this.head=this.tail=null}else{this.head=n;n.data=i.slice(f)}break}++r}this.length-=r;return s}},{key:"_getBuffer",value:function _getBuffer(e){var n=i.allocUnsafe(e);var r=this.head;var s=1;r.data.copy(n);e-=r.data.length;while(r=r.next){var f=r.data;var l=e>f.length?f.length:e;f.copy(n,n.length-e,0,l);e-=l;if(e===0){if(l===f.length){++s;if(r.next)this.head=r.next;else this.head=this.tail=null}else{this.head=r;r.data=f.slice(l)}break}++s}this.length-=s;return n}},{key:t,value:function value(e,n){return l(this,_objectSpread({},n,{depth:0,customInspect:false}))}}]);return BufferList}()},8608:e=>{"use strict";function destroy(e,n){var r=this;var s=this._readableState&&this._readableState.destroyed;var i=this._writableState&&this._writableState.destroyed;if(s||i){if(n){n(e)}else if(e){if(!this._writableState){process.nextTick(emitErrorNT,this,e)}else if(!this._writableState.errorEmitted){this._writableState.errorEmitted=true;process.nextTick(emitErrorNT,this,e)}}return this}if(this._readableState){this._readableState.destroyed=true}if(this._writableState){this._writableState.destroyed=true}this._destroy(e||null,function(e){if(!n&&e){if(!r._writableState){process.nextTick(emitErrorAndCloseNT,r,e)}else if(!r._writableState.errorEmitted){r._writableState.errorEmitted=true;process.nextTick(emitErrorAndCloseNT,r,e)}else{process.nextTick(emitCloseNT,r)}}else if(n){process.nextTick(emitCloseNT,r);n(e)}else{process.nextTick(emitCloseNT,r)}});return this}function emitErrorAndCloseNT(e,n){emitErrorNT(e,n);emitCloseNT(e)}function emitCloseNT(e){if(e._writableState&&!e._writableState.emitClose)return;if(e._readableState&&!e._readableState.emitClose)return;e.emit("close")}function undestroy(){if(this._readableState){this._readableState.destroyed=false;this._readableState.reading=false;this._readableState.ended=false;this._readableState.endEmitted=false}if(this._writableState){this._writableState.destroyed=false;this._writableState.ended=false;this._writableState.ending=false;this._writableState.finalCalled=false;this._writableState.prefinished=false;this._writableState.finished=false;this._writableState.errorEmitted=false}}function emitErrorNT(e,n){e.emit("error",n)}function errorOrDestroy(e,n){var r=e._readableState;var s=e._writableState;if(r&&r.autoDestroy||s&&s.autoDestroy)e.destroy(n);else e.emit("error",n)}e.exports={destroy:destroy,undestroy:undestroy,errorOrDestroy:errorOrDestroy}},6659:(e,n,r)=>{"use strict";var s=r(5484).q.ERR_STREAM_PREMATURE_CLOSE;function once(e){var n=false;return function(){if(n)return;n=true;for(var r=arguments.length,s=new Array(r),i=0;i{"use strict";function asyncGeneratorStep(e,n,r,s,i,f,l){try{var t=e[f](l);var o=t.value}catch(e){r(e);return}if(t.done){n(o)}else{Promise.resolve(o).then(s,i)}}function _asyncToGenerator(e){return function(){var n=this,r=arguments;return new Promise(function(s,i){var f=e.apply(n,r);function _next(e){asyncGeneratorStep(f,s,i,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(f,s,i,_next,_throw,"throw",e)}_next(undefined)})}}function ownKeys(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);if(n)s=s.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable});r.push.apply(r,s)}return r}function _objectSpread(e){for(var n=1;n{"use strict";var s;function once(e){var n=false;return function(){if(n)return;n=true;e.apply(void 0,arguments)}}var i=r(5484).q,f=i.ERR_MISSING_ARGS,l=i.ERR_STREAM_DESTROYED;function noop(e){if(e)throw e}function isRequest(e){return e.setHeader&&typeof e.abort==="function"}function destroyer(e,n,i,f){f=once(f);var t=false;e.on("close",function(){t=true});if(s===undefined)s=r(6659);s(e,{readable:n,writable:i},function(e){if(e)return f(e);t=true;f()});var o=false;return function(n){if(t)return;if(o)return;o=true;if(isRequest(e))return e.abort();if(typeof e.destroy==="function")return e.destroy();f(n||new l("pipe"))}}function call(e){e()}function pipe(e,n){return e.pipe(n)}function popCallback(e){if(!e.length)return noop;if(typeof e[e.length-1]!=="function")return noop;return e.pop()}function pipeline(){for(var e=arguments.length,n=new Array(e),r=0;r0;return destroyer(e,f,t,function(e){if(!i)i=e;if(e)l.forEach(call);if(f)return;l.forEach(call);s(i)})});return n.reduce(pipe)}e.exports=pipeline},9971:(e,n,r)=>{"use strict";var s=r(5484).q.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(e,n,r){return e.highWaterMark!=null?e.highWaterMark:n?e[r]:null}function getHighWaterMark(e,n,r,i){var f=highWaterMarkFrom(n,i,r);if(f!=null){if(!(isFinite(f)&&Math.floor(f)===f)||f<0){var l=i?r:"highWaterMark";throw new s(l,f)}return Math.floor(f)}return e.objectMode?16:16*1024}e.exports={getHighWaterMark:getHighWaterMark}},4194:(e,n,r)=>{e.exports=r(2413)},3739:(e,n,r)=>{var s=r(2413);if(process.env.READABLE_STREAM==="disable"&&s){e.exports=s.Readable;Object.assign(e.exports,s);e.exports.Stream=s}else{n=e.exports=r(7790);n.Stream=s||n;n.Readable=n;n.Writable=r(8376);n.Duplex=r(6238);n.Transform=r(1784);n.PassThrough=r(1650);n.finished=r(6659);n.pipeline=r(7751)}},8414:(e,n,r)=>{var s=r(4293);var i=s.Buffer;function copyProps(e,n){for(var r in e){n[r]=e[r]}}if(i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow){e.exports=s}else{copyProps(s,n);n.Buffer=SafeBuffer}function SafeBuffer(e,n,r){return i(e,n,r)}SafeBuffer.prototype=Object.create(i.prototype);copyProps(i,SafeBuffer);SafeBuffer.from=function(e,n,r){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return i(e,n,r)};SafeBuffer.alloc=function(e,n,r){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var s=i(e);if(n!==undefined){if(typeof r==="string"){s.fill(n,r)}else{s.fill(n)}}else{s.fill(0)}return s};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return i(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return s.SlowBuffer(e)}},2313:(e,n,r)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});const s=r(7008);const i=4096;const f="utf8";class SmartBuffer{constructor(e){this.length=0;this._encoding=f;this._writeOffset=0;this._readOffset=0;if(SmartBuffer.isSmartBufferOptions(e)){if(e.encoding){s.checkEncoding(e.encoding);this._encoding=e.encoding}if(e.size){if(s.isFiniteInteger(e.size)&&e.size>0){this._buff=Buffer.allocUnsafe(e.size)}else{throw new Error(s.ERRORS.INVALID_SMARTBUFFER_SIZE)}}else if(e.buff){if(Buffer.isBuffer(e.buff)){this._buff=e.buff;this.length=e.buff.length}else{throw new Error(s.ERRORS.INVALID_SMARTBUFFER_BUFFER)}}else{this._buff=Buffer.allocUnsafe(i)}}else{if(typeof e!=="undefined"){throw new Error(s.ERRORS.INVALID_SMARTBUFFER_OBJECT)}this._buff=Buffer.allocUnsafe(i)}}static fromSize(e,n){return new this({size:e,encoding:n})}static fromBuffer(e,n){return new this({buff:e,encoding:n})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){const n=e;return n&&(n.encoding!==undefined||n.size!==undefined||n.buff!==undefined)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffer.prototype.readInt32BE,4,e)}readInt32LE(e){return this._readNumberValue(Buffer.prototype.readInt32LE,4,e)}readBigInt64BE(e){s.bigIntAndBufferInt64Check("readBigInt64BE");return this._readNumberValue(Buffer.prototype.readBigInt64BE,8,e)}readBigInt64LE(e){s.bigIntAndBufferInt64Check("readBigInt64LE");return this._readNumberValue(Buffer.prototype.readBigInt64LE,8,e)}writeInt8(e,n){this._writeNumberValue(Buffer.prototype.writeInt8,1,e,n);return this}insertInt8(e,n){return this._insertNumberValue(Buffer.prototype.writeInt8,1,e,n)}writeInt16BE(e,n){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,e,n)}insertInt16BE(e,n){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,e,n)}writeInt16LE(e,n){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,e,n)}insertInt16LE(e,n){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,e,n)}writeInt32BE(e,n){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,e,n)}insertInt32BE(e,n){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,e,n)}writeInt32LE(e,n){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,e,n)}insertInt32LE(e,n){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,e,n)}writeBigInt64BE(e,n){s.bigIntAndBufferInt64Check("writeBigInt64BE");return this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,e,n)}insertBigInt64BE(e,n){s.bigIntAndBufferInt64Check("writeBigInt64BE");return this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,e,n)}writeBigInt64LE(e,n){s.bigIntAndBufferInt64Check("writeBigInt64LE");return this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,e,n)}insertBigInt64LE(e,n){s.bigIntAndBufferInt64Check("writeBigInt64LE");return this._insertNumberValue(Buffer.prototype.writeBigInt64LE,8,e,n)}readUInt8(e){return this._readNumberValue(Buffer.prototype.readUInt8,1,e)}readUInt16BE(e){return this._readNumberValue(Buffer.prototype.readUInt16BE,2,e)}readUInt16LE(e){return this._readNumberValue(Buffer.prototype.readUInt16LE,2,e)}readUInt32BE(e){return this._readNumberValue(Buffer.prototype.readUInt32BE,4,e)}readUInt32LE(e){return this._readNumberValue(Buffer.prototype.readUInt32LE,4,e)}readBigUInt64BE(e){s.bigIntAndBufferInt64Check("readBigUInt64BE");return this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,e)}readBigUInt64LE(e){s.bigIntAndBufferInt64Check("readBigUInt64LE");return this._readNumberValue(Buffer.prototype.readBigUInt64LE,8,e)}writeUInt8(e,n){return this._writeNumberValue(Buffer.prototype.writeUInt8,1,e,n)}insertUInt8(e,n){return this._insertNumberValue(Buffer.prototype.writeUInt8,1,e,n)}writeUInt16BE(e,n){return this._writeNumberValue(Buffer.prototype.writeUInt16BE,2,e,n)}insertUInt16BE(e,n){return this._insertNumberValue(Buffer.prototype.writeUInt16BE,2,e,n)}writeUInt16LE(e,n){return this._writeNumberValue(Buffer.prototype.writeUInt16LE,2,e,n)}insertUInt16LE(e,n){return this._insertNumberValue(Buffer.prototype.writeUInt16LE,2,e,n)}writeUInt32BE(e,n){return this._writeNumberValue(Buffer.prototype.writeUInt32BE,4,e,n)}insertUInt32BE(e,n){return this._insertNumberValue(Buffer.prototype.writeUInt32BE,4,e,n)}writeUInt32LE(e,n){return this._writeNumberValue(Buffer.prototype.writeUInt32LE,4,e,n)}insertUInt32LE(e,n){return this._insertNumberValue(Buffer.prototype.writeUInt32LE,4,e,n)}writeBigUInt64BE(e,n){s.bigIntAndBufferInt64Check("writeBigUInt64BE");return this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,n)}insertBigUInt64BE(e,n){s.bigIntAndBufferInt64Check("writeBigUInt64BE");return this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,n)}writeBigUInt64LE(e,n){s.bigIntAndBufferInt64Check("writeBigUInt64LE");return this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,n)}insertBigUInt64LE(e,n){s.bigIntAndBufferInt64Check("writeBigUInt64LE");return this._insertNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,n)}readFloatBE(e){return this._readNumberValue(Buffer.prototype.readFloatBE,4,e)}readFloatLE(e){return this._readNumberValue(Buffer.prototype.readFloatLE,4,e)}writeFloatBE(e,n){return this._writeNumberValue(Buffer.prototype.writeFloatBE,4,e,n)}insertFloatBE(e,n){return this._insertNumberValue(Buffer.prototype.writeFloatBE,4,e,n)}writeFloatLE(e,n){return this._writeNumberValue(Buffer.prototype.writeFloatLE,4,e,n)}insertFloatLE(e,n){return this._insertNumberValue(Buffer.prototype.writeFloatLE,4,e,n)}readDoubleBE(e){return this._readNumberValue(Buffer.prototype.readDoubleBE,8,e)}readDoubleLE(e){return this._readNumberValue(Buffer.prototype.readDoubleLE,8,e)}writeDoubleBE(e,n){return this._writeNumberValue(Buffer.prototype.writeDoubleBE,8,e,n)}insertDoubleBE(e,n){return this._insertNumberValue(Buffer.prototype.writeDoubleBE,8,e,n)}writeDoubleLE(e,n){return this._writeNumberValue(Buffer.prototype.writeDoubleLE,8,e,n)}insertDoubleLE(e,n){return this._insertNumberValue(Buffer.prototype.writeDoubleLE,8,e,n)}readString(e,n){let r;if(typeof e==="number"){s.checkLengthValue(e);r=Math.min(e,this.length-this._readOffset)}else{n=e;r=this.length-this._readOffset}if(typeof n!=="undefined"){s.checkEncoding(n)}const i=this._buff.slice(this._readOffset,this._readOffset+r).toString(n||this._encoding);this._readOffset+=r;return i}insertString(e,n,r){s.checkOffsetValue(n);return this._handleString(e,true,n,r)}writeString(e,n,r){return this._handleString(e,false,n,r)}readStringNT(e){if(typeof e!=="undefined"){s.checkEncoding(e)}let n=this.length;for(let e=this._readOffset;ethis.length){throw new Error(s.ERRORS.INVALID_READ_BEYOND_BOUNDS)}}ensureInsertable(e,n){s.checkOffsetValue(n);this._ensureCapacity(this.length+e);if(nthis.length){this.length=n+e}else{this.length+=e}}_ensureWriteable(e,n){const r=typeof n==="number"?n:this._writeOffset;this._ensureCapacity(r+e);if(r+e>this.length){this.length=r+e}}_ensureCapacity(e){const n=this._buff.length;if(e>n){let r=this._buff;let s=n*3/2+1;if(s{"use strict";Object.defineProperty(n,"__esModule",{value:true});const s=r(4293);const i={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};n.ERRORS=i;function checkEncoding(e){if(!s.Buffer.isEncoding(e)){throw new Error(i.INVALID_ENCODING)}}n.checkEncoding=checkEncoding;function isFiniteInteger(e){return typeof e==="number"&&isFinite(e)&&isInteger(e)}n.isFiniteInteger=isFiniteInteger;function checkOffsetOrLengthValue(e,n){if(typeof e==="number"){if(!isFiniteInteger(e)||e<0){throw new Error(n?i.INVALID_OFFSET:i.INVALID_LENGTH)}}else{throw new Error(n?i.INVALID_OFFSET_NON_NUMBER:i.INVALID_LENGTH_NON_NUMBER)}}function checkLengthValue(e){checkOffsetOrLengthValue(e,false)}n.checkLengthValue=checkLengthValue;function checkOffsetValue(e){checkOffsetOrLengthValue(e,true)}n.checkOffsetValue=checkOffsetValue;function checkTargetOffset(e,n){if(e<0||e>n.length){throw new Error(i.INVALID_TARGET_OFFSET)}}n.checkTargetOffset=checkTargetOffset;function isInteger(e){return typeof e==="number"&&isFinite(e)&&Math.floor(e)===e}function bigIntAndBufferInt64Check(e){if(typeof BigInt==="undefined"){throw new Error("Platform does not support JS BigInt type.")}if(typeof s.Buffer.prototype[e]==="undefined"){throw new Error(`Platform does not support Buffer.prototype.${e}.`)}}n.bigIntAndBufferInt64Check=bigIntAndBufferInt64Check},2019:function(e,n,r){"use strict";var s=this&&this.__awaiter||function(e,n,r,s){function adopt(e){return e instanceof r?e:new r(function(n){n(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,n||[])).next())})};var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});const f=i(r(881));const l=i(r(4016));const t=i(r(8835));const o=i(r(6782));const c=r(44);const a=r(8128);const d=o.default("socks-proxy-agent");function dnsLookup(e){return new Promise((n,r)=>{f.default.lookup(e,(e,s)=>{if(e){r(e)}else{n(s)}})})}function parseSocksProxy(e){let n=0;let r=false;let s=5;const i=e.hostname||e.host;if(!i){throw new TypeError('No "host"')}if(typeof e.port==="number"){n=e.port}else if(typeof e.port==="string"){n=parseInt(e.port,10)}if(!n){n=1080}if(e.protocol){switch(e.protocol.replace(":","")){case"socks4":r=true;case"socks4a":s=4;break;case"socks5":r=true;case"socks":case"socks5h":s=5;break;default:throw new TypeError(`A "socks" protocol must be specified! Got: ${e.protocol}`)}}if(typeof e.type!=="undefined"){if(e.type===4||e.type===5){s=e.type}else{throw new TypeError(`"type" must be 4 or 5, got: ${e.type}`)}}const f={host:i,port:n,type:s};let l=e.userId||e.username;let t=e.password;if(e.auth){const n=e.auth.split(":");l=n[0];t=n[1]}if(l){Object.defineProperty(f,"userId",{value:l,enumerable:false})}if(t){Object.defineProperty(f,"password",{value:t,enumerable:false})}return{lookup:r,proxy:f}}class SocksProxyAgent extends c.Agent{constructor(e){let n;if(typeof e==="string"){n=t.default.parse(e)}else{n=e}if(!n){throw new TypeError("a SOCKS proxy server `host` and `port` must be specified!")}super(n);const r=parseSocksProxy(n);this.lookup=r.lookup;this.proxy=r.proxy;this.tlsConnectionOptions=n.tls||{}}callback(e,n){return s(this,void 0,void 0,function*(){const{lookup:e,proxy:r}=this;let{host:s,port:i,timeout:f}=n;if(!s){throw new Error("No `host` defined!")}if(e){s=yield dnsLookup(s)}const t={proxy:r,destination:{host:s,port:i},command:"connect",timeout:f};d("Creating socks proxy connection: %o",t);const{socket:o}=yield a.SocksClient.createConnection(t);d("Successfully created socks proxy connection");if(n.secureEndpoint){d("Upgrading socket connection to TLS");const e=n.servername||n.host;return l.default.connect(Object.assign(Object.assign(Object.assign({},omit(n,"host","hostname","path","port")),{socket:o,servername:e}),this.tlsConnectionOptions))}return o})}}n.default=SocksProxyAgent;function omit(e,...n){const r={};let s;for(s in e){if(!n.includes(s)){r[s]=e[s]}}return r}},7039:function(e,n,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const i=s(r(2019));function createSocksProxyAgent(e){return new i.default(e)}(function(e){e.SocksProxyAgent=i.default;e.prototype=i.default.prototype})(createSocksProxyAgent||(createSocksProxyAgent={}));e.exports=createSocksProxyAgent},8821:function(e,n,r){"use strict";var s=this&&this.__awaiter||function(e,n,r,s){function adopt(e){return e instanceof r?e:new r(function(n){n(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(s.next(e))}catch(e){i(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,n||[])).next())})};Object.defineProperty(n,"__esModule",{value:true});n.SocksClientError=n.SocksClient=void 0;const i=r(8614);const f=r(1631);const l=r(5316);const t=r(2313);const o=r(8105);const c=r(6113);const a=r(8888);const d=r(2864);Object.defineProperty(n,"SocksClientError",{enumerable:true,get:function(){return d.SocksClientError}});class SocksClient extends i.EventEmitter{constructor(e){super();this.options=Object.assign({},e);(0,c.validateSocksClientOptions)(e);this.setState(o.SocksClientState.Created)}static createConnection(e,n){return new Promise((r,s)=>{try{(0,c.validateSocksClientOptions)(e,["connect"])}catch(e){if(typeof n==="function"){n(e);return r(e)}else{return s(e)}}const i=new SocksClient(e);i.connect(e.existing_socket);i.once("established",e=>{i.removeAllListeners();if(typeof n==="function"){n(null,e);r(e)}else{r(e)}});i.once("error",e=>{i.removeAllListeners();if(typeof n==="function"){n(e);r(e)}else{s(e)}})})}static createConnectionChain(e,n){return new Promise((r,i)=>s(this,void 0,void 0,function*(){try{(0,c.validateSocksClientChainOptions)(e)}catch(e){if(typeof n==="function"){n(e);return r(e)}else{return i(e)}}let s;if(e.randomizeChain){(0,d.shuffleArray)(e.proxies)}try{for(let n=0;nthis.onDataReceivedHandler(e));this.onClose=(()=>this.onCloseHandler());this.onError=(e=>this.onErrorHandler(e));this.onConnect=(()=>this.onConnectHandler());const n=setTimeout(()=>this.onEstablishedTimeout(),this.options.timeout||o.DEFAULT_TIMEOUT);if(n.unref&&typeof n.unref==="function"){n.unref()}if(e){this.socket=e}else{this.socket=new f.Socket}this.socket.once("close",this.onClose);this.socket.once("error",this.onError);this.socket.once("connect",this.onConnect);this.socket.on("data",this.onDataReceived);this.setState(o.SocksClientState.Connecting);this.receiveBuffer=new a.ReceiveBuffer;if(e){this.socket.emit("connect")}else{this.socket.connect(this.getSocketOptions());if(this.options.set_tcp_nodelay!==undefined&&this.options.set_tcp_nodelay!==null){this.socket.setNoDelay(!!this.options.set_tcp_nodelay)}}this.prependOnceListener("established",e=>{setImmediate(()=>{if(this.receiveBuffer.length>0){const n=this.receiveBuffer.get(this.receiveBuffer.length);e.socket.emit("data",n)}e.socket.resume()})})}getSocketOptions(){return Object.assign(Object.assign({},this.options.socket_options),{host:this.options.proxy.host||this.options.proxy.ipaddress,port:this.options.proxy.port})}onEstablishedTimeout(){if(this.state!==o.SocksClientState.Established&&this.state!==o.SocksClientState.BoundWaitingForConnection){this.closeSocket(o.ERRORS.ProxyConnectionTimedOut)}}onConnectHandler(){this.setState(o.SocksClientState.Connected);if(this.options.proxy.type===4){this.sendSocks4InitialHandshake()}else{this.sendSocks5InitialHandshake()}this.setState(o.SocksClientState.SentInitialHandshake)}onDataReceivedHandler(e){this.receiveBuffer.append(e);this.processData()}processData(){while(this.state!==o.SocksClientState.Established&&this.state!==o.SocksClientState.Error&&this.receiveBuffer.length>=this.nextRequiredPacketBufferSize){if(this.state===o.SocksClientState.SentInitialHandshake){if(this.options.proxy.type===4){this.handleSocks4FinalHandshakeResponse()}else{this.handleInitialSocks5HandshakeResponse()}}else if(this.state===o.SocksClientState.SentAuthentication){this.handleInitialSocks5AuthenticationHandshakeResponse()}else if(this.state===o.SocksClientState.SentFinalHandshake){this.handleSocks5FinalHandshakeResponse()}else if(this.state===o.SocksClientState.BoundWaitingForConnection){if(this.options.proxy.type===4){this.handleSocks4IncomingConnectionResponse()}else{this.handleSocks5IncomingConnectionResponse()}}else{this.closeSocket(o.ERRORS.InternalError);break}}}onCloseHandler(){this.closeSocket(o.ERRORS.SocketClosed)}onErrorHandler(e){this.closeSocket(e.message)}removeInternalSocketHandlers(){this.socket.pause();this.socket.removeListener("data",this.onDataReceived);this.socket.removeListener("close",this.onClose);this.socket.removeListener("error",this.onError);this.socket.removeListener("connect",this.onConnect)}closeSocket(e){if(this.state!==o.SocksClientState.Error){this.setState(o.SocksClientState.Error);this.socket.destroy();this.removeInternalSocketHandlers();this.emit("error",new d.SocksClientError(e,this.options))}}sendSocks4InitialHandshake(){const e=this.options.proxy.userId||"";const n=new t.SmartBuffer;n.writeUInt8(4);n.writeUInt8(o.SocksCommand[this.options.command]);n.writeUInt16BE(this.options.destination.port);if(f.isIPv4(this.options.destination.host)){n.writeBuffer(l.toBuffer(this.options.destination.host));n.writeStringNT(e)}else{n.writeUInt8(0);n.writeUInt8(0);n.writeUInt8(0);n.writeUInt8(1);n.writeStringNT(e);n.writeStringNT(this.options.destination.host)}this.nextRequiredPacketBufferSize=o.SOCKS_INCOMING_PACKET_SIZES.Socks4Response;this.socket.write(n.toBuffer())}handleSocks4FinalHandshakeResponse(){const e=this.receiveBuffer.get(8);if(e[1]!==o.Socks4Response.Granted){this.closeSocket(`${o.ERRORS.Socks4ProxyRejectedConnection} - (${o.Socks4Response[e[1]]})`)}else{if(o.SocksCommand[this.options.command]===o.SocksCommand.bind){const n=t.SmartBuffer.fromBuffer(e);n.readOffset=2;const r={port:n.readUInt16BE(),host:l.fromLong(n.readUInt32BE())};if(r.host==="0.0.0.0"){r.host=this.options.proxy.ipaddress}this.setState(o.SocksClientState.BoundWaitingForConnection);this.emit("bound",{remoteHost:r,socket:this.socket})}else{this.setState(o.SocksClientState.Established);this.removeInternalSocketHandlers();this.emit("established",{socket:this.socket})}}}handleSocks4IncomingConnectionResponse(){const e=this.receiveBuffer.get(8);if(e[1]!==o.Socks4Response.Granted){this.closeSocket(`${o.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${o.Socks4Response[e[1]]})`)}else{const n=t.SmartBuffer.fromBuffer(e);n.readOffset=2;const r={port:n.readUInt16BE(),host:l.fromLong(n.readUInt32BE())};this.setState(o.SocksClientState.Established);this.removeInternalSocketHandlers();this.emit("established",{remoteHost:r,socket:this.socket})}}sendSocks5InitialHandshake(){const e=new t.SmartBuffer;const n=[o.Socks5Auth.NoAuth];if(this.options.proxy.userId||this.options.proxy.password){n.push(o.Socks5Auth.UserPass)}if(this.options.proxy.custom_auth_method!==undefined){n.push(this.options.proxy.custom_auth_method)}e.writeUInt8(5);e.writeUInt8(n.length);for(const r of n){e.writeUInt8(r)}this.nextRequiredPacketBufferSize=o.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse;this.socket.write(e.toBuffer());this.setState(o.SocksClientState.SentInitialHandshake)}handleInitialSocks5HandshakeResponse(){const e=this.receiveBuffer.get(2);if(e[0]!==5){this.closeSocket(o.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion)}else if(e[1]===o.SOCKS5_NO_ACCEPTABLE_AUTH){this.closeSocket(o.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType)}else{if(e[1]===o.Socks5Auth.NoAuth){this.socks5ChosenAuthType=o.Socks5Auth.NoAuth;this.sendSocks5CommandRequest()}else if(e[1]===o.Socks5Auth.UserPass){this.socks5ChosenAuthType=o.Socks5Auth.UserPass;this.sendSocks5UserPassAuthentication()}else if(e[1]===this.options.proxy.custom_auth_method){this.socks5ChosenAuthType=this.options.proxy.custom_auth_method;this.sendSocks5CustomAuthentication()}else{this.closeSocket(o.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType)}}}sendSocks5UserPassAuthentication(){const e=this.options.proxy.userId||"";const n=this.options.proxy.password||"";const r=new t.SmartBuffer;r.writeUInt8(1);r.writeUInt8(Buffer.byteLength(e));r.writeString(e);r.writeUInt8(Buffer.byteLength(n));r.writeString(n);this.nextRequiredPacketBufferSize=o.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse;this.socket.write(r.toBuffer());this.setState(o.SocksClientState.SentAuthentication)}sendSocks5CustomAuthentication(){return s(this,void 0,void 0,function*(){this.nextRequiredPacketBufferSize=this.options.proxy.custom_auth_response_size;this.socket.write(yield this.options.proxy.custom_auth_request_handler());this.setState(o.SocksClientState.SentAuthentication)})}handleSocks5CustomAuthHandshakeResponse(e){return s(this,void 0,void 0,function*(){return yield this.options.proxy.custom_auth_response_handler(e)})}handleSocks5AuthenticationNoAuthHandshakeResponse(e){return s(this,void 0,void 0,function*(){return e[1]===0})}handleSocks5AuthenticationUserPassHandshakeResponse(e){return s(this,void 0,void 0,function*(){return e[1]===0})}handleInitialSocks5AuthenticationHandshakeResponse(){return s(this,void 0,void 0,function*(){this.setState(o.SocksClientState.ReceivedAuthenticationResponse);let e=false;if(this.socks5ChosenAuthType===o.Socks5Auth.NoAuth){e=yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2))}else if(this.socks5ChosenAuthType===o.Socks5Auth.UserPass){e=yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2))}else if(this.socks5ChosenAuthType===this.options.proxy.custom_auth_method){e=yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size))}if(!e){this.closeSocket(o.ERRORS.Socks5AuthenticationFailed)}else{this.sendSocks5CommandRequest()}})}sendSocks5CommandRequest(){const e=new t.SmartBuffer;e.writeUInt8(5);e.writeUInt8(o.SocksCommand[this.options.command]);e.writeUInt8(0);if(f.isIPv4(this.options.destination.host)){e.writeUInt8(o.Socks5HostType.IPv4);e.writeBuffer(l.toBuffer(this.options.destination.host))}else if(f.isIPv6(this.options.destination.host)){e.writeUInt8(o.Socks5HostType.IPv6);e.writeBuffer(l.toBuffer(this.options.destination.host))}else{e.writeUInt8(o.Socks5HostType.Hostname);e.writeUInt8(this.options.destination.host.length);e.writeString(this.options.destination.host)}e.writeUInt16BE(this.options.destination.port);this.nextRequiredPacketBufferSize=o.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader;this.socket.write(e.toBuffer());this.setState(o.SocksClientState.SentFinalHandshake)}handleSocks5FinalHandshakeResponse(){const e=this.receiveBuffer.peek(5);if(e[0]!==5||e[1]!==o.Socks5Response.Granted){this.closeSocket(`${o.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${o.Socks5Response[e[1]]}`)}else{const n=e[3];let r;let s;if(n===o.Socks5HostType.IPv4){const e=o.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.SOCKS5_NO_ACCEPTABLE_AUTH=n.SOCKS5_CUSTOM_AUTH_END=n.SOCKS5_CUSTOM_AUTH_START=n.SOCKS_INCOMING_PACKET_SIZES=n.SocksClientState=n.Socks5Response=n.Socks5HostType=n.Socks5Auth=n.Socks4Response=n.SocksCommand=n.ERRORS=n.DEFAULT_TIMEOUT=void 0;const r=3e4;n.DEFAULT_TIMEOUT=r;const s={InvalidSocksCommand:"An invalid SOCKS command was provided. Valid options are connect, bind, and associate.",InvalidSocksCommandForOperation:"An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.",InvalidSocksCommandChain:"An invalid SOCKS command was provided. Chaining currently only supports the connect command.",InvalidSocksClientOptionsDestination:"An invalid destination host was provided.",InvalidSocksClientOptionsExistingSocket:"An invalid existing socket was provided. This should be an instance of stream.Duplex.",InvalidSocksClientOptionsProxy:"Invalid SOCKS proxy details were provided.",InvalidSocksClientOptionsTimeout:"An invalid timeout value was provided. Please enter a value above 0 (in ms).",InvalidSocksClientOptionsProxiesLength:"At least two socks proxies must be provided for chaining.",InvalidSocksClientOptionsCustomAuthRange:"Custom auth must be a value between 0x80 and 0xFE.",InvalidSocksClientOptionsCustomAuthOptions:"When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.",NegotiationError:"Negotiation error",SocketClosed:"Socket closed",ProxyConnectionTimedOut:"Proxy connection timed out",InternalError:"SocksClient internal error (this should not happen)",InvalidSocks4HandshakeResponse:"Received invalid Socks4 handshake response",Socks4ProxyRejectedConnection:"Socks4 Proxy rejected connection",InvalidSocks4IncomingConnectionResponse:"Socks4 invalid incoming connection response",Socks4ProxyRejectedIncomingBoundConnection:"Socks4 Proxy rejected incoming bound connection",InvalidSocks5InitialHandshakeResponse:"Received invalid Socks5 initial handshake response",InvalidSocks5IntiailHandshakeSocksVersion:"Received invalid Socks5 initial handshake (invalid socks version)",InvalidSocks5InitialHandshakeNoAcceptedAuthType:"Received invalid Socks5 initial handshake (no accepted authentication type)",InvalidSocks5InitialHandshakeUnknownAuthType:"Received invalid Socks5 initial handshake (unknown authentication type)",Socks5AuthenticationFailed:"Socks5 Authentication failed",InvalidSocks5FinalHandshake:"Received invalid Socks5 final handshake response",InvalidSocks5FinalHandshakeRejected:"Socks5 proxy rejected connection",InvalidSocks5IncomingConnectionResponse:"Received invalid Socks5 incoming connection response",Socks5ProxyRejectedIncomingBoundConnection:"Socks5 Proxy rejected incoming bound connection"};n.ERRORS=s;const i={Socks5InitialHandshakeResponse:2,Socks5UserPassAuthenticationResponse:2,Socks5ResponseHeader:5,Socks5ResponseIPv4:10,Socks5ResponseIPv6:22,Socks5ResponseHostname:e=>e+7,Socks4Response:8};n.SOCKS_INCOMING_PACKET_SIZES=i;var f;(function(e){e[e["connect"]=1]="connect";e[e["bind"]=2]="bind";e[e["associate"]=3]="associate"})(f||(f={}));n.SocksCommand=f;var l;(function(e){e[e["Granted"]=90]="Granted";e[e["Failed"]=91]="Failed";e[e["Rejected"]=92]="Rejected";e[e["RejectedIdent"]=93]="RejectedIdent"})(l||(l={}));n.Socks4Response=l;var t;(function(e){e[e["NoAuth"]=0]="NoAuth";e[e["GSSApi"]=1]="GSSApi";e[e["UserPass"]=2]="UserPass"})(t||(t={}));n.Socks5Auth=t;const o=128;n.SOCKS5_CUSTOM_AUTH_START=o;const c=254;n.SOCKS5_CUSTOM_AUTH_END=c;const a=255;n.SOCKS5_NO_ACCEPTABLE_AUTH=a;var d;(function(e){e[e["Granted"]=0]="Granted";e[e["Failure"]=1]="Failure";e[e["NotAllowed"]=2]="NotAllowed";e[e["NetworkUnreachable"]=3]="NetworkUnreachable";e[e["HostUnreachable"]=4]="HostUnreachable";e[e["ConnectionRefused"]=5]="ConnectionRefused";e[e["TTLExpired"]=6]="TTLExpired";e[e["CommandNotSupported"]=7]="CommandNotSupported";e[e["AddressNotSupported"]=8]="AddressNotSupported"})(d||(d={}));n.Socks5Response=d;var p;(function(e){e[e["IPv4"]=1]="IPv4";e[e["Hostname"]=3]="Hostname";e[e["IPv6"]=4]="IPv6"})(p||(p={}));n.Socks5HostType=p;var u;(function(e){e[e["Created"]=0]="Created";e[e["Connecting"]=1]="Connecting";e[e["Connected"]=2]="Connected";e[e["SentInitialHandshake"]=3]="SentInitialHandshake";e[e["ReceivedInitialHandshakeResponse"]=4]="ReceivedInitialHandshakeResponse";e[e["SentAuthentication"]=5]="SentAuthentication";e[e["ReceivedAuthenticationResponse"]=6]="ReceivedAuthenticationResponse";e[e["SentFinalHandshake"]=7]="SentFinalHandshake";e[e["ReceivedFinalResponse"]=8]="ReceivedFinalResponse";e[e["BoundWaitingForConnection"]=9]="BoundWaitingForConnection";e[e["Established"]=10]="Established";e[e["Disconnected"]=11]="Disconnected";e[e["Error"]=99]="Error"})(u||(u={}));n.SocksClientState=u},6113:(e,n,r)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.validateSocksClientChainOptions=n.validateSocksClientOptions=void 0;const s=r(2864);const i=r(8105);const f=r(2413);function validateSocksClientOptions(e,n=["connect","bind","associate"]){if(!i.SocksCommand[e.command]){throw new s.SocksClientError(i.ERRORS.InvalidSocksCommand,e)}if(n.indexOf(e.command)===-1){throw new s.SocksClientError(i.ERRORS.InvalidSocksCommandForOperation,e)}if(!isValidSocksRemoteHost(e.destination)){throw new s.SocksClientError(i.ERRORS.InvalidSocksClientOptionsDestination,e)}if(!isValidSocksProxy(e.proxy)){throw new s.SocksClientError(i.ERRORS.InvalidSocksClientOptionsProxy,e)}validateCustomProxyAuth(e.proxy,e);if(e.timeout&&!isValidTimeoutValue(e.timeout)){throw new s.SocksClientError(i.ERRORS.InvalidSocksClientOptionsTimeout,e)}if(e.existing_socket&&!(e.existing_socket instanceof f.Duplex)){throw new s.SocksClientError(i.ERRORS.InvalidSocksClientOptionsExistingSocket,e)}}n.validateSocksClientOptions=validateSocksClientOptions;function validateSocksClientChainOptions(e){if(e.command!=="connect"){throw new s.SocksClientError(i.ERRORS.InvalidSocksCommandChain,e)}if(!isValidSocksRemoteHost(e.destination)){throw new s.SocksClientError(i.ERRORS.InvalidSocksClientOptionsDestination,e)}if(!(e.proxies&&Array.isArray(e.proxies)&&e.proxies.length>=2)){throw new s.SocksClientError(i.ERRORS.InvalidSocksClientOptionsProxiesLength,e)}e.proxies.forEach(n=>{if(!isValidSocksProxy(n)){throw new s.SocksClientError(i.ERRORS.InvalidSocksClientOptionsProxy,e)}validateCustomProxyAuth(n,e)});if(e.timeout&&!isValidTimeoutValue(e.timeout)){throw new s.SocksClientError(i.ERRORS.InvalidSocksClientOptionsTimeout,e)}}n.validateSocksClientChainOptions=validateSocksClientChainOptions;function validateCustomProxyAuth(e,n){if(e.custom_auth_method!==undefined){if(e.custom_auth_methodi.SOCKS5_CUSTOM_AUTH_END){throw new s.SocksClientError(i.ERRORS.InvalidSocksClientOptionsCustomAuthRange,n)}if(e.custom_auth_request_handler===undefined||typeof e.custom_auth_request_handler!=="function"){throw new s.SocksClientError(i.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,n)}if(e.custom_auth_response_size===undefined){throw new s.SocksClientError(i.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,n)}if(e.custom_auth_response_handler===undefined||typeof e.custom_auth_response_handler!=="function"){throw new s.SocksClientError(i.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,n)}}}function isValidSocksRemoteHost(e){return e&&typeof e.host==="string"&&typeof e.port==="number"&&e.port>=0&&e.port<=65535}function isValidSocksProxy(e){return e&&(typeof e.host==="string"||typeof e.ipaddress==="string")&&typeof e.port==="number"&&e.port>=0&&e.port<=65535&&(e.type===4||e.type===5)}function isValidTimeoutValue(e){return typeof e==="number"&&e>0}},8888:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.ReceiveBuffer=void 0;class ReceiveBuffer{constructor(e=4096){this.buffer=Buffer.allocUnsafe(e);this.offset=0;this.originalSize=e}get length(){return this.offset}append(e){if(!Buffer.isBuffer(e)){throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.")}if(this.offset+e.length>=this.buffer.length){const n=this.buffer;this.buffer=Buffer.allocUnsafe(Math.max(this.buffer.length+this.originalSize,this.buffer.length+e.length));n.copy(this.buffer)}e.copy(this.buffer,this.offset);return this.offset+=e.length}peek(e){if(e>this.offset){throw new Error("Attempted to read beyond the bounds of the managed internal data.")}return this.buffer.slice(0,e)}get(e){if(e>this.offset){throw new Error("Attempted to read beyond the bounds of the managed internal data.")}const n=Buffer.allocUnsafe(e);this.buffer.slice(0,e).copy(n);this.buffer.copyWithin(0,e,e+this.offset-e);this.offset-=e;return n}}n.ReceiveBuffer=ReceiveBuffer},2864:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.shuffleArray=n.SocksClientError=void 0;class SocksClientError extends Error{constructor(e,n){super(e);this.options=n}}n.SocksClientError=SocksClientError;function shuffleArray(e){for(let n=e.length-1;n>0;n--){const r=Math.floor(Math.random()*(n+1));[e[n],e[r]]=[e[r],e[n]]}}n.shuffleArray=shuffleArray},8128:function(e,n,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,n,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return n[r]}})}:function(e,n,r,s){if(s===undefined)s=r;e[s]=n[r]});var i=this&&this.__exportStar||function(e,n){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r))s(n,e,r)};Object.defineProperty(n,"__esModule",{value:true});i(r(8821),n)},5844:(e,n,r)=>{"use strict";const{Transform:s}=r(3739);const{StringDecoder:i}=r(4304);const f=Symbol("last");const l=Symbol("decoder");function transform(e,n,r){var s;if(this.overflow){var i=this[l].write(e);s=i.split(this.matcher);if(s.length===1)return r();s.shift();this.overflow=false}else{this[f]+=this[l].write(e);s=this[f].split(this.matcher)}this[f]=s.pop();for(var t=0;tthis.maxLength;if(this.overflow&&!this.skipOverflow)return r(new Error("maximum buffer reached"));r()}function flush(e){this[f]+=this[l].end();if(this[f]){try{push(this,this.mapper(this[f]))}catch(n){return e(n)}}e()}function push(e,n){if(n!==undefined){e.push(n)}}function noop(e){return e}function split(e,n,r){e=e||/\r?\n/;n=n||noop;r=r||{};switch(arguments.length){case 1:if(typeof e==="function"){n=e;e=/\r?\n/}else if(typeof e==="object"&&!(e instanceof RegExp)){r=e;e=/\r?\n/}break;case 2:if(typeof e==="function"){r=n;n=e;e=/\r?\n/}else if(typeof n==="object"){r=n;n=noop}}r=Object.assign({},r);r.transform=transform;r.flush=flush;r.readableObjectMode=true;const t=new s(r);t[f]="";t[l]=new i("utf8");t.matcher=e;t.mapper=n;t.maxLength=r.maxLength;t.skipOverflow=r.skipOverflow;t.overflow=false;return t}e.exports=split},6745:(e,n,r)=>{"use strict";var s=r(8414).Buffer;var i=s.isEncoding||function(e){e=""+e;switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function _normalizeEncoding(e){if(!e)return"utf8";var n;while(true){switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(n)return;e=(""+e).toLowerCase();n=true}}}function normalizeEncoding(e){var n=_normalizeEncoding(e);if(typeof n!=="string"&&(s.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return n||e}n.s=StringDecoder;function StringDecoder(e){this.encoding=normalizeEncoding(e);var n;switch(this.encoding){case"utf16le":this.text=utf16Text;this.end=utf16End;n=4;break;case"utf8":this.fillLast=utf8FillLast;n=4;break;case"base64":this.text=base64Text;this.end=base64End;n=3;break;default:this.write=simpleWrite;this.end=simpleEnd;return}this.lastNeed=0;this.lastTotal=0;this.lastChar=s.allocUnsafe(n)}StringDecoder.prototype.write=function(e){if(e.length===0)return"";var n;var r;if(this.lastNeed){n=this.fillLast(e);if(n===undefined)return"";r=this.lastNeed;this.lastNeed=0}else{r=0}if(r>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function utf8CheckIncomplete(e,n,r){var s=n.length-1;if(s=0){if(i>0)e.lastNeed=i-1;return i}if(--s=0){if(i>0)e.lastNeed=i-2;return i}if(--s=0){if(i>0){if(i===2)i=0;else e.lastNeed=i-3}return i}return 0}function utf8CheckExtraBytes(e,n,r){if((n[0]&192)!==128){e.lastNeed=0;return"�"}if(e.lastNeed>1&&n.length>1){if((n[1]&192)!==128){e.lastNeed=1;return"�"}if(e.lastNeed>2&&n.length>2){if((n[2]&192)!==128){e.lastNeed=2;return"�"}}}}function utf8FillLast(e){var n=this.lastTotal-this.lastNeed;var r=utf8CheckExtraBytes(this,e,n);if(r!==undefined)return r;if(this.lastNeed<=e.length){e.copy(this.lastChar,n,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,n,0,e.length);this.lastNeed-=e.length}function utf8Text(e,n){var r=utf8CheckIncomplete(this,e,n);if(!this.lastNeed)return e.toString("utf8",n);this.lastTotal=r;var s=e.length-(r-this.lastNeed);e.copy(this.lastChar,0,s);return e.toString("utf8",n,s)}function utf8End(e){var n=e&&e.length?this.write(e):"";if(this.lastNeed)return n+"�";return n}function utf16Text(e,n){if((e.length-n)%2===0){var r=e.toString("utf16le",n);if(r){var s=r.charCodeAt(r.length-1);if(s>=55296&&s<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1];return r.slice(0,-1)}}return r}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=e[e.length-1];return e.toString("utf16le",n,e.length-1)}function utf16End(e){var n=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return n+this.lastChar.toString("utf16le",0,r)}return n}function base64Text(e,n){var r=(e.length-n)%3;if(r===0)return e.toString("base64",n);this.lastNeed=3-r;this.lastTotal=3;if(r===1){this.lastChar[0]=e[e.length-1]}else{this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1]}return e.toString("base64",n,e.length-r)}function base64End(e){var n=e&&e.length?this.write(e):"";if(this.lastNeed)return n+this.lastChar.toString("base64",0,3-this.lastNeed);return n}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):""}},5585:(e,n,r)=>{const{Transform:s}=r(3739);function inherits(e,n){e.super_=n;e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}function through2(e){return(n,r,s)=>{if(typeof n==="function"){s=r;r=n;n={}}if(typeof r!=="function"){r=((e,n,r)=>r(null,e))}if(typeof s!=="function"){s=null}return e(n,r,s)}}const i=through2((e,n,r)=>{const i=new s(e);i._transform=n;if(r){i._flush=r}return i});const f=through2((e,n,r)=>{function Through2(i){if(!(this instanceof Through2)){return new Through2(i)}this.options=Object.assign({},e,i);s.call(this,this.options);this._transform=n;if(r){this._flush=r}}inherits(Through2,s);return Through2});const l=through2(function(e,n,r){const i=new s(Object.assign({objectMode:true,highWaterMark:16},e));i._transform=n;if(r){i._flush=r}return i});e.exports=i;e.exports.ctor=f;e.exports.obj=l},3695:(e,n,r)=>{e.exports=r(2584)},2584:(e,n,r)=>{"use strict";var s=r(1631);var i=r(4016);var f=r(8605);var l=r(7211);var t=r(8614);var o=r(2357);var c=r(1669);n.httpOverHttp=httpOverHttp;n.httpsOverHttp=httpsOverHttp;n.httpOverHttps=httpOverHttps;n.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var n=new TunnelingAgent(e);n.request=f.request;return n}function httpsOverHttp(e){var n=new TunnelingAgent(e);n.request=f.request;n.createSocket=createSecureSocket;n.defaultPort=443;return n}function httpOverHttps(e){var n=new TunnelingAgent(e);n.request=l.request;return n}function httpsOverHttps(e){var n=new TunnelingAgent(e);n.request=l.request;n.createSocket=createSecureSocket;n.defaultPort=443;return n}function TunnelingAgent(e){var n=this;n.options=e||{};n.proxyOptions=n.options.proxy||{};n.maxSockets=n.options.maxSockets||f.Agent.defaultMaxSockets;n.requests=[];n.sockets=[];n.on("free",function onFree(e,r,s,i){var f=toOptions(r,s,i);for(var l=0,t=n.requests.length;l=this.maxSockets){i.requests.push(f);return}i.createSocket(f,function(n){n.on("free",onFree);n.on("close",onCloseOrRemove);n.on("agentRemove",onCloseOrRemove);e.onSocket(n);function onFree(){i.emit("free",n,f)}function onCloseOrRemove(e){i.removeSocket(n);n.removeListener("free",onFree);n.removeListener("close",onCloseOrRemove);n.removeListener("agentRemove",onCloseOrRemove)}})};TunnelingAgent.prototype.createSocket=function createSocket(e,n){var r=this;var s={};r.sockets.push(s);var i=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){i.localAddress=e.localAddress}if(i.proxyAuth){i.headers=i.headers||{};i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")}a("making CONNECT request");var f=r.request(i);f.useChunkedEncodingByDefault=false;f.once("response",onResponse);f.once("upgrade",onUpgrade);f.once("connect",onConnect);f.once("error",onError);f.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,n,r){process.nextTick(function(){onConnect(e,n,r)})}function onConnect(i,l,t){f.removeAllListeners();l.removeAllListeners();if(i.statusCode!==200){a("tunneling socket could not be established, statusCode=%d",i.statusCode);l.destroy();var o=new Error("tunneling socket could not be established, "+"statusCode="+i.statusCode);o.code="ECONNRESET";e.request.emit("error",o);r.removeSocket(s);return}if(t.length>0){a("got illegal response body from proxy");l.destroy();var o=new Error("got illegal response body from proxy");o.code="ECONNRESET";e.request.emit("error",o);r.removeSocket(s);return}a("tunneling connection has established");r.sockets[r.sockets.indexOf(s)]=l;return n(l)}function onError(n){f.removeAllListeners();a("tunneling socket could not be established, cause=%s\n",n.message,n.stack);var i=new Error("tunneling socket could not be established, "+"cause="+n.message);i.code="ECONNRESET";e.request.emit("error",i);r.removeSocket(s)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var n=this.sockets.indexOf(e);if(n===-1){return}this.sockets.splice(n,1);var r=this.requests.shift();if(r){this.createSocket(r,function(e){r.request.onSocket(e)})}};function createSecureSocket(e,n){var r=this;TunnelingAgent.prototype.createSocket.call(r,e,function(s){var f=e.request.getHeader("host");var l=mergeOptions({},r.options,{socket:s,servername:f?f.replace(/:.*$/,""):e.host});var t=i.connect(0,l);r.sockets[r.sockets.indexOf(s)]=t;n(t)})}function toOptions(e,n,r){if(typeof e==="string"){return{host:e,port:n,localAddress:r}}return e}function mergeOptions(e){for(var n=1,r=arguments.length;n{"use strict";n.fromCallback=function(e){return Object.defineProperty(function(...n){if(typeof n[n.length-1]==="function")e.apply(this,n);else{return new Promise((r,s)=>{e.call(this,...n,(e,n)=>e!=null?s(e):r(n))})}},"name",{value:e.name})};n.fromPromise=function(e){return Object.defineProperty(function(...n){const r=n[n.length-1];if(typeof r!=="function")return e.apply(this,n);else e.apply(this,n.slice(0,-1)).then(e=>r(null,e),r)},"name",{value:e.name})}},3786:function(e,n){(function(e,r){true?r(n):0})(this,function(e){"use strict";function merge(){for(var e=arguments.length,n=Array(e),r=0;r1){n[0]=n[0].slice(0,-1);var s=n.length-1;for(var i=1;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var w=l-t;var y=Math.floor;var m=String.fromCharCode;function error$1(e){throw new RangeError(b[e])}function map(e,n){var r=[];var s=e.length;while(s--){r[s]=n(e[s])}return r}function mapDomain(e,n){var r=e.split("@");var s="";if(r.length>1){s=r[0]+"@";e=r[1]}e=e.replace(g,".");var i=e.split(".");var f=map(i,n).join(".");return s+f}function ucs2decode(e){var n=[];var r=0;var s=e.length;while(r=55296&&i<=56319&&r>1;e+=y(e/n);for(;e>w*o>>1;s+=l){e=y(e/w)}return y(s+(w+1)*e/(e+c))};var A=function decode(e){var n=[];var r=e.length;var s=0;var i=p;var c=d;var a=e.lastIndexOf(u);if(a<0){a=0}for(var h=0;h=128){error$1("not-basic")}n.push(e.charCodeAt(h))}for(var v=a>0?a+1:0;v=r){error$1("invalid-input")}var m=S(e.charCodeAt(v++));if(m>=l||m>y((f-s)/b)){error$1("overflow")}s+=m*b;var E=w<=c?t:w>=c+o?o:w-c;if(my(f/C)){error$1("overflow")}b*=C}var A=n.length+1;c=O(s-g,A,g==0);if(y(s/A)>f-i){error$1("overflow")}i+=y(s/A);s%=A;n.splice(s++,0,i)}return String.fromCodePoint.apply(String,n)};var R=function encode(e){var n=[];e=ucs2decode(e);var r=e.length;var s=p;var i=0;var c=d;var a=true;var h=false;var v=undefined;try{for(var g=e[Symbol.iterator](),b;!(a=(b=g.next()).done);a=true){var w=b.value;if(w<128){n.push(m(w))}}}catch(e){h=true;v=e}finally{try{if(!a&&g.return){g.return()}}finally{if(h){throw v}}}var E=n.length;var S=E;if(E){n.push(u)}while(S=s&&Fy((f-i)/j)){error$1("overflow")}i+=(A-s)*j;s=A;var B=true;var L=false;var M=undefined;try{for(var U=e[Symbol.iterator](),D;!(B=(D=U.next()).done);B=true){var N=D.value;if(Nf){error$1("overflow")}if(N==s){var q=i;for(var z=l;;z+=l){var H=z<=c?t:z>=c+o?o:z-c;if(q>6|192).toString(16).toUpperCase()+"%"+(n&63|128).toString(16).toUpperCase();else r="%"+(n>>12|224).toString(16).toUpperCase()+"%"+(n>>6&63|128).toString(16).toUpperCase()+"%"+(n&63|128).toString(16).toUpperCase();return r}function pctDecChars(e){var n="";var r=0;var s=e.length;while(r=194&&i<224){if(s-r>=6){var f=parseInt(e.substr(r+4,2),16);n+=String.fromCharCode((i&31)<<6|f&63)}else{n+=e.substr(r,6)}r+=6}else if(i>=224){if(s-r>=9){var l=parseInt(e.substr(r+4,2),16);var t=parseInt(e.substr(r+7,2),16);n+=String.fromCharCode((i&15)<<12|(l&63)<<6|t&63)}else{n+=e.substr(r,9)}r+=9}else{n+=e.substr(r,3);r+=3}}return n}function _normalizeComponentEncoding(e,n){function decodeUnreserved(e){var r=pctDecChars(e);return!r.match(n.UNRESERVED)?e:r}if(e.scheme)e.scheme=String(e.scheme).replace(n.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(n.NOT_SCHEME,"");if(e.userinfo!==undefined)e.userinfo=String(e.userinfo).replace(n.PCT_ENCODED,decodeUnreserved).replace(n.NOT_USERINFO,pctEncChar).replace(n.PCT_ENCODED,toUpperCase);if(e.host!==undefined)e.host=String(e.host).replace(n.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(n.NOT_HOST,pctEncChar).replace(n.PCT_ENCODED,toUpperCase);if(e.path!==undefined)e.path=String(e.path).replace(n.PCT_ENCODED,decodeUnreserved).replace(e.scheme?n.NOT_PATH:n.NOT_PATH_NOSCHEME,pctEncChar).replace(n.PCT_ENCODED,toUpperCase);if(e.query!==undefined)e.query=String(e.query).replace(n.PCT_ENCODED,decodeUnreserved).replace(n.NOT_QUERY,pctEncChar).replace(n.PCT_ENCODED,toUpperCase);if(e.fragment!==undefined)e.fragment=String(e.fragment).replace(n.PCT_ENCODED,decodeUnreserved).replace(n.NOT_FRAGMENT,pctEncChar).replace(n.PCT_ENCODED,toUpperCase);return e}function _stripLeadingZeros(e){return e.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(e,n){var r=e.match(n.IPV4ADDRESS)||[];var i=s(r,2),f=i[1];if(f){return f.split(".").map(_stripLeadingZeros).join(".")}else{return e}}function _normalizeIPv6(e,n){var r=e.match(n.IPV6ADDRESS)||[];var i=s(r,3),f=i[1],l=i[2];if(f){var t=f.toLowerCase().split("::").reverse(),o=s(t,2),c=o[0],a=o[1];var d=a?a.split(":").map(_stripLeadingZeros):[];var p=c.split(":").map(_stripLeadingZeros);var u=n.IPV4ADDRESS.test(p[p.length-1]);var h=u?7:8;var v=p.length-h;var g=Array(h);for(var b=0;b1){var E=g.slice(0,y.index);var S=g.slice(y.index+y.length);m=E.join(":")+"::"+S.join(":")}else{m=g.join(":")}if(l){m+="%"+l}return m}else{return e}}var F=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;var j="".match(/(){0}/)[1]===undefined;function parse(e){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var i={};var f=s.iri!==false?r:n;if(s.reference==="suffix")e=(s.scheme?s.scheme+":":"")+"//"+e;var l=e.match(F);if(l){if(j){i.scheme=l[1];i.userinfo=l[3];i.host=l[4];i.port=parseInt(l[5],10);i.path=l[6]||"";i.query=l[7];i.fragment=l[8];if(isNaN(i.port)){i.port=l[5]}}else{i.scheme=l[1]||undefined;i.userinfo=e.indexOf("@")!==-1?l[3]:undefined;i.host=e.indexOf("//")!==-1?l[4]:undefined;i.port=parseInt(l[5],10);i.path=l[6]||"";i.query=e.indexOf("?")!==-1?l[7]:undefined;i.fragment=e.indexOf("#")!==-1?l[8]:undefined;if(isNaN(i.port)){i.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?l[4]:undefined}}if(i.host){i.host=_normalizeIPv6(_normalizeIPv4(i.host,f),f)}if(i.scheme===undefined&&i.userinfo===undefined&&i.host===undefined&&i.port===undefined&&!i.path&&i.query===undefined){i.reference="same-document"}else if(i.scheme===undefined){i.reference="relative"}else if(i.fragment===undefined){i.reference="absolute"}else{i.reference="uri"}if(s.reference&&s.reference!=="suffix"&&s.reference!==i.reference){i.error=i.error||"URI is not a "+s.reference+" reference."}var t=x[(s.scheme||i.scheme||"").toLowerCase()];if(!s.unicodeSupport&&(!t||!t.unicodeSupport)){if(i.host&&(s.domainHost||t&&t.domainHost)){try{i.host=T.toASCII(i.host.replace(f.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){i.error=i.error||"Host's domain name can not be converted to ASCII via punycode: "+e}}_normalizeComponentEncoding(i,n)}else{_normalizeComponentEncoding(i,f)}if(t&&t.parse){t.parse(i,s)}}else{i.error=i.error||"URI can not be parsed."}return i}function _recomposeAuthority(e,s){var i=s.iri!==false?r:n;var f=[];if(e.userinfo!==undefined){f.push(e.userinfo);f.push("@")}if(e.host!==undefined){f.push(_normalizeIPv6(_normalizeIPv4(String(e.host),i),i).replace(i.IPV6ADDRESS,function(e,n,r){return"["+n+(r?"%25"+r:"")+"]"}))}if(typeof e.port==="number"||typeof e.port==="string"){f.push(":");f.push(String(e.port))}return f.length?f.join(""):undefined}var B=/^\.\.?\//;var L=/^\/\.(\/|$)/;var M=/^\/\.\.(\/|$)/;var U=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(e){var n=[];while(e.length){if(e.match(B)){e=e.replace(B,"")}else if(e.match(L)){e=e.replace(L,"/")}else if(e.match(M)){e=e.replace(M,"/");n.pop()}else if(e==="."||e===".."){e=""}else{var r=e.match(U);if(r){var s=r[0];e=e.slice(s.length);n.push(s)}else{throw new Error("Unexpected dot segment condition")}}}return n.join("")}function serialize(e){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var i=s.iri?r:n;var f=[];var l=x[(s.scheme||e.scheme||"").toLowerCase()];if(l&&l.serialize)l.serialize(e,s);if(e.host){if(i.IPV6ADDRESS.test(e.host)){}else if(s.domainHost||l&&l.domainHost){try{e.host=!s.iri?T.toASCII(e.host.replace(i.PCT_ENCODED,pctDecChars).toLowerCase()):T.toUnicode(e.host)}catch(n){e.error=e.error||"Host's domain name can not be converted to "+(!s.iri?"ASCII":"Unicode")+" via punycode: "+n}}}_normalizeComponentEncoding(e,i);if(s.reference!=="suffix"&&e.scheme){f.push(e.scheme);f.push(":")}var t=_recomposeAuthority(e,s);if(t!==undefined){if(s.reference!=="suffix"){f.push("//")}f.push(t);if(e.path&&e.path.charAt(0)!=="/"){f.push("/")}}if(e.path!==undefined){var o=e.path;if(!s.absolutePath&&(!l||!l.absolutePath)){o=removeDotSegments(o)}if(t===undefined){o=o.replace(/^\/\//,"/%2F")}f.push(o)}if(e.query!==undefined){f.push("?");f.push(e.query)}if(e.fragment!==undefined){f.push("#");f.push(e.fragment)}return f.join("")}function resolveComponents(e,n){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var s=arguments[3];var i={};if(!s){e=parse(serialize(e,r),r);n=parse(serialize(n,r),r)}r=r||{};if(!r.tolerant&&n.scheme){i.scheme=n.scheme;i.userinfo=n.userinfo;i.host=n.host;i.port=n.port;i.path=removeDotSegments(n.path||"");i.query=n.query}else{if(n.userinfo!==undefined||n.host!==undefined||n.port!==undefined){i.userinfo=n.userinfo;i.host=n.host;i.port=n.port;i.path=removeDotSegments(n.path||"");i.query=n.query}else{if(!n.path){i.path=e.path;if(n.query!==undefined){i.query=n.query}else{i.query=e.query}}else{if(n.path.charAt(0)==="/"){i.path=removeDotSegments(n.path)}else{if((e.userinfo!==undefined||e.host!==undefined||e.port!==undefined)&&!e.path){i.path="/"+n.path}else if(!e.path){i.path=n.path}else{i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+n.path}i.path=removeDotSegments(i.path)}i.query=n.query}i.userinfo=e.userinfo;i.host=e.host;i.port=e.port}i.scheme=e.scheme}i.fragment=n.fragment;return i}function resolve(e,n,r){var s=assign({scheme:"null"},r);return serialize(resolveComponents(parse(e,s),parse(n,s),s,true),s)}function normalize(e,n){if(typeof e==="string"){e=serialize(parse(e,n),n)}else if(typeOf(e)==="object"){e=parse(serialize(e,n),n)}return e}function equal(e,n,r){if(typeof e==="string"){e=serialize(parse(e,r),r)}else if(typeOf(e)==="object"){e=serialize(e,r)}if(typeof n==="string"){n=serialize(parse(n,r),r)}else if(typeOf(n)==="object"){n=serialize(n,r)}return e===n}function escapeComponent(e,s){return e&&e.toString().replace(!s||!s.iri?n.ESCAPE:r.ESCAPE,pctEncChar)}function unescapeComponent(e,s){return e&&e.toString().replace(!s||!s.iri?n.PCT_ENCODED:r.PCT_ENCODED,pctDecChars)}var D={scheme:"http",domainHost:true,parse:function parse(e,n){if(!e.host){e.error=e.error||"HTTP URIs must have a host."}return e},serialize:function serialize(e,n){var r=String(e.scheme).toLowerCase()==="https";if(e.port===(r?443:80)||e.port===""){e.port=undefined}if(!e.path){e.path="/"}return e}};var N={scheme:"https",domainHost:D.domainHost,parse:D.parse,serialize:D.serialize};function isSecure(e){return typeof e.secure==="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}var q={scheme:"ws",domainHost:true,parse:function parse(e,n){var r=e;r.secure=isSecure(r);r.resourceName=(r.path||"/")+(r.query?"?"+r.query:"");r.path=undefined;r.query=undefined;return r},serialize:function serialize(e,n){if(e.port===(isSecure(e)?443:80)||e.port===""){e.port=undefined}if(typeof e.secure==="boolean"){e.scheme=e.secure?"wss":"ws";e.secure=undefined}if(e.resourceName){var r=e.resourceName.split("?"),i=s(r,2),f=i[0],l=i[1];e.path=f&&f!=="/"?f:undefined;e.query=l;e.resourceName=undefined}e.fragment=undefined;return e}};var z={scheme:"wss",domainHost:q.domainHost,parse:q.parse,serialize:q.serialize};var H={};var W=true;var Y="[A-Za-z0-9\\-\\.\\_\\~"+(W?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]";var G="[0-9A-Fa-f]";var Q=subexp(subexp("%[EFef]"+G+"%"+G+G+"%"+G+G)+"|"+subexp("%[89A-Fa-f]"+G+"%"+G+G)+"|"+subexp("%"+G+G));var J="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";var X="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";var Z=merge(X,'[\\"\\\\]');var V="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";var K=new RegExp(Y,"g");var P=new RegExp(Q,"g");var _=new RegExp(merge("[^]",J,"[\\.]",'[\\"]',Z),"g");var $=new RegExp(merge("[^]",Y,V),"g");var ee=$;function decodeUnreserved(e){var n=pctDecChars(e);return!n.match(K)?e:n}var ne={scheme:"mailto",parse:function parse$$1(e,n){var r=e;var s=r.to=r.path?r.path.split(","):[];r.path=undefined;if(r.query){var i=false;var f={};var l=r.query.split("&");for(var t=0,o=l.length;t{e.exports=r(1669).deprecate},7007:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next){yield e.value}}}},7572:(e,n,r)=>{"use strict";e.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(e){var n=this;if(!(n instanceof Yallist)){n=new Yallist}n.tail=null;n.head=null;n.length=0;if(e&&typeof e.forEach==="function"){e.forEach(function(e){n.push(e)})}else if(arguments.length>0){for(var r=0,s=arguments.length;r1){r=n}else if(this.head){s=this.head.next;r=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=0;s!==null;i++){r=e(r,s.value,i);s=s.next}return r};Yallist.prototype.reduceReverse=function(e,n){var r;var s=this.tail;if(arguments.length>1){r=n}else if(this.tail){s=this.tail.prev;r=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=this.length-1;s!==null;i--){r=e(r,s.value,i);s=s.prev}return r};Yallist.prototype.toArray=function(){var e=new Array(this.length);for(var n=0,r=this.head;r!==null;n++){e[n]=r.value;r=r.next}return e};Yallist.prototype.toArrayReverse=function(){var e=new Array(this.length);for(var n=0,r=this.tail;r!==null;n++){e[n]=r.value;r=r.prev}return e};Yallist.prototype.slice=function(e,n){n=n||this.length;if(n<0){n+=this.length}e=e||0;if(e<0){e+=this.length}var r=new Yallist;if(nthis.length){n=this.length}for(var s=0,i=this.head;i!==null&&sthis.length){n=this.length}for(var s=this.length,i=this.tail;i!==null&&s>n;s--){i=i.prev}for(;i!==null&&s>e;s--,i=i.prev){r.push(i.value)}return r};Yallist.prototype.splice=function(e,n,...r){if(e>this.length){e=this.length-1}if(e<0){e=this.length+e}for(var s=0,i=this.head;i!==null&&s{module.exports=eval("require")("supports-color")},5999:(e,n,r)=>{"use strict";n=e.exports=fetch;const s=r(8605);const i=r(7211);const f=r(8761);const l=r(2413);const t=r(6551);const o=r(1669);const c=r(5835);const a=r(6417);const d=r(8835);class FetchBaseError extends Error{constructor(e,n){super(e);Error.captureStackTrace(this,this.constructor);this.type=n}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}class FetchError extends FetchBaseError{constructor(e,n,r){super(e,n);if(r){this.code=this.errno=r.code;this.erroredSysCall=r.syscall}}}const p=Symbol.toStringTag;const u=e=>{return typeof e==="object"&&typeof e.append==="function"&&typeof e.delete==="function"&&typeof e.get==="function"&&typeof e.getAll==="function"&&typeof e.has==="function"&&typeof e.set==="function"&&typeof e.sort==="function"&&e[p]==="URLSearchParams"};const h=e=>{return typeof e==="object"&&typeof e.arrayBuffer==="function"&&typeof e.type==="string"&&typeof e.stream==="function"&&typeof e.constructor==="function"&&/^(Blob|File)$/.test(e[p])};function isFormData(e){return typeof e==="object"&&typeof e.append==="function"&&typeof e.set==="function"&&typeof e.get==="function"&&typeof e.getAll==="function"&&typeof e.delete==="function"&&typeof e.keys==="function"&&typeof e.values==="function"&&typeof e.entries==="function"&&typeof e.constructor==="function"&&e[p]==="FormData"}const v=e=>{return typeof e==="object"&&e[p]==="AbortSignal"};const g="\r\n";const b="-".repeat(2);const w=Buffer.byteLength(g);const y=e=>`${b}${e}${b}${g.repeat(2)}`;function getHeader(e,n,r){let s="";s+=`${b}${e}${g}`;s+=`Content-Disposition: form-data; name="${n}"`;if(h(r)){s+=`; filename="${r.name}"${g}`;s+=`Content-Type: ${r.type||"application/octet-stream"}`}return`${s}${g.repeat(2)}`}const m=()=>a.randomBytes(8).toString("hex");async function*formDataIterator(e,n){for(const[r,s]of e){yield getHeader(n,r,s);if(h(s)){yield*s.stream()}else{yield s}yield g}yield y(n)}function getFormDataLength(e,n){let r=0;for(const[s,i]of e){r+=Buffer.byteLength(getHeader(n,s,i));if(h(i)){r+=i.size}else{r+=Buffer.byteLength(String(i))}r+=w}r+=Buffer.byteLength(y(n));return r}const E=Symbol("Body internals");class Body{constructor(e,{size:n=0}={}){let r=null;if(e===null){e=null}else if(u(e)){e=Buffer.from(e.toString())}else if(h(e)) ;else if(Buffer.isBuffer(e)) ;else if(o.types.isAnyArrayBuffer(e)){e=Buffer.from(e)}else if(ArrayBuffer.isView(e)){e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}else if(e instanceof l) ;else if(isFormData(e)){r=`NodeFetchFormDataBoundary${m()}`;e=l.Readable.from(formDataIterator(e,r))}else{e=Buffer.from(String(e))}this[E]={body:e,boundary:r,disturbed:false,error:null};this.size=n;if(e instanceof l){e.on("error",e=>{const n=e instanceof FetchBaseError?e:new FetchError(`Invalid response body while trying to fetch ${this.url}: ${e.message}`,"system",e);this[E].error=n})}}get body(){return this[E].body}get bodyUsed(){return this[E].disturbed}async arrayBuffer(){const{buffer:e,byteOffset:n,byteLength:r}=await consumeBody(this);return e.slice(n,n+r)}async blob(){const e=this.headers&&this.headers.get("content-type")||this[E].body&&this[E].body.type||"";const n=await this.buffer();return new c([n],{type:e})}async json(){const e=await consumeBody(this);return JSON.parse(e.toString())}async text(){const e=await consumeBody(this);return e.toString()}buffer(){return consumeBody(this)}}Object.defineProperties(Body.prototype,{body:{enumerable:true},bodyUsed:{enumerable:true},arrayBuffer:{enumerable:true},blob:{enumerable:true},json:{enumerable:true},text:{enumerable:true}});async function consumeBody(e){if(e[E].disturbed){throw new TypeError(`body used already for: ${e.url}`)}e[E].disturbed=true;if(e[E].error){throw e[E].error}let{body:n}=e;if(n===null){return Buffer.alloc(0)}if(h(n)){n=n.stream()}if(Buffer.isBuffer(n)){return n}if(!(n instanceof l)){return Buffer.alloc(0)}const r=[];let s=0;try{for await(const i of n){if(e.size>0&&s+i.length>e.size){const r=new FetchError(`content size at ${e.url} over limit: ${e.size}`,"max-size");n.destroy(r);throw r}s+=i.length;r.push(i)}}catch(n){if(n instanceof FetchBaseError){throw n}else{throw new FetchError(`Invalid response body while trying to fetch ${e.url}: ${n.message}`,"system",n)}}if(n.readableEnded===true||n._readableState.ended===true){try{if(r.every(e=>typeof e==="string")){return Buffer.from(r.join(""))}return Buffer.concat(r,s)}catch(n){throw new FetchError(`Could not create Buffer from response body for ${e.url}: ${n.message}`,"system",n)}}else{throw new FetchError(`Premature close of server response while trying to fetch ${e.url}`)}}const S=(e,n)=>{let r;let s;let{body:i}=e;if(e.bodyUsed){throw new Error("cannot clone body after it is used")}if(i instanceof l&&typeof i.getBoundary!=="function"){r=new l.PassThrough({highWaterMark:n});s=new l.PassThrough({highWaterMark:n});i.pipe(r);i.pipe(s);e[E].body=r;i=s}return i};const C=(e,n)=>{if(e===null){return null}if(typeof e==="string"){return"text/plain;charset=UTF-8"}if(u(e)){return"application/x-www-form-urlencoded;charset=UTF-8"}if(h(e)){return e.type||null}if(Buffer.isBuffer(e)||o.types.isAnyArrayBuffer(e)||ArrayBuffer.isView(e)){return null}if(e&&typeof e.getBoundary==="function"){return`multipart/form-data;boundary=${e.getBoundary()}`}if(isFormData(e)){return`multipart/form-data; boundary=${n[E].boundary}`}if(e instanceof l){return null}return"text/plain;charset=UTF-8"};const O=e=>{const{body:n}=e;if(n===null){return 0}if(h(n)){return n.size}if(Buffer.isBuffer(n)){return n.length}if(n&&typeof n.getLengthSync==="function"){return n.hasKnownLength&&n.hasKnownLength()?n.getLengthSync():null}if(isFormData(n)){return getFormDataLength(e[E].boundary)}return null};const A=(e,{body:n})=>{if(n===null){e.end()}else if(h(n)){n.stream().pipe(e)}else if(Buffer.isBuffer(n)){e.write(n);e.end()}else{n.pipe(e)}};const R=typeof s.validateHeaderName==="function"?s.validateHeaderName:e=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(e)){const n=new TypeError(`Header name must be a valid HTTP token [${e}]`);Object.defineProperty(n,"code",{value:"ERR_INVALID_HTTP_TOKEN"});throw n}};const k=typeof s.validateHeaderValue==="function"?s.validateHeaderValue:(e,n)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(n)){const n=new TypeError(`Invalid character in header content ["${e}"]`);Object.defineProperty(n,"code",{value:"ERR_INVALID_CHAR"});throw n}};class Headers extends URLSearchParams{constructor(e){let n=[];if(e instanceof Headers){const r=e.raw();for(const[e,s]of Object.entries(r)){n.push(...s.map(n=>[e,n]))}}else if(e==null) ;else if(typeof e==="object"&&!o.types.isBoxedPrimitive(e)){const r=e[Symbol.iterator];if(r==null){n.push(...Object.entries(e))}else{if(typeof r!=="function"){throw new TypeError("Header pairs must be iterable")}n=[...e].map(e=>{if(typeof e!=="object"||o.types.isBoxedPrimitive(e)){throw new TypeError("Each header pair must be an iterable object")}return[...e]}).map(e=>{if(e.length!==2){throw new TypeError("Each header pair must be a name/value tuple")}return[...e]})}}else{throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence> or record)")}n=n.length>0?n.map(([e,n])=>{R(e);k(e,String(n));return[String(e).toLowerCase(),String(n)]}):undefined;super(n);return new Proxy(this,{get(e,n,r){switch(n){case"append":case"set":return(e,s)=>{R(e);k(e,String(s));return URLSearchParams.prototype[n].call(r,String(e).toLowerCase(),String(s))};case"delete":case"has":case"getAll":return e=>{R(e);return URLSearchParams.prototype[n].call(r,String(e).toLowerCase())};case"keys":return()=>{e.sort();return new Set(URLSearchParams.prototype.keys.call(e)).keys()};default:return Reflect.get(e,n,r)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){const n=this.getAll(e);if(n.length===0){return null}let r=n.join(", ");if(/^content-encoding$/i.test(e)){r=r.toLowerCase()}return r}forEach(e){for(const n of this.keys()){e(this.get(n),n)}}*values(){for(const e of this.keys()){yield this.get(e)}}*entries(){for(const e of this.keys()){yield[e,this.get(e)]}}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((e,n)=>{e[n]=this.getAll(n);return e},{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((e,n)=>{const r=this.getAll(n);if(n==="host"){e[n]=r[0]}else{e[n]=r.length>1?r:r[0]}return e},{})}}Object.defineProperties(Headers.prototype,["get","entries","forEach","values"].reduce((e,n)=>{e[n]={enumerable:true};return e},{}));function fromRawHeaders(e=[]){return new Headers(e.reduce((e,n,r,s)=>{if(r%2===0){e.push(s.slice(r,r+2))}return e},[]).filter(([e,n])=>{try{R(e);k(e,String(n));return true}catch{return false}}))}const I=new Set([301,302,303,307,308]);const T=e=>{return I.has(e)};const x=Symbol("Response internals");class Response extends Body{constructor(e=null,n={}){super(e,n);const r=n.status||200;const s=new Headers(n.headers);if(e!==null&&!s.has("Content-Type")){const n=C(e);if(n){s.append("Content-Type",n)}}this[x]={url:n.url,status:r,statusText:n.statusText||"",headers:s,counter:n.counter,highWaterMark:n.highWaterMark}}get url(){return this[x].url||""}get status(){return this[x].status}get ok(){return this[x].status>=200&&this[x].status<300}get redirected(){return this[x].counter>0}get statusText(){return this[x].statusText}get headers(){return this[x].headers}get highWaterMark(){return this[x].highWaterMark}clone(){return new Response(S(this,this.highWaterMark),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size})}static redirect(e,n=302){if(!T(n)){throw new RangeError('Failed to execute "redirect" on "response": Invalid status code')}return new Response(null,{headers:{location:new URL(e).toString()},status:n})}get[Symbol.toStringTag](){return"Response"}}Object.defineProperties(Response.prototype,{url:{enumerable:true},status:{enumerable:true},ok:{enumerable:true},redirected:{enumerable:true},statusText:{enumerable:true},headers:{enumerable:true},clone:{enumerable:true}});const F=e=>{if(e.search){return e.search}const n=e.href.length-1;const r=e.hash||(e.href[n]==="#"?"#":"");return e.href[n-r.length]==="?"?"?":""};const j=Symbol("Request internals");const B=e=>{return typeof e==="object"&&typeof e[j]==="object"};class Request extends Body{constructor(e,n={}){let r;if(B(e)){r=new URL(e.url)}else{r=new URL(e);e={}}let s=n.method||e.method||"GET";s=s.toUpperCase();if((n.body!=null||B(e))&&e.body!==null&&(s==="GET"||s==="HEAD")){throw new TypeError("Request with GET/HEAD method cannot have body")}const i=n.body?n.body:B(e)&&e.body!==null?S(e):null;super(i,{size:n.size||e.size||0});const f=new Headers(n.headers||e.headers||{});if(i!==null&&!f.has("Content-Type")){const e=C(i,this);if(e){f.append("Content-Type",e)}}let l=B(e)?e.signal:null;if("signal"in n){l=n.signal}if(l!==null&&!v(l)){throw new TypeError("Expected signal to be an instanceof AbortSignal")}this[j]={method:s,redirect:n.redirect||e.redirect||"follow",headers:f,parsedURL:r,signal:l};this.follow=n.follow===undefined?e.follow===undefined?20:e.follow:n.follow;this.compress=n.compress===undefined?e.compress===undefined?true:e.compress:n.compress;this.counter=n.counter||e.counter||0;this.agent=n.agent||e.agent;this.highWaterMark=n.highWaterMark||e.highWaterMark||16384;this.insecureHTTPParser=n.insecureHTTPParser||e.insecureHTTPParser||false}get method(){return this[j].method}get url(){return d.format(this[j].parsedURL)}get headers(){return this[j].headers}get redirect(){return this[j].redirect}get signal(){return this[j].signal}clone(){return new Request(this)}get[Symbol.toStringTag](){return"Request"}}Object.defineProperties(Request.prototype,{method:{enumerable:true},url:{enumerable:true},headers:{enumerable:true},redirect:{enumerable:true},clone:{enumerable:true},signal:{enumerable:true}});const L=e=>{const{parsedURL:n}=e[j];const r=new Headers(e[j].headers);if(!r.has("Accept")){r.set("Accept","*/*")}let s=null;if(e.body===null&&/^(post|put)$/i.test(e.method)){s="0"}if(e.body!==null){const n=O(e);if(typeof n==="number"&&!Number.isNaN(n)){s=String(n)}}if(s){r.set("Content-Length",s)}if(!r.has("User-Agent")){r.set("User-Agent","node-fetch")}if(e.compress&&!r.has("Accept-Encoding")){r.set("Accept-Encoding","gzip,deflate,br")}let{agent:i}=e;if(typeof i==="function"){i=i(n)}if(!r.has("Connection")&&!i){r.set("Connection","close")}const f=F(n);const l={path:n.pathname+f,pathname:n.pathname,hostname:n.hostname,protocol:n.protocol,port:n.port,hash:n.hash,search:n.search,query:n.query,href:n.href,method:e.method,headers:r[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:e.insecureHTTPParser,agent:i};return l};class AbortError extends FetchBaseError{constructor(e,n="aborted"){super(e,n)}}const M=new Set(["data:","http:","https:"]);async function fetch(e,n){return new Promise((r,o)=>{const c=new Request(e,n);const a=L(c);if(!M.has(a.protocol)){throw new TypeError(`node-fetch cannot load ${e}. URL scheme "${a.protocol.replace(/:$/,"")}" is not supported.`)}if(a.protocol==="data:"){const e=t(c.url);const n=new Response(e,{headers:{"Content-Type":e.typeFull}});r(n);return}const d=(a.protocol==="https:"?i:s).request;const{signal:p}=c;let u=null;const h=()=>{const e=new AbortError("The operation was aborted.");o(e);if(c.body&&c.body instanceof l.Readable){c.body.destroy(e)}if(!u||!u.body){return}u.body.emit("error",e)};if(p&&p.aborted){h();return}const v=()=>{h();b()};const g=d(a);if(p){p.addEventListener("abort",v)}const b=()=>{g.abort();if(p){p.removeEventListener("abort",v)}};g.on("error",e=>{o(new FetchError(`request to ${c.url} failed, reason: ${e.message}`,"system",e));b()});g.on("response",e=>{g.setTimeout(0);const s=fromRawHeaders(e.rawHeaders);if(T(e.statusCode)){const i=s.get("Location");const f=i===null?null:new URL(i,c.url);switch(c.redirect){case"error":o(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${c.url}`,"no-redirect"));b();return;case"manual":if(f!==null){try{s.set("Location",f)}catch(e){o(e)}}break;case"follow":{if(f===null){break}if(c.counter>=c.follow){o(new FetchError(`maximum redirect reached at: ${c.url}`,"max-redirect"));b();return}const s={headers:new Headers(c.headers),follow:c.follow,counter:c.counter+1,agent:c.agent,compress:c.compress,method:c.method,body:c.body,signal:c.signal,size:c.size};if(e.statusCode!==303&&c.body&&n.body instanceof l.Readable){o(new FetchError("Cannot follow redirect with body being a readable stream","unsupported-redirect"));b();return}if(e.statusCode===303||(e.statusCode===301||e.statusCode===302)&&c.method==="POST"){s.method="GET";s.body=undefined;s.headers.delete("content-length")}r(fetch(new Request(f,s)));b();return}}}e.once("end",()=>{if(p){p.removeEventListener("abort",v)}});let i=l.pipeline(e,new l.PassThrough,e=>{o(e)});if(process.version<"v12.10"){e.on("aborted",v)}const t={url:c.url,status:e.statusCode,statusText:e.statusMessage,headers:s,size:c.size,counter:c.counter,highWaterMark:c.highWaterMark};const a=s.get("Content-Encoding");if(!c.compress||c.method==="HEAD"||a===null||e.statusCode===204||e.statusCode===304){u=new Response(i,t);r(u);return}const d={flush:f.Z_SYNC_FLUSH,finishFlush:f.Z_SYNC_FLUSH};if(a==="gzip"||a==="x-gzip"){i=l.pipeline(i,f.createGunzip(d),e=>{o(e)});u=new Response(i,t);r(u);return}if(a==="deflate"||a==="x-deflate"){const n=l.pipeline(e,new l.PassThrough,e=>{o(e)});n.once("data",e=>{if((e[0]&15)===8){i=l.pipeline(i,f.createInflate(),e=>{o(e)})}else{i=l.pipeline(i,f.createInflateRaw(),e=>{o(e)})}u=new Response(i,t);r(u)});return}if(a==="br"){i=l.pipeline(i,f.createBrotliDecompress(),e=>{o(e)});u=new Response(i,t);r(u);return}u=new Response(i,t);r(u)});A(g,c)})}n.AbortError=AbortError;n.FetchError=FetchError;n.Headers=Headers;n.Request=Request;n.Response=Response;n.default=fetch;n.isRedirect=T},2706:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},1742:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},2357:e=>{"use strict";e.exports=require("assert")},4293:e=>{"use strict";e.exports=require("buffer")},3129:e=>{"use strict";e.exports=require("child_process")},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")},1631:e=>{"use strict";e.exports=require("net")},2087:e=>{"use strict";e.exports=require("os")},5622:e=>{"use strict";e.exports=require("path")},1765:e=>{"use strict";e.exports=require("process")},2413:e=>{"use strict";e.exports=require("stream")},4304:e=>{"use strict";e.exports=require("string_decoder")},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")},8761:e=>{"use strict";e.exports=require("zlib")}};var __webpack_module_cache__={};function __nccwpck_require__(e){if(__webpack_module_cache__[e]){return __webpack_module_cache__[e].exports}var n=__webpack_module_cache__[e]={exports:{}};var r=true;try{__webpack_modules__[e].call(n.exports,n,n.exports,__nccwpck_require__);r=false}finally{if(r)delete __webpack_module_cache__[e]}return n.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(6152)})(); \ No newline at end of file +(()=>{var __webpack_modules__={8243:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=r(3031);const s=n(r(4694));const o=n(r(2759));const a=n(r(1142));const u=n(r(4207));const l=n(r(5659));async function main(){const e=(0,s.default)();const t=(0,i.getState)("is_post");if(t==="true")return(0,l.default)(e);(0,i.saveState)("is_post","true");await(0,a.default)(e);console.log("Installation Completed!");(0,o.default)(e);(0,u.default)(e)}main().catch((e=>{console.error(e);(0,i.setFailed)(e)}))},4694:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getInputs=void 0;const i=r(3031);const s=n(r(4790));const o=r(5400);const a={required:true};const parseInputPath=e=>(0,s.default)((0,i.getInput)(e,a));const getInputs=()=>({version:(0,i.getInput)("version"),dest:parseInputPath("dest"),runInstall:(0,o.parseRunInstall)("run_install")});t.getInputs=getInputs;t["default"]=t.getInputs},5400:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.parseRunInstall=void 0;const i=n(r(7282));const s=r(3639);const o=n(r(8438));const a=r(3031);const u=n(r(5379));const l={required:true};function parseRunInstall(e){const t=(0,s.load)((0,a.getInput)(e,l));const r=new o.default({allErrors:true});const n=r.compile(u.default);if(!n(t)){for(const e of n.errors){(0,a.error)(`with.run_install${e.dataPath}: ${e.message}`)}return i.default.exit(1)}if(!t)return[];if(t===true)return[{recursive:true}];if(Array.isArray(t))return t;return[t]}t.parseRunInstall=parseRunInstall},1142:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.install=t.runSelfInstaller=void 0;const i=r(3031);const s=n(r(9536));t.runSelfInstaller=s.default;async function install(e){(0,i.startGroup)("Running self-installer...");const t=await(0,s.default)(e);(0,i.endGroup)();if(t){return(0,i.setFailed)(`Something went wrong, self-installer exits with code ${t}`)}}t.install=install;t["default"]=install},9536:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.runSelfInstaller=void 0;const i=r(3031);const s=r(2081);const o=r(7282);const a=n(r(1017));const u=r(5176);const l=n(r(2043));async function runSelfInstaller(e){const{version:t,dest:r}=e;const n=a.default.join(r,"package.json");const c=await readTarget(n,t);await(0,u.remove)(r);await(0,u.ensureFile)(n);await(0,u.writeFile)(n,JSON.stringify({private:true}));const f=(0,s.spawn)(o.execPath,["-","install",c,"--no-lockfile"],{cwd:r,stdio:["pipe","inherit","inherit"]});const d=await(0,l.default)("https://get.pnpm.io/v6.16.js");if(!d.body)throw new Error("Did not receive response body");d.body.pipe(f.stdin);const p=await new Promise(((e,t)=>{f.on("error",t);f.on("close",e)}));if(p===0){const e=a.default.join(r,"node_modules/.bin");(0,i.addPath)(e);(0,i.exportVariable)("PNPM_HOME",e)}return p}t.runSelfInstaller=runSelfInstaller;async function readTarget(e,t){if(t)return`pnpm@${t}`;const{packageManager:r}=JSON.parse(await(0,u.readFile)(e,"utf8"));if(typeof r!=="string"){throw new Error(`No pnpm version is specified.\nPlease specify it by one of the following ways:\n - in the GitHub Action config with the key "version"\n - in the package.json with the key "packageManager" (See https://nodejs.org/api/corepack.html)`)}if(!r.startsWith("pnpm@")){throw new Error("Invalid packageManager field in package.json")}return r}t["default"]=runSelfInstaller},2759:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setOutputs=void 0;const n=r(3031);const i=r(6392);function setOutputs(e){const t=(0,i.getBinDest)(e);(0,n.addPath)(t);(0,n.setOutput)("dest",e.dest);(0,n.setOutput)("bin_dest",t)}t.setOutputs=setOutputs;t["default"]=setOutputs},4207:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.runPnpmInstall=void 0;const n=r(2081);const i=r(3031);const s=r(6392);function runPnpmInstall(e){const t=(0,s.patchPnpmEnv)(e);for(const r of e.runInstall){const e=["install"];if(r.recursive)e.unshift("recursive");if(r.args)e.push(...r.args);const s=["pnpm",...e].join(" ");(0,i.startGroup)(`Running ${s}...`);const{error:o,status:a}=(0,n.spawnSync)("pnpm",e,{stdio:"inherit",cwd:r.cwd,shell:true,env:t});(0,i.endGroup)();if(o){(0,i.setFailed)(o);continue}if(a){(0,i.setFailed)(`Command ${s} (cwd: ${r.cwd}) exits with status ${a}`);continue}}}t.runPnpmInstall=runPnpmInstall;t["default"]=runPnpmInstall},5659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.pruneStore=void 0;const n=r(2081);const i=r(3031);const s=r(6392);function pruneStore(e){if(e.runInstall.length===0){console.log("Pruning is unnecessary.");return}(0,i.startGroup)("Running pnpm store prune...");const{error:t,status:r}=(0,n.spawnSync)("pnpm",["store","prune"],{stdio:"inherit",shell:true,env:(0,s.patchPnpmEnv)(e)});(0,i.endGroup)();if(t){(0,i.warning)(t);return}if(r){(0,i.warning)(`command pnpm store prune exits with code ${r}`);return}}t.pruneStore=pruneStore;t["default"]=pruneStore},6392:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.patchPnpmEnv=t.getBinDest=void 0;const i=n(r(7282));const s=n(r(1017));const getBinDest=e=>s.default.join(e.dest,"node_modules",".bin");t.getBinDest=getBinDest;const patchPnpmEnv=e=>({...i.default.env,PATH:(0,t.getBinDest)(e)+s.default.delimiter+i.default.env.PATH});t.patchPnpmEnv=patchPnpmEnv},8302:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const o=s(r(2037));const a=r(8541);function issueCommand(e,t,r){const n=new Command(e,t,r);process.stdout.write(n.toString()+o.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const u="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=u+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const n=this.properties[r];if(n){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(n)}`}}}}e+=`${u}${escapeData(this.message)}`;return e}}function escapeData(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},3031:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const a=r(8302);const u=r(1234);const l=r(8541);const c=s(r(2037));const f=s(r(1017));const d=r(9946);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const r=l.toCommandValue(t);process.env[e]=r;const n=process.env["GITHUB_ENV"]||"";if(n){const t="_GitHubActionsFileCommandDelimeter_";const n=`${e}<<${t}${c.EOL}${r}${c.EOL}${t}`;u.issueCommand("ENV",n)}else{a.issueCommand("set-env",{name:e},r)}}t.exportVariable=exportVariable;function setSecret(e){a.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){u.issueCommand("PATH",e)}else{a.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${f.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return r}return r.trim()}t.getInput=getInput;function getMultilineInput(e,t){const r=getInput(e,t).split("\n").filter((e=>e!==""));return r}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const r=["true","True","TRUE"];const n=["false","False","FALSE"];const i=getInput(e,t);if(r.includes(i))return true;if(n.includes(i))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){process.stdout.write(c.EOL);a.issueCommand("set-output",{name:e},t)}t.setOutput=setOutput;function setCommandEcho(e){a.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=p.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){a.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){a.issueCommand("error",l.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){a.issueCommand("warning",l.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){a.issueCommand("notice",l.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+c.EOL)}t.info=info;function startGroup(e){a.issue("group",e)}t.startGroup=startGroup;function endGroup(){a.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return o(this,void 0,void 0,(function*(){startGroup(e);let r;try{r=yield t()}finally{endGroup()}return r}))}t.group=group;function saveState(e,t){a.issueCommand("save-state",{name:e},t)}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return o(this,void 0,void 0,(function*(){return yield d.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken},1234:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issueCommand=void 0;const o=s(r(7147));const a=s(r(2037));const u=r(8541);function issueCommand(e,t){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!o.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}o.appendFileSync(r,`${u.toCommandValue(t)}${a.EOL}`,{encoding:"utf8"})}t.issueCommand=issueCommand},9946:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const i=r(9875);const s=r(2760);const o=r(3031);class OidcClient{static createHttpClient(e=true,t=10){const r={allowRetries:e,maxRetries:t};return new i.HttpClient("actions/oidc-client",[new s.BearerCredentialHandler(OidcClient.getRequestToken())],r)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var t;return n(this,void 0,void 0,(function*(){const r=OidcClient.createHttpClient();const n=yield r.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.result.message}`)}));const i=(t=n.result)===null||t===void 0?void 0:t.value;if(!i){throw new Error("Response json body do not have ID Token field")}return i}))}static getIDToken(e){return n(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const r=encodeURIComponent(e);t=`${t}&audience=${r}`}o.debug(`ID token url is ${t}`);const r=yield OidcClient.getCall(t);o.setSecret(r);return r}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},8541:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandProperties=t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}t.toCommandProperties=toCommandProperties},2760:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from(this.username+":"+this.password).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,t,r){return null}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Bearer "+this.token}canHandleAuthentication(e){return false}handleAuthentication(e,t,r){return null}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from("PAT:"+this.token).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,t,r){return null}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},9875:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(3685);const i=r(5687);const s=r(6502);let o;var a;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(a=t.HttpCodes||(t.HttpCodes={}));var u;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(u=t.Headers||(t.Headers={}));var l;(function(e){e["ApplicationJson"]="application/json"})(l=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){let t=s.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const c=[a.MovedPermanently,a.ResourceMoved,a.SeeOther,a.TemporaryRedirect,a.PermanentRedirect];const f=[a.BadGateway,a.ServiceUnavailable,a.GatewayTimeout];const d=["OPTIONS","GET","DELETE","HEAD"];const p=10;const h=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return new Promise((async(e,t)=>{let r=Buffer.alloc(0);this.message.on("data",(e=>{r=Buffer.concat([r,e])}));this.message.on("end",(()=>{e(r.toString())}))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){let t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,r){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,t){return this.request("OPTIONS",e,null,t||{})}get(e,t){return this.request("GET",e,null,t||{})}del(e,t){return this.request("DELETE",e,null,t||{})}post(e,t,r){return this.request("POST",e,t,r||{})}patch(e,t,r){return this.request("PATCH",e,t,r||{})}put(e,t,r){return this.request("PUT",e,t,r||{})}head(e,t){return this.request("HEAD",e,null,t||{})}sendStream(e,t,r,n){return this.request(e,t,r,n)}async getJson(e,t={}){t[u.Accept]=this._getExistingOrDefaultHeader(t,u.Accept,l.ApplicationJson);let r=await this.get(e,t);return this._processResponse(r,this.requestOptions)}async postJson(e,t,r={}){let n=JSON.stringify(t,null,2);r[u.Accept]=this._getExistingOrDefaultHeader(r,u.Accept,l.ApplicationJson);r[u.ContentType]=this._getExistingOrDefaultHeader(r,u.ContentType,l.ApplicationJson);let i=await this.post(e,n,r);return this._processResponse(i,this.requestOptions)}async putJson(e,t,r={}){let n=JSON.stringify(t,null,2);r[u.Accept]=this._getExistingOrDefaultHeader(r,u.Accept,l.ApplicationJson);r[u.ContentType]=this._getExistingOrDefaultHeader(r,u.ContentType,l.ApplicationJson);let i=await this.put(e,n,r);return this._processResponse(i,this.requestOptions)}async patchJson(e,t,r={}){let n=JSON.stringify(t,null,2);r[u.Accept]=this._getExistingOrDefaultHeader(r,u.Accept,l.ApplicationJson);r[u.ContentType]=this._getExistingOrDefaultHeader(r,u.ContentType,l.ApplicationJson);let i=await this.patch(e,n,r);return this._processResponse(i,this.requestOptions)}async request(e,t,r,n){if(this._disposed){throw new Error("Client has already been disposed.")}let i=new URL(t);let s=this._prepareRequest(e,i,n);let o=this._allowRetries&&d.indexOf(e)!=-1?this._maxRetries+1:1;let u=0;let l;while(u0){const o=l.message.headers["location"];if(!o){break}let a=new URL(o);if(i.protocol=="https:"&&i.protocol!=a.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}await l.readBody();if(a.hostname!==i.hostname){for(let e in n){if(e.toLowerCase()==="authorization"){delete n[e]}}}s=this._prepareRequest(e,a,n);l=await this.requestRaw(s,r);t--}if(f.indexOf(l.message.statusCode)==-1){return l}u+=1;if(u{let callbackForResult=function(e,t){if(e){n(e)}r(t)};this.requestRawWithCallback(e,t,callbackForResult)}))}requestRawWithCallback(e,t,r){let n;if(typeof t==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let i=false;let handleResult=(e,t)=>{if(!i){i=true;r(e,t)}};let s=e.httpModule.request(e.options,(e=>{let t=new HttpClientResponse(e);handleResult(null,t)}));s.on("socket",(e=>{n=e}));s.setTimeout(this._socketTimeout||3*6e4,(()=>{if(n){n.end()}handleResult(new Error("Request timeout: "+e.options.path),null)}));s.on("error",(function(e){handleResult(e,null)}));if(t&&typeof t==="string"){s.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){s.end()}));t.pipe(s)}else{s.end()}}getAgent(e){let t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,r){const s={};s.parsedUrl=t;const o=s.parsedUrl.protocol==="https:";s.httpModule=o?i:n;const a=o?443:80;s.options={};s.options.host=s.parsedUrl.hostname;s.options.port=s.parsedUrl.port?parseInt(s.parsedUrl.port):a;s.options.path=(s.parsedUrl.pathname||"")+(s.parsedUrl.search||"");s.options.method=e;s.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){s.options.headers["user-agent"]=this.userAgent}s.options.agent=this._getAgent(s.parsedUrl);if(this.handlers){this.handlers.forEach((e=>{e.prepareRequest(s.options)}))}return s}_mergeHeaders(e){const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,r){const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{});let n;if(this.requestOptions&&this.requestOptions.headers){n=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||n||r}_getAgent(e){let t;let a=s.getProxyUrl(e);let u=a&&a.hostname;if(this._keepAlive&&u){t=this._proxyAgent}if(this._keepAlive&&!u){t=this._agent}if(!!t){return t}const l=e.protocol==="https:";let c=100;if(!!this.requestOptions){c=this.requestOptions.maxSockets||n.globalAgent.maxSockets}if(u){if(!o){o=r(1353)}const e={maxSockets:c,keepAlive:this._keepAlive,proxy:{...(a.username||a.password)&&{proxyAuth:`${a.username}:${a.password}`},host:a.hostname,port:a.port}};let n;const i=a.protocol==="https:";if(l){n=i?o.httpsOverHttps:o.httpsOverHttp}else{n=i?o.httpOverHttps:o.httpOverHttp}t=n(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:c};t=l?new i.Agent(e):new n.Agent(e);this._agent=t}if(!t){t=l?i.globalAgent:n.globalAgent}if(l&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){e=Math.min(p,e);const t=h*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}static dateTimeDeserializer(e,t){if(typeof t==="string"){let e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}async _processResponse(e,t){return new Promise((async(r,n)=>{const i=e.message.statusCode;const s={statusCode:i,result:null,headers:{}};if(i==a.NotFound){r(s)}let o;let u;try{u=await e.readBody();if(u&&u.length>0){if(t&&t.deserializeDates){o=JSON.parse(u,HttpClient.dateTimeDeserializer)}else{o=JSON.parse(u)}s.result=o}s.headers=e.message.headers}catch(e){}if(i>299){let e;if(o&&o.message){e=o.message}else if(u&&u.length>0){e=u}else{e="Failed request: ("+i+")"}let t=new HttpClientError(e,i);t.result=s.result;n(t)}else{r(s)}}))}}t.HttpClient=HttpClient},6502:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function getProxyUrl(e){let t=e.protocol==="https:";let r;if(checkBypass(e)){return r}let n;if(t){n=process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{n=process.env["http_proxy"]||process.env["HTTP_PROXY"]}if(n){r=new URL(n)}return r}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}let t=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!t){return false}let r;if(e.port){r=Number(e.port)}else if(e.protocol==="http:"){r=80}else if(e.protocol==="https:"){r=443}let n=[e.hostname.toUpperCase()];if(typeof r==="number"){n.push(`${n[0]}:${r}`)}for(let e of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(n.some((t=>t===e))){return true}}return false}t.checkBypass=checkBypass},5774:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});i(r(8348),t);i(r(1598),t);i(r(9844),t);i(r(899),t);i(r(9884),t);i(r(8289),t);i(r(6106),t);i(r(3551),t);i(r(2129),t);i(r(6499),t);i(r(6677),t);i(r(7792),t);i(r(3496),t);i(r(1589),t);i(r(6759),t);i(r(6688),t);i(r(1703),t);i(r(5743),t);i(r(1314),t);i(r(7644),t);i(r(2072),t)},8348:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.contextLogger=void 0;const i=n(r(2491));t.contextLogger=(0,i.default)("context")},1598:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.deprecationLogger=void 0;const i=n(r(2491));t.deprecationLogger=(0,i.default)("deprecation")},9844:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.fetchingProgressLogger=void 0;const i=n(r(2491));t.fetchingProgressLogger=(0,i.default)("fetching-progress")},899:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.hookLogger=void 0;const i=n(r(2491));t.hookLogger=(0,i.default)("hook")},6109:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});i(r(5774),t)},9884:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.installCheckLogger=void 0;const i=n(r(2491));t.installCheckLogger=(0,i.default)("install-check")},8289:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.lifecycleLogger=void 0;const i=n(r(2491));t.lifecycleLogger=(0,i.default)("lifecycle")},6106:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.linkLogger=void 0;const i=n(r(2491));t.linkLogger=(0,i.default)("link")},3551:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.packageImportMethodLogger=void 0;const i=n(r(2491));t.packageImportMethodLogger=(0,i.default)("package-import-method")},2129:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.packageManifestLogger=void 0;const i=n(r(2491));t.packageManifestLogger=(0,i.default)("package-manifest")},6499:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.peerDependencyIssuesLogger=void 0;const i=n(r(2491));t.peerDependencyIssuesLogger=(0,i.default)("peer-dependency-issues")},6677:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.progressLogger=void 0;const i=n(r(2491));t.progressLogger=(0,i.default)("progress")},7792:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true})},3496:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.removalLogger=void 0;const i=n(r(2491));t.removalLogger=(0,i.default)("removal")},1589:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.requestRetryLogger=void 0;const i=n(r(2491));t.requestRetryLogger=(0,i.default)("request-retry")},6759:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.rootLogger=void 0;const i=n(r(2491));t.rootLogger=(0,i.default)("root")},6688:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.scopeLogger=void 0;const i=n(r(2491));t.scopeLogger=(0,i.default)("scope")},1703:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.skippedOptionalDependencyLogger=void 0;const i=n(r(2491));t.skippedOptionalDependencyLogger=(0,i.default)("skipped-optional-dependency")},5743:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.stageLogger=void 0;const i=n(r(2491));t.stageLogger=(0,i.default)("stage")},1314:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.statsLogger=void 0;const i=n(r(2491));t.statsLogger=(0,i.default)("stats")},7644:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.summaryLogger=void 0;const i=n(r(2491));t.summaryLogger=(0,i.default)("summary")},2072:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.updateCheckLogger=void 0;const i=n(r(2491));t.updateCheckLogger=(0,i.default)("update-check")},239:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.ResponseError=t.isRedirect=t.Response=void 0;const o=r(6109);const a=r(461);const u=s(r(3793));Object.defineProperty(t,"Response",{enumerable:true,get:function(){return u.Response}});t.isRedirect=u.default.isRedirect;async function fetchRetry(e,t={}){var r,n,i,s,l;const c=(r=t.retry)!==null&&r!==void 0?r:{};const f=(n=c.retries)!==null&&n!==void 0?n:2;const d=(0,a.operation)({factor:(i=c.factor)!==null&&i!==void 0?i:10,maxTimeout:(s=c.maxTimeout)!==null&&s!==void 0?s:6e4,minTimeout:(l=c.minTimeout)!==null&&l!==void 0?l:1e4,randomize:false,retries:f});try{return await new Promise(((r,n)=>d.attempt((async i=>{var s;try{const n=await(0,u.default)(e,t);if(n.status>=500&&n.status<600||[408,409,420,429].includes(n.status)){throw new ResponseError(n)}else{r(n);return}}catch(r){const a=d.retry(r);if(a===false){n(d.mainError());return}o.requestRetryLogger.debug({attempt:i,error:r,maxRetries:f,method:(s=t.method)!==null&&s!==void 0?s:"GET",timeout:a,url:e.toString()})}}))))}catch(e){if(e instanceof ResponseError){return e.res}throw e}}t["default"]=fetchRetry;class ResponseError extends Error{constructor(e){super(e.statusText);if(Error.captureStackTrace){Error.captureStackTrace(this,ResponseError)}this.name=this.constructor.name;this.res=e;this.code=this.status=this.statusCode=e.status;this.url=e.url}}t.ResponseError=ResponseError},5239:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.fetchWithAgent=void 0;const a=r(7310);const u=o(r(5844));const l=s(r(239));const c="pnpm";const f="application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*";const d="application/json";const p=20;function fetchWithAgent(e,t){var r,n;const i=(0,u.default)(e.toString(),{...t.agentOptions,strictSsl:(r=t.agentOptions.strictSsl)!==null&&r!==void 0?r:true});const s=(n=t.headers)!==null&&n!==void 0?n:{};s["connection"]=i?"keep-alive":"close";return(0,l.default)(e,{...t,agent:i})}t.fetchWithAgent=fetchWithAgent;function default_1(e){return async(t,r)=>{var n,i,s;const o={"user-agent":c,...getHeaders({auth:r===null||r===void 0?void 0:r.authHeaderValue,fullMetadata:e.fullMetadata,userAgent:e.userAgent})};let u=0;let f=new a.URL(t);const d=f.host;while(true){const t={...e,...r,strictSsl:(n=e.strictSsl)!==null&&n!==void 0?n:true};const c=await fetchWithAgent(f,{agentOptions:t,compress:(i=r===null||r===void 0?void 0:r.compress)!==null&&i!==void 0?i:false,headers:o,redirect:"manual",retry:r===null||r===void 0?void 0:r.retry,timeout:(s=r===null||r===void 0?void 0:r.timeout)!==null&&s!==void 0?s:6e4});if(!(0,l.isRedirect)(c.status)||u>=p){return c}u++;f=new a.URL(c.headers.get("location"));if(!o["authorization"]||d===f.host)continue;delete o.authorization}}}t["default"]=default_1;function getHeaders(e){const t={accept:e.fullMetadata===true?d:f};if(e.auth){t["authorization"]=e.auth}if(e.userAgent){t["user-agent"]=e.userAgent}return t}},2043:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.fetchWithAgent=t.createFetchFromRegistry=void 0;const a=o(r(239));const u=s(r(5239));t.createFetchFromRegistry=u.default;Object.defineProperty(t,"fetchWithAgent",{enumerable:true,get:function(){return u.fetchWithAgent}});t["default"]=a.default},2491:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.writeToConsole=t.createStreamParser=t.streamParser=t.globalWarn=t.globalInfo=void 0;const n=r(9344);Object.defineProperty(t,"globalInfo",{enumerable:true,get:function(){return n.globalInfo}});Object.defineProperty(t,"globalWarn",{enumerable:true,get:function(){return n.globalWarn}});const i=r(7234);t.streamParser=i.default;Object.defineProperty(t,"createStreamParser",{enumerable:true,get:function(){return i.createStreamParser}});const s=r(9815);t.writeToConsole=s.default;t["default"]=n.default},9344:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.globalInfo=t.globalWarn=void 0;const n=r(5631);n.setFastTime();t["default"]=n("pnpm");const i=n("pnpm:global");function globalWarn(e){i.warn(e)}t.globalWarn=globalWarn;function globalInfo(e){i.info(e)}t.globalInfo=globalInfo},7234:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createStreamParser=void 0;const n=r(5631);const i=r(9847);t["default"]=createStreamParser();function createStreamParser(){const e=i.parse();n.output([{level:"debug",stream:e}]);return e}t.createStreamParser=createStreamParser},9815:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(5631);function default_1(){n.output([{level:"debug",stream:process.stdout}])}t["default"]=default_1},5844:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=r(7310);const s=n(r(3194));const o=n(r(5283));const a=n(r(72));const u=n(r(1296));const l=n(r(329));const c=s.default.HttpsAgent;const f=50;const d=new u.default({max:50});function getAgent(e,t){var r,n,o;const a=new i.URL(e);const u=a.protocol==="https:";const l=getProxyUri(e,t);const p=[`https:${u.toString()}`,l?`proxy:${l.protocol}//${l.username}:${l.password}@${l.host}:${l.port}`:">no-proxy<",`local-address:${(r=t.localAddress)!==null&&r!==void 0?r:">no-local-address<"}`,`strict-ssl:${u?Boolean(t.strictSsl).toString():">no-strict-ssl<"}`,`ca:${u&&t.ca||">no-ca<"}`,`cert:${u&&t.cert||">no-cert<"}`,`key:${u&&t.key||">no-key<"}`].join(":");if(d.peek(p)){return d.get(p)}if(l){const e=getProxy(l,t,u);d.set(p,e);return e}const h=typeof t.timeout!=="number"||t.timeout===0?0:t.timeout+1;const m=u?new c({ca:t.ca,cert:t.cert,key:t.key,localAddress:t.localAddress,maxSockets:(n=t.maxSockets)!==null&&n!==void 0?n:f,rejectUnauthorized:t.strictSsl,timeout:h}):new s.default({localAddress:t.localAddress,maxSockets:(o=t.maxSockets)!==null&&o!==void 0?o:f,timeout:h});d.set(p,m);return m}t["default"]=getAgent;function checkNoProxy(e,t){const r=new i.URL(e).hostname.split(".").filter((e=>e)).reverse();if(typeof t.noProxy==="string"){const e=t.noProxy.split(/\s*,\s*/g);return e.some((e=>{const t=e.split(".").filter((e=>e)).reverse();if(t.length===0){return false}for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});function once(e,t,{signal:r}={}){return new Promise(((n,i)=>{function cleanup(){r===null||r===void 0?void 0:r.removeEventListener("abort",cleanup);e.removeListener(t,onEvent);e.removeListener("error",onError)}function onEvent(...e){cleanup();n(e)}function onError(e){cleanup();i(e)}r===null||r===void 0?void 0:r.addEventListener("abort",cleanup);e.on(t,onEvent);e.on("error",onError)}))}t["default"]=once},461:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createTimeout=t.createTimeouts=t.operation=void 0;const n=r(2798);function operation(e){var t=createTimeouts(e);return new n.default(t,{maxRetryTime:e&&e.maxRetryTime})}t.operation=operation;function createTimeouts(e){var t={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:Infinity,randomize:false,...e};if(t.minTimeout>t.maxTimeout){throw new Error("minTimeout is greater than maxTimeout")}var r=[];for(var n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:true});class RetryOperation{constructor(e,t){var r;this._originalTimeouts=[...e];this._timeouts=e;this._maxRetryTime=(r=t===null||t===void 0?void 0:t.maxRetryTime)!==null&&r!==void 0?r:Infinity;this._fn=null;this._errors=[];this._attempts=1;this._operationStart=null;this._timer=null}reset(){this._attempts=1;this._timeouts=this._originalTimeouts}stop(){if(this._timer){clearTimeout(this._timer)}this._timeouts=[]}retry(e){if(!e){return false}var t=(new Date).getTime();if(e&&t-this._operationStart>=this._maxRetryTime){this._errors.unshift(new Error("RetryOperation timeout occurred"));return false}this._errors.push(e);var r=this._timeouts.shift();if(r===undefined){return false}this._timer=setTimeout((()=>this._fn(++this._attempts)),r);return r}attempt(e){this._fn=e;this._operationStart=(new Date).getTime();this._fn(this._attempts)}errors(){return this._errors}attempts(){return this._attempts}mainError(){if(this._errors.length===0){return null}var e={};var t=null;var r=0;for(var n=0;n=r){t=i;r=o}}return t}}t["default"]=RetryOperation},5689:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const i=r(2361);const s=n(r(5598));const o=n(r(2135));const a=s.default("agent-base");function isAgent(e){return Boolean(e)&&typeof e.addRequest==="function"}function isSecureEndpoint(){const{stack:e}=new Error;if(typeof e!=="string")return false;return e.split("\n").some((e=>e.indexOf("(https.js:")!==-1||e.indexOf("node:https:")!==-1))}function createAgent(e,t){return new createAgent.Agent(e,t)}(function(e){class Agent extends i.EventEmitter{constructor(e,t){super();let r=t;if(typeof e==="function"){this.callback=e}else if(e){r=e}this.timeout=null;if(r&&typeof r.timeout==="number"){this.timeout=r.timeout}this.maxFreeSockets=1;this.maxSockets=1;this.maxTotalSockets=Infinity;this.sockets={};this.freeSockets={};this.requests={};this.options={}}get defaultPort(){if(typeof this.explicitDefaultPort==="number"){return this.explicitDefaultPort}return isSecureEndpoint()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){if(typeof this.explicitProtocol==="string"){return this.explicitProtocol}return isSecureEndpoint()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,t,r){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,t){const r=Object.assign({},t);if(typeof r.secureEndpoint!=="boolean"){r.secureEndpoint=isSecureEndpoint()}if(r.host==null){r.host="localhost"}if(r.port==null){r.port=r.secureEndpoint?443:80}if(r.protocol==null){r.protocol=r.secureEndpoint?"https:":"http:"}if(r.host&&r.path){delete r.path}delete r.agent;delete r.hostname;delete r._defaultAgent;delete r.defaultPort;delete r.createConnection;e._last=true;e.shouldKeepAlive=false;let n=false;let i=null;const s=r.timeout||this.timeout;const onerror=t=>{if(e._hadError)return;e.emit("error",t);e._hadError=true};const ontimeout=()=>{i=null;n=true;const e=new Error(`A "socket" was not created for HTTP request before ${s}ms`);e.code="ETIMEOUT";onerror(e)};const callbackError=e=>{if(n)return;if(i!==null){clearTimeout(i);i=null}onerror(e)};const onsocket=t=>{if(n)return;if(i!=null){clearTimeout(i);i=null}if(isAgent(t)){a("Callback returned another Agent instance %o",t.constructor.name);t.addRequest(e,r);return}if(t){t.once("free",(()=>{this.freeSocket(t,r)}));e.onSocket(t);return}const s=new Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``);onerror(s)};if(typeof this.callback!=="function"){onerror(new Error("`callback` is not defined"));return}if(!this.promisifiedCallback){if(this.callback.length>=3){a("Converting legacy callback function to promise");this.promisifiedCallback=o.default(this.callback)}else{this.promisifiedCallback=this.callback}}if(typeof s==="number"&&s>0){i=setTimeout(ontimeout,s)}if("port"in r&&typeof r.port!=="number"){r.port=Number(r.port)}try{a("Resolving socket for %o request: %o",r.protocol,`${e.method} ${e.path}`);Promise.resolve(this.promisifiedCallback(e,r)).then(onsocket,callbackError)}catch(e){Promise.reject(e).catch(callbackError)}}freeSocket(e,t){a("Freeing socket %o %o",e.constructor.name,t);e.destroy()}destroy(){a("Destroying agent %o",this.constructor.name)}}e.Agent=Agent;e.prototype=e.Agent.prototype})(createAgent||(createAgent={}));e.exports=createAgent},2135:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function promisify(e){return function(t,r){return new Promise(((n,i)=>{e.call(this,t,r,((e,t)=>{if(e){i(e)}else{n(t)}}))}))}}t["default"]=promisify},3194:(e,t,r)=>{"use strict";e.exports=r(8238);e.exports.HttpsAgent=r(5862);e.exports.constants=r(5483)},8238:(e,t,r)=>{"use strict";const n=r(3685).Agent;const i=r(979);const s=r(5598)("agentkeepalive");const o=r(9386)("agentkeepalive");const{INIT_SOCKET:a,CURRENT_ID:u,CREATE_ID:l,SOCKET_CREATED_TIME:c,SOCKET_NAME:f,SOCKET_REQUEST_COUNT:d,SOCKET_REQUEST_FINISHED_COUNT:p}=r(5483);let h=1;const m=parseInt(process.version.split(".",1)[0].substring(1));if(m>=11&&m<=12){h=2}else if(m>=13){h=3}class Agent extends n{constructor(e){e=e||{};e.keepAlive=e.keepAlive!==false;if(e.freeSocketTimeout===undefined){e.freeSocketTimeout=4e3}if(e.keepAliveTimeout){o("options.keepAliveTimeout is deprecated, please use options.freeSocketTimeout instead");e.freeSocketTimeout=e.keepAliveTimeout;delete e.keepAliveTimeout}if(e.freeSocketKeepAliveTimeout){o("options.freeSocketKeepAliveTimeout is deprecated, please use options.freeSocketTimeout instead");e.freeSocketTimeout=e.freeSocketKeepAliveTimeout;delete e.freeSocketKeepAliveTimeout}if(e.timeout===undefined){e.timeout=Math.max(e.freeSocketTimeout*2,8e3)}e.timeout=i(e.timeout);e.freeSocketTimeout=i(e.freeSocketTimeout);e.socketActiveTTL=e.socketActiveTTL?i(e.socketActiveTTL):0;super(e);this[u]=0;this.createSocketCount=0;this.createSocketCountLastCheck=0;this.createSocketErrorCount=0;this.createSocketErrorCountLastCheck=0;this.closeSocketCount=0;this.closeSocketCountLastCheck=0;this.errorSocketCount=0;this.errorSocketCountLastCheck=0;this.requestCount=0;this.requestCountLastCheck=0;this.timeoutSocketCount=0;this.timeoutSocketCountLastCheck=0;this.on("free",(e=>{const t=this.calcSocketTimeout(e);if(t>0&&e.timeout!==t){e.setTimeout(t)}}))}get freeSocketKeepAliveTimeout(){o("agent.freeSocketKeepAliveTimeout is deprecated, please use agent.options.freeSocketTimeout instead");return this.options.freeSocketTimeout}get timeout(){o("agent.timeout is deprecated, please use agent.options.timeout instead");return this.options.timeout}get socketActiveTTL(){o("agent.socketActiveTTL is deprecated, please use agent.options.socketActiveTTL instead");return this.options.socketActiveTTL}calcSocketTimeout(e){let t=this.options.freeSocketTimeout;const r=this.options.socketActiveTTL;if(r){const n=Date.now()-e[c];const i=r-n;if(i<=0){return i}if(t&&i{if(r)return;r=true;if(n){this.createSocketErrorCount++;return t(n)}this[a](i,e);t(n,i)};const n=super.createConnection(e,onNewCreate);if(n)onNewCreate(null,n)}get statusChanged(){const e=this.createSocketCount!==this.createSocketCountLastCheck||this.createSocketErrorCount!==this.createSocketErrorCountLastCheck||this.closeSocketCount!==this.closeSocketCountLastCheck||this.errorSocketCount!==this.errorSocketCountLastCheck||this.timeoutSocketCount!==this.timeoutSocketCountLastCheck||this.requestCount!==this.requestCountLastCheck;if(e){this.createSocketCountLastCheck=this.createSocketCount;this.createSocketErrorCountLastCheck=this.createSocketErrorCount;this.closeSocketCountLastCheck=this.closeSocketCount;this.errorSocketCountLastCheck=this.errorSocketCount;this.timeoutSocketCountLastCheck=this.timeoutSocketCount;this.requestCountLastCheck=this.requestCount}return e}getCurrentStatus(){return{createSocketCount:this.createSocketCount,createSocketErrorCount:this.createSocketErrorCount,closeSocketCount:this.closeSocketCount,errorSocketCount:this.errorSocketCount,timeoutSocketCount:this.timeoutSocketCount,requestCount:this.requestCount,freeSockets:inspect(this.freeSockets),sockets:inspect(this.sockets),requests:inspect(this.requests)}}}function getSocketTimeout(e){return e.timeout||e._idleTimeout}function installListeners(e,t,r){s("%s create, timeout %sms",t[f],getSocketTimeout(t));function onFree(){if(!t._httpMessage&&t[d]===1)return;t[p]++;e.requestCount++;s("%s(requests: %s, finished: %s) free",t[f],t[d],t[p]);const n=e.getName(r);if(t.writable&&e.requests[n]&&e.requests[n].length){t[d]++;s("%s(requests: %s, finished: %s) will be reuse on agent free event",t[f],t[d],t[p])}}t.on("free",onFree);function onClose(r){s("%s(requests: %s, finished: %s) close, isError: %s",t[f],t[d],t[p],r);e.closeSocketCount++}t.on("close",onClose);function onTimeout(){const n=t.listeners("timeout").length;const i=getSocketTimeout(t);const o=t._httpMessage;const a=o&&o.listeners("timeout").length||0;s("%s(requests: %s, finished: %s) timeout after %sms, listeners %s, defaultTimeoutListenerCount %s, hasHttpRequest %s, HttpRequest timeoutListenerCount %s",t[f],t[d],t[p],i,n,h,!!o,a);if(s.enabled){s("timeout listeners: %s",t.listeners("timeout").map((e=>e.name)).join(", "))}e.timeoutSocketCount++;const u=e.getName(r);if(e.freeSockets[u]&&e.freeSockets[u].indexOf(t)!==-1){t.destroy();e.removeSocket(t,r);s("%s is free, destroy quietly",t[f])}else{if(a===0){const n=new Error("Socket timeout");n.code="ERR_SOCKET_TIMEOUT";n.timeout=i;t.destroy(n);e.removeSocket(t,r);s("%s destroy with timeout error",t[f])}}}t.on("timeout",onTimeout);function onError(r){const n=t.listeners("error").length;s("%s(requests: %s, finished: %s) error: %s, listenerCount: %s",t[f],t[d],t[p],r,n);e.errorSocketCount++;if(n===1){s("%s emit uncaught error event",t[f]);t.removeListener("error",onError);t.emit("error",r)}}t.on("error",onError);function onRemove(){s("%s(requests: %s, finished: %s) agentRemove",t[f],t[d],t[p]);t.removeListener("close",onClose);t.removeListener("error",onError);t.removeListener("free",onFree);t.removeListener("timeout",onTimeout);t.removeListener("agentRemove",onRemove)}t.on("agentRemove",onRemove)}e.exports=Agent;function inspect(e){const t={};for(const r in e){t[r]=e[r].length}return t}},5483:e=>{"use strict";e.exports={CURRENT_ID:Symbol("agentkeepalive#currentId"),CREATE_ID:Symbol("agentkeepalive#createId"),INIT_SOCKET:Symbol("agentkeepalive#initSocket"),CREATE_HTTPS_CONNECTION:Symbol("agentkeepalive#createHttpsConnection"),SOCKET_CREATED_TIME:Symbol("agentkeepalive#socketCreatedTime"),SOCKET_NAME:Symbol("agentkeepalive#socketName"),SOCKET_REQUEST_COUNT:Symbol("agentkeepalive#socketRequestCount"),SOCKET_REQUEST_FINISHED_COUNT:Symbol("agentkeepalive#socketRequestFinishedCount")}},5862:(e,t,r)=>{"use strict";const n=r(5687).Agent;const i=r(8238);const{INIT_SOCKET:s,CREATE_HTTPS_CONNECTION:o}=r(5483);class HttpsAgent extends i{constructor(e){super(e);this.defaultPort=443;this.protocol="https:";this.maxCachedSessions=this.options.maxCachedSessions;if(this.maxCachedSessions===undefined){this.maxCachedSessions=100}this._sessionCache={map:{},list:[]}}createConnection(e){const t=this[o](e);this[s](t,e);return t}}HttpsAgent.prototype[o]=n.prototype.createConnection;["getName","_getSession","_cacheSession","_evictSession"].forEach((function(e){if(typeof n.prototype[e]==="function"){HttpsAgent.prototype[e]=n.prototype[e]}}));e.exports=HttpsAgent},8438:(e,t,r)=>{"use strict";var n=r(5391),i=r(6650),s=r(6281),o=r(5738),a=r(4486),u=r(229),l=r(6072),c=r(7178),f=r(3162);e.exports=Ajv;Ajv.prototype.validate=validate;Ajv.prototype.compile=compile;Ajv.prototype.addSchema=addSchema;Ajv.prototype.addMetaSchema=addMetaSchema;Ajv.prototype.validateSchema=validateSchema;Ajv.prototype.getSchema=getSchema;Ajv.prototype.removeSchema=removeSchema;Ajv.prototype.addFormat=addFormat;Ajv.prototype.errorsText=errorsText;Ajv.prototype._addSchema=_addSchema;Ajv.prototype._compile=_compile;Ajv.prototype.compileAsync=r(5911);var d=r(7975);Ajv.prototype.addKeyword=d.add;Ajv.prototype.getKeyword=d.get;Ajv.prototype.removeKeyword=d.remove;Ajv.prototype.validateKeyword=d.validate;var p=r(2485);Ajv.ValidationError=p.Validation;Ajv.MissingRefError=p.MissingRef;Ajv.$dataMetaSchema=c;var h="http://json-schema.org/draft-07/schema";var m=["removeAdditional","useDefaults","coerceTypes","strictDefaults"];var v=["/properties"];function Ajv(e){if(!(this instanceof Ajv))return new Ajv(e);e=this._opts=f.copy(e)||{};setLogger(this);this._schemas={};this._refs={};this._fragments={};this._formats=u(e.format);this._cache=e.cache||new s;this._loadingSchemas={};this._compilations=[];this.RULES=l();this._getId=chooseGetId(e);e.loopRequired=e.loopRequired||Infinity;if(e.errorDataPath=="property")e._errorDataPathProperty=true;if(e.serialize===undefined)e.serialize=a;this._metaOpts=getMetaSchemaOptions(this);if(e.formats)addInitialFormats(this);if(e.keywords)addInitialKeywords(this);addDefaultMetaSchema(this);if(typeof e.meta=="object")this.addMetaSchema(e.meta);if(e.nullable)this.addKeyword("nullable",{metaSchema:{type:"boolean"}});addInitialSchemas(this)}function validate(e,t){var r;if(typeof e=="string"){r=this.getSchema(e);if(!r)throw new Error('no schema with key or ref "'+e+'"')}else{var n=this._addSchema(e);r=n.validate||this._compile(n)}var i=r(t);if(r.$async!==true)this.errors=r.errors;return i}function compile(e,t){var r=this._addSchema(e,undefined,t);return r.validate||this._compile(r)}function addSchema(e,t,r,n){if(Array.isArray(e)){for(var s=0;s{"use strict";var t=e.exports=function Cache(){this._cache={}};t.prototype.put=function Cache_put(e,t){this._cache[e]=t};t.prototype.get=function Cache_get(e){return this._cache[e]};t.prototype.del=function Cache_del(e){delete this._cache[e]};t.prototype.clear=function Cache_clear(){this._cache={}}},5911:(e,t,r)=>{"use strict";var n=r(2485).MissingRef;e.exports=compileAsync;function compileAsync(e,t,r){var i=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");if(typeof t=="function"){r=t;t=undefined}var s=loadMetaSchemaOf(e).then((function(){var r=i._addSchema(e,undefined,t);return r.validate||_compileAsync(r)}));if(r){s.then((function(e){r(null,e)}),r)}return s;function loadMetaSchemaOf(e){var t=e.$schema;return t&&!i.getSchema(t)?compileAsync.call(i,{$ref:t},true):Promise.resolve()}function _compileAsync(e){try{return i._compile(e)}catch(e){if(e instanceof n)return loadMissingSchema(e);throw e}function loadMissingSchema(r){var n=r.missingSchema;if(added(n))throw new Error("Schema "+n+" is loaded but "+r.missingRef+" cannot be resolved");var s=i._loadingSchemas[n];if(!s){s=i._loadingSchemas[n]=i._opts.loadSchema(n);s.then(removePromise,removePromise)}return s.then((function(e){if(!added(n)){return loadMetaSchemaOf(e).then((function(){if(!added(n))i.addSchema(e,n,undefined,t)}))}})).then((function(){return _compileAsync(e)}));function removePromise(){delete i._loadingSchemas[n]}function added(e){return i._refs[e]||i._schemas[e]}}}}},2485:(e,t,r)=>{"use strict";var n=r(6650);e.exports={Validation:errorSubclass(ValidationError),MissingRef:errorSubclass(MissingRefError)};function ValidationError(e){this.message="validation failed";this.errors=e;this.ajv=this.validation=true}MissingRefError.message=function(e,t){return"can't resolve reference "+t+" from id "+e};function MissingRefError(e,t,r){this.message=r||MissingRefError.message(e,t);this.missingRef=n.url(e,t);this.missingSchema=n.normalizeId(n.fullPath(this.missingRef))}function errorSubclass(e){e.prototype=Object.create(Error.prototype);e.prototype.constructor=e;return e}},229:(e,t,r)=>{"use strict";var n=r(3162);var i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;var s=[0,31,28,31,30,31,30,31,31,30,31,30,31];var o=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;var a=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;var u=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var l=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var c=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;var f=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;var d=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;var p=/^(?:\/(?:[^~/]|~0|~1)*)*$/;var h=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;var m=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;e.exports=formats;function formats(e){e=e=="full"?"full":"fast";return n.copy(formats[e])}formats.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":c,url:f,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:d,"json-pointer":p,"json-pointer-uri-fragment":h,"relative-json-pointer":m};formats.full={date:date,time:time,"date-time":date_time,uri:uri,"uri-reference":l,"uri-template":c,url:f,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:d,"json-pointer":p,"json-pointer-uri-fragment":h,"relative-json-pointer":m};function isLeapYear(e){return e%4===0&&(e%100!==0||e%400===0)}function date(e){var t=e.match(i);if(!t)return false;var r=+t[1];var n=+t[2];var o=+t[3];return n>=1&&n<=12&&o>=1&&o<=(n==2&&isLeapYear(r)?29:s[n])}function time(e,t){var r=e.match(o);if(!r)return false;var n=r[1];var i=r[2];var s=r[3];var a=r[5];return(n<=23&&i<=59&&s<=59||n==23&&i==59&&s==60)&&(!t||a)}var v=/t|\s/i;function date_time(e){var t=e.split(v);return t.length==2&&date(t[0])&&time(t[1],true)}var g=/\/|:/;function uri(e){return g.test(e)&&u.test(e)}var y=/[^\\]\\Z/;function regex(e){if(y.test(e))return false;try{new RegExp(e);return true}catch(e){return false}}},5391:(e,t,r)=>{"use strict";var n=r(6650),i=r(3162),s=r(2485),o=r(4486);var a=r(734);var u=i.ucs2length;var l=r(3064);var c=s.Validation;e.exports=compile;function compile(e,t,r,f){var d=this,p=this._opts,h=[undefined],m={},v=[],g={},y=[],b={},S=[];t=t||{schema:e,refVal:h,refs:m};var w=checkCompiling.call(this,e,t,f);var _=this._compilations[w.index];if(w.compiling)return _.callValidate=callValidate;var E=this._formats;var k=this.RULES;try{var P=localCompile(e,t,r,f);_.validate=P;var C=_.callValidate;if(C){C.schema=P.schema;C.errors=null;C.refs=P.refs;C.refVal=P.refVal;C.root=P.root;C.$async=P.$async;if(p.sourceCode)C.source=P.source}return P}finally{endCompiling.call(this,e,t,f)}function callValidate(){var e=_.validate;var t=e.apply(this,arguments);callValidate.errors=e.errors;return t}function localCompile(e,r,o,f){var g=!r||r&&r.schema==e;if(r.schema!=t.schema)return compile.call(d,e,r,o,f);var b=e.$async===true;var w=a({isTop:true,schema:e,isRoot:g,baseId:f,root:r,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:s.MissingRef,RULES:k,validate:a,util:i,resolve:n,resolveRef:resolveRef,usePattern:usePattern,useDefault:useDefault,useCustomRule:useCustomRule,opts:p,formats:E,logger:d.logger,self:d});w=vars(h,refValCode)+vars(v,patternCode)+vars(y,defaultCode)+vars(S,customRuleCode)+w;if(p.processCode)w=p.processCode(w,e);var _;try{var P=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",w);_=P(d,k,E,t,h,y,S,l,u,c);h[0]=_}catch(e){d.logger.error("Error compiling schema, function code:",w);throw e}_.schema=e;_.errors=null;_.refs=m;_.refVal=h;_.root=g?_:r;if(b)_.$async=true;if(p.sourceCode===true){_.source={code:w,patterns:v,defaults:y}}return _}function resolveRef(e,i,s){i=n.url(e,i);var o=m[i];var a,u;if(o!==undefined){a=h[o];u="refVal["+o+"]";return resolvedRef(a,u)}if(!s&&t.refs){var l=t.refs[i];if(l!==undefined){a=t.refVal[l];u=addLocalRef(i,a);return resolvedRef(a,u)}}u=addLocalRef(i);var c=n.call(d,localCompile,t,i);if(c===undefined){var f=r&&r[i];if(f){c=n.inlineRef(f,p.inlineRefs)?f:compile.call(d,f,t,r,e)}}if(c===undefined){removeLocalRef(i)}else{replaceLocalRef(i,c);return resolvedRef(c,u)}}function addLocalRef(e,t){var r=h.length;h[r]=t;m[e]=r;return"refVal"+r}function removeLocalRef(e){delete m[e]}function replaceLocalRef(e,t){var r=m[e];h[r]=t}function resolvedRef(e,t){return typeof e=="object"||typeof e=="boolean"?{code:t,schema:e,inline:true}:{code:t,$async:e&&!!e.$async}}function usePattern(e){var t=g[e];if(t===undefined){t=g[e]=v.length;v[t]=e}return"pattern"+t}function useDefault(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return i.toQuotedString(e);case"object":if(e===null)return"null";var t=o(e);var r=b[t];if(r===undefined){r=b[t]=y.length;y[r]=e}return"default"+r}}function useCustomRule(e,t,r,n){if(d._opts.validateSchema!==false){var i=e.definition.dependencies;if(i&&!i.every((function(e){return Object.prototype.hasOwnProperty.call(r,e)})))throw new Error("parent schema must have all required keywords: "+i.join(","));var s=e.definition.validateSchema;if(s){var o=s(t);if(!o){var a="keyword schema is invalid: "+d.errorsText(s.errors);if(d._opts.validateSchema=="log")d.logger.error(a);else throw new Error(a)}}}var u=e.definition.compile,l=e.definition.inline,c=e.definition.macro;var f;if(u){f=u.call(d,t,r,n)}else if(c){f=c.call(d,t,r,n);if(p.validateSchema!==false)d.validateSchema(f,true)}else if(l){f=l.call(d,n,e.keyword,t,r)}else{f=e.definition.validate;if(!f)return}if(f===undefined)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=S.length;S[h]=f;return{code:"customRule"+h,validate:f}}}function checkCompiling(e,t,r){var n=compIndex.call(this,e,t,r);if(n>=0)return{index:n,compiling:true};n=this._compilations.length;this._compilations[n]={schema:e,root:t,baseId:r};return{index:n,compiling:false}}function endCompiling(e,t,r){var n=compIndex.call(this,e,t,r);if(n>=0)this._compilations.splice(n,1)}function compIndex(e,t,r){for(var n=0;n{"use strict";var n=r(626),i=r(3064),s=r(3162),o=r(5738),a=r(8154);e.exports=resolve;resolve.normalizeId=normalizeId;resolve.fullPath=getFullPath;resolve.url=resolveUrl;resolve.ids=resolveIds;resolve.inlineRef=inlineRef;resolve.schema=resolveSchema;function resolve(e,t,r){var n=this._refs[r];if(typeof n=="string"){if(this._refs[n])n=this._refs[n];else return resolve.call(this,e,t,n)}n=n||this._schemas[r];if(n instanceof o){return inlineRef(n.schema,this._opts.inlineRefs)?n.schema:n.validate||this._compile(n)}var i=resolveSchema.call(this,t,r);var s,a,u;if(i){s=i.schema;t=i.root;u=i.baseId}if(s instanceof o){a=s.validate||e.call(this,s.schema,t,undefined,u)}else if(s!==undefined){a=inlineRef(s,this._opts.inlineRefs)?s:e.call(this,s,t,undefined,u)}return a}function resolveSchema(e,t){var r=n.parse(t),i=_getFullPath(r),s=getFullPath(this._getId(e.schema));if(Object.keys(e.schema).length===0||i!==s){var a=normalizeId(i);var u=this._refs[a];if(typeof u=="string"){return resolveRecursive.call(this,e,u,r)}else if(u instanceof o){if(!u.validate)this._compile(u);e=u}else{u=this._schemas[a];if(u instanceof o){if(!u.validate)this._compile(u);if(a==normalizeId(t))return{schema:u,root:e,baseId:s};e=u}else{return}}if(!e.schema)return;s=getFullPath(this._getId(e.schema))}return getJsonPointer.call(this,r,s,e.schema,e)}function resolveRecursive(e,t,r){var n=resolveSchema.call(this,e,t);if(n){var i=n.schema;var s=n.baseId;e=n.root;var o=this._getId(i);if(o)s=resolveUrl(s,o);return getJsonPointer.call(this,r,s,i,e)}}var u=s.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(e,t,r,n){e.fragment=e.fragment||"";if(e.fragment.slice(0,1)!="/")return;var i=e.fragment.split("/");for(var o=1;o{"use strict";var n=r(1960),i=r(3162).toHash;e.exports=function rules(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}];var t=["type","$comment"];var r=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"];var s=["number","integer","string","array","object","boolean","null"];e.all=i(t);e.types=i(s);e.forEach((function(r){r.rules=r.rules.map((function(r){var i;if(typeof r=="object"){var s=Object.keys(r)[0];i=r[s];r=s;i.forEach((function(r){t.push(r);e.all[r]=true}))}t.push(r);var o=e.all[r]={keyword:r,code:n[r],implements:i};return o}));e.all.$comment={keyword:"$comment",code:n.$comment};if(r.type)e.types[r.type]=r}));e.keywords=i(t.concat(r));e.custom={};return e}},5738:(e,t,r)=>{"use strict";var n=r(3162);e.exports=SchemaObject;function SchemaObject(e){n.copy(e,this)}},6103:e=>{"use strict";e.exports=function ucs2length(e){var t=0,r=e.length,n=0,i;while(n=55296&&i<=56319&&n{"use strict";e.exports={copy:copy,checkDataType:checkDataType,checkDataTypes:checkDataTypes,coerceToTypes:coerceToTypes,toHash:toHash,getProperty:getProperty,escapeQuotes:escapeQuotes,equal:r(3064),ucs2length:r(6103),varOccurences:varOccurences,varReplace:varReplace,schemaHasRules:schemaHasRules,schemaHasRulesExcept:schemaHasRulesExcept,schemaUnknownRules:schemaUnknownRules,toQuotedString:toQuotedString,getPathExpr:getPathExpr,getPath:getPath,getData:getData,unescapeFragment:unescapeFragment,unescapeJsonPointer:unescapeJsonPointer,escapeFragment:escapeFragment,escapeJsonPointer:escapeJsonPointer};function copy(e,t){t=t||{};for(var r in e)t[r]=e[r];return t}function checkDataType(e,t,r,n){var i=n?" !== ":" === ",s=n?" || ":" && ",o=n?"!":"",a=n?"":"!";switch(e){case"null":return t+i+"null";case"array":return o+"Array.isArray("+t+")";case"object":return"("+o+t+s+"typeof "+t+i+'"object"'+s+a+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+i+'"number"'+s+a+"("+t+" % 1)"+s+t+i+t+(r?s+o+"isFinite("+t+")":"")+")";case"number":return"(typeof "+t+i+'"'+e+'"'+(r?s+o+"isFinite("+t+")":"")+")";default:return"typeof "+t+i+'"'+e+'"'}}function checkDataTypes(e,t,r){switch(e.length){case 1:return checkDataType(e[0],t,r,true);default:var n="";var i=toHash(e);if(i.array&&i.object){n=i.null?"(":"(!"+t+" || ";n+="typeof "+t+' !== "object")';delete i.null;delete i.array;delete i.object}if(i.number)delete i.integer;for(var s in i)n+=(n?" && ":"")+checkDataType(s,t,r,true);return n}}var n=toHash(["string","number","integer","boolean","null"]);function coerceToTypes(e,t){if(Array.isArray(t)){var r=[];for(var i=0;i=t)throw new Error("Cannot access property/index "+n+" levels up, current level is "+t);return r[t-n]}if(n>t)throw new Error("Cannot access data "+n+" levels up, current level is "+t);s="data"+(t-n||"");if(!i)return s}var l=s;var c=i.split("/");for(var f=0;f{"use strict";var t=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,r){for(var n=0;n{"use strict";var n=r(8703);e.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:n.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:n.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}},2813:e=>{"use strict";e.exports=function generate__limit(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c;var f="data"+(s||"");var d=e.opts.$data&&o&&o.$data,p;if(d){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";p="schema"+i}else{p=o}var h=t=="maximum",m=h?"exclusiveMaximum":"exclusiveMinimum",v=e.schema[m],g=e.opts.$data&&v&&v.$data,y=h?"<":">",b=h?">":"<",c=undefined;if(!(d||typeof o=="number"||o===undefined)){throw new Error(t+" must be number")}if(!(g||v===undefined||typeof v=="number"||typeof v=="boolean")){throw new Error(m+" must be number or boolean")}if(g){var S=e.util.getData(v.$data,s,e.dataPathArr),w="exclusive"+i,_="exclType"+i,E="exclIsNumber"+i,k="op"+i,P="' + "+k+" + '";n+=" var schemaExcl"+i+" = "+S+"; ";S="schemaExcl"+i;n+=" var "+w+"; var "+_+" = typeof "+S+"; if ("+_+" != 'boolean' && "+_+" != 'undefined' && "+_+" != 'number') { ";var c=m;var C=C||[];C.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+(c||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ";if(e.opts.messages!==false){n+=" , message: '"+m+" should be boolean' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "}n+=" } "}else{n+=" {} "}var x=n;n=C.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+x+"]); "}else{n+=" validate.errors = ["+x+"]; return false; "}}else{n+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } else if ( ";if(d){n+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "}n+=" "+_+" == 'number' ? ( ("+w+" = "+p+" === undefined || "+S+" "+y+"= "+p+") ? "+f+" "+b+"= "+S+" : "+f+" "+b+" "+p+" ) : ( ("+w+" = "+S+" === true) ? "+f+" "+b+"= "+p+" : "+f+" "+b+" "+p+" ) || "+f+" !== "+f+") { var op"+i+" = "+w+" ? '"+y+"' : '"+y+"='; ";if(o===undefined){c=m;u=e.errSchemaPath+"/"+m;p=S;d=g}}else{var E=typeof v=="number",P=y;if(E&&d){var k="'"+P+"'";n+=" if ( ";if(d){n+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "}n+=" ( "+p+" === undefined || "+v+" "+y+"= "+p+" ? "+f+" "+b+"= "+v+" : "+f+" "+b+" "+p+" ) || "+f+" !== "+f+") { "}else{if(E&&o===undefined){w=true;c=m;u=e.errSchemaPath+"/"+m;p=v;b+="="}else{if(E)p=Math[h?"min":"max"](v,o);if(v===(E?p:true)){w=true;c=m;u=e.errSchemaPath+"/"+m;b+="="}else{w=false;P+="="}}var k="'"+P+"'";n+=" if ( ";if(d){n+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "}n+=" "+f+" "+b+" "+p+" || "+f+" !== "+f+") { "}}c=c||t;var C=C||[];C.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+(c||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+k+", limit: "+p+", exclusive: "+w+" } ";if(e.opts.messages!==false){n+=" , message: 'should be "+P+" ";if(d){n+="' + "+p}else{n+=""+p+"'"}}if(e.opts.verbose){n+=" , schema: ";if(d){n+="validate.schema"+a}else{n+=""+o}n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "}n+=" } "}else{n+=" {} "}var x=n;n=C.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+x+"]); "}else{n+=" validate.errors = ["+x+"]; return false; "}}else{n+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } ";if(l){n+=" else { "}return n}},9809:e=>{"use strict";e.exports=function generate__limitItems(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c;var f="data"+(s||"");var d=e.opts.$data&&o&&o.$data,p;if(d){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";p="schema"+i}else{p=o}if(!(d||typeof o=="number")){throw new Error(t+" must be number")}var h=t=="maxItems"?">":"<";n+="if ( ";if(d){n+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "}n+=" "+f+".length "+h+" "+p+") { ";var c=t;var m=m||[];m.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+(c||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+p+" } ";if(e.opts.messages!==false){n+=" , message: 'should NOT have ";if(t=="maxItems"){n+="more"}else{n+="fewer"}n+=" than ";if(d){n+="' + "+p+" + '"}else{n+=""+o}n+=" items' "}if(e.opts.verbose){n+=" , schema: ";if(d){n+="validate.schema"+a}else{n+=""+o}n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "}n+=" } "}else{n+=" {} "}var v=n;n=m.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+v+"]); "}else{n+=" validate.errors = ["+v+"]; return false; "}}else{n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+="} ";if(l){n+=" else { "}return n}},5356:e=>{"use strict";e.exports=function generate__limitLength(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c;var f="data"+(s||"");var d=e.opts.$data&&o&&o.$data,p;if(d){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";p="schema"+i}else{p=o}if(!(d||typeof o=="number")){throw new Error(t+" must be number")}var h=t=="maxLength"?">":"<";n+="if ( ";if(d){n+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "}if(e.opts.unicode===false){n+=" "+f+".length "}else{n+=" ucs2length("+f+") "}n+=" "+h+" "+p+") { ";var c=t;var m=m||[];m.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+(c||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+p+" } ";if(e.opts.messages!==false){n+=" , message: 'should NOT be ";if(t=="maxLength"){n+="longer"}else{n+="shorter"}n+=" than ";if(d){n+="' + "+p+" + '"}else{n+=""+o}n+=" characters' "}if(e.opts.verbose){n+=" , schema: ";if(d){n+="validate.schema"+a}else{n+=""+o}n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "}n+=" } "}else{n+=" {} "}var v=n;n=m.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+v+"]); "}else{n+=" validate.errors = ["+v+"]; return false; "}}else{n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+="} ";if(l){n+=" else { "}return n}},7500:e=>{"use strict";e.exports=function generate__limitProperties(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c;var f="data"+(s||"");var d=e.opts.$data&&o&&o.$data,p;if(d){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";p="schema"+i}else{p=o}if(!(d||typeof o=="number")){throw new Error(t+" must be number")}var h=t=="maxProperties"?">":"<";n+="if ( ";if(d){n+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "}n+=" Object.keys("+f+").length "+h+" "+p+") { ";var c=t;var m=m||[];m.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+(c||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+p+" } ";if(e.opts.messages!==false){n+=" , message: 'should NOT have ";if(t=="maxProperties"){n+="more"}else{n+="fewer"}n+=" than ";if(d){n+="' + "+p+" + '"}else{n+=""+o}n+=" properties' "}if(e.opts.verbose){n+=" , schema: ";if(d){n+="validate.schema"+a}else{n+=""+o}n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "}n+=" } "}else{n+=" {} "}var v=n;n=m.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+v+"]); "}else{n+=" validate.errors = ["+v+"]; return false; "}}else{n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+="} ";if(l){n+=" else { "}return n}},6265:e=>{"use strict";e.exports=function generate_allOf(e,t,r){var n=" ";var i=e.schema[t];var s=e.schemaPath+e.util.getProperty(t);var o=e.errSchemaPath+"/"+t;var a=!e.opts.allErrors;var u=e.util.copy(e);var l="";u.level++;var c="valid"+u.level;var f=u.baseId,d=true;var p=i;if(p){var h,m=-1,v=p.length-1;while(m0||h===false:e.util.schemaHasRules(h,e.RULES.all)){d=false;u.schema=h;u.schemaPath=s+"["+m+"]";u.errSchemaPath=o+"/"+m;n+=" "+e.validate(u)+" ";u.baseId=f;if(a){n+=" if ("+c+") { ";l+="}"}}}}if(a){if(d){n+=" if (true) { "}else{n+=" "+l.slice(0,-1)+" "}}return n}},2816:e=>{"use strict";e.exports=function generate_anyOf(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="valid"+i;var d="errs__"+i;var p=e.util.copy(e);var h="";p.level++;var m="valid"+p.level;var v=o.every((function(t){return e.opts.strictKeywords?typeof t=="object"&&Object.keys(t).length>0||t===false:e.util.schemaHasRules(t,e.RULES.all)}));if(v){var g=p.baseId;n+=" var "+d+" = errors; var "+f+" = false; ";var y=e.compositeRule;e.compositeRule=p.compositeRule=true;var b=o;if(b){var S,w=-1,_=b.length-1;while(w<_){S=b[w+=1];p.schema=S;p.schemaPath=a+"["+w+"]";p.errSchemaPath=u+"/"+w;n+=" "+e.validate(p)+" ";p.baseId=g;n+=" "+f+" = "+f+" || "+m+"; if (!"+f+") { ";h+="}"}}e.compositeRule=p.compositeRule=y;n+=" "+h+" if (!"+f+") { var err = ";if(e.createErrors!==false){n+=" { keyword: '"+"anyOf"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ";if(e.opts.messages!==false){n+=" , message: 'should match some schema in anyOf' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(vErrors); "}else{n+=" validate.errors = vErrors; return false; "}}n+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ";if(e.opts.allErrors){n+=" } "}}else{if(l){n+=" if (true) { "}}return n}},4302:e=>{"use strict";e.exports=function generate_comment(e,t,r){var n=" ";var i=e.schema[t];var s=e.errSchemaPath+"/"+t;var o=!e.opts.allErrors;var a=e.util.toQuotedString(i);if(e.opts.$comment===true){n+=" console.log("+a+");"}else if(typeof e.opts.$comment=="function"){n+=" self._opts.$comment("+a+", "+e.util.toQuotedString(s)+", validate.root.schema);"}return n}},3641:e=>{"use strict";e.exports=function generate_const(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="valid"+i;var d=e.opts.$data&&o&&o.$data,p;if(d){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";p="schema"+i}else{p=o}if(!d){n+=" var schema"+i+" = validate.schema"+a+";"}n+="var "+f+" = equal("+c+", schema"+i+"); if (!"+f+") { ";var h=h||[];h.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"const"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { allowedValue: schema"+i+" } ";if(e.opts.messages!==false){n+=" , message: 'should be equal to constant' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var m=n;n=h.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+m+"]); "}else{n+=" validate.errors = ["+m+"]; return false; "}}else{n+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" }";if(l){n+=" else { "}return n}},6665:e=>{"use strict";e.exports=function generate_contains(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="valid"+i;var d="errs__"+i;var p=e.util.copy(e);var h="";p.level++;var m="valid"+p.level;var v="i"+i,g=p.dataLevel=e.dataLevel+1,y="data"+g,b=e.baseId,S=e.opts.strictKeywords?typeof o=="object"&&Object.keys(o).length>0||o===false:e.util.schemaHasRules(o,e.RULES.all);n+="var "+d+" = errors;var "+f+";";if(S){var w=e.compositeRule;e.compositeRule=p.compositeRule=true;p.schema=o;p.schemaPath=a;p.errSchemaPath=u;n+=" var "+m+" = false; for (var "+v+" = 0; "+v+" < "+c+".length; "+v+"++) { ";p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,true);var _=c+"["+v+"]";p.dataPathArr[g]=v;var E=e.validate(p);p.baseId=b;if(e.util.varOccurences(E,y)<2){n+=" "+e.util.varReplace(E,y,_)+" "}else{n+=" var "+y+" = "+_+"; "+E+" "}n+=" if ("+m+") break; } ";e.compositeRule=p.compositeRule=w;n+=" "+h+" if (!"+m+") {"}else{n+=" if ("+c+".length == 0) {"}var k=k||[];k.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"contains"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ";if(e.opts.messages!==false){n+=" , message: 'should contain a valid item' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var P=n;n=k.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+P+"]); "}else{n+=" validate.errors = ["+P+"]; return false; "}}else{n+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } else { ";if(S){n+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } "}if(e.opts.allErrors){n+=" } "}return n}},8343:e=>{"use strict";e.exports=function generate_custom(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c;var f="data"+(s||"");var d="valid"+i;var p="errs__"+i;var h=e.opts.$data&&o&&o.$data,m;if(h){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";m="schema"+i}else{m=o}var v=this,g="definition"+i,y=v.definition,b="";var S,w,_,E,k;if(h&&y.$data){k="keywordValidate"+i;var P=y.validateSchema;n+=" var "+g+" = RULES.custom['"+t+"'].definition; var "+k+" = "+g+".validate;"}else{E=e.useCustomRule(v,o,e.schema,e);if(!E)return;m="validate.schema"+a;k=E.code;S=y.compile;w=y.inline;_=y.macro}var C=k+".errors",x="i"+i,O="ruleErr"+i,R=y.async;if(R&&!e.async)throw new Error("async keyword in sync schema");if(!(w||_)){n+=""+C+" = null;"}n+="var "+p+" = errors;var "+d+";";if(h&&y.$data){b+="}";n+=" if ("+m+" === undefined) { "+d+" = true; } else { ";if(P){b+="}";n+=" "+d+" = "+g+".validateSchema("+m+"); if ("+d+") { "}}if(w){if(y.statements){n+=" "+E.validate+" "}else{n+=" "+d+" = "+E.validate+"; "}}else if(_){var I=e.util.copy(e);var b="";I.level++;var A="valid"+I.level;I.schema=E.validate;I.schemaPath="";var T=e.compositeRule;e.compositeRule=I.compositeRule=true;var D=e.validate(I).replace(/validate\.schema/g,k);e.compositeRule=I.compositeRule=T;n+=" "+D}else{var F=F||[];F.push(n);n="";n+=" "+k+".call( ";if(e.opts.passContext){n+="this"}else{n+="self"}if(S||y.schema===false){n+=" , "+f+" "}else{n+=" , "+m+" , "+f+" , validate.schema"+e.schemaPath+" "}n+=" , (dataPath || '')";if(e.errorPath!='""'){n+=" + "+e.errorPath}var L=s?"data"+(s-1||""):"parentData",N=s?e.dataPathArr[s]:"parentDataProperty";n+=" , "+L+" , "+N+" , rootData ) ";var j=n;n=F.pop();if(y.errors===false){n+=" "+d+" = ";if(R){n+="await "}n+=""+j+"; "}else{if(R){C="customErrors"+i;n+=" var "+C+" = null; try { "+d+" = await "+j+"; } catch (e) { "+d+" = false; if (e instanceof ValidationError) "+C+" = e.errors; else throw e; } "}else{n+=" "+C+" = null; "+d+" = "+j+"; "}}}if(y.modifying){n+=" if ("+L+") "+f+" = "+L+"["+N+"];"}n+=""+b;if(y.valid){if(l){n+=" if (true) { "}}else{n+=" if ( ";if(y.valid===undefined){n+=" !";if(_){n+=""+A}else{n+=""+d}}else{n+=" "+!y.valid+" "}n+=") { ";c=v.keyword;var F=F||[];F.push(n);n="";var F=F||[];F.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+(c||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+v.keyword+"' } ";if(e.opts.messages!==false){n+=" , message: 'should pass \""+v.keyword+"\" keyword validation' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "}n+=" } "}else{n+=" {} "}var B=n;n=F.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+B+"]); "}else{n+=" validate.errors = ["+B+"]; return false; "}}else{n+=" var err = "+B+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}var M=n;n=F.pop();if(w){if(y.errors){if(y.errors!="full"){n+=" for (var "+x+"="+p+"; "+x+"{"use strict";e.exports=function generate_dependencies(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="errs__"+i;var d=e.util.copy(e);var p="";d.level++;var h="valid"+d.level;var m={},v={},g=e.opts.ownProperties;for(w in o){if(w=="__proto__")continue;var y=o[w];var b=Array.isArray(y)?v:m;b[w]=y}n+="var "+f+" = errors;";var S=e.errorPath;n+="var missing"+i+";";for(var w in v){b=v[w];if(b.length){n+=" if ( "+c+e.util.getProperty(w)+" !== undefined ";if(g){n+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(w)+"') "}if(l){n+=" && ( ";var _=b;if(_){var E,k=-1,P=_.length-1;while(k0||y===false:e.util.schemaHasRules(y,e.RULES.all)){n+=" "+h+" = true; if ( "+c+e.util.getProperty(w)+" !== undefined ";if(g){n+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(w)+"') "}n+=") { ";d.schema=y;d.schemaPath=a+e.util.getProperty(w);d.errSchemaPath=u+"/"+e.util.escapeFragment(w);n+=" "+e.validate(d)+" ";d.baseId=L;n+=" } ";if(l){n+=" if ("+h+") { ";p+="}"}}}if(l){n+=" "+p+" if ("+f+" == errors) {"}return n}},5625:e=>{"use strict";e.exports=function generate_enum(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="valid"+i;var d=e.opts.$data&&o&&o.$data,p;if(d){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";p="schema"+i}else{p=o}var h="i"+i,m="schema"+i;if(!d){n+=" var "+m+" = validate.schema"+a+";"}n+="var "+f+";";if(d){n+=" if (schema"+i+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+i+")) "+f+" = false; else {"}n+=""+f+" = false;for (var "+h+"=0; "+h+"<"+m+".length; "+h+"++) if (equal("+c+", "+m+"["+h+"])) { "+f+" = true; break; }";if(d){n+=" } "}n+=" if (!"+f+") { ";var v=v||[];v.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"enum"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { allowedValues: schema"+i+" } ";if(e.opts.messages!==false){n+=" , message: 'should be equal to one of the allowed values' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var g=n;n=v.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+g+"]); "}else{n+=" validate.errors = ["+g+"]; return false; "}}else{n+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" }";if(l){n+=" else { "}return n}},137:e=>{"use strict";e.exports=function generate_format(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");if(e.opts.format===false){if(l){n+=" if (true) { "}return n}var f=e.opts.$data&&o&&o.$data,d;if(f){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";d="schema"+i}else{d=o}var p=e.opts.unknownFormats,h=Array.isArray(p);if(f){var m="format"+i,v="isObject"+i,g="formatType"+i;n+=" var "+m+" = formats["+d+"]; var "+v+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+g+" = "+v+" && "+m+".type || 'string'; if ("+v+") { ";if(e.async){n+=" var async"+i+" = "+m+".async; "}n+=" "+m+" = "+m+".validate; } if ( ";if(f){n+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "}n+=" (";if(p!="ignore"){n+=" ("+d+" && !"+m+" ";if(h){n+=" && self._opts.unknownFormats.indexOf("+d+") == -1 "}n+=") || "}n+=" ("+m+" && "+g+" == '"+r+"' && !(typeof "+m+" == 'function' ? ";if(e.async){n+=" (async"+i+" ? await "+m+"("+c+") : "+m+"("+c+")) "}else{n+=" "+m+"("+c+") "}n+=" : "+m+".test("+c+"))))) {"}else{var m=e.formats[o];if(!m){if(p=="ignore"){e.logger.warn('unknown format "'+o+'" ignored in schema at path "'+e.errSchemaPath+'"');if(l){n+=" if (true) { "}return n}else if(h&&p.indexOf(o)>=0){if(l){n+=" if (true) { "}return n}else{throw new Error('unknown format "'+o+'" is used in schema at path "'+e.errSchemaPath+'"')}}var v=typeof m=="object"&&!(m instanceof RegExp)&&m.validate;var g=v&&m.type||"string";if(v){var y=m.async===true;m=m.validate}if(g!=r){if(l){n+=" if (true) { "}return n}if(y){if(!e.async)throw new Error("async format in sync schema");var b="formats"+e.util.getProperty(o)+".validate";n+=" if (!(await "+b+"("+c+"))) { "}else{n+=" if (! ";var b="formats"+e.util.getProperty(o);if(v)b+=".validate";if(typeof m=="function"){n+=" "+b+"("+c+") "}else{n+=" "+b+".test("+c+") "}n+=") { "}}var S=S||[];S.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"format"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { format: ";if(f){n+=""+d}else{n+=""+e.util.toQuotedString(o)}n+=" } ";if(e.opts.messages!==false){n+=" , message: 'should match format \"";if(f){n+="' + "+d+" + '"}else{n+=""+e.util.escapeQuotes(o)}n+="\"' "}if(e.opts.verbose){n+=" , schema: ";if(f){n+="validate.schema"+a}else{n+=""+e.util.toQuotedString(o)}n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var w=n;n=S.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+w+"]); "}else{n+=" validate.errors = ["+w+"]; return false; "}}else{n+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } ";if(l){n+=" else { "}return n}},7137:e=>{"use strict";e.exports=function generate_if(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="valid"+i;var d="errs__"+i;var p=e.util.copy(e);p.level++;var h="valid"+p.level;var m=e.schema["then"],v=e.schema["else"],g=m!==undefined&&(e.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===false:e.util.schemaHasRules(m,e.RULES.all)),y=v!==undefined&&(e.opts.strictKeywords?typeof v=="object"&&Object.keys(v).length>0||v===false:e.util.schemaHasRules(v,e.RULES.all)),b=p.baseId;if(g||y){var S;p.createErrors=false;p.schema=o;p.schemaPath=a;p.errSchemaPath=u;n+=" var "+d+" = errors; var "+f+" = true; ";var w=e.compositeRule;e.compositeRule=p.compositeRule=true;n+=" "+e.validate(p)+" ";p.baseId=b;p.createErrors=true;n+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ";e.compositeRule=p.compositeRule=w;if(g){n+=" if ("+h+") { ";p.schema=e.schema["then"];p.schemaPath=e.schemaPath+".then";p.errSchemaPath=e.errSchemaPath+"/then";n+=" "+e.validate(p)+" ";p.baseId=b;n+=" "+f+" = "+h+"; ";if(g&&y){S="ifClause"+i;n+=" var "+S+" = 'then'; "}else{S="'then'"}n+=" } ";if(y){n+=" else { "}}else{n+=" if (!"+h+") { "}if(y){p.schema=e.schema["else"];p.schemaPath=e.schemaPath+".else";p.errSchemaPath=e.errSchemaPath+"/else";n+=" "+e.validate(p)+" ";p.baseId=b;n+=" "+f+" = "+h+"; ";if(g&&y){S="ifClause"+i;n+=" var "+S+" = 'else'; "}else{S="'else'"}n+=" } "}n+=" if (!"+f+") { var err = ";if(e.createErrors!==false){n+=" { keyword: '"+"if"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { failingKeyword: "+S+" } ";if(e.opts.messages!==false){n+=" , message: 'should match \"' + "+S+" + '\" schema' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(vErrors); "}else{n+=" validate.errors = vErrors; return false; "}}n+=" } ";if(l){n+=" else { "}}else{if(l){n+=" if (true) { "}}return n}},1960:(e,t,r)=>{"use strict";e.exports={$ref:r(144),allOf:r(6265),anyOf:r(2816),$comment:r(4302),const:r(3641),contains:r(6665),dependencies:r(4352),enum:r(5625),format:r(137),if:r(7137),items:r(6301),maximum:r(2813),minimum:r(2813),maxItems:r(9809),minItems:r(9809),maxLength:r(5356),minLength:r(5356),maxProperties:r(7500),minProperties:r(7500),multipleOf:r(9180),not:r(911),oneOf:r(555),pattern:r(8557),properties:r(2847),propertyNames:r(5897),required:r(6775),uniqueItems:r(4313),validate:r(734)}},6301:e=>{"use strict";e.exports=function generate_items(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="valid"+i;var d="errs__"+i;var p=e.util.copy(e);var h="";p.level++;var m="valid"+p.level;var v="i"+i,g=p.dataLevel=e.dataLevel+1,y="data"+g,b=e.baseId;n+="var "+d+" = errors;var "+f+";";if(Array.isArray(o)){var S=e.schema.additionalItems;if(S===false){n+=" "+f+" = "+c+".length <= "+o.length+"; ";var w=u;u=e.errSchemaPath+"/additionalItems";n+=" if (!"+f+") { ";var _=_||[];_.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"additionalItems"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+o.length+" } ";if(e.opts.messages!==false){n+=" , message: 'should NOT have more than "+o.length+" items' "}if(e.opts.verbose){n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var E=n;n=_.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+E+"]); "}else{n+=" validate.errors = ["+E+"]; return false; "}}else{n+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } ";u=w;if(l){h+="}";n+=" else { "}}var k=o;if(k){var P,C=-1,x=k.length-1;while(C0||P===false:e.util.schemaHasRules(P,e.RULES.all)){n+=" "+m+" = true; if ("+c+".length > "+C+") { ";var O=c+"["+C+"]";p.schema=P;p.schemaPath=a+"["+C+"]";p.errSchemaPath=u+"/"+C;p.errorPath=e.util.getPathExpr(e.errorPath,C,e.opts.jsonPointers,true);p.dataPathArr[g]=C;var R=e.validate(p);p.baseId=b;if(e.util.varOccurences(R,y)<2){n+=" "+e.util.varReplace(R,y,O)+" "}else{n+=" var "+y+" = "+O+"; "+R+" "}n+=" } ";if(l){n+=" if ("+m+") { ";h+="}"}}}}if(typeof S=="object"&&(e.opts.strictKeywords?typeof S=="object"&&Object.keys(S).length>0||S===false:e.util.schemaHasRules(S,e.RULES.all))){p.schema=S;p.schemaPath=e.schemaPath+".additionalItems";p.errSchemaPath=e.errSchemaPath+"/additionalItems";n+=" "+m+" = true; if ("+c+".length > "+o.length+") { for (var "+v+" = "+o.length+"; "+v+" < "+c+".length; "+v+"++) { ";p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,true);var O=c+"["+v+"]";p.dataPathArr[g]=v;var R=e.validate(p);p.baseId=b;if(e.util.varOccurences(R,y)<2){n+=" "+e.util.varReplace(R,y,O)+" "}else{n+=" var "+y+" = "+O+"; "+R+" "}if(l){n+=" if (!"+m+") break; "}n+=" } } ";if(l){n+=" if ("+m+") { ";h+="}"}}}else if(e.opts.strictKeywords?typeof o=="object"&&Object.keys(o).length>0||o===false:e.util.schemaHasRules(o,e.RULES.all)){p.schema=o;p.schemaPath=a;p.errSchemaPath=u;n+=" for (var "+v+" = "+0+"; "+v+" < "+c+".length; "+v+"++) { ";p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,true);var O=c+"["+v+"]";p.dataPathArr[g]=v;var R=e.validate(p);p.baseId=b;if(e.util.varOccurences(R,y)<2){n+=" "+e.util.varReplace(R,y,O)+" "}else{n+=" var "+y+" = "+O+"; "+R+" "}if(l){n+=" if (!"+m+") break; "}n+=" }"}if(l){n+=" "+h+" if ("+d+" == errors) {"}return n}},9180:e=>{"use strict";e.exports=function generate_multipleOf(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f=e.opts.$data&&o&&o.$data,d;if(f){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";d="schema"+i}else{d=o}if(!(f||typeof o=="number")){throw new Error(t+" must be number")}n+="var division"+i+";if (";if(f){n+=" "+d+" !== undefined && ( typeof "+d+" != 'number' || "}n+=" (division"+i+" = "+c+" / "+d+", ";if(e.opts.multipleOfPrecision){n+=" Math.abs(Math.round(division"+i+") - division"+i+") > 1e-"+e.opts.multipleOfPrecision+" "}else{n+=" division"+i+" !== parseInt(division"+i+") "}n+=" ) ";if(f){n+=" ) "}n+=" ) { ";var p=p||[];p.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"multipleOf"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+d+" } ";if(e.opts.messages!==false){n+=" , message: 'should be multiple of ";if(f){n+="' + "+d}else{n+=""+d+"'"}}if(e.opts.verbose){n+=" , schema: ";if(f){n+="validate.schema"+a}else{n+=""+o}n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var h=n;n=p.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+h+"]); "}else{n+=" validate.errors = ["+h+"]; return false; "}}else{n+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+="} ";if(l){n+=" else { "}return n}},911:e=>{"use strict";e.exports=function generate_not(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="errs__"+i;var d=e.util.copy(e);d.level++;var p="valid"+d.level;if(e.opts.strictKeywords?typeof o=="object"&&Object.keys(o).length>0||o===false:e.util.schemaHasRules(o,e.RULES.all)){d.schema=o;d.schemaPath=a;d.errSchemaPath=u;n+=" var "+f+" = errors; ";var h=e.compositeRule;e.compositeRule=d.compositeRule=true;d.createErrors=false;var m;if(d.opts.allErrors){m=d.opts.allErrors;d.opts.allErrors=false}n+=" "+e.validate(d)+" ";d.createErrors=true;if(m)d.opts.allErrors=m;e.compositeRule=d.compositeRule=h;n+=" if ("+p+") { ";var v=v||[];v.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ";if(e.opts.messages!==false){n+=" , message: 'should NOT be valid' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var g=n;n=v.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+g+"]); "}else{n+=" validate.errors = ["+g+"]; return false; "}}else{n+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ";if(e.opts.allErrors){n+=" } "}}else{n+=" var err = ";if(e.createErrors!==false){n+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ";if(e.opts.messages!==false){n+=" , message: 'should NOT be valid' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(l){n+=" if (false) { "}}return n}},555:e=>{"use strict";e.exports=function generate_oneOf(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="valid"+i;var d="errs__"+i;var p=e.util.copy(e);var h="";p.level++;var m="valid"+p.level;var v=p.baseId,g="prevValid"+i,y="passingSchemas"+i;n+="var "+d+" = errors , "+g+" = false , "+f+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=p.compositeRule=true;var S=o;if(S){var w,_=-1,E=S.length-1;while(_0||w===false:e.util.schemaHasRules(w,e.RULES.all)){p.schema=w;p.schemaPath=a+"["+_+"]";p.errSchemaPath=u+"/"+_;n+=" "+e.validate(p)+" ";p.baseId=v}else{n+=" var "+m+" = true; "}if(_){n+=" if ("+m+" && "+g+") { "+f+" = false; "+y+" = ["+y+", "+_+"]; } else { ";h+="}"}n+=" if ("+m+") { "+f+" = "+g+" = true; "+y+" = "+_+"; }"}}e.compositeRule=p.compositeRule=b;n+=""+h+"if (!"+f+") { var err = ";if(e.createErrors!==false){n+=" { keyword: '"+"oneOf"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { passingSchemas: "+y+" } ";if(e.opts.messages!==false){n+=" , message: 'should match exactly one schema in oneOf' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(vErrors); "}else{n+=" validate.errors = vErrors; return false; "}}n+="} else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; }";if(e.opts.allErrors){n+=" } "}return n}},8557:e=>{"use strict";e.exports=function generate_pattern(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f=e.opts.$data&&o&&o.$data,d;if(f){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";d="schema"+i}else{d=o}var p=f?"(new RegExp("+d+"))":e.usePattern(o);n+="if ( ";if(f){n+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "}n+=" !"+p+".test("+c+") ) { ";var h=h||[];h.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"pattern"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { pattern: ";if(f){n+=""+d}else{n+=""+e.util.toQuotedString(o)}n+=" } ";if(e.opts.messages!==false){n+=" , message: 'should match pattern \"";if(f){n+="' + "+d+" + '"}else{n+=""+e.util.escapeQuotes(o)}n+="\"' "}if(e.opts.verbose){n+=" , schema: ";if(f){n+="validate.schema"+a}else{n+=""+e.util.toQuotedString(o)}n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var m=n;n=h.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+m+"]); "}else{n+=" validate.errors = ["+m+"]; return false; "}}else{n+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+="} ";if(l){n+=" else { "}return n}},2847:e=>{"use strict";e.exports=function generate_properties(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="errs__"+i;var d=e.util.copy(e);var p="";d.level++;var h="valid"+d.level;var m="key"+i,v="idx"+i,g=d.dataLevel=e.dataLevel+1,y="data"+g,b="dataProperties"+i;var S=Object.keys(o||{}).filter(notProto),w=e.schema.patternProperties||{},_=Object.keys(w).filter(notProto),E=e.schema.additionalProperties,k=S.length||_.length,P=E===false,C=typeof E=="object"&&Object.keys(E).length,x=e.opts.removeAdditional,O=P||C||x,R=e.opts.ownProperties,I=e.baseId;var A=e.schema.required;if(A&&!(e.opts.$data&&A.$data)&&A.length8){n+=" || validate.schema"+a+".hasOwnProperty("+m+") "}else{var D=S;if(D){var F,L=-1,N=D.length-1;while(L0||X===false:e.util.schemaHasRules(X,e.RULES.all)){var ee=e.util.getProperty(F),K=c+ee,te=G&&X.default!==undefined;d.schema=X;d.schemaPath=a+ee;d.errSchemaPath=u+"/"+e.util.escapeFragment(F);d.errorPath=e.util.getPath(e.errorPath,F,e.opts.jsonPointers);d.dataPathArr[g]=e.util.toQuotedString(F);var Y=e.validate(d);d.baseId=I;if(e.util.varOccurences(Y,y)<2){Y=e.util.varReplace(Y,y,K);var re=K}else{var re=y;n+=" var "+y+" = "+K+"; "}if(te){n+=" "+Y+" "}else{if(T&&T[F]){n+=" if ( "+re+" === undefined ";if(R){n+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(F)+"') "}n+=") { "+h+" = false; ";var U=e.errorPath,q=u,ne=e.util.escapeQuotes(F);if(e.opts._errorDataPathProperty){e.errorPath=e.util.getPath(U,F,e.opts.jsonPointers)}u=e.errSchemaPath+"/required";var V=V||[];V.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+ne+"' } ";if(e.opts.messages!==false){n+=" , message: '";if(e.opts._errorDataPathProperty){n+="is a required property"}else{n+="should have required property \\'"+ne+"\\'"}n+="' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var z=n;n=V.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+z+"]); "}else{n+=" validate.errors = ["+z+"]; return false; "}}else{n+=" var err = "+z+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}u=q;e.errorPath=U;n+=" } else { "}else{if(l){n+=" if ( "+re+" === undefined ";if(R){n+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(F)+"') "}n+=") { "+h+" = true; } else { "}else{n+=" if ("+re+" !== undefined ";if(R){n+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(F)+"') "}n+=" ) { "}}n+=" "+Y+" } "}}if(l){n+=" if ("+h+") { ";p+="}"}}}}if(_.length){var ie=_;if(ie){var B,se=-1,oe=ie.length-1;while(se0||X===false:e.util.schemaHasRules(X,e.RULES.all)){d.schema=X;d.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(B);d.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(B);if(R){n+=" "+b+" = "+b+" || Object.keys("+c+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+m+" = "+b+"["+v+"]; "}else{n+=" for (var "+m+" in "+c+") { "}n+=" if ("+e.usePattern(B)+".test("+m+")) { ";d.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var K=c+"["+m+"]";d.dataPathArr[g]=m;var Y=e.validate(d);d.baseId=I;if(e.util.varOccurences(Y,y)<2){n+=" "+e.util.varReplace(Y,y,K)+" "}else{n+=" var "+y+" = "+K+"; "+Y+" "}if(l){n+=" if (!"+h+") break; "}n+=" } ";if(l){n+=" else "+h+" = true; "}n+=" } ";if(l){n+=" if ("+h+") { ";p+="}"}}}}}if(l){n+=" "+p+" if ("+f+" == errors) {"}return n}},5897:e=>{"use strict";e.exports=function generate_propertyNames(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="errs__"+i;var d=e.util.copy(e);var p="";d.level++;var h="valid"+d.level;n+="var "+f+" = errors;";if(e.opts.strictKeywords?typeof o=="object"&&Object.keys(o).length>0||o===false:e.util.schemaHasRules(o,e.RULES.all)){d.schema=o;d.schemaPath=a;d.errSchemaPath=u;var m="key"+i,v="idx"+i,g="i"+i,y="' + "+m+" + '",b=d.dataLevel=e.dataLevel+1,S="data"+b,w="dataProperties"+i,_=e.opts.ownProperties,E=e.baseId;if(_){n+=" var "+w+" = undefined; "}if(_){n+=" "+w+" = "+w+" || Object.keys("+c+"); for (var "+v+"=0; "+v+"<"+w+".length; "+v+"++) { var "+m+" = "+w+"["+v+"]; "}else{n+=" for (var "+m+" in "+c+") { "}n+=" var startErrs"+i+" = errors; ";var k=m;var P=e.compositeRule;e.compositeRule=d.compositeRule=true;var C=e.validate(d);d.baseId=E;if(e.util.varOccurences(C,S)<2){n+=" "+e.util.varReplace(C,S,k)+" "}else{n+=" var "+S+" = "+k+"; "+C+" "}e.compositeRule=d.compositeRule=P;n+=" if (!"+h+") { for (var "+g+"=startErrs"+i+"; "+g+"{"use strict";e.exports=function generate_ref(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.errSchemaPath+"/"+t;var u=!e.opts.allErrors;var l="data"+(s||"");var c="valid"+i;var f,d;if(o=="#"||o=="#/"){if(e.isRoot){f=e.async;d="validate"}else{f=e.root.schema.$async===true;d="root.refVal[0]"}}else{var p=e.resolveRef(e.baseId,o,e.isRoot);if(p===undefined){var h=e.MissingRefError.message(e.baseId,o);if(e.opts.missingRefs=="fail"){e.logger.error(h);var m=m||[];m.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"$ref"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(a)+" , params: { ref: '"+e.util.escapeQuotes(o)+"' } ";if(e.opts.messages!==false){n+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(o)+"' "}if(e.opts.verbose){n+=" , schema: "+e.util.toQuotedString(o)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "}n+=" } "}else{n+=" {} "}var v=n;n=m.pop();if(!e.compositeRule&&u){if(e.async){n+=" throw new ValidationError(["+v+"]); "}else{n+=" validate.errors = ["+v+"]; return false; "}}else{n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}if(u){n+=" if (false) { "}}else if(e.opts.missingRefs=="ignore"){e.logger.warn(h);if(u){n+=" if (true) { "}}else{throw new e.MissingRefError(e.baseId,o,h)}}else if(p.inline){var g=e.util.copy(e);g.level++;var y="valid"+g.level;g.schema=p.schema;g.schemaPath="";g.errSchemaPath=o;var b=e.validate(g).replace(/validate\.schema/g,p.code);n+=" "+b+" ";if(u){n+=" if ("+y+") { "}}else{f=p.$async===true||e.async&&p.$async!==false;d=p.code}}if(d){var m=m||[];m.push(n);n="";if(e.opts.passContext){n+=" "+d+".call(this, "}else{n+=" "+d+"( "}n+=" "+l+", (dataPath || '')";if(e.errorPath!='""'){n+=" + "+e.errorPath}var S=s?"data"+(s-1||""):"parentData",w=s?e.dataPathArr[s]:"parentDataProperty";n+=" , "+S+" , "+w+", rootData) ";var _=n;n=m.pop();if(f){if(!e.async)throw new Error("async schema referenced by sync schema");if(u){n+=" var "+c+"; "}n+=" try { await "+_+"; ";if(u){n+=" "+c+" = true; "}n+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ";if(u){n+=" "+c+" = false; "}n+=" } ";if(u){n+=" if ("+c+") { "}}else{n+=" if (!"+_+") { if (vErrors === null) vErrors = "+d+".errors; else vErrors = vErrors.concat("+d+".errors); errors = vErrors.length; } ";if(u){n+=" else { "}}}return n}},6775:e=>{"use strict";e.exports=function generate_required(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="valid"+i;var d=e.opts.$data&&o&&o.$data,p;if(d){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";p="schema"+i}else{p=o}var h="schema"+i;if(!d){if(o.length0||S===false:e.util.schemaHasRules(S,e.RULES.all)))){m[m.length]=g}}}}else{var m=o}}if(d||m.length){var w=e.errorPath,_=d||m.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(l){n+=" var missing"+i+"; ";if(_){if(!d){n+=" var "+h+" = validate.schema"+a+"; "}var k="i"+i,P="schema"+i+"["+k+"]",C="' + "+P+" + '";if(e.opts._errorDataPathProperty){e.errorPath=e.util.getPathExpr(w,P,e.opts.jsonPointers)}n+=" var "+f+" = true; ";if(d){n+=" if (schema"+i+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+i+")) "+f+" = false; else {"}n+=" for (var "+k+" = 0; "+k+" < "+h+".length; "+k+"++) { "+f+" = "+c+"["+h+"["+k+"]] !== undefined ";if(E){n+=" && Object.prototype.hasOwnProperty.call("+c+", "+h+"["+k+"]) "}n+="; if (!"+f+") break; } ";if(d){n+=" } "}n+=" if (!"+f+") { ";var x=x||[];x.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+C+"' } ";if(e.opts.messages!==false){n+=" , message: '";if(e.opts._errorDataPathProperty){n+="is a required property"}else{n+="should have required property \\'"+C+"\\'"}n+="' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var O=n;n=x.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+O+"]); "}else{n+=" validate.errors = ["+O+"]; return false; "}}else{n+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } else { "}else{n+=" if ( ";var R=m;if(R){var I,k=-1,A=R.length-1;while(k{"use strict";e.exports=function generate_uniqueItems(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="valid"+i;var d=e.opts.$data&&o&&o.$data,p;if(d){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";p="schema"+i}else{p=o}if((o||d)&&e.opts.uniqueItems!==false){if(d){n+=" var "+f+"; if ("+p+" === false || "+p+" === undefined) "+f+" = true; else if (typeof "+p+" != 'boolean') "+f+" = false; else { "}n+=" var i = "+c+".length , "+f+" = true , j; if (i > 1) { ";var h=e.schema.items&&e.schema.items.type,m=Array.isArray(h);if(!h||h=="object"||h=="array"||m&&(h.indexOf("object")>=0||h.indexOf("array")>=0)){n+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+c+"[i], "+c+"[j])) { "+f+" = false; break outer; } } } "}else{n+=" var itemIndices = {}, item; for (;i--;) { var item = "+c+"[i]; ";var v="checkDataType"+(m?"s":"");n+=" if ("+e.util[v](h,"item",e.opts.strictNumbers,true)+") continue; ";if(m){n+=" if (typeof item == 'string') item = '\"' + item; "}n+=" if (typeof itemIndices[item] == 'number') { "+f+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}n+=" } ";if(d){n+=" } "}n+=" if (!"+f+") { ";var g=g||[];g.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"uniqueItems"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ";if(e.opts.messages!==false){n+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "}if(e.opts.verbose){n+=" , schema: ";if(d){n+="validate.schema"+a}else{n+=""+o}n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var y=n;n=g.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+y+"]); "}else{n+=" validate.errors = ["+y+"]; return false; "}}else{n+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } ";if(l){n+=" else { "}}else{if(l){n+=" if (true) { "}}return n}},734:e=>{"use strict";e.exports=function generate_validate(e,t,r){var n="";var i=e.schema.$async===true,s=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),o=e.self._getId(e.schema);if(e.opts.strictKeywords){var a=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(a){var u="unknown keyword: "+a;if(e.opts.strictKeywords==="log")e.logger.warn(u);else throw new Error(u)}}if(e.isTop){n+=" var validate = ";if(i){e.async=true;n+="async "}n+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ";if(o&&(e.opts.sourceCode||e.opts.processCode)){n+=" "+("/*# sourceURL="+o+" */")+" "}}if(typeof e.schema=="boolean"||!(s||e.schema.$ref)){var t="false schema";var l=e.level;var c=e.dataLevel;var f=e.schema[t];var d=e.schemaPath+e.util.getProperty(t);var p=e.errSchemaPath+"/"+t;var h=!e.opts.allErrors;var m;var v="data"+(c||"");var g="valid"+l;if(e.schema===false){if(e.isTop){h=true}else{n+=" var "+g+" = false; "}var y=y||[];y.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+(m||"false schema")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ";if(e.opts.messages!==false){n+=" , message: 'boolean schema is false' "}if(e.opts.verbose){n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "}n+=" } "}else{n+=" {} "}var b=n;n=y.pop();if(!e.compositeRule&&h){if(e.async){n+=" throw new ValidationError(["+b+"]); "}else{n+=" validate.errors = ["+b+"]; return false; "}}else{n+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}else{if(e.isTop){if(i){n+=" return data; "}else{n+=" validate.errors = null; return true; "}}else{n+=" var "+g+" = true; "}}if(e.isTop){n+=" }; return validate; "}return n}if(e.isTop){var S=e.isTop,l=e.level=0,c=e.dataLevel=0,v="data";e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema));e.baseId=e.baseId||e.rootId;delete e.isTop;e.dataPathArr=[""];if(e.schema.default!==undefined&&e.opts.useDefaults&&e.opts.strictDefaults){var w="default is ignored in the schema root";if(e.opts.strictDefaults==="log")e.logger.warn(w);else throw new Error(w)}n+=" var vErrors = null; ";n+=" var errors = 0; ";n+=" if (rootData === undefined) rootData = data; "}else{var l=e.level,c=e.dataLevel,v="data"+(c||"");if(o)e.baseId=e.resolve.url(e.baseId,o);if(i&&!e.async)throw new Error("async schema in sync schema");n+=" var errs_"+l+" = errors;"}var g="valid"+l,h=!e.opts.allErrors,_="",E="";var m;var k=e.schema.type,P=Array.isArray(k);if(k&&e.opts.nullable&&e.schema.nullable===true){if(P){if(k.indexOf("null")==-1)k=k.concat("null")}else if(k!="null"){k=[k,"null"];P=true}}if(P&&k.length==1){k=k[0];P=false}if(e.schema.$ref&&s){if(e.opts.extendRefs=="fail"){throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)')}else if(e.opts.extendRefs!==true){s=false;e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"')}}if(e.schema.$comment&&e.opts.$comment){n+=" "+e.RULES.all.$comment.code(e,"$comment")}if(k){if(e.opts.coerceTypes){var C=e.util.coerceToTypes(e.opts.coerceTypes,k)}var x=e.RULES.types[k];if(C||P||x===true||x&&!$shouldUseGroup(x)){var d=e.schemaPath+".type",p=e.errSchemaPath+"/type";var d=e.schemaPath+".type",p=e.errSchemaPath+"/type",O=P?"checkDataTypes":"checkDataType";n+=" if ("+e.util[O](k,v,e.opts.strictNumbers,true)+") { ";if(C){var R="dataType"+l,I="coerced"+l;n+=" var "+R+" = typeof "+v+"; var "+I+" = undefined; ";if(e.opts.coerceTypes=="array"){n+=" if ("+R+" == 'object' && Array.isArray("+v+") && "+v+".length == 1) { "+v+" = "+v+"[0]; "+R+" = typeof "+v+"; if ("+e.util.checkDataType(e.schema.type,v,e.opts.strictNumbers)+") "+I+" = "+v+"; } "}n+=" if ("+I+" !== undefined) ; ";var A=C;if(A){var T,D=-1,F=A.length-1;while(D{"use strict";var n=/^[a-z_$][a-z0-9_$-]*$/i;var i=r(8343);var s=r(4540);e.exports={add:addKeyword,get:getKeyword,remove:removeKeyword,validate:validateKeyword};function addKeyword(e,t){var r=this.RULES;if(r.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!n.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(t){this.validateKeyword(t,true);var s=t.type;if(Array.isArray(s)){for(var o=0;o{"use strict";const n=r(4389);const i=r(1972)("$$bole",{fastTime:false});const s=r(357);const o="debug info warn error".split(" ");const a=r(2037).hostname();const u=n(a);const l=process.pid;let c=false;const f=[];for(const e of o){f[e]=',"hostname":'+u+',"pid":'+l+',"level":"'+e;Number(f[e]);if(!Array.isArray(i[e])){i[e]=[]}}function stackToString(e){let t=e.stack;let r;if(typeof e.cause==="function"&&(r=e.cause())){t+="\nCaused by: "+stackToString(r)}return t}function errorToOut(e,t){t.err={name:e.name,message:e.message,code:e.code,stack:stackToString(e)}}function requestToOut(e,t){t.req={method:e.method,url:e.url,headers:e.headers,remoteAddress:e.connection.remoteAddress,remotePort:e.connection.remotePort}}function objectToOut(e,t){for(const r in e){if(Object.prototype.hasOwnProperty.call(e,r)&&e[r]!==undefined){t[r]=e[r]}}}function objectMode(e){return e._writableState&&e._writableState.objectMode===true}function stringify(e,t,r,s){let o='{"time":'+(i.fastTime?Date.now():'"'+(new Date).toISOString()+'"')+f[e]+'","name":'+t+(r!==undefined?',"message":'+n(r):"");for(const e in s){o+=","+n(e)+":"+n(s[e])}o+="}";Number(o);return o}function extend(e,t,r,n){const s={time:i.fastTime?Date.now():(new Date).toISOString(),hostname:a,pid:l,level:e,name:t};if(r!==undefined){n.message=r}for(const e in n){s[e]=n[e]}return s}function levelLogger(e,t){const r=i[e];const o=n(t);return function namedLevelLogger(n,i,a,u,l,f,d,p,h,m,v,g,y,b,S,w){if(r.length===0){return}const _={};let E;let k=0;const P=r.length;let C;let x;if(typeof n==="string"||n==null){if(!(x=s(n,i,a,u,l,f,d,p,h,m,v,g,y,b,S,w))){x=undefined}}else{if(n instanceof Error){if(typeof i==="object"){objectToOut(i,_);errorToOut(n,_);if(!(x=s(a,u,l,f,d,p,h,m,v,g,y,b,S,w))){x=undefined}}else{errorToOut(n,_);if(!(x=s(i,a,u,l,f,d,p,h,m,v,g,y,b,S,w))){x=undefined}}}else{if(!(x=s(i,a,u,l,f,d,p,h,m,v,g,y,b,S,w))){x=undefined}}if(typeof n==="boolean"){x=String(n)}else if(typeof n==="object"&&!(n instanceof Error)){if(n.method&&n.url&&n.headers&&n.socket){requestToOut(n,_)}else{objectToOut(n,_)}}}if(P===1&&!c){r[0].write(Buffer.from(stringify(e,o,x,_)+"\n"));return}for(;k{var n=r(3837).format;function format(e,t,r,i,s,o,a,u,l,c,f,d,p,h,m,v){if(v!==undefined){return n(e,t,r,i,s,o,a,u,l,c,f,d,p,h,m,v)}if(m!==undefined){return n(e,t,r,i,s,o,a,u,l,c,f,d,p,h,m)}if(h!==undefined){return n(e,t,r,i,s,o,a,u,l,c,f,d,p,h)}if(p!==undefined){return n(e,t,r,i,s,o,a,u,l,c,f,d,p)}if(d!==undefined){return n(e,t,r,i,s,o,a,u,l,c,f,d)}if(f!==undefined){return n(e,t,r,i,s,o,a,u,l,c,f)}if(c!==undefined){return n(e,t,r,i,s,o,a,u,l,c)}if(l!==undefined){return n(e,t,r,i,s,o,a,u,l)}if(u!==undefined){return n(e,t,r,i,s,o,a,u)}if(a!==undefined){return n(e,t,r,i,s,o,a)}if(o!==undefined){return n(e,t,r,i,s,o)}if(s!==undefined){return n(e,t,r,i,s)}if(i!==undefined){return n(e,t,r,i)}if(r!==undefined){return n(e,t,r)}if(t!==undefined){return n(e,t)}return e}e.exports=format},5708:e=>{"use strict";function dataUriToBuffer(e){if(!/^data:/i.test(e)){throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")')}e=e.replace(/\r?\n/g,"");const t=e.indexOf(",");if(t===-1||t<=4){throw new TypeError("malformed data: URI")}const r=e.substring(5,t).split(";");let n="";let i=false;const s=r[0]||"text/plain";let o=s;for(let e=1;e{t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.storage=localstorage();t.destroy=(()=>{let e=false;return()=>{if(!e){e=true;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"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(t){t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0;let i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{if(e==="%%"){return}n++;if(e==="%c"){i=n}}));t.splice(i,0,r)}t.log=console.debug||console.log||(()=>{});function save(e){try{if(e){t.storage.setItem("debug",e)}else{t.storage.removeItem("debug")}}catch(e){}}function load(){let e;try{e=t.storage.getItem("debug")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=r(7695)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},7695:(e,t,r)=>{function setup(e){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=r(401);createDebug.destroy=destroy;Object.keys(e).forEach((t=>{createDebug[t]=e[t]}));createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(e){let t=0;for(let r=0;r{if(t==="%%"){return"%"}s++;const i=createDebug.formatters[n];if(typeof i==="function"){const n=e[s];t=i.call(r,n);e.splice(s,1);s--}return t}));createDebug.formatArgs.call(r,e);const o=r.log||createDebug.log;o.apply(r,e)}debug.namespace=e;debug.useColors=createDebug.useColors();debug.color=createDebug.selectColor(e);debug.extend=extend;debug.destroy=createDebug.destroy;Object.defineProperty(debug,"enabled",{enumerable:true,configurable:false,get:()=>{if(r!==null){return r}if(n!==createDebug.namespaces){n=createDebug.namespaces;i=createDebug.enabled(e)}return i},set:e=>{r=e}});if(typeof createDebug.init==="function"){createDebug.init(debug)}return debug}function extend(e,t){const r=createDebug(this.namespace+(typeof t==="undefined"?":":t)+e);r.log=this.log;return r}function enable(e){createDebug.save(e);createDebug.namespaces=e;createDebug.names=[];createDebug.skips=[];let t;const r=(typeof e==="string"?e:"").split(/[\s,]+/);const n=r.length;for(t=0;t"-"+e))].join(",");createDebug.enable("");return e}function enabled(e){if(e[e.length-1]==="*"){return true}let t;let r;for(t=0,r=createDebug.skips.length;t{if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=r(3167)}else{e.exports=r(8867)}},8867:(e,t,r)=>{const n=r(6224);const i=r(3837);t.init=init;t.log=log;t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;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=r(4226);if(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 r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];if(/^(yes|on|true|enabled)$/i.test(n)){n=true}else if(/^(no|off|false|disabled)$/i.test(n)){n=false}else if(n==="null"){n=null}else{n=Number(n)}e[r]=n;return e}),{});function useColors(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)}function formatArgs(t){const{namespace:r,useColors:n}=this;if(n){const n=this.color;const i="[3"+(n<8?n:"8;5;"+n);const s=` ${i};1m${r} `;t[0]=s+t[0].split("\n").join("\n"+s);t.push(i+"m+"+e.exports.humanize(this.diff)+"")}else{t[0]=getDate()+r+" "+t[0]}}function getDate(){if(t.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(i.format(...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let n=0;ne.trim())).join(" ")};s.O=function(e){this.inspectOpts.colors=this.useColors;return i.inspect(e,this.inspectOpts)}},9386:(module,__unused_webpack_exports,__nccwpck_require__)=>{ +/*! + * depd + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + */ +var callSiteToString=__nccwpck_require__(2775).callSiteToString;var eventListenerCount=__nccwpck_require__(2775).eventListenerCount;var relative=__nccwpck_require__(1017).relative;module.exports=depd;var basePath=process.cwd();function containsNamespace(e,t){var r=e.split(/[ ,]+/);var n=String(t).toLowerCase();for(var i=0;i";var r=e.getLineNumber();var n=e.getColumnNumber();if(e.isEval()){t=e.getEvalOrigin()+", "+t}var i=[t,r,n];i.callSite=e;i.name=e.getFunctionName();return i}function defaultMessage(e){var t=e.callSite;var r=e.name;if(!r){r=""}var n=t.getThis();var i=n&&t.getTypeName();if(i==="Object"){i=undefined}if(i==="Function"){i=n.name||i}return i&&t.getMethodName()?i+"."+r:r}function formatPlain(e,t,r){var n=(new Date).toUTCString();var i=n+" "+this._namespace+" deprecated "+e;if(this._traced){for(var s=0;s{"use strict"; +/*! + * depd + * Copyright(c) 2014 Douglas Christopher Wilson + * MIT Licensed + */e.exports=callSiteToString;function callSiteFileLocation(e){var t;var r="";if(e.isNative()){r="native"}else if(e.isEval()){t=e.getScriptNameOrSourceURL();if(!t){r=e.getEvalOrigin()}}else{t=e.getFileName()}if(t){r+=t;var n=e.getLineNumber();if(n!=null){r+=":"+n;var i=e.getColumnNumber();if(i){r+=":"+i}}}return r||"unknown source"}function callSiteToString(e){var t=true;var r=callSiteFileLocation(e);var n=e.getFunctionName();var i=e.isConstructor();var s=!(e.isToplevel()||i);var o="";if(s){var a=e.getMethodName();var u=getConstructorName(e);if(n){if(u&&n.indexOf(u)!==0){o+=u+"."}o+=n;if(a&&n.lastIndexOf("."+a)!==n.length-a.length-1){o+=" [as "+a+"]"}}else{o+=u+"."+(a||"")}}else if(i){o+="new "+(n||"")}else if(n){o+=n}else{t=false;o+=r}if(t){o+=" ("+r+")"}return o}function getConstructorName(e){var t=e.receiver;return t.constructor&&t.constructor.name||null}},7723:e=>{"use strict"; +/*! + * depd + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */e.exports=eventListenerCount;function eventListenerCount(e,t){return e.listeners(t).length}},2775:(e,t,r)=>{"use strict"; +/*! + * depd + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */var n=r(2361).EventEmitter;lazyProperty(e.exports,"callSiteToString",(function callSiteToString(){var e=Error.stackTraceLimit;var t={};var n=Error.prepareStackTrace;function prepareObjectStackTrace(e,t){return t}Error.prepareStackTrace=prepareObjectStackTrace;Error.stackTraceLimit=2;Error.captureStackTrace(t);var i=t.stack.slice();Error.prepareStackTrace=n;Error.stackTraceLimit=e;return i[0].toString?toString:r(7264)}));lazyProperty(e.exports,"eventListenerCount",(function eventListenerCount(){return n.listenerCount||r(7723)}));function lazyProperty(e,t,r){function get(){var n=r();Object.defineProperty(e,t,{configurable:true,enumerable:true,value:n});return n}Object.defineProperty(e,t,{configurable:true,enumerable:true,get:get})}function toString(e){return e.toString()}},4790:(e,t,r)=>{ +/*! + * expand-tilde + * + * Copyright (c) 2015 Jon Schlinkert. + * Licensed under the MIT license. + */ +var n=r(2157);var i=r(1017);e.exports=function expandTilde(e){var t=n();if(e.charCodeAt(0)===126){if(e.charCodeAt(1)===43){return i.join(process.cwd(),e.slice(2))}return t?i.join(t,e.slice(1)):e}return e}},3064:e=>{"use strict";e.exports=function equal(e,t){if(e===t)return true;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return false;var r,n,i;if(Array.isArray(e)){r=e.length;if(r!=t.length)return false;for(n=r;n--!==0;)if(!equal(e[n],t[n]))return false;return true}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();i=Object.keys(e);r=i.length;if(r!==Object.keys(t).length)return false;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return false;for(n=r;n--!==0;){var s=i[n];if(!equal(e[s],t[s]))return false}return true}return e!==e&&t!==t}},4486:e=>{"use strict";e.exports=function(e,t){if(!t)t={};if(typeof t==="function")t={cmp:t};var r=typeof t.cycles==="boolean"?t.cycles:false;var n=t.cmp&&function(e){return function(t){return function(r,n){var i={key:r,value:t[r]};var s={key:n,value:t[n]};return e(i,s)}}}(t.cmp);var i=[];return function stringify(e){if(e&&e.toJSON&&typeof e.toJSON==="function"){e=e.toJSON()}if(e===undefined)return;if(typeof e=="number")return isFinite(e)?""+e:"null";if(typeof e!=="object")return JSON.stringify(e);var t,s;if(Array.isArray(e)){s="[";for(t=0;t{e.exports=stringify;stringify.default=stringify;stringify.stable=deterministicStringify;stringify.stableStringify=deterministicStringify;var t="[...]";var r="[Circular]";var n=[];var i=[];function defaultOptions(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function stringify(e,t,r,s){if(typeof s==="undefined"){s=defaultOptions()}decirc(e,"",0,[],undefined,0,s);var o;try{if(i.length===0){o=JSON.stringify(e,t,r)}else{o=JSON.stringify(e,replaceGetterValues(t),r)}}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{while(n.length!==0){var a=n.pop();if(a.length===4){Object.defineProperty(a[0],a[1],a[3])}else{a[0][a[1]]=a[2]}}}return o}function setReplace(e,t,r,s){var o=Object.getOwnPropertyDescriptor(s,r);if(o.get!==undefined){if(o.configurable){Object.defineProperty(s,r,{value:e});n.push([s,r,t,o])}else{i.push([t,r,e])}}else{s[r]=e;n.push([s,r,t])}}function decirc(e,n,i,s,o,a,u){a+=1;var l;if(typeof e==="object"&&e!==null){for(l=0;lu.depthLimit){setReplace(t,e,n,o);return}if(typeof u.edgesLimit!=="undefined"&&i+1>u.edgesLimit){setReplace(t,e,n,o);return}s.push(e);if(Array.isArray(e)){for(l=0;lt){return 1}return 0}function deterministicStringify(e,t,r,s){if(typeof s==="undefined"){s=defaultOptions()}var o=deterministicDecirc(e,"",0,[],undefined,0,s)||e;var a;try{if(i.length===0){a=JSON.stringify(o,t,r)}else{a=JSON.stringify(o,replaceGetterValues(t),r)}}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{while(n.length!==0){var u=n.pop();if(u.length===4){Object.defineProperty(u[0],u[1],u[3])}else{u[0][u[1]]=u[2]}}}return a}function deterministicDecirc(e,i,s,o,a,u,l){u+=1;var c;if(typeof e==="object"&&e!==null){for(c=0;cl.depthLimit){setReplace(t,e,i,a);return}if(typeof l.edgesLimit!=="undefined"&&s+1>l.edgesLimit){setReplace(t,e,i,a);return}o.push(e);if(Array.isArray(e)){for(c=0;c0){for(var n=0;n{const{Readable:n}=r(2781);const i=new WeakMap;async function*read(e){for(const t of e){if("stream"in t){yield*t.stream()}else{yield t}}}class Blob{constructor(e=[],t={}){let r=0;const n=e.map((e=>{let t;if(e instanceof Buffer){t=e}else if(ArrayBuffer.isView(e)){t=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}else if(e instanceof ArrayBuffer){t=Buffer.from(e)}else if(e instanceof Blob){t=e}else{t=Buffer.from(typeof e==="string"?e:String(e))}r+=t.length||t.size||0;return t}));const s=t.type===undefined?"":String(t.type).toLowerCase();i.set(this,{type:/[^\u0020-\u007E]/.test(s)?"":s,size:r,parts:n})}get size(){return i.get(this).size}get type(){return i.get(this).type}async text(){return Buffer.from(await this.arrayBuffer()).toString()}async arrayBuffer(){const e=new Uint8Array(this.size);let t=0;for await(const r of this.stream()){e.set(r,t);t+=r.length}return e.buffer}stream(){return n.from(read(i.get(this).parts))}slice(e=0,t=this.size,r=""){const{size:n}=this;let s=e<0?Math.max(n+e,0):Math.min(e,n);let o=t<0?Math.max(n+t,0):Math.min(t,n);const a=Math.max(o-s,0);const u=i.get(this).parts.values();const l=[];let c=0;for(const e of u){const t=ArrayBuffer.isView(e)?e.byteLength:e.size;if(s&&t<=s){s-=t;o-=t}else{const r=e.slice(s,Math.min(t,o));l.push(r);c+=ArrayBuffer.isView(r)?r.byteLength:r.size;s=0;if(c>=a){break}}}const f=new Blob([],{type:String(r).toLowerCase()});Object.assign(i.get(f),{size:a,parts:l});return f}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](e){return e&&typeof e==="object"&&typeof e.stream==="function"&&e.stream.length===0&&typeof e.constructor==="function"&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}}Object.defineProperties(Blob.prototype,{size:{enumerable:true},type:{enumerable:true},slice:{enumerable:true}});e.exports=Blob},8593:(e,t,r)=>{"use strict";const n=r(7765);const i=r(1017);const s=r(5443).mkdirsSync;const o=r(7237).utimesMillisSync;const a=r(7169);function copySync(e,t,r){if(typeof r==="function"){r={filter:r}}r=r||{};r.clobber="clobber"in r?!!r.clobber:true;r.overwrite="overwrite"in r?!!r.overwrite:r.clobber;if(r.preserveTimestamps&&process.arch==="ia32"){console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269`)}const{srcStat:n,destStat:i}=a.checkPathsSync(e,t,"copy",r);a.checkParentPathsSync(e,n,t,"copy");return handleFilterAndCopy(i,e,t,r)}function handleFilterAndCopy(e,t,r,o){if(o.filter&&!o.filter(t,r))return;const a=i.dirname(r);if(!n.existsSync(a))s(a);return getStats(e,t,r,o)}function startCopy(e,t,r,n){if(n.filter&&!n.filter(t,r))return;return getStats(e,t,r,n)}function getStats(e,t,r,i){const s=i.dereference?n.statSync:n.lstatSync;const o=s(t);if(o.isDirectory())return onDir(o,e,t,r,i);else if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return onFile(o,e,t,r,i);else if(o.isSymbolicLink())return onLink(e,t,r,i);else if(o.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);else if(o.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}function onFile(e,t,r,n,i){if(!t)return copyFile(e,r,n,i);return mayCopyFile(e,r,n,i)}function mayCopyFile(e,t,r,i){if(i.overwrite){n.unlinkSync(r);return copyFile(e,t,r,i)}else if(i.errorOnExist){throw new Error(`'${r}' already exists`)}}function copyFile(e,t,r,i){n.copyFileSync(t,r);if(i.preserveTimestamps)handleTimestamps(e.mode,t,r);return setDestMode(r,e.mode)}function handleTimestamps(e,t,r){if(fileIsNotWritable(e))makeFileWritable(r,e);return setDestTimestamps(t,r)}function fileIsNotWritable(e){return(e&128)===0}function makeFileWritable(e,t){return setDestMode(e,t|128)}function setDestMode(e,t){return n.chmodSync(e,t)}function setDestTimestamps(e,t){const r=n.statSync(e);return o(t,r.atime,r.mtime)}function onDir(e,t,r,n,i){if(!t)return mkDirAndCopy(e.mode,r,n,i);return copyDir(r,n,i)}function mkDirAndCopy(e,t,r,i){n.mkdirSync(r);copyDir(t,r,i);return setDestMode(r,e)}function copyDir(e,t,r){n.readdirSync(e).forEach((n=>copyDirItem(n,e,t,r)))}function copyDirItem(e,t,r,n){const s=i.join(t,e);const o=i.join(r,e);const{destStat:u}=a.checkPathsSync(s,o,"copy",n);return startCopy(u,s,o,n)}function onLink(e,t,r,s){let o=n.readlinkSync(t);if(s.dereference){o=i.resolve(process.cwd(),o)}if(!e){return n.symlinkSync(o,r)}else{let e;try{e=n.readlinkSync(r)}catch(e){if(e.code==="EINVAL"||e.code==="UNKNOWN")return n.symlinkSync(o,r);throw e}if(s.dereference){e=i.resolve(process.cwd(),e)}if(a.isSrcSubdir(o,e)){throw new Error(`Cannot copy '${o}' to a subdirectory of itself, '${e}'.`)}if(n.statSync(r).isDirectory()&&a.isSrcSubdir(e,o)){throw new Error(`Cannot overwrite '${e}' with '${o}'.`)}return copyLink(o,r)}}function copyLink(e,t){n.unlinkSync(t);return n.symlinkSync(e,t)}e.exports=copySync},5390:(e,t,r)=>{"use strict";e.exports={copySync:r(8593)}},9226:(e,t,r)=>{"use strict";const n=r(7765);const i=r(1017);const s=r(5443).mkdirs;const o=r(6618).pathExists;const a=r(7237).utimesMillis;const u=r(7169);function copy(e,t,r,n){if(typeof r==="function"&&!n){n=r;r={}}else if(typeof r==="function"){r={filter:r}}n=n||function(){};r=r||{};r.clobber="clobber"in r?!!r.clobber:true;r.overwrite="overwrite"in r?!!r.overwrite:r.clobber;if(r.preserveTimestamps&&process.arch==="ia32"){console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269`)}u.checkPaths(e,t,"copy",r,((i,s)=>{if(i)return n(i);const{srcStat:o,destStat:a}=s;u.checkParentPaths(e,o,t,"copy",(i=>{if(i)return n(i);if(r.filter)return handleFilter(checkParentDir,a,e,t,r,n);return checkParentDir(a,e,t,r,n)}))}))}function checkParentDir(e,t,r,n,a){const u=i.dirname(r);o(u,((i,o)=>{if(i)return a(i);if(o)return getStats(e,t,r,n,a);s(u,(i=>{if(i)return a(i);return getStats(e,t,r,n,a)}))}))}function handleFilter(e,t,r,n,i,s){Promise.resolve(i.filter(r,n)).then((o=>{if(o)return e(t,r,n,i,s);return s()}),(e=>s(e)))}function startCopy(e,t,r,n,i){if(n.filter)return handleFilter(getStats,e,t,r,n,i);return getStats(e,t,r,n,i)}function getStats(e,t,r,i,s){const o=i.dereference?n.stat:n.lstat;o(t,((n,o)=>{if(n)return s(n);if(o.isDirectory())return onDir(o,e,t,r,i,s);else if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return onFile(o,e,t,r,i,s);else if(o.isSymbolicLink())return onLink(e,t,r,i,s);else if(o.isSocket())return s(new Error(`Cannot copy a socket file: ${t}`));else if(o.isFIFO())return s(new Error(`Cannot copy a FIFO pipe: ${t}`));return s(new Error(`Unknown file: ${t}`))}))}function onFile(e,t,r,n,i,s){if(!t)return copyFile(e,r,n,i,s);return mayCopyFile(e,r,n,i,s)}function mayCopyFile(e,t,r,i,s){if(i.overwrite){n.unlink(r,(n=>{if(n)return s(n);return copyFile(e,t,r,i,s)}))}else if(i.errorOnExist){return s(new Error(`'${r}' already exists`))}else return s()}function copyFile(e,t,r,i,s){n.copyFile(t,r,(n=>{if(n)return s(n);if(i.preserveTimestamps)return handleTimestampsAndMode(e.mode,t,r,s);return setDestMode(r,e.mode,s)}))}function handleTimestampsAndMode(e,t,r,n){if(fileIsNotWritable(e)){return makeFileWritable(r,e,(i=>{if(i)return n(i);return setDestTimestampsAndMode(e,t,r,n)}))}return setDestTimestampsAndMode(e,t,r,n)}function fileIsNotWritable(e){return(e&128)===0}function makeFileWritable(e,t,r){return setDestMode(e,t|128,r)}function setDestTimestampsAndMode(e,t,r,n){setDestTimestamps(t,r,(t=>{if(t)return n(t);return setDestMode(r,e,n)}))}function setDestMode(e,t,r){return n.chmod(e,t,r)}function setDestTimestamps(e,t,r){n.stat(e,((e,n)=>{if(e)return r(e);return a(t,n.atime,n.mtime,r)}))}function onDir(e,t,r,n,i,s){if(!t)return mkDirAndCopy(e.mode,r,n,i,s);return copyDir(r,n,i,s)}function mkDirAndCopy(e,t,r,i,s){n.mkdir(r,(n=>{if(n)return s(n);copyDir(t,r,i,(t=>{if(t)return s(t);return setDestMode(r,e,s)}))}))}function copyDir(e,t,r,i){n.readdir(e,((n,s)=>{if(n)return i(n);return copyDirItems(s,e,t,r,i)}))}function copyDirItems(e,t,r,n,i){const s=e.pop();if(!s)return i();return copyDirItem(e,s,t,r,n,i)}function copyDirItem(e,t,r,n,s,o){const a=i.join(r,t);const l=i.join(n,t);u.checkPaths(a,l,"copy",s,((t,i)=>{if(t)return o(t);const{destStat:u}=i;startCopy(u,a,l,s,(t=>{if(t)return o(t);return copyDirItems(e,r,n,s,o)}))}))}function onLink(e,t,r,s,o){n.readlink(t,((t,a)=>{if(t)return o(t);if(s.dereference){a=i.resolve(process.cwd(),a)}if(!e){return n.symlink(a,r,o)}else{n.readlink(r,((t,l)=>{if(t){if(t.code==="EINVAL"||t.code==="UNKNOWN")return n.symlink(a,r,o);return o(t)}if(s.dereference){l=i.resolve(process.cwd(),l)}if(u.isSrcSubdir(a,l)){return o(new Error(`Cannot copy '${a}' to a subdirectory of itself, '${l}'.`))}if(e.isDirectory()&&u.isSrcSubdir(l,a)){return o(new Error(`Cannot overwrite '${l}' with '${a}'.`))}return copyLink(a,r,o)}))}}))}function copyLink(e,t,r){n.unlink(t,(i=>{if(i)return r(i);return n.symlink(e,t,r)}))}e.exports=copy},7619:(e,t,r)=>{"use strict";const n=r(3706).fromCallback;e.exports={copy:n(r(9226))}},4810:(e,t,r)=>{"use strict";const n=r(3706).fromPromise;const i=r(2003);const s=r(1017);const o=r(5443);const a=r(6875);const u=n((async function emptyDir(e){let t;try{t=await i.readdir(e)}catch{return o.mkdirs(e)}return Promise.all(t.map((t=>a.remove(s.join(e,t)))))}));function emptyDirSync(e){let t;try{t=i.readdirSync(e)}catch{return o.mkdirsSync(e)}t.forEach((t=>{t=s.join(e,t);a.removeSync(t)}))}e.exports={emptyDirSync:emptyDirSync,emptydirSync:emptyDirSync,emptyDir:u,emptydir:u}},3132:(e,t,r)=>{"use strict";const n=r(3706).fromCallback;const i=r(1017);const s=r(7765);const o=r(5443);function createFile(e,t){function makeFile(){s.writeFile(e,"",(e=>{if(e)return t(e);t()}))}s.stat(e,((r,n)=>{if(!r&&n.isFile())return t();const a=i.dirname(e);s.stat(a,((e,r)=>{if(e){if(e.code==="ENOENT"){return o.mkdirs(a,(e=>{if(e)return t(e);makeFile()}))}return t(e)}if(r.isDirectory())makeFile();else{s.readdir(a,(e=>{if(e)return t(e)}))}}))}))}function createFileSync(e){let t;try{t=s.statSync(e)}catch{}if(t&&t.isFile())return;const r=i.dirname(e);try{if(!s.statSync(r).isDirectory()){s.readdirSync(r)}}catch(e){if(e&&e.code==="ENOENT")o.mkdirsSync(r);else throw e}s.writeFileSync(e,"")}e.exports={createFile:n(createFile),createFileSync:createFileSync}},1393:(e,t,r)=>{"use strict";const n=r(3132);const i=r(5258);const s=r(9609);e.exports={createFile:n.createFile,createFileSync:n.createFileSync,ensureFile:n.createFile,ensureFileSync:n.createFileSync,createLink:i.createLink,createLinkSync:i.createLinkSync,ensureLink:i.createLink,ensureLinkSync:i.createLinkSync,createSymlink:s.createSymlink,createSymlinkSync:s.createSymlinkSync,ensureSymlink:s.createSymlink,ensureSymlinkSync:s.createSymlinkSync}},5258:(e,t,r)=>{"use strict";const n=r(3706).fromCallback;const i=r(1017);const s=r(7765);const o=r(5443);const a=r(6618).pathExists;const{areIdentical:u}=r(7169);function createLink(e,t,r){function makeLink(e,t){s.link(e,t,(e=>{if(e)return r(e);r(null)}))}s.lstat(t,((n,l)=>{s.lstat(e,((n,s)=>{if(n){n.message=n.message.replace("lstat","ensureLink");return r(n)}if(l&&u(s,l))return r(null);const c=i.dirname(t);a(c,((n,i)=>{if(n)return r(n);if(i)return makeLink(e,t);o.mkdirs(c,(n=>{if(n)return r(n);makeLink(e,t)}))}))}))}))}function createLinkSync(e,t){let r;try{r=s.lstatSync(t)}catch{}try{const t=s.lstatSync(e);if(r&&u(t,r))return}catch(e){e.message=e.message.replace("lstat","ensureLink");throw e}const n=i.dirname(t);const a=s.existsSync(n);if(a)return s.linkSync(e,t);o.mkdirsSync(n);return s.linkSync(e,t)}e.exports={createLink:n(createLink),createLinkSync:createLinkSync}},6927:(e,t,r)=>{"use strict";const n=r(1017);const i=r(7765);const s=r(6618).pathExists;function symlinkPaths(e,t,r){if(n.isAbsolute(e)){return i.lstat(e,(t=>{if(t){t.message=t.message.replace("lstat","ensureSymlink");return r(t)}return r(null,{toCwd:e,toDst:e})}))}else{const o=n.dirname(t);const a=n.join(o,e);return s(a,((t,s)=>{if(t)return r(t);if(s){return r(null,{toCwd:a,toDst:e})}else{return i.lstat(e,(t=>{if(t){t.message=t.message.replace("lstat","ensureSymlink");return r(t)}return r(null,{toCwd:e,toDst:n.relative(o,e)})}))}}))}}function symlinkPathsSync(e,t){let r;if(n.isAbsolute(e)){r=i.existsSync(e);if(!r)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}else{const s=n.dirname(t);const o=n.join(s,e);r=i.existsSync(o);if(r){return{toCwd:o,toDst:e}}else{r=i.existsSync(e);if(!r)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:n.relative(s,e)}}}}e.exports={symlinkPaths:symlinkPaths,symlinkPathsSync:symlinkPathsSync}},3694:(e,t,r)=>{"use strict";const n=r(7765);function symlinkType(e,t,r){r=typeof t==="function"?t:r;t=typeof t==="function"?false:t;if(t)return r(null,t);n.lstat(e,((e,n)=>{if(e)return r(null,"file");t=n&&n.isDirectory()?"dir":"file";r(null,t)}))}function symlinkTypeSync(e,t){let r;if(t)return t;try{r=n.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}e.exports={symlinkType:symlinkType,symlinkTypeSync:symlinkTypeSync}},9609:(e,t,r)=>{"use strict";const n=r(3706).fromCallback;const i=r(1017);const s=r(2003);const o=r(5443);const a=o.mkdirs;const u=o.mkdirsSync;const l=r(6927);const c=l.symlinkPaths;const f=l.symlinkPathsSync;const d=r(3694);const p=d.symlinkType;const h=d.symlinkTypeSync;const m=r(6618).pathExists;const{areIdentical:v}=r(7169);function createSymlink(e,t,r,n){n=typeof r==="function"?r:n;r=typeof r==="function"?false:r;s.lstat(t,((i,o)=>{if(!i&&o.isSymbolicLink()){Promise.all([s.stat(e),s.stat(t)]).then((([i,s])=>{if(v(i,s))return n(null);_createSymlink(e,t,r,n)}))}else _createSymlink(e,t,r,n)}))}function _createSymlink(e,t,r,n){c(e,t,((o,u)=>{if(o)return n(o);e=u.toDst;p(u.toCwd,r,((r,o)=>{if(r)return n(r);const u=i.dirname(t);m(u,((r,i)=>{if(r)return n(r);if(i)return s.symlink(e,t,o,n);a(u,(r=>{if(r)return n(r);s.symlink(e,t,o,n)}))}))}))}))}function createSymlinkSync(e,t,r){let n;try{n=s.lstatSync(t)}catch{}if(n&&n.isSymbolicLink()){const r=s.statSync(e);const n=s.statSync(t);if(v(r,n))return}const o=f(e,t);e=o.toDst;r=h(o.toCwd,r);const a=i.dirname(t);const l=s.existsSync(a);if(l)return s.symlinkSync(e,t,r);u(a);return s.symlinkSync(e,t,r)}e.exports={createSymlink:n(createSymlink),createSymlinkSync:createSymlinkSync}},2003:(e,t,r)=>{"use strict";const n=r(3706).fromCallback;const i=r(7765);const s=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((e=>typeof i[e]==="function"));Object.assign(t,i);s.forEach((e=>{t[e]=n(i[e])}));t.realpath.native=n(i.realpath.native);t.exists=function(e,t){if(typeof t==="function"){return i.exists(e,t)}return new Promise((t=>i.exists(e,t)))};t.read=function(e,t,r,n,s,o){if(typeof o==="function"){return i.read(e,t,r,n,s,o)}return new Promise(((o,a)=>{i.read(e,t,r,n,s,((e,t,r)=>{if(e)return a(e);o({bytesRead:t,buffer:r})}))}))};t.write=function(e,t,...r){if(typeof r[r.length-1]==="function"){return i.write(e,t,...r)}return new Promise(((n,s)=>{i.write(e,t,...r,((e,t,r)=>{if(e)return s(e);n({bytesWritten:t,buffer:r})}))}))};if(typeof i.writev==="function"){t.writev=function(e,t,...r){if(typeof r[r.length-1]==="function"){return i.writev(e,t,...r)}return new Promise(((n,s)=>{i.writev(e,t,...r,((e,t,r)=>{if(e)return s(e);n({bytesWritten:t,buffers:r})}))}))}}},5176:(e,t,r)=>{"use strict";e.exports={...r(2003),...r(5390),...r(7619),...r(4810),...r(1393),...r(6287),...r(5443),...r(4155),...r(9453),...r(209),...r(6618),...r(6875)}},6287:(e,t,r)=>{"use strict";const n=r(3706).fromPromise;const i=r(1108);i.outputJson=n(r(447));i.outputJsonSync=r(466);i.outputJSON=i.outputJson;i.outputJSONSync=i.outputJsonSync;i.writeJSON=i.writeJson;i.writeJSONSync=i.writeJsonSync;i.readJSON=i.readJson;i.readJSONSync=i.readJsonSync;e.exports=i},1108:(e,t,r)=>{"use strict";const n=r(5533);e.exports={readJson:n.readFile,readJsonSync:n.readFileSync,writeJson:n.writeFile,writeJsonSync:n.writeFileSync}},466:(e,t,r)=>{"use strict";const{stringify:n}=r(8171);const{outputFileSync:i}=r(209);function outputJsonSync(e,t,r){const s=n(t,r);i(e,s,r)}e.exports=outputJsonSync},447:(e,t,r)=>{"use strict";const{stringify:n}=r(8171);const{outputFile:i}=r(209);async function outputJson(e,t,r={}){const s=n(t,r);await i(e,s,r)}e.exports=outputJson},5443:(e,t,r)=>{"use strict";const n=r(3706).fromPromise;const{makeDir:i,makeDirSync:s}=r(7113);const o=n(i);e.exports={mkdirs:o,mkdirsSync:s,mkdirp:o,mkdirpSync:s,ensureDir:o,ensureDirSync:s}},7113:(e,t,r)=>{"use strict";const n=r(2003);const{checkPath:i}=r(4096);const getMode=e=>{const t={mode:511};if(typeof e==="number")return e;return{...t,...e}.mode};e.exports.makeDir=async(e,t)=>{i(e);return n.mkdir(e,{mode:getMode(t),recursive:true})};e.exports.makeDirSync=(e,t)=>{i(e);return n.mkdirSync(e,{mode:getMode(t),recursive:true})}},4096:(e,t,r)=>{"use strict";const n=r(1017);e.exports.checkPath=function checkPath(e){if(process.platform==="win32"){const t=/[<>:"|?*]/.test(e.replace(n.parse(e).root,""));if(t){const t=new Error(`Path contains invalid characters: ${e}`);t.code="EINVAL";throw t}}}},4155:(e,t,r)=>{"use strict";e.exports={moveSync:r(8450)}},8450:(e,t,r)=>{"use strict";const n=r(7765);const i=r(1017);const s=r(5390).copySync;const o=r(6875).removeSync;const a=r(5443).mkdirpSync;const u=r(7169);function moveSync(e,t,r){r=r||{};const n=r.overwrite||r.clobber||false;const{srcStat:s,isChangingCase:o=false}=u.checkPathsSync(e,t,"move",r);u.checkParentPathsSync(e,s,t,"move");if(!isParentRoot(t))a(i.dirname(t));return doRename(e,t,n,o)}function isParentRoot(e){const t=i.dirname(e);const r=i.parse(t);return r.root===t}function doRename(e,t,r,i){if(i)return rename(e,t,r);if(r){o(t);return rename(e,t,r)}if(n.existsSync(t))throw new Error("dest already exists.");return rename(e,t,r)}function rename(e,t,r){try{n.renameSync(e,t)}catch(n){if(n.code!=="EXDEV")throw n;return moveAcrossDevice(e,t,r)}}function moveAcrossDevice(e,t,r){const n={overwrite:r,errorOnExist:true};s(e,t,n);return o(e)}e.exports=moveSync},9453:(e,t,r)=>{"use strict";const n=r(3706).fromCallback;e.exports={move:n(r(2826))}},2826:(e,t,r)=>{"use strict";const n=r(7765);const i=r(1017);const s=r(7619).copy;const o=r(6875).remove;const a=r(5443).mkdirp;const u=r(6618).pathExists;const l=r(7169);function move(e,t,r,n){if(typeof r==="function"){n=r;r={}}const s=r.overwrite||r.clobber||false;l.checkPaths(e,t,"move",r,((r,o)=>{if(r)return n(r);const{srcStat:u,isChangingCase:c=false}=o;l.checkParentPaths(e,u,t,"move",(r=>{if(r)return n(r);if(isParentRoot(t))return doRename(e,t,s,c,n);a(i.dirname(t),(r=>{if(r)return n(r);return doRename(e,t,s,c,n)}))}))}))}function isParentRoot(e){const t=i.dirname(e);const r=i.parse(t);return r.root===t}function doRename(e,t,r,n,i){if(n)return rename(e,t,r,i);if(r){return o(t,(n=>{if(n)return i(n);return rename(e,t,r,i)}))}u(t,((n,s)=>{if(n)return i(n);if(s)return i(new Error("dest already exists."));return rename(e,t,r,i)}))}function rename(e,t,r,i){n.rename(e,t,(n=>{if(!n)return i();if(n.code!=="EXDEV")return i(n);return moveAcrossDevice(e,t,r,i)}))}function moveAcrossDevice(e,t,r,n){const i={overwrite:r,errorOnExist:true};s(e,t,i,(t=>{if(t)return n(t);return o(e,n)}))}e.exports=move},209:(e,t,r)=>{"use strict";const n=r(3706).fromCallback;const i=r(7765);const s=r(1017);const o=r(5443);const a=r(6618).pathExists;function outputFile(e,t,r,n){if(typeof r==="function"){n=r;r="utf8"}const u=s.dirname(e);a(u,((s,a)=>{if(s)return n(s);if(a)return i.writeFile(e,t,r,n);o.mkdirs(u,(s=>{if(s)return n(s);i.writeFile(e,t,r,n)}))}))}function outputFileSync(e,...t){const r=s.dirname(e);if(i.existsSync(r)){return i.writeFileSync(e,...t)}o.mkdirsSync(r);i.writeFileSync(e,...t)}e.exports={outputFile:n(outputFile),outputFileSync:outputFileSync}},6618:(e,t,r)=>{"use strict";const n=r(3706).fromPromise;const i=r(2003);function pathExists(e){return i.access(e).then((()=>true)).catch((()=>false))}e.exports={pathExists:n(pathExists),pathExistsSync:i.existsSync}},6875:(e,t,r)=>{"use strict";const n=r(7765);const i=r(3706).fromCallback;const s=r(7611);function remove(e,t){if(n.rm)return n.rm(e,{recursive:true,force:true},t);s(e,t)}function removeSync(e){if(n.rmSync)return n.rmSync(e,{recursive:true,force:true});s.sync(e)}e.exports={remove:i(remove),removeSync:removeSync}},7611:(e,t,r)=>{"use strict";const n=r(7765);const i=r(1017);const s=r(9491);const o=process.platform==="win32";function defaults(e){const t=["unlink","chmod","stat","lstat","rmdir","readdir"];t.forEach((t=>{e[t]=e[t]||n[t];t=t+"Sync";e[t]=e[t]||n[t]}));e.maxBusyTries=e.maxBusyTries||3}function rimraf(e,t,r){let n=0;if(typeof t==="function"){r=t;t={}}s(e,"rimraf: missing path");s.strictEqual(typeof e,"string","rimraf: path should be a string");s.strictEqual(typeof r,"function","rimraf: callback function required");s(t,"rimraf: invalid options argument provided");s.strictEqual(typeof t,"object","rimraf: options should be object");defaults(t);rimraf_(e,t,(function CB(i){if(i){if((i.code==="EBUSY"||i.code==="ENOTEMPTY"||i.code==="EPERM")&&nrimraf_(e,t,CB)),r)}if(i.code==="ENOENT")i=null}r(i)}))}function rimraf_(e,t,r){s(e);s(t);s(typeof r==="function");t.lstat(e,((n,i)=>{if(n&&n.code==="ENOENT"){return r(null)}if(n&&n.code==="EPERM"&&o){return fixWinEPERM(e,t,n,r)}if(i&&i.isDirectory()){return rmdir(e,t,n,r)}t.unlink(e,(n=>{if(n){if(n.code==="ENOENT"){return r(null)}if(n.code==="EPERM"){return o?fixWinEPERM(e,t,n,r):rmdir(e,t,n,r)}if(n.code==="EISDIR"){return rmdir(e,t,n,r)}}return r(n)}))}))}function fixWinEPERM(e,t,r,n){s(e);s(t);s(typeof n==="function");t.chmod(e,438,(i=>{if(i){n(i.code==="ENOENT"?null:r)}else{t.stat(e,((i,s)=>{if(i){n(i.code==="ENOENT"?null:r)}else if(s.isDirectory()){rmdir(e,t,r,n)}else{t.unlink(e,n)}}))}}))}function fixWinEPERMSync(e,t,r){let n;s(e);s(t);try{t.chmodSync(e,438)}catch(e){if(e.code==="ENOENT"){return}else{throw r}}try{n=t.statSync(e)}catch(e){if(e.code==="ENOENT"){return}else{throw r}}if(n.isDirectory()){rmdirSync(e,t,r)}else{t.unlinkSync(e)}}function rmdir(e,t,r,n){s(e);s(t);s(typeof n==="function");t.rmdir(e,(i=>{if(i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")){rmkids(e,t,n)}else if(i&&i.code==="ENOTDIR"){n(r)}else{n(i)}}))}function rmkids(e,t,r){s(e);s(t);s(typeof r==="function");t.readdir(e,((n,s)=>{if(n)return r(n);let o=s.length;let a;if(o===0)return t.rmdir(e,r);s.forEach((n=>{rimraf(i.join(e,n),t,(n=>{if(a){return}if(n)return r(a=n);if(--o===0){t.rmdir(e,r)}}))}))}))}function rimrafSync(e,t){let r;t=t||{};defaults(t);s(e,"rimraf: missing path");s.strictEqual(typeof e,"string","rimraf: path should be a string");s(t,"rimraf: missing options");s.strictEqual(typeof t,"object","rimraf: options should be object");try{r=t.lstatSync(e)}catch(r){if(r.code==="ENOENT"){return}if(r.code==="EPERM"&&o){fixWinEPERMSync(e,t,r)}}try{if(r&&r.isDirectory()){rmdirSync(e,t,null)}else{t.unlinkSync(e)}}catch(r){if(r.code==="ENOENT"){return}else if(r.code==="EPERM"){return o?fixWinEPERMSync(e,t,r):rmdirSync(e,t,r)}else if(r.code!=="EISDIR"){throw r}rmdirSync(e,t,r)}}function rmdirSync(e,t,r){s(e);s(t);try{t.rmdirSync(e)}catch(n){if(n.code==="ENOTDIR"){throw r}else if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM"){rmkidsSync(e,t)}else if(n.code!=="ENOENT"){throw n}}}function rmkidsSync(e,t){s(e);s(t);t.readdirSync(e).forEach((r=>rimrafSync(i.join(e,r),t)));if(o){const r=Date.now();do{try{const r=t.rmdirSync(e,t);return r}catch{}}while(Date.now()-r<500)}else{const r=t.rmdirSync(e,t);return r}}e.exports=rimraf;rimraf.sync=rimrafSync},7169:(e,t,r)=>{"use strict";const n=r(2003);const i=r(1017);const s=r(3837);function getStats(e,t,r){const i=r.dereference?e=>n.stat(e,{bigint:true}):e=>n.lstat(e,{bigint:true});return Promise.all([i(e),i(t).catch((e=>{if(e.code==="ENOENT")return null;throw e}))]).then((([e,t])=>({srcStat:e,destStat:t})))}function getStatsSync(e,t,r){let i;const s=r.dereference?e=>n.statSync(e,{bigint:true}):e=>n.lstatSync(e,{bigint:true});const o=s(e);try{i=s(t)}catch(e){if(e.code==="ENOENT")return{srcStat:o,destStat:null};throw e}return{srcStat:o,destStat:i}}function checkPaths(e,t,r,n,o){s.callbackify(getStats)(e,t,n,((n,s)=>{if(n)return o(n);const{srcStat:a,destStat:u}=s;if(u){if(areIdentical(a,u)){const n=i.basename(e);const s=i.basename(t);if(r==="move"&&n!==s&&n.toLowerCase()===s.toLowerCase()){return o(null,{srcStat:a,destStat:u,isChangingCase:true})}return o(new Error("Source and destination must not be the same."))}if(a.isDirectory()&&!u.isDirectory()){return o(new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`))}if(!a.isDirectory()&&u.isDirectory()){return o(new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`))}}if(a.isDirectory()&&isSrcSubdir(e,t)){return o(new Error(errMsg(e,t,r)))}return o(null,{srcStat:a,destStat:u})}))}function checkPathsSync(e,t,r,n){const{srcStat:s,destStat:o}=getStatsSync(e,t,n);if(o){if(areIdentical(s,o)){const n=i.basename(e);const a=i.basename(t);if(r==="move"&&n!==a&&n.toLowerCase()===a.toLowerCase()){return{srcStat:s,destStat:o,isChangingCase:true}}throw new Error("Source and destination must not be the same.")}if(s.isDirectory()&&!o.isDirectory()){throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`)}if(!s.isDirectory()&&o.isDirectory()){throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}}if(s.isDirectory()&&isSrcSubdir(e,t)){throw new Error(errMsg(e,t,r))}return{srcStat:s,destStat:o}}function checkParentPaths(e,t,r,s,o){const a=i.resolve(i.dirname(e));const u=i.resolve(i.dirname(r));if(u===a||u===i.parse(u).root)return o();n.stat(u,{bigint:true},((n,i)=>{if(n){if(n.code==="ENOENT")return o();return o(n)}if(areIdentical(t,i)){return o(new Error(errMsg(e,r,s)))}return checkParentPaths(e,t,u,s,o)}))}function checkParentPathsSync(e,t,r,s){const o=i.resolve(i.dirname(e));const a=i.resolve(i.dirname(r));if(a===o||a===i.parse(a).root)return;let u;try{u=n.statSync(a,{bigint:true})}catch(e){if(e.code==="ENOENT")return;throw e}if(areIdentical(t,u)){throw new Error(errMsg(e,r,s))}return checkParentPathsSync(e,t,a,s)}function areIdentical(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function isSrcSubdir(e,t){const r=i.resolve(e).split(i.sep).filter((e=>e));const n=i.resolve(t).split(i.sep).filter((e=>e));return r.reduce(((e,t,r)=>e&&n[r]===t),true)}function errMsg(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}e.exports={checkPaths:checkPaths,checkPathsSync:checkPathsSync,checkParentPaths:checkParentPaths,checkParentPathsSync:checkParentPathsSync,isSrcSubdir:isSrcSubdir,areIdentical:areIdentical}},7237:(e,t,r)=>{"use strict";const n=r(7765);function utimesMillis(e,t,r,i){n.open(e,"r+",((e,s)=>{if(e)return i(e);n.futimes(s,t,r,(e=>{n.close(s,(t=>{if(i)i(e||t)}))}))}))}function utimesMillisSync(e,t,r){const i=n.openSync(e,"r+");n.futimesSync(i,t,r);return n.closeSync(i)}e.exports={utimesMillis:utimesMillis,utimesMillisSync:utimesMillisSync}},3236:e=>{"use strict";e.exports=clone;var t=Object.getPrototypeOf||function(e){return e.__proto__};function clone(e){if(e===null||typeof e!=="object")return e;if(e instanceof Object)var r={__proto__:t(e)};else var r=Object.create(null);Object.getOwnPropertyNames(e).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}));return r}},7765:(e,t,r)=>{var n=r(7147);var i=r(7457);var s=r(7681);var o=r(3236);var a=r(3837);var u;var l;if(typeof Symbol==="function"&&typeof Symbol.for==="function"){u=Symbol.for("graceful-fs.queue");l=Symbol.for("graceful-fs.previous")}else{u="___graceful-fs.queue";l="___graceful-fs.previous"}function noop(){}function publishQueue(e,t){Object.defineProperty(e,u,{get:function(){return t}})}var c=noop;if(a.debuglog)c=a.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))c=function(){var e=a.format.apply(a,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: ");console.error(e)};if(!n[u]){var f=global[u]||[];publishQueue(n,f);n.close=function(e){function close(t,r){return e.call(n,t,(function(e){if(!e){resetQueue()}if(typeof r==="function")r.apply(this,arguments)}))}Object.defineProperty(close,l,{value:e});return close}(n.close);n.closeSync=function(e){function closeSync(t){e.apply(n,arguments);resetQueue()}Object.defineProperty(closeSync,l,{value:e});return closeSync}(n.closeSync);if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")){process.on("exit",(function(){c(n[u]);r(9491).equal(n[u].length,0)}))}}if(!global[u]){publishQueue(global,n[u])}e.exports=patch(o(n));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!n.__patched){e.exports=patch(n);n.__patched=true}function patch(e){i(e);e.gracefulify=patch;e.createReadStream=createReadStream;e.createWriteStream=createWriteStream;var t=e.readFile;e.readFile=readFile;function readFile(e,r,n){if(typeof r==="function")n=r,r=null;return go$readFile(e,r,n);function go$readFile(e,r,n,i){return t(e,r,(function(t){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))enqueue([go$readFile,[e,r,n],t,i||Date.now(),Date.now()]);else{if(typeof n==="function")n.apply(this,arguments)}}))}}var r=e.writeFile;e.writeFile=writeFile;function writeFile(e,t,n,i){if(typeof n==="function")i=n,n=null;return go$writeFile(e,t,n,i);function go$writeFile(e,t,n,i,s){return r(e,t,n,(function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))enqueue([go$writeFile,[e,t,n,i],r,s||Date.now(),Date.now()]);else{if(typeof i==="function")i.apply(this,arguments)}}))}}var n=e.appendFile;if(n)e.appendFile=appendFile;function appendFile(e,t,r,i){if(typeof r==="function")i=r,r=null;return go$appendFile(e,t,r,i);function go$appendFile(e,t,r,i,s){return n(e,t,r,(function(n){if(n&&(n.code==="EMFILE"||n.code==="ENFILE"))enqueue([go$appendFile,[e,t,r,i],n,s||Date.now(),Date.now()]);else{if(typeof i==="function")i.apply(this,arguments)}}))}}var o=e.copyFile;if(o)e.copyFile=copyFile;function copyFile(e,t,r,n){if(typeof r==="function"){n=r;r=0}return go$copyFile(e,t,r,n);function go$copyFile(e,t,r,n,i){return o(e,t,r,(function(s){if(s&&(s.code==="EMFILE"||s.code==="ENFILE"))enqueue([go$copyFile,[e,t,r,n],s,i||Date.now(),Date.now()]);else{if(typeof n==="function")n.apply(this,arguments)}}))}}var a=e.readdir;e.readdir=readdir;function readdir(e,t,r){if(typeof t==="function")r=t,t=null;return go$readdir(e,t,r);function go$readdir(e,t,r,n){return a(e,t,(function(i,s){if(i&&(i.code==="EMFILE"||i.code==="ENFILE"))enqueue([go$readdir,[e,t,r],i,n||Date.now(),Date.now()]);else{if(s&&s.sort)s.sort();if(typeof r==="function")r.call(this,i,s)}}))}}if(process.version.substr(0,4)==="v0.8"){var u=s(e);ReadStream=u.ReadStream;WriteStream=u.WriteStream}var l=e.ReadStream;if(l){ReadStream.prototype=Object.create(l.prototype);ReadStream.prototype.open=ReadStream$open}var c=e.WriteStream;if(c){WriteStream.prototype=Object.create(c.prototype);WriteStream.prototype.open=WriteStream$open}Object.defineProperty(e,"ReadStream",{get:function(){return ReadStream},set:function(e){ReadStream=e},enumerable:true,configurable:true});Object.defineProperty(e,"WriteStream",{get:function(){return WriteStream},set:function(e){WriteStream=e},enumerable:true,configurable:true});var f=ReadStream;Object.defineProperty(e,"FileReadStream",{get:function(){return f},set:function(e){f=e},enumerable:true,configurable:true});var d=WriteStream;Object.defineProperty(e,"FileWriteStream",{get:function(){return d},set:function(e){d=e},enumerable:true,configurable:true});function ReadStream(e,t){if(this instanceof ReadStream)return l.apply(this,arguments),this;else return ReadStream.apply(Object.create(ReadStream.prototype),arguments)}function ReadStream$open(){var e=this;open(e.path,e.flags,e.mode,(function(t,r){if(t){if(e.autoClose)e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r);e.read()}}))}function WriteStream(e,t){if(this instanceof WriteStream)return c.apply(this,arguments),this;else return WriteStream.apply(Object.create(WriteStream.prototype),arguments)}function WriteStream$open(){var e=this;open(e.path,e.flags,e.mode,(function(t,r){if(t){e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r)}}))}function createReadStream(t,r){return new e.ReadStream(t,r)}function createWriteStream(t,r){return new e.WriteStream(t,r)}var p=e.open;e.open=open;function open(e,t,r,n){if(typeof r==="function")n=r,r=null;return go$open(e,t,r,n);function go$open(e,t,r,n,i){return p(e,t,r,(function(s,o){if(s&&(s.code==="EMFILE"||s.code==="ENFILE"))enqueue([go$open,[e,t,r,n],s,i||Date.now(),Date.now()]);else{if(typeof n==="function")n.apply(this,arguments)}}))}}return e}function enqueue(e){c("ENQUEUE",e[0].name,e[1]);n[u].push(e);retry()}var d;function resetQueue(){var e=Date.now();for(var t=0;t2){n[u][t][3]=e;n[u][t][4]=e}}retry()}function retry(){clearTimeout(d);d=undefined;if(n[u].length===0)return;var e=n[u].shift();var t=e[0];var r=e[1];var i=e[2];var s=e[3];var o=e[4];if(s===undefined){c("RETRY",t.name,r);t.apply(null,r)}else if(Date.now()-s>=6e4){c("TIMEOUT",t.name,r);var a=r.pop();if(typeof a==="function")a.call(null,i)}else{var l=Date.now()-o;var f=Math.max(o-s,1);var p=Math.min(f*1.2,100);if(l>=p){c("RETRY",t.name,r);t.apply(null,r.concat([s]))}else{n[u].push(e)}}if(d===undefined){d=setTimeout(retry,0)}}},7681:(e,t,r)=>{var n=r(2781).Stream;e.exports=legacy;function legacy(e){return{ReadStream:ReadStream,WriteStream:WriteStream};function ReadStream(t,r){if(!(this instanceof ReadStream))return new ReadStream(t,r);n.call(this);var i=this;this.path=t;this.fd=null;this.readable=true;this.paused=false;this.flags="r";this.mode=438;this.bufferSize=64*1024;r=r||{};var s=Object.keys(r);for(var o=0,a=s.length;othis.end){throw new Error("start must be <= end")}this.pos=this.start}if(this.fd!==null){process.nextTick((function(){i._read()}));return}e.open(this.path,this.flags,this.mode,(function(e,t){if(e){i.emit("error",e);i.readable=false;return}i.fd=t;i.emit("open",t);i._read()}))}function WriteStream(t,r){if(!(this instanceof WriteStream))return new WriteStream(t,r);n.call(this);this.path=t;this.fd=null;this.writable=true;this.flags="w";this.encoding="binary";this.mode=438;this.bytesWritten=0;r=r||{};var i=Object.keys(r);for(var s=0,o=i.length;s= zero")}this.pos=this.start}this.busy=false;this._queue=[];if(this.fd===null){this._open=e.open;this._queue.push([this._open,this.path,this.flags,this.mode,undefined]);this.flush()}}}},7457:(e,t,r)=>{var n=r(2057);var i=process.cwd;var s=null;var o=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!s)s=i.call(process);return s};try{process.cwd()}catch(e){}if(typeof process.chdir==="function"){var a=process.chdir;process.chdir=function(e){s=null;a.call(process,e)};if(Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,a)}e.exports=patch;function patch(e){if(n.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)){patchLchmod(e)}if(!e.lutimes){patchLutimes(e)}e.chown=chownFix(e.chown);e.fchown=chownFix(e.fchown);e.lchown=chownFix(e.lchown);e.chmod=chmodFix(e.chmod);e.fchmod=chmodFix(e.fchmod);e.lchmod=chmodFix(e.lchmod);e.chownSync=chownFixSync(e.chownSync);e.fchownSync=chownFixSync(e.fchownSync);e.lchownSync=chownFixSync(e.lchownSync);e.chmodSync=chmodFixSync(e.chmodSync);e.fchmodSync=chmodFixSync(e.fchmodSync);e.lchmodSync=chmodFixSync(e.lchmodSync);e.stat=statFix(e.stat);e.fstat=statFix(e.fstat);e.lstat=statFix(e.lstat);e.statSync=statFixSync(e.statSync);e.fstatSync=statFixSync(e.fstatSync);e.lstatSync=statFixSync(e.lstatSync);if(!e.lchmod){e.lchmod=function(e,t,r){if(r)process.nextTick(r)};e.lchmodSync=function(){}}if(!e.lchown){e.lchown=function(e,t,r,n){if(n)process.nextTick(n)};e.lchownSync=function(){}}if(o==="win32"){e.rename=function(t){return function(r,n,i){var s=Date.now();var o=0;t(r,n,(function CB(a){if(a&&(a.code==="EACCES"||a.code==="EPERM")&&Date.now()-s<6e4){setTimeout((function(){e.stat(n,(function(e,s){if(e&&e.code==="ENOENT")t(r,n,CB);else i(a)}))}),o);if(o<100)o+=10;return}if(i)i(a)}))}}(e.rename)}e.read=function(t){function read(r,n,i,s,o,a){var u;if(a&&typeof a==="function"){var l=0;u=function(c,f,d){if(c&&c.code==="EAGAIN"&&l<10){l++;return t.call(e,r,n,i,s,o,u)}a.apply(this,arguments)}}return t.call(e,r,n,i,s,o,u)}if(Object.setPrototypeOf)Object.setPrototypeOf(read,t);return read}(e.read);e.readSync=function(t){return function(r,n,i,s,o){var a=0;while(true){try{return t.call(e,r,n,i,s,o)}catch(e){if(e.code==="EAGAIN"&&a<10){a++;continue}throw e}}}}(e.readSync);function patchLchmod(e){e.lchmod=function(t,r,i){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,(function(t,n){if(t){if(i)i(t);return}e.fchmod(n,r,(function(t){e.close(n,(function(e){if(i)i(t||e)}))}))}))};e.lchmodSync=function(t,r){var i=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r);var s=true;var o;try{o=e.fchmodSync(i,r);s=false}finally{if(s){try{e.closeSync(i)}catch(e){}}else{e.closeSync(i)}}return o}}function patchLutimes(e){if(n.hasOwnProperty("O_SYMLINK")){e.lutimes=function(t,r,i,s){e.open(t,n.O_SYMLINK,(function(t,n){if(t){if(s)s(t);return}e.futimes(n,r,i,(function(t){e.close(n,(function(e){if(s)s(t||e)}))}))}))};e.lutimesSync=function(t,r,i){var s=e.openSync(t,n.O_SYMLINK);var o;var a=true;try{o=e.futimesSync(s,r,i);a=false}finally{if(a){try{e.closeSync(s)}catch(e){}}else{e.closeSync(s)}}return o}}else{e.lutimes=function(e,t,r,n){if(n)process.nextTick(n)};e.lutimesSync=function(){}}}function chmodFix(t){if(!t)return t;return function(r,n,i){return t.call(e,r,n,(function(e){if(chownErOk(e))e=null;if(i)i.apply(this,arguments)}))}}function chmodFixSync(t){if(!t)return t;return function(r,n){try{return t.call(e,r,n)}catch(e){if(!chownErOk(e))throw e}}}function chownFix(t){if(!t)return t;return function(r,n,i,s){return t.call(e,r,n,i,(function(e){if(chownErOk(e))e=null;if(s)s.apply(this,arguments)}))}}function chownFixSync(t){if(!t)return t;return function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!chownErOk(e))throw e}}}function statFix(t){if(!t)return t;return function(r,n,i){if(typeof n==="function"){i=n;n=null}function callback(e,t){if(t){if(t.uid<0)t.uid+=4294967296;if(t.gid<0)t.gid+=4294967296}if(i)i.apply(this,arguments)}return n?t.call(e,r,n,callback):t.call(e,r,callback)}}function statFixSync(t){if(!t)return t;return function(r,n){var i=n?t.call(e,r,n):t.call(e,r);if(i){if(i.uid<0)i.uid+=4294967296;if(i.gid<0)i.gid+=4294967296}return i}}function chownErOk(e){if(!e)return true;if(e.code==="ENOSYS")return true;var t=!process.getuid||process.getuid()!==0;if(t){if(e.code==="EINVAL"||e.code==="EPERM")return true}return false}}},2157:(e,t,r)=>{"use strict";var n=r(2037);if(typeof n.homedir!=="undefined"){e.exports=n.homedir}else{e.exports=r(9975)}},9975:(e,t,r)=>{"use strict";var n=r(7147);var i=r(9524);function homedir(){if(process.platform==="win32"){if(process.env.USERPROFILE){return process.env.USERPROFILE}if(process.env.HOMEDRIVE&&process.env.HOMEPATH){return process.env.HOMEDRIVE+process.env.HOMEPATH}if(process.env.HOME){return process.env.HOME}return null}if(process.env.HOME){return process.env.HOME}var e=tryReadFileSync("/etc/passwd");var t=find(i(e),getuid());if(t){return t}var r=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;if(!r){return null}if(process.platform==="darwin"){return"/Users/"+r}return"/home/"+r}function find(e,t){var r=e.length;for(var n=0;n0){f("Patching connection write() output buffer with updated header");t=e.output[0];r=t.indexOf("\r\n\r\n")+4;e.output[0]=e._header+t.substring(r);f("Output buffer: %o",e.output)}else if(e.outputData&&e.outputData.length>0){f("Patching connection write() output buffer with updated header");t=e.outputData[0].data;r=t.indexOf("\r\n\r\n")+4;e.outputData[0].data=e._header+t.substring(r);f("Output buffer: %o",e.outputData[0].data)}}yield(0,l.default)(u,"connect");return u}))}}t["default"]=HttpProxyAgent},5283:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const i=n(r(5724));function createHttpProxyAgent(e){return new i.default(e)}(function(e){e.HttpProxyAgent=i.default;e.prototype=i.default.prototype})(createHttpProxyAgent||(createHttpProxyAgent={}));e.exports=createHttpProxyAgent},7316:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const s=i(r(1808));const o=i(r(4404));const a=i(r(7310));const u=i(r(9491));const l=i(r(5598));const c=r(5689);const f=i(r(5335));const d=l.default("https-proxy-agent:agent");class HttpsProxyAgent extends c.Agent{constructor(e){let t;if(typeof e==="string"){t=a.default.parse(e)}else{t=e}if(!t){throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!")}d("creating new HttpsProxyAgent instance: %o",t);super(t);const r=Object.assign({},t);this.secureProxy=t.secureProxy||isHTTPS(r.protocol);r.host=r.hostname||r.host;if(typeof r.port==="string"){r.port=parseInt(r.port,10)}if(!r.port&&r.host){r.port=this.secureProxy?443:80}if(this.secureProxy&&!("ALPNProtocols"in r)){r.ALPNProtocols=["http 1.1"]}if(r.host&&r.path){delete r.path;delete r.pathname}this.proxy=r}callback(e,t){return n(this,void 0,void 0,(function*(){const{proxy:r,secureProxy:n}=this;let i;if(n){d("Creating `tls.Socket`: %o",r);i=o.default.connect(r)}else{d("Creating `net.Socket`: %o",r);i=s.default.connect(r)}const a=Object.assign({},r.headers);const l=`${t.host}:${t.port}`;let c=`CONNECT ${l} HTTP/1.1\r\n`;if(r.auth){a["Proxy-Authorization"]=`Basic ${Buffer.from(r.auth).toString("base64")}`}let{host:p,port:h,secureEndpoint:m}=t;if(!isDefaultPort(h,m)){p+=`:${h}`}a.Host=p;a.Connection="close";for(const e of Object.keys(a)){c+=`${e}: ${a[e]}\r\n`}const v=f.default(i);i.write(`${c}\r\n`);const{statusCode:g,buffered:y}=yield v;if(g===200){e.once("socket",resume);if(t.secureEndpoint){const e=t.servername||t.host;if(!e){throw new Error('Could not determine "servername"')}d("Upgrading socket connection to TLS");return o.default.connect(Object.assign(Object.assign({},omit(t,"host","hostname","path","port")),{socket:i,servername:e}))}return i}i.destroy();const b=new s.default.Socket;b.readable=true;e.once("socket",(e=>{d("replaying proxy buffer for failed request");u.default(e.listenerCount("data")>0);e.push(y);e.push(null)}));return b}))}}t["default"]=HttpsProxyAgent;function resume(e){e.resume()}function isDefaultPort(e,t){return Boolean(!t&&e===80||t&&e===443)}function isHTTPS(e){return typeof e==="string"?/^https:?$/i.test(e):false}function omit(e,...t){const r={};let n;for(n in e){if(!t.includes(n)){r[n]=e[n]}}return r}},72:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const i=n(r(7316));function createHttpsProxyAgent(e){return new i.default(e)}(function(e){e.HttpsProxyAgent=i.default;e.prototype=i.default.prototype})(createHttpsProxyAgent||(createHttpsProxyAgent={}));e.exports=createHttpsProxyAgent},5335:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=n(r(5598));const s=i.default("https-proxy-agent:parse-proxy-response");function parseProxyResponse(e){return new Promise(((t,r)=>{let n=0;const i=[];function read(){const t=e.read();if(t)ondata(t);else e.once("readable",read)}function cleanup(){e.removeListener("end",onend);e.removeListener("error",onerror);e.removeListener("close",onclose);e.removeListener("readable",read)}function onclose(e){s("onclose had error %o",e)}function onend(){s("onend")}function onerror(e){cleanup();s("onerror %o",e);r(e)}function ondata(e){i.push(e);n+=e.length;const r=Buffer.concat(i,n);const o=r.indexOf("\r\n\r\n");if(o===-1){s("have not received end of HTTP headers yet...");read();return}const a=r.toString("ascii",0,r.indexOf("\r\n"));const u=+a.split(" ")[1];s("got proxy server response: %o",a);t({statusCode:u,buffered:r})}e.on("error",onerror);e.on("close",onclose);e.on("end",onend);read()}))}t["default"]=parseProxyResponse},979:(e,t,r)=>{"use strict"; +/*! + * humanize-ms - index.js + * Copyright(c) 2014 dead_horse + * MIT Licensed + */var n=r(3837);var i=r(8527);e.exports=function(e){if(typeof e==="number")return e;var t=i(e);if(t===undefined){var r=new Error(n.format("humanize-ms(%j) result undefined",e));console.warn(r.stack)}return t}},1972:e=>{"use strict";var t=typeof window!=="undefined"?window:typeof global!=="undefined"?global:{};e.exports=Individual;function Individual(e,r){if(e in t){return t[e]}t[e]=r;return r}},5651:(e,t,r)=>{try{var n=r(3837);if(typeof n.inherits!=="function")throw"";e.exports=n.inherits}catch(t){e.exports=r(5940)}},5940:e=>{if(typeof Object.create==="function"){e.exports=function inherits(e,t){if(t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,t){if(t){e.super_=t;var TempCtor=function(){};TempCtor.prototype=t.prototype;e.prototype=new TempCtor;e.prototype.constructor=e}}}},9316:(e,t,r)=>{"use strict";var n=t;var i=r(4300).Buffer;var s=r(2037);n.toBuffer=function(e,t,r){r=~~r;var n;if(this.isV4Format(e)){n=t||new i(r+4);e.split(/\./g).map((function(e){n[r++]=parseInt(e,10)&255}))}else if(this.isV6Format(e)){var s=e.split(":",8);var o;for(o=0;o0;o--){l.push("0")}s.splice.apply(s,l)}n=t||new i(r+16);for(o=0;o>8&255;n[r++]=c&255}}if(!n){throw Error("Invalid ip address: "+e)}return n};n.toString=function(e,t,r){t=~~t;r=r||e.length-t;var n=[];if(r===4){for(var i=0;i32){t="ipv6"}else{t=_normalizeFamily(t)}var r=4;if(t==="ipv6"){r=16}var s=new i(r);for(var o=0,a=s.length;o>u)&255}return n.toString(s)};n.mask=function(e,t){e=n.toBuffer(e);t=n.toBuffer(t);var r=new i(Math.max(e.length,t.length));var s=0;if(e.length===t.length){for(s=0;se.length){i=t;s=e}var o=i.length-s.length;for(var r=o;r>>0};n.fromLong=function(e){return(e>>>24)+"."+(e>>16&255)+"."+(e>>8&255)+"."+(e&255)}},3639:(e,t,r)=>{"use strict";var n=r(6344);var i=r(7902);function renamed(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. "+"Use yaml."+t+" instead, which is now safe by default.")}}e.exports.Type=r(4098);e.exports.Schema=r(5217);e.exports.FAILSAFE_SCHEMA=r(3183);e.exports.JSON_SCHEMA=r(9116);e.exports.CORE_SCHEMA=r(9043);e.exports.DEFAULT_SCHEMA=r(6672);e.exports.load=n.load;e.exports.loadAll=n.loadAll;e.exports.dump=i.dump;e.exports.YAMLException=r(876);e.exports.types={binary:r(1688),float:r(3250),map:r(723),null:r(2451),pairs:r(5671),set:r(3051),timestamp:r(8285),bool:r(8510),int:r(2682),merge:r(5831),omap:r(3602),seq:r(9130),str:r(802)};e.exports.safeLoad=renamed("safeLoad","load");e.exports.safeLoadAll=renamed("safeLoadAll","loadAll");e.exports.safeDump=renamed("safeDump","dump")},5929:e=>{"use strict";function isNothing(e){return typeof e==="undefined"||e===null}function isObject(e){return typeof e==="object"&&e!==null}function toArray(e){if(Array.isArray(e))return e;else if(isNothing(e))return[];return[e]}function extend(e,t){var r,n,i,s;if(t){s=Object.keys(t);for(r=0,n=s.length;r{"use strict";var n=r(5929);var i=r(876);var s=r(6672);var o=Object.prototype.toString;var a=Object.prototype.hasOwnProperty;var u=65279;var l=9;var c=10;var f=13;var d=32;var p=33;var h=34;var m=35;var v=37;var g=38;var y=39;var b=42;var S=44;var w=45;var _=58;var E=61;var k=62;var P=63;var C=64;var x=91;var O=93;var R=96;var I=123;var A=124;var T=125;var D={};D[0]="\\0";D[7]="\\a";D[8]="\\b";D[9]="\\t";D[10]="\\n";D[11]="\\v";D[12]="\\f";D[13]="\\r";D[27]="\\e";D[34]='\\"';D[92]="\\\\";D[133]="\\N";D[160]="\\_";D[8232]="\\L";D[8233]="\\P";var F=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];var L=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function compileStyleMap(e,t){var r,n,i,s,o,u,l;if(t===null)return{};r={};n=Object.keys(t);for(i=0,s=n.length;i=55296&&r<=56319&&t+1=56320&&n<=57343){return(r-55296)*1024+n-56320+65536}}return r}function needIndentIndicator(e){var t=/^\n* /;return t.test(e)}var B=1,M=2,$=3,U=4,H=5;function chooseScalarStyle(e,t,r,n,i,s,o,a){var u;var l=0;var f=null;var d=false;var p=false;var h=n!==-1;var m=-1;var v=isPlainSafeFirst(codePointAt(e,0))&&isPlainSafeLast(codePointAt(e,e.length-1));if(t||o){for(u=0;u=65536?u+=2:u++){l=codePointAt(e,u);if(!isPrintable(l)){return H}v=v&&isPlainSafe(l,f,a);f=l}}else{for(u=0;u=65536?u+=2:u++){l=codePointAt(e,u);if(l===c){d=true;if(h){p=p||u-m-1>n&&e[m+1]!==" ";m=u}}else if(!isPrintable(l)){return H}v=v&&isPlainSafe(l,f,a);f=l}p=p||h&&(u-m-1>n&&e[m+1]!==" ")}if(!d&&!p){if(v&&!o&&!i(e)){return B}return s===j?H:M}if(r>9&&needIndentIndicator(e)){return H}if(!o){return p?U:$}return s===j?H:M}function writeScalar(e,t,r,n,s){e.dump=function(){if(t.length===0){return e.quotingType===j?'""':"''"}if(!e.noCompatMode){if(F.indexOf(t)!==-1||L.test(t)){return e.quotingType===j?'"'+t+'"':"'"+t+"'"}}var o=e.indent*Math.max(1,r);var a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o);var u=n||e.flowLevel>-1&&r>=e.flowLevel;function testAmbiguity(t){return testImplicitResolving(e,t)}switch(chooseScalarStyle(t,u,e.indent,a,testAmbiguity,e.quotingType,e.forceQuotes&&!n,s)){case B:return t;case M:return"'"+t.replace(/'/g,"''")+"'";case $:return"|"+blockHeader(t,e.indent)+dropEndingNewline(indentString(t,o));case U:return">"+blockHeader(t,e.indent)+dropEndingNewline(indentString(foldString(t,a),o));case H:return'"'+escapeString(t,a)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function blockHeader(e,t){var r=needIndentIndicator(e)?String(t):"";var n=e[e.length-1]==="\n";var i=n&&(e[e.length-2]==="\n"||e==="\n");var s=i?"+":n?"":"-";return r+s+"\n"}function dropEndingNewline(e){return e[e.length-1]==="\n"?e.slice(0,-1):e}function foldString(e,t){var r=/(\n+)([^\n]*)/g;var n=function(){var n=e.indexOf("\n");n=n!==-1?n:e.length;r.lastIndex=n;return foldLine(e.slice(0,n),t)}();var i=e[0]==="\n"||e[0]===" ";var s;var o;while(o=r.exec(e)){var a=o[1],u=o[2];s=u[0]===" ";n+=a+(!i&&!s&&u!==""?"\n":"")+foldLine(u,t);i=s}return n}function foldLine(e,t){if(e===""||e[0]===" ")return e;var r=/ [^ ]/g;var n;var i=0,s,o=0,a=0;var u="";while(n=r.exec(e)){a=n.index;if(a-i>t){s=o>i?o:a;u+="\n"+e.slice(i,s);i=s+1}o=a}u+="\n";if(e.length-i>t&&o>i){u+=e.slice(i,o)+"\n"+e.slice(o+1)}else{u+=e.slice(i)}return u.slice(1)}function escapeString(e){var t="";var r=0;var n;for(var i=0;i=65536?i+=2:i++){r=codePointAt(e,i);n=D[r];if(!n&&isPrintable(r)){t+=e[i];if(r>=65536)t+=e[i+1]}else{t+=n||encodeHex(r)}}return t}function writeFlowSequence(e,t,r){var n="",i=e.tag,s,o,a;for(s=0,o=r.length;s1024)c+="? ";c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" ");if(!writeNode(e,t,l,false,false)){continue}c+=e.dump;n+=c}e.tag=i;e.dump="{"+n+"}"}function writeBlockMapping(e,t,r,n){var s="",o=e.tag,a=Object.keys(r),u,l,f,d,p,h;if(e.sortKeys===true){a.sort()}else if(typeof e.sortKeys==="function"){a.sort(e.sortKeys)}else if(e.sortKeys){throw new i("sortKeys must be a boolean or a function")}for(u=0,l=a.length;u1024;if(p){if(e.dump&&c===e.dump.charCodeAt(0)){h+="?"}else{h+="? "}}h+=e.dump;if(p){h+=generateNextLine(e,t)}if(!writeNode(e,t+1,d,true,p)){continue}if(e.dump&&c===e.dump.charCodeAt(0)){h+=":"}else{h+=": "}h+=e.dump;s+=h}e.tag=o;e.dump=s||"{}"}function detectType(e,t,r){var n,s,u,l,c,f;s=r?e.explicitTypes:e.implicitTypes;for(u=0,l=s.length;u tag resolver accepts not "'+f+'" style')}e.dump=n}return true}}return false}function writeNode(e,t,r,n,s,a,u){e.tag=null;e.dump=r;if(!detectType(e,r,false)){detectType(e,r,true)}var l=o.call(e.dump);var c=n;var f;if(n){n=e.flowLevel<0||e.flowLevel>t}var d=l==="[object Object]"||l==="[object Array]",p,h;if(d){p=e.duplicates.indexOf(r);h=p!==-1}if(e.tag!==null&&e.tag!=="?"||h||e.indent!==2&&t>0){s=false}if(h&&e.usedDuplicates[p]){e.dump="*ref_"+p}else{if(d&&h&&!e.usedDuplicates[p]){e.usedDuplicates[p]=true}if(l==="[object Object]"){if(n&&Object.keys(e.dump).length!==0){writeBlockMapping(e,t,e.dump,s);if(h){e.dump="&ref_"+p+e.dump}}else{writeFlowMapping(e,t,e.dump);if(h){e.dump="&ref_"+p+" "+e.dump}}}else if(l==="[object Array]"){if(n&&e.dump.length!==0){if(e.noArrayIndent&&!u&&t>0){writeBlockSequence(e,t-1,e.dump,s)}else{writeBlockSequence(e,t,e.dump,s)}if(h){e.dump="&ref_"+p+e.dump}}else{writeFlowSequence(e,t,e.dump);if(h){e.dump="&ref_"+p+" "+e.dump}}}else if(l==="[object String]"){if(e.tag!=="?"){writeScalar(e,e.dump,t,a,c)}}else if(l==="[object Undefined]"){return false}else{if(e.skipInvalid)return false;throw new i("unacceptable kind of an object to dump "+l)}if(e.tag!==null&&e.tag!=="?"){f=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21");if(e.tag[0]==="!"){f="!"+f}else if(f.slice(0,18)==="tag:yaml.org,2002:"){f="!!"+f.slice(18)}else{f="!<"+f+">"}e.dump=f+" "+e.dump}}return true}function getDuplicateReferences(e,t){var r=[],n=[],i,s;inspectNode(e,r,n);for(i=0,s=n.length;i{"use strict";function formatError(e,t){var r="",n=e.reason||"(unknown reason)";if(!e.mark)return n;if(e.mark.name){r+='in "'+e.mark.name+'" '}r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")";if(!t&&e.mark.snippet){r+="\n\n"+e.mark.snippet}return n+" "+r}function YAMLException(e,t){Error.call(this);this.name="YAMLException";this.reason=e;this.mark=t;this.message=formatError(this,false);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack||""}}YAMLException.prototype=Object.create(Error.prototype);YAMLException.prototype.constructor=YAMLException;YAMLException.prototype.toString=function toString(e){return this.name+": "+formatError(this,e)};e.exports=YAMLException},6344:(e,t,r)=>{"use strict";var n=r(5929);var i=r(876);var s=r(6589);var o=r(6672);var a=Object.prototype.hasOwnProperty;var u=1;var l=2;var c=3;var f=4;var d=1;var p=2;var h=3;var m=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var v=/[\x85\u2028\u2029]/;var g=/[,\[\]\{\}]/;var y=/^(?:!|!!|![a-z\-]+!)$/i;var b=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(e){return Object.prototype.toString.call(e)}function is_EOL(e){return e===10||e===13}function is_WHITE_SPACE(e){return e===9||e===32}function is_WS_OR_EOL(e){return e===9||e===32||e===10||e===13}function is_FLOW_INDICATOR(e){return e===44||e===91||e===93||e===123||e===125}function fromHexCode(e){var t;if(48<=e&&e<=57){return e-48}t=e|32;if(97<=t&&t<=102){return t-97+10}return-1}function escapedHexLen(e){if(e===120){return 2}if(e===117){return 4}if(e===85){return 8}return 0}function fromDecimalCode(e){if(48<=e&&e<=57){return e-48}return-1}function simpleEscapeSequence(e){return e===48?"\0":e===97?"":e===98?"\b":e===116?"\t":e===9?"\t":e===110?"\n":e===118?"\v":e===102?"\f":e===114?"\r":e===101?"":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function charFromCodepoint(e){if(e<=65535){return String.fromCharCode(e)}return String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var S=new Array(256);var w=new Array(256);for(var _=0;_<256;_++){S[_]=simpleEscapeSequence(_)?1:0;w[_]=simpleEscapeSequence(_)}function State(e,t){this.input=e;this.filename=t["filename"]||null;this.schema=t["schema"]||o;this.onWarning=t["onWarning"]||null;this.legacy=t["legacy"]||false;this.json=t["json"]||false;this.listener=t["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=e.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.firstTabInLine=-1;this.documents=[]}function generateError(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};r.snippet=s(r);return new i(t,r)}function throwError(e,t){throw generateError(e,t)}function throwWarning(e,t){if(e.onWarning){e.onWarning.call(null,generateError(e,t))}}var E={YAML:function handleYamlDirective(e,t,r){var n,i,s;if(e.version!==null){throwError(e,"duplication of %YAML directive")}if(r.length!==1){throwError(e,"YAML directive accepts exactly one argument")}n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);if(n===null){throwError(e,"ill-formed argument of the YAML directive")}i=parseInt(n[1],10);s=parseInt(n[2],10);if(i!==1){throwError(e,"unacceptable YAML version of the document")}e.version=r[0];e.checkLineBreaks=s<2;if(s!==1&&s!==2){throwWarning(e,"unsupported YAML version of the document")}},TAG:function handleTagDirective(e,t,r){var n,i;if(r.length!==2){throwError(e,"TAG directive accepts exactly two arguments")}n=r[0];i=r[1];if(!y.test(n)){throwError(e,"ill-formed tag handle (first argument) of the TAG directive")}if(a.call(e.tagMap,n)){throwError(e,'there is a previously declared suffix for "'+n+'" tag handle')}if(!b.test(i)){throwError(e,"ill-formed tag prefix (second argument) of the TAG directive")}try{i=decodeURIComponent(i)}catch(t){throwError(e,"tag prefix is malformed: "+i)}e.tagMap[n]=i}};function captureSegment(e,t,r,n){var i,s,o,a;if(t1){e.result+=n.repeat("\n",t-1)}}function readPlainScalar(e,t,r){var n,i,s,o,a,u,l,c,f=e.kind,d=e.result,p;p=e.input.charCodeAt(e.position);if(is_WS_OR_EOL(p)||is_FLOW_INDICATOR(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96){return false}if(p===63||p===45){i=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(i)||r&&is_FLOW_INDICATOR(i)){return false}}e.kind="scalar";e.result="";s=o=e.position;a=false;while(p!==0){if(p===58){i=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(i)||r&&is_FLOW_INDICATOR(i)){break}}else if(p===35){n=e.input.charCodeAt(e.position-1);if(is_WS_OR_EOL(n)){break}}else if(e.position===e.lineStart&&testDocumentSeparator(e)||r&&is_FLOW_INDICATOR(p)){break}else if(is_EOL(p)){u=e.line;l=e.lineStart;c=e.lineIndent;skipSeparationSpace(e,false,-1);if(e.lineIndent>=t){a=true;p=e.input.charCodeAt(e.position);continue}else{e.position=o;e.line=u;e.lineStart=l;e.lineIndent=c;break}}if(a){captureSegment(e,s,o,false);writeFoldedLines(e,e.line-u);s=o=e.position;a=false}if(!is_WHITE_SPACE(p)){o=e.position+1}p=e.input.charCodeAt(++e.position)}captureSegment(e,s,o,false);if(e.result){return true}e.kind=f;e.result=d;return false}function readSingleQuotedScalar(e,t){var r,n,i;r=e.input.charCodeAt(e.position);if(r!==39){return false}e.kind="scalar";e.result="";e.position++;n=i=e.position;while((r=e.input.charCodeAt(e.position))!==0){if(r===39){captureSegment(e,n,e.position,true);r=e.input.charCodeAt(++e.position);if(r===39){n=e.position;e.position++;i=e.position}else{return true}}else if(is_EOL(r)){captureSegment(e,n,i,true);writeFoldedLines(e,skipSeparationSpace(e,false,t));n=i=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a single quoted scalar")}else{e.position++;i=e.position}}throwError(e,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(e,t){var r,n,i,s,o,a;a=e.input.charCodeAt(e.position);if(a!==34){return false}e.kind="scalar";e.result="";e.position++;r=n=e.position;while((a=e.input.charCodeAt(e.position))!==0){if(a===34){captureSegment(e,r,e.position,true);e.position++;return true}else if(a===92){captureSegment(e,r,e.position,true);a=e.input.charCodeAt(++e.position);if(is_EOL(a)){skipSeparationSpace(e,false,t)}else if(a<256&&S[a]){e.result+=w[a];e.position++}else if((o=escapedHexLen(a))>0){i=o;s=0;for(;i>0;i--){a=e.input.charCodeAt(++e.position);if((o=fromHexCode(a))>=0){s=(s<<4)+o}else{throwError(e,"expected hexadecimal character")}}e.result+=charFromCodepoint(s);e.position++}else{throwError(e,"unknown escape sequence")}r=n=e.position}else if(is_EOL(a)){captureSegment(e,r,n,true);writeFoldedLines(e,skipSeparationSpace(e,false,t));r=n=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a double quoted scalar")}else{e.position++;n=e.position}}throwError(e,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(e,t){var r=true,n,i,s,o=e.tag,a,l=e.anchor,c,f,d,p,h,m=Object.create(null),v,g,y,b;b=e.input.charCodeAt(e.position);if(b===91){f=93;h=false;a=[]}else if(b===123){f=125;h=true;a={}}else{return false}if(e.anchor!==null){e.anchorMap[e.anchor]=a}b=e.input.charCodeAt(++e.position);while(b!==0){skipSeparationSpace(e,true,t);b=e.input.charCodeAt(e.position);if(b===f){e.position++;e.tag=o;e.anchor=l;e.kind=h?"mapping":"sequence";e.result=a;return true}else if(!r){throwError(e,"missed comma between flow collection entries")}else if(b===44){throwError(e,"expected the node content, but found ','")}g=v=y=null;d=p=false;if(b===63){c=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(c)){d=p=true;e.position++;skipSeparationSpace(e,true,t)}}n=e.line;i=e.lineStart;s=e.position;composeNode(e,t,u,false,true);g=e.tag;v=e.result;skipSeparationSpace(e,true,t);b=e.input.charCodeAt(e.position);if((p||e.line===n)&&b===58){d=true;b=e.input.charCodeAt(++e.position);skipSeparationSpace(e,true,t);composeNode(e,t,u,false,true);y=e.result}if(h){storeMappingPair(e,a,m,g,v,y,n,i,s)}else if(d){a.push(storeMappingPair(e,null,m,g,v,y,n,i,s))}else{a.push(v)}skipSeparationSpace(e,true,t);b=e.input.charCodeAt(e.position);if(b===44){r=true;b=e.input.charCodeAt(++e.position)}else{r=false}}throwError(e,"unexpected end of the stream within a flow collection")}function readBlockScalar(e,t){var r,i,s=d,o=false,a=false,u=t,l=0,c=false,f,m;m=e.input.charCodeAt(e.position);if(m===124){i=false}else if(m===62){i=true}else{return false}e.kind="scalar";e.result="";while(m!==0){m=e.input.charCodeAt(++e.position);if(m===43||m===45){if(d===s){s=m===43?h:p}else{throwError(e,"repeat of a chomping mode identifier")}}else if((f=fromDecimalCode(m))>=0){if(f===0){throwError(e,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!a){u=t+f-1;a=true}else{throwError(e,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(m)){do{m=e.input.charCodeAt(++e.position)}while(is_WHITE_SPACE(m));if(m===35){do{m=e.input.charCodeAt(++e.position)}while(!is_EOL(m)&&m!==0)}}while(m!==0){readLineBreak(e);e.lineIndent=0;m=e.input.charCodeAt(e.position);while((!a||e.lineIndentu){u=e.lineIndent}if(is_EOL(m)){l++;continue}if(e.lineIndentt)&&u!==0){throwError(e,"bad indentation of a sequence entry")}else if(e.lineIndentt){if(y){o=e.line;a=e.lineStart;u=e.position}if(composeNode(e,t,f,true,i)){if(y){v=e.result}else{g=e.result}}if(!y){storeMappingPair(e,p,h,m,v,g,o,a,u);m=v=g=null}skipSeparationSpace(e,true,-1);S=e.input.charCodeAt(e.position)}if((e.line===s||e.lineIndent>t)&&S!==0){throwError(e,"bad indentation of a mapping entry")}else if(e.lineIndentt){p=1}else if(e.lineIndent===t){p=0}else if(e.lineIndentt){p=1}else if(e.lineIndent===t){p=0}else if(e.lineIndent tag; it should be "scalar", not "'+e.kind+'"')}for(v=0,g=e.implicitTypes.length;v")}if(e.result!==null&&b.kind!==e.kind){throwError(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+b.kind+'", not "'+e.kind+'"')}if(!b.resolve(e.result,e.tag)){throwError(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}else{e.result=b.construct(e.result,e.tag);if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}if(e.listener!==null){e.listener("close",e)}return e.tag!==null||e.anchor!==null||m}function readDocument(e){var t=e.position,r,n,i,s=false,o;e.version=null;e.checkLineBreaks=e.legacy;e.tagMap=Object.create(null);e.anchorMap=Object.create(null);while((o=e.input.charCodeAt(e.position))!==0){skipSeparationSpace(e,true,-1);o=e.input.charCodeAt(e.position);if(e.lineIndent>0||o!==37){break}s=true;o=e.input.charCodeAt(++e.position);r=e.position;while(o!==0&&!is_WS_OR_EOL(o)){o=e.input.charCodeAt(++e.position)}n=e.input.slice(r,e.position);i=[];if(n.length<1){throwError(e,"directive name must not be less than one character in length")}while(o!==0){while(is_WHITE_SPACE(o)){o=e.input.charCodeAt(++e.position)}if(o===35){do{o=e.input.charCodeAt(++e.position)}while(o!==0&&!is_EOL(o));break}if(is_EOL(o))break;r=e.position;while(o!==0&&!is_WS_OR_EOL(o)){o=e.input.charCodeAt(++e.position)}i.push(e.input.slice(r,e.position))}if(o!==0)readLineBreak(e);if(a.call(E,n)){E[n](e,n,i)}else{throwWarning(e,'unknown document directive "'+n+'"')}}skipSeparationSpace(e,true,-1);if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45){e.position+=3;skipSeparationSpace(e,true,-1)}else if(s){throwError(e,"directives end mark is expected")}composeNode(e,e.lineIndent-1,f,false,true);skipSeparationSpace(e,true,-1);if(e.checkLineBreaks&&v.test(e.input.slice(t,e.position))){throwWarning(e,"non-ASCII line breaks are interpreted as content")}e.documents.push(e.result);if(e.position===e.lineStart&&testDocumentSeparator(e)){if(e.input.charCodeAt(e.position)===46){e.position+=3;skipSeparationSpace(e,true,-1)}return}if(e.position{"use strict";var n=r(876);var i=r(4098);function compileList(e,t){var r=[];e[t].forEach((function(e){var t=r.length;r.forEach((function(r,n){if(r.tag===e.tag&&r.kind===e.kind&&r.multi===e.multi){t=n}}));r[t]=e}));return r}function compileMap(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function collectType(t){if(t.multi){e.multi[t.kind].push(t);e.multi["fallback"].push(t)}else{e[t.kind][t.tag]=e["fallback"][t.tag]=t}}for(t=0,r=arguments.length;t{"use strict";e.exports=r(9116)},6672:(e,t,r)=>{"use strict";e.exports=r(9043).extend({implicit:[r(8285),r(5831)],explicit:[r(1688),r(3602),r(5671),r(3051)]})},3183:(e,t,r)=>{"use strict";var n=r(5217);e.exports=new n({explicit:[r(802),r(9130),r(723)]})},9116:(e,t,r)=>{"use strict";e.exports=r(3183).extend({implicit:[r(2451),r(8510),r(2682),r(3250)]})},6589:(e,t,r)=>{"use strict";var n=r(5929);function getLine(e,t,r,n,i){var s="";var o="";var a=Math.floor(i/2)-1;if(n-t>a){s=" ... ";t=n-a+s.length}if(r-n>a){o=" ...";r=n+a-o.length}return{str:s+e.slice(t,r).replace(/\t/g,"→")+o,pos:n-t+s.length}}function padStart(e,t){return n.repeat(" ",t-e.length)+e}function makeSnippet(e,t){t=Object.create(t||null);if(!e.buffer)return null;if(!t.maxLength)t.maxLength=79;if(typeof t.indent!=="number")t.indent=1;if(typeof t.linesBefore!=="number")t.linesBefore=3;if(typeof t.linesAfter!=="number")t.linesAfter=2;var r=/\r?\n|\r|\0/g;var i=[0];var s=[];var o;var a=-1;while(o=r.exec(e.buffer)){s.push(o.index);i.push(o.index+o[0].length);if(e.position<=o.index&&a<0){a=i.length-2}}if(a<0)a=i.length-1;var u="",l,c;var f=Math.min(e.line+t.linesAfter,s.length).toString().length;var d=t.maxLength-(t.indent+f+3);for(l=1;l<=t.linesBefore;l++){if(a-l<0)break;c=getLine(e.buffer,i[a-l],s[a-l],e.position-(i[a]-i[a-l]),d);u=n.repeat(" ",t.indent)+padStart((e.line-l+1).toString(),f)+" | "+c.str+"\n"+u}c=getLine(e.buffer,i[a],s[a],e.position,d);u+=n.repeat(" ",t.indent)+padStart((e.line+1).toString(),f)+" | "+c.str+"\n";u+=n.repeat("-",t.indent+f+3+c.pos)+"^"+"\n";for(l=1;l<=t.linesAfter;l++){if(a+l>=s.length)break;c=getLine(e.buffer,i[a+l],s[a+l],e.position-(i[a]-i[a+l]),d);u+=n.repeat(" ",t.indent)+padStart((e.line+l+1).toString(),f)+" | "+c.str+"\n"}return u.replace(/\n$/,"")}e.exports=makeSnippet},4098:(e,t,r)=>{"use strict";var n=r(876);var i=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"];var s=["scalar","sequence","mapping"];function compileStyleAliases(e){var t={};if(e!==null){Object.keys(e).forEach((function(r){e[r].forEach((function(e){t[String(e)]=r}))}))}return t}function Type(e,t){t=t||{};Object.keys(t).forEach((function(t){if(i.indexOf(t)===-1){throw new n('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}}));this.options=t;this.tag=e;this.kind=t["kind"]||null;this.resolve=t["resolve"]||function(){return true};this.construct=t["construct"]||function(e){return e};this.instanceOf=t["instanceOf"]||null;this.predicate=t["predicate"]||null;this.represent=t["represent"]||null;this.representName=t["representName"]||null;this.defaultStyle=t["defaultStyle"]||null;this.multi=t["multi"]||false;this.styleAliases=compileStyleAliases(t["styleAliases"]||null);if(s.indexOf(this.kind)===-1){throw new n('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}}e.exports=Type},1688:(e,t,r)=>{"use strict";var n=r(4098);var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function resolveYamlBinary(e){if(e===null)return false;var t,r,n=0,s=e.length,o=i;for(r=0;r64)continue;if(t<0)return false;n+=6}return n%8===0}function constructYamlBinary(e){var t,r,n=e.replace(/[\r\n=]/g,""),s=n.length,o=i,a=0,u=[];for(t=0;t>16&255);u.push(a>>8&255);u.push(a&255)}a=a<<6|o.indexOf(n.charAt(t))}r=s%4*6;if(r===0){u.push(a>>16&255);u.push(a>>8&255);u.push(a&255)}else if(r===18){u.push(a>>10&255);u.push(a>>2&255)}else if(r===12){u.push(a>>4&255)}return new Uint8Array(u)}function representYamlBinary(e){var t="",r=0,n,s,o=e.length,a=i;for(n=0;n>18&63];t+=a[r>>12&63];t+=a[r>>6&63];t+=a[r&63]}r=(r<<8)+e[n]}s=o%3;if(s===0){t+=a[r>>18&63];t+=a[r>>12&63];t+=a[r>>6&63];t+=a[r&63]}else if(s===2){t+=a[r>>10&63];t+=a[r>>4&63];t+=a[r<<2&63];t+=a[64]}else if(s===1){t+=a[r>>2&63];t+=a[r<<4&63];t+=a[64];t+=a[64]}return t}function isBinary(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}e.exports=new n("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},8510:(e,t,r)=>{"use strict";var n=r(4098);function resolveYamlBoolean(e){if(e===null)return false;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function constructYamlBoolean(e){return e==="true"||e==="True"||e==="TRUE"}function isBoolean(e){return Object.prototype.toString.call(e)==="[object Boolean]"}e.exports=new n("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},3250:(e,t,r)=>{"use strict";var n=r(5929);var i=r(4098);var s=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(e){if(e===null)return false;if(!s.test(e)||e[e.length-1]==="_"){return false}return true}function constructYamlFloat(e){var t,r;t=e.replace(/_/g,"").toLowerCase();r=t[0]==="-"?-1:1;if("+-".indexOf(t[0])>=0){t=t.slice(1)}if(t===".inf"){return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(t===".nan"){return NaN}return r*parseFloat(t,10)}var o=/^[-+]?[0-9]+e/;function representYamlFloat(e,t){var r;if(isNaN(e)){switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===e){switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===e){switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(n.isNegativeZero(e)){return"-0.0"}r=e.toString(10);return o.test(r)?r.replace("e",".e"):r}function isFloat(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||n.isNegativeZero(e))}e.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},2682:(e,t,r)=>{"use strict";var n=r(5929);var i=r(4098);function isHexCode(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function isOctCode(e){return 48<=e&&e<=55}function isDecCode(e){return 48<=e&&e<=57}function resolveYamlInteger(e){if(e===null)return false;var t=e.length,r=0,n=false,i;if(!t)return false;i=e[r];if(i==="-"||i==="+"){i=e[++r]}if(i==="0"){if(r+1===t)return true;i=e[++r];if(i==="b"){r++;for(;r=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},723:(e,t,r)=>{"use strict";var n=r(4098);e.exports=new n("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})},5831:(e,t,r)=>{"use strict";var n=r(4098);function resolveYamlMerge(e){return e==="<<"||e===null}e.exports=new n("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},2451:(e,t,r)=>{"use strict";var n=r(4098);function resolveYamlNull(e){if(e===null)return true;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function constructYamlNull(){return null}function isNull(e){return e===null}e.exports=new n("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})},3602:(e,t,r)=>{"use strict";var n=r(4098);var i=Object.prototype.hasOwnProperty;var s=Object.prototype.toString;function resolveYamlOmap(e){if(e===null)return true;var t=[],r,n,o,a,u,l=e;for(r=0,n=l.length;r{"use strict";var n=r(4098);var i=Object.prototype.toString;function resolveYamlPairs(e){if(e===null)return true;var t,r,n,s,o,a=e;o=new Array(a.length);for(t=0,r=a.length;t{"use strict";var n=r(4098);e.exports=new n("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})},3051:(e,t,r)=>{"use strict";var n=r(4098);var i=Object.prototype.hasOwnProperty;function resolveYamlSet(e){if(e===null)return true;var t,r=e;for(t in r){if(i.call(r,t)){if(r[t]!==null)return false}}return true}function constructYamlSet(e){return e!==null?e:{}}e.exports=new n("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},802:(e,t,r)=>{"use strict";var n=r(4098);e.exports=new n("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})},8285:(e,t,r)=>{"use strict";var n=r(4098);var i=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var s=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(e){if(e===null)return false;if(i.exec(e)!==null)return true;if(s.exec(e)!==null)return true;return false}function constructYamlTimestamp(e){var t,r,n,o,a,u,l,c=0,f=null,d,p,h;t=i.exec(e);if(t===null)t=s.exec(e);if(t===null)throw new Error("Date resolve error");r=+t[1];n=+t[2]-1;o=+t[3];if(!t[4]){return new Date(Date.UTC(r,n,o))}a=+t[4];u=+t[5];l=+t[6];if(t[7]){c=t[7].slice(0,3);while(c.length<3){c+="0"}c=+c}if(t[9]){d=+t[10];p=+(t[11]||0);f=(d*60+p)*6e4;if(t[9]==="-")f=-f}h=new Date(Date.UTC(r,n,o,a,u,l,c));if(f)h.setTime(h.getTime()-f);return h}function representYamlTimestamp(e){return e.toISOString()}e.exports=new n("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp})},8154:e=>{"use strict";var t=e.exports=function(e,t,r){if(typeof t=="function"){r=t;t={}}r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){};var i=r.post||function(){};_traverse(t,n,i,e,"",e)};t.keywords={additionalItems:true,items:true,contains:true,additionalProperties:true,propertyNames:true,not:true};t.arrayKeywords={items:true,allOf:true,anyOf:true,oneOf:true};t.propsKeywords={definitions:true,properties:true,patternProperties:true,dependencies:true};t.skipKeywords={default:true,enum:true,const:true,required:true,maximum:true,minimum:true,exclusiveMaximum:true,exclusiveMinimum:true,multipleOf:true,maxLength:true,minLength:true,pattern:true,format:true,maxItems:true,minItems:true,uniqueItems:true,maxProperties:true,minProperties:true};function _traverse(e,r,n,i,s,o,a,u,l,c){if(i&&typeof i=="object"&&!Array.isArray(i)){r(i,s,o,a,u,l,c);for(var f in i){var d=i[f];if(Array.isArray(d)){if(f in t.arrayKeywords){for(var p=0;p{t=e.exports=stringify;t.getSerialize=serializer;function stringify(e,t,r,n){return JSON.stringify(e,serializer(t,n),r)}function serializer(e,t){var r=[],n=[];if(t==null)t=function(e,t){if(r[0]===t)return"[Circular ~]";return"[Circular ~."+n.slice(0,r.indexOf(t)).join(".")+"]"};return function(i,s){if(r.length>0){var o=r.indexOf(this);~o?r.splice(o+1):r.push(this);~o?n.splice(o,Infinity,i):n.push(i);if(~r.indexOf(s))s=t.call(this,i,s)}else r.push(s);return e==null?s:e.call(this,i,s)}}},5533:(e,t,r)=>{let n;try{n=r(7765)}catch(e){n=r(7147)}const i=r(3706);const{stringify:s,stripBom:o}=r(8171);async function _readFile(e,t={}){if(typeof t==="string"){t={encoding:t}}const r=t.fs||n;const s="throws"in t?t.throws:true;let a=await i.fromCallback(r.readFile)(e,t);a=o(a);let u;try{u=JSON.parse(a,t?t.reviver:null)}catch(t){if(s){t.message=`${e}: ${t.message}`;throw t}else{return null}}return u}const a=i.fromPromise(_readFile);function readFileSync(e,t={}){if(typeof t==="string"){t={encoding:t}}const r=t.fs||n;const i="throws"in t?t.throws:true;try{let n=r.readFileSync(e,t);n=o(n);return JSON.parse(n,t.reviver)}catch(t){if(i){t.message=`${e}: ${t.message}`;throw t}else{return null}}}async function _writeFile(e,t,r={}){const o=r.fs||n;const a=s(t,r);await i.fromCallback(o.writeFile)(e,a,r)}const u=i.fromPromise(_writeFile);function writeFileSync(e,t,r={}){const i=r.fs||n;const o=s(t,r);return i.writeFileSync(e,o,r)}const l={readFile:a,readFileSync:readFileSync,writeFile:u,writeFileSync:writeFileSync};e.exports=l},8171:e=>{function stringify(e,{EOL:t="\n",finalEOL:r=true,replacer:n=null,spaces:i}={}){const s=r?t:"";const o=JSON.stringify(e,n,i);return o.replace(/\n/g,t)+s}function stripBom(e){if(Buffer.isBuffer(e))e=e.toString("utf8");return e.replace(/^\uFEFF/,"")}e.exports={stringify:stringify,stripBom:stripBom}},1296:(e,t,r)=>{"use strict";const n=r(6368);const i=Symbol("max");const s=Symbol("length");const o=Symbol("lengthCalculator");const a=Symbol("allowStale");const u=Symbol("maxAge");const l=Symbol("dispose");const c=Symbol("noDisposeOnSet");const f=Symbol("lruList");const d=Symbol("cache");const p=Symbol("updateAgeOnGet");const naiveLength=()=>1;class LRUCache{constructor(e){if(typeof e==="number")e={max:e};if(!e)e={};if(e.max&&(typeof e.max!=="number"||e.max<0))throw new TypeError("max must be a non-negative number");const t=this[i]=e.max||Infinity;const r=e.length||naiveLength;this[o]=typeof r!=="function"?naiveLength:r;this[a]=e.stale||false;if(e.maxAge&&typeof e.maxAge!=="number")throw new TypeError("maxAge must be a number");this[u]=e.maxAge||0;this[l]=e.dispose;this[c]=e.noDisposeOnSet||false;this[p]=e.updateAgeOnGet||false;this.reset()}set max(e){if(typeof e!=="number"||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||Infinity;trim(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if(typeof e!=="number")throw new TypeError("maxAge must be a non-negative number");this[u]=e;trim(this)}get maxAge(){return this[u]}set lengthCalculator(e){if(typeof e!=="function")e=naiveLength;if(e!==this[o]){this[o]=e;this[s]=0;this[f].forEach((e=>{e.length=this[o](e.value,e.key);this[s]+=e.length}))}trim(this)}get lengthCalculator(){return this[o]}get length(){return this[s]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let r=this[f].tail;r!==null;){const n=r.prev;forEachStep(this,e,r,t);r=n}}forEach(e,t){t=t||this;for(let r=this[f].head;r!==null;){const n=r.next;forEachStep(this,e,r,t);r=n}}keys(){return this[f].toArray().map((e=>e.key))}values(){return this[f].toArray().map((e=>e.value))}reset(){if(this[l]&&this[f]&&this[f].length){this[f].forEach((e=>this[l](e.key,e.value)))}this[d]=new Map;this[f]=new n;this[s]=0}dump(){return this[f].map((e=>isStale(this,e)?false:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[f]}set(e,t,r){r=r||this[u];if(r&&typeof r!=="number")throw new TypeError("maxAge must be a number");const n=r?Date.now():0;const a=this[o](t,e);if(this[d].has(e)){if(a>this[i]){del(this,this[d].get(e));return false}const o=this[d].get(e);const u=o.value;if(this[l]){if(!this[c])this[l](e,u.value)}u.now=n;u.maxAge=r;u.value=t;this[s]+=a-u.length;u.length=a;this.get(e);trim(this);return true}const p=new Entry(e,t,a,n,r);if(p.length>this[i]){if(this[l])this[l](e,t);return false}this[s]+=p.length;this[f].unshift(p);this[d].set(e,this[f].head);trim(this);return true}has(e){if(!this[d].has(e))return false;const t=this[d].get(e).value;return!isStale(this,t)}get(e){return get(this,e,true)}peek(e){return get(this,e,false)}pop(){const e=this[f].tail;if(!e)return null;del(this,e);return e.value}del(e){del(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r];const i=n.e||0;if(i===0)this.set(n.k,n.v);else{const e=i-t;if(e>0){this.set(n.k,n.v,e)}}}}prune(){this[d].forEach(((e,t)=>get(this,t,false)))}}const get=(e,t,r)=>{const n=e[d].get(t);if(n){const t=n.value;if(isStale(e,t)){del(e,n);if(!e[a])return undefined}else{if(r){if(e[p])n.value.now=Date.now();e[f].unshiftNode(n)}}return t.value}};const isStale=(e,t)=>{if(!t||!t.maxAge&&!e[u])return false;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[u]&&r>e[u]};const trim=e=>{if(e[s]>e[i]){for(let t=e[f].tail;e[s]>e[i]&&t!==null;){const r=t.prev;del(e,t);t=r}}};const del=(e,t)=>{if(t){const r=t.value;if(e[l])e[l](r.key,r.value);e[s]-=r.length;e[d].delete(r.key);e[f].removeNode(t)}};class Entry{constructor(e,t,r,n,i){this.key=e;this.value=t;this.length=r;this.now=n;this.maxAge=i||0}}const forEachStep=(e,t,r,n)=>{let i=r.value;if(isStale(e,i)){del(e,r);if(!e[a])i=undefined}if(i)t.call(n,i.value,i.key,e)};e.exports=LRUCache},401:e=>{var t=1e3;var r=t*60;var n=r*60;var i=n*24;var s=i*7;var o=i*365.25;e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0){return parse(e)}else if(r==="number"&&isFinite(e)){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(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 u=parseFloat(a[1]);var l=(a[2]||"ms").toLowerCase();switch(l){case"years":case"year":case"yrs":case"yr":case"y":return u*o;case"weeks":case"week":case"w":return u*s;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*n;case"minutes":case"minute":case"mins":case"min":case"m":return u*r;case"seconds":case"second":case"secs":case"sec":case"s":return u*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return undefined}}function fmtShort(e){var s=Math.abs(e);if(s>=i){return Math.round(e/i)+"d"}if(s>=n){return Math.round(e/n)+"h"}if(s>=r){return Math.round(e/r)+"m"}if(s>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var s=Math.abs(e);if(s>=i){return plural(e,s,i,"day")}if(s>=n){return plural(e,s,n,"hour")}if(s>=r){return plural(e,s,r,"minute")}if(s>=t){return plural(e,s,t,"second")}return e+" ms"}function plural(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}},8527:e=>{var t=1e3;var r=t*60;var n=r*60;var i=n*24;var s=i*7;var o=i*365.25;e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0){return parse(e)}else if(r==="number"&&isFinite(e)){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(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 u=parseFloat(a[1]);var l=(a[2]||"ms").toLowerCase();switch(l){case"years":case"year":case"yrs":case"yr":case"y":return u*o;case"weeks":case"week":case"w":return u*s;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*n;case"minutes":case"minute":case"mins":case"min":case"m":return u*r;case"seconds":case"second":case"secs":case"sec":case"s":return u*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return undefined}}function fmtShort(e){var s=Math.abs(e);if(s>=i){return Math.round(e/i)+"d"}if(s>=n){return Math.round(e/n)+"h"}if(s>=r){return Math.round(e/r)+"m"}if(s>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var s=Math.abs(e);if(s>=i){return plural(e,s,i,"day")}if(s>=n){return plural(e,s,n,"hour")}if(s>=r){return plural(e,s,r,"minute")}if(s>=t){return plural(e,s,t,"second")}return e+" ms"}function plural(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}},9847:(e,t,r)=>{const n=r(1596);const i=r(5021);const{EOL:s}=r(2037);const o=r(5056);e.exports.stringify=e=>n.obj(e,((e,t,r)=>{r(null,o(e)+s)}));e.exports.parse=e=>{e=e||{};e.strict=e.strict!==false;function parseRow(t){try{if(t)return JSON.parse(t)}catch(r){if(e.strict){this.emit("error",new Error("Could not parse row "+t.slice(0,50)+"..."))}}}return i(parseRow,e)}},9524:e=>{"use strict";e.exports=function(e){if(typeof e!=="string"){throw new Error("expected a string")}return e.split("\n").map(user).filter(Boolean)};function user(e,t){if(!e||!e.length||e.charAt(0)==="#"){return null}var r=e.split(":");return{username:r[0],password:r[1],uid:r[2],gid:r[3],gecos:r[4],homedir:r[5],shell:r[6]}}},614:e=>{"use strict";const t={};function createErrorType(e,r,n){if(!n){n=Error}function getMessage(e,t,n){if(typeof r==="string"){return r}else{return r(e,t,n)}}class NodeError extends n{constructor(e,t,r){super(getMessage(e,t,r))}}NodeError.prototype.name=n.name;NodeError.prototype.code=e;t[e]=NodeError}function oneOf(e,t){if(Array.isArray(e)){const r=e.length;e=e.map((e=>String(e)));if(r>2){return`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]}else if(r===2){return`one of ${t} ${e[0]} or ${e[1]}`}else{return`of ${t} ${e[0]}`}}else{return`of ${t} ${String(e)}`}}function startsWith(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function endsWith(e,t,r){if(r===undefined||r>e.length){r=e.length}return e.substring(r-t.length,r)===t}function includes(e,t,r){if(typeof r!=="number"){r=0}if(r+t.length>e.length){return false}else{return e.indexOf(t,r)!==-1}}createErrorType("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError);createErrorType("ERR_INVALID_ARG_TYPE",(function(e,t,r){let n;if(typeof t==="string"&&startsWith(t,"not ")){n="must not be";t=t.replace(/^not /,"")}else{n="must be"}let i;if(endsWith(e," argument")){i=`The ${e} ${n} ${oneOf(t,"type")}`}else{const r=includes(e,".")?"property":"argument";i=`The "${e}" ${r} ${n} ${oneOf(t,"type")}`}i+=`. Received type ${typeof r}`;return i}),TypeError);createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");createErrorType("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"}));createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close");createErrorType("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"}));createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times");createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end");createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);createErrorType("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError);createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");e.exports.q=t},3444:(e,t,r)=>{"use strict";var n=Object.keys||function(e){var t=[];for(var r in e){t.push(r)}return t};e.exports=Duplex;var i=r(7253);var s=r(3399);r(5651)(Duplex,i);{var o=n(s.prototype);for(var a=0;a{"use strict";e.exports=PassThrough;var n=r(7291);r(5651)(PassThrough,n);function PassThrough(e){if(!(this instanceof PassThrough))return new PassThrough(e);n.call(this,e)}PassThrough.prototype._transform=function(e,t,r){r(null,e)}},7253:(e,t,r)=>{"use strict";e.exports=Readable;var n;Readable.ReadableState=ReadableState;var i=r(2361).EventEmitter;var s=function EElistenerCount(e,t){return e.listeners(t).length};var o=r(7121);var a=r(4300).Buffer;var u=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return a.from(e)}function _isUint8Array(e){return a.isBuffer(e)||e instanceof u}var l=r(3837);var c;if(l&&l.debuglog){c=l.debuglog("stream")}else{c=function debug(){}}var f=r(7275);var d=r(1317);var p=r(6125),h=p.getHighWaterMark;var m=r(614).q,v=m.ERR_INVALID_ARG_TYPE,g=m.ERR_STREAM_PUSH_AFTER_EOF,y=m.ERR_METHOD_NOT_IMPLEMENTED,b=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;var S;var w;var _;r(5651)(Readable,o);var E=d.errorOrDestroy;var k=["error","close","destroy","pause","resume"];function prependListener(e,t,r){if(typeof e.prependListener==="function")return e.prependListener(t,r);if(!e._events||!e._events[t])e.on(t,r);else if(Array.isArray(e._events[t]))e._events[t].unshift(r);else e._events[t]=[r,e._events[t]]}function ReadableState(e,t,i){n=n||r(3444);e=e||{};if(typeof i!=="boolean")i=t instanceof n;this.objectMode=!!e.objectMode;if(i)this.objectMode=this.objectMode||!!e.readableObjectMode;this.highWaterMark=h(this,e,"readableHighWaterMark",i);this.buffer=new f;this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.resumeScheduled=false;this.paused=true;this.emitClose=e.emitClose!==false;this.autoDestroy=!!e.autoDestroy;this.destroyed=false;this.defaultEncoding=e.defaultEncoding||"utf8";this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(e.encoding){if(!S)S=r(9488).s;this.decoder=new S(e.encoding);this.encoding=e.encoding}}function Readable(e){n=n||r(3444);if(!(this instanceof Readable))return new Readable(e);var t=this instanceof n;this._readableState=new ReadableState(e,this,t);this.readable=true;if(e){if(typeof e.read==="function")this._read=e.read;if(typeof e.destroy==="function")this._destroy=e.destroy}o.call(this)}Object.defineProperty(Readable.prototype,"destroyed",{enumerable:false,get:function get(){if(this._readableState===undefined){return false}return this._readableState.destroyed},set:function set(e){if(!this._readableState){return}this._readableState.destroyed=e}});Readable.prototype.destroy=d.destroy;Readable.prototype._undestroy=d.undestroy;Readable.prototype._destroy=function(e,t){t(e)};Readable.prototype.push=function(e,t){var r=this._readableState;var n;if(!r.objectMode){if(typeof e==="string"){t=t||r.defaultEncoding;if(t!==r.encoding){e=a.from(e,t);t=""}n=true}}else{n=true}return readableAddChunk(this,e,t,false,n)};Readable.prototype.unshift=function(e){return readableAddChunk(this,e,null,true,false)};function readableAddChunk(e,t,r,n,i){c("readableAddChunk",t);var s=e._readableState;if(t===null){s.reading=false;onEofChunk(e,s)}else{var o;if(!i)o=chunkInvalid(s,t);if(o){E(e,o)}else if(s.objectMode||t&&t.length>0){if(typeof t!=="string"&&!s.objectMode&&Object.getPrototypeOf(t)!==a.prototype){t=_uint8ArrayToBuffer(t)}if(n){if(s.endEmitted)E(e,new b);else addChunk(e,s,t,true)}else if(s.ended){E(e,new g)}else if(s.destroyed){return false}else{s.reading=false;if(s.decoder&&!r){t=s.decoder.write(t);if(s.objectMode||t.length!==0)addChunk(e,s,t,false);else maybeReadMore(e,s)}else{addChunk(e,s,t,false)}}}else if(!n){s.reading=false;maybeReadMore(e,s)}}return!s.ended&&(s.length=P){e=P}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function howMuchToRead(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e){if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length}if(e>t.highWaterMark)t.highWaterMark=computeNewHighWaterMark(e);if(e<=t.length)return e;if(!t.ended){t.needReadable=true;return 0}return t.length}Readable.prototype.read=function(e){c("read",e);e=parseInt(e,10);var t=this._readableState;var r=e;if(e!==0)t.emittedReadable=false;if(e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended)){c("read: emitReadable",t.length,t.ended);if(t.length===0&&t.ended)endReadable(this);else emitReadable(this);return null}e=howMuchToRead(e,t);if(e===0&&t.ended){if(t.length===0)endReadable(this);return null}var n=t.needReadable;c("need readable",n);if(t.length===0||t.length-e0)i=fromList(e,t);else i=null;if(i===null){t.needReadable=t.length<=t.highWaterMark;e=0}else{t.length-=e;t.awaitDrain=0}if(t.length===0){if(!t.ended)t.needReadable=true;if(r!==e&&t.ended)endReadable(this)}if(i!==null)this.emit("data",i);return i};function onEofChunk(e,t){c("onEofChunk");if(t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length){t.buffer.push(r);t.length+=t.objectMode?1:r.length}}t.ended=true;if(t.sync){emitReadable(e)}else{t.needReadable=false;if(!t.emittedReadable){t.emittedReadable=true;emitReadable_(e)}}}function emitReadable(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable);t.needReadable=false;if(!t.emittedReadable){c("emitReadable",t.flowing);t.emittedReadable=true;process.nextTick(emitReadable_,e)}}function emitReadable_(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended);if(!t.destroyed&&(t.length||t.ended)){e.emit("readable");t.emittedReadable=false}t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark;flow(e)}function maybeReadMore(e,t){if(!t.readingMore){t.readingMore=true;process.nextTick(maybeReadMore_,e,t)}}function maybeReadMore_(e,t){while(!t.reading&&!t.ended&&(t.length1&&indexOf(n.pipes,e)!==-1)&&!u){c("false write response, pause",n.awaitDrain);n.awaitDrain++}r.pause()}}function onerror(t){c("onerror",t);unpipe();e.removeListener("error",onerror);if(s(e,"error")===0)E(e,t)}prependListener(e,"error",onerror);function onclose(){e.removeListener("finish",onfinish);unpipe()}e.once("close",onclose);function onfinish(){c("onfinish");e.removeListener("close",onclose);unpipe()}e.once("finish",onfinish);function unpipe(){c("unpipe");r.unpipe(e)}e.emit("pipe",r);if(!n.flowing){c("pipe resume");r.resume()}return e};function pipeOnDrain(e){return function pipeOnDrainFunctionResult(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain);if(t.awaitDrain)t.awaitDrain--;if(t.awaitDrain===0&&s(e,"data")){t.flowing=true;flow(e)}}}Readable.prototype.unpipe=function(e){var t=this._readableState;var r={hasUnpiped:false};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;t.pipes=null;t.pipesCount=0;t.flowing=false;if(e)e.emit("unpipe",this,r);return this}if(!e){var n=t.pipes;var i=t.pipesCount;t.pipes=null;t.pipesCount=0;t.flowing=false;for(var s=0;s0;if(n.flowing!==false)this.resume()}else if(e==="readable"){if(!n.endEmitted&&!n.readableListening){n.readableListening=n.needReadable=true;n.flowing=false;n.emittedReadable=false;c("on readable",n.length,n.reading);if(n.length){emitReadable(this)}else if(!n.reading){process.nextTick(nReadingNextTick,this)}}}return r};Readable.prototype.addListener=Readable.prototype.on;Readable.prototype.removeListener=function(e,t){var r=o.prototype.removeListener.call(this,e,t);if(e==="readable"){process.nextTick(updateReadableListening,this)}return r};Readable.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);if(e==="readable"||e===undefined){process.nextTick(updateReadableListening,this)}return t};function updateReadableListening(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0;if(t.resumeScheduled&&!t.paused){t.flowing=true}else if(e.listenerCount("data")>0){e.resume()}}function nReadingNextTick(e){c("readable nexttick read 0");e.read(0)}Readable.prototype.resume=function(){var e=this._readableState;if(!e.flowing){c("resume");e.flowing=!e.readableListening;resume(this,e)}e.paused=false;return this};function resume(e,t){if(!t.resumeScheduled){t.resumeScheduled=true;process.nextTick(resume_,e,t)}}function resume_(e,t){c("resume",t.reading);if(!t.reading){e.read(0)}t.resumeScheduled=false;e.emit("resume");flow(e);if(t.flowing&&!t.reading)e.read(0)}Readable.prototype.pause=function(){c("call pause flowing=%j",this._readableState.flowing);if(this._readableState.flowing!==false){c("pause");this._readableState.flowing=false;this.emit("pause")}this._readableState.paused=true;return this};function flow(e){var t=e._readableState;c("flow",t.flowing);while(t.flowing&&e.read()!==null){}}Readable.prototype.wrap=function(e){var t=this;var r=this._readableState;var n=false;e.on("end",(function(){c("wrapped end");if(r.decoder&&!r.ended){var e=r.decoder.end();if(e&&e.length)t.push(e)}t.push(null)}));e.on("data",(function(i){c("wrapped data");if(r.decoder)i=r.decoder.write(i);if(r.objectMode&&(i===null||i===undefined))return;else if(!r.objectMode&&(!i||!i.length))return;var s=t.push(i);if(!s){n=true;e.pause()}}));for(var i in e){if(this[i]===undefined&&typeof e[i]==="function"){this[i]=function methodWrap(t){return function methodWrapReturnFunction(){return e[t].apply(e,arguments)}}(i)}}for(var s=0;s=t.length){if(t.decoder)r=t.buffer.join("");else if(t.buffer.length===1)r=t.buffer.first();else r=t.buffer.concat(t.length);t.buffer.clear()}else{r=t.buffer.consume(e,t.decoder)}return r}function endReadable(e){var t=e._readableState;c("endReadable",t.endEmitted);if(!t.endEmitted){t.ended=true;process.nextTick(endReadableNT,t,e)}}function endReadableNT(e,t){c("endReadableNT",e.endEmitted,e.length);if(!e.endEmitted&&e.length===0){e.endEmitted=true;t.readable=false;t.emit("end");if(e.autoDestroy){var r=t._writableState;if(!r||r.autoDestroy&&r.finished){t.destroy()}}}}if(typeof Symbol==="function"){Readable.from=function(e,t){if(_===undefined){_=r(9144)}return _(Readable,e,t)}}function indexOf(e,t){for(var r=0,n=e.length;r{"use strict";e.exports=Transform;var n=r(614).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,s=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0;var u=r(3444);r(5651)(Transform,u);function afterTransform(e,t){var r=this._transformState;r.transforming=false;var n=r.writecb;if(n===null){return this.emit("error",new s)}r.writechunk=null;r.writecb=null;if(t!=null)this.push(t);n(e);var i=this._readableState;i.reading=false;if(i.needReadable||i.length{"use strict";e.exports=Writable;function WriteReq(e,t,r){this.chunk=e;this.encoding=t;this.callback=r;this.next=null}function CorkedRequest(e){var t=this;this.next=null;this.entry=null;this.finish=function(){onCorkedFinish(t,e)}}var n;Writable.WritableState=WritableState;var i={deprecate:r(5372)};var s=r(7121);var o=r(4300).Buffer;var a=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return o.from(e)}function _isUint8Array(e){return o.isBuffer(e)||e instanceof a}var u=r(1317);var l=r(6125),c=l.getHighWaterMark;var f=r(614).q,d=f.ERR_INVALID_ARG_TYPE,p=f.ERR_METHOD_NOT_IMPLEMENTED,h=f.ERR_MULTIPLE_CALLBACK,m=f.ERR_STREAM_CANNOT_PIPE,v=f.ERR_STREAM_DESTROYED,g=f.ERR_STREAM_NULL_VALUES,y=f.ERR_STREAM_WRITE_AFTER_END,b=f.ERR_UNKNOWN_ENCODING;var S=u.errorOrDestroy;r(5651)(Writable,s);function nop(){}function WritableState(e,t,i){n=n||r(3444);e=e||{};if(typeof i!=="boolean")i=t instanceof n;this.objectMode=!!e.objectMode;if(i)this.objectMode=this.objectMode||!!e.writableObjectMode;this.highWaterMark=c(this,e,"writableHighWaterMark",i);this.finalCalled=false;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;this.destroyed=false;var s=e.decodeStrings===false;this.decodeStrings=!s;this.defaultEncoding=e.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(e){onwrite(t,e)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.emitClose=e.emitClose!==false;this.autoDestroy=!!e.autoDestroy;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var e=this.bufferedRequest;var t=[];while(e){t.push(e);e=e.next}return t};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:i.deprecate((function writableStateBufferGetter(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}})();var w;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){w=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function value(e){if(w.call(this,e))return true;if(this!==Writable)return false;return e&&e._writableState instanceof WritableState}})}else{w=function realHasInstance(e){return e instanceof this}}function Writable(e){n=n||r(3444);var t=this instanceof n;if(!t&&!w.call(Writable,this))return new Writable(e);this._writableState=new WritableState(e,this,t);this.writable=true;if(e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}s.call(this)}Writable.prototype.pipe=function(){S(this,new m)};function writeAfterEnd(e,t){var r=new y;S(e,r);process.nextTick(t,r)}function validChunk(e,t,r,n){var i;if(r===null){i=new g}else if(typeof r!=="string"&&!t.objectMode){i=new d("chunk",["string","Buffer"],r)}if(i){S(e,i);process.nextTick(n,i);return false}return true}Writable.prototype.write=function(e,t,r){var n=this._writableState;var i=false;var s=!n.objectMode&&_isUint8Array(e);if(s&&!o.isBuffer(e)){e=_uint8ArrayToBuffer(e)}if(typeof t==="function"){r=t;t=null}if(s)t="buffer";else if(!t)t=n.defaultEncoding;if(typeof r!=="function")r=nop;if(n.ending)writeAfterEnd(this,r);else if(s||validChunk(this,n,e,r)){n.pendingcb++;i=writeOrBuffer(this,n,s,e,t,r)}return i};Writable.prototype.cork=function(){this._writableState.corked++};Writable.prototype.uncork=function(){var e=this._writableState;if(e.corked){e.corked--;if(!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest)clearBuffer(this,e)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(e){if(typeof e==="string")e=e.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new b(e);this._writableState.defaultEncoding=e;return this};Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:false,get:function get(){return this._writableState&&this._writableState.getBuffer()}});function decodeChunk(e,t,r){if(!e.objectMode&&e.decodeStrings!==false&&typeof t==="string"){t=o.from(t,r)}return t}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function get(){return this._writableState.highWaterMark}});function writeOrBuffer(e,t,r,n,i,s){if(!r){var o=decodeChunk(t,n,i);if(n!==o){r=true;i="buffer";n=o}}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length{"use strict";var n;function _defineProperty(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}var i=r(5617);var s=Symbol("lastResolve");var o=Symbol("lastReject");var a=Symbol("error");var u=Symbol("ended");var l=Symbol("lastPromise");var c=Symbol("handlePromise");var f=Symbol("stream");function createIterResult(e,t){return{value:e,done:t}}function readAndResolve(e){var t=e[s];if(t!==null){var r=e[f].read();if(r!==null){e[l]=null;e[s]=null;e[o]=null;t(createIterResult(r,false))}}}function onReadable(e){process.nextTick(readAndResolve,e)}function wrapForNext(e,t){return function(r,n){e.then((function(){if(t[u]){r(createIterResult(undefined,true));return}t[c](r,n)}),n)}}var d=Object.getPrototypeOf((function(){}));var p=Object.setPrototypeOf((n={get stream(){return this[f]},next:function next(){var e=this;var t=this[a];if(t!==null){return Promise.reject(t)}if(this[u]){return Promise.resolve(createIterResult(undefined,true))}if(this[f].destroyed){return new Promise((function(t,r){process.nextTick((function(){if(e[a]){r(e[a])}else{t(createIterResult(undefined,true))}}))}))}var r=this[l];var n;if(r){n=new Promise(wrapForNext(r,this))}else{var i=this[f].read();if(i!==null){return Promise.resolve(createIterResult(i,false))}n=new Promise(this[c])}this[l]=n;return n}},_defineProperty(n,Symbol.asyncIterator,(function(){return this})),_defineProperty(n,"return",(function _return(){var e=this;return new Promise((function(t,r){e[f].destroy(null,(function(e){if(e){r(e);return}t(createIterResult(undefined,true))}))}))})),n),d);var h=function createReadableStreamAsyncIterator(e){var t;var r=Object.create(p,(t={},_defineProperty(t,f,{value:e,writable:true}),_defineProperty(t,s,{value:null,writable:true}),_defineProperty(t,o,{value:null,writable:true}),_defineProperty(t,a,{value:null,writable:true}),_defineProperty(t,u,{value:e._readableState.endEmitted,writable:true}),_defineProperty(t,c,{value:function value(e,t){var n=r[f].read();if(n){r[l]=null;r[s]=null;r[o]=null;e(createIterResult(n,false))}else{r[s]=e;r[o]=t}},writable:true}),t));r[l]=null;i(e,(function(e){if(e&&e.code!=="ERR_STREAM_PREMATURE_CLOSE"){var t=r[o];if(t!==null){r[l]=null;r[s]=null;r[o]=null;t(e)}r[a]=e;return}var n=r[s];if(n!==null){r[l]=null;r[s]=null;r[o]=null;n(createIterResult(undefined,true))}r[u]=true}));e.on("readable",onReadable.bind(null,r));return r};e.exports=h},7275:(e,t,r)=>{"use strict";function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);if(t)n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}));r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t0)this.tail.next=t;else this.head=t;this.tail=t;++this.length}},{key:"unshift",value:function unshift(e){var t={data:e,next:this.head};if(this.length===0)this.tail=t;this.head=t;++this.length}},{key:"shift",value:function shift(){if(this.length===0)return;var e=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return e}},{key:"clear",value:function clear(){this.head=this.tail=null;this.length=0}},{key:"join",value:function join(e){if(this.length===0)return"";var t=this.head;var r=""+t.data;while(t=t.next){r+=e+t.data}return r}},{key:"concat",value:function concat(e){if(this.length===0)return i.alloc(0);var t=i.allocUnsafe(e>>>0);var r=this.head;var n=0;while(r){copyBuffer(r.data,t,n);n+=r.data.length;r=r.next}return t}},{key:"consume",value:function consume(e,t){var r;if(ei.length?i.length:e;if(s===i.length)n+=i;else n+=i.slice(0,e);e-=s;if(e===0){if(s===i.length){++r;if(t.next)this.head=t.next;else this.head=this.tail=null}else{this.head=t;t.data=i.slice(s)}break}++r}this.length-=r;return n}},{key:"_getBuffer",value:function _getBuffer(e){var t=i.allocUnsafe(e);var r=this.head;var n=1;r.data.copy(t);e-=r.data.length;while(r=r.next){var s=r.data;var o=e>s.length?s.length:e;s.copy(t,t.length-e,0,o);e-=o;if(e===0){if(o===s.length){++n;if(r.next)this.head=r.next;else this.head=this.tail=null}else{this.head=r;r.data=s.slice(o)}break}++n}this.length-=n;return t}},{key:a,value:function value(e,t){return o(this,_objectSpread({},t,{depth:0,customInspect:false}))}}]);return BufferList}()},1317:e=>{"use strict";function destroy(e,t){var r=this;var n=this._readableState&&this._readableState.destroyed;var i=this._writableState&&this._writableState.destroyed;if(n||i){if(t){t(e)}else if(e){if(!this._writableState){process.nextTick(emitErrorNT,this,e)}else if(!this._writableState.errorEmitted){this._writableState.errorEmitted=true;process.nextTick(emitErrorNT,this,e)}}return this}if(this._readableState){this._readableState.destroyed=true}if(this._writableState){this._writableState.destroyed=true}this._destroy(e||null,(function(e){if(!t&&e){if(!r._writableState){process.nextTick(emitErrorAndCloseNT,r,e)}else if(!r._writableState.errorEmitted){r._writableState.errorEmitted=true;process.nextTick(emitErrorAndCloseNT,r,e)}else{process.nextTick(emitCloseNT,r)}}else if(t){process.nextTick(emitCloseNT,r);t(e)}else{process.nextTick(emitCloseNT,r)}}));return this}function emitErrorAndCloseNT(e,t){emitErrorNT(e,t);emitCloseNT(e)}function emitCloseNT(e){if(e._writableState&&!e._writableState.emitClose)return;if(e._readableState&&!e._readableState.emitClose)return;e.emit("close")}function undestroy(){if(this._readableState){this._readableState.destroyed=false;this._readableState.reading=false;this._readableState.ended=false;this._readableState.endEmitted=false}if(this._writableState){this._writableState.destroyed=false;this._writableState.ended=false;this._writableState.ending=false;this._writableState.finalCalled=false;this._writableState.prefinished=false;this._writableState.finished=false;this._writableState.errorEmitted=false}}function emitErrorNT(e,t){e.emit("error",t)}function errorOrDestroy(e,t){var r=e._readableState;var n=e._writableState;if(r&&r.autoDestroy||n&&n.autoDestroy)e.destroy(t);else e.emit("error",t)}e.exports={destroy:destroy,undestroy:undestroy,errorOrDestroy:errorOrDestroy}},5617:(e,t,r)=>{"use strict";var n=r(614).q.ERR_STREAM_PREMATURE_CLOSE;function once(e){var t=false;return function(){if(t)return;t=true;for(var r=arguments.length,n=new Array(r),i=0;i{"use strict";function asyncGeneratorStep(e,t,r,n,i,s,o){try{var a=e[s](o);var u=a.value}catch(e){r(e);return}if(a.done){t(u)}else{Promise.resolve(u).then(n,i)}}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var s=e.apply(t,r);function _next(e){asyncGeneratorStep(s,n,i,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(s,n,i,_next,_throw,"throw",e)}_next(undefined)}))}}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);if(t)n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}));r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t{"use strict";var n;function once(e){var t=false;return function(){if(t)return;t=true;e.apply(void 0,arguments)}}var i=r(614).q,s=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function noop(e){if(e)throw e}function isRequest(e){return e.setHeader&&typeof e.abort==="function"}function destroyer(e,t,i,s){s=once(s);var a=false;e.on("close",(function(){a=true}));if(n===undefined)n=r(5617);n(e,{readable:t,writable:i},(function(e){if(e)return s(e);a=true;s()}));var u=false;return function(t){if(a)return;if(u)return;u=true;if(isRequest(e))return e.abort();if(typeof e.destroy==="function")return e.destroy();s(t||new o("pipe"))}}function call(e){e()}function pipe(e,t){return e.pipe(t)}function popCallback(e){if(!e.length)return noop;if(typeof e[e.length-1]!=="function")return noop;return e.pop()}function pipeline(){for(var e=arguments.length,t=new Array(e),r=0;r0;return destroyer(e,s,a,(function(e){if(!i)i=e;if(e)o.forEach(call);if(s)return;o.forEach(call);n(i)}))}));return t.reduce(pipe)}e.exports=pipeline},6125:(e,t,r)=>{"use strict";var n=r(614).q.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function getHighWaterMark(e,t,r,i){var s=highWaterMarkFrom(t,i,r);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var o=i?r:"highWaterMark";throw new n(o,s)}return Math.floor(s)}return e.objectMode?16:16*1024}e.exports={getHighWaterMark:getHighWaterMark}},7121:(e,t,r)=>{e.exports=r(2781)},3020:(e,t,r)=>{var n=r(2781);if(process.env.READABLE_STREAM==="disable"&&n){e.exports=n.Readable;Object.assign(e.exports,n);e.exports.Stream=n}else{t=e.exports=r(7253);t.Stream=n||t;t.Readable=t;t.Writable=r(3399);t.Duplex=r(3444);t.Transform=r(7291);t.PassThrough=r(7712);t.finished=r(5617);t.pipeline=r(6481)}},2683:(e,t,r)=>{ +/*! safe-buffer. MIT License. Feross Aboukhadijeh */ +var n=r(4300);var i=n.Buffer;function copyProps(e,t){for(var r in e){t[r]=e[r]}}if(i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow){e.exports=n}else{copyProps(n,t);t.Buffer=SafeBuffer}function SafeBuffer(e,t,r){return i(e,t,r)}SafeBuffer.prototype=Object.create(i.prototype);copyProps(i,SafeBuffer);SafeBuffer.from=function(e,t,r){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return i(e,t,r)};SafeBuffer.alloc=function(e,t,r){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var n=i(e);if(t!==undefined){if(typeof r==="string"){n.fill(t,r)}else{n.fill(t)}}else{n.fill(0)}return n};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return i(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n.SlowBuffer(e)}},8795:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(4105);const i=4096;const s="utf8";class SmartBuffer{constructor(e){this.length=0;this._encoding=s;this._writeOffset=0;this._readOffset=0;if(SmartBuffer.isSmartBufferOptions(e)){if(e.encoding){n.checkEncoding(e.encoding);this._encoding=e.encoding}if(e.size){if(n.isFiniteInteger(e.size)&&e.size>0){this._buff=Buffer.allocUnsafe(e.size)}else{throw new Error(n.ERRORS.INVALID_SMARTBUFFER_SIZE)}}else if(e.buff){if(Buffer.isBuffer(e.buff)){this._buff=e.buff;this.length=e.buff.length}else{throw new Error(n.ERRORS.INVALID_SMARTBUFFER_BUFFER)}}else{this._buff=Buffer.allocUnsafe(i)}}else{if(typeof e!=="undefined"){throw new Error(n.ERRORS.INVALID_SMARTBUFFER_OBJECT)}this._buff=Buffer.allocUnsafe(i)}}static fromSize(e,t){return new this({size:e,encoding:t})}static fromBuffer(e,t){return new this({buff:e,encoding:t})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){const t=e;return t&&(t.encoding!==undefined||t.size!==undefined||t.buff!==undefined)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffer.prototype.readInt32BE,4,e)}readInt32LE(e){return this._readNumberValue(Buffer.prototype.readInt32LE,4,e)}readBigInt64BE(e){n.bigIntAndBufferInt64Check("readBigInt64BE");return this._readNumberValue(Buffer.prototype.readBigInt64BE,8,e)}readBigInt64LE(e){n.bigIntAndBufferInt64Check("readBigInt64LE");return this._readNumberValue(Buffer.prototype.readBigInt64LE,8,e)}writeInt8(e,t){this._writeNumberValue(Buffer.prototype.writeInt8,1,e,t);return this}insertInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeInt8,1,e,t)}writeInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}insertInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}writeInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}insertInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}writeInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}insertInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}writeInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}insertInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}writeBigInt64BE(e,t){n.bigIntAndBufferInt64Check("writeBigInt64BE");return this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}insertBigInt64BE(e,t){n.bigIntAndBufferInt64Check("writeBigInt64BE");return this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}writeBigInt64LE(e,t){n.bigIntAndBufferInt64Check("writeBigInt64LE");return this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,e,t)}insertBigInt64LE(e,t){n.bigIntAndBufferInt64Check("writeBigInt64LE");return this._insertNumberValue(Buffer.prototype.writeBigInt64LE,8,e,t)}readUInt8(e){return this._readNumberValue(Buffer.prototype.readUInt8,1,e)}readUInt16BE(e){return this._readNumberValue(Buffer.prototype.readUInt16BE,2,e)}readUInt16LE(e){return this._readNumberValue(Buffer.prototype.readUInt16LE,2,e)}readUInt32BE(e){return this._readNumberValue(Buffer.prototype.readUInt32BE,4,e)}readUInt32LE(e){return this._readNumberValue(Buffer.prototype.readUInt32LE,4,e)}readBigUInt64BE(e){n.bigIntAndBufferInt64Check("readBigUInt64BE");return this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,e)}readBigUInt64LE(e){n.bigIntAndBufferInt64Check("readBigUInt64LE");return this._readNumberValue(Buffer.prototype.readBigUInt64LE,8,e)}writeUInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt8,1,e,t)}insertUInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt8,1,e,t)}writeUInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}insertUInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}writeUInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}insertUInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}writeUInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}insertUInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}writeUInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}insertUInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}writeBigUInt64BE(e,t){n.bigIntAndBufferInt64Check("writeBigUInt64BE");return this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,t)}insertBigUInt64BE(e,t){n.bigIntAndBufferInt64Check("writeBigUInt64BE");return this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,t)}writeBigUInt64LE(e,t){n.bigIntAndBufferInt64Check("writeBigUInt64LE");return this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,t)}insertBigUInt64LE(e,t){n.bigIntAndBufferInt64Check("writeBigUInt64LE");return this._insertNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,t)}readFloatBE(e){return this._readNumberValue(Buffer.prototype.readFloatBE,4,e)}readFloatLE(e){return this._readNumberValue(Buffer.prototype.readFloatLE,4,e)}writeFloatBE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}insertFloatBE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}writeFloatLE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}insertFloatLE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}readDoubleBE(e){return this._readNumberValue(Buffer.prototype.readDoubleBE,8,e)}readDoubleLE(e){return this._readNumberValue(Buffer.prototype.readDoubleLE,8,e)}writeDoubleBE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}insertDoubleBE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}writeDoubleLE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}insertDoubleLE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}readString(e,t){let r;if(typeof e==="number"){n.checkLengthValue(e);r=Math.min(e,this.length-this._readOffset)}else{t=e;r=this.length-this._readOffset}if(typeof t!=="undefined"){n.checkEncoding(t)}const i=this._buff.slice(this._readOffset,this._readOffset+r).toString(t||this._encoding);this._readOffset+=r;return i}insertString(e,t,r){n.checkOffsetValue(t);return this._handleString(e,true,t,r)}writeString(e,t,r){return this._handleString(e,false,t,r)}readStringNT(e){if(typeof e!=="undefined"){n.checkEncoding(e)}let t=this.length;for(let e=this._readOffset;ethis.length){throw new Error(n.ERRORS.INVALID_READ_BEYOND_BOUNDS)}}ensureInsertable(e,t){n.checkOffsetValue(t);this._ensureCapacity(this.length+e);if(tthis.length){this.length=t+e}else{this.length+=e}}_ensureWriteable(e,t){const r=typeof t==="number"?t:this._writeOffset;this._ensureCapacity(r+e);if(r+e>this.length){this.length=r+e}}_ensureCapacity(e){const t=this._buff.length;if(e>t){let r=this._buff;let n=t*3/2+1;if(n{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(4300);const i={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};t.ERRORS=i;function checkEncoding(e){if(!n.Buffer.isEncoding(e)){throw new Error(i.INVALID_ENCODING)}}t.checkEncoding=checkEncoding;function isFiniteInteger(e){return typeof e==="number"&&isFinite(e)&&isInteger(e)}t.isFiniteInteger=isFiniteInteger;function checkOffsetOrLengthValue(e,t){if(typeof e==="number"){if(!isFiniteInteger(e)||e<0){throw new Error(t?i.INVALID_OFFSET:i.INVALID_LENGTH)}}else{throw new Error(t?i.INVALID_OFFSET_NON_NUMBER:i.INVALID_LENGTH_NON_NUMBER)}}function checkLengthValue(e){checkOffsetOrLengthValue(e,false)}t.checkLengthValue=checkLengthValue;function checkOffsetValue(e){checkOffsetOrLengthValue(e,true)}t.checkOffsetValue=checkOffsetValue;function checkTargetOffset(e,t){if(e<0||e>t.length){throw new Error(i.INVALID_TARGET_OFFSET)}}t.checkTargetOffset=checkTargetOffset;function isInteger(e){return typeof e==="number"&&isFinite(e)&&Math.floor(e)===e}function bigIntAndBufferInt64Check(e){if(typeof BigInt==="undefined"){throw new Error("Platform does not support JS BigInt type.")}if(typeof n.Buffer.prototype[e]==="undefined"){throw new Error(`Platform does not support Buffer.prototype.${e}.`)}}t.bigIntAndBufferInt64Check=bigIntAndBufferInt64Check},8345:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const s=i(r(9523));const o=i(r(4404));const a=i(r(7310));const u=i(r(5598));const l=r(5689);const c=r(8003);const f=u.default("socks-proxy-agent");function dnsLookup(e){return new Promise(((t,r)=>{s.default.lookup(e,((e,n)=>{if(e){r(e)}else{t(n)}}))}))}function parseSocksProxy(e){let t=0;let r=false;let n=5;const i=e.hostname||e.host;if(!i){throw new TypeError('No "host"')}if(typeof e.port==="number"){t=e.port}else if(typeof e.port==="string"){t=parseInt(e.port,10)}if(!t){t=1080}if(e.protocol){switch(e.protocol.replace(":","")){case"socks4":r=true;case"socks4a":n=4;break;case"socks5":r=true;case"socks":case"socks5h":n=5;break;default:throw new TypeError(`A "socks" protocol must be specified! Got: ${e.protocol}`)}}if(typeof e.type!=="undefined"){if(e.type===4||e.type===5){n=e.type}else{throw new TypeError(`"type" must be 4 or 5, got: ${e.type}`)}}const s={host:i,port:t,type:n};let o=e.userId||e.username;let a=e.password;if(e.auth){const t=e.auth.split(":");o=t[0];a=t[1]}if(o){Object.defineProperty(s,"userId",{value:o,enumerable:false})}if(a){Object.defineProperty(s,"password",{value:a,enumerable:false})}return{lookup:r,proxy:s}}class SocksProxyAgent extends l.Agent{constructor(e){let t;if(typeof e==="string"){t=a.default.parse(e)}else{t=e}if(!t){throw new TypeError("a SOCKS proxy server `host` and `port` must be specified!")}super(t);const r=parseSocksProxy(t);this.lookup=r.lookup;this.proxy=r.proxy;this.tlsConnectionOptions=t.tls||{}}callback(e,t){return n(this,void 0,void 0,(function*(){const{lookup:e,proxy:r}=this;let{host:n,port:i,timeout:s}=t;if(!n){throw new Error("No `host` defined!")}if(e){n=yield dnsLookup(n)}const a={proxy:r,destination:{host:n,port:i},command:"connect",timeout:s};f("Creating socks proxy connection: %o",a);const{socket:u}=yield c.SocksClient.createConnection(a);f("Successfully created socks proxy connection");if(t.secureEndpoint){f("Upgrading socket connection to TLS");const e=t.servername||t.host;return o.default.connect(Object.assign(Object.assign(Object.assign({},omit(t,"host","hostname","path","port")),{socket:u,servername:e}),this.tlsConnectionOptions))}return u}))}}t["default"]=SocksProxyAgent;function omit(e,...t){const r={};let n;for(n in e){if(!t.includes(n)){r[n]=e[n]}}return r}},329:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const i=n(r(8345));function createSocksProxyAgent(e){return new i.default(e)}(function(e){e.SocksProxyAgent=i.default;e.prototype=i.default.prototype})(createSocksProxyAgent||(createSocksProxyAgent={}));e.exports=createSocksProxyAgent},9054:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.SocksClientError=t.SocksClient=void 0;const i=r(2361);const s=r(1808);const o=r(9316);const a=r(8795);const u=r(2739);const l=r(6515);const c=r(7222);const f=r(5369);Object.defineProperty(t,"SocksClientError",{enumerable:true,get:function(){return f.SocksClientError}});class SocksClient extends i.EventEmitter{constructor(e){super();this.options=Object.assign({},e);(0,l.validateSocksClientOptions)(e);this.setState(u.SocksClientState.Created)}static createConnection(e,t){return new Promise(((r,n)=>{try{(0,l.validateSocksClientOptions)(e,["connect"])}catch(e){if(typeof t==="function"){t(e);return r(e)}else{return n(e)}}const i=new SocksClient(e);i.connect(e.existing_socket);i.once("established",(e=>{i.removeAllListeners();if(typeof t==="function"){t(null,e);r(e)}else{r(e)}}));i.once("error",(e=>{i.removeAllListeners();if(typeof t==="function"){t(e);r(e)}else{n(e)}}))}))}static createConnectionChain(e,t){return new Promise(((r,i)=>n(this,void 0,void 0,(function*(){try{(0,l.validateSocksClientChainOptions)(e)}catch(e){if(typeof t==="function"){t(e);return r(e)}else{return i(e)}}let n;if(e.randomizeChain){(0,f.shuffleArray)(e.proxies)}try{for(let t=0;tthis.onDataReceivedHandler(e);this.onClose=()=>this.onCloseHandler();this.onError=e=>this.onErrorHandler(e);this.onConnect=()=>this.onConnectHandler();const t=setTimeout((()=>this.onEstablishedTimeout()),this.options.timeout||u.DEFAULT_TIMEOUT);if(t.unref&&typeof t.unref==="function"){t.unref()}if(e){this.socket=e}else{this.socket=new s.Socket}this.socket.once("close",this.onClose);this.socket.once("error",this.onError);this.socket.once("connect",this.onConnect);this.socket.on("data",this.onDataReceived);this.setState(u.SocksClientState.Connecting);this.receiveBuffer=new c.ReceiveBuffer;if(e){this.socket.emit("connect")}else{this.socket.connect(this.getSocketOptions());if(this.options.set_tcp_nodelay!==undefined&&this.options.set_tcp_nodelay!==null){this.socket.setNoDelay(!!this.options.set_tcp_nodelay)}}this.prependOnceListener("established",(e=>{setImmediate((()=>{if(this.receiveBuffer.length>0){const t=this.receiveBuffer.get(this.receiveBuffer.length);e.socket.emit("data",t)}e.socket.resume()}))}))}getSocketOptions(){return Object.assign(Object.assign({},this.options.socket_options),{host:this.options.proxy.host||this.options.proxy.ipaddress,port:this.options.proxy.port})}onEstablishedTimeout(){if(this.state!==u.SocksClientState.Established&&this.state!==u.SocksClientState.BoundWaitingForConnection){this.closeSocket(u.ERRORS.ProxyConnectionTimedOut)}}onConnectHandler(){this.setState(u.SocksClientState.Connected);if(this.options.proxy.type===4){this.sendSocks4InitialHandshake()}else{this.sendSocks5InitialHandshake()}this.setState(u.SocksClientState.SentInitialHandshake)}onDataReceivedHandler(e){this.receiveBuffer.append(e);this.processData()}processData(){while(this.state!==u.SocksClientState.Established&&this.state!==u.SocksClientState.Error&&this.receiveBuffer.length>=this.nextRequiredPacketBufferSize){if(this.state===u.SocksClientState.SentInitialHandshake){if(this.options.proxy.type===4){this.handleSocks4FinalHandshakeResponse()}else{this.handleInitialSocks5HandshakeResponse()}}else if(this.state===u.SocksClientState.SentAuthentication){this.handleInitialSocks5AuthenticationHandshakeResponse()}else if(this.state===u.SocksClientState.SentFinalHandshake){this.handleSocks5FinalHandshakeResponse()}else if(this.state===u.SocksClientState.BoundWaitingForConnection){if(this.options.proxy.type===4){this.handleSocks4IncomingConnectionResponse()}else{this.handleSocks5IncomingConnectionResponse()}}else{this.closeSocket(u.ERRORS.InternalError);break}}}onCloseHandler(){this.closeSocket(u.ERRORS.SocketClosed)}onErrorHandler(e){this.closeSocket(e.message)}removeInternalSocketHandlers(){this.socket.pause();this.socket.removeListener("data",this.onDataReceived);this.socket.removeListener("close",this.onClose);this.socket.removeListener("error",this.onError);this.socket.removeListener("connect",this.onConnect)}closeSocket(e){if(this.state!==u.SocksClientState.Error){this.setState(u.SocksClientState.Error);this.socket.destroy();this.removeInternalSocketHandlers();this.emit("error",new f.SocksClientError(e,this.options))}}sendSocks4InitialHandshake(){const e=this.options.proxy.userId||"";const t=new a.SmartBuffer;t.writeUInt8(4);t.writeUInt8(u.SocksCommand[this.options.command]);t.writeUInt16BE(this.options.destination.port);if(s.isIPv4(this.options.destination.host)){t.writeBuffer(o.toBuffer(this.options.destination.host));t.writeStringNT(e)}else{t.writeUInt8(0);t.writeUInt8(0);t.writeUInt8(0);t.writeUInt8(1);t.writeStringNT(e);t.writeStringNT(this.options.destination.host)}this.nextRequiredPacketBufferSize=u.SOCKS_INCOMING_PACKET_SIZES.Socks4Response;this.socket.write(t.toBuffer())}handleSocks4FinalHandshakeResponse(){const e=this.receiveBuffer.get(8);if(e[1]!==u.Socks4Response.Granted){this.closeSocket(`${u.ERRORS.Socks4ProxyRejectedConnection} - (${u.Socks4Response[e[1]]})`)}else{if(u.SocksCommand[this.options.command]===u.SocksCommand.bind){const t=a.SmartBuffer.fromBuffer(e);t.readOffset=2;const r={port:t.readUInt16BE(),host:o.fromLong(t.readUInt32BE())};if(r.host==="0.0.0.0"){r.host=this.options.proxy.ipaddress}this.setState(u.SocksClientState.BoundWaitingForConnection);this.emit("bound",{remoteHost:r,socket:this.socket})}else{this.setState(u.SocksClientState.Established);this.removeInternalSocketHandlers();this.emit("established",{socket:this.socket})}}}handleSocks4IncomingConnectionResponse(){const e=this.receiveBuffer.get(8);if(e[1]!==u.Socks4Response.Granted){this.closeSocket(`${u.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${u.Socks4Response[e[1]]})`)}else{const t=a.SmartBuffer.fromBuffer(e);t.readOffset=2;const r={port:t.readUInt16BE(),host:o.fromLong(t.readUInt32BE())};this.setState(u.SocksClientState.Established);this.removeInternalSocketHandlers();this.emit("established",{remoteHost:r,socket:this.socket})}}sendSocks5InitialHandshake(){const e=new a.SmartBuffer;const t=[u.Socks5Auth.NoAuth];if(this.options.proxy.userId||this.options.proxy.password){t.push(u.Socks5Auth.UserPass)}if(this.options.proxy.custom_auth_method!==undefined){t.push(this.options.proxy.custom_auth_method)}e.writeUInt8(5);e.writeUInt8(t.length);for(const r of t){e.writeUInt8(r)}this.nextRequiredPacketBufferSize=u.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse;this.socket.write(e.toBuffer());this.setState(u.SocksClientState.SentInitialHandshake)}handleInitialSocks5HandshakeResponse(){const e=this.receiveBuffer.get(2);if(e[0]!==5){this.closeSocket(u.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion)}else if(e[1]===u.SOCKS5_NO_ACCEPTABLE_AUTH){this.closeSocket(u.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType)}else{if(e[1]===u.Socks5Auth.NoAuth){this.socks5ChosenAuthType=u.Socks5Auth.NoAuth;this.sendSocks5CommandRequest()}else if(e[1]===u.Socks5Auth.UserPass){this.socks5ChosenAuthType=u.Socks5Auth.UserPass;this.sendSocks5UserPassAuthentication()}else if(e[1]===this.options.proxy.custom_auth_method){this.socks5ChosenAuthType=this.options.proxy.custom_auth_method;this.sendSocks5CustomAuthentication()}else{this.closeSocket(u.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType)}}}sendSocks5UserPassAuthentication(){const e=this.options.proxy.userId||"";const t=this.options.proxy.password||"";const r=new a.SmartBuffer;r.writeUInt8(1);r.writeUInt8(Buffer.byteLength(e));r.writeString(e);r.writeUInt8(Buffer.byteLength(t));r.writeString(t);this.nextRequiredPacketBufferSize=u.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse;this.socket.write(r.toBuffer());this.setState(u.SocksClientState.SentAuthentication)}sendSocks5CustomAuthentication(){return n(this,void 0,void 0,(function*(){this.nextRequiredPacketBufferSize=this.options.proxy.custom_auth_response_size;this.socket.write(yield this.options.proxy.custom_auth_request_handler());this.setState(u.SocksClientState.SentAuthentication)}))}handleSocks5CustomAuthHandshakeResponse(e){return n(this,void 0,void 0,(function*(){return yield this.options.proxy.custom_auth_response_handler(e)}))}handleSocks5AuthenticationNoAuthHandshakeResponse(e){return n(this,void 0,void 0,(function*(){return e[1]===0}))}handleSocks5AuthenticationUserPassHandshakeResponse(e){return n(this,void 0,void 0,(function*(){return e[1]===0}))}handleInitialSocks5AuthenticationHandshakeResponse(){return n(this,void 0,void 0,(function*(){this.setState(u.SocksClientState.ReceivedAuthenticationResponse);let e=false;if(this.socks5ChosenAuthType===u.Socks5Auth.NoAuth){e=yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2))}else if(this.socks5ChosenAuthType===u.Socks5Auth.UserPass){e=yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2))}else if(this.socks5ChosenAuthType===this.options.proxy.custom_auth_method){e=yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size))}if(!e){this.closeSocket(u.ERRORS.Socks5AuthenticationFailed)}else{this.sendSocks5CommandRequest()}}))}sendSocks5CommandRequest(){const e=new a.SmartBuffer;e.writeUInt8(5);e.writeUInt8(u.SocksCommand[this.options.command]);e.writeUInt8(0);if(s.isIPv4(this.options.destination.host)){e.writeUInt8(u.Socks5HostType.IPv4);e.writeBuffer(o.toBuffer(this.options.destination.host))}else if(s.isIPv6(this.options.destination.host)){e.writeUInt8(u.Socks5HostType.IPv6);e.writeBuffer(o.toBuffer(this.options.destination.host))}else{e.writeUInt8(u.Socks5HostType.Hostname);e.writeUInt8(this.options.destination.host.length);e.writeString(this.options.destination.host)}e.writeUInt16BE(this.options.destination.port);this.nextRequiredPacketBufferSize=u.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader;this.socket.write(e.toBuffer());this.setState(u.SocksClientState.SentFinalHandshake)}handleSocks5FinalHandshakeResponse(){const e=this.receiveBuffer.peek(5);if(e[0]!==5||e[1]!==u.Socks5Response.Granted){this.closeSocket(`${u.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${u.Socks5Response[e[1]]}`)}else{const t=e[3];let r;let n;if(t===u.Socks5HostType.IPv4){const e=u.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SOCKS5_NO_ACCEPTABLE_AUTH=t.SOCKS5_CUSTOM_AUTH_END=t.SOCKS5_CUSTOM_AUTH_START=t.SOCKS_INCOMING_PACKET_SIZES=t.SocksClientState=t.Socks5Response=t.Socks5HostType=t.Socks5Auth=t.Socks4Response=t.SocksCommand=t.ERRORS=t.DEFAULT_TIMEOUT=void 0;const r=3e4;t.DEFAULT_TIMEOUT=r;const n={InvalidSocksCommand:"An invalid SOCKS command was provided. Valid options are connect, bind, and associate.",InvalidSocksCommandForOperation:"An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.",InvalidSocksCommandChain:"An invalid SOCKS command was provided. Chaining currently only supports the connect command.",InvalidSocksClientOptionsDestination:"An invalid destination host was provided.",InvalidSocksClientOptionsExistingSocket:"An invalid existing socket was provided. This should be an instance of stream.Duplex.",InvalidSocksClientOptionsProxy:"Invalid SOCKS proxy details were provided.",InvalidSocksClientOptionsTimeout:"An invalid timeout value was provided. Please enter a value above 0 (in ms).",InvalidSocksClientOptionsProxiesLength:"At least two socks proxies must be provided for chaining.",InvalidSocksClientOptionsCustomAuthRange:"Custom auth must be a value between 0x80 and 0xFE.",InvalidSocksClientOptionsCustomAuthOptions:"When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.",NegotiationError:"Negotiation error",SocketClosed:"Socket closed",ProxyConnectionTimedOut:"Proxy connection timed out",InternalError:"SocksClient internal error (this should not happen)",InvalidSocks4HandshakeResponse:"Received invalid Socks4 handshake response",Socks4ProxyRejectedConnection:"Socks4 Proxy rejected connection",InvalidSocks4IncomingConnectionResponse:"Socks4 invalid incoming connection response",Socks4ProxyRejectedIncomingBoundConnection:"Socks4 Proxy rejected incoming bound connection",InvalidSocks5InitialHandshakeResponse:"Received invalid Socks5 initial handshake response",InvalidSocks5IntiailHandshakeSocksVersion:"Received invalid Socks5 initial handshake (invalid socks version)",InvalidSocks5InitialHandshakeNoAcceptedAuthType:"Received invalid Socks5 initial handshake (no accepted authentication type)",InvalidSocks5InitialHandshakeUnknownAuthType:"Received invalid Socks5 initial handshake (unknown authentication type)",Socks5AuthenticationFailed:"Socks5 Authentication failed",InvalidSocks5FinalHandshake:"Received invalid Socks5 final handshake response",InvalidSocks5FinalHandshakeRejected:"Socks5 proxy rejected connection",InvalidSocks5IncomingConnectionResponse:"Received invalid Socks5 incoming connection response",Socks5ProxyRejectedIncomingBoundConnection:"Socks5 Proxy rejected incoming bound connection"};t.ERRORS=n;const i={Socks5InitialHandshakeResponse:2,Socks5UserPassAuthenticationResponse:2,Socks5ResponseHeader:5,Socks5ResponseIPv4:10,Socks5ResponseIPv6:22,Socks5ResponseHostname:e=>e+7,Socks4Response:8};t.SOCKS_INCOMING_PACKET_SIZES=i;var s;(function(e){e[e["connect"]=1]="connect";e[e["bind"]=2]="bind";e[e["associate"]=3]="associate"})(s||(s={}));t.SocksCommand=s;var o;(function(e){e[e["Granted"]=90]="Granted";e[e["Failed"]=91]="Failed";e[e["Rejected"]=92]="Rejected";e[e["RejectedIdent"]=93]="RejectedIdent"})(o||(o={}));t.Socks4Response=o;var a;(function(e){e[e["NoAuth"]=0]="NoAuth";e[e["GSSApi"]=1]="GSSApi";e[e["UserPass"]=2]="UserPass"})(a||(a={}));t.Socks5Auth=a;const u=128;t.SOCKS5_CUSTOM_AUTH_START=u;const l=254;t.SOCKS5_CUSTOM_AUTH_END=l;const c=255;t.SOCKS5_NO_ACCEPTABLE_AUTH=c;var f;(function(e){e[e["Granted"]=0]="Granted";e[e["Failure"]=1]="Failure";e[e["NotAllowed"]=2]="NotAllowed";e[e["NetworkUnreachable"]=3]="NetworkUnreachable";e[e["HostUnreachable"]=4]="HostUnreachable";e[e["ConnectionRefused"]=5]="ConnectionRefused";e[e["TTLExpired"]=6]="TTLExpired";e[e["CommandNotSupported"]=7]="CommandNotSupported";e[e["AddressNotSupported"]=8]="AddressNotSupported"})(f||(f={}));t.Socks5Response=f;var d;(function(e){e[e["IPv4"]=1]="IPv4";e[e["Hostname"]=3]="Hostname";e[e["IPv6"]=4]="IPv6"})(d||(d={}));t.Socks5HostType=d;var p;(function(e){e[e["Created"]=0]="Created";e[e["Connecting"]=1]="Connecting";e[e["Connected"]=2]="Connected";e[e["SentInitialHandshake"]=3]="SentInitialHandshake";e[e["ReceivedInitialHandshakeResponse"]=4]="ReceivedInitialHandshakeResponse";e[e["SentAuthentication"]=5]="SentAuthentication";e[e["ReceivedAuthenticationResponse"]=6]="ReceivedAuthenticationResponse";e[e["SentFinalHandshake"]=7]="SentFinalHandshake";e[e["ReceivedFinalResponse"]=8]="ReceivedFinalResponse";e[e["BoundWaitingForConnection"]=9]="BoundWaitingForConnection";e[e["Established"]=10]="Established";e[e["Disconnected"]=11]="Disconnected";e[e["Error"]=99]="Error"})(p||(p={}));t.SocksClientState=p},6515:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.validateSocksClientChainOptions=t.validateSocksClientOptions=void 0;const n=r(5369);const i=r(2739);const s=r(2781);function validateSocksClientOptions(e,t=["connect","bind","associate"]){if(!i.SocksCommand[e.command]){throw new n.SocksClientError(i.ERRORS.InvalidSocksCommand,e)}if(t.indexOf(e.command)===-1){throw new n.SocksClientError(i.ERRORS.InvalidSocksCommandForOperation,e)}if(!isValidSocksRemoteHost(e.destination)){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsDestination,e)}if(!isValidSocksProxy(e.proxy)){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsProxy,e)}validateCustomProxyAuth(e.proxy,e);if(e.timeout&&!isValidTimeoutValue(e.timeout)){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsTimeout,e)}if(e.existing_socket&&!(e.existing_socket instanceof s.Duplex)){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsExistingSocket,e)}}t.validateSocksClientOptions=validateSocksClientOptions;function validateSocksClientChainOptions(e){if(e.command!=="connect"){throw new n.SocksClientError(i.ERRORS.InvalidSocksCommandChain,e)}if(!isValidSocksRemoteHost(e.destination)){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsDestination,e)}if(!(e.proxies&&Array.isArray(e.proxies)&&e.proxies.length>=2)){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsProxiesLength,e)}e.proxies.forEach((t=>{if(!isValidSocksProxy(t)){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsProxy,e)}validateCustomProxyAuth(t,e)}));if(e.timeout&&!isValidTimeoutValue(e.timeout)){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsTimeout,e)}}t.validateSocksClientChainOptions=validateSocksClientChainOptions;function validateCustomProxyAuth(e,t){if(e.custom_auth_method!==undefined){if(e.custom_auth_methodi.SOCKS5_CUSTOM_AUTH_END){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsCustomAuthRange,t)}if(e.custom_auth_request_handler===undefined||typeof e.custom_auth_request_handler!=="function"){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,t)}if(e.custom_auth_response_size===undefined){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,t)}if(e.custom_auth_response_handler===undefined||typeof e.custom_auth_response_handler!=="function"){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,t)}}}function isValidSocksRemoteHost(e){return e&&typeof e.host==="string"&&typeof e.port==="number"&&e.port>=0&&e.port<=65535}function isValidSocksProxy(e){return e&&(typeof e.host==="string"||typeof e.ipaddress==="string")&&typeof e.port==="number"&&e.port>=0&&e.port<=65535&&(e.type===4||e.type===5)}function isValidTimeoutValue(e){return typeof e==="number"&&e>0}},7222:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ReceiveBuffer=void 0;class ReceiveBuffer{constructor(e=4096){this.buffer=Buffer.allocUnsafe(e);this.offset=0;this.originalSize=e}get length(){return this.offset}append(e){if(!Buffer.isBuffer(e)){throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.")}if(this.offset+e.length>=this.buffer.length){const t=this.buffer;this.buffer=Buffer.allocUnsafe(Math.max(this.buffer.length+this.originalSize,this.buffer.length+e.length));t.copy(this.buffer)}e.copy(this.buffer,this.offset);return this.offset+=e.length}peek(e){if(e>this.offset){throw new Error("Attempted to read beyond the bounds of the managed internal data.")}return this.buffer.slice(0,e)}get(e){if(e>this.offset){throw new Error("Attempted to read beyond the bounds of the managed internal data.")}const t=Buffer.allocUnsafe(e);this.buffer.slice(0,e).copy(t);this.buffer.copyWithin(0,e,e+this.offset-e);this.offset-=e;return t}}t.ReceiveBuffer=ReceiveBuffer},5369:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.shuffleArray=t.SocksClientError=void 0;class SocksClientError extends Error{constructor(e,t){super(e);this.options=t}}t.SocksClientError=SocksClientError;function shuffleArray(e){for(let t=e.length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1));[e[t],e[r]]=[e[r],e[t]]}}t.shuffleArray=shuffleArray},8003:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});i(r(9054),t)},5021:(e,t,r)=>{"use strict";const{Transform:n}=r(3020);const{StringDecoder:i}=r(1576);const s=Symbol("last");const o=Symbol("decoder");function transform(e,t,r){var n;if(this.overflow){var i=this[o].write(e);n=i.split(this.matcher);if(n.length===1)return r();n.shift();this.overflow=false}else{this[s]+=this[o].write(e);n=this[s].split(this.matcher)}this[s]=n.pop();for(var a=0;athis.maxLength;if(this.overflow&&!this.skipOverflow)return r(new Error("maximum buffer reached"));r()}function flush(e){this[s]+=this[o].end();if(this[s]){try{push(this,this.mapper(this[s]))}catch(t){return e(t)}}e()}function push(e,t){if(t!==undefined){e.push(t)}}function noop(e){return e}function split(e,t,r){e=e||/\r?\n/;t=t||noop;r=r||{};switch(arguments.length){case 1:if(typeof e==="function"){t=e;e=/\r?\n/}else if(typeof e==="object"&&!(e instanceof RegExp)){r=e;e=/\r?\n/}break;case 2:if(typeof e==="function"){r=t;t=e;e=/\r?\n/}else if(typeof t==="object"){r=t;t=noop}}r=Object.assign({},r);r.transform=transform;r.flush=flush;r.readableObjectMode=true;const a=new n(r);a[s]="";a[o]=new i("utf8");a.matcher=e;a.mapper=t;a.maxLength=r.maxLength;a.skipOverflow=r.skipOverflow;a.overflow=false;return a}e.exports=split},9488:(e,t,r)=>{"use strict";var n=r(2683).Buffer;var i=n.isEncoding||function(e){e=""+e;switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function _normalizeEncoding(e){if(!e)return"utf8";var t;while(true){switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase();t=true}}}function normalizeEncoding(e){var t=_normalizeEncoding(e);if(typeof t!=="string"&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}t.s=StringDecoder;function StringDecoder(e){this.encoding=normalizeEncoding(e);var t;switch(this.encoding){case"utf16le":this.text=utf16Text;this.end=utf16End;t=4;break;case"utf8":this.fillLast=utf8FillLast;t=4;break;case"base64":this.text=base64Text;this.end=base64End;t=3;break;default:this.write=simpleWrite;this.end=simpleEnd;return}this.lastNeed=0;this.lastTotal=0;this.lastChar=n.allocUnsafe(t)}StringDecoder.prototype.write=function(e){if(e.length===0)return"";var t;var r;if(this.lastNeed){t=this.fillLast(e);if(t===undefined)return"";r=this.lastNeed;this.lastNeed=0}else{r=0}if(r>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function utf8CheckIncomplete(e,t,r){var n=t.length-1;if(n=0){if(i>0)e.lastNeed=i-1;return i}if(--n=0){if(i>0)e.lastNeed=i-2;return i}if(--n=0){if(i>0){if(i===2)i=0;else e.lastNeed=i-3}return i}return 0}function utf8CheckExtraBytes(e,t,r){if((t[0]&192)!==128){e.lastNeed=0;return"�"}if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128){e.lastNeed=1;return"�"}if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128){e.lastNeed=2;return"�"}}}}function utf8FillLast(e){var t=this.lastTotal-this.lastNeed;var r=utf8CheckExtraBytes(this,e,t);if(r!==undefined)return r;if(this.lastNeed<=e.length){e.copy(this.lastChar,t,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,t,0,e.length);this.lastNeed-=e.length}function utf8Text(e,t){var r=utf8CheckIncomplete(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);e.copy(this.lastChar,0,n);return e.toString("utf8",t,n)}function utf8End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"�";return t}function utf16Text(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1];return r.slice(0,-1)}}return r}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=e[e.length-1];return e.toString("utf16le",t,e.length-1)}function utf16End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function base64Text(e,t){var r=(e.length-t)%3;if(r===0)return e.toString("base64",t);this.lastNeed=3-r;this.lastTotal=3;if(r===1){this.lastChar[0]=e[e.length-1]}else{this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1]}return e.toString("base64",t,e.length-r)}function base64End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):""}},1596:(e,t,r)=>{const{Transform:n}=r(3020);function inherits(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}function through2(e){return(t,r,n)=>{if(typeof t==="function"){n=r;r=t;t={}}if(typeof r!=="function"){r=(e,t,r)=>r(null,e)}if(typeof n!=="function"){n=null}return e(t,r,n)}}const i=through2(((e,t,r)=>{const i=new n(e);i._transform=t;if(r){i._flush=r}return i}));const s=through2(((e,t,r)=>{function Through2(i){if(!(this instanceof Through2)){return new Through2(i)}this.options=Object.assign({},e,i);n.call(this,this.options);this._transform=t;if(r){this._flush=r}}inherits(Through2,n);return Through2}));const o=through2((function(e,t,r){const i=new n(Object.assign({objectMode:true,highWaterMark:16},e));i._transform=t;if(r){i._flush=r}return i}));e.exports=i;e.exports.ctor=s;e.exports.obj=o},1353:(e,t,r)=>{e.exports=r(21)},21:(e,t,r)=>{"use strict";var n=r(1808);var i=r(4404);var s=r(3685);var o=r(5687);var a=r(2361);var u=r(9491);var l=r(3837);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=s.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=s.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=o.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=o.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function TunnelingAgent(e){var t=this;t.options=e||{};t.proxyOptions=t.options.proxy||{};t.maxSockets=t.options.maxSockets||s.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",(function onFree(e,r,n,i){var s=toOptions(r,n,i);for(var o=0,a=t.requests.length;o=this.maxSockets){i.requests.push(s);return}i.createSocket(s,(function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){i.emit("free",t,s)}function onCloseOrRemove(e){i.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var r=this;var n={};r.sockets.push(n);var i=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){i.localAddress=e.localAddress}if(i.proxyAuth){i.headers=i.headers||{};i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")}c("making CONNECT request");var s=r.request(i);s.useChunkedEncodingByDefault=false;s.once("response",onResponse);s.once("upgrade",onUpgrade);s.once("connect",onConnect);s.once("error",onError);s.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick((function(){onConnect(e,t,r)}))}function onConnect(i,o,a){s.removeAllListeners();o.removeAllListeners();if(i.statusCode!==200){c("tunneling socket could not be established, statusCode=%d",i.statusCode);o.destroy();var u=new Error("tunneling socket could not be established, "+"statusCode="+i.statusCode);u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(n);return}if(a.length>0){c("got illegal response body from proxy");o.destroy();var u=new Error("got illegal response body from proxy");u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(n);return}c("tunneling connection has established");r.sockets[r.sockets.indexOf(n)]=o;return t(o)}function onError(t){s.removeAllListeners();c("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var i=new Error("tunneling socket could not be established, "+"cause="+t.message);i.code="ECONNRESET";e.request.emit("error",i);r.removeSocket(n)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var r=this.requests.shift();if(r){this.createSocket(r,(function(e){r.request.onSocket(e)}))}};function createSecureSocket(e,t){var r=this;TunnelingAgent.prototype.createSocket.call(r,e,(function(n){var s=e.request.getHeader("host");var o=mergeOptions({},r.options,{socket:n,servername:s?s.replace(/:.*$/,""):e.host});var a=i.connect(0,o);r.sockets[r.sockets.indexOf(n)]=a;t(a)}))}function toOptions(e,t,r){if(typeof e==="string"){return{host:e,port:t,localAddress:r}}return e}function mergeOptions(e){for(var t=1,r=arguments.length;t{"use strict";t.fromCallback=function(e){return Object.defineProperty((function(...t){if(typeof t[t.length-1]==="function")e.apply(this,t);else{return new Promise(((r,n)=>{e.call(this,...t,((e,t)=>e!=null?n(e):r(t)))}))}}),"name",{value:e.name})};t.fromPromise=function(e){return Object.defineProperty((function(...t){const r=t[t.length-1];if(typeof r!=="function")return e.apply(this,t);else e.apply(this,t.slice(0,-1)).then((e=>r(null,e)),r)}),"name",{value:e.name})}},626:function(e,t){ +/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ +(function(e,r){true?r(t):0})(this,(function(e){"use strict";function merge(){for(var e=arguments.length,t=Array(e),r=0;r1){t[0]=t[0].slice(0,-1);var n=t.length-1;for(var i=1;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var g=s-o;var y=Math.floor;var b=String.fromCharCode;function error$1(e){throw new RangeError(v[e])}function map(e,t){var r=[];var n=e.length;while(n--){r[n]=t(e[n])}return r}function mapDomain(e,t){var r=e.split("@");var n="";if(r.length>1){n=r[0]+"@";e=r[1]}e=e.replace(m,".");var i=e.split(".");var s=map(i,t).join(".");return n+s}function ucs2decode(e){var t=[];var r=0;var n=e.length;while(r=55296&&i<=56319&&r>1;e+=y(e/t);for(;e>g*a>>1;n+=s){e=y(e/g)}return y(n+(g+1)*e/(e+u))};var k=function decode(e){var t=[];var r=e.length;var n=0;var u=f;var l=c;var p=e.lastIndexOf(d);if(p<0){p=0}for(var h=0;h=128){error$1("not-basic")}t.push(e.charCodeAt(h))}for(var m=p>0?p+1:0;m=r){error$1("invalid-input")}var S=w(e.charCodeAt(m++));if(S>=s||S>y((i-n)/g)){error$1("overflow")}n+=S*g;var _=b<=l?o:b>=l+a?a:b-l;if(S<_){break}var k=s-_;if(g>y(i/k)){error$1("overflow")}g*=k}var P=t.length+1;l=E(n-v,P,v==0);if(y(n/P)>i-u){error$1("overflow")}u+=y(n/P);n%=P;t.splice(n++,0,u)}return String.fromCodePoint.apply(String,t)};var P=function encode(e){var t=[];e=ucs2decode(e);var r=e.length;var n=f;var u=0;var l=c;var p=true;var h=false;var m=undefined;try{for(var v=e[Symbol.iterator](),g;!(p=(g=v.next()).done);p=true){var S=g.value;if(S<128){t.push(b(S))}}}catch(e){h=true;m=e}finally{try{if(!p&&v.return){v.return()}}finally{if(h){throw m}}}var w=t.length;var k=w;if(w){t.push(d)}while(k=n&&Ay((i-u)/T)){error$1("overflow")}u+=(P-n)*T;n=P;var D=true;var F=false;var L=undefined;try{for(var N=e[Symbol.iterator](),j;!(D=(j=N.next()).done);D=true){var B=j.value;if(Bi){error$1("overflow")}if(B==n){var M=u;for(var $=s;;$+=s){var U=$<=l?o:$>=l+a?a:$-l;if(M>6|192).toString(16).toUpperCase()+"%"+(t&63|128).toString(16).toUpperCase();else r="%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(t&63|128).toString(16).toUpperCase();return r}function pctDecChars(e){var t="";var r=0;var n=e.length;while(r=194&&i<224){if(n-r>=6){var s=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((i&31)<<6|s&63)}else{t+=e.substr(r,6)}r+=6}else if(i>=224){if(n-r>=9){var o=parseInt(e.substr(r+4,2),16);var a=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((i&15)<<12|(o&63)<<6|a&63)}else{t+=e.substr(r,9)}r+=9}else{t+=e.substr(r,3);r+=3}}return t}function _normalizeComponentEncoding(e,t){function decodeUnreserved(e){var r=pctDecChars(e);return!r.match(t.UNRESERVED)?e:r}if(e.scheme)e.scheme=String(e.scheme).replace(t.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(t.NOT_SCHEME,"");if(e.userinfo!==undefined)e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_USERINFO,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.host!==undefined)e.host=String(e.host).replace(t.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(t.NOT_HOST,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.path!==undefined)e.path=String(e.path).replace(t.PCT_ENCODED,decodeUnreserved).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.query!==undefined)e.query=String(e.query).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_QUERY,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.fragment!==undefined)e.fragment=String(e.fragment).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_FRAGMENT,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);return e}function _stripLeadingZeros(e){return e.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(e,t){var r=e.match(t.IPV4ADDRESS)||[];var i=n(r,2),s=i[1];if(s){return s.split(".").map(_stripLeadingZeros).join(".")}else{return e}}function _normalizeIPv6(e,t){var r=e.match(t.IPV6ADDRESS)||[];var i=n(r,3),s=i[1],o=i[2];if(s){var a=s.toLowerCase().split("::").reverse(),u=n(a,2),l=u[0],c=u[1];var f=c?c.split(":").map(_stripLeadingZeros):[];var d=l.split(":").map(_stripLeadingZeros);var p=t.IPV4ADDRESS.test(d[d.length-1]);var h=p?7:8;var m=d.length-h;var v=Array(h);for(var g=0;g1){var w=v.slice(0,b.index);var _=v.slice(b.index+b.length);S=w.join(":")+"::"+_.join(":")}else{S=v.join(":")}if(o){S+="%"+o}return S}else{return e}}var I=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;var A="".match(/(){0}/)[1]===undefined;function parse(e){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var i={};var s=n.iri!==false?r:t;if(n.reference==="suffix")e=(n.scheme?n.scheme+":":"")+"//"+e;var o=e.match(I);if(o){if(A){i.scheme=o[1];i.userinfo=o[3];i.host=o[4];i.port=parseInt(o[5],10);i.path=o[6]||"";i.query=o[7];i.fragment=o[8];if(isNaN(i.port)){i.port=o[5]}}else{i.scheme=o[1]||undefined;i.userinfo=e.indexOf("@")!==-1?o[3]:undefined;i.host=e.indexOf("//")!==-1?o[4]:undefined;i.port=parseInt(o[5],10);i.path=o[6]||"";i.query=e.indexOf("?")!==-1?o[7]:undefined;i.fragment=e.indexOf("#")!==-1?o[8]:undefined;if(isNaN(i.port)){i.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:undefined}}if(i.host){i.host=_normalizeIPv6(_normalizeIPv4(i.host,s),s)}if(i.scheme===undefined&&i.userinfo===undefined&&i.host===undefined&&i.port===undefined&&!i.path&&i.query===undefined){i.reference="same-document"}else if(i.scheme===undefined){i.reference="relative"}else if(i.fragment===undefined){i.reference="absolute"}else{i.reference="uri"}if(n.reference&&n.reference!=="suffix"&&n.reference!==i.reference){i.error=i.error||"URI is not a "+n.reference+" reference."}var a=R[(n.scheme||i.scheme||"").toLowerCase()];if(!n.unicodeSupport&&(!a||!a.unicodeSupport)){if(i.host&&(n.domainHost||a&&a.domainHost)){try{i.host=O.toASCII(i.host.replace(s.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){i.error=i.error||"Host's domain name can not be converted to ASCII via punycode: "+e}}_normalizeComponentEncoding(i,t)}else{_normalizeComponentEncoding(i,s)}if(a&&a.parse){a.parse(i,n)}}else{i.error=i.error||"URI can not be parsed."}return i}function _recomposeAuthority(e,n){var i=n.iri!==false?r:t;var s=[];if(e.userinfo!==undefined){s.push(e.userinfo);s.push("@")}if(e.host!==undefined){s.push(_normalizeIPv6(_normalizeIPv4(String(e.host),i),i).replace(i.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"})))}if(typeof e.port==="number"||typeof e.port==="string"){s.push(":");s.push(String(e.port))}return s.length?s.join(""):undefined}var T=/^\.\.?\//;var D=/^\/\.(\/|$)/;var F=/^\/\.\.(\/|$)/;var L=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(e){var t=[];while(e.length){if(e.match(T)){e=e.replace(T,"")}else if(e.match(D)){e=e.replace(D,"/")}else if(e.match(F)){e=e.replace(F,"/");t.pop()}else if(e==="."||e===".."){e=""}else{var r=e.match(L);if(r){var n=r[0];e=e.slice(n.length);t.push(n)}else{throw new Error("Unexpected dot segment condition")}}}return t.join("")}function serialize(e){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var i=n.iri?r:t;var s=[];var o=R[(n.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize)o.serialize(e,n);if(e.host){if(i.IPV6ADDRESS.test(e.host)){}else if(n.domainHost||o&&o.domainHost){try{e.host=!n.iri?O.toASCII(e.host.replace(i.PCT_ENCODED,pctDecChars).toLowerCase()):O.toUnicode(e.host)}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(!n.iri?"ASCII":"Unicode")+" via punycode: "+t}}}_normalizeComponentEncoding(e,i);if(n.reference!=="suffix"&&e.scheme){s.push(e.scheme);s.push(":")}var a=_recomposeAuthority(e,n);if(a!==undefined){if(n.reference!=="suffix"){s.push("//")}s.push(a);if(e.path&&e.path.charAt(0)!=="/"){s.push("/")}}if(e.path!==undefined){var u=e.path;if(!n.absolutePath&&(!o||!o.absolutePath)){u=removeDotSegments(u)}if(a===undefined){u=u.replace(/^\/\//,"/%2F")}s.push(u)}if(e.query!==undefined){s.push("?");s.push(e.query)}if(e.fragment!==undefined){s.push("#");s.push(e.fragment)}return s.join("")}function resolveComponents(e,t){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var n=arguments[3];var i={};if(!n){e=parse(serialize(e,r),r);t=parse(serialize(t,r),r)}r=r||{};if(!r.tolerant&&t.scheme){i.scheme=t.scheme;i.userinfo=t.userinfo;i.host=t.host;i.port=t.port;i.path=removeDotSegments(t.path||"");i.query=t.query}else{if(t.userinfo!==undefined||t.host!==undefined||t.port!==undefined){i.userinfo=t.userinfo;i.host=t.host;i.port=t.port;i.path=removeDotSegments(t.path||"");i.query=t.query}else{if(!t.path){i.path=e.path;if(t.query!==undefined){i.query=t.query}else{i.query=e.query}}else{if(t.path.charAt(0)==="/"){i.path=removeDotSegments(t.path)}else{if((e.userinfo!==undefined||e.host!==undefined||e.port!==undefined)&&!e.path){i.path="/"+t.path}else if(!e.path){i.path=t.path}else{i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path}i.path=removeDotSegments(i.path)}i.query=t.query}i.userinfo=e.userinfo;i.host=e.host;i.port=e.port}i.scheme=e.scheme}i.fragment=t.fragment;return i}function resolve(e,t,r){var n=assign({scheme:"null"},r);return serialize(resolveComponents(parse(e,n),parse(t,n),n,true),n)}function normalize(e,t){if(typeof e==="string"){e=serialize(parse(e,t),t)}else if(typeOf(e)==="object"){e=parse(serialize(e,t),t)}return e}function equal(e,t,r){if(typeof e==="string"){e=serialize(parse(e,r),r)}else if(typeOf(e)==="object"){e=serialize(e,r)}if(typeof t==="string"){t=serialize(parse(t,r),r)}else if(typeOf(t)==="object"){t=serialize(t,r)}return e===t}function escapeComponent(e,n){return e&&e.toString().replace(!n||!n.iri?t.ESCAPE:r.ESCAPE,pctEncChar)}function unescapeComponent(e,n){return e&&e.toString().replace(!n||!n.iri?t.PCT_ENCODED:r.PCT_ENCODED,pctDecChars)}var N={scheme:"http",domainHost:true,parse:function parse(e,t){if(!e.host){e.error=e.error||"HTTP URIs must have a host."}return e},serialize:function serialize(e,t){var r=String(e.scheme).toLowerCase()==="https";if(e.port===(r?443:80)||e.port===""){e.port=undefined}if(!e.path){e.path="/"}return e}};var j={scheme:"https",domainHost:N.domainHost,parse:N.parse,serialize:N.serialize};function isSecure(e){return typeof e.secure==="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}var B={scheme:"ws",domainHost:true,parse:function parse(e,t){var r=e;r.secure=isSecure(r);r.resourceName=(r.path||"/")+(r.query?"?"+r.query:"");r.path=undefined;r.query=undefined;return r},serialize:function serialize(e,t){if(e.port===(isSecure(e)?443:80)||e.port===""){e.port=undefined}if(typeof e.secure==="boolean"){e.scheme=e.secure?"wss":"ws";e.secure=undefined}if(e.resourceName){var r=e.resourceName.split("?"),i=n(r,2),s=i[0],o=i[1];e.path=s&&s!=="/"?s:undefined;e.query=o;e.resourceName=undefined}e.fragment=undefined;return e}};var M={scheme:"wss",domainHost:B.domainHost,parse:B.parse,serialize:B.serialize};var $={};var U=true;var H="[A-Za-z0-9\\-\\.\\_\\~"+(U?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]";var q="[0-9A-Fa-f]";var V=subexp(subexp("%[EFef]"+q+"%"+q+q+"%"+q+q)+"|"+subexp("%[89A-Fa-f]"+q+"%"+q+q)+"|"+subexp("%"+q+q));var z="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";var W="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";var K=merge(W,'[\\"\\\\]');var Y="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";var G=new RegExp(H,"g");var Q=new RegExp(V,"g");var J=new RegExp(merge("[^]",z,"[\\.]",'[\\"]',K),"g");var Z=new RegExp(merge("[^]",H,Y),"g");var X=Z;function decodeUnreserved(e){var t=pctDecChars(e);return!t.match(G)?e:t}var ee={scheme:"mailto",parse:function parse$$1(e,t){var r=e;var n=r.to=r.path?r.path.split(","):[];r.path=undefined;if(r.query){var i=false;var s={};var o=r.query.split("&");for(var a=0,u=o.length;a{e.exports=r(3837).deprecate},2531:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next){yield e.value}}}},6368:(e,t,r)=>{"use strict";e.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(e){var t=this;if(!(t instanceof Yallist)){t=new Yallist}t.tail=null;t.head=null;t.length=0;if(e&&typeof e.forEach==="function"){e.forEach((function(e){t.push(e)}))}else if(arguments.length>0){for(var r=0,n=arguments.length;r1){r=t}else if(this.head){n=this.head.next;r=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=0;n!==null;i++){r=e(r,n.value,i);n=n.next}return r};Yallist.prototype.reduceReverse=function(e,t){var r;var n=this.tail;if(arguments.length>1){r=t}else if(this.tail){n=this.tail.prev;r=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=this.length-1;n!==null;i--){r=e(r,n.value,i);n=n.prev}return r};Yallist.prototype.toArray=function(){var e=new Array(this.length);for(var t=0,r=this.head;r!==null;t++){e[t]=r.value;r=r.next}return e};Yallist.prototype.toArrayReverse=function(){var e=new Array(this.length);for(var t=0,r=this.tail;r!==null;t++){e[t]=r.value;r=r.prev}return e};Yallist.prototype.slice=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var r=new Yallist;if(tthis.length){t=this.length}for(var n=0,i=this.head;i!==null&&nthis.length){t=this.length}for(var n=this.length,i=this.tail;i!==null&&n>t;n--){i=i.prev}for(;i!==null&&n>e;n--,i=i.prev){r.push(i.value)}return r};Yallist.prototype.splice=function(e,t,...r){if(e>this.length){e=this.length-1}if(e<0){e=this.length+e}for(var n=0,i=this.head;i!==null&&n{module.exports=eval("require")("supports-color")},9491:e=>{"use strict";e.exports=require("assert")},4300:e=>{"use strict";e.exports=require("buffer")},2081:e=>{"use strict";e.exports=require("child_process")},2057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},7282:e=>{"use strict";e.exports=require("process")},2781:e=>{"use strict";e.exports=require("stream")},1576:e=>{"use strict";e.exports=require("string_decoder")},4404:e=>{"use strict";e.exports=require("tls")},6224:e=>{"use strict";e.exports=require("tty")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9796:e=>{"use strict";e.exports=require("zlib")},3793:(e,t,r)=>{"use strict";t=e.exports=fetch;const n=r(3685);const i=r(5687);const s=r(9796);const o=r(2781);const a=r(5708);const u=r(3837);const l=r(5314);const c=r(6113);const f=r(7310);class FetchBaseError extends Error{constructor(e,t){super(e);Error.captureStackTrace(this,this.constructor);this.type=t}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}class FetchError extends FetchBaseError{constructor(e,t,r){super(e,t);if(r){this.code=this.errno=r.code;this.erroredSysCall=r.syscall}}}const d=Symbol.toStringTag;const isURLSearchParameters=e=>typeof e==="object"&&typeof e.append==="function"&&typeof e.delete==="function"&&typeof e.get==="function"&&typeof e.getAll==="function"&&typeof e.has==="function"&&typeof e.set==="function"&&typeof e.sort==="function"&&e[d]==="URLSearchParams";const isBlob=e=>typeof e==="object"&&typeof e.arrayBuffer==="function"&&typeof e.type==="string"&&typeof e.stream==="function"&&typeof e.constructor==="function"&&/^(Blob|File)$/.test(e[d]);function isFormData(e){return typeof e==="object"&&typeof e.append==="function"&&typeof e.set==="function"&&typeof e.get==="function"&&typeof e.getAll==="function"&&typeof e.delete==="function"&&typeof e.keys==="function"&&typeof e.values==="function"&&typeof e.entries==="function"&&typeof e.constructor==="function"&&e[d]==="FormData"}const isAbortSignal=e=>typeof e==="object"&&e[d]==="AbortSignal";const p="\r\n";const h="-".repeat(2);const m=Buffer.byteLength(p);const getFooter=e=>`${h}${e}${h}${p.repeat(2)}`;function getHeader(e,t,r){let n="";n+=`${h}${e}${p}`;n+=`Content-Disposition: form-data; name="${t}"`;if(isBlob(r)){n+=`; filename="${r.name}"${p}`;n+=`Content-Type: ${r.type||"application/octet-stream"}`}return`${n}${p.repeat(2)}`}const getBoundary=()=>c.randomBytes(8).toString("hex");async function*formDataIterator(e,t){for(const[r,n]of e){yield getHeader(t,r,n);if(isBlob(n)){yield*n.stream()}else{yield n}yield p}yield getFooter(t)}function getFormDataLength(e,t){let r=0;for(const[n,i]of e){r+=Buffer.byteLength(getHeader(t,n,i));if(isBlob(i)){r+=i.size}else{r+=Buffer.byteLength(String(i))}r+=m}r+=Buffer.byteLength(getFooter(t));return r}const v=Symbol("Body internals");class Body{constructor(e,{size:t=0}={}){let r=null;if(e===null){e=null}else if(isURLSearchParameters(e)){e=Buffer.from(e.toString())}else if(isBlob(e));else if(Buffer.isBuffer(e));else if(u.types.isAnyArrayBuffer(e)){e=Buffer.from(e)}else if(ArrayBuffer.isView(e)){e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}else if(e instanceof o);else if(isFormData(e)){r=`NodeFetchFormDataBoundary${getBoundary()}`;e=o.Readable.from(formDataIterator(e,r))}else{e=Buffer.from(String(e))}this[v]={body:e,boundary:r,disturbed:false,error:null};this.size=t;if(e instanceof o){e.on("error",(e=>{const t=e instanceof FetchBaseError?e:new FetchError(`Invalid response body while trying to fetch ${this.url}: ${e.message}`,"system",e);this[v].error=t}))}}get body(){return this[v].body}get bodyUsed(){return this[v].disturbed}async arrayBuffer(){const{buffer:e,byteOffset:t,byteLength:r}=await consumeBody(this);return e.slice(t,t+r)}async blob(){const e=this.headers&&this.headers.get("content-type")||this[v].body&&this[v].body.type||"";const t=await this.buffer();return new l([t],{type:e})}async json(){const e=await consumeBody(this);return JSON.parse(e.toString())}async text(){const e=await consumeBody(this);return e.toString()}buffer(){return consumeBody(this)}}Object.defineProperties(Body.prototype,{body:{enumerable:true},bodyUsed:{enumerable:true},arrayBuffer:{enumerable:true},blob:{enumerable:true},json:{enumerable:true},text:{enumerable:true}});async function consumeBody(e){if(e[v].disturbed){throw new TypeError(`body used already for: ${e.url}`)}e[v].disturbed=true;if(e[v].error){throw e[v].error}let{body:t}=e;if(t===null){return Buffer.alloc(0)}if(isBlob(t)){t=t.stream()}if(Buffer.isBuffer(t)){return t}if(!(t instanceof o)){return Buffer.alloc(0)}const r=[];let n=0;try{for await(const i of t){if(e.size>0&&n+i.length>e.size){const r=new FetchError(`content size at ${e.url} over limit: ${e.size}`,"max-size");t.destroy(r);throw r}n+=i.length;r.push(i)}}catch(t){if(t instanceof FetchBaseError){throw t}else{throw new FetchError(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t)}}if(t.readableEnded===true||t._readableState.ended===true){try{if(r.every((e=>typeof e==="string"))){return Buffer.from(r.join(""))}return Buffer.concat(r,n)}catch(t){throw new FetchError(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t)}}else{throw new FetchError(`Premature close of server response while trying to fetch ${e.url}`)}}const clone=(e,t)=>{let r;let n;let{body:i}=e;if(e.bodyUsed){throw new Error("cannot clone body after it is used")}if(i instanceof o&&typeof i.getBoundary!=="function"){r=new o.PassThrough({highWaterMark:t});n=new o.PassThrough({highWaterMark:t});i.pipe(r);i.pipe(n);e[v].body=r;i=n}return i};const extractContentType=(e,t)=>{if(e===null){return null}if(typeof e==="string"){return"text/plain;charset=UTF-8"}if(isURLSearchParameters(e)){return"application/x-www-form-urlencoded;charset=UTF-8"}if(isBlob(e)){return e.type||null}if(Buffer.isBuffer(e)||u.types.isAnyArrayBuffer(e)||ArrayBuffer.isView(e)){return null}if(e&&typeof e.getBoundary==="function"){return`multipart/form-data;boundary=${e.getBoundary()}`}if(isFormData(e)){return`multipart/form-data; boundary=${t[v].boundary}`}if(e instanceof o){return null}return"text/plain;charset=UTF-8"};const getTotalBytes=e=>{const{body:t}=e;if(t===null){return 0}if(isBlob(t)){return t.size}if(Buffer.isBuffer(t)){return t.length}if(t&&typeof t.getLengthSync==="function"){return t.hasKnownLength&&t.hasKnownLength()?t.getLengthSync():null}if(isFormData(t)){return getFormDataLength(e[v].boundary)}return null};const writeToStream=(e,{body:t})=>{if(t===null){e.end()}else if(isBlob(t)){t.stream().pipe(e)}else if(Buffer.isBuffer(t)){e.write(t);e.end()}else{t.pipe(e)}};const g=typeof n.validateHeaderName==="function"?n.validateHeaderName:e=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(e)){const t=new TypeError(`Header name must be a valid HTTP token [${e}]`);Object.defineProperty(t,"code",{value:"ERR_INVALID_HTTP_TOKEN"});throw t}};const y=typeof n.validateHeaderValue==="function"?n.validateHeaderValue:(e,t)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(t)){const t=new TypeError(`Invalid character in header content ["${e}"]`);Object.defineProperty(t,"code",{value:"ERR_INVALID_CHAR"});throw t}};class Headers extends URLSearchParams{constructor(e){let t=[];if(e instanceof Headers){const r=e.raw();for(const[e,n]of Object.entries(r)){t.push(...n.map((t=>[e,t])))}}else if(e==null);else if(typeof e==="object"&&!u.types.isBoxedPrimitive(e)){const r=e[Symbol.iterator];if(r==null){t.push(...Object.entries(e))}else{if(typeof r!=="function"){throw new TypeError("Header pairs must be iterable")}t=[...e].map((e=>{if(typeof e!=="object"||u.types.isBoxedPrimitive(e)){throw new TypeError("Each header pair must be an iterable object")}return[...e]})).map((e=>{if(e.length!==2){throw new TypeError("Each header pair must be a name/value tuple")}return[...e]}))}}else{throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence> or record)")}t=t.length>0?t.map((([e,t])=>{g(e);y(e,String(t));return[String(e).toLowerCase(),String(t)]})):undefined;super(t);return new Proxy(this,{get(e,t,r){switch(t){case"append":case"set":return(e,n)=>{g(e);y(e,String(n));return URLSearchParams.prototype[t].call(r,String(e).toLowerCase(),String(n))};case"delete":case"has":case"getAll":return e=>{g(e);return URLSearchParams.prototype[t].call(r,String(e).toLowerCase())};case"keys":return()=>{e.sort();return new Set(URLSearchParams.prototype.keys.call(e)).keys()};default:return Reflect.get(e,t,r)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){const t=this.getAll(e);if(t.length===0){return null}let r=t.join(", ");if(/^content-encoding$/i.test(e)){r=r.toLowerCase()}return r}forEach(e){for(const t of this.keys()){e(this.get(t),t)}}*values(){for(const e of this.keys()){yield this.get(e)}}*entries(){for(const e of this.keys()){yield[e,this.get(e)]}}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce(((e,t)=>{e[t]=this.getAll(t);return e}),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce(((e,t)=>{const r=this.getAll(t);if(t==="host"){e[t]=r[0]}else{e[t]=r.length>1?r:r[0]}return e}),{})}}Object.defineProperties(Headers.prototype,["get","entries","forEach","values"].reduce(((e,t)=>{e[t]={enumerable:true};return e}),{}));function fromRawHeaders(e=[]){return new Headers(e.reduce(((e,t,r,n)=>{if(r%2===0){e.push(n.slice(r,r+2))}return e}),[]).filter((([e,t])=>{try{g(e);y(e,String(t));return true}catch{return false}})))}const b=new Set([301,302,303,307,308]);const isRedirect=e=>b.has(e);const S=Symbol("Response internals");class Response extends Body{constructor(e=null,t={}){super(e,t);const r=t.status||200;const n=new Headers(t.headers);if(e!==null&&!n.has("Content-Type")){const t=extractContentType(e);if(t){n.append("Content-Type",t)}}this[S]={url:t.url,status:r,statusText:t.statusText||"",headers:n,counter:t.counter,highWaterMark:t.highWaterMark}}get url(){return this[S].url||""}get status(){return this[S].status}get ok(){return this[S].status>=200&&this[S].status<300}get redirected(){return this[S].counter>0}get statusText(){return this[S].statusText}get headers(){return this[S].headers}get highWaterMark(){return this[S].highWaterMark}clone(){return new Response(clone(this,this.highWaterMark),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size})}static redirect(e,t=302){if(!isRedirect(t)){throw new RangeError('Failed to execute "redirect" on "response": Invalid status code')}return new Response(null,{headers:{location:new URL(e).toString()},status:t})}get[Symbol.toStringTag](){return"Response"}}Object.defineProperties(Response.prototype,{url:{enumerable:true},status:{enumerable:true},ok:{enumerable:true},redirected:{enumerable:true},statusText:{enumerable:true},headers:{enumerable:true},clone:{enumerable:true}});const getSearch=e=>{if(e.search){return e.search}const t=e.href.length-1;const r=e.hash||(e.href[t]==="#"?"#":"");return e.href[t-r.length]==="?"?"?":""};const w=Symbol("Request internals");const isRequest=e=>typeof e==="object"&&typeof e[w]==="object";class Request extends Body{constructor(e,t={}){let r;if(isRequest(e)){r=new URL(e.url)}else{r=new URL(e);e={}}let n=t.method||e.method||"GET";n=n.toUpperCase();if((t.body!=null||isRequest(e))&&e.body!==null&&(n==="GET"||n==="HEAD")){throw new TypeError("Request with GET/HEAD method cannot have body")}const i=t.body?t.body:isRequest(e)&&e.body!==null?clone(e):null;super(i,{size:t.size||e.size||0});const s=new Headers(t.headers||e.headers||{});if(i!==null&&!s.has("Content-Type")){const e=extractContentType(i,this);if(e){s.append("Content-Type",e)}}let o=isRequest(e)?e.signal:null;if("signal"in t){o=t.signal}if(o!==null&&!isAbortSignal(o)){throw new TypeError("Expected signal to be an instanceof AbortSignal")}this[w]={method:n,redirect:t.redirect||e.redirect||"follow",headers:s,parsedURL:r,signal:o};this.follow=t.follow===undefined?e.follow===undefined?20:e.follow:t.follow;this.compress=t.compress===undefined?e.compress===undefined?true:e.compress:t.compress;this.counter=t.counter||e.counter||0;this.agent=t.agent||e.agent;this.highWaterMark=t.highWaterMark||e.highWaterMark||16384;this.insecureHTTPParser=t.insecureHTTPParser||e.insecureHTTPParser||false}get method(){return this[w].method}get url(){return f.format(this[w].parsedURL)}get headers(){return this[w].headers}get redirect(){return this[w].redirect}get signal(){return this[w].signal}clone(){return new Request(this)}get[Symbol.toStringTag](){return"Request"}}Object.defineProperties(Request.prototype,{method:{enumerable:true},url:{enumerable:true},headers:{enumerable:true},redirect:{enumerable:true},clone:{enumerable:true},signal:{enumerable:true}});const getNodeRequestOptions=e=>{const{parsedURL:t}=e[w];const r=new Headers(e[w].headers);if(!r.has("Accept")){r.set("Accept","*/*")}let n=null;if(e.body===null&&/^(post|put)$/i.test(e.method)){n="0"}if(e.body!==null){const t=getTotalBytes(e);if(typeof t==="number"&&!Number.isNaN(t)){n=String(t)}}if(n){r.set("Content-Length",n)}if(!r.has("User-Agent")){r.set("User-Agent","node-fetch")}if(e.compress&&!r.has("Accept-Encoding")){r.set("Accept-Encoding","gzip,deflate,br")}let{agent:i}=e;if(typeof i==="function"){i=i(t)}if(!r.has("Connection")&&!i){r.set("Connection","close")}const s=getSearch(t);const o={path:t.pathname+s,pathname:t.pathname,hostname:t.hostname,protocol:t.protocol,port:t.port,hash:t.hash,search:t.search,query:t.query,href:t.href,method:e.method,headers:r[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:e.insecureHTTPParser,agent:i};return o};class AbortError extends FetchBaseError{constructor(e,t="aborted"){super(e,t)}}const _=new Set(["data:","http:","https:"]);async function fetch(e,t){return new Promise(((r,u)=>{const l=new Request(e,t);const c=getNodeRequestOptions(l);if(!_.has(c.protocol)){throw new TypeError(`node-fetch cannot load ${e}. URL scheme "${c.protocol.replace(/:$/,"")}" is not supported.`)}if(c.protocol==="data:"){const e=a(l.url);const t=new Response(e,{headers:{"Content-Type":e.typeFull}});r(t);return}const f=(c.protocol==="https:"?i:n).request;const{signal:d}=l;let p=null;const abort=()=>{const e=new AbortError("The operation was aborted.");u(e);if(l.body&&l.body instanceof o.Readable){l.body.destroy(e)}if(!p||!p.body){return}p.body.emit("error",e)};if(d&&d.aborted){abort();return}const abortAndFinalize=()=>{abort();finalize()};const h=f(c);if(d){d.addEventListener("abort",abortAndFinalize)}const finalize=()=>{h.abort();if(d){d.removeEventListener("abort",abortAndFinalize)}};h.on("error",(e=>{u(new FetchError(`request to ${l.url} failed, reason: ${e.message}`,"system",e));finalize()}));h.on("response",(e=>{h.setTimeout(0);const n=fromRawHeaders(e.rawHeaders);if(isRedirect(e.statusCode)){const i=n.get("Location");const s=i===null?null:new URL(i,l.url);switch(l.redirect){case"error":u(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${l.url}`,"no-redirect"));finalize();return;case"manual":if(s!==null){try{n.set("Location",s)}catch(e){u(e)}}break;case"follow":{if(s===null){break}if(l.counter>=l.follow){u(new FetchError(`maximum redirect reached at: ${l.url}`,"max-redirect"));finalize();return}const n={headers:new Headers(l.headers),follow:l.follow,counter:l.counter+1,agent:l.agent,compress:l.compress,method:l.method,body:l.body,signal:l.signal,size:l.size};if(e.statusCode!==303&&l.body&&t.body instanceof o.Readable){u(new FetchError("Cannot follow redirect with body being a readable stream","unsupported-redirect"));finalize();return}if(e.statusCode===303||(e.statusCode===301||e.statusCode===302)&&l.method==="POST"){n.method="GET";n.body=undefined;n.headers.delete("content-length")}r(fetch(new Request(s,n)));finalize();return}}}e.once("end",(()=>{if(d){d.removeEventListener("abort",abortAndFinalize)}}));let i=o.pipeline(e,new o.PassThrough,(e=>{u(e)}));if(process.version<"v12.10"){e.on("aborted",abortAndFinalize)}const a={url:l.url,status:e.statusCode,statusText:e.statusMessage,headers:n,size:l.size,counter:l.counter,highWaterMark:l.highWaterMark};const c=n.get("Content-Encoding");if(!l.compress||l.method==="HEAD"||c===null||e.statusCode===204||e.statusCode===304){p=new Response(i,a);r(p);return}const f={flush:s.Z_SYNC_FLUSH,finishFlush:s.Z_SYNC_FLUSH};if(c==="gzip"||c==="x-gzip"){i=o.pipeline(i,s.createGunzip(f),(e=>{u(e)}));p=new Response(i,a);r(p);return}if(c==="deflate"||c==="x-deflate"){const t=o.pipeline(e,new o.PassThrough,(e=>{u(e)}));t.once("data",(e=>{if((e[0]&15)===8){i=o.pipeline(i,s.createInflate(),(e=>{u(e)}))}else{i=o.pipeline(i,s.createInflateRaw(),(e=>{u(e)}))}p=new Response(i,a);r(p)}));return}if(c==="br"){i=o.pipeline(i,s.createBrotliDecompress(),(e=>{u(e)}));p=new Response(i,a);r(p);return}p=new Response(i,a);r(p)}));writeToStream(h,l)}))}t.AbortError=AbortError;t.FetchError=FetchError;t.Headers=Headers;t.Request=Request;t.Response=Response;t["default"]=fetch;t.isRedirect=isRedirect},5379:e=>{"use strict";e.exports=JSON.parse('{"anyOf":[{"$ref":"#/definitions/RunInstall"},{"type":"array","items":{"$ref":"#/definitions/RunInstall"}},{"type":["null","boolean"]}],"definitions":{"RunInstall":{"type":"object","properties":{"recursive":{"type":"boolean"},"cwd":{"type":"string"},"args":{"type":"array","items":{"type":"string"}}}}},"$schema":"http://json-schema.org/draft-07/schema#"}')},3246:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},8703:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var r=__webpack_module_cache__[e]={exports:{}};var n=true;try{__webpack_modules__[e].call(r.exports,r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete __webpack_module_cache__[e]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__=__nccwpck_require__(8243);module.exports=__webpack_exports__})(); \ No newline at end of file diff --git a/package.json b/package.json index c41a3de..3b688ef 100644 --- a/package.json +++ b/package.json @@ -8,21 +8,21 @@ }, "dependencies": { "@actions/core": "^1.6.0", - "@pnpm/fetch": "^4.2.4", + "@pnpm/fetch": "^4.2.5", "@pnpm/logger": "^4.0.0", "@types/expand-tilde": "^2.0.0", "@types/fs-extra": "^9.0.13", "@types/js-yaml": "^4.0.5", "@types/node": "^14.18.10", - "@types/node-fetch": "^2.5.12", + "@types/node-fetch": "^2.6.1", "ajv": "^6.12.6", "expand-tilde": "^2.0.2", - "fs-extra": "^9.1.0", + "fs-extra": "^10.0.0", "js-yaml": "^4.1.0" }, "devDependencies": { "@ts-schema-autogen/cli": "^0.1.2", - "@vercel/ncc": "^0.27.0", + "@vercel/ncc": "^0.33.3", "typescript": "^4.5.5" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 10d69d5..3d2d5b1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2,38 +2,38 @@ lockfileVersion: 5.3 specifiers: '@actions/core': ^1.6.0 - '@pnpm/fetch': ^4.2.4 + '@pnpm/fetch': ^4.2.5 '@pnpm/logger': ^4.0.0 '@ts-schema-autogen/cli': ^0.1.2 '@types/expand-tilde': ^2.0.0 '@types/fs-extra': ^9.0.13 '@types/js-yaml': ^4.0.5 '@types/node': ^14.18.10 - '@types/node-fetch': ^2.5.12 - '@vercel/ncc': ^0.27.0 + '@types/node-fetch': ^2.6.1 + '@vercel/ncc': ^0.33.3 ajv: ^6.12.6 expand-tilde: ^2.0.2 - fs-extra: ^9.1.0 + fs-extra: ^10.0.0 js-yaml: ^4.1.0 typescript: ^4.5.5 dependencies: '@actions/core': 1.6.0 - '@pnpm/fetch': 4.2.4_@pnpm+logger@4.0.0 + '@pnpm/fetch': 4.2.5_@pnpm+logger@4.0.0 '@pnpm/logger': 4.0.0 '@types/expand-tilde': 2.0.0 '@types/fs-extra': 9.0.13 '@types/js-yaml': 4.0.5 '@types/node': 14.18.10 - '@types/node-fetch': 2.5.12 + '@types/node-fetch': 2.6.1 ajv: 6.12.6 expand-tilde: 2.0.2 - fs-extra: 9.1.0 + fs-extra: 10.0.0 js-yaml: 4.1.0 devDependencies: '@ts-schema-autogen/cli': 0.1.2 - '@vercel/ncc': 0.27.0 + '@vercel/ncc': 0.33.3 typescript: 4.5.5 packages: @@ -50,23 +50,23 @@ packages: tunnel: 0.0.6 dev: false - /@pnpm/core-loggers/6.1.3_@pnpm+logger@4.0.0: - resolution: {integrity: sha512-X3mEhYz+8DKy4Xxbr24tGK9jPD+1AIhigGiJ9Fd0q+ywHXQ6ECSFyGGikKEAlBQIKVJxG788Mi0Zo13TU91fEQ==} + /@pnpm/core-loggers/6.1.4_@pnpm+logger@4.0.0: + resolution: {integrity: sha512-vF4Qc8E8e4uCGbVc7USCgqxrRe4eZsz8XEuCTUy6asZFVnNnRY/N1vJaVG3hti/UYKI/1si1dJYibppXhgTimA==} engines: {node: '>=12.17'} peerDependencies: '@pnpm/logger': ^4.0.0 dependencies: '@pnpm/logger': 4.0.0 - '@pnpm/types': 7.9.0 + '@pnpm/types': 7.10.0 dev: false - /@pnpm/fetch/4.2.4_@pnpm+logger@4.0.0: - resolution: {integrity: sha512-PnFPVxhAK0+mOgKsVMrzS1bFokeO3PB6/aaBBjQprtvBG6jYZ8d8JnHvwhRcCKM/LxqVsazMFgqYPEFyMjg0Pw==} + /@pnpm/fetch/4.2.5_@pnpm+logger@4.0.0: + resolution: {integrity: sha512-8zUWgrP+6mK/LJcLkNfjqKLSwOs4n/LR3BACZGSwcFH7yh28YJhKo142gFPOVTzS0pBUDvVVsDNQ7sxp2lOmDw==} engines: {node: '>=12.17'} peerDependencies: '@pnpm/logger': ^4.0.0 dependencies: - '@pnpm/core-loggers': 6.1.3_@pnpm+logger@4.0.0 + '@pnpm/core-loggers': 6.1.4_@pnpm+logger@4.0.0 '@pnpm/fetching-types': 2.2.1 '@pnpm/logger': 4.0.0 '@pnpm/npm-registry-agent': 5.0.2 @@ -108,8 +108,8 @@ packages: - supports-color dev: false - /@pnpm/types/7.9.0: - resolution: {integrity: sha512-WJol7zZKMktP8bvoFEh/ANCrYsIDcfpGFgRZmAMeULuskFVND4NLXXIkBqNhtmv+ipt6mVUnsZTGHrVaXrlsNA==} + /@pnpm/types/7.10.0: + resolution: {integrity: sha512-7NKyfwepNccR6f9htiXAw0tt6rCajvtiX5HsTOi3odSFJ04iri43yjh70Ekw25hAynQwRR0rkJ7l6BBNFrJ/2g==} engines: {node: '>=12.17'} dev: false @@ -286,8 +286,8 @@ packages: resolution: {integrity: sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==} dev: true - /@types/node-fetch/2.5.12: - resolution: {integrity: sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==} + /@types/node-fetch/2.6.1: + resolution: {integrity: sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==} dependencies: '@types/node': 14.18.10 form-data: 3.0.1 @@ -310,8 +310,8 @@ packages: '@types/yargs-parser': 20.2.1 dev: true - /@vercel/ncc/0.27.0: - resolution: {integrity: sha512-DllIJQapnU2YwewIhh/4dYesmMQw3h2cFtabECc/zSJHqUbNa0eJuEkRa6DXbZvh1YPWBtYQoPV17NlDpBw1Vw==} + /@vercel/ncc/0.33.3: + resolution: {integrity: sha512-JGZ11QV+/ZcfudW2Cz2JVp54/pJNXbsuWRgSh2ZmmZdQBKXqBtIGrwI1Wyx8nlbzAiEFe7FHi4K1zX4//jxTnQ==} hasBin: true dev: true @@ -386,11 +386,6 @@ packages: resolution: {integrity: sha1-x57Zf380y48robyXkLzDZkdLS3k=} dev: false - /at-least-node/1.0.0: - resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} - engines: {node: '>= 4.0.0'} - dev: false - /balanced-match/1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: true @@ -580,6 +575,15 @@ packages: mime-types: 2.1.34 dev: false + /fs-extra/10.0.0: + resolution: {integrity: sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==} + engines: {node: '>=12'} + dependencies: + graceful-fs: 4.2.9 + jsonfile: 6.1.0 + universalify: 2.0.0 + dev: false + /fs-extra/8.1.0: resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} engines: {node: '>=6 <7 || >=8'} @@ -589,16 +593,6 @@ packages: universalify: 0.1.2 dev: true - /fs-extra/9.1.0: - resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} - engines: {node: '>=10'} - dependencies: - at-least-node: 1.0.0 - graceful-fs: 4.2.9 - jsonfile: 6.1.0 - universalify: 2.0.0 - dev: false - /fs.realpath/1.0.0: resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=} dev: true diff --git a/src/inputs/index.ts b/src/inputs/index.ts index 142fcae..db07108 100644 --- a/src/inputs/index.ts +++ b/src/inputs/index.ts @@ -3,7 +3,7 @@ import expandTilde from 'expand-tilde' import { RunInstall, parseRunInstall } from './run-install' export interface Inputs { - readonly version: string + readonly version?: string readonly dest: string readonly runInstall: RunInstall[] } @@ -15,7 +15,7 @@ const options: InputOptions = { const parseInputPath = (name: string) => expandTilde(getInput(name, options)) export const getInputs = (): Inputs => ({ - version: getInput('version', options), + version: getInput('version'), dest: parseInputPath('dest'), runInstall: parseRunInstall('run_install'), }) diff --git a/src/install-pnpm/run.ts b/src/install-pnpm/run.ts index 597ceec..0798190 100644 --- a/src/install-pnpm/run.ts +++ b/src/install-pnpm/run.ts @@ -2,14 +2,14 @@ import { addPath, exportVariable } from '@actions/core' import { spawn } from 'child_process' import { execPath } from 'process' import path from 'path' -import { remove, ensureFile, writeFile } from 'fs-extra' +import { remove, ensureFile, writeFile, readFile } from 'fs-extra' import fetch from '@pnpm/fetch' import { Inputs } from '../inputs' export async function runSelfInstaller(inputs: Inputs): Promise { const { version, dest } = inputs - const target = version ? `pnpm@${version}` : 'pnpm' const pkgJson = path.join(dest, 'package.json') + const target = await readTarget(pkgJson, version) await remove(dest) await ensureFile(pkgJson) @@ -36,4 +36,21 @@ export async function runSelfInstaller(inputs: Inputs): Promise { return exitCode } +async function readTarget(packageJsonPath: string, version?: string | undefined) { + if (version) return `pnpm@${version}` + + const { packageManager } = JSON.parse(await readFile(packageJsonPath, 'utf8')) + if (typeof packageManager !== 'string') { + throw new Error(`No pnpm version is specified. +Please specify it by one of the following ways: + - in the GitHub Action config with the key "version" + - in the package.json with the key "packageManager" (See https://nodejs.org/api/corepack.html)`) + } + + if (!packageManager.startsWith('pnpm@')) { + throw new Error('Invalid packageManager field in package.json') + } + return packageManager +} + export default runSelfInstaller