setup-cpp/dist/legacy/setup-cpp.js

4 lines
304 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

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

#!/usr/bin/env node
"use strict";function e(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}function t(e){return e&&e.__esModule&&{}.hasOwnProperty.call(e,"default")?e.default:e}function r(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}function n(){return Zn||(Zn=1,Object.defineProperty(ni,"__esModule",{value:!0}),ni.toCommandProperties=ni.toCommandValue=void 0,ni.toCommandValue=function(e){return null==e?"":"string"==typeof e||e instanceof String?e:JSON.stringify(e)},ni.toCommandProperties=function(e){return Object.keys(e).length?{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}:{}}),ni}function i(e){const t="https:"===e.protocol;if(function(e){if(!e.hostname)return!1;if(function(e){const t=e.toLowerCase();return"localhost"===t||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}(e.hostname))return!0;const t=process.env.no_proxy||process.env.NO_PROXY||"";if(!t)return!1;let r;e.port?r=Number(e.port):"http:"===e.protocol?r=80:"https:"===e.protocol&&(r=443);const n=[e.hostname.toUpperCase()];"number"==typeof r&&n.push(`${n[0]}:${r}`);for(const i of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e)))if("*"===i||n.some((e=>e===i||e.endsWith("."+i)||i.startsWith(".")&&e.endsWith(""+i))))return!0;return!1}(e))return;const r=t?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new ui(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new ui("http://"+r)}}function o(){if(Ti)return ci;Ti=1;var e=ci&&ci.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(ci,"__esModule",{value:!0}),ci.OidcClient=void 0;const t=xi,r=function(){if(Pi)return Ui;Pi=1;var e=Ui&&Ui.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};return Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.PersonalAccessTokenCredentialHandler=Ui.BearerCredentialHandler=Ui.BasicCredentialHandler=void 0,Ui.BasicCredentialHandler=class{constructor(e,t){this.username=e,this.password=t}prepareRequest(e){if(!e.headers)throw Error("The request has no headers");e.headers.Authorization="Basic "+Buffer.from(`${this.username}:${this.password}`).toString("base64")}canHandleAuthentication(){return!1}handleAuthentication(){return e(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},Ui.BearerCredentialHandler=class{constructor(e){this.token=e}prepareRequest(e){if(!e.headers)throw Error("The request has no headers");e.headers.Authorization="Bearer "+this.token}canHandleAuthentication(){return!1}handleAuthentication(){return e(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},Ui.PersonalAccessTokenCredentialHandler=class{constructor(e){this.token=e}prepareRequest(e){if(!e.headers)throw Error("The request has no headers");e.headers.Authorization="Basic "+Buffer.from("PAT:"+this.token).toString("base64")}canHandleAuthentication(){return!1}handleAuthentication(){return e(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},Ui}(),n=l();class i{static createHttpClient(e=!0,n=10){const o={allowRetries:e,maxRetries:n};return new t.HttpClient("actions/oidc-client",[new r.BearerCredentialHandler(i.getRequestToken())],o)}static getRequestToken(){const e=process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;if(!e)throw 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 Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable");return e}static getCall(t){var r;return e(this,void 0,void 0,(function*(){const e=i.createHttpClient(),n=yield e.getJson(t).catch((e=>{throw Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.message}`)})),o=null===(r=n.result)||void 0===r?void 0:r.value;if(!o)throw Error("Response json body do not have ID Token field");return o}))}static getIDToken(t){return e(this,void 0,void 0,(function*(){try{let e=i.getIDTokenUrl();t&&(e=`${e}&audience=${encodeURIComponent(t)}`),(0,n.debug)("ID token url is "+e);const r=yield i.getCall(e);return(0,n.setSecret)(r),r}catch(e){throw Error("Error message: "+e.message)}}))}}return ci.OidcClient=i,ci}function s(){return Ni||(Ni=1,function(e){var t=Fi&&Fi.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.summary=e.markdownSummary=e.SUMMARY_DOCS_URL=e.SUMMARY_ENV_VAR=void 0;const r=On,n=Rn,{access:i,appendFile:o,writeFile:s}=n.promises;e.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY",e.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";const a=new class{constructor(){this._buffer=""}filePath(){return t(this,void 0,void 0,(function*(){if(this._filePath)return this._filePath;const t=process.env[e.SUMMARY_ENV_VAR];if(!t)throw Error(`Unable to find environment variable for $${e.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield i(t,n.constants.R_OK|n.constants.W_OK)}catch(r){throw Error(`Unable to access summary file: '${t}'. Check if the file has correct read/write permissions.`)}return this._filePath=t,this._filePath}))}wrap(e,t,r={}){const n=Object.entries(r).map((([e,t])=>` ${e}="${t}"`)).join("");return t?`<${e}${n}>${t}</${e}>`:`<${e}${n}>`}write(e){return t(this,void 0,void 0,(function*(){const t=!!(null==e?void 0:e.overwrite),r=yield this.filePath(),n=t?s:o;return yield n(r,this._buffer,{encoding:"utf8"}),this.emptyBuffer()}))}clear(){return t(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:!0})}))}stringify(){return this._buffer}isEmptyBuffer(){return 0===this._buffer.length}emptyBuffer(){return this._buffer="",this}addRaw(e,t=!1){return this._buffer+=e,t?this.addEOL():this}addEOL(){return this.addRaw(r.EOL)}addCodeBlock(e,t){const r=Object.assign({},t&&{lang:t}),n=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(n).addEOL()}addList(e,t=!1){const r=t?"ol":"ul",n=e.map((e=>this.wrap("li",e))).join(""),i=this.wrap(r,n);return this.addRaw(i).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if("string"==typeof e)return this.wrap("td",e);const{header:t,data:r,colspan:n,rowspan:i}=e,o=t?"th":"td",s=Object.assign(Object.assign({},n&&{colspan:n}),i&&{rowspan:i});return this.wrap(o,r,s)})).join("");return this.wrap("tr",t)})).join(""),r=this.wrap("table",t);return this.addRaw(r).addEOL()}addDetails(e,t){const r=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(r).addEOL()}addImage(e,t,r){const{width:n,height:i}=r||{},o=Object.assign(Object.assign({},n&&{width:n}),i&&{height:i}),s=this.wrap("img",null,Object.assign({src:e,alt:t},o));return this.addRaw(s).addEOL()}addHeading(e,t){const r="h"+t,n=this.wrap(["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1",e);return this.addRaw(n).addEOL()}addSeparator(){const e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){const e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,t){const r=Object.assign({},t&&{cite:t}),n=this.wrap("blockquote",e,r);return this.addRaw(n).addEOL()}addLink(e,t){const r=this.wrap("a",e,{href:t});return this.addRaw(r).addEOL()}};e.markdownSummary=a,e.summary=a}(Fi)),Fi}function a(){return $i||($i=1,function(e){function t(e){return(1&e.mode)>0||(8&e.mode)>0&&e.gid===process.getgid()||(64&e.mode)>0&&e.uid===process.getuid()}var r,n=Vi&&Vi.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=Vi&&Vi.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=Vi&&Vi.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=Vi&&Vi.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.getCmdPath=e.tryGetExecutablePath=e.isRooted=e.isDirectory=e.exists=e.READONLY=e.UV_FS_O_EXLOCK=e.IS_WINDOWS=e.unlink=e.symlink=e.stat=e.rmdir=e.rm=e.rename=e.readlink=e.readdir=e.open=e.mkdir=e.lstat=e.copyFile=e.chmod=void 0;const a=o(Rn),c=o(In);e.chmod=(r=a.promises).chmod,e.copyFile=r.copyFile,e.lstat=r.lstat,e.mkdir=r.mkdir,e.open=r.open,e.readdir=r.readdir,e.readlink=r.readlink,e.rename=r.rename,e.rm=r.rm,e.rmdir=r.rmdir,e.stat=r.stat,e.symlink=r.symlink,e.unlink=r.unlink,e.IS_WINDOWS="win32"===process.platform,e.UV_FS_O_EXLOCK=268435456,e.READONLY=a.constants.O_RDONLY,e.exists=function(t){return s(this,void 0,void 0,(function*(){try{yield e.stat(t)}catch(r){if("ENOENT"===r.code)return!1;throw r}return!0}))},e.isDirectory=function(t,r=!1){return s(this,void 0,void 0,(function*(){return(r?yield e.stat(t):yield e.lstat(t)).isDirectory()}))},e.isRooted=function(t){if(!(t=function(t){return t=t||"",e.IS_WINDOWS?(t=t.replace(/\//g,"\\")).replace(/\\\\+/g,"\\"):t.replace(/\/\/+/g,"/")}(t)))throw Error('isRooted() parameter "p" cannot be empty');return e.IS_WINDOWS?t.startsWith("\\")||/^[A-Z]:/i.test(t):t.startsWith("/")},e.tryGetExecutablePath=function(r,n){return s(this,void 0,void 0,(function*(){let i;try{i=yield e.stat(r)}catch(s){"ENOENT"!==s.code&&console.log(`Unexpected error attempting to determine if executable file exists '${r}': ${s}`)}if(i&&i.isFile())if(e.IS_WINDOWS){const e=c.extname(r).toUpperCase();if(n.some((t=>t.toUpperCase()===e)))return r}else if(t(i))return r;const o=r;for(const a of n){r=o+a,i=void 0;try{i=yield e.stat(r)}catch(s){"ENOENT"!==s.code&&console.log(`Unexpected error attempting to determine if executable file exists '${r}': ${s}`)}if(i&&i.isFile()){if(e.IS_WINDOWS){try{const t=c.dirname(r),n=c.basename(r).toUpperCase();for(const i of yield e.readdir(t))if(n===i.toUpperCase()){r=c.join(t,i);break}}catch(s){console.log(`Unexpected error attempting to determine the actual case of the file '${r}': ${s}`)}return r}if(t(i))return r}}return""}))},e.getCmdPath=function(){var e;return null!==(e=process.env.COMSPEC)&&void 0!==e?e:"cmd.exe"}}(Vi)),Vi}function c(){function e(e){return u(this,void 0,void 0,(function*(){if(p.IS_WINDOWS&&/[*"<>|]/.test(e))throw Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield p.rm(e,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(t){throw Error("File was unable to be removed "+t)}}))}function t(e){return u(this,void 0,void 0,(function*(){l.ok(e,"a path argument must be provided"),yield p.mkdir(e,{recursive:!0})}))}function r(e){return u(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'tool' is required");const t=[];if(p.IS_WINDOWS&&process.env.PATHEXT)for(const e of process.env.PATHEXT.split(f.delimiter))e&&t.push(e);if(p.isRooted(e)){const r=yield p.tryGetExecutablePath(e,t);return r?[r]:[]}if(e.includes(f.sep))return[];const r=[];if(process.env.PATH)for(const e of process.env.PATH.split(f.delimiter))e&&r.push(e);const n=[];for(const i of r){const r=yield p.tryGetExecutablePath(f.join(i,e),t);r&&n.push(r)}return n}))}function n(e,r,o,s){return u(this,void 0,void 0,(function*(){if(o>=255)return;o++,yield t(r);const a=yield p.readdir(e);for(const t of a){const a=`${e}/${t}`,c=`${r}/${t}`;(yield p.lstat(a)).isDirectory()?yield n(a,c,o,s):yield i(a,c,s)}yield p.chmod(r,(yield p.stat(e)).mode)}))}function i(e,t,r){return u(this,void 0,void 0,(function*(){if((yield p.lstat(e)).isSymbolicLink()){try{yield p.lstat(t),yield p.unlink(t)}catch(n){"EPERM"===n.code&&(yield p.chmod(t,"0666"),yield p.unlink(t))}const r=yield p.readlink(e);yield p.symlink(r,t,p.IS_WINDOWS?"junction":null)}else(yield p.exists(t))&&!r||(yield p.copyFile(e,t))}))}if(Ai)return Hi;Ai=1;var o=Hi&&Hi.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),s=Hi&&Hi.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=Hi&&Hi.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&o(t,e,r);return s(t,e),t},u=Hi&&Hi.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.findInPath=Hi.which=Hi.mkdirP=Hi.rmRF=Hi.mv=Hi.cp=void 0;const l=Ln,f=c(In),p=c(a());return Hi.cp=function(e,t,r={}){return u(this,void 0,void 0,(function*(){const{force:o,recursive:s,copySourceDirectory:a}=function(e){return{force:null==e.force||e.force,recursive:!!e.recursive,copySourceDirectory:null==e.copySourceDirectory||!!e.copySourceDirectory}}(r),c=(yield p.exists(t))?yield p.stat(t):null;if(c&&c.isFile()&&!o)return;const u=c&&c.isDirectory()&&a?f.join(t,f.basename(e)):t;if(!(yield p.exists(e)))throw Error("no such file or directory: "+e);if((yield p.stat(e)).isDirectory()){if(!s)throw Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`);yield n(e,u,0,o)}else{if(""===f.relative(e,u))throw Error(`'${u}' and '${e}' are the same file`);yield i(e,u,o)}}))},Hi.mv=function(r,n,i={}){return u(this,void 0,void 0,(function*(){if(yield p.exists(n)){let t=!0;if((yield p.isDirectory(n))&&(n=f.join(n,f.basename(r)),t=yield p.exists(n)),t){if(null!=i.force&&!i.force)throw Error("Destination already exists");yield e(n)}}yield t(f.dirname(n)),yield p.rename(r,n)}))},Hi.rmRF=e,Hi.mkdirP=t,Hi.which=function e(t,n){return u(this,void 0,void 0,(function*(){if(!t)throw Error("parameter 'tool' is required");if(n){const r=yield e(t,!1);if(!r)throw Error(p.IS_WINDOWS?`Unable to locate executable file: ${t}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`:`Unable to locate executable file: ${t}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);return r}const i=yield r(t);return i&&i.length>0?i[0]:""}))},Hi.findInPath=r,Hi}function u(){function e(e,t,r){return i(this,void 0,void 0,(function*(){const n=s.argStringToArray(e);if(0===n.length)throw Error("Parameter 'commandLine' cannot be null or empty.");const i=n[0];return t=n.slice(1).concat(t||[]),new s.ToolRunner(i,t,r).exec()}))}if(ki)return Bi;ki=1;var t=Bi&&Bi.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=Bi&&Bi.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=Bi&&Bi.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)"default"!==i&&Object.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},i=Bi&&Bi.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.getExecOutput=Bi.exec=void 0;const o=$n,s=n(function(){if(Li)return qi;Li=1;var e=qi&&qi.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=qi&&qi.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=qi&&qi.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var i in r)"default"!==i&&Object.hasOwnProperty.call(r,i)&&e(n,r,i);return t(n,r),n},n=qi&&qi.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(qi,"__esModule",{value:!0}),qi.argStringToArray=qi.ToolRunner=void 0;const i=r(On),o=r(Nn),s=r(An),u=r(In),l=r(c()),f=r(a()),p=kn,d="win32"===process.platform;qi.ToolRunner=class extends o.EventEmitter{constructor(e,t,r){if(super(),!e)throw Error("Parameter 'toolPath' cannot be null or empty.");this.toolPath=e,this.args=t||[],this.options=r||{}}_debug(e){this.options.listeners&&this.options.listeners.debug&&this.options.listeners.debug(e)}_getCommandString(e,t){const r=this._getSpawnFileName(),n=this._getSpawnArgs(e);let i=t?"":"[command]";if(d)if(this._isCmdFile()){i+=r;for(const e of n)i+=" "+e}else if(e.windowsVerbatimArguments){i+=`"${r}"`;for(const e of n)i+=" "+e}else{i+=this._windowsQuoteCmdArg(r);for(const e of n)i+=" "+this._windowsQuoteCmdArg(e)}else{i+=r;for(const e of n)i+=" "+e}return i}_processLineBuffer(e,t,r){try{let n=t+""+e,o=n.indexOf(i.EOL);for(;o>-1;)r(n.substring(0,o)),n=n.substring(o+i.EOL.length),o=n.indexOf(i.EOL);return n}catch(n){return this._debug("error processing line. Failed with error "+n),""}}_getSpawnFileName(){return d&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(e){if(d&&this._isCmdFile()){let t='/D /S /C "'+this._windowsQuoteCmdArg(this.toolPath);for(const r of this.args)t+=" ",t+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r);return t+='"',[t]}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile())return this._uvQuoteCmdArg(e);if(!e)return'""';const t=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let r=!1;for(const o of e)if(t.some((e=>e===o))){r=!0;break}if(!r)return e;let n='"',i=!0;for(let o=e.length;o>0;o--)n+=e[o-1],i&&"\\"===e[o-1]?n+="\\":'"'===e[o-1]?(i=!0,n+='"'):i=!1;return n+='"',n.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e)return'""';if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"'))return e;if(!e.includes('"')&&!e.includes("\\"))return`"${e}"`;let t='"',r=!0;for(let n=e.length;n>0;n--)t+=e[n-1],r&&"\\"===e[n-1]?t+="\\":'"'===e[n-1]?(r=!0,t+="\\"):r=!1;return t+='"',t.split("").reverse().join("")}_cloneExecOptions(e){const t={cwd:(e=e||{}).cwd||process.cwd(),env:e.env||process.env,silent:e.silent||!1,windowsVerbatimArguments:e.windowsVerbatimArguments||!1,failOnStdErr:e.failOnStdErr||!1,ignoreReturnCode:e.ignoreReturnCode||!1,delay:e.delay||1e4};return t.outStream=e.outStream||process.stdout,t.errStream=e.errStream||process.stderr,t}_getSpawnOptions(e,t){const r={};return r.cwd=(e=e||{}).cwd,r.env=e.env,r.windowsVerbatimArguments=e.windowsVerbatimArguments||this._isCmdFile(),e.windowsVerbatimArguments&&(r.argv0=`"${t}"`),r}exec(){return n(this,void 0,void 0,(function*(){return!f.isRooted(this.toolPath)&&(this.toolPath.includes("/")||d&&this.toolPath.includes("\\"))&&(this.toolPath=u.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield l.which(this.toolPath,!0),new Promise(((e,t)=>n(this,void 0,void 0,(function*(){this._debug("exec tool: "+this.toolPath),this._debug("arguments:");for(const e of this.args)this._debug(" "+e);const r=this._cloneExecOptions(this.options);!r.silent&&r.outStream&&r.outStream.write(this._getCommandString(r)+i.EOL);const n=new h(r,this.toolPath);if(n.on("debug",(e=>{this._debug(e)})),this.options.cwd&&!(yield f.exists(this.options.cwd)))return t(Error(`The cwd: ${this.options.cwd} does not exist!`));const o=this._getSpawnFileName(),a=s.spawn(o,this._getSpawnArgs(r),this._getSpawnOptions(this.options,o));let c="";a.stdout&&a.stdout.on("data",(e=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(e),!r.silent&&r.outStream&&r.outStream.write(e),c=this._processLineBuffer(e,c,(e=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(e)}))}));let u="";if(a.stderr&&a.stderr.on("data",(e=>{n.processStderr=!0,this.options.listeners&&this.options.listeners.stderr&&this.options.listeners.stderr(e),!r.silent&&r.errStream&&r.outStream&&(r.failOnStdErr?r.errStream:r.outStream).write(e),u=this._processLineBuffer(e,u,(e=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(e)}))})),a.on("error",(e=>{n.processError=e.message,n.processExited=!0,n.processClosed=!0,n.CheckComplete()})),a.on("exit",(e=>{n.processExitCode=e,n.processExited=!0,this._debug(`Exit code ${e} received from tool '${this.toolPath}'`),n.CheckComplete()})),a.on("close",(e=>{n.processExitCode=e,n.processExited=!0,n.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),n.CheckComplete()})),n.on("done",((r,n)=>{c.length>0&&this.emit("stdline",c),u.length>0&&this.emit("errline",u),a.removeAllListeners(),r?t(r):e(n)})),this.options.input){if(!a.stdin)throw Error("child process missing stdin");a.stdin.end(this.options.input)}}))))}))}},qi.argStringToArray=function(e){function t(e){i&&'"'!==e&&(o+="\\"),o+=e,i=!1}const r=[];let n=!1,i=!1,o="";for(let s=0;e.length>s;s++){const a=e.charAt(s);'"'!==a?"\\"===a&&i?t(a):"\\"===a&&n?i=!0:" "!==a||n?t(a):o.length>0&&(r.push(o),o=""):i?t(a):n=!n}return o.length>0&&r.push(o.trim()),r};class h extends o.EventEmitter{constructor(e,t){if(super(),this.processClosed=!1,this.processError="",this.processExitCode=0,this.processExited=!1,this.processStderr=!1,this.delay=1e4,this.done=!1,this.timeout=null,!t)throw Error("toolPath must not be empty");this.options=e,this.toolPath=t,e.delay&&(this.delay=e.delay)}CheckComplete(){this.done||(this.processClosed?this._setResult():this.processExited&&(this.timeout=p.setTimeout(h.HandleTimeout,this.delay,this)))}_debug(e){this.emit("debug",e)}_setResult(){let e;this.processExited&&(this.processError?e=Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`):0===this.processExitCode||this.options.ignoreReturnCode?this.processStderr&&this.options.failOnStdErr&&(e=Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)):e=Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)),this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.done=!0,this.emit("done",e,this.processExitCode)}static HandleTimeout(e){e.done||(!e.processClosed&&e.processExited&&e._debug(`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`),e._setResult())}}return qi}());return Bi.exec=e,Bi.getExecOutput=function(t,r,n){var s,a;return i(this,void 0,void 0,(function*(){let i="",c="";const u=new o.StringDecoder("utf8"),l=new o.StringDecoder("utf8"),f=null===(s=null==n?void 0:n.listeners)||void 0===s?void 0:s.stdout,p=null===(a=null==n?void 0:n.listeners)||void 0===a?void 0:a.stderr,d=Object.assign(Object.assign({},null==n?void 0:n.listeners),{stdout:e=>{i+=u.write(e),f&&f(e)},stderr:e=>{c+=l.write(e),p&&p(e)}}),h=yield e(t,r,Object.assign(Object.assign({},n),{listeners:d}));return i+=u.end(),c+=l.end(),{exitCode:h,stdout:i,stderr:c}}))},Bi}function l(){return ji||(ji=1,function(e){function t(e,t){const r=process.env["INPUT_"+e.replace(/ /g,"_").toUpperCase()]||"";if(t&&t.required&&!r)throw Error("Input required and not supplied: "+e);return t&&!1===t.trimWhitespace?r:r.trim()}function r(e,t={}){(0,d.issueCommand)("error",(0,m.toCommandProperties)(t),e instanceof Error?""+e:e)}function i(e){(0,d.issue)("group",e)}function a(){(0,d.issue)("endgroup")}var c=ti&&ti.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),l=ti&&ti.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),f=ti&&ti.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&c(t,e,r);return l(t,e),t},p=ti&&ti.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.platform=e.toPlatformPath=e.toWin32Path=e.toPosixPath=e.markdownSummary=e.summary=e.getIDToken=e.getState=e.saveState=e.group=e.endGroup=e.startGroup=e.info=e.notice=e.warning=e.error=e.debug=e.isDebug=e.setFailed=e.setCommandEcho=e.setOutput=e.getBooleanInput=e.getMultilineInput=e.getInput=e.addPath=e.setSecret=e.exportVariable=e.ExitCode=void 0;const d=function(){function e(e,t,r){const n=new a(e,t,r);process.stdout.write(""+n+o.EOL)}if(ei)return ri;ei=1;var t=ri&&ri.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=ri&&ri.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=ri&&ri.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(ri,"__esModule",{value:!0}),ri.issue=ri.issueCommand=void 0;const o=i(On),s=n();ri.issueCommand=e,ri.issue=function(t,r=""){e(t,{},r)};class a{constructor(e,t,r){e||(e="missing.command"),this.command=e,this.properties=t,this.message=r}toString(){let e="::"+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(const n in this.properties)if(this.properties.hasOwnProperty(n)){const i=this.properties[n];i&&(r?r=!1:e+=",",e+=`${n}=${t=i,(0,s.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}`)}}var t;return e+="::"+function(e){return(0,s.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}(this.message),e}}return ri}(),h=function(){if(ai)return ii;ai=1;var e=ii&&ii.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=ii&&ii.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=ii&&ii.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var i in r)"default"!==i&&{}.hasOwnProperty.call(r,i)&&e(n,r,i);return t(n,r),n};Object.defineProperty(ii,"__esModule",{value:!0}),ii.prepareKeyValueMessage=ii.issueFileCommand=void 0;const i=r(si),o=r(Rn),s=r(On),a=n();return ii.issueFileCommand=function(e,t){const r=process.env["GITHUB_"+e];if(!r)throw Error("Unable to find environment variable for file command "+e);if(!o.existsSync(r))throw Error("Missing file at path: "+r);o.appendFileSync(r,`${(0,a.toCommandValue)(t)}${s.EOL}`,{encoding:"utf8"})},ii.prepareKeyValueMessage=function(e,t){const r="ghadelimiter_"+i.randomUUID(),n=(0,a.toCommandValue)(t);if(e.includes(r))throw Error(`Unexpected input: name should not contain the delimiter "${r}"`);if(n.includes(r))throw Error(`Unexpected input: value should not contain the delimiter "${r}"`);return`${e}<<${r}${s.EOL}${n}${s.EOL}${r}`},ii}(),m=n(),y=f(On),v=f(In),w=o();var g,E;(E=g||(e.ExitCode=g={}))[E.Success=0]="Success",E[E.Failure=1]="Failure",e.exportVariable=function(e,t){const r=(0,m.toCommandValue)(t);if(process.env[e]=r,process.env.GITHUB_ENV)return(0,h.issueFileCommand)("ENV",(0,h.prepareKeyValueMessage)(e,t));(0,d.issueCommand)("set-env",{name:e},r)},e.setSecret=function(e){(0,d.issueCommand)("add-mask",{},e)},e.addPath=function(e){process.env.GITHUB_PATH?(0,h.issueFileCommand)("PATH",e):(0,d.issueCommand)("add-path",{},e),process.env.PATH=`${e}${v.delimiter}${process.env.PATH}`},e.getInput=t,e.getMultilineInput=function(e,r){const n=t(e,r).split("\n").filter((e=>""!==e));return r&&!1===r.trimWhitespace?n:n.map((e=>e.trim()))},e.getBooleanInput=function(e,r){const n=t(e,r);if(["true","True","TRUE"].includes(n))return!0;if(["false","False","FALSE"].includes(n))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\nSupport boolean input list: \`true | True | TRUE | false | False | FALSE\``)},e.setOutput=function(e,t){if(process.env.GITHUB_OUTPUT)return(0,h.issueFileCommand)("OUTPUT",(0,h.prepareKeyValueMessage)(e,t));process.stdout.write(y.EOL),(0,d.issueCommand)("set-output",{name:e},(0,m.toCommandValue)(t))},e.setCommandEcho=function(e){(0,d.issue)("echo",e?"on":"off")},e.setFailed=function(e){process.exitCode=g.Failure,r(e)},e.isDebug=function(){return"1"===process.env.RUNNER_DEBUG},e.debug=function(e){(0,d.issueCommand)("debug",{},e)},e.error=r,e.warning=function(e,t={}){(0,d.issueCommand)("warning",(0,m.toCommandProperties)(t),e instanceof Error?""+e:e)},e.notice=function(e,t={}){(0,d.issueCommand)("notice",(0,m.toCommandProperties)(t),e instanceof Error?""+e:e)},e.info=function(e){process.stdout.write(e+y.EOL)},e.startGroup=i,e.endGroup=a,e.group=function(e,t){return p(this,void 0,void 0,(function*(){let r;i(e);try{r=yield t()}finally{a()}return r}))},e.saveState=function(e,t){if(process.env.GITHUB_STATE)return(0,h.issueFileCommand)("STATE",(0,h.prepareKeyValueMessage)(e,t));(0,d.issueCommand)("save-state",{name:e},(0,m.toCommandValue)(t))},e.getState=function(e){return process.env["STATE_"+e]||""},e.getIDToken=function(e){return p(this,void 0,void 0,(function*(){return yield w.OidcClient.getIDToken(e)}))};var _=s();Object.defineProperty(e,"summary",{enumerable:!0,get:function(){return _.summary}});var b=s();Object.defineProperty(e,"markdownSummary",{enumerable:!0,get:function(){return b.markdownSummary}});var S=function(){if(Ci)return Mi;Ci=1;var e=Mi&&Mi.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=Mi&&Mi.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Mi&&Mi.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var i in r)"default"!==i&&{}.hasOwnProperty.call(r,i)&&e(n,r,i);return t(n,r),n};Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.toPlatformPath=Mi.toWin32Path=Mi.toPosixPath=void 0;const n=r(In);return Mi.toPosixPath=function(e){return e.replace(/[\\]/g,"/")},Mi.toWin32Path=function(e){return e.replace(/[/]/g,"\\")},Mi.toPlatformPath=function(e){return e.replace(/[/\\]/g,n.sep)},Mi}();Object.defineProperty(e,"toPosixPath",{enumerable:!0,get:function(){return S.toPosixPath}}),Object.defineProperty(e,"toWin32Path",{enumerable:!0,get:function(){return S.toWin32Path}}),Object.defineProperty(e,"toPlatformPath",{enumerable:!0,get:function(){return S.toPlatformPath}}),e.platform=f((Di||(Di=1,function(e){var t=Gi&&Gi.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=Gi&&Gi.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=Gi&&Gi.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},i=Gi&&Gi.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},o=Gi&&Gi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getDetails=e.isLinux=e.isMacOS=e.isWindows=e.arch=e.platform=void 0;const s=o(On),a=n(u());e.platform=s.default.platform(),e.arch=s.default.arch(),e.isWindows="win32"===e.platform,e.isMacOS="darwin"===e.platform,e.isLinux="linux"===e.platform,e.getDetails=function(){return i(this,void 0,void 0,(function*(){return Object.assign(Object.assign({},yield i(void 0,void 0,void 0,e.isWindows?function*(){const{stdout:e}=yield a.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',void 0,{silent:!0}),{stdout:t}=yield a.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',void 0,{silent:!0});return{name:t.trim(),version:e.trim()}}:e.isMacOS?function*(){var e,t,r,n;const{stdout:i}=yield a.getExecOutput("sw_vers",void 0,{silent:!0}),o=null!==(t=null===(e=i.match(/ProductVersion:\s*(.+)/))||void 0===e?void 0:e[1])&&void 0!==t?t:"";return{name:null!==(n=null===(r=i.match(/ProductName:\s*(.+)/))||void 0===r?void 0:r[1])&&void 0!==n?n:"",version:o}}:function*(){const{stdout:e}=yield a.getExecOutput("lsb_release",["-i","-r","-s"],{silent:!0}),[t,r]=e.trim().split("\n");return{name:t,version:r}})),{platform:e.platform,arch:e.arch,isWindows:e.isWindows,isMacOS:e.isMacOS,isLinux:e.isLinux})}))}}(Gi)),Gi))}(ti)),ti}function f(e){return Wi?zi.error(e):console.log(`${e}`)}function p(e){return Wi?zi.warning(e):console.log(`${e}`)}function d(e){return Wi?zi.notice(e):console.log(`${e}`)}function h(e){return Wi?zi.info(e):console.log(e)}function m(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=In,r=e?";":":",n=function(){function e(r,n,i){if("function"==typeof n&&(i=n,n={}),!i){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(t,i){e(r,n||{},(function(e,r){e?i(e):t(r)}))}))}t(r,n||{},(function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),i(e,t)}))}return Zi||(Zi=1,t="win32"===process.platform||Wn.TESTING_WINDOWS?function(){function e(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;r.length>n;n++){var i=r[n].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}(t,r)}function t(t,n,i){r.stat(t,(function(r,o){i(r,!r&&e(o,t,n))}))}if(Yi)return Xi;Yi=1,Xi=t,t.sync=function(t,n){return e(r.statSync(t),t,n)};var r=Rn;return Xi}():function(){function e(e,n,i){r.stat(e,(function(e,r){i(e,!e&&t(r,n))}))}function t(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,i=e.gid,o=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),u=a|c;return r&parseInt("001",8)||r&c&&i===s||r&a&&n===o||r&u&&0===o}(e,t)}if(Ji)return Ki;Ji=1,Ki=e,e.sync=function(e,n){return t(r.statSync(e),n)};var r=Rn;return Ki}(),Qi=e,e.sync=function(e,r){try{return t.sync(e,r||{})}catch(n){if(r&&r.ignoreErrors||"EACCES"===n.code)return!1;throw n}}),Qi;var t}(),i=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),o=(t,n)=>{const i=n.colon||r,o=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(n.path||process.env.PATH||"").split(i)],s=e?n.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(i):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:o,pathExt:a,pathExtExe:s}},s=(e,r,s)=>{"function"==typeof r&&(s=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:u}=o(e,r),l=[],f=n=>new Promise(((o,s)=>{if(n===a.length)return r.all&&l.length?o(l):s(i(e));const c=a[n],u=/^".*"$/.test(c)?c.slice(1,-1):c,f=t.join(u,e),d=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+f:f;o(p(d,n,0))})),p=(e,t,i)=>new Promise(((o,s)=>{if(i===c.length)return o(f(t+1));const a=c[i];n(e+a,{pathExt:u},((n,s)=>{if(!n&&s){if(!r.all)return o(e+a);l.push(e+a)}return o(p(e,t,i+1))}))}));return s?f(0).then((e=>s(null,e)),s):f(0)};return eo=s,s.sync=(e,r)=>{r=r||{};const{pathEnv:s,pathExt:a,pathExtExe:c}=o(e,r),u=[];for(let i=0;s.length>i;i++){const o=s[i],f=/^".*"$/.test(o)?o.slice(1,-1):o,p=t.join(f,e),d=!f&&/^\.[\\\/]/.test(e)?e.slice(0,2)+p:p;for(let e=0;a.length>e;e++){const t=d+a[e];try{if(n.sync(t,{pathExt:c})){if(!r.all)return t;u.push(t)}}catch(l){}}}if(r.all&&u.length)return u;if(r.nothrow)return null;throw i(e)},eo}function y(){if(ho)return po;ho=1;const e=In,t=function(){function e(e,i){const o=e.options.env||process.env,s=process.cwd(),a=null!=e.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch(l){}let u;try{u=r.sync(e.command,{path:o[n({env:o})],pathExt:i?t.delimiter:void 0})}catch(f){}finally{c&&process.chdir(s)}return u&&(u=t.resolve(a?e.options.cwd:"",u)),u}if(io)return no;io=1;const t=In,r=m(),n=function(){if(ro)return go.exports;ro=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};return go.exports=e,go.exports.default=e,go.exports}();return no=function(t){return e(t)||e(t,!0)}}(),r=function(){if(oo)return Eo;oo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Eo.command=function(t){return t.replace(e,"^$1")},Eo.argument=function(t,r){return t=(t=`"${t=(t=(t=""+t).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Eo}(),n=function(){if(fo)return lo;fo=1;const e=Rn,t=function(){if(uo)return co;uo=1;const e=ao?so:(ao=1,so=/^#!(.*)/);return co=(t="")=>{const r=t.match(e);if(!r)return null;const[n,i]=r[0].replace(/#! ?/,"").split(" "),o=n.split("/").pop();return"env"===o?i:i?`${o} ${i}`:o}}();return lo=function(r){const n=Buffer.alloc(150);let i;try{i=e.openSync(r,"r"),e.readSync(i,n,0,150,0),e.closeSync(i)}catch(o){}return t(""+n)}}(),i="win32"===process.platform,o=/\.(?:com|exe)$/i,s=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;return po=function(a,c,u){c&&!Array.isArray(c)&&(u=c,c=null);const l={command:a,args:c=c?c.slice(0):[],options:u=Object.assign({},u),file:void 0,original:{command:a,args:c}};return u.shell?l:function(a){if(!i)return a;const c=function(e){e.file=t(e);const r=e.file&&n(e.file);return r?(e.args.unshift(e.file),e.command=r,t(e)):e.file}(a),u=!o.test(c);if(a.options.forceShell||u){const t=s.test(c);a.command=e.normalize(a.command),a.command=r.command(a.command),a.args=a.args.map((e=>r.argument(e,t)));const n=[a.command].concat(a.args).join(" ");a.args=["/d","/s","/c",`"${n}"`],a.command=process.env.comspec||"cmd.exe",a.options.windowsVerbatimArguments=!0}return a}(l)}}function v(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"}function w(e){return null!==e&&"object"==typeof e&&"function"==typeof e.pipe}function g(e){return w(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState}function E(e,t,r){const n=bs(e,t,r),i=ms(e,t),o=ys(e,t);let s;_s(o,n.options),(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||0>e))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(n.options);try{s=An.spawn(n.file,n.args,n.options)}catch(p){const e=new An.ChildProcess,t=Promise.reject(Uo({error:p,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return fs(e,t),e}const a=(e=>new Promise(((t,r)=>{e.on("exit",((e,r)=>{t({exitCode:e,signal:r})})),e.on("error",(e=>{r(e)})),e.stdin&&e.stdin.on("error",(e=>{r(e)}))})))(s),c=((e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let i;const o=new Promise(((n,o)=>{i=setTimeout((()=>{((e,t,r)=>{e.kill(t),r(Object.assign(Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,o)}),t)})),s=n.finally((()=>{clearTimeout(i)}));return Promise.race([o,s])})(s,n.options,a),u=(async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;const i=Ho((()=>{e.kill()}));return n.finally((()=>{i()}))})(s,n.options,c),l={isCanceled:!1};s.kill=Vo.bind(null,s.kill.bind(s)),s.cancel=Ko.bind(null,s,l);const f=To((async()=>{const[{error:e,exitCode:t,signal:r,timedOut:a},c,f,p]=await(async({stdout:t,stderr:r,all:n},{encoding:i,buffer:o,maxBuffer:s},a)=>{const c=cs(t,{encoding:i,buffer:o,maxBuffer:s}),u=cs(r,{encoding:i,buffer:o,maxBuffer:s}),l=cs(n,{encoding:i,buffer:o,maxBuffer:2*s});try{return await Promise.all([a,c,u,l])}catch(e){return Promise.all([{error:e,signal:e.signal,timedOut:e.timedOut},as(t,c),as(r,u),as(n,l)])}})(s,n.options,u),d=Ss(n.options,c),h=Ss(n.options,f),m=Ss(n.options,p);if(e||0!==t||null!==r){const c=Uo({error:e,exitCode:t,signal:r,stdout:d,stderr:h,all:m,command:i,escapedCommand:o,parsed:n,timedOut:a,isCanceled:l.isCanceled||!!n.options.signal&&n.options.signal.aborted,killed:s.killed});if(!n.options.reject)return c;throw c}return{command:i,escapedCommand:o,exitCode:0,stdout:d,stderr:h,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return((e,t)=>{const r=(({input:e,inputFile:t})=>"string"!=typeof t?e:(ss(e),Rn.createReadStream(t)))(t);void 0!==r&&(w(r)?r.pipe(e.stdin):e.stdin.end(r))})(s,n.options),s.all=((e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const r=os();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r})(s,n.options),(e=>{null!==e.stdout&&(e.pipeStdout=Jo.bind(void 0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=Jo.bind(void 0,e,"stderr")),void 0!==e.all&&(e.pipeAll=Jo.bind(void 0,e,"all"))})(s),fs(s,f),s}function _(e,t,r){const n=bs(e,t,r),i=ms(e,t),o=ys(e,t);_s(o,n.options);const s=(e=>{const t=(({input:e,inputFile:t})=>"string"!=typeof t?e:(ss(e),Rn.readFileSync(t)))(e);if(w(t))throw new TypeError("The `input` option cannot be a stream in sync mode");return t})(n.options);let a;try{a=An.spawnSync(n.file,n.args,{...n.options,input:s})}catch(l){throw Uo({error:l,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:n,timedOut:!1,isCanceled:!1,killed:!1})}const c=Ss(n.options,a.stdout,a.error),u=Ss(n.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=Uo({stdout:c,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:o,parsed:n,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!n.options.reject)return e;throw e}return{command:i,escapedCommand:o,exitCode:0,stdout:c,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}function b(){return ra||(ra=1,function(e){var t=Os&&Os.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=Os&&Os.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=Os&&Os.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},i=Os&&Os.__exportStar||function(e,r){for(var n in e)"default"===n||{}.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=e.posix=e.win32=void 0;const o=n(function(){if(Zs)return Rs;Zs=1,Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.sync=Rs.isexe=void 0;const e=Rn,t=Qs;Rs.isexe=async(e,n={})=>{const{ignoreErrors:i=!1}=n;try{return r(await(0,t.stat)(e),n)}catch(o){if(i||"EACCES"===o.code)return!1;throw o}},Rs.sync=(t,n={})=>{const{ignoreErrors:i=!1}=n;try{return r((0,e.statSync)(t),n)}catch(o){if(i||"EACCES"===o.code)return!1;throw o}};const r=(e,t)=>e.isFile()&&n(e,t),n=(e,t)=>{var r,n,i,o,s,a,c,u;const l=null!=(n=t.uid)?n:null==(r=process.getuid)?void 0:r.call(process),f=null!=(s=null!=(o=t.groups)?o:null==(i=process.getgroups)?void 0:i.call(process))?s:[],p=null!=(u=null!=(c=t.gid)?c:null==(a=process.getgid)?void 0:a.call(process))?u:f[0];if(void 0===l||void 0===p)throw Error("cannot get uid or gid");const d=new Set([p,...f]),h=e.mode,m=e.uid,y=e.gid,v=parseInt("100",8),w=parseInt("010",8),g=v|w;return!!(h&parseInt("001",8)||h&w&&d.has(y)||h&v&&m===l||h&g&&0===l)};return Rs}());e.posix=o;const s=n(function(){if(ea)return oa;ea=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.sync=oa.isexe=void 0;const e=Rn,t=Qs;oa.isexe=async(e,n={})=>{const{ignoreErrors:i=!1}=n;try{return r(await(0,t.stat)(e),e,n)}catch(o){if(i||"EACCES"===o.code)return!1;throw o}},oa.sync=(t,n={})=>{const{ignoreErrors:i=!1}=n;try{return r((0,e.statSync)(t),t,n)}catch(o){if(i||"EACCES"===o.code)return!1;throw o}};const r=(e,t,r)=>e.isFile()&&((e,t)=>{const{pathExt:r=process.env.PATHEXT||""}=t,n=r.split(";");if(-1!==n.indexOf(""))return!0;for(let i=0;n.length>i;i++){const t=n[i].toLowerCase(),r=e.substring(e.length-t.length).toLowerCase();if(t&&r===t)return!0}return!1})(t,r);return oa}());e.win32=s,i((ta||(ta=1,Object.defineProperty(sa,"__esModule",{value:!0})),sa),e);const a="win32"===(process.env._ISEXE_TEST_PLATFORM_||process.platform)?s:o;e.isexe=a.isexe,e.sync=a.sync}(Os)),Os}function S(e,t=["-NoProfile","-NoLogo","-NonInteractive"],r={stdio:"inherit"}){return E(function(){if(void 0===ca){const e=aa.sync("pwsh",{nothrow:!0});null!==e&&(ca=e);const t=aa.sync("powershell",{nothrow:!0});null!==t&&(ca=t)}if(void 0===ca)throw Error("Could not find powershell");return ca}(),[...t,"-c",e],r)}function O(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function R(){return null!==aa.sync("sudo",{nothrow:!0})}function I(){var e;return 0===(null==(e=process.getuid)?void 0:e.call(process))||!!process.env.CI}function x(){return I()&&R()}function P(e){return x()?"sudo "+e:e}function T(e,t=[],r=fa){return x()?function(e,t){const[r,...n]=ws(e);return _(r,n,t)}(C(e,t),r):_(e,$(t),r)}function N(e,t=[],r=fa){return x()?function(e,t){const[r,...n]=ws(e);return E(r,n,t)}(C(e,t),r):E(e,$(t),r)}function C(e,t){return"sudo "+$([e,...t]).join(" ")}function $(e){return e.map((e=>`'${e}'`))}function A(){return"win32"===process.platform?pa():I()}async function L(e){if(("linux"===process.platform||"darwin"===process.platform)&&x()&&void 0!==process.env.SUDO_USER){let t=Rn.statSync(e).isDirectory();await N("chown",[...t?["-R"]:[],process.env.SUDO_USER,e],fa)}}function k(){if(va)return ya;va=1;var e=(ma?ha:(ma=1,ha=function(){}))();return ya=function(t){return t!==e&&null!==t}}function D(){if(ga)return wa;ga=1;var e=k(),t=[].forEach,r=Object.create;return wa=function(n){var i=r(null);return t.call(arguments,(function(t){e(t)&&function(e,t){var r;for(r in e)t[r]=e[r]}(Object(t),i)})),i},wa}function j(){if(Ta)return Pa;Ta=1;var e=function(){if(xa)return Ia;xa=1;var e=Ra?Oa:(Ra=1,Oa=(_a?Ea:(_a=1,Ea=function(){var e=Math.sign;return"function"==typeof e&&1===e(10)&&-1===e(-20)}))()?Math.sign:Sa?ba:(Sa=1,ba=function(e){return isNaN(e=Number(e))||0===e?e:e>0?1:-1})),t=Math.abs,r=Math.floor;return Ia=function(n){return isNaN(n)?0:0!==(n=Number(n))&&isFinite(n)?e(n)*r(t(n)):n}}(),t=Math.max;return Pa=function(r){return t(0,e(r))}}function U(){if(Ca)return Na;Ca=1;var e=j();return Na=function(t,r,n){var i;return isNaN(t)?0>(i=r)?1:n&&i?i-1:i:!1!==t&&e(t)}}function F(){return Aa?$a:(Aa=1,$a=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e})}function M(){if(ka)return La;ka=1;var e=k();return La=function(t){if(!e(t))throw new TypeError("Cannot use null or undefined");return t}}function G(){return Fa||(Fa=1,Ua=function(){if(ja)return Da;ja=1;var e=F(),t=M(),r=function(){}.bind,n=function(){}.call,i=Object.keys,o={}.propertyIsEnumerable;return Da=function(s,a){return function(c,u){var l,f=arguments[2],p=arguments[3];return c=Object(t(c)),e(u),l=i(c),p&&l.sort("function"==typeof p?r.call(p,c):void 0),"function"!=typeof s&&(s=l[s]),n.call(s,l,(function(e,t){return o.call(c,e)?n.call(u,f,c[e],e,c,t):a}))}},Da}()("forEach")),Ua}function B(){return Ma||(Ma=1),cl}function q(){return Qa||(Qa=1,Ja=(Ba?Ga:(Ba=1,Ga=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}))()?Object.assign:function(){if(Ka)return Ya;Ka=1;var e=Xa?Wa:(Xa=1,Wa=(Ha?qa:(Ha=1,qa=function(){try{return!0}catch(e){return!1}}))()?Object.keys:function(){if(za)return Va;za=1;var e=k(),t=Object.keys;return Va=function(r){return t(e(r)?Object(r):r)}}()),t=M(),r=Math.max;return Ya=function(n,i){var o,s,a,c=r(arguments.length,2);for(n=Object(t(n)),a=function(e){try{n[e]=i[e]}catch(t){o||(o=t)}},s=1;c>s;++s)e(i=arguments[s]).forEach(a);if(void 0!==o)throw o;return n},Ya}()),Ja}function H(){if(nc)return rc;nc=1;var e=M(),t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols;return rc=function(o,s){var a,c=Object(e(s));if(o=Object(e(o)),n(c).forEach((function(e){try{t(o,e,r(s,e))}catch(n){a=n}})),"function"==typeof i&&i(c).forEach((function(e){try{t(o,e,r(s,e))}catch(n){a=n}})),void 0!==a)throw a;return o}}function V(){if(ic)return ll.exports;ic=1;var e,t,r=j();try{Object.defineProperty((function(e,t){return t}),"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(n){}return t=H(),e=function(){var e=[];return function(t){var r,n=0;if(e[t])return e[t];for(r=[];t--;)r.push("a"+(++n).toString(36));return Function("fn","return function ("+r.join(", ")+") { return fn.apply(this, arguments); };")}}(),ll.exports=function(i,o){var s;if(o=r(o),i.length===o)return i;s=e(o)(i);try{t(s,i)}catch(n){}return s},ll.exports}function z(){return sc?oc:(sc=1,oc=function(e){return null!=e})}function W(){if(hc)return dc;hc=1;var e=function(){if(pc)return fc;pc=1;var e=function(){if(lc)return uc;lc=1;var e=function(){if(cc)return ac;cc=1;var e=z(),t={object:!0,function:!0,undefined:!0};return ac=function(r){return!!e(r)&&hasOwnProperty.call(t,typeof r)}}();return uc=function(t){if(!e(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(r){return!1}}}();return fc=function(t){if("function"!=typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length)return!1;if("function"!=typeof t.call)return!1;if("function"!=typeof t.apply)return!1}catch(r){return!1}return!e(t)}}(),t=/^\s*class[\s{/}]/,r=function(){}.toString;return dc=function(n){return!!e(n)&&!t.test(r.call(n))}}function X(){if(_c)return fl.exports;_c=1;var e=z(),t=W(),r=q(),n=D(),i=(Ec||(Ec=1,gc=function(){if(yc)return mc;yc=1;var e="razdwatrzy";return mc=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}}()()?"".contains:function(){if(wc)return vc;wc=1;var e="".indexOf;return vc=function(t){return e.call(this,t,arguments[1])>-1},vc}()),gc),o=fl.exports=function(t,o){var s,a,c,u,l;return 2>arguments.length||"string"!=typeof t?(u=o,o=t,t=null):u=arguments[2],e(t)?(s=i.call(t,"c"),a=i.call(t,"e"),c=i.call(t,"w")):(s=c=!0,a=!1),l={value:o,configurable:s,enumerable:a,writable:c},u?r(n(u),l):l};return o.gs=function(o,s,a){var c,u,l,f;return"string"!=typeof o?(l=a,a=s,s=o,o=null):l=arguments[3],e(s)?t(s)?e(a)?t(a)||(l=a,a=void 0):a=void 0:(l=s,s=a=void 0):s=void 0,e(o)?(c=i.call(o,"c"),u=i.call(o,"e")):(c=!0,u=!1),f={get:s,set:a,configurable:c,enumerable:u},l?r(n(l),f):f},fl.exports}function Y(){return Nc?Tc:(Nc=1,Tc=(Ic?Rc:(Ic=1,Rc=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}))()?globalThis:function(){if(Pc)return xc;Pc=1;var e=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw Error("Unable to resolve global `this`")};return xc=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(t){return e()}try{return __global__||e()}finally{delete Object.prototype.__global__}}()}())}function K(){if(Dc)return kc;Dc=1;var e=Lc?Ac:(Lc=1,Ac=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])});return kc=function(t){if(!e(t))throw new TypeError(t+" is not a symbol");return t}}function J(){return zc?Vc:(zc=1,Vc=function(){if($c)return Cc;$c=1;var e=Y(),t={object:!0,symbol:!0};return Cc=function(){var r=e.Symbol;return"function"==typeof r&&(r("test symbol"),!!t[typeof r.iterator]&&!!t[typeof r.toPrimitive]&&!!t[typeof r.toStringTag])}}()()?Y().Symbol:function(){if(Hc)return qc;Hc=1;var e,t,r,n=X(),i=K(),o=Y().Symbol,s=function(){if(Uc)return jc;Uc=1;var e=X(),t=Object.defineProperty,r=Object.prototype,n=(0,Object.create)(null);return jc=function(i){for(var o,s,a=0;n[i+(a||"")];)++a;return n[i+=a||""]=!0,t(r,o="@@"+i,e.gs(null,(function(r){s||(s=!0,t(this,o,e(r)),s=!1)}))),o}}(),a=function(){if(Mc)return Fc;Mc=1;var e=X(),t=Y().Symbol;return Fc=function(r){return Object.defineProperties(r,{hasInstance:e("",t&&t.hasInstance||r("hasInstance")),isConcatSpreadable:e("",t&&t.isConcatSpreadable||r("isConcatSpreadable")),iterator:e("",t&&t.iterator||r("iterator")),match:e("",t&&t.match||r("match")),replace:e("",t&&t.replace||r("replace")),search:e("",t&&t.search||r("search")),species:e("",t&&t.species||r("species")),split:e("",t&&t.split||r("split")),toPrimitive:e("",t&&t.toPrimitive||r("toPrimitive")),toStringTag:e("",t&&t.toStringTag||r("toStringTag")),unscopables:e("",t&&t.unscopables||r("unscopables"))})}}(),c=function(){if(Bc)return Gc;Bc=1;var e=X(),t=K(),r=Object.create(null);return Gc=function(n){return Object.defineProperties(n,{for:e((function(e){return r[e]?r[e]:r[e]=n(e+"")})),keyFor:e((function(e){var n;for(n in t(e),r)if(r[n]===e)return n}))})}}(),u=Object.create,l=Object.defineProperties,f=Object.defineProperty;if("function"==typeof o)try{o(),r=!0}catch(p){}else o=null;return t=function(r){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return e(r)},qc=e=function e(i){var a;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return r?o(i):(a=u(t.prototype),l(a,{__description__:n("",i=void 0===i?"":i+""),__name__:n("",s(i))}))},a(e),c(e),l(t.prototype,{constructor:n(e),toString:n("",(function(){return this.__name__}))}),l(e.prototype,{toString:n((function(){return"Symbol ("+i(this).__description__+")"})),valueOf:n((function(){return i(this)}))}),f(e.prototype,e.toPrimitive,n("",(function(){var e=i(this);return"symbol"==typeof e?e:""+e}))),f(e.prototype,e.toStringTag,n("c","Symbol")),f(t.prototype,e.toStringTag,n("c",e.prototype[e.toStringTag])),f(t.prototype,e.toPrimitive,n("c",e.prototype[e.toPrimitive])),qc}())}function Q(){return ru?tu:(ru=1,tu=(Oc?Sc:(Oc=1,Sc=function(){var e,t,r=Array.from;return"function"==typeof r&&!(!(t=r(e=["raz","dwa"]))||t===e||"dwa"!==t[1])}))()?Array.from:function(){if(eu)return Zc;eu=1;var e=J().iterator,t=function(){if(Xc)return Wc;Xc=1;var e={}.toString,t=e.call(function(){return arguments}());return Wc=function(r){return e.call(r)===t}}(),r=function(){if(Kc)return Yc;Kc=1;var e={}.toString,t=/t/.test.bind(/^[object [A-Za-z0-9]*Function]$/);return Yc=function(r){return"function"==typeof r&&t(e.call(r))}}(),n=j(),i=F(),o=M(),s=k(),a=function(){if(Qc)return Jc;Qc=1;var e={}.toString,t=e.call("");return Jc=function(r){return"string"==typeof r||r&&"object"==typeof r&&(r instanceof String||e.call(r)===t)||!1}}(),c=Array.isArray,u=function(){}.call,l={configurable:!0,enumerable:!0,writable:!0,value:null},f=Object.defineProperty;return Zc=function(p){var d,h,m,y,v,w,g,E,_,b,S=arguments[1],O=arguments[2];if(p=Object(o(p)),s(S)&&i(S),this&&this!==Array&&r(this))d=this;else{if(!S){if(t(p))return 1!==(v=p.length)?Array.apply(null,p):((y=[,])[0]=p[0],y);if(c(p)){for(y=Array(v=p.length),h=0;v>h;++h)y[h]=p[h];return y}}y=[]}if(!c(p))if(void 0!==(_=p[e])){for(g=i(_).call(p),d&&(y=new d),E=g.next(),h=0;!E.done;)b=S?u.call(S,O,E.value,h):E.value,d?(l.value=b,f(y,h,l)):y[h]=b,E=g.next(),++h;v=h}else if(a(p)){for(v=p.length,d&&(y=new d),h=0,m=0;v>h;++h)b=p[h],v>h+1&&(55296>(w=b.charCodeAt(0))||w>56319||(b+=p[++h])),b=S?u.call(S,O,b,m):b,d?(l.value=b,f(y,m,l)):y[m]=b,++m;v=m}if(void 0===v)for(v=n(p.length),d&&(y=new d(v)),h=0;v>h;++h)b=S?u.call(S,O,p[h],h):p[h],d?(l.value=b,f(y,h,l)):y[h]=b;return d&&(l.value=null,y.length=v),y},Zc}())}function Z(){if(lu)return uu;lu=1;var e,t,r,n,i,o=(tc||(tc=1,e=ul,t=q(),r=function(){if(ec)return Za;ec=1;var e=k(),t={function:!0,object:!0};return Za=function(r){return e(r)&&t[typeof r]||!1}}(),n=k(),i=Error.captureStackTrace,e.exports=function(o){var s=Error(o),a=arguments[1],c=arguments[2];return n(c)||r(a)&&(c=a,a=null),n(c)&&t(s,c),n(a)&&(s.code=a),i&&i(s,e.exports),s}),ul.exports),s=V(),a=X(),c=function(){return bc||(bc=1,e=pl,pl.exports,u=X(),l=F(),f=function(){}.apply,p=function(){}.call,d=Object.create,h=Object.defineProperty,m=Object.defineProperties,y={}.hasOwnProperty,v={configurable:!0,enumerable:!1,writable:!0},n=function(e,t){var n,o;return l(t),o=this,r.call(this,e,n=function(){i.call(o,e,n),f.call(t,this,arguments)}),n.__eeOnceListener__=t,this},o=function(e){var t,r,n,i,o;if(y.call(this,"__ee__")&&(i=this.__ee__[e]))if("object"==typeof i){for(o=Array((r=arguments.length)-1),t=1;r>t;++t)o[t-1]=arguments[t];for(i=i.slice(),t=0;n=i[t];++t)f.call(n,this,o)}else switch(arguments.length){case 1:p.call(i,this);break;case 2:p.call(i,this,arguments[1]);break;case 3:p.call(i,this,arguments[1],arguments[2]);break;default:for(o=Array((r=arguments.length)-1),t=1;r>t;++t)o[t-1]=arguments[t];f.call(i,this,o)}},s={on:r=function(e,t){var r;return l(t),y.call(this,"__ee__")?r=this.__ee__:(r=v.value=d(null),h(this,"__ee__",v),v.value=null),r[e]?"object"==typeof r[e]?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},once:n,off:i=function(e,t){var r,n,i,o;if(l(t),!y.call(this,"__ee__"))return this;if(!(r=this.__ee__)[e])return this;if("object"==typeof(n=r[e]))for(o=0;i=n[o];++o)i!==t&&i.__eeOnceListener__!==t||(2===n.length?r[e]=n[o?0:1]:n.splice(o,1));else n!==t&&n.__eeOnceListener__!==t||delete r[e];return this},emit:o},a={on:u(r),once:u(n),off:u(i),emit:u(o)},c=m({},a),e.exports=t=function(e){return null==e?d(c):m(Object(e),a)},t.methods=s),pl.exports;var e,t,r,n,i,o,s,a,c,u,l,f,p,d,h,m,y,v}().methods,u=function(){if(su)return ou;su=1;var e,t=function(){if(iu)return nu;iu=1;var e=Q(),t=Array.isArray;return nu=function(r){return t(r)?r:e(r)}}(),r=k(),n=F(),i=[].slice;return e=function(e){return this.map((function(t,r){return t?t(e[r]):e[r]})).concat(i.call(e,this.length))},ou=function(i){return(i=t(i)).forEach((function(e){r(e)&&n(e)})),e.bind(i)}}(),l=function(){if(cu)return au;cu=1;var e=F();return au=function(t){var r;return"function"==typeof t?{set:t,get:t}:(r={get:e(t.get)},void 0!==t.set?(r.set=e(t.set),t.delete&&(r.delete=e(t.delete)),t.clear&&(r.clear=e(t.clear)),r):(r.set=r.get,r))}}(),f=function(){}.apply,p=function(){}.call,d=Object.create,h=Object.defineProperties,m=c.on,y=c.emit;return uu=function(e,t,r){var n,i,c,v,w,g,E,_,b,S,O,R,I,x,P,T=d(null);return i=!1!==t?t:isNaN(e.length)?1:e.length,r.normalizer&&(S=l(r.normalizer),c=S.get,v=S.set,w=S.delete,g=S.clear),null!=r.resolvers&&(P=u(r.resolvers)),x=c?s((function(t){var r,i,s=arguments;if(P&&(s=P(s)),null!==(r=c(s))&&hasOwnProperty.call(T,r))return O&&n.emit("get",r,s,this),T[r];if(i=1===s.length?p.call(e,this,s[0]):f.call(e,this,s),null===r){if(null!==(r=c(s)))throw o("Circular invocation","CIRCULAR_INVOCATION");r=v(s)}else if(hasOwnProperty.call(T,r))throw o("Circular invocation","CIRCULAR_INVOCATION");return T[r]=i,R&&n.emit("set",r,null,i),i}),i):0===t?function(){var t;if(hasOwnProperty.call(T,"data"))return O&&n.emit("get","data",arguments,this),T.data;if(t=arguments.length?f.call(e,this,arguments):p.call(e,this),hasOwnProperty.call(T,"data"))throw o("Circular invocation","CIRCULAR_INVOCATION");return T.data=t,R&&n.emit("set","data",null,t),t}:function(t){var r,i,s=arguments;if(P&&(s=P(arguments)),i=s[0]+"",hasOwnProperty.call(T,i))return O&&n.emit("get",i,s,this),T[i];if(r=1===s.length?p.call(e,this,s[0]):f.call(e,this,s),hasOwnProperty.call(T,i))throw o("Circular invocation","CIRCULAR_INVOCATION");return T[i]=r,R&&n.emit("set",i,null,r),r},n={original:e,memoized:x,profileName:r.profileName,get:function(e){return P&&(e=P(e)),c?c(e):e[0]+""},has:function(e){return hasOwnProperty.call(T,e)},delete:function(e){var t;hasOwnProperty.call(T,e)&&(w&&w(e),t=T[e],delete T[e],I&&n.emit("delete",e,t))},clear:function(){var e=T;g&&g(),T=d(null),n.emit("clear",e)},on:function(e,t){return"get"===e?O=!0:"set"===e?R=!0:"delete"===e&&(I=!0),m.call(this,e,t)},emit:y,updateEnv:function(){e=n.original}},E=c?s((function(e){var t,r=arguments;P&&(r=P(r)),null!==(t=c(r))&&n.delete(t)}),i):0===t?function(){return n.delete("data")}:function(e){return P&&(e=P(arguments)[0]),n.delete(e)},_=s((function(){var e,r=arguments;return 0===t?T.data:(P&&(r=P(r)),e=c?c(r):r[0]+"",T[e])})),b=s((function(){var e,r=arguments;return 0===t?n.has("data"):(P&&(r=P(r)),null!==(e=c?c(r):r[0]+"")&&n.has(e))})),h(x,{__memoized__:a(!0),delete:a(E),clear:a(n.clear),_get:a(_),_has:a(b)}),n},uu}function ee(){if(Ou)return Su;Ou=1;var e=bu?_u:(bu=1,_u=(wu?vu:(wu=1,vu=function(){var e=Number.isNaN;return"function"==typeof e&&!e({})&&e(NaN)&&!e(34)}))()?Number.isNaN:Eu?gu:(Eu=1,gu=function(e){return e!=e})),t=j(),r=M(),n=[].indexOf,i={}.hasOwnProperty,o=Math.abs,s=Math.floor;return Su=function(a){var c,u,l;if(!e(a))return n.apply(this,arguments);for(u=t(r(this).length),c=l=isNaN(l=arguments[1])?0:0>l?t(this.length)-s(o(l)):s(l);u>c;++c)if(i.call(this,c)&&e(this[c]))return c;return-1},Su}function te(){if($u)return Cu;$u=1;var e=F(),t=G(),r=function(){}.call;return Cu=function(n,i){var o={},s=arguments[2];return e(i),t(n,(function(e,t,n,a){o[t]=r.call(i,s,e,t,n,a)})),o},Cu}function re(){if(Lu)return Au;Lu=1;var e=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},t=function(t){var r,n,i=document.createTextNode(""),o=0;return new t((function(){var e;if(r)n&&(r=n.concat(r));else{if(!n)return;r=n}if(n=r,r=null,"function"==typeof n)return e=n,n=null,void e();for(i.data=o=++o%2;n;)e=n.shift(),n.length||(n=null),e()})).observe(i,{characterData:!0}),function(t){e(t),r?"function"==typeof r?r=[r,t]:r.push(t):(r=t,i.data=o=++o%2)}};return Au=function(){if("object"==typeof process&&process&&"function"==typeof process.nextTick)return process.nextTick;if("function"==typeof queueMicrotask)return function(t){queueMicrotask(e(t))};if("object"==typeof document&&document){if("function"==typeof MutationObserver)return t(MutationObserver);if("function"==typeof WebKitMutationObserver)return t(WebKitMutationObserver)}return"function"==typeof setImmediate?function(t){setImmediate(e(t))}:"function"==typeof setTimeout||"object"==typeof setTimeout?function(t){setTimeout(e(t),0)}:null}()}function ne(){return Fu?Uu:(Fu=1,Uu=function(e){return"function"==typeof e})}function ie(){function e(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}return Xu||(Xu=1,ml.exports=e,ml.exports.default=e),ml.exports}function oe(){if(Yu)return hl;Yu=1;var e=te(),t=function(){if(ju)return Du;ju=1;var e=[].forEach,t=Object.create;return Du=function(r){var n=t(null);return e.call(arguments,(function(e){n[e]=!0})),n},Du}(),r=function(){if(qu)return Bu;qu=1;var e=M(),t=function(){if(Gu)return Mu;Gu=1;var e=ne();return Mu=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){throw new TypeError("Passed argument cannot be stringifed")}}}();return Bu=function(r){return t(e(r))}}(),n=function(){if(Wu)return zu;Wu=1;var e=function(){if(Vu)return Hu;Vu=1;var e=ne();return Hu=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){return"<Non-coercible to string value>"}}}();return zu=function(t){var r=e(t);return r.length>100&&(r=r.slice(0,99)+"…"),r.replace(/[\n\r\u2028\u2029]/g,(function(e){return JSON.stringify(e).slice(1,-1)}))}}(),i=ie(),o=re(),s=Object.create,a=t("then","then:finally","done","done:finally");return B().promise=function(t,c){var u=s(null),l=s(null),f=s(null);if(!0===t)t=null;else if(t=r(t),!a[t])throw new TypeError("'"+n(t)+"' is not valid promise mode");c.on("set",(function(e,r,n){var s=!1;if(!i(n))return l[e]=n,void c.emit("setasync",e,1);u[e]=1,f[e]=n;var a=function(t){var r=u[e];if(s)throw Error("Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode)\nConsider to rely on 'then' or 'done' mode instead.");r&&(delete u[e],l[e]=t,c.emit("setasync",e,r))},p=function(){s=!0,u[e]&&(delete u[e],delete f[e],c.delete(e))},d=t;if(d||(d="then"),"then"===d){var h=function(){o(p)};"function"==typeof(n=n.then((function(e){o(a.bind(this,e))}),h)).finally&&n.finally(h)}else if("done"===d){if("function"!=typeof n.done)throw Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");n.done(a,p)}else if("done:finally"===d){if("function"!=typeof n.done)throw Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if("function"!=typeof n.finally)throw Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");n.done(a),n.finally(p)}})),c.on("get",(function(e,t,r){var n;if(u[e])++u[e];else{var s=function(){c.emit("getasync",e,t,r)};i(n=f[e])?"function"==typeof n.done?n.done(s):n.then((function(){o(s)})):s()}})),c.on("delete",(function(e){if(delete f[e],u[e])delete u[e];else if(hasOwnProperty.call(l,e)){var t=l[e];delete l[e],c.emit("deleteasync",e,[t])}})),c.on("clear",(function(){var t=l;l=s(null),u=s(null),f=s(null),c.emit("clearasync",e(t,(function(e){return[e]})))}))},hl}async function se(e){try{return await Rn.promises.access(e),!0}catch{return!1}}function ae(e){const t=function(){if(x()&&"string"==typeof process.env.SUDO_USER&&""!==process.env.SUDO_USER)return"darwin"===process.platform?In.join("/Users/",process.env.SUDO_USER):In.join("/home/",process.env.SUDO_USER);{const e=On.homedir();if(""===e)return;return e}}();return void 0===t?e:e.replace(_l,t)}async function ce(e){const t=void 0===e.guard?"\n# Automatically Generated by envosman\n":`\n# Automatically Generated by envosman ${e.guard}\nexport SOURCE_${e.guard.toUpperCase()}RC=0\n`;await se(e.rcPath)&&((await Sl(e.rcPath,"utf8")).includes(t)||(await bl(e.rcPath,`\n${t}\n`),h(`Added ${t} to ${e.rcPath}`)))}async function ue(e,t){await se(t)&&((await Sl(t,"utf-8")).includes(e)||(await bl(t,e),h(`${e} was added to ${t}`)))}async function le(e,t,r={}){const n={escapeSpace:!1,overwrite:!0,rcPath:Rl,...r},i=function(e,t=!1){const r=t?Tl(e):e;return Dl(r,'"',"\\")}(null!=t?t:"",n.escapeSpace);try{if(jl)try{if(!n.overwrite&&void 0!==process.env[e])return void h(`Environment variable ${e} is already defined. Skipping.`);zi.exportVariable(e,i)}catch(o){f(o),await fe(e,i,n)}else await fe(e,i,n)}catch(o){f(`${o}\nFailed to export environment variable ${e}=${i}. You should add it manually.`)}}async function fe(e,t,r){const n=null!=t?t:"";switch(process.platform){case"win32":return r.overwrite||void 0===process.env[e]?(await S(`[Environment]::SetEnvironmentVariable('${e}', '${n}', "User")`),void h(`${e}='${n}' was set in the environment.`)):void h(`Environment variable ${e} is already defined. Skipping.`);case"linux":case"darwin":return await Il(r),void(r.overwrite?(await Ul(r.rcPath,`\nexport ${e}="${n}"\n`),h(`${e}="${n}" was added to "${r.rcPath}`)):(await Ul(r.rcPath,`\nif [ -z "\${${e}}" ]; then export ${e}="${n}"; fi\n`),h(`if not defined ${e} then ${e}="${n}" was added to "${r.rcPath}`)))}process.env[e]=n}async function pe(e,t={}){const r={rcPath:Rl,...t};if(!function(e){var t,r;return!!Gl.some((t=>t.test(e)))&&(null!=(r=null==(t=process.env.PATH)?void 0:t.split(In.delimiter))?r:[]).includes(e)}(e)){process.env.PATH=`${e}${In.delimiter}${process.env.PATH}`;try{if(Fl)try{zi.addPath(e)}catch(n){f(n),await de(e,r)}else await de(e,r)}catch(n){f(`${n}\nFailed to add ${e} to the percistent PATH. You should add it manually.`)}}}async function de(e,t){switch(process.platform){case"win32":return await S(`$USER_PATH=([Environment]::GetEnvironmentVariable("PATH", "User")); [Environment]::SetEnvironmentVariable("PATH", "${e};$USER_PATH", "User")`),void h(`"${e}" was added to the PATH.`);case"linux":case"darwin":return await Il(t),await Ml(t.rcPath,`\nexport PATH="${e}:$PATH"\n`),void h(`"${e}" was added to "${t.rcPath}"`);default:return}}function he(e){throw Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}function me(){return Bl||(Bl=1,e=Vl,function(){function t(e,t,i){if(r(e),"object"!=typeof i)throw Error("List of variants should be specified as an object");var o=n[e](t);return void 0!==i[o]?i[o]:null}function r(e){(function(e){return void 0!==n[e]})(e)||function(e){try{he(__dirname+"/../locales/"+e+".js")}catch(t){throw Error("Failed to load the following locale: "+e)}}(e)}var n={};e.exports={create:function(e){return r(e),{pluralize:function(r,n){return t(e,r,n)}}},addLocale:function(e,t){n[e]=t},pluralize:t}}()),Vl.exports;var e}function ye(){return Hl?ql:(Hl=1,ql=me())}function ve(){return cf?af:(cf=1,af={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2})}function we(){if(lf)return uf;lf=1;const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return uf=e}function ge(){return ff||(ff=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=ve(),o=we(),s=(t=e.exports={}).re=[],a=t.safeRe=[],c=t.src=[],u=t.safeSrc=[],l=t.t={};let f=0;const p="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",i],[p,n]],h=(e,t,r)=>{const n=(e=>{for(const[t,r]of d)e=e.split(t+"*").join(`${t}{0,${r}}`).split(t+"+").join(`${t}{1,${r}}`);return e})(t),i=f++;o(e,i,t),l[e]=i,c[i]=t,u[i]=n,s[i]=RegExp(t,r?"g":void 0),a[i]=RegExp(n,r?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),h("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",p+"+"),h("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),h("FULL",`^${c[l.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),h("LOOSE",`^${c[l.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",c[l.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),h("XRANGEIDENTIFIER",c[l.NUMERICIDENTIFIER]+"|x|X|\\*"),h("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),h("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),h("COERCE",c[l.COERCEPLAIN]+"(?:$|[^\\d])"),h("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",c[l.COERCE],!0),h("COERCERTLFULL",c[l.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Hp,Hp.exports)),Hp.exports}function Ee(){if(df)return pf;df=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return pf=r=>r?"object"!=typeof r?e:r:t}function _e(){if(mf)return hf;mf=1;const e=/^[0-9]+$/,t=(t,r)=>{const n=e.test(t),i=e.test(r);return n&&i&&(t=+t,r=+r),t===r?0:n&&!i?-1:i&&!n?1:r>t?-1:1};return hf={compareIdentifiers:t,rcompareIdentifiers:(e,r)=>t(r,e)}}function be(){if(vf)return yf;vf=1;const e=we(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:r}=ve(),{safeRe:n,safeSrc:i,t:o}=ge(),s=Ee(),{compareIdentifiers:a}=_e();class c{constructor(i,a){if(a=s(a),i instanceof c){if(i.loose===!!a.loose&&i.includePrerelease===!!a.includePrerelease)return i;i=i.version}else if("string"!=typeof i)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof i}".`);if(i.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",i,a),this.options=a,this.loose=!!a.loose,this.includePrerelease=!!a.includePrerelease;const u=i.trim().match(a.loose?n[o.LOOSE]:n[o.FULL]);if(!u)throw new TypeError("Invalid Version: "+i);if(this.raw=i,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>r||0>this.major)throw new TypeError("Invalid major version");if(this.minor>r||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>r||0>this.patch)throw new TypeError("Invalid patch version");this.prerelease=u[4]?u[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&r>t)return t}return e})):[],this.build=u[5]?u[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version}toString(){return this.version}compare(t){if(e("SemVer.compare",this.version,this.options,t),!(t instanceof c)){if("string"==typeof t&&t===this.version)return 0;t=new c(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof c||(e=new c(e,this.options)),a(this.major,e.major)||a(this.minor,e.minor)||a(this.patch,e.patch)}comparePre(t){if(t instanceof c||(t=new c(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{const n=this.prerelease[r],i=t.prerelease[r];if(e("prerelease compare",r,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return a(n,i)}while(++r)}compareBuild(t){t instanceof c||(t=new c(t,this.options));let r=0;do{const n=this.build[r],i=t.build[r];if(e("build compare",r,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return a(n,i)}while(++r)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");if(t){const e=RegExp(`^${this.options.loose?i[o.PRERELEASELOOSE]:i[o.PRERELEASE]}$`),r=("-"+t).match(e);if(!r||r[1]!==t)throw Error("invalid identifier: "+t)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===a(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw Error("invalid increment argument: "+e)}return this.raw=this.format(),this.build.length&&(this.raw+="+"+this.build.join(".")),this}}return yf=c}function Se(){if(gf)return wf;gf=1;const e=be();return wf=(t,r,n=!1)=>{if(t instanceof e)return t;try{return new e(t,r)}catch(i){if(!n)return null;throw i}}}function Oe(){if(_f)return Ef;_f=1;const e=Se();return Ef=(t,r)=>{const n=e(t,r);return n?n.version:null}}function Re(){if(Tf)return Pf;Tf=1;const e=be();return Pf=(t,r)=>new e(t,r).major}function Ie(){if(jf)return Df;jf=1;const e=be();return Df=(t,r,n)=>new e(t,n).compare(new e(r,n))}function xe(){if(qf)return Bf;qf=1;const e=be();return Bf=(t,r,n)=>{const i=new e(t,n),o=new e(r,n);return i.compare(o)||i.compareBuild(o)}}function Pe(){if(Yf)return Xf;Yf=1;const e=Ie();return Xf=(t,r,n)=>e(t,r,n)>0}function Te(){if(Jf)return Kf;Jf=1;const e=Ie();return Kf=(t,r,n)=>0>e(t,r,n)}function Ne(){if(Zf)return Qf;Zf=1;const e=Ie();return Qf=(t,r,n)=>0===e(t,r,n)}function Ce(){if(tp)return ep;tp=1;const e=Ie();return ep=(t,r,n)=>0!==e(t,r,n)}function $e(){if(np)return rp;np=1;const e=Ie();return rp=(t,r,n)=>e(t,r,n)>=0}function Ae(){if(op)return ip;op=1;const e=Ie();return ip=(t,r,n)=>0>=e(t,r,n)}function Le(){if(ap)return sp;ap=1;const e=Ne(),t=Ce(),r=Pe(),n=$e(),i=Te(),o=Ae();return sp=(s,a,c,u)=>{switch(a){case"===":return"object"==typeof s&&(s=s.version),"object"==typeof c&&(c=c.version),s===c;case"!==":return"object"==typeof s&&(s=s.version),"object"==typeof c&&(c=c.version),s!==c;case"":case"=":case"==":return e(s,c,u);case"!=":return t(s,c,u);case">":return r(s,c,u);case">=":return n(s,c,u);case"<":return i(s,c,u);case"<=":return o(s,c,u);default:throw new TypeError("Invalid operator: "+a)}}}function ke(){if(up)return cp;up=1;const e=be(),t=Se(),{safeRe:r,t:n}=ge();return cp=(i,o)=>{if(i instanceof e)return i;if("number"==typeof i&&(i+=""),"string"!=typeof i)return null;let s=null;if((o=o||{}).rtl){const e=o.includePrerelease?r[n.COERCERTLFULL]:r[n.COERCERTL];let t;for(;(t=e.exec(i))&&(!s||s.index+s[0].length!==i.length);)s&&t.index+t[0].length===s.index+s[0].length||(s=t),e.lastIndex=t.index+t[1].length+t[2].length;e.lastIndex=-1}else s=i.match(o.includePrerelease?r[n.COERCEFULL]:r[n.COERCE]);return null===s?null:t(`${s[2]}.${s[3]||"0"}.${s[4]||"0"}${o.includePrerelease&&s[5]?"-"+s[5]:""}${o.includePrerelease&&s[6]?"+"+s[6]:""}`,o)}}function De(){if(dp)return pp;dp=1;const e=/\s+/g;class t{constructor(r,o){if(o=n(o),r instanceof t)return r.loose===!!o.loose&&r.includePrerelease===!!o.includePrerelease?r:new t(r.raw,o);if(r instanceof i)return this.raw=r.value,this.set=[[r]],this.formatted=void 0,this;if(this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease,this.raw=r.trim().replace(e," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const t of this.set)if(1===t.length&&m(t[0])){this.set=[t];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;this.set.length>e;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;t.length>e;e++)e>0&&(this.formatted+=" "),this.formatted+=(""+t[e]).trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&p)|(this.options.loose&&d))+":"+e,n=r.get(t);if(n)return n;const s=this.options.loose;e=e.replace(s?a[c.HYPHENRANGELOOSE]:a[c.HYPHENRANGE],x(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(a[c.COMPARATORTRIM],u),o("comparator trim",e),e=e.replace(a[c.TILDETRIM],l),o("tilde trim",e),e=e.replace(a[c.CARETTRIM],f),o("caret trim",e);let m=e.split(" ").map((e=>v(e,this.options))).join(" ").split(/\s+/).map((e=>I(e,this.options)));s&&(m=m.filter((e=>(o("loose invalid filter",e,this.options),!!e.match(a[c.COMPARATORLOOSE]))))),o("range list",m);const y=new Map,w=m.map((e=>new i(e,this.options)));for(const r of w){if(h(r))return[r];y.set(r.value,r)}y.size>1&&y.has("")&&y.delete("");const g=[...y.values()];return r.set(t,g),g}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>y(t,r)&&e.set.some((e=>y(e,r)&&t.every((t=>e.every((e=>t.intersects(e,r)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new s(e,this.options)}catch(t){return!1}for(let r=0;this.set.length>r;r++)if(P(this.set[r],e,this.options))return!0;return!1}}pp=t;const r=new(fp?lp:(fp=1,lp=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}})),n=Ee(),i=je(),o=we(),s=be(),{safeRe:a,t:c,comparatorTrimReplace:u,tildeTrimReplace:l,caretTrimReplace:f}=ge(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:d}=ve(),h=e=>"<0.0.0-0"===e.value,m=e=>""===e.value,y=(e,t)=>{let r=!0;const n=e.slice();let i=n.pop();for(;r&&n.length;)r=n.every((e=>i.intersects(e,t))),i=n.pop();return r},v=(e,t)=>(o("comp",e,t),e=_(e,t),o("caret",e),e=g(e,t),o("tildes",e),e=S(e,t),o("xrange",e),e=R(e,t),o("stars",e),e),w=e=>!e||"x"===e.toLowerCase()||"*"===e,g=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>e.replace(t.loose?a[c.TILDELOOSE]:a[c.TILDE],((t,r,n,i,s)=>{let a;return o("tilde",e,t,r,n,i,s),w(r)?a="":w(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:w(i)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:s?(o("replaceTilde pr",s),a=`>=${r}.${n}.${i}-${s} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,o("tilde return",a),a})),_=(e,t)=>e.trim().split(/\s+/).map((e=>b(e,t))).join(" "),b=(e,t)=>{o("caret",e,t);const r=t.includePrerelease?"-0":"";return e.replace(t.loose?a[c.CARETLOOSE]:a[c.CARET],((t,n,i,s,a)=>{let c;return o("caret",e,t,n,i,s,a),w(n)?c="":w(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:w(s)?c="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:a?(o("replaceCaret pr",a),c="0"===n?"0"===i?`>=${n}.${i}.${s}-${a} <${n}.${i}.${+s+1}-0`:`>=${n}.${i}.${s}-${a} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${s}-${a} <${+n+1}.0.0-0`):(o("no pr"),c="0"===n?"0"===i?`>=${n}.${i}.${s}${r} <${n}.${i}.${+s+1}-0`:`>=${n}.${i}.${s}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${s} <${+n+1}.0.0-0`),o("caret return",c),c}))},S=(e,t)=>(o("replaceXRanges",e,t),e.split(/\s+/).map((e=>O(e,t))).join(" ")),O=(e,t)=>(e=e.trim()).replace(t.loose?a[c.XRANGELOOSE]:a[c.XRANGE],((r,n,i,s,a,c)=>{o("xRange",e,r,n,i,s,a,c);const u=w(i),l=u||w(s),f=l||w(a);return"="===n&&f&&(n=""),c=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&f?(l&&(s=0),a=0,">"===n?(n=">=",l?(i=+i+1,s=0,a=0):(s=+s+1,a=0)):"<="===n&&(n="<",l?i=+i+1:s=+s+1),"<"===n&&(c="-0"),r=`${n+i}.${s}.${a}${c}`):l?r=`>=${i}.0.0${c} <${+i+1}.0.0-0`:f&&(r=`>=${i}.${s}.0${c} <${i}.${+s+1}.0-0`),o("xRange return",r),r})),R=(e,t)=>(o("replaceStars",e,t),e.trim().replace(a[c.STAR],"")),I=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(a[t.includePrerelease?c.GTE0PRE:c.GTE0],"")),x=e=>(t,r,n,i,o,s,a,c,u,l,f,p)=>`${r=w(n)?"":w(i)?`>=${n}.0.0${e?"-0":""}`:w(o)?`>=${n}.${i}.0${e?"-0":""}`:s?">="+r:`>=${r}${e?"-0":""}`} ${c=w(u)?"":w(l)?`<${+u+1}.0.0-0`:w(f)?`<${u}.${+l+1}.0-0`:p?`<=${u}.${l}.${f}-${p}`:e?`<${u}.${l}.${+f+1}-0`:"<="+c}`.trim(),P=(e,t,r)=>{for(let n=0;e.length>n;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;e.length>r;r++)if(o(e[r].semver),e[r].semver!==i.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0};return pp}function je(){if(mp)return hp;mp=1;const e=Symbol();class t{static get ANY(){return e}constructor(n,i){if(i=r(i),n instanceof t){if(n.loose===!!i.loose)return n;n=n.value}n=n.trim().split(/\s+/).join(" "),s("comparator",n,i),this.options=i,this.loose=!!i.loose,this.parse(n),this.value=this.semver===e?"":this.operator+this.semver.version,s("comp",this)}parse(t){const r=t.match(this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR]);if(!r)throw new TypeError("Invalid comparator: "+t);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),this.semver=r[2]?new a(r[2],this.options.loose):e}toString(){return this.value}test(t){if(s("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new a(t,this.options)}catch(r){return!1}return o(t,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new c(e.value,n).test(this.value):""===e.operator?""===e.value||new c(this.value,n).test(e.semver):!((n=r(n)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(o(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(o(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}hp=t;const r=Ee(),{safeRe:n,t:i}=ge(),o=Le(),s=we(),a=be(),c=De();return hp}function Ue(){if(vp)return yp;vp=1;const e=De();return yp=(t,r,n)=>{try{r=new e(r,n)}catch(i){return!1}return r.test(t)}}function Fe(){if(Tp)return Pp;Tp=1;const e=be(),t=je(),{ANY:r}=t,n=De(),i=Ue(),o=Pe(),s=Te(),a=Ae(),c=$e();return Pp=(u,l,f,p)=>{let d,h,m,y,v;switch(u=new e(u,p),l=new n(l,p),f){case">":d=o,h=a,m=s,y=">",v=">=";break;case"<":d=s,h=c,m=o,y="<",v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(u,l,p))return!1;for(let e=0;l.set.length>e;++e){let n=null,i=null;if(l.set[e].forEach((e=>{e.semver===r&&(e=new t(">=0.0.0")),n=n||e,i=i||e,d(e.semver,n.semver,p)?n=e:m(e.semver,i.semver,p)&&(i=e)})),n.operator===y||n.operator===v)return!1;if((!i.operator||i.operator===y)&&h(u,i.semver))return!1;if(i.operator===v&&m(u,i.semver))return!1}return!0}}function Me(){if(Gp)return Mp;Gp=1;const e=ge(),t=ve(),r=be(),n=_e(),i=Se(),o=Oe(),s=function(){if(Sf)return bf;Sf=1;const e=Se();return bf=(t,r)=>{const n=e(t.trim().replace(/^[=v]+/,""),r);return n?n.version:null}}(),a=function(){if(Rf)return Of;Rf=1;const e=be();return Of=(t,r,n,i,o)=>{"string"==typeof n&&(o=i,i=n,n=void 0);try{return new e(t instanceof e?t.version:t,n).inc(r,i,o).version}catch(s){return null}}}(),c=function(){if(xf)return If;xf=1;const e=Se();return If=(t,r)=>{const n=e(t,null,!0),i=e(r,null,!0),o=n.compare(i);if(0===o)return null;const s=o>0,a=s?n:i,c=s?i:n,u=!!a.prerelease.length;if(c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(0===c.compareMain(a))return c.minor&&!c.patch?"minor":"patch"}const l=u?"pre":"";return n.major!==i.major?l+"major":n.minor!==i.minor?l+"minor":n.patch!==i.patch?l+"patch":"prerelease"}}(),u=Re(),l=function(){if(Cf)return Nf;Cf=1;const e=be();return Nf=(t,r)=>new e(t,r).minor}(),f=function(){if(Af)return $f;Af=1;const e=be();return $f=(t,r)=>new e(t,r).patch}(),p=function(){if(kf)return Lf;kf=1;const e=Se();return Lf=(t,r)=>{const n=e(t,r);return n&&n.prerelease.length?n.prerelease:null}}(),d=Ie(),h=function(){if(Ff)return Uf;Ff=1;const e=Ie();return Uf=(t,r,n)=>e(r,t,n)}(),m=function(){if(Gf)return Mf;Gf=1;const e=Ie();return Mf=(t,r)=>e(t,r,!0)}(),y=xe(),v=function(){if(Vf)return Hf;Vf=1;const e=xe();return Hf=(t,r)=>t.sort(((t,n)=>e(t,n,r)))}(),w=function(){if(Wf)return zf;Wf=1;const e=xe();return zf=(t,r)=>t.sort(((t,n)=>e(n,t,r)))}(),g=Pe(),E=Te(),_=Ne(),b=Ce(),S=$e(),O=Ae(),R=Le(),I=ke(),x=je(),P=De(),T=Ue(),N=function(){if(gp)return wp;gp=1;const e=De();return wp=(t,r)=>new e(t,r).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))}(),C=function(){if(_p)return Ep;_p=1;const e=be(),t=De();return Ep=(r,n,i)=>{let o=null,s=null,a=null;try{a=new t(n,i)}catch(c){return null}return r.forEach((t=>{a.test(t)&&(o&&-1!==s.compare(t)||(o=t,s=new e(o,i)))})),o}}(),$=function(){if(Sp)return bp;Sp=1;const e=be(),t=De();return bp=(r,n,i)=>{let o=null,s=null,a=null;try{a=new t(n,i)}catch(c){return null}return r.forEach((t=>{a.test(t)&&(o&&1!==s.compare(t)||(o=t,s=new e(o,i)))})),o}}(),A=function(){if(Rp)return Op;Rp=1;const e=be(),t=De(),r=Pe();return Op=(n,i)=>{n=new t(n,i);let o=new e("0.0.0");if(n.test(o))return o;if(o=new e("0.0.0-0"),n.test(o))return o;o=null;for(let t=0;n.set.length>t;++t){let i=null;n.set[t].forEach((t=>{const n=new e(t.semver.version);switch(t.operator){case">":0===n.prerelease.length?n.patch++:n.prerelease.push(0),n.raw=n.format();case"":case">=":i&&!r(n,i)||(i=n);break;case"<":case"<=":break;default:throw Error("Unexpected operation: "+t.operator)}})),!i||o&&!r(o,i)||(o=i)}return o&&n.test(o)?o:null}}(),L=function(){if(xp)return Ip;xp=1;const e=De();return Ip=(t,r)=>{try{return new e(t,r).range||"*"}catch(n){return null}}}(),k=Fe(),D=function(){if(Cp)return Np;Cp=1;const e=Fe();return Np=(t,r,n)=>e(t,r,">",n)}(),j=function(){if(Ap)return $p;Ap=1;const e=Fe();return $p=(t,r,n)=>e(t,r,"<",n)}(),U=function(){if(kp)return Lp;kp=1;const e=De();return Lp=(t,r,n)=>(t=new e(t,n),r=new e(r,n),t.intersects(r,n))}(),F=function(){if(jp)return Dp;jp=1;const e=Ue(),t=Ie();return Dp=(r,n,i)=>{const o=[];let s=null,a=null;const c=r.sort(((e,r)=>t(e,r,i)));for(const t of c)e(t,n,i)?(a=t,s||(s=t)):(a&&o.push([s,a]),a=null,s=null);s&&o.push([s,null]);const u=[];for(const[e,t]of o)u.push(e===t?e:t||e!==c[0]?t?e===c[0]?"<="+t:`${e} - ${t}`:">="+e:"*");const l=u.join(" || ");return("string"==typeof n.raw?n.raw:n+"").length>l.length?l:n}}(),M=function(){if(Fp)return Up;Fp=1;const e=De(),t=je(),{ANY:r}=t,n=Ue(),i=Ie(),o=[new t(">=0.0.0-0")],s=[new t(">=0.0.0")],a=(e,t,a)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===r){if(1===t.length&&t[0].semver===r)return!0;e=a.includePrerelease?o:s}if(1===t.length&&t[0].semver===r){if(a.includePrerelease)return!0;t=s}const l=new Set;let f,p,d,h,m,y,v;for(const r of e)">"===r.operator||">="===r.operator?f=c(f,r,a):"<"===r.operator||"<="===r.operator?p=u(p,r,a):l.add(r.semver);if(l.size>1)return null;if(f&&p){if(d=i(f.semver,p.semver,a),d>0)return null;if(0===d&&(">="!==f.operator||"<="!==p.operator))return null}for(const r of l){if(f&&!n(r,f+"",a))return null;if(p&&!n(r,p+"",a))return null;for(const e of t)if(!n(r,e+"",a))return!1;return!0}let w=!(!p||a.includePrerelease||!p.semver.prerelease.length)&&p.semver,g=!(!f||a.includePrerelease||!f.semver.prerelease.length)&&f.semver;w&&1===w.prerelease.length&&"<"===p.operator&&0===w.prerelease[0]&&(w=!1);for(const r of t){if(v=v||">"===r.operator||">="===r.operator,y=y||"<"===r.operator||"<="===r.operator,f)if(g&&r.semver.prerelease&&r.semver.prerelease.length&&r.semver.major===g.major&&r.semver.minor===g.minor&&r.semver.patch===g.patch&&(g=!1),">"===r.operator||">="===r.operator){if(h=c(f,r,a),h===r&&h!==f)return!1}else if(">="===f.operator&&!n(f.semver,r+"",a))return!1;if(p)if(w&&r.semver.prerelease&&r.semver.prerelease.length&&r.semver.major===w.major&&r.semver.minor===w.minor&&r.semver.patch===w.patch&&(w=!1),"<"===r.operator||"<="===r.operator){if(m=u(p,r,a),m===r&&m!==p)return!1}else if("<="===p.operator&&!n(p.semver,r+"",a))return!1;if(!r.operator&&(p||f)&&0!==d)return!1}return!(f&&y&&!p&&0!==d||p&&v&&!f&&0!==d||g||w)},c=(e,t,r)=>{if(!e)return t;const n=i(e.semver,t.semver,r);return n>0?e:0>n||">"===t.operator&&">="===e.operator?t:e},u=(e,t,r)=>{if(!e)return t;const n=i(e.semver,t.semver,r);return 0>n?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};return Up=(t,r,n={})=>{if(t===r)return!0;t=new e(t,n),r=new e(r,n);let i=!1;e:for(const e of t.set){for(const t of r.set){const r=a(e,t,n);if(i=i||null!==r,r)continue e}if(i)return!1}return!0}}();return Mp={parse:i,valid:o,clean:s,inc:a,diff:c,major:u,minor:l,patch:f,prerelease:p,compare:d,rcompare:h,compareLoose:m,compareBuild:y,sort:v,rsort:w,gt:g,lt:E,eq:_,neq:b,gte:S,lte:O,cmp:R,coerce:I,Comparator:x,Range:P,satisfies:T,toComparators:N,maxSatisfying:C,minSatisfying:$,minVersion:A,validRange:L,outside:k,gtr:D,ltr:j,intersects:U,simplifyRange:F,subset:M,SemVer:r,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers}}function Ge(e){return null==e?[]:Array.isArray(e)?e:[e]}function Be(e,t,r,n){var i,o=e[t],s=~n.string.indexOf(t)?null==r||!0===r?"":r+"":"boolean"==typeof r?r:~n.boolean.indexOf(t)?"false"!==r&&("true"===r||(e._.push(0*(i=+r)==0?i:r),!!r)):0*(i=+r)==0?i:r;e[t]=null==o?s:Array.isArray(o)?o.concat(s):[o,s]}async function qe(e,t,r,n=40){Yp?await async function(e,t,r=40){await N("update-alternatives",["--install","/usr/bin/"+e,e,t,""+r])}(e,t,n):(await Il(r),await Kp(r.rcPath,`\nif [ $UID -eq 0 ]; then update-alternatives --install /usr/bin/${e} ${e} ${t} ${n}; fi\n`))}function He(e){const t={...process.env,DEBIAN_FRONTEND:"noninteractive"};return"nala"===e&&(void 0===t.LANG&&(t.LANG="C.UTF-8"),void 0===t.LC_ALL&&(t.LC_ALL="C.UTF-8")),t}function Ve(){return null!==aa.sync("nala",{nothrow:!0})}function ze(){let e;return e=Ve()?"nala":"apt-get",e}function We(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}async function Xe(e){try{const{stdout:t}=await E("dpkg",["-s",e],{env:He("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("Status: install ok installed")))}catch{return!1}}async function Ye(e,t=ze()){return(await Promise.all(e.map((e=>Ke(e,t))))).filter((e=>void 0!==e))}async function Ke(e,t=ze()){const r=await async function(e,t){const{name:r,version:n,fallBackToLatest:i=!1}=t;switch(await Je(e,r,n)){case ed.NameDashVersion:return`${r}-${n}`;case ed.NameEqualsVersion:return`${r}=${n}`;case ed.Name:if(void 0===n||""===n)return r;if(i)return p(`Could not find package '${r}' with version '${n}'. Installing the latest version.`),r;throw Error(`Could not find package '${r}' with version '${n}'`);default:throw Error(`Could not find package '${r}' ${null!=n?n:"with unspecified version"}`)}}(t,e);return await Xe(r)?void 0:r}async function Je(e,t,r){if(void 0!==r&&""!==r){const{stdout:n}=await E("apt-cache",["search","--names-only",`^${We(t)}-${We(r)}$`],{env:He(e),stdio:"pipe"});if(""!==n.trim())return ed.NameDashVersion;try{const{stdout:n}=await E("apt-cache",["show",`${t}=${r}`],{env:He(e)});if(""===n.trim())return ed.NameEqualsVersion}catch{}}try{const{stdout:r}=await E("apt-cache",["show",t],{env:He(e),stdio:"pipe"});if(""!==r.trim())return ed.Name}catch{}return Qp?void 0===r||""===r?ed.Name:ed.None:(Zp(e),Je(e,t,r))}async function Qe(){if(await Xe("software-properties-common"))return;const e="apt-get";T(e,["install","-y","--fix-broken","-o",Jp,"software-properties-common"],{...fa,env:He(e)})}async function Ze(e,t=!1){try{const n=ze();for(const{name:t,version:r}of e)h(`Installing ${t} ${null!=r?r:""} via ${n}`);t&&Zp.clear(),Zp(n),await async function(e,t){const r=[...new Set(t.flatMap((e=>{var t;return null!=(t=e.repository)?t:[]})))];await Promise.all(r.map((t=>async function(e,t=ze()){await rd(t),await Qe(),T("add-apt-repository",["-y","--no-update",e],{...fa,env:He(t)}),Zp.clear(),Zp(t)}(t,e))))}(n,e);const i=await Ye(e,n);if(0===i.length)return h("All packages are already installed"),{binDir:"/usr/bin/"};await rd(n);try{await async function(e){await Promise.all(e.map((async e=>{var t;void 0!==e.key&&await(t=e.key,"keyUrl"in t?et(t):async function({key:e,keyServer:t=od,fileName:r,keyStorePath:n=od}){try{rt(r);const i=In.join(n,r);return await se(i)||(tt(),await N("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+i,"--keyserver",t,"--recv-keys",e]),await N("chmod",["644",i])),i}catch(i){return void p(`Failed to add apt key via server ${t}: ${i}`)}}(t))})))}(e),T(n,["install","--fix-broken","-y",...i],{...fa,env:He(n)})}catch(r){if(!function(e){return"string"==typeof e.stderr}(r))throw r;nd.some((e=>"string"==typeof r.stderr&&r.stderr.includes(e)))&&(p(`Failed to install packages ${i}. Retrying...`),T(n,["install","--fix-broken","-y","-o",Jp,...i],{...fa,env:He(n)}))}return{binDir:"/usr/bin/"}}catch(r){throw Error("Failed to install apt packages: "+(r instanceof Error?`${r.message}\n${r.stack}`:r+""))}}async function et({keyUrl:e,fileName:t,keyStorePath:r=id}){try{rt(t);const n=In.join(r,t);if(!(await se(n))){tt(),await Ze([{name:"ca-certificates"}]);const r=In.join(On.tmpdir(),t),i=new Xp.DownloaderHelper(e,On.tmpdir(),{fileName:t});i.on("error",(t=>{throw Error(`Failed to download ${e}: ${t}`)})),await i.start(),T("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+n,"--import",r]),T("chmod",["644",n])}return n}catch(n){return void p(`Failed to add apt key via download ${e}: ${n}`)}}function tt(){T("gpg",["-k"])}function rt(e){if(!e.endsWith(".gpg"))throw Error("Key file name must end with .gpg: "+e)}async function nt(e={}){if(!["darwin","linux"].includes(process.platform))return;if("string"==typeof sd)return{binDir:sd};const t=await aa("brew",{nothrow:!0});if(null!==t)return sd=In.dirname(t),{binDir:sd};await Ze([{name:"ca-certificates"}]);const r=new Xp.DownloaderHelper("https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh",On.tmpdir(),{fileName:"install-brew.sh"});return r.on("error",(e=>{throw Error("Failed to download the brew installer script: "+e)})),await r.start(),_("/bin/bash",[r.getDownloadPath()],{stdio:"inherit",env:{NONINTERACTIVE:"1"}}),sd=it(),await pe(sd,e.rcOptions),{binDir:sd}}function it(){return In.join(st(),"bin")}function ot(){return In.join(it(),"brew")}function st(){if("darwin"===process.platform)return"arm64"===process.arch?"/opt/homebrew":"/usr/local";if("linux"===process.platform)return"/home/linuxbrew/.linuxbrew";throw Error("Unsupported platform for brew")}function at(e,t){return void 0!==t&&""!==t?`${e}@${t}`:e}async function ct(e){try{const t=ot();return(await E(t,["--prefix",e],{stdio:"pipe"})).stdout}catch{return}}async function ut(e,t,r={}){"overwrite"in r||(r.overwrite=!0),!0===r.cask&&(r.overwrite=!1),h(`Installing ${e} ${null!=t?t:""} via brew`),fd&&null!==aa.sync("brew",{nothrow:!0})||(await nt(),fd=!0);const n=ot(),i=["install",at(e,t)];for(const[s,a]of Object.entries(r))"boolean"==typeof a&&a?i.push("--"+s):"string"==typeof a&&i.push("--"+s,a);_(n,i,{stdio:"inherit"});const o=await async function(e,t){const r=at(e,t),n=await ct(r);if(void 0!==n)return n;const i=await ct(e);return void 0!==i?i:function(e,t){const r=st(),n=In.join(r,"opt",t);if(Rn.existsSync(n))return n;const i=In.join(r,"opt",e);if(Rn.existsSync(i))return i;const o=In.join(r,"Cellar",t);if(Rn.existsSync(o))return o;const s=In.join(r,"Cellar",e);if(Rn.existsSync(s))return s;const a=In.join(r,"lib",t);if(Rn.existsSync(a))return a;const c=In.join(r,"lib",e);return Rn.existsSync(c)?c:void 0}(e,r)}(e,t);return void 0===o?(p(`Failed to find installation directory for ${e} ${t}`),{binDir:it(),installDir:void 0}):{installDir:o,binDir:In.join(o,"bin")}}function lt(){return"linux"===process.platform&&(void 0===ad&&(ad=null!==aa.sync("dnf",{nothrow:!0})),ad)}function ft(){return"linux"===process.platform&&(void 0===cd&&(cd=null!==aa.sync("pacman",{nothrow:!0})),cd)}function pt(){return"linux"===process.platform&&(void 0===ud&&(ud=null!==aa.sync("apt-get",{nothrow:!0})),ud)}async function dt(e,t,r){var n;if("win32"!==process.platform)return;if("string"==typeof ld)return{binDir:ld};const i=aa.sync("choco",{nothrow:!0});if(null!==i)return ld=In.dirname(i),{binDir:ld};let o="powershell.exe";const s=aa.sync(process.env.SystemRoot+"\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",{nothrow:!0});null!==s&&(o=s),_(o,["-NoProfile","-InputFormat","None","-ExecutionPolicy","Bypass","-Command","[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))"],{stdio:"inherit"});const a=process.env.ALLUSERSPROFILE+"\\chocolatey\\bin";await pe(a,xy);const c=aa.sync("choco",{nothrow:!0});return ld=null!==c?In.dirname(c):(null!=(n=process.env.ChocolateyInstall)?n:"C:/ProgramData/chocolatey")+"/bin",await se(ld)?{binDir:ld}:void 0}async function ht(e,t,r=[]){var n;h(`Installing ${e} ${null!=t?t:""} via chocolatey`),pd&&null!==aa.sync("choco",{nothrow:!0})||(await dt(0,0,process),pd=!0);const i=process.env.PATH,o={...process.env};if(o.TMP=void 0,o.TEMP=void 0,o.Path=void 0,o.PATH=i,void 0!==t&&""!==t)_("choco",["install","-y",e,"--version="+t,...r],{env:o,extendEnv:!1,stdio:"inherit"});else try{_("choco",["install","-y",e,...r],{env:o,extendEnv:!1,stdio:"inherit"})}catch(a){if(!a.message.includes("exit code 3010"))throw a;h(e+" might require a reboot for the completion of the installation.")}const s=(null!=(n=process.env.ChocolateyInstall)?n:"C:/ProgramData/chocolatey")+"/bin";return await pe(s,xy),{binDir:s}}async function mt(e){for(const{name:t,version:r}of e)h(`Installing ${t} ${null!=r?r:""} via dnf`);return T("dnf",["-y","install",...await Promise.all(e.map((e=>async function(e,t){if(void 0===t||""===t)return e;const{stdout:r}=await E("dnf",["search","-q",`${e}-${t}`]);if(""!==r.trim())return`${e}-${t}`;const{stdout:n}=await E("dnf",["search","-q",`${e}${t}`]);return""!==n.trim()?`${e}${t}`:(p(`Failed to install ${e} ${t} via dnf, trying without version`),e)}(e.name,e.version))))]),{binDir:"/usr/bin/"}}async function yt(e,t,r){h(`Installing ${e} ${null!=t?t:""} via pacman`);const n="pacman";"yay"===r&&function(){if(null===aa.sync("yay",{nothrow:!0}))try{T("pacman",["-S","--noconfirm","base-devel","git"]);const e=In.join(On.tmpdir(),"yay");T("mkdir",["-p",e]),I()?(p("Creating a non-root user to build yay"),T("useradd",["-m","-G","wheel","builder"]),T("passwd",["-d","builder"]),T("chown",["-R","builder:builder",e]),T("bash",["-c",'echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers']),yd=!0,_("su",["-","builder","-c","git clone https://aur.archlinux.org/yay.git "+e],{stdio:"inherit"}),_("su",["-","builder","-c",`cd ${e} && makepkg -si --noconfirm`],{stdio:"inherit"})):(_("git",["clone","https://aur.archlinux.org/yay.git",e],{stdio:"inherit",cwd:On.tmpdir()}),_("makepkg",["-si","--noconfirm"],{stdio:"inherit",cwd:e})),_("rm",["-rf",e],{stdio:"inherit"})}catch(e){throw Error(`Failed to install yay: ${e}. Install yay manually and re-run the script.`)}}(),dd||"yay"===r||(T(n,["-Sy","--noconfirm"]),dd=!0),hd||"yay"===r||(T(n,["-S","--noconfirm","base-devel"]),hd=!0);const i=e=>"yay"===r?I()&&yd?T("su",["-","builder","-c","yay -S --noconfirm "+e]):_(r,["-S","--noconfirm",e]):T(null!=r?r:n,["-S","--noconfirm",e]);if(void 0!==t&&""!==t){const r=await async function(e,t){const r=[];try{const{stdout:n}=await E(e,["-Si",t]);for(const e of n.matchAll(md))r.push(e[1])}catch(n){p(`Failed to get available versions for ${t}: ${n}`)}return r}(n,e);if(r.includes(t))try{i(`${e}=${t}`)}catch{i(`${e}${t}`)}else h(`Failed to install ${e} ${t} via pacman, trying without version`),i(e)}else i(e);return{binDir:"/usr/bin/"}}function vt(e,t){return Object.keys(t).forEach((r=>{"default"===r||"__esModule"===r||e.hasOwnProperty(r)||Object.defineProperty(e,r,{enumerable:!0,get:()=>t[r]})})),e}function wt(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function gt(e,t=!0){return t?In.basename(e):In.basename(e,In.extname(e))}function Et(e){return In.normalize(e).replace(RegExp(We(In.sep)+"$"),"")}function _t(e,t=".exe",r=""){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function bt(e,t){const r=In.extname(e),n=`${t}${In.basename(e,r)}${r}`;return In.join(In.dirname(e),n)}function St(e,t){const r=In.extname(e),n=`${In.basename(e,r)}${t}${r}`;return In.join(In.dirname(e),n)}function Ot(e,t=".cmd",r=".sh"){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function Rt(e){return"win32"===process.platform?e:"./"+e}function It(e){const t=In.extname(e).length;return e.slice(0,-t)}function xt(e,t){return gd(e,t)}function Pt(e,t){const r=In.relative(t,e);return!(!r||".."===r||r.startsWith(".."+In.sep)||r===In.resolve(e))}function Tt(){return Md||(Md=1,function(e,t){function r(e){N[e]=C++}function n(e){for(var t=0;A.length>t;t++){var r=A[t][0],n=A[t][1];e=e.split(r+"*").join(r+"{0,"+n+"}").split(r+"+").join(r+"{1,"+n+"}")}return e}function i(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof o)return e;if("string"!=typeof e)return null;if(e.length>O)return null;if(!(t.loose?P[N.LOOSE]:P[N.FULL]).test(e))return null;try{return new o(e,t)}catch(r){return null}}function o(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof o){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>O)throw new TypeError("version is longer than "+O+" characters");if(!(this instanceof o))return new o(e,t);S("SemVer",e,t),this.options=t,this.loose=!!t.loose;var r=e.trim().match(t.loose?P[N.LOOSE]:P[N.FULL]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>R||0>this.major)throw new TypeError("Invalid major version");if(this.minor>R||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>R||0>this.patch)throw new TypeError("Invalid patch version");this.prerelease=r[4]?r[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&R>t)return t}return e})):[],this.build=r[5]?r[5].split("."):[],this.format()}function s(e,t){var r=k.test(e),n=k.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:t>e?-1:1}function a(e,t,r){return new o(e,r).compare(new o(t,r))}function c(e,t,r){return a(e,t,r)>0}function u(e,t,r){return 0>a(e,t,r)}function l(e,t,r){return 0===a(e,t,r)}function f(e,t,r){return 0!==a(e,t,r)}function p(e,t,r){return a(e,t,r)>=0}function d(e,t,r){return 0>=a(e,t,r)}function h(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return l(e,r,n);case"!=":return f(e,r,n);case">":return c(e,r,n);case">=":return p(e,r,n);case"<":return u(e,r,n);case"<=":return d(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function m(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof m){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof m))return new m(e,t);e=e.trim().split(/\s+/).join(" "),S("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.value=this.semver===D?"":this.operator+this.semver.version,S("comp",this)}function y(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof y)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new y(e.raw,t);if(e instanceof m)return new y(e.value,t);if(!(this instanceof y))return new y(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}function v(e,t){for(var r=!0,n=e.slice(),i=n.pop();r&&n.length;)r=n.every((function(e){return i.intersects(e,t)})),i=n.pop();return r}function w(e){return!e||"x"===e.toLowerCase()||"*"===e}function g(e,t,r,n,i,o,s,a,c,u,l,f,p){return((t=w(r)?"":w(n)?">="+r+".0.0":w(i)?">="+r+"."+n+".0":">="+t)+" "+(a=w(c)?"":w(u)?"<"+(+c+1)+".0.0":w(l)?"<"+c+"."+(+u+1)+".0":f?"<="+c+"."+u+"."+l+"-"+f:"<="+a)).trim()}function E(e,t,r){for(var n=0;e.length>n;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(n=0;e.length>n;n++)if(S(e[n].semver),e[n].semver!==D&&e[n].semver.prerelease.length>0){var i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function _(e,t,r){try{t=new y(t,r)}catch(n){return!1}return t.test(e)}function b(e,t,r,n){var i,s,a,l,f;switch(e=new o(e,n),t=new y(t,n),r){case">":i=c,s=d,a=u,l=">",f=">=";break;case"<":i=u,s=p,a=c,l="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(_(e,t,n))return!1;for(var h=0;t.set.length>h;++h){var v=null,w=null;if(t.set[h].forEach((function(e){e.semver===D&&(e=new m(">=0.0.0")),w=w||e,i(e.semver,(v=v||e).semver,n)?v=e:a(e.semver,w.semver,n)&&(w=e)})),v.operator===l||v.operator===f)return!1;if((!w.operator||w.operator===l)&&s(e,w.semver))return!1;if(w.operator===f&&a(e,w.semver))return!1}return!0}var S;t=Wd.exports=o,S="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=[].slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var O=256,R=Number.MAX_SAFE_INTEGER||9007199254740991,I=O-6,x=t.re=[],P=t.safeRe=[],T=t.src=[],N=t.tokens={},C=0,$="[a-zA-Z0-9-]",A=[["\\s",1],["\\d",O],[$,I]];r("NUMERICIDENTIFIER"),T[N.NUMERICIDENTIFIER]="0|[1-9]\\d*",r("NUMERICIDENTIFIERLOOSE"),T[N.NUMERICIDENTIFIERLOOSE]="\\d+",r("NONNUMERICIDENTIFIER"),T[N.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+$+"*",r("MAINVERSION"),T[N.MAINVERSION]="("+T[N.NUMERICIDENTIFIER]+")\\.("+T[N.NUMERICIDENTIFIER]+")\\.("+T[N.NUMERICIDENTIFIER]+")",r("MAINVERSIONLOOSE"),T[N.MAINVERSIONLOOSE]="("+T[N.NUMERICIDENTIFIERLOOSE]+")\\.("+T[N.NUMERICIDENTIFIERLOOSE]+")\\.("+T[N.NUMERICIDENTIFIERLOOSE]+")",r("PRERELEASEIDENTIFIER"),T[N.PRERELEASEIDENTIFIER]="(?:"+T[N.NUMERICIDENTIFIER]+"|"+T[N.NONNUMERICIDENTIFIER]+")",r("PRERELEASEIDENTIFIERLOOSE"),T[N.PRERELEASEIDENTIFIERLOOSE]="(?:"+T[N.NUMERICIDENTIFIERLOOSE]+"|"+T[N.NONNUMERICIDENTIFIER]+")",r("PRERELEASE"),T[N.PRERELEASE]="(?:-("+T[N.PRERELEASEIDENTIFIER]+"(?:\\."+T[N.PRERELEASEIDENTIFIER]+")*))",r("PRERELEASELOOSE"),T[N.PRERELEASELOOSE]="(?:-?("+T[N.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+T[N.PRERELEASEIDENTIFIERLOOSE]+")*))",r("BUILDIDENTIFIER"),T[N.BUILDIDENTIFIER]=$+"+",r("BUILD"),T[N.BUILD]="(?:\\+("+T[N.BUILDIDENTIFIER]+"(?:\\."+T[N.BUILDIDENTIFIER]+")*))",r("FULL"),r("FULLPLAIN"),T[N.FULLPLAIN]="v?"+T[N.MAINVERSION]+T[N.PRERELEASE]+"?"+T[N.BUILD]+"?",T[N.FULL]="^"+T[N.FULLPLAIN]+"$",r("LOOSEPLAIN"),T[N.LOOSEPLAIN]="[v=\\s]*"+T[N.MAINVERSIONLOOSE]+T[N.PRERELEASELOOSE]+"?"+T[N.BUILD]+"?",r("LOOSE"),T[N.LOOSE]="^"+T[N.LOOSEPLAIN]+"$",r("GTLT"),T[N.GTLT]="((?:<|>)?=?)",r("XRANGEIDENTIFIERLOOSE"),T[N.XRANGEIDENTIFIERLOOSE]=T[N.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",r("XRANGEIDENTIFIER"),T[N.XRANGEIDENTIFIER]=T[N.NUMERICIDENTIFIER]+"|x|X|\\*",r("XRANGEPLAIN"),T[N.XRANGEPLAIN]="[v=\\s]*("+T[N.XRANGEIDENTIFIER]+")(?:\\.("+T[N.XRANGEIDENTIFIER]+")(?:\\.("+T[N.XRANGEIDENTIFIER]+")(?:"+T[N.PRERELEASE]+")?"+T[N.BUILD]+"?)?)?",r("XRANGEPLAINLOOSE"),T[N.XRANGEPLAINLOOSE]="[v=\\s]*("+T[N.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+T[N.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+T[N.XRANGEIDENTIFIERLOOSE]+")(?:"+T[N.PRERELEASELOOSE]+")?"+T[N.BUILD]+"?)?)?",r("XRANGE"),T[N.XRANGE]="^"+T[N.GTLT]+"\\s*"+T[N.XRANGEPLAIN]+"$",r("XRANGELOOSE"),T[N.XRANGELOOSE]="^"+T[N.GTLT]+"\\s*"+T[N.XRANGEPLAINLOOSE]+"$",r("COERCE"),T[N.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",r("COERCERTL"),x[N.COERCERTL]=RegExp(T[N.COERCE],"g"),P[N.COERCERTL]=RegExp(n(T[N.COERCE]),"g"),r("LONETILDE"),T[N.LONETILDE]="(?:~>?)",r("TILDETRIM"),T[N.TILDETRIM]="(\\s*)"+T[N.LONETILDE]+"\\s+",x[N.TILDETRIM]=RegExp(T[N.TILDETRIM],"g"),P[N.TILDETRIM]=RegExp(n(T[N.TILDETRIM]),"g"),r("TILDE"),T[N.TILDE]="^"+T[N.LONETILDE]+T[N.XRANGEPLAIN]+"$",r("TILDELOOSE"),T[N.TILDELOOSE]="^"+T[N.LONETILDE]+T[N.XRANGEPLAINLOOSE]+"$",r("LONECARET"),T[N.LONECARET]="(?:\\^)",r("CARETTRIM"),T[N.CARETTRIM]="(\\s*)"+T[N.LONECARET]+"\\s+",x[N.CARETTRIM]=RegExp(T[N.CARETTRIM],"g"),P[N.CARETTRIM]=RegExp(n(T[N.CARETTRIM]),"g"),r("CARET"),T[N.CARET]="^"+T[N.LONECARET]+T[N.XRANGEPLAIN]+"$",r("CARETLOOSE"),T[N.CARETLOOSE]="^"+T[N.LONECARET]+T[N.XRANGEPLAINLOOSE]+"$",r("COMPARATORLOOSE"),T[N.COMPARATORLOOSE]="^"+T[N.GTLT]+"\\s*("+T[N.LOOSEPLAIN]+")$|^$",r("COMPARATOR"),T[N.COMPARATOR]="^"+T[N.GTLT]+"\\s*("+T[N.FULLPLAIN]+")$|^$",r("COMPARATORTRIM"),T[N.COMPARATORTRIM]="(\\s*)"+T[N.GTLT]+"\\s*("+T[N.LOOSEPLAIN]+"|"+T[N.XRANGEPLAIN]+")",x[N.COMPARATORTRIM]=RegExp(T[N.COMPARATORTRIM],"g"),P[N.COMPARATORTRIM]=RegExp(n(T[N.COMPARATORTRIM]),"g"),r("HYPHENRANGE"),T[N.HYPHENRANGE]="^\\s*("+T[N.XRANGEPLAIN]+")\\s+-\\s+("+T[N.XRANGEPLAIN]+")\\s*$",r("HYPHENRANGELOOSE"),T[N.HYPHENRANGELOOSE]="^\\s*("+T[N.XRANGEPLAINLOOSE]+")\\s+-\\s+("+T[N.XRANGEPLAINLOOSE]+")\\s*$",r("STAR"),T[N.STAR]="(<|>)?=?\\s*\\*";for(var L=0;C>L;L++)S(L,T[L]),x[L]||(x[L]=RegExp(T[L]),P[L]=RegExp(n(T[L])));t.parse=i,t.valid=function(e,t){var r=i(e,t);return r?r.version:null},t.clean=function(e,t){var r=i(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},t.SemVer=o,o.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},o.prototype.toString=function(){return this.version},o.prototype.compare=function(e){return S("SemVer.compare",this.version,this.options,e),e instanceof o||(e=new o(e,this.options)),this.compareMain(e)||this.comparePre(e)},o.prototype.compareMain=function(e){return e instanceof o||(e=new o(e,this.options)),s(this.major,e.major)||s(this.minor,e.minor)||s(this.patch,e.patch)},o.prototype.comparePre=function(e){if(e instanceof o||(e=new o(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],n=e.prerelease[t];if(S("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return s(r,n)}while(++t)},o.prototype.compareBuild=function(e){e instanceof o||(e=new o(e,this.options));var t=0;do{var r=this.build[t],n=e.build[t];if(S("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return s(r,n)}while(++t)},o.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var r=this.prerelease.length;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new o(e,r).inc(t,n).version}catch(i){return null}},t.diff=function(e,t){if(l(e,t))return null;var r=i(e),n=i(t),o="";if(r.prerelease.length||n.prerelease.length){o="pre";var s="prerelease"}for(var a in r)if(("major"===a||"minor"===a||"patch"===a)&&r[a]!==n[a])return o+a;return s},t.compareIdentifiers=s;var k=/^[0-9]+$/;t.rcompareIdentifiers=function(e,t){return s(t,e)},t.major=function(e,t){return new o(e,t).major},t.minor=function(e,t){return new o(e,t).minor},t.patch=function(e,t){return new o(e,t).patch},t.compare=a,t.compareLoose=function(e,t){return a(e,t,!0)},t.compareBuild=function(e,t,r){var n=new o(e,r),i=new o(t,r);return n.compare(i)||n.compareBuild(i)},t.rcompare=function(e,t,r){return a(t,e,r)},t.sort=function(e,r){return e.sort((function(e,n){return t.compareBuild(e,n,r)}))},t.rsort=function(e,r){return e.sort((function(e,n){return t.compareBuild(n,e,r)}))},t.gt=c,t.lt=u,t.eq=l,t.neq=f,t.gte=p,t.lte=d,t.cmp=h,t.Comparator=m;var D={};m.prototype.parse=function(e){var t=e.match(this.options.loose?P[N.COMPARATORLOOSE]:P[N.COMPARATOR]);if(!t)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==t[1]?t[1]:"","="===this.operator&&(this.operator=""),this.semver=t[2]?new o(t[2],this.options.loose):D},m.prototype.toString=function(){return this.value},m.prototype.test=function(e){if(S("Comparator.test",e,this.options.loose),this.semver===D||e===D)return!0;if("string"==typeof e)try{e=new o(e,this.options)}catch(t){return!1}return h(e,this.operator,this.semver,this.options)},m.prototype.intersects=function(e,t){if(!(e instanceof m))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||(r=new y(e.value,t),_(this.value,r,t));if(""===e.operator)return""===e.value||(r=new y(this.value,t),_(e.semver,r,t));var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=h(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=h(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||o&&s||a||c},t.Range=y,y.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},y.prototype.toString=function(){return this.range},y.prototype.parseRange=function(e){var t=this.options.loose;e=e.replace(t?P[N.HYPHENRANGELOOSE]:P[N.HYPHENRANGE],g),S("hyphen replace",e),e=e.replace(P[N.COMPARATORTRIM],"$1$2$3"),S("comparator trim",e,P[N.COMPARATORTRIM]),e=(e=(e=e.replace(P[N.TILDETRIM],"$1~")).replace(P[N.CARETTRIM],"$1^")).split(/\s+/).join(" ");var r=t?P[N.COMPARATORLOOSE]:P[N.COMPARATOR],n=e.split(" ").map((function(e){return function(e,t){return S("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){return S("caret",e,t),e.replace(t.loose?P[N.CARETLOOSE]:P[N.CARET],(function(t,r,n,i,o){var s;return S("caret",e,t,r,n,i,o),w(r)?s="":w(n)?s=">="+r+".0.0 <"+(+r+1)+".0.0":w(i)?s="0"===r?">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":">="+r+"."+n+".0 <"+(+r+1)+".0.0":o?(S("replaceCaret pr",o),s="0"===r?"0"===n?">="+r+"."+n+"."+i+"-"+o+" <"+r+"."+n+"."+(+i+1):">="+r+"."+n+"."+i+"-"+o+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+i+"-"+o+" <"+(+r+1)+".0.0"):(S("no pr"),s="0"===r?"0"===n?">="+r+"."+n+"."+i+" <"+r+"."+n+"."+(+i+1):">="+r+"."+n+"."+i+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+i+" <"+(+r+1)+".0.0"),S("caret return",s),s}))}(e,t)})).join(" ")}(e,t),S("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){return e.replace(t.loose?P[N.TILDELOOSE]:P[N.TILDE],(function(t,r,n,i,o){var s;return S("tilde",e,t,r,n,i,o),w(r)?s="":w(n)?s=">="+r+".0.0 <"+(+r+1)+".0.0":w(i)?s=">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":o?(S("replaceTilde pr",o),s=">="+r+"."+n+"."+i+"-"+o+" <"+r+"."+(+n+1)+".0"):s=">="+r+"."+n+"."+i+" <"+r+"."+(+n+1)+".0",S("tilde return",s),s}))}(e,t)})).join(" ")}(e,t),S("tildes",e),e=function(e,t){return S("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){return(e=e.trim()).replace(t.loose?P[N.XRANGELOOSE]:P[N.XRANGE],(function(r,n,i,o,s,a){S("xRange",e,r,n,i,o,s,a);var c=w(i),u=c||w(o),l=u||w(s);return"="===n&&l&&(n=""),a=t.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&l?(u&&(o=0),s=0,">"===n?(n=">=",u?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===n&&(n="<",u?i=+i+1:o=+o+1),r=n+i+"."+o+"."+s+a):u?r=">="+i+".0.0"+a+" <"+(+i+1)+".0.0"+a:l&&(r=">="+i+"."+o+".0"+a+" <"+i+"."+(+o+1)+".0"+a),S("xRange return",r),r}))}(e,t)})).join(" ")}(e,t),S("xrange",e),e=function(e,t){return S("replaceStars",e,t),e.trim().replace(P[N.STAR],"")}(e,t),S("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(n=n.filter((function(e){return!!e.match(r)}))),n.map((function(e){return new m(e,this.options)}),this)},y.prototype.intersects=function(e,t){if(!(e instanceof y))throw new TypeError("a Range is required");return this.set.some((function(r){return v(r,t)&&e.set.some((function(e){return v(e,t)&&r.every((function(r){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new y(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},y.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new o(e,this.options)}catch(r){return!1}for(var t=0;this.set.length>t;t++)if(E(this.set[t],e,this.options))return!0;return!1},t.satisfies=_,t.maxSatisfying=function(e,t,r){var n=null,i=null;try{var s=new y(t,r)}catch(a){return null}return e.forEach((function(e){s.test(e)&&(n&&-1!==i.compare(e)||(i=new o(n=e,r)))})),n},t.minSatisfying=function(e,t,r){var n=null,i=null;try{var s=new y(t,r)}catch(a){return null}return e.forEach((function(e){s.test(e)&&(n&&1!==i.compare(e)||(i=new o(n=e,r)))})),n},t.minVersion=function(e,t){e=new y(e,t);var r=new o("0.0.0");if(e.test(r))return r;if(r=new o("0.0.0-0"),e.test(r))return r;r=null;for(var n=0;e.set.length>n;++n)e.set[n].forEach((function(e){var t=new o(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!c(r,t)||(r=t);break;case"<":case"<=":break;default:throw Error("Unexpected operation: "+e.operator)}}));return r&&e.test(r)?r:null},t.validRange=function(e,t){try{return new y(e,t).range||"*"}catch(r){return null}},t.ltr=function(e,t,r){return b(e,t,"<",r)},t.gtr=function(e,t,r){return b(e,t,">",r)},t.outside=b,t.prerelease=function(e,t){var r=i(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new y(e,r),t=new y(t,r),e.intersects(t)},t.coerce=function(e,t){if(e instanceof o)return e;if("number"==typeof e&&(e+=""),"string"!=typeof e)return null;var r=null;if((t=t||{}).rtl){for(var n;(n=P[N.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),P[N.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;P[N.COERCERTL].lastIndex=-1}else r=e.match(P[N.COERCE]);return null===r?null:i(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}}(0,Wd.exports)),Wd.exports}function Nt(){return Zd||(Zd=1,lm.fromCallback=function(e){return Object.defineProperty((function(...t){if("function"!=typeof t[t.length-1])return new Promise(((r,n)=>{t.push(((e,t)=>null!=e?n(e):r(t))),e.apply(this,t)}));e.apply(this,t)}),"name",{value:e.name})},lm.fromPromise=function(e){return Object.defineProperty((function(...t){const r=t[t.length-1];if("function"!=typeof r)return e.apply(this,t);t.pop(),e.apply(this,t).then((e=>r(null,e)),r)}),"name",{value:e.name})}),lm}function Ct(){function e(e,t){Object.defineProperty(e,o,{get:function(){return t}})}function t(e){function n(e,t){return this instanceof n?(m.apply(this,arguments),this):n.apply(Object.create(n.prototype),arguments)}function i(e,t){return this instanceof i?(y.apply(this,arguments),this):i.apply(Object.create(i.prototype),arguments)}function o(e,t,n,i){return"function"==typeof n&&(i=n,n=null),function e(t,n,i,o,s){return g(t,n,i,(function(a,c){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?"function"==typeof o&&o.apply(this,arguments):r([e,[t,n,i,o],a,s||Date.now(),Date.now()])}))}(e,t,n,i)}c(e),e.gracefulify=t,e.createReadStream=function(t,r){return new e.ReadStream(t,r)},e.createWriteStream=function(t,r){return new e.WriteStream(t,r)};var s=e.readFile;e.readFile=function(e,t,n){return"function"==typeof t&&(n=t,t=null),function e(t,n,i,o){return s(t,n,(function(s){!s||"EMFILE"!==s.code&&"ENFILE"!==s.code?"function"==typeof i&&i.apply(this,arguments):r([e,[t,n,i],s,o||Date.now(),Date.now()])}))}(e,t,n)};var a=e.writeFile;e.writeFile=function(e,t,n,i){return"function"==typeof n&&(i=n,n=null),function e(t,n,i,o,s){return a(t,n,i,(function(a){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?"function"==typeof o&&o.apply(this,arguments):r([e,[t,n,i,o],a,s||Date.now(),Date.now()])}))}(e,t,n,i)};var l=e.appendFile;l&&(e.appendFile=function(e,t,n,i){return"function"==typeof n&&(i=n,n=null),function e(t,n,i,o,s){return l(t,n,i,(function(a){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?"function"==typeof o&&o.apply(this,arguments):r([e,[t,n,i,o],a,s||Date.now(),Date.now()])}))}(e,t,n,i)});var f=e.copyFile;f&&(e.copyFile=function(e,t,n,i){return"function"==typeof n&&(i=n,n=0),function e(t,n,i,o,s){return f(t,n,i,(function(a){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?"function"==typeof o&&o.apply(this,arguments):r([e,[t,n,i,o],a,s||Date.now(),Date.now()])}))}(e,t,n,i)});var p=e.readdir;e.readdir=function(e,t,n){function i(e,t,n,i){return function(s,a){!s||"EMFILE"!==s.code&&"ENFILE"!==s.code?(a&&a.sort&&a.sort(),"function"==typeof n&&n.call(this,s,a)):r([o,[e,t,n],s,i||Date.now(),Date.now()])}}"function"==typeof t&&(n=t,t=null);var o=d.test(process.version)?function(e,t,r,n){return p(e,i(e,t,r,n))}:function(e,t,r,n){return p(e,t,i(e,t,r,n))};return o(e,t,n)};var d=/^v[0-5]\./;if("v0.8"===process.version.substr(0,4)){var h=u(e);n=h.ReadStream,i=h.WriteStream}var m=e.ReadStream;m&&(n.prototype=Object.create(m.prototype),n.prototype.open=function(){var e=this;o(e.path,e.flags,e.mode,(function(t,r){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r),e.read())}))});var y=e.WriteStream;y&&(i.prototype=Object.create(y.prototype),i.prototype.open=function(){var e=this;o(e.path,e.flags,e.mode,(function(t,r){t?(e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return n},set:function(e){n=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return i},set:function(e){i=e},enumerable:!0,configurable:!0});var v=n;Object.defineProperty(e,"FileReadStream",{get:function(){return v},set:function(e){v=e},enumerable:!0,configurable:!0});var w=i;Object.defineProperty(e,"FileWriteStream",{get:function(){return w},set:function(e){w=e},enumerable:!0,configurable:!0});var g=e.open;return e.open=o,e}function r(e){d("ENQUEUE",e[0].name,e[1]),a[o].push(e),i()}function n(){for(var e=Date.now(),t=0;a[o].length>t;++t)a[o][t].length>2&&(a[o][t][3]=e,a[o][t][4]=e);i()}function i(){if(clearTimeout(p),p=void 0,0!==a[o].length){var e=a[o].shift(),t=e[0],r=e[1],n=e[2],s=e[3],c=e[4];if(void 0===s)d("RETRY",t.name,r),t.apply(null,r);else if(6e4>Date.now()-s){var u=Date.now()-c;Math.min(1.2*Math.max(c-s,1),100)>u?a[o].push(e):(d("RETRY",t.name,r),t.apply(null,r.concat([s])))}else{d("TIMEOUT",t.name,r);var l=r.pop();"function"==typeof l&&l.call(null,n)}void 0===p&&(p=setTimeout(i,0))}}if(ah)return sh;ah=1;var o,s,a=Rn,c=function(){if(th)return eh;th=1;var e=Mn,t=process.cwd,r=null,n=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return r||(r=t.call(process)),r};try{process.cwd()}catch(o){}if("function"==typeof process.chdir){var i=process.chdir;process.chdir=function(e){r=null,i.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,i)}return eh=function(t){function r(e){return e?function(r,n,i){return e.call(t,r,n,(function(e){l(e)&&(e=null),i&&i.apply(this,arguments)}))}:e}function i(e){return e?function(r,n){try{return e.call(t,r,n)}catch(o){if(!l(o))throw o}}:e}function s(e){return e?function(r,n,i,o){return e.call(t,r,n,i,(function(e){l(e)&&(e=null),o&&o.apply(this,arguments)}))}:e}function a(e){return e?function(r,n,i){try{return e.call(t,r,n,i)}catch(o){if(!l(o))throw o}}:e}function c(e){return e?function(r,n,i){function o(e,t){t&&(0>t.uid&&(t.uid+=4294967296),0>t.gid&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof n&&(i=n,n=null),n?e.call(t,r,n,o):e.call(t,r,o)}:e}function u(e){return e?function(r,n){var i=n?e.call(t,r,n):e.call(t,r);return i&&(0>i.uid&&(i.uid+=4294967296),0>i.gid&&(i.gid+=4294967296)),i}:e}function l(e){return!e||"ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code)}var f;e.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&((f=t).lchmod=function(t,r,n){f.open(t,e.O_WRONLY|e.O_SYMLINK,r,(function(e,t){e?n&&n(e):f.fchmod(t,r,(function(e){f.close(t,(function(t){n&&n(e||t)}))}))}))},f.lchmodSync=function(t,r){var n,i=f.openSync(t,e.O_WRONLY|e.O_SYMLINK,r),s=!0;try{n=f.fchmodSync(i,r),s=!1}finally{if(s)try{f.closeSync(i)}catch(o){}else f.closeSync(i)}return n}),t.lutimes||function(t){e.hasOwnProperty("O_SYMLINK")&&t.futimes?(t.lutimes=function(r,n,i,o){t.open(r,e.O_SYMLINK,(function(e,r){e?o&&o(e):t.futimes(r,n,i,(function(e){t.close(r,(function(t){o&&o(e||t)}))}))}))},t.lutimesSync=function(r,n,i){var s,a=t.openSync(r,e.O_SYMLINK),c=!0;try{s=t.futimesSync(a,n,i),c=!1}finally{if(c)try{t.closeSync(a)}catch(o){}else t.closeSync(a)}return s}):t.futimes&&(t.lutimes=function(e,t,r,n){n&&process.nextTick(n)},t.lutimesSync=function(){})}(t),t.chown=s(t.chown),t.fchown=s(t.fchown),t.lchown=s(t.lchown),t.chmod=r(t.chmod),t.fchmod=r(t.fchmod),t.lchmod=r(t.lchmod),t.chownSync=a(t.chownSync),t.fchownSync=a(t.fchownSync),t.lchownSync=a(t.lchownSync),t.chmodSync=i(t.chmodSync),t.fchmodSync=i(t.fchmodSync),t.lchmodSync=i(t.lchmodSync),t.stat=c(t.stat),t.fstat=c(t.fstat),t.lstat=c(t.lstat),t.statSync=u(t.statSync),t.fstatSync=u(t.fstatSync),t.lstatSync=u(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(e,t,r){r&&process.nextTick(r)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(e,t,r,n){n&&process.nextTick(n)},t.lchownSync=function(){}),"win32"===n&&(t.rename="function"!=typeof t.rename?t.rename:function(e){function r(r,n,i){var o=Date.now(),s=0;e(r,n,(function a(c){if(c&&("EACCES"===c.code||"EPERM"===c.code||"EBUSY"===c.code)&&6e4>Date.now()-o)return setTimeout((function(){t.stat(n,(function(t,o){t&&"ENOENT"===t.code?e(r,n,a):i(c)}))}),s),void(100>s&&(s+=10));i&&i(c)}))}return Object.setPrototypeOf&&Object.setPrototypeOf(r,e),r}(t.rename)),t.read="function"!=typeof t.read?t.read:function(e){function r(r,n,i,o,s,a){var c;if(a&&"function"==typeof a){var u=0;c=function(l,f,p){if(l&&"EAGAIN"===l.code&&10>u)return u++,e.call(t,r,n,i,o,s,c);a.apply(this,arguments)}}return e.call(t,r,n,i,o,s,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(r,e),r}(t.read),t.readSync="function"!=typeof t.readSync?t.readSync:function(e){return function(r,n,i,s,a){for(var c=0;;)try{return e.call(t,r,n,i,s,a)}catch(o){if("EAGAIN"===o.code&&10>c){c++;continue}throw o}}}(t.readSync)},eh}(),u=function(){if(nh)return rh;nh=1;var e=Fn.Stream;return rh=function(t){return{ReadStream:function r(n,i){if(!(this instanceof r))return new r(n,i);e.call(this);var o=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536;for(var s=Object.keys(i=i||{}),a=0,c=s.length;c>a;a++){var u=s[a];this[u]=i[u]}if(this.encoding&&this.setEncoding(this.encoding),void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw Error("start must be <= end");this.pos=this.start}null===this.fd?t.open(this.path,this.flags,this.mode,(function(e,t){if(e)return o.emit("error",e),void(o.readable=!1);o.fd=t,o.emit("open",t),o._read()})):process.nextTick((function(){o._read()}))},WriteStream:function r(n,i){if(!(this instanceof r))return new r(n,i);e.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0;for(var o=Object.keys(i=i||{}),s=0,a=o.length;a>s;s++){var c=o[s];this[c]=i[c]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(0>this.start)throw Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}}}(),l=function(){if(oh)return ih;oh=1,ih=function(t){if(null===t||"object"!=typeof t)return t;if(t instanceof Object)var r={__proto__:e(t)};else r=Object.create(null);return Object.getOwnPropertyNames(t).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))})),r};var e=Object.getPrototypeOf||function(e){return e.__proto__};return ih}(),f=Cn;"function"==typeof Symbol&&"function"==typeof Symbol.for?(o=Symbol.for("graceful-fs.queue"),s=Symbol.for("graceful-fs.previous")):(o="___graceful-fs.queue",s="___graceful-fs.previous");var p,d=function(){};return f.debuglog?d=f.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(d=function(){var e=f.format.apply(f,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),a[o]||(e(a,Wn[o]||[]),a.close=function(e){function t(t,r){return e.call(a,t,(function(e){e||n(),"function"==typeof r&&r.apply(this,arguments)}))}return Object.defineProperty(t,s,{value:e}),t}(a.close),a.closeSync=function(e){function t(t){e.apply(a,arguments),n()}return Object.defineProperty(t,s,{value:e}),t}(a.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){d(a[o]),Ln.equal(a[o].length,0)}))),Wn[o]||e(Wn,a[o]),sh=t(l(a)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!a.__patched&&(sh=t(a),a.__patched=!0),sh}function $t(){return ch||(ch=1,function(e){const t=Nt().fromCallback,r=Ct(),n=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter((e=>"function"==typeof r[e]));Object.assign(e,r),n.forEach((n=>{e[n]=t(r[n])})),e.exists=function(e,t){return"function"==typeof t?r.exists(e,t):new Promise((t=>r.exists(e,t)))},e.read=function(e,t,n,i,o,s){return"function"==typeof s?r.read(e,t,n,i,o,s):new Promise(((s,a)=>{r.read(e,t,n,i,o,((e,t,r)=>{if(e)return a(e);s({bytesRead:t,buffer:r})}))}))},e.write=function(e,t,...n){return"function"==typeof n[n.length-1]?r.write(e,t,...n):new Promise(((i,o)=>{r.write(e,t,...n,((e,t,r)=>{if(e)return o(e);i({bytesWritten:t,buffer:r})}))}))},e.readv=function(e,t,...n){return"function"==typeof n[n.length-1]?r.readv(e,t,...n):new Promise(((i,o)=>{r.readv(e,t,...n,((e,t,r)=>{if(e)return o(e);i({bytesRead:t,buffers:r})}))}))},e.writev=function(e,t,...n){return"function"==typeof n[n.length-1]?r.writev(e,t,...n):new Promise(((i,o)=>{r.writev(e,t,...n,((e,t,r)=>{if(e)return o(e);i({bytesWritten:t,buffers:r})}))}))},"function"==typeof r.realpath.native?e.realpath.native=t(r.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")}(um)),um}function At(){if(uh)return pm;uh=1;const e=In;return pm.checkPath=function(t){if("win32"===process.platform&&/[<>:"|?*]/.test(t.replace(e.parse(t).root,""))){const e=Error("Path contains invalid characters: "+t);throw e.code="EINVAL",e}},pm}function Lt(){if(lh)return fm;lh=1;const e=$t(),{checkPath:t}=At(),r=e=>"number"==typeof e?e:{mode:511,...e}.mode;return fm.makeDir=async(n,i)=>(t(n),e.mkdir(n,{mode:r(i),recursive:!0})),fm.makeDirSync=(n,i)=>(t(n),e.mkdirSync(n,{mode:r(i),recursive:!0})),fm}function kt(){if(ph)return fh;ph=1;const e=Nt().fromPromise,{makeDir:t,makeDirSync:r}=Lt(),n=e(t);return fh={mkdirs:n,mkdirsSync:r,mkdirp:n,mkdirpSync:r,ensureDir:n,ensureDirSync:r}}function Dt(){if(hh)return dh;hh=1;const e=Nt().fromPromise,t=$t();return dh={pathExists:e((function(e){return t.access(e).then((()=>!0)).catch((()=>!1))})),pathExistsSync:t.existsSync}}function jt(){if(yh)return mh;yh=1;const e=$t(),t=Nt().fromPromise;return mh={utimesMillis:t((async function(t,r,n){const i=await e.open(t,"r+");let o=null;try{await e.futimes(i,r,n)}finally{try{await e.close(i)}catch(s){o=s}}if(o)throw o})),utimesMillisSync:function(t,r,n){const i=e.openSync(t,"r+");return e.futimesSync(i,r,n),e.closeSync(i)}}}function Ut(){function e(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function t(e,t){const r=i.resolve(e).split(i.sep).filter((e=>e)),n=i.resolve(t).split(i.sep).filter((e=>e));return r.every(((e,t)=>n[t]===e))}function r(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}if(wh)return vh;wh=1;const n=$t(),i=In,o=Nt().fromPromise;return vh={checkPaths:o((async function(o,s,a,c){const{srcStat:u,destStat:l}=await function(e,t,r){const i=r.dereference?e=>n.stat(e,{bigint:!0}):e=>n.lstat(e,{bigint:!0});return Promise.all([i(e),i(t).catch((e=>{if("ENOENT"===e.code)return null;throw e}))]).then((([e,t])=>({srcStat:e,destStat:t})))}(o,s,c);if(l){if(e(u,l)){const e=i.basename(o),t=i.basename(s);if("move"===a&&e!==t&&e.toLowerCase()===t.toLowerCase())return{srcStat:u,destStat:l,isChangingCase:!0};throw Error("Source and destination must not be the same.")}if(u.isDirectory()&&!l.isDirectory())throw Error(`Cannot overwrite non-directory '${s}' with directory '${o}'.`);if(!u.isDirectory()&&l.isDirectory())throw Error(`Cannot overwrite directory '${s}' with non-directory '${o}'.`)}if(u.isDirectory()&&t(o,s))throw Error(r(o,s,a));return{srcStat:u,destStat:l}})),checkPathsSync:function(o,s,a,c){const{srcStat:u,destStat:l}=function(e,t,r){let i;const o=r.dereference?e=>n.statSync(e,{bigint:!0}):e=>n.lstatSync(e,{bigint:!0}),s=o(e);try{i=o(t)}catch(a){if("ENOENT"===a.code)return{srcStat:s,destStat:null};throw a}return{srcStat:s,destStat:i}}(o,s,c);if(l){if(e(u,l)){const e=i.basename(o),t=i.basename(s);if("move"===a&&e!==t&&e.toLowerCase()===t.toLowerCase())return{srcStat:u,destStat:l,isChangingCase:!0};throw Error("Source and destination must not be the same.")}if(u.isDirectory()&&!l.isDirectory())throw Error(`Cannot overwrite non-directory '${s}' with directory '${o}'.`);if(!u.isDirectory()&&l.isDirectory())throw Error(`Cannot overwrite directory '${s}' with non-directory '${o}'.`)}if(u.isDirectory()&&t(o,s))throw Error(r(o,s,a));return{srcStat:u,destStat:l}},checkParentPaths:o((async function t(o,s,a,c){const u=i.resolve(i.dirname(o)),l=i.resolve(i.dirname(a));if(l===u||l===i.parse(l).root)return;let f;try{f=await n.stat(l,{bigint:!0})}catch(p){if("ENOENT"===p.code)return;throw p}if(e(s,f))throw Error(r(o,a,c));return t(o,s,l,c)})),checkParentPathsSync:function t(o,s,a,c){const u=i.resolve(i.dirname(o)),l=i.resolve(i.dirname(a));if(l===u||l===i.parse(l).root)return;let f;try{f=n.statSync(l,{bigint:!0})}catch(p){if("ENOENT"===p.code)return;throw p}if(e(s,f))throw Error(r(o,a,c));return t(o,s,l,c)},isSrcSubdir:t,areIdentical:e}}function Ft(){async function e(e,t,r){return!r.filter||r.filter(e,t)}async function t(o,s,a,u){const l=u.dereference?n.stat:n.lstat,f=await l(s);if(f.isDirectory())return async function(r,o,s,a,u){o||await n.mkdir(a);const l=[];for await(const f of await n.opendir(s)){const r=i.join(s,f.name),n=i.join(a,f.name);l.push(e(r,n,u).then((e=>{if(e)return c.checkPaths(r,n,"copy",u).then((({destStat:e})=>t(e,r,n,u)))})))}await Promise.all(l),o||await n.chmod(a,r.mode)}(f,o,s,a,u);if(f.isFile()||f.isCharacterDevice()||f.isBlockDevice())return async function(e,t,i,o,s){if(!t)return r(e,i,o,s);if(s.overwrite)return await n.unlink(o),r(e,i,o,s);if(s.errorOnExist)throw Error(`'${o}' already exists`)}(f,o,s,a,u);if(f.isSymbolicLink())return async function(e,t,r,o){let s=await n.readlink(t);if(o.dereference&&(s=i.resolve(process.cwd(),s)),!e)return n.symlink(s,r);let a=null;try{a=await n.readlink(r)}catch(u){if("EINVAL"===u.code||"UNKNOWN"===u.code)return n.symlink(s,r);throw u}if(o.dereference&&(a=i.resolve(process.cwd(),a)),c.isSrcSubdir(s,a))throw Error(`Cannot copy '${s}' to a subdirectory of itself, '${a}'.`);if(c.isSrcSubdir(a,s))throw Error(`Cannot overwrite '${a}' with '${s}'.`);return await n.unlink(r),n.symlink(s,r)}(o,s,a,u);if(f.isSocket())throw Error("Cannot copy a socket file: "+s);if(f.isFIFO())throw Error("Cannot copy a FIFO pipe: "+s);throw Error("Unknown file: "+s)}async function r(e,t,r,i){if(await n.copyFile(t,r),i.preserveTimestamps){128&e.mode||await function(e,t){return n.chmod(e,128|t)}(r,e.mode);const i=await n.stat(t);await a(r,i.atime,i.mtime)}return n.chmod(r,e.mode)}if(Eh)return gh;Eh=1;const n=$t(),i=In,{mkdirs:o}=kt(),{pathExists:s}=Dt(),{utimesMillis:a}=jt(),c=Ut();return gh=async function(r,n,a={}){"function"==typeof a&&(a={filter:a}),a.clobber=!("clobber"in a)||!!a.clobber,a.overwrite="overwrite"in a?!!a.overwrite:a.clobber,a.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0001");const{srcStat:u,destStat:l}=await c.checkPaths(r,n,"copy",a);if(await c.checkParentPaths(r,u,n,"copy"),!(await e(r,n,a)))return;const f=i.dirname(n);await s(f)||await o(f),await t(l,r,n,a)}}function Mt(){function e(e,i,a,c){const l=(c.dereference?o.statSync:o.lstatSync)(i);if(l.isDirectory())return function(e,t,i,s,a){return t?n(i,s,a):function(e,t,i,s){return o.mkdirSync(i),n(t,i,s),r(i,e)}(e.mode,i,s,a)}(l,e,i,a,c);if(l.isFile()||l.isCharacterDevice()||l.isBlockDevice())return function(e,r,n,i,s){return r?function(e,r,n,i){if(i.overwrite)return o.unlinkSync(n),t(e,r,n,i);if(i.errorOnExist)throw Error(`'${n}' already exists`)}(e,n,i,s):t(e,n,i,s)}(l,e,i,a,c);if(l.isSymbolicLink())return function(e,t,r,n){let i=o.readlinkSync(t);if(n.dereference&&(i=s.resolve(process.cwd(),i)),e){let e;try{e=o.readlinkSync(r)}catch(a){if("EINVAL"===a.code||"UNKNOWN"===a.code)return o.symlinkSync(i,r);throw a}if(n.dereference&&(e=s.resolve(process.cwd(),e)),u.isSrcSubdir(i,e))throw Error(`Cannot copy '${i}' to a subdirectory of itself, '${e}'.`);if(u.isSrcSubdir(e,i))throw Error(`Cannot overwrite '${e}' with '${i}'.`);return function(e,t){return o.unlinkSync(t),o.symlinkSync(e,t)}(i,r)}return o.symlinkSync(i,r)}(e,i,a,c);if(l.isSocket())throw Error("Cannot copy a socket file: "+i);if(l.isFIFO())throw Error("Cannot copy a FIFO pipe: "+i);throw Error("Unknown file: "+i)}function t(e,t,n,i){return o.copyFileSync(t,n),i.preserveTimestamps&&function(e,t,n){(function(e){return!(128&e)})(e)&&function(e,t){r(e,128|t)}(n,e),function(e,t){const r=o.statSync(e);c(t,r.atime,r.mtime)}(t,n)}(e.mode,t,n),r(n,e.mode)}function r(e,t){return o.chmodSync(e,t)}function n(e,t,r){const n=o.opendirSync(e);try{let o;for(;null!==(o=n.readSync());)i(o.name,e,t,r)}finally{n.closeSync()}}function i(t,r,n,i){const o=s.join(r,t),a=s.join(n,t);if(i.filter&&!i.filter(o,a))return;const{destStat:c}=u.checkPathsSync(o,a,"copy",i);return e(c,o,a,i)}if(bh)return _h;bh=1;const o=Ct(),s=In,a=kt().mkdirsSync,c=jt().utimesMillisSync,u=Ut();return _h=function(t,r,n){"function"==typeof n&&(n={filter:n}),(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0002");const{srcStat:i,destStat:c}=u.checkPathsSync(t,r,"copy",n);if(u.checkParentPathsSync(t,i,r,"copy"),n.filter&&!n.filter(t,r))return;const l=s.dirname(r);return o.existsSync(l)||a(l),e(c,t,r,n)}}function Gt(){if(Oh)return Sh;Oh=1;const e=Nt().fromPromise;return Sh={copy:e(Ft()),copySync:Mt()}}function Bt(){if(Ih)return Rh;Ih=1;const e=Ct(),t=Nt().fromCallback;return Rh={remove:t((function(t,r){e.rm(t,{recursive:!0,force:!0},r)})),removeSync:function(t){e.rmSync(t,{recursive:!0,force:!0})}}}function qt(){function e(e){let t;try{t=r.readdirSync(e)}catch{return i.mkdirsSync(e)}t.forEach((t=>{t=n.join(e,t),o.removeSync(t)}))}if(Ph)return xh;Ph=1;const t=Nt().fromPromise,r=$t(),n=In,i=kt(),o=Bt(),s=t((async function(e){let t;try{t=await r.readdir(e)}catch{return i.mkdirs(e)}return Promise.all(t.map((t=>o.remove(n.join(e,t)))))}));return xh={emptyDirSync:e,emptydirSync:e,emptyDir:s,emptydir:s}}function Ht(){if(Nh)return Th;Nh=1;const e=Nt().fromPromise,t=In,r=$t(),n=kt();return Th={createFile:e((async function(e){let i;try{i=await r.stat(e)}catch{}if(i&&i.isFile())return;const o=t.dirname(e);let s=null;try{s=await r.stat(o)}catch(a){if("ENOENT"===a.code)return await n.mkdirs(o),void(await r.writeFile(e,""));throw a}s.isDirectory()?await r.writeFile(e,""):await r.readdir(o)})),createFileSync:function(e){let i;try{i=r.statSync(e)}catch{}if(i&&i.isFile())return;const o=t.dirname(e);try{r.statSync(o).isDirectory()||r.readdirSync(o)}catch(s){if(!s||"ENOENT"!==s.code)throw s;n.mkdirsSync(o)}r.writeFileSync(e,"")}}}function Vt(){if($h)return Ch;$h=1;const e=Nt().fromPromise,t=In,r=$t(),n=kt(),{pathExists:i}=Dt(),{areIdentical:o}=Ut();return Ch={createLink:e((async function(e,s){let a,c;try{a=await r.lstat(s)}catch{}try{c=await r.lstat(e)}catch(l){throw l.message=l.message.replace("lstat","ensureLink"),l}if(a&&o(c,a))return;const u=t.dirname(s);await i(u)||await n.mkdirs(u),await r.link(e,s)})),createLinkSync:function(e,i){let s;try{s=r.lstatSync(i)}catch{}try{const t=r.lstatSync(e);if(s&&o(t,s))return}catch(c){throw c.message=c.message.replace("lstat","ensureLink"),c}const a=t.dirname(i);return r.existsSync(a)||n.mkdirsSync(a),r.linkSync(e,i)}}}function zt(){if(Lh)return Ah;Lh=1;const e=In,t=$t(),{pathExists:r}=Dt(),n=Nt().fromPromise;return Ah={symlinkPaths:n((async function(n,i){if(e.isAbsolute(n)){try{await t.lstat(n)}catch(a){throw a.message=a.message.replace("lstat","ensureSymlink"),a}return{toCwd:n,toDst:n}}const o=e.dirname(i),s=e.join(o,n);if(await r(s))return{toCwd:s,toDst:n};try{await t.lstat(n)}catch(a){throw a.message=a.message.replace("lstat","ensureSymlink"),a}return{toCwd:n,toDst:e.relative(o,n)}})),symlinkPathsSync:function(r,n){if(e.isAbsolute(r)){if(!t.existsSync(r))throw Error("absolute srcpath does not exist");return{toCwd:r,toDst:r}}const i=e.dirname(n),o=e.join(i,r);if(t.existsSync(o))return{toCwd:o,toDst:r};if(!t.existsSync(r))throw Error("relative srcpath does not exist");return{toCwd:r,toDst:e.relative(i,r)}}}}function Wt(){if(Dh)return kh;Dh=1;const e=$t(),t=Nt().fromPromise;return kh={symlinkType:t((async function(t,r){if(r)return r;let n;try{n=await e.lstat(t)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"})),symlinkTypeSync:function(t,r){if(r)return r;let n;try{n=e.lstatSync(t)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"}}}function Xt(){if(Uh)return jh;Uh=1;const e=Nt().fromPromise,t=In,r=$t(),{mkdirs:n,mkdirsSync:i}=kt(),{symlinkPaths:o,symlinkPathsSync:s}=zt(),{symlinkType:a,symlinkTypeSync:c}=Wt(),{pathExists:u}=Dt(),{areIdentical:l}=Ut();return jh={createSymlink:e((async function(e,i,s){let c;try{c=await r.lstat(i)}catch{}if(c&&c.isSymbolicLink()){const[t,n]=await Promise.all([r.stat(e),r.stat(i)]);if(l(t,n))return}const f=await o(e,i);e=f.toDst;const p=await a(f.toCwd,s),d=t.dirname(i);return await u(d)||await n(d),r.symlink(e,i,p)})),createSymlinkSync:function(e,n,o){let a;try{a=r.lstatSync(n)}catch{}if(a&&a.isSymbolicLink()){const t=r.statSync(e),i=r.statSync(n);if(l(t,i))return}const u=s(e,n);e=u.toDst,o=c(u.toCwd,o);const f=t.dirname(n);return r.existsSync(f)||i(f),r.symlinkSync(e,n,o)}}}function Yt(){if(Mh)return Fh;Mh=1;const{createFile:e,createFileSync:t}=Ht(),{createLink:r,createLinkSync:n}=Vt(),{createSymlink:i,createSymlinkSync:o}=Xt();return Fh={createFile:e,createFileSync:t,ensureFile:e,ensureFileSync:t,createLink:r,createLinkSync:n,ensureLink:r,ensureLinkSync:n,createSymlink:i,createSymlinkSync:o,ensureSymlink:i,ensureSymlinkSync:o}}function Kt(){return Bh?Gh:(Bh=1,Gh={stringify:function(e,{EOL:t="\n",finalEOL:r=!0,replacer:n=null,spaces:i}={}){const o=r?t:"";return JSON.stringify(e,n,i).replace(/\n/g,t)+o},stripBom:function(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}})}function Jt(){if(zh)return Vh;zh=1;const e=function(){if(Hh)return qh;let e;Hh=1;try{e=Ct()}catch(s){e=Rn}const t=Nt(),{stringify:r,stripBom:n}=Kt(),i=t.fromPromise((async function(r,i={}){"string"==typeof i&&(i={encoding:i});const o=i.fs||e,s=!("throws"in i)||i.throws;let a,c=await t.fromCallback(o.readFile)(r,i);c=n(c);try{a=JSON.parse(c,i?i.reviver:null)}catch(u){if(s)throw u.message=`${r}: ${u.message}`,u;return null}return a})),o=t.fromPromise((async function(n,i,o={}){const s=o.fs||e,a=r(i,o);await t.fromCallback(s.writeFile)(n,a,o)}));return qh={readFile:i,readFileSync:function(t,r={}){"string"==typeof r&&(r={encoding:r});const i=r.fs||e,o=!("throws"in r)||r.throws;try{let e=i.readFileSync(t,r);return e=n(e),JSON.parse(e,r.reviver)}catch(s){if(o)throw s.message=`${t}: ${s.message}`,s;return null}},writeFile:o,writeFileSync:function(t,n,i={}){const o=i.fs||e,s=r(n,i);return o.writeFileSync(t,s,i)}}}();return Vh={readJson:e.readFile,readJsonSync:e.readFileSync,writeJson:e.writeFile,writeJsonSync:e.writeFileSync}}function Qt(){if(Xh)return Wh;Xh=1;const e=Nt().fromPromise,t=$t(),r=In,n=kt(),i=Dt().pathExists;return Wh={outputFile:e((async function(e,o,s="utf-8"){const a=r.dirname(e);return await i(a)||await n.mkdirs(a),t.writeFile(e,o,s)})),outputFileSync:function(e,...i){const o=r.dirname(e);t.existsSync(o)||n.mkdirsSync(o),t.writeFileSync(e,...i)}}}function Zt(){if(Kh)return Yh;Kh=1;const{stringify:e}=Kt(),{outputFile:t}=Qt();return Yh=async function(r,n,i={}){const o=e(n,i);await t(r,o,i)}}function er(){if(Qh)return Jh;Qh=1;const{stringify:e}=Kt(),{outputFileSync:t}=Qt();return Jh=function(r,n,i){const o=e(n,i);t(r,o,i)}}function tr(){if(em)return Zh;em=1;const e=Nt().fromPromise,t=Jt();return t.outputJson=e(Zt()),t.outputJsonSync=er(),t.outputJSON=t.outputJson,t.outputJSONSync=t.outputJsonSync,t.writeJSON=t.writeJson,t.writeJSONSync=t.writeJsonSync,t.readJSON=t.readJson,t.readJSONSync=t.readJsonSync,Zh=t}function rr(){if(rm)return tm;rm=1;const e=$t(),t=In,{copy:r}=Gt(),{remove:n}=Bt(),{mkdirp:i}=kt(),{pathExists:o}=Dt(),s=Ut();return tm=async function(a,c,u={}){const l=u.overwrite||u.clobber||!1,{srcStat:f,isChangingCase:p=!1}=await s.checkPaths(a,c,"move",u);await s.checkParentPaths(a,f,c,"move");const d=t.dirname(c);return t.parse(d).root!==d&&await i(d),async function(t,i,s,a){if(!a)if(s)await n(i);else if(await o(i))throw Error("dest already exists.");try{await e.rename(t,i)}catch(c){if("EXDEV"!==c.code)throw c;await async function(e,t,i){const o={overwrite:i,errorOnExist:!0,preserveTimestamps:!0};return await r(e,t,o),n(e)}(t,i,s)}}(a,c,l,p)}}function nr(){function e(e,r,o){try{t.renameSync(e,r)}catch(s){if("EXDEV"!==s.code)throw s;return function(e,t,r){return n(e,t,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),i(e)}(e,r,o)}}if(im)return nm;im=1;const t=Ct(),r=In,n=Gt().copySync,i=Bt().removeSync,o=kt().mkdirpSync,s=Ut();return nm=function(n,a,c){const u=(c=c||{}).overwrite||c.clobber||!1,{srcStat:l,isChangingCase:f=!1}=s.checkPathsSync(n,a,"move",c);return s.checkParentPathsSync(n,l,a,"move"),function(e){const t=r.dirname(e);return r.parse(t).root===t}(a)||o(r.dirname(a)),function(r,n,o,s){if(s)return e(r,n,o);if(o)return i(n),e(r,n,o);if(t.existsSync(n))throw Error("dest already exists.");return e(r,n,o)}(n,a,u,f)}}function ir(){if(sm)return om;sm=1;const e=Nt().fromPromise;return om={move:e(rr()),moveSync:nr()}}function or(){return cm?am:(cm=1,am={...$t(),...Gt(),...qt(),...Yt(),...tr(),...kt(),...ir(),...Qt(),...Dt(),...Bt()})}function sr(e,t,r){switch(process.platform){case"win32":return ht("7zip",e);case"darwin":return ut("p7zip",e);case"linux":if(ft())return yt("p7zip",e);if(lt())return mt([{name:"p7zip",version:e},{name:"p7zip-plugins",version:e}]);if(pt())return Ze([{name:"p7zip-full",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}function ar(e){const t=e.split(".").pop();return"tar"===t?0:"gz"===t||"tgz"===t?1:"xz"===t||"txz"===t?2:"zip"===t?3:("7z"===t||"exe"===t||p(`Unknown archive type: ${t}. Defaulting to 7z`),4)}function cr(e){switch(e){case 0:case 1:case 2:return pr;case 3:return fr;default:return ur}}async function ur(e,t){const r=In.basename(e);if(/.*\.tar\..+$/.test(r)){const n=In.dirname(e);await lr(e,n);const i=r.slice(0,-3),o=In.join(n,i);await lr(o,n),await Js(o);const s=i.slice(0,-4),a=In.join(n,s);h(`Moving ${a} to ${t}`),await dm.move(a,t,{overwrite:!0})}else await lr(e,t);return t}async function lr(e,t){h(`7z: extracting ${e} to ${t}`),await E(await async function(){return void 0===hm&&(null===aa.sync("7z",{nothrow:!0})&&await sr("",0,process),hm="7z"),hm}(),["x",e,"-o"+t,"-y"],{stdio:"inherit"}),await L(t)}async function fr(e,t){return null!==aa.sync("7z",{nothrow:!0})?ur(e,t):null!==aa.sync("unzip",{nothrow:!0})?(await E("unzip",["-q",e,"-d",t],{stdio:"inherit"}),await L(t),t):ur(e,t)}async function pr(e,t,r=0,n=[]){await async function(e){switch(h("Installing tar extraction dependencies"),e){case 1:"linux"===process.platform&&(ft()?(await yt("gzip"),await yt("tar")):lt()?await mt([{name:"gzip"},{name:"tar"}]):pt()&&await Ze([{name:"gzip"},{name:"tar"}]));break;case 2:"linux"===process.platform&&(ft()?(await yt("xz"),await yt("tar")):lt()?await mt([{name:"xz"},{name:"tar"}]):pt()&&await Ze([{name:"xz-utils"},{name:"tar"}]));break;default:throw Error(`Unsupported archive type: ${e} for tar extraction`)}}(ar(e));try{await dm.mkdirp(t)}catch{}try{await E("tar",["xf",e,"-C",t,"--strip-components="+r,...n],{stdio:"inherit"})}catch(i){"win32"===process.platform&&i.message.includes("Can't create '\\\\?\\C:")&&p(`Failed to extract symlink ${e} to ${t}. Ignoring this symlink.`)}return await L(t),t}async function dr(e,t,r,n,i){var o,s;h(`Installing ${e} ${t} ${i} via direct downloading`),process.env.RUNNER_TEMP=null!=(o=process.env.RUNNER_TEMP)?o:On.tmpdir(),process.env.RUNNER_TOOL_CACHE=null!=(s=process.env.RUNNER_TOOL_CACHE)?s:In.join(On.tmpdir(),"setup-cpp","hostedtoolcache");const{url:a,binRelativeDir:c,binFileName:u,extractedFolderName:l,extractFunction:f}=await r(t,process.platform,i);if(mm)try{const r=Kd.find(e,t);if(r){const n=In.join(r,l),i=In.join(n,c);if(await se(In.join(i,u)))return h(`${e} ${t} was found in the cache at ${i}.`),await pe(i,xy),{installDir:n,binDir:i}}}catch{}const d=In.join(n,l),m=In.join(d,c),y=In.join(m,u);return await async function(e,t,r,n,i,o,s,a){if((await Promise.all([se(e),se(t)])).includes(!1))try{const e=await async function(e,t,r){h(`Download ${e} ${t}`);const n=await Qd((()=>{var e;const t=In.join(null!=(e=process.env.RUNNER_TEMP)?e:On.tmpdir(),`${Date.now()}-${In.basename(r)}`);return Kd.downloadTool(r,t)}),{name:r,max:4,backoffBase:2e3,report:e=>h(e)});return n}(r,n,i);h(`Extracting ${e} to ${o}`);const t=null!=s?s:cr(ar(i));await t(e,o)}catch(c){throw Error(`Failed to download ${r} ${n} ${a} from ${i}: ${c}`)}if(h(`Add ${e} to PATH`),await pe(e,xy),!(await se(t)))throw Error(`Failed to find the binary ${t} after extracting ${r} ${n} ${a}`);if("win32"!==process.platform)try{await Ts(t,"755")}catch(c){p(`Failed to make ${t} executable: ${c}`)}}(m,y,e,t,a,n,f,i),await async function(e,t,r){mm&&"string"==typeof process.env.RUNNER_TOOL_CACHE&&("true"!==_n("cache-tools")&&"true"!==process.env.CACHE_TOOLS||await Kd.cacheDir(e,t,r))}(n,e,t),{installDir:d,binDir:m}}function hr(e,t,r){var n;const i=null!=(n=Cd(e))?n:e;switch(t){case"win32":{const t=$d(i,"v3.19.6");let n;Ad.includes(r)?n=t?"win64-x64":"windows-x86_64":Ld.includes(r)?n=t?"win32-x86":"windows-i386":kd.includes(r)?n="windows-arm64":(h(`Trying unsupported arch '${r}' for cmake on Windows`),n="windows-"+r);const o=`cmake-${e}-${n}`;return{binRelativeDir:"bin/",binFileName:_t("cmake"),extractedFolderName:o,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${o}.zip`}}case"darwin":{const t=`cmake-${e}-${$d(i,"v3.19.1")?"Darwin-x86_64":"macos-universal"}`;return{binRelativeDir:"CMake.app/Contents/bin/",binFileName:_t("cmake"),extractedFolderName:t,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${t}.tar.gz`}}case"linux":{const t=$d(i,"v3.19.8");let n;kd.includes(r)?n=t?"Linux-aarch64":"linux-aarch64":Ad.includes(r)?n=t?"Linux-x86_64":"linux-x86_64":(h(`Trying unsupported arch '${r}' for cmake on Linux`),n="linux-"+r);const o=`cmake-${e}-${n}`;return{binRelativeDir:"bin/",binFileName:_t("cmake"),extractedFolderName:o,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${o}.tar.gz`}}default:throw Error(`Unsupported platform '${t}'`)}}function mr(e,t,r){return dr("cmake",e,hr,t,r)}async function yr(e,t,r=km){const n=await async function(e,t=km){var r,n;try{const i=await Cm.getExecOutput(e,["--version"]),o=null==(r=(i.stdout||i.stderr||"").trim().match(t))?void 0:r[1];return null!=(n=Cd(o))?n:void 0}catch(i){return void console.error(i)}}(e,r);if(void 0===n||""===t)return!1;try{return-1!==$m(n,t)}catch{return Am(n,t)}}function vr(e){if(null===Lm(e))try{const t=Cd(e);if(null!==t)return h(`Coerced version '${e}' to '${t}'`),t.version}catch(t){}return e}function wr(e,t='"'){return e.includes(" ")?`${t}${e}${t}`:e}function gr(e,t,r=null){var n;return _r(t)?null!=(n=Er(e,r))?n:"":t}function Er(e,t=null){var r,n,i;const o=Dm()[e];if(void 0===o)return;if("string"==typeof o)return o;const s=null!=(r=o[process.platform])?r:o.else;if(void 0===s)throw Error(`Platform "${process.platform}" not found in versions data for tool "${e}"`);if("string"==typeof s)return s;const a=s,c=pt()?"ubuntu":ft()?"archlinux":"else",u=null!=(n=a[c])?n:a.else;if(void 0===u)throw Error(`Distro "${c}" not found in versions data for tool "${e}"`);if("string"==typeof u)return u;const l=u,f=null!==t?function(e,t){var r;const n=e[0],i=Object.keys(t).map((e=>Number.parseInt(e,10))).filter((e=>!Number.isNaN(e))).sort(((e,t)=>t-e)).find((e=>n>=e));return void 0!==i&&null!=(r=t[i])?r:t.else}(t,l):l.else;if(void 0===f)throw Error(`Architecture "${process.arch}" not found in versions data for tool "${e}"`);return"string"==typeof f?f:null!=(i=f[process.arch])?i:f.else}function _r(e){return"true"===e||void 0===e}async function br(e,t,r){const n=await async function(e,t,r){const n=function(e){return e.startsWith(">")}(e)?"":e;let i,o=await Sr(t);if(void 0!==o){const e=In.dirname(o);i={bin:o,installDir:e,binDir:e}}else{if(jm)try{h("Installing python in GitHub Actions");const{setupActionsPython:e}=await Promise.resolve().then((()=>require("./assets/actions_python-DAJt9Mk_.js")));if(await e(n,t,r),o=await Sr(t),void 0===o)throw Error("Python binary could not be found");const s=In.dirname(o);i={bin:o,installDir:s,binDir:s}}catch(s){p(""+s)}void 0===i&&(i=await async function(e,t){let r;switch(process.platform){case"win32":{e?await ht("python3",t,["--params=/InstallDir:"+e]):await ht("python3",t);const n=await Sr(e);if(void 0===n)throw Error("Python binary could not be found");const i=In.dirname(n);await pe(i,xy),r={installDir:i,binDir:i,bin:n};break}case"darwin":{r=await ut("python3",t);const e=await E("brew",["--prefix","python"],{stdio:"pipe"}),n=In.join(e.stdout,"libexec","bin");await pe(n,xy);break}case"linux":if(ft())r=await yt("python",t);else if(lt())r=await mt([{name:"python3",version:t}]);else{if(!pt())throw Error("Unsupported linux distributions");r=await Ze([{name:"python3",version:t},{name:"python-is-python3"}])}break;default:throw Error("Unsupported platform")}return r}(t,n))}if(void 0===o||void 0===i.bin){if(o=await Sr(t),void 0===o)throw Error("Python binary could not be found");i={bin:o,installDir:In.dirname(o),binDir:In.dirname(o)}}return i}(e,t,r);Ln(void 0!==n.bin);const i=n.bin;await async function(e){if(await async function(e){try{return await E(e,["-m","venv","-h"],{stdio:"ignore"}),!0}catch{}return!1}(e))h("venv module already installed.");else try{await Lr("venv")}catch(t){h(`Failed to install venv: ${""+t}. Ignoring...`)}}(i);const o=await async function(e){const t=await Rr();return void 0===t?(h("pip was not found. Installing pip"),await async function(e){await xr(e)||(await Lr("pip"),await xr(e))}(e),Rr()):t}(i);if(void 0===o)throw Error("pip was not installed correctly");return await async function(e){try{if(!(await Ar(e)))try{await Lr("pipx",ft()),await Nr(e,"pipx",void 0,{upgrade:!0,usePipx:!1})}catch(t){throw Error("pipx was not installed completely: "+t)}if(await Ar(e))return void(await E(e,["-m","pipx","ensurepath"],{stdio:"inherit"}));if(await async function(){return null!==await aa("pipx",{nothrow:!0})}())return d("pipx module not found. Trying to install with pipx binary..."),void(await E("pipx",["ensurepath"],{stdio:"inherit"}));throw Error("pipx module or pipx binary not found. Corrput pipx installation.")}catch(t){d(`Failed to install pipx: ${""+t}. Ignoring...`)}}(i),await async function(e){try{await Nr(e,"setuptools",void 0,{upgrade:!0,isLibrary:!0,usePipx:!1}),await Nr(e,"wheel",void 0,{upgrade:!1,isLibrary:!0,usePipx:!1})}catch(t){h(`Failed to install setuptools/wheel: ${""+t}. Ignoring...`)}}(i),n}async function Sr(e){for(const t of["python","python3"]){const r=await Or(t,e);if(void 0!==r)return r}if("win32"===process.platform){const e=In.parse(On.homedir()).root,t=(await Fs(e)).filter((e=>e.startsWith("Python")));for(const r of t)for(const t of["python3","python"]){const n=await Or(t,In.join(e,r));if(void 0!==n)return n}}}async function Or(e,t){var r;try{const n=Er("python");if(void 0!==t){const r=In.join(t,_t(e));if(await se(r)&&await yr(r,n))return r}const i=null!=(r=await aa(e,{nothrow:!0,all:!0}))?r:[];for(const e of i)if(await yr(e,n))return e}catch{}}async function Rr(){for(const e of["pip3","pip"]){const t=await Ir(e);if(void 0!==t)return t}}async function Ir(e){var t;try{const r=Er("pip"),n=null!=(t=await aa(e,{nothrow:!0,all:!0}))?t:[];for(const e of n)if(await yr(e,r))return e}catch{}}async function xr(e){try{return await E(e,["-m","ensurepip","-U","--upgrade"],{stdio:"inherit"}),!0}catch(t){h(""+t);try{return await E(e,["-m","pip","install","--upgrade","pip"],{stdio:"inherit"}),!0}catch(r){h(""+r)}}return!1}function Pr(){if(!("version"in On)||"function"!=typeof On.version)return null;const e=On.version().match(/(\d+)\.(\d+)\.(\d+)/);return null===e?null:[Number.parseInt(e[1],10),Number.parseInt(e[2],10),Number.parseInt(e[3],10)]}async function Tr(e,t,r={}){return Nr(await async function(e){if(void 0!==Vm)return Vm;const t=null!=e?e:gr("python",void 0,await Bm());return Vm=(await br(t,"",process.arch)).bin,Vm}(r.pythonVersion),e,t,r)}async function Nr(e,t,r,n={}){const{usePipx:i=!0,user:o=!0,upgrade:s=!1,isLibrary:a=!1}=n,c=i&&!a&&await Ar(e),u=c?"pipx":"pip",l=t.replace(/\[.*]/g,"").trim();if(!s){const t=c?await async function(e,t){try{const r=await E(e,["-m","pipx","list","--json"],{stdio:"ignore",reject:!1});if(0!==r.exitCode||"string"!=typeof r.stdout)return!1;const n=JSON.parse(r.stdout);if(t in n.venvs)return!0;for(const e of Object.values(n.venvs))if(e.metadata.main_package.package_or_url===t||e.metadata.main_package.package===t)return!0}catch{}return!1}(e,l):await async function(e,t){try{return 0===(await E(e,["-m","pip","-qq","show",t],{stdio:"ignore",reject:!1})).exitCode}catch{return!1}}(e,l);if(t)return{binDir:c?await Cr():await $r(e,l)}}const f=await async function(e,t){return 0===(await E(e,["-m","pip","-qq","index","versions",t],{stdio:"ignore",reject:!1})).exitCode}(e,l);if(f)try{zi.info(`Installing ${t} ${null!=r?r:""} via ${u}`);const n=void 0!==r&&""!==r?`${t}==${r}`:t,i=s?c?["upgrade"]:["install","--upgrade"]:["install"],a=!c&&o?["--user"]:[],l=process.env;c&&o&&(l.PIPX_HOME=await qm(),l.PIPX_BIN_DIR=await Hm()),_(e,["-m",u,...i,...a,n],{stdio:"inherit",env:l})}catch(p){if(zi.info(`Failed to install ${t} via ${u}: ${p instanceof Error?`${p.message}\n${p.stack}`:p+""}`),null===await Lr(t))throw Error(`Failed to install ${t} via ${u}: ${p}.`)}else if(null===await Lr(t))throw Error(`Failed to install ${t} as it was not found via ${u} or the system package manager`);return{binDir:c?await Cr():await $r(e,l)}}function Cr(){return Hm()}async function $r(e,t){const r=await Um(e),n=await async function(e,t){const r=(await Promise.all(e.map((e=>se(In.join(e,_t(t))))))).findIndex((e=>e));if(-1!==r)return e[r];const n=aa.sync(_t(t),{nothrow:!0});return null!==n?In.dirname(n):e[e.length-1]}(r,t);return await pe(n,xy),n}async function Ar(e){return 0===(await E(e,["-m","pipx","--help"],{stdio:"ignore",reject:!1})).exitCode}function Lr(e,t=!0){if("linux"===process.platform){if(zi.info(`Installing ${e} via the system package manager`),ft())return yt(t?"python-"+e:e);if(lt())return mt([{name:t?"python3-"+e:e}]);if(pt())return Ze([{name:t?"python3-"+e:e}])}else if("darwin"===process.platform)return["venv"].includes(e)?null:ut(e);return null}function kr(e,t,r){return Tr("cmakelang[YAML]",e)}async function Dr(e,t,r){switch(process.platform){case"win32":return await ht("graphviz",e),async function(){if("win32"===process.platform){const e="C:/Program Files/Graphviz/bin";return await pe(e,xy),{binDir:e}}throw Error("Unsupported platform")}();case"darwin":return ut("graphviz",e);case"linux":if(ft())return yt("graphviz",e);if(lt())return mt([{name:"graphviz",version:e}]);if(pt())return Ze([{name:"graphviz",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}async function jr(e,t){const{ArchiveHdi:r}=await Promise.resolve().then((()=>require("./assets/index-BLmG_vBb.js"))),n=new r(e);await n.read((async e=>{await e.extract(In.join(t,e.path))}))}function Ur(e,t,r){switch(t){case"linux":{const t="doxygen-"+e;return{binRelativeDir:"bin/",binFileName:_t("doxygen"),extractedFolderName:t,url:`https://www.doxygen.nl/files/${t}.linux.bin.tar.gz`}}case"win32":{const t="doxygen-"+e;return{binRelativeDir:"",binFileName:_t("doxygen"),extractedFolderName:t,url:`https://www.doxygen.nl/files/${t}.windows.x64.bin.zip`}}case"darwin":{const t="Doxygen-"+e;return{binRelativeDir:"Doxygen/Doxygen.app/Contents/Resources/",binFileName:_t("doxygen"),extractedFolderName:t,extractFunction:jr,url:`https://doxygen.nl/files/${t}.dmg`}}default:throw Error(`Unsupported platform '${t}'`)}}async function Fr(){if("darwin"===process.platform)try{const e=await Cm.getExecOutput("xcrun --sdk macosx --show-sdk-path"),t=e.stdout||e.stderr;t?await le("SDKROOT",t.trim(),xy):f("SDKROOT not set")}catch(e){f(e)}}async function Mr(){const e=In.join(Qm,"gcc_matcher.json");if(!(await se(e)))return p("the gcc_matcher.json file does not exist in the same folder as setup-cpp.js");h("::add-matcher::"+e)}async function Gr(e){const t=await Ms(e,"utf-8");return JSON.parse(t)}function Br(e,t){var r;const n=Object.keys(e),i=new Map;if(void 0===t.filterMapTag)for(const c of n)i.set(c,c);else for(const c of n){const e=t.filterMapTag(c);void 0!==e&&i.set(e,c)}if(0===i.size)return;const o=null!=(r=t.versionSatisfies)?r:Am,s=function(e){if(null===Lm(e))try{const t=Cd(e);if(null!==t){const r=/^[<=>^~]/.test(t.version)?t.version:"^"+t.version;return h(`Coerced version '${e}' to '${r}'`),r}}catch(t){}return e}(t.version),a=[];for(const[c,u]of i.entries())o(c,s)&&a.push(u);if(0!==a.length)for(const c of a){let r=e[c];if(void 0===r)continue;if(void 0!==t.filterName&&(r=r.filter(t.filterName)),0===r.length)continue;const n=qr(c,r,t);if(void 0!==n)return n}}function qr(e,t,r){if(!(void 0!==r.keywords&&0!==r.keywords.length||void 0!==r.optionalKeywords&&0!==r.optionalKeywords.length))return{tag:e,name:t[0]};let n=[];if(void 0!==r.keywords&&0!==r.keywords.length)for(const i of t)r.keywords.every((e=>!("string"!=typeof e||!i.includes(e))||Array.isArray(e)&&e.some((e=>i.includes(e)))))&&n.push(i);else n=t;if(0!==n.length){if(void 0!==r.optionalKeywords&&0!==r.optionalKeywords.length){const t=n.map((e=>{let t=0;for(const n of r.optionalKeywords)("string"==typeof n&&e.includes(n)||Array.isArray(n)&&n.some((t=>e.includes(t))))&&t++;return t})),i=Math.max(...t);return{tag:e,name:n[t.indexOf(i)]}}return{tag:e,name:n[0]}}}async function Hr(e,t,r){let n;switch(process.platform){case"win32":"arm"!==r&&"arm64"!==r||(n=await ht("gcc-arm-embedded",e));try{n=await dr("g++",e,Vr,t,r)}catch(i){h(`Failed to download g++ binary. ${i}. Falling back to chocolatey.`),n=await async function(e,t){var r,n;let i;if(await ht("mingw",e),"x64"===t&&await se("C:/tools/mingw64/bin")?(i="C:/tools/mingw64/bin",await pe(i,xy)):"ia32"===t&&await se("C:/tools/mingw32/bin")?(i="C:/tools/mingw32/bin",await pe(i,xy)):await se((null!=(r=process.env.ChocolateyInstall)?r:"C:/ProgramData/chocolatey")+"/bin/g++.exe")&&(i=(null!=(n=process.env.ChocolateyInstall)?n:"C:/ProgramData/chocolatey")+"/bin"),void 0!==i)return{binDir:i}}(e,r)}break;case"linux":if(ft())n=await yt("mingw-w64-gcc",e);else if(lt())n=await mt([{name:"mingw64-gcc",version:e}]);else{if(!pt())throw Error("Unsupported Linux distro for "+r);n=await Ze([{name:"mingw-w64",version:e}])}break;default:throw Error("Unsupported platform for "+r)}return void 0!==n&&await async function(e){const t=[];"win32"===process.platform&&t.push(le("CC",_t(e+"/gcc"),xy),le("CXX",_t(e+"/g++"),xy)),Ym&&await Mr(),await Promise.all(t)}(n.binDir),n}async function Vr(e,t,r){var n;if("win32"!==t)throw Error(`Unsupported platform '${t}'`);const i=await Gr(In.join(Km,"github_brechtsanders_winlibs_mingw.json")),o=zr(e),s=Wr(e),a=Xr(e),c=Br(i,{version:e,keywords:[null!=(n={x64:"x86_64",ia32:"i386"}[r])?n:r],filterName:e=>!(void 0!==o&&o!==zr(e)||void 0!==s&&s!==Wr(e)||void 0!==a&&a!==Xr(e)),versionSatisfies:(e,t)=>{const r=Cd(e);if(null===r)throw Error(`Invalid MinGW asset version: '${e}'`);return Am(r,t)&&(void 0===o||o===zr(e))&&(void 0===s||s===Wr(e))}});if(void 0===c)throw Error(`No asset found for version ${e} and arch ${r}`);return{binRelativeDir:"bin/",binFileName:_t("g++"),extractedFolderName:"mingw64",extractFunction:ur,url:`https://github.com/brechtsanders/winlibs_mingw/releases/download/${c.tag}/${c.name}`}}function zr(e){const t=e.match(/(ucrt|msvcrt)/);return null!==t?t[1]:void 0}function Wr(e){const t=e.match(/(posix|mcf)/);return null!==t?t[1]:void 0}function Xr(e){const t=e.match(/(seh|dwarf)/);return null!==t?t[1]:void 0}async function Yr(e,t,r,n=40){let i;switch(process.platform){case"win32":i=await Hr(e,t,r);break;case"darwin":i=await ut("gcc",e);break;case"linux":if(ft())i=await yt("gcc",e);else if(lt())i=await mt([{name:"gcc",version:e},{name:"gcc-c++",version:e},{name:"libstdc++-devel"}]);else if(pt())if(""===e)i=await Ze([{name:"gcc"},{name:"g++"}]);else try{i=await Ze([{name:"gcc",version:e},{name:"g++",version:e}])}catch(o){i=await Ze([{name:"gcc",version:e,repository:"ppa:ubuntu-toolchain-r/test",key:{key:"1E9377A2BA9EF27F",fileName:"ubuntu-toolchain-r-test.gpg"}},{name:"g++",version:e,repository:"ppa:ubuntu-toolchain-r/test",key:{key:"1E9377A2BA9EF27F",fileName:"ubuntu-toolchain-r-test.gpg"}}])}break;default:throw Error("Unsupported platform for "+r)}if(void 0!==i)return await async function(e,t,r=40){if("win32"===process.platform)return;const n=[];{const i=function(e){try{const t=vr(e),r=Xm(t);return 5>r?e:""+r}catch{return e}}(e),[o,s]=await Promise.all([Kr("gcc",t,i),Kr("g++",t,i)]);n.push(le("CC",o,xy),le("CXX",s,xy)),pt()&&n.push(qe("cc",o,xy,r),qe("cxx",s,xy,r),qe("gcc",o,xy,r),qe("g++",s,xy,r))}n.push(Fr()),Jm&&await Mr(),await Promise.all(n)}(e,i.binDir,n),i}async function Kr(e,t,r){var n,i;if(await se(`${t}/${e}-${r}`))return _t(`${t}/${e}-${r}`);const o=RegExp(`^${We(e)}-?([\\d\\.\\-]*)(?:\\.exe)?$`),s=(await Fs(t)).filter((e=>o.test(e))).sort(((e,t)=>{var r,n,i,s;const a=null!=(n=null==(r=e.match(o))?void 0:r[1])?n:"",c=null!=(s=null==(i=t.match(o))?void 0:i[1])?s:"";try{return function(e,t){const r=Cd(e),n=Cd(t);return null!==r&&null!==n?n.compare(r):t.localeCompare(e)}(a,c)}catch{return 0}}));for(const a of s){const e=`${t}/${a}`;if(""===r||a.includes(r)||null!=(i=null==(n=await Jr(e))?void 0:n.includes(r))&&i)return _t(e)}return await se(`${t}/${e}`)?_t(`${t}/${e}`):_t(e)}async function Jr(e){try{const{stdout:t}=await E(e,["--version"],{stdio:"pipe"}),r=t.match(/(gcc|g\+\+).* \(.*\) ([\d.]+)/);if(null!==r)return r[2];p("Failed to parse gcc version from: "+t)}catch(t){f("Failed to get gcc version: "+t)}}function Qr(e){const t=Lm(e),r=null!==t?Xm(t):e;return le("GCOV",""!==r?"gcov-"+r:"gcov",xy)}async function Zr(e,t,r){const n=await aa("git",{nothrow:!0});if(null===n)switch(process.platform){case"win32":{const t=await ht("git",e),r=function(){const e=["C:/Program Files/Git/bin/git.exe","C:/Program Files (x86)/Git/bin/git.exe"];for(const t of e)if(Rn.existsSync(t))return t;return p("Git not found in the default locations. Add git to PATH manually."),null}();return null!==r&&await pe(r,xy),t}case"darwin":return ut("git",e);case"linux":if(ft())return yt("git",e);if(lt())return mt([{name:"git",version:e}]);if(pt())return Ze([{name:"git",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}else h("Git already installed at "+n)}async function en(e,t,r){const{keywords:n,optionalKeywords:i}=function(e,t){const r=[],n=[];switch(e){case"linux":r.push("linux"),Ad.includes(t)?(n.push("64"),n.push("x86_64")):(h(`Using arch ${t} for infer`),r.push(t));break;case"darwin":r.push("osx"),Ad.includes(t)?n.push("x86_64"):kd.includes(t)?n.push("arm64"):(h(`Using arch ${t} for infer`),r.push(t));break;default:h(`Using ${e} ${t} for infer`),r.push(e,t)}return{keywords:r,optionalKeywords:n}}(t,r),o=Br(await Gr(In.join(Zm,"github_facebook_infer.json")),{version:e,keywords:n,optionalKeywords:i,filterMapTag:e=>e.replace(/^v/,"")});if(void 0!==o)return{url:`https://github.com/facebook/infer/releases/download/${o.tag}/${o.name}`,extractedFolderName:""+In.basename(o.name,".tar.xz"),binRelativeDir:"bin",binFileName:_t("infer")};throw Error(`No asset found for version ${e} matching ${n} and ${i}`)}function tn(e,t,r){const n=function(e,t){switch(e){case"win32":return Ad.includes(t)||Ld.includes(t)?"win":kd.includes(t)?"winarm64":"win";case"darwin":return"mac";case"linux":return Ad.includes(t)||Ld.includes(t)?"linux":kd.includes(t)?"linux-aarch64":"linux";default:throw Error(`Unsupported platform '${e}'`)}}(t,r);return{binRelativeDir:"",binFileName:_t("ninja"),extractedFolderName:"",url:`https://github.com/ninja-build/ninja/releases/download/v${e}/ninja-${n}.zip`}}function rn(e,t,r){return dr("ninja",e,tn,t,r)}function nn(e){return{url:`https://github.com/SimonKagstrom/kcov/releases/download/${e}/kcov-amd64.tar.gz`,extractedFolderName:"",binRelativeDir:"usr/local/bin",binFileName:_t("kcov")}}function on(e){return{url:`https://github.com/SimonKagstrom/kcov/archive/refs/tags/${e}.tar.gz`,extractedFolderName:"",binRelativeDir:"build/src",binFileName:_t("kcov"),extractFunction:sn}}async function sn(e,t){const r=await pr(e,t,1),n=await async function(){let e=aa.sync("cmake",{nothrow:!0});if(null===e){const{binDir:t}=await mr(gr("cmake",void 0,await Bm()),In.join(ae("~"),"cmake"),"");e=In.join(t,"cmake")}return null===aa.sync("ninja",{nothrow:!0})&&await rn(gr("ninja",void 0,await Bm()),In.join(ae("~"),"ninja"),""),e}();"linux"===process.platform&&(ft()?await Promise.all([yt("libdwarf"),yt("libcurl-openssl")]):lt()?await mt([{name:"libdwarf-devel"},{name:"libcurl-devel"}]):pt()&&await Ze([{name:"libdw-dev"},{name:"libcurl4-openssl-dev"}]));try{if(null!==aa.sync("patch",{nothrow:!0})){const e=In.join(ey,"gcc13.patch");await E("patch",["-N","-p1","-i",e],{cwd:r,stdio:"inherit"})}else h("`patch` not found, skipping gcc13.patch, kcov may not build on gcc 13")}catch{}const i=In.join(r,"build");return await E(n,["-S",r,"-B",i,"-DCMAKE_BUILD_TYPE=Release","-G","Ninja"],{cwd:r,stdio:"inherit"}),await E(n,["--build",i,"--config","Release"],{cwd:r,stdio:"inherit"}),r}async function an(){"darwin"===process.platform&&(null!==await aa("clang",{nothrow:!0})&&null!==await aa("clang++",{nothrow:!0})&&(d("Assuming clang is an Apple Clang compiler"),await Promise.all([le("CC","clang",xy),le("CXX","clang++",xy)])),Gn.error("Apple Clang automatic installation is not supported yet"))}async function cn(e,t,r,n,i,o,s){void 0!==t&&await se(t)&&(h(`Adding ${t} to PATH`),await le("VCTargetsPath",t,xy)),await ny.setupMSVCDevCmd(function(e){switch(e){case"x32":case"32":case"ia32":return"x86";case"64":return"x64";default:return e}}(r),i,n,o,s,e)}async function un(e,t,r,n,i,o,s,a=36e5){zi.startGroup(`Installing ${e} ${t}`);try{await async function(e,t,r,n,i,o){const s=Sy.includes(e);let a;if("vcvarsall"===e)await cn(gr(e,t,r),void 0,n,void 0,void 0,!1,!1);else if("brew"===e)a=await nt({rcOptions:xy});else{const o=In.join(i,s?"llvm":e),c=gr(e,t,r),u=Oy[e];a=await u(c,o,n)}o.push(bn(e,a))}(e,t,r,n,i,o)}catch(c){f(c),c instanceof Error&&void 0!==c.stack&&f(c.stack),s.push(e+" failed to install")}zi.endGroup()}async function ln(e,t,r){const n=await async function(e,t,r){const{keywords:n,optionalKeywords:i}=await async function(e,t){const r=[],n=[];switch(e){case"win32":{n.push(".exe",".exe");const e=[];Ad.includes(t)?(e.push("win64"),n.push(["x86_64","X64"])):Ld.includes(t)?e.push("win32"):kd.includes(t)?e.push("woa64"):(h(`Using arch ${t} for LLVM`),e.push(t)),e.push("windows","Windows"),r.push(e);break}case"linux":{const e=["linux","Linux"];if(pt()){n.push("ubuntu");const e=await Bm();if(null!==e){n.push(""+e[0]);const t=10>e[1]?"0"+e[1]:""+e[1];n.push(`${e[0]}.${t}`),n.push(`${e[0]}.${t}.${e[2]}`)}}else lt()&&n.push("rhel");Ad.includes(t)?r.push(["x86_64","X64"]):Ld.includes(t)?r.push("x86"):kd.includes(t)?r.push("aarch64"):Dd.includes(t)?r.push("armv7a"):jd.includes(t)?r.push("powerpc64le"):Ud.includes(t)?r.push("sparc64"):(h(`Using arch ${t} for LLVM`),r.push(t)),r.push(e);break}case"darwin":r.push(["apple","macos","macOS"]),Ad.includes(t)?n.push(["x86_64","X64"]):kd.includes(t)?n.push(["arm64","ARM64"]):(h(`Using arch ${t} for LLVM`),r.push(t));break;case"freebsd":r.push("freebsd"),Ad.includes(t)?r.push("amd64"):Ld.includes(t)?r.push("i386"):(h(`Using arch ${t} for LLVM`),r.push(t));break;case"solaris":r.push("solaris"),Ad.includes(t)?r.push("amd64"):Fd.includes(t)?r.push("sparcv9"):(h(`Using arch ${t} for LLVM`),r.push(t));break;default:h(`Using ${e} ${t} for LLVM`),r.push(e,t)}return{keywords:r,optionalKeywords:n}}(e,t),o=Br(await Gr(In.join(cy,"github_llvm_llvm-project.json")),{version:r,keywords:n,optionalKeywords:i,filterMapTag:e=>e.replace(/^llvmorg-/,"")});if(void 0!==o)return`https://github.com/llvm/llvm-project/releases/download/${o.tag}/${o.name}`;const s=Br(await Gr(In.join(cy,"llvm_org_releases.json")),{version:r,keywords:n,optionalKeywords:i});if(void 0!==s)return`https://releases.llvm.org/${s.tag}/${s.name}`;throw Error(`No asset found for version ${r} matching ${n} and ${i}`)}(t,r,e);return h("Downloading LLVM from "+n),{url:n,extractedFolderName:"",binRelativeDir:"bin",binFileName:_t("clang"),extractFunction:"win32"===t?cr(ar(n)):(e,t)=>pr(e,t,1)}}async function fn(e,t,r){const n=await pn(e,t,r);return await py(r),await async function(){if(!ly)return;const e=In.join(fy,"llvm_matcher.json");if(!(await se(e)))return p("the llvm_matcher.json file does not exist in the same folder as setup-cpp.js");h("::add-matcher::"+e)}(),void 0!==n.installDir&&await async function(e,t){var r,n;const i=null!=(r=process.env.LD_LIBRARY_PATH)?r:"",o=null!=(n=process.env.DYLD_LIBRARY_PATH)?n:"",s=oy(t),a=[le("CC",_t(e+"/bin/clang"),xy),le("CXX",_t(e+"/bin/clang++"),xy),le("LLVM_PATH",e,xy),le("LD_LIBRARY_PATH",`${i}${In.delimiter}${e}/lib`,xy),le("DYLD_LIBRARY_PATH",`${o}${In.delimiter}${e}/lib`,xy),le("LLVM_LDFLAGS","-L"+wr(e+"/lib"),xy),le("LLVM_CPPFLAGS","-I"+wr(e+"/include"),xy),await se(`${e}/lib/clang/${t}/include`)?le("LLVM_CPATH",`${e}/lib/clang/${t}/include`,xy):await se(`${e}/lib/clang/${s}/include`)?le("LLVM_CPATH",`${e}/lib/clang/${s}/include`,xy):Promise.resolve(),le("LIBRARY_PATH",e+"/lib",xy),Fr()];if(pt()){const t=60;a.push(qe("cc",e+"/bin/clang",xy,t),qe("cxx",e+"/bin/clang++",xy,t),qe("clang",e+"/bin/clang",xy),qe("clang++",e+"/bin/clang++",xy),qe("lld",e+"/bin/lld",xy),qe("ld.lld",e+"/bin/ld.lld",xy),qe("llvm-ar",e+"/bin/llvm-ar",xy))}await Promise.all(a)}(n.installDir,e),n}async function pn(e,t,r,n=ay.All){const i=await async function(e,t=0){if(pt())try{return await async function(e,t=0){const r=oy(e),n="/usr/lib/llvm-"+r;await Ze([{name:"ca-certificates"}]);const i=new Xp.DownloaderHelper("https://apt.llvm.org/llvm.sh",On.tmpdir(),{fileName:"llvm.sh"});i.on("error",(e=>{throw Error("Failed to download the LLVM installer script: "+e)})),await i.start();const o=await Ms(i.getDownloadPath(),"utf-8"),s=In.join(On.tmpdir(),"llvm-setup-cpp.sh");return await async function(e,t,r,n){let i=function(e){return"1"!==process.env.NODE_DEBUG&&"true"!==process.env.NODE_DEBUG?e.replace(/set -eux/g,"set -eu"):e}(e);i=function(e){return e.replace(/add-apt-repository\s*(-y)?\s*"\${REPO_NAME}"/g,'add-apt-repository -y -n "${REPO_NAME}"\napt-get update -o '+Jp)}(i),i=function(e,t,r){return 1===e?t.replace(/ -y \$PKG/g," -y clang-format-"+r):t}(n,i,r),i=await async function(e){let t=e.replace(/apt-get install -y/g,`apt-get install -o Dpkg::Options::="--force-overwrite" -o ${Jp} -y --fix-broken`);return await Promise.all(["libc++-$LLVM_VERSION-dev","libc++abi-$LLVM_VERSION-dev","libunwind-$LLVM_VERSION-dev"].map((async e=>{const r=e.replace("$LLVM_VERSION","*");await async function(e){try{const{stdout:t}=await E("dpkg",["-l",e],{env:He("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("ii")))}catch{return!1}}(r)&&(Gn.info("Removing conflicting package "+r),t=t.replace(e,""))}))),t}(i),i=function(e){return Ve()?e.replace(/apt-get/g,"nala"):e}(i),await Ks(t,i)}(o,s,r,t),await Qe(),await Ze([{name:"lsb-release"},{name:"wget"},{name:"gnupg"}]),await Ts(s,"755"),await N("bash",[s,""+r,...0===t?["all"]:[]],{stdio:"inherit",shell:!0,timeout:iy}),await pe(n+"/bin",xy),{installDir:""+n,binDir:n+"/bin",bin:n+"/bin/clang++"}}(e,t)}catch(r){Gn.info(`Failed to install llvm via system package manager ${r}. Trying to remove the repository`);try{T(In.join(sy,"llvm_repo_remove.bash"),[""+oy(e)])}catch(n){Gn.info("Failed to remove llvm repository "+n)}}}(e,n);if(void 0!==i)return i;const o=await async function(e){if("darwin"!==process.platform)return Promise.resolve(void 0);try{return await async function(e){const t=oy(e),r=await ut("llvm",""+t,{"force-bottle":!0});return await pe(r.binDir,xy),r}(e)}catch(t){return void h("Failed to install llvm via brew: "+t)}}(e);return void 0!==o?o:async function(e,t,r){const n=await dr("llvm",e,ln,t,r);return await uy(oy(e)),n}(e,t,r)}function dn(e,t,r){return pn(e,t,r,ay.ClangFormat)}function hn(e,t,r){return pn(e,t,r)}async function mn(e,t,r,n,i,o){if("win32"!==process.platform)return;const s=ny.vsversion_to_versionnumber(e);h(`Checking if MSVC ${s} is already installed`);let a,c,u=!1;try{const e=ny.findVcvarsall(s);u=!0,h("Found the pre-installed version of MSVC at "+e)}catch{}if(!u)try{"14.0"===s?(a="14.0",await ht("visualcpp-build-tools","14.0.25420.1",["--ignore-dependencies"]),c="C:/Program Files (x86)/MSBuild/Microsoft.Cpp/v4.0/v140"):"15.0"===s?(a="14.16",await ht("visualstudio2017buildtools","15.9.41.0",[]),c="C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16"):"16.0"===s?(a="14.29",await ht("visualstudio2019buildtools","16.11.7.0",[]),c="C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133"):"17.0"===s?(a=void 0,await ht("visualstudio2022buildtools","117.0.5.0",[]),c=void 0):f(`The given MSVC versions ${e} is not supported yet.`)}catch(l){f(l)}await cn(s,c,r,a,n,i,o),dy&&await async function(){const e=In.join(hy,"msvc_matcher.json");if(!(await se(e)))return p("the msvc_matcher.json file does not exist in the same folder as setup-cpp.js");h("::add-matcher::"+e)}()}async function yn(e,t,r){if("win32"===process.platform)return await ht("opencppcoverage",e),{binDir:await async function(){const e="C:/Program Files/OpenCppCoverage";return await pe(e,xy),e}()}}function vn(e,t,r){return{url:wn(t,r,e),binRelativeDir:"",binFileName:_t("pwsh"),extractedFolderName:""}}function wn(e,t,r){var n;switch(e){case"win32":return`https://github.com/PowerShell/PowerShell/releases/download/v${r}/PowerShell-${r}-${["ia32","x86","i386","x32"].includes(t)?"win-x86":"win-x64"}.zip`;case"darwin":return`https://github.com/PowerShell/PowerShell/releases/download/v${r}/powershell-${r}-${["arm","arm64"].includes(t)?"osx-arm64":"osx-x64"}.tar.gz`;case"linux":return`https://github.com/PowerShell/PowerShell/releases/download/v${r}/powershell-${r}-${null!=(n={arm64:"linux-arm64",arm:"linux-arm64",arm32:"linux-arm32",aarch64:"linux-arm64",x64:"linux-x64"}[t])?n:"linux-x64"}.tar.gz`;default:throw Error(`Unsupported platform '${e}'`)}}async function gn(e,t,r){try{return await dr("pwsh",e,vn,t,r)}catch(n){return f(`Failed to setup pwsh via download: ${n}. Trying package managers...`),async function(e){switch(process.platform){case"win32":{await ht("powershell-core",e);const t="C:/Program Files/PowerShell/7";return await pe(t,xy),{binDir:t}}case"darwin":return ut("powershell",e,{cask:!0,overwrite:!1});case"linux":if(ft())return yt("powershell-bin",e,"yay");if(lt())return await mt([{name:"curl"}]),T("/bin/bash",["-c","curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo"]),mt([{name:"powershell",version:e}]);if(pt()){await Ze([{name:"curl"}]);const t=await Bm();return T("curl",["-LJO",`https://packages.microsoft.com/config/ubuntu/${t[0]}.0${t[1]}/packages-microsoft-prod.deb`]),T("dpkg",["-i","packages-microsoft-prod.deb"]),Ze([{name:"powershell",version:e}],!0)}throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}(e)}}function En(e,t,r){const n=function(e){return"win32"===e?"windows":e}(t),i=function(e){switch(e){case"x64":return"amd64";case"ia32":case"x86":case"i386":case"x32":return"386";default:return e}}(r),o="win32"===t?"zip":"tar.gz";return{binRelativeDir:"",binFileName:_t("task"),extractedFolderName:"",url:`https://github.com/go-task/task/releases/download/v${e}/task_${n}_${i}.${o}`}}function _n(e){const t=zi.getInput(e.toLowerCase());if("false"!==t&&""!==t)return t}function bn(e,t){let r=`${e} was installed successfully:`;return void 0===t||("installDir"in t&&(r+="\n- The installation directory is "+t.installDir),""!==t.binDir&&(r+="\n- The binary directory is "+t.binDir)),r}var Sn;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const On=require("os"),Rn=require("fs"),In=require("path"),xn=require("http"),Pn=require("https");require("net");const Tn=require("tls"),Nn=require("events"),Cn=require("util"),$n=require("string_decoder"),An=require("child_process"),Ln=require("assert"),kn=require("timers"),Dn=require("buffer"),jn=require("process"),Un=require("url"),Fn=require("stream"),Mn=require("constants"),Gn=require("console");var Bn="undefined"!=typeof document?document.currentScript:null;const qn=e(Rn),Hn=e(xn),Vn=e(Pn),zn=Object.freeze(Object.defineProperty({__proto__:null,get default(){return zn},get randomUUID(){return oi}},Symbol.toStringTag,{value:"Module"}));var Wn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Xn={};const Yn=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE",pr:{env:"AC_GIT_PR",ne:"false"}},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN",pr:{env:"CODEBUILD_WEBHOOK_EVENT",any:["PULL_REQUEST_CREATED","PULL_REQUEST_UPDATED","PULL_REQUEST_REOPENED"]}},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Cloudflare Pages",constant:"CLOUDFLARE_PAGES",env:"CF_PAGES"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE_BUILD_ID"},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Sourcehut",constant:"SOURCEHUT",env:{CI_NAME:"sourcehut"}},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vela",constant:"VELA",env:"VELA",pr:{VELA_PULL_REQUEST:"1"}},{name:"Vercel",constant:"VERCEL",env:{any:["NOW_BUILDER","VERCEL"]},pr:"VERCEL_GIT_PULL_REQUEST_ID"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"},{name:"Woodpecker",constant:"WOODPECKER",env:{CI:"woodpecker"},pr:{CI_BUILD_EVENT:"pull_request"}},{name:"Xcode Cloud",constant:"XCODE_CLOUD",env:"CI_XCODE_PROJECT",pr:"CI_PULL_REQUEST_NUMBER"},{name:"Xcode Server",constant:"XCODE_SERVER",env:"XCS"}];var Kn,Jn=(Kn||(Kn=1,function(e){function t(e){return"string"==typeof e?!!n[e]:"env"in e?n[e.env]&&n[e.env].includes(e.includes):"any"in e?e.any.some((function(e){return!!n[e]})):Object.keys(e).every((function(t){return n[t]===e[t]}))}const r=Yn,n=process.env;Object.defineProperty(e,"_vendors",{value:r.map((function(e){return e.constant}))}),e.name=null,e.isPR=null,e.id=null,r.forEach((function(r){const i=(Array.isArray(r.env)?r.env:[r.env]).every((function(e){return t(e)}));e[r.constant]=i,i&&(e.name=r.name,e.isPR=function(e){switch(typeof e.pr){case"string":return!!n[e.pr];case"object":return"env"in e.pr?"any"in e.pr?e.pr.any.some((function(t){return n[e.pr.env]===t})):e.pr.env in n&&n[e.pr.env]!==e.pr.ne:"any"in e.pr?e.pr.any.some((function(e){return!!n[e]})):t(e.pr);default:return null}}(r),e.id=r.constant)})),e.isCI=!("false"===n.CI||!(n.BUILD_ID||n.BUILD_NUMBER||n.CI||n.CI_APP_ID||n.CI_BUILD_ID||n.CI_BUILD_NUMBER||n.CI_NAME||n.CONTINUOUS_INTEGRATION||n.RUN_ID||e.name))}(Xn)),Xn);const Qn=t(Jn);var Zn,ei,ti={},ri={},ni={},ii={};(null==(Sn=globalThis.crypto)?void 0:Sn.randomUUID)||(globalThis.crypto||(globalThis.crypto={}),globalThis.crypto.randomUUID=()=>{let e=(new Date).getTime(),t=(null==performance?void 0:performance.now)&&1e3*performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(r=>{let n=16*Math.random();return e>0?(n=(e+n)%16|0,e=Math.floor(e/16)):(n=(t+n)%16|0,t=Math.floor(t/16)),("x"==r?n:3&n|8).toString(16)}))});const oi=globalThis.crypto.randomUUID.bind(globalThis.crypto),si=r(zn);var ai,ci={};class ui extends URL{_decodedUsername;_decodedPassword;constructor(e,t){super(e,t),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}}var li,fi,pi,di,hi,mi,yi,vi,wi={},gi=(pi||(pi=1,fi=function(){function e(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(e,n,i,o){for(var s=r(n,i,o),a=0,c=t.requests.length;c>a;++a){var u=t.requests[a];if(u.host===s.host&&u.port===s.port)return t.requests.splice(a,1),void u.request.onSocket(e)}e.destroy(),t.removeSocket(e)}))}function t(t,r){var i=this;e.prototype.createSocket.call(i,t,(function(e){var s=t.request.getHeader("host"),a=n({},i.options,{socket:e,servername:s?s.replace(/:.*$/,""):t.host}),c=o.connect(0,a);i.sockets[i.sockets.indexOf(e)]=c,r(c)}))}function r(e,t,r){return"string"==typeof e?{host:e,port:t,localAddress:r}:e}function n(e){for(var t=1,r=arguments.length;r>t;++t){var n=arguments[t];if("object"==typeof n)for(var i=Object.keys(n),o=0,s=i.length;s>o;++o){var a=i[o];void 0!==n[a]&&(e[a]=n[a])}}return e}if(li)return wi;li=1;var i,o=Tn,s=xn,a=Pn,c=Nn,u=Cn;return wi.httpOverHttp=function(t){var r=new e(t);return r.request=s.request,r},wi.httpsOverHttp=function(r){var n=new e(r);return n.request=s.request,n.createSocket=t,n.defaultPort=443,n},wi.httpOverHttps=function(t){var r=new e(t);return r.request=a.request,r},wi.httpsOverHttps=function(r){var n=new e(r);return n.request=a.request,n.createSocket=t,n.defaultPort=443,n},u.inherits(e,c.EventEmitter),e.prototype.addRequest=function(e,t,i,o){var s=this,a=n({request:e},s.options,r(t,i,o));this.maxSockets>s.sockets.length?s.createSocket(a,(function(t){function r(){s.emit("free",t,a)}function n(e){s.removeSocket(t),t.removeListener("free",r),t.removeListener("close",n),t.removeListener("agentRemove",n)}t.on("free",r),t.on("close",n),t.on("agentRemove",n),e.onSocket(t)})):s.requests.push(a)},e.prototype.createSocket=function(e,t){function r(r,n,a){var u;return c.removeAllListeners(),n.removeAllListeners(),200!==r.statusCode?(i("tunneling socket could not be established, statusCode=%d",r.statusCode),n.destroy(),(u=Error("tunneling socket could not be established, statusCode="+r.statusCode)).code="ECONNRESET",e.request.emit("error",u),void o.removeSocket(s)):a.length>0?(i("got illegal response body from proxy"),n.destroy(),(u=Error("got illegal response body from proxy")).code="ECONNRESET",e.request.emit("error",u),void o.removeSocket(s)):(i("tunneling connection has established"),o.sockets[o.sockets.indexOf(s)]=n,t(n))}var o=this,s={};o.sockets.push(s);var a=n({},o.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(a.localAddress=e.localAddress),a.proxyAuth&&(a.headers=a.headers||{},a.headers["Proxy-Authorization"]="Basic "+new Buffer(a.proxyAuth).toString("base64")),i("making CONNECT request");var c=o.request(a);c.useChunkedEncodingByDefault=!1,c.once("response",(function(e){e.upgrade=!0})),c.once("upgrade",(function(e,t,n){process.nextTick((function(){r(e,t,n)}))})),c.once("connect",r),c.once("error",(function(t){c.removeAllListeners(),i("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var r=Error("tunneling socket could not be established, cause="+t.message);r.code="ECONNRESET",e.request.emit("error",r),o.removeSocket(s)})),c.end()},e.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(-1!==t){this.sockets.splice(t,1);var r=this.requests.shift();r&&this.createSocket(r,(function(e){r.request.onSocket(e)}))}},i=process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?function(){var e=[].slice.call(arguments);"string"==typeof e[0]?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:function(){},wi.debug=i,wi}()),fi);(hi=di||(di={}))[hi.OK=200]="OK",hi[hi.MultipleChoices=300]="MultipleChoices",hi[hi.MovedPermanently=301]="MovedPermanently",hi[hi.ResourceMoved=302]="ResourceMoved",hi[hi.SeeOther=303]="SeeOther",hi[hi.NotModified=304]="NotModified",hi[hi.UseProxy=305]="UseProxy",hi[hi.SwitchProxy=306]="SwitchProxy",hi[hi.TemporaryRedirect=307]="TemporaryRedirect",hi[hi.PermanentRedirect=308]="PermanentRedirect",hi[hi.BadRequest=400]="BadRequest",hi[hi.Unauthorized=401]="Unauthorized",hi[hi.PaymentRequired=402]="PaymentRequired",hi[hi.Forbidden=403]="Forbidden",hi[hi.NotFound=404]="NotFound",hi[hi.MethodNotAllowed=405]="MethodNotAllowed",hi[hi.NotAcceptable=406]="NotAcceptable",hi[hi.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",hi[hi.RequestTimeout=408]="RequestTimeout",hi[hi.Conflict=409]="Conflict",hi[hi.Gone=410]="Gone",hi[hi.TooManyRequests=429]="TooManyRequests",hi[hi.InternalServerError=500]="InternalServerError",hi[hi.NotImplemented=501]="NotImplemented",hi[hi.BadGateway=502]="BadGateway",hi[hi.ServiceUnavailable=503]="ServiceUnavailable",hi[hi.GatewayTimeout=504]="GatewayTimeout",(yi=mi||(mi={})).Accept="accept",yi.ContentType="content-type",(vi||(vi={})).ApplicationJson="application/json";const Ei=[di.MovedPermanently,di.ResourceMoved,di.SeeOther,di.TemporaryRedirect,di.PermanentRedirect],_i=[di.BadGateway,di.ServiceUnavailable,di.GatewayTimeout],bi=["OPTIONS","GET","DELETE","HEAD"];class Si extends Error{constructor(e,t){super(e),this.name="HttpClientError",this.statusCode=t,Object.setPrototypeOf(this,Si.prototype)}statusCode;result}class Oi{constructor(e){this.message=e}message;async readBody(){return new Promise((async e=>{let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])})),this.message.on("end",(()=>{e(""+t)}))}))}async readBodyBuffer(){return new Promise((async e=>{const t=[];this.message.on("data",(e=>{t.push(e)})),this.message.on("end",(()=>{e(Buffer.concat(t))}))}))}}class Ri{userAgent;handlers;requestOptions;_ignoreSslError=!1;_socketTimeout;_allowRedirects=!0;_allowRedirectDowngrade=!1;_maxRedirects=50;_allowRetries=!1;_maxRetries=1;_agent;_proxyAgent;_proxyAgentDispatcher;_keepAlive=!1;_disposed=!1;constructor(e,t,r){this.userAgent=e,this.handlers=t||[],this.requestOptions=r,r&&(null!=r.ignoreSslError&&(this._ignoreSslError=r.ignoreSslError),this._socketTimeout=r.socketTimeout,null!=r.allowRedirects&&(this._allowRedirects=r.allowRedirects),null!=r.allowRedirectDowngrade&&(this._allowRedirectDowngrade=r.allowRedirectDowngrade),null!=r.maxRedirects&&(this._maxRedirects=Math.max(r.maxRedirects,0)),null!=r.keepAlive&&(this._keepAlive=r.keepAlive),null!=r.allowRetries&&(this._allowRetries=r.allowRetries),null!=r.maxRetries&&(this._maxRetries=r.maxRetries))}async options(e,t){return this.request("OPTIONS",e,null,t||{})}async get(e,t){return this.request("GET",e,null,t||{})}async del(e,t){return this.request("DELETE",e,null,t||{})}async post(e,t,r){return this.request("POST",e,t,r||{})}async patch(e,t,r){return this.request("PATCH",e,t,r||{})}async put(e,t,r){return this.request("PUT",e,t,r||{})}async head(e,t){return this.request("HEAD",e,null,t||{})}async sendStream(e,t,r,n){return this.request(e,t,r,n)}async getJson(e,t={}){t[mi.Accept]=this._getExistingOrDefaultHeader(t,mi.Accept,vi.ApplicationJson);const r=await this.get(e,t);return this._processResponse(r,this.requestOptions)}async postJson(e,t,r={}){const n=JSON.stringify(t,null,2);r[mi.Accept]=this._getExistingOrDefaultHeader(r,mi.Accept,vi.ApplicationJson),r[mi.ContentType]=this._getExistingOrDefaultHeader(r,mi.ContentType,vi.ApplicationJson);const i=await this.post(e,n,r);return this._processResponse(i,this.requestOptions)}async putJson(e,t,r={}){const n=JSON.stringify(t,null,2);r[mi.Accept]=this._getExistingOrDefaultHeader(r,mi.Accept,vi.ApplicationJson),r[mi.ContentType]=this._getExistingOrDefaultHeader(r,mi.ContentType,vi.ApplicationJson);const i=await this.put(e,n,r);return this._processResponse(i,this.requestOptions)}async patchJson(e,t,r={}){const n=JSON.stringify(t,null,2);r[mi.Accept]=this._getExistingOrDefaultHeader(r,mi.Accept,vi.ApplicationJson),r[mi.ContentType]=this._getExistingOrDefaultHeader(r,mi.ContentType,vi.ApplicationJson);const i=await this.patch(e,n,r);return this._processResponse(i,this.requestOptions)}async request(e,t,r,n){if(this._disposed)throw Error("Client has already been disposed.");const i=new URL(t);let o=this._prepareRequest(e,i,n);const s=this._allowRetries&&bi.includes(e)?this._maxRetries+1:1;let a,c=0;do{if(a=await this.requestRaw(o,r),a&&a.message&&a.message.statusCode===di.Unauthorized){let e;for(const t of this.handlers)if(t.canHandleAuthentication(a)){e=t;break}return e?e.handleAuthentication(this,o,r):a}let t=this._maxRedirects;for(;a.message.statusCode&&Ei.includes(a.message.statusCode)&&this._allowRedirects&&t>0;){const s=a.message.headers.location;if(!s)break;const c=new URL(s);if("https:"===i.protocol&&i.protocol!==c.protocol&&!this._allowRedirectDowngrade)throw 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.");if(await a.readBody(),c.hostname!==i.hostname)for(const e in n)"authorization"===e.toLowerCase()&&delete n[e];o=this._prepareRequest(e,c,n),a=await this.requestRaw(o,r),t--}if(!a.message.statusCode||!_i.includes(a.message.statusCode))return a;c+=1,s>c&&(await a.readBody(),await this._performExponentialBackoff(c))}while(s>c);return a}dispose(){this._agent&&this._agent.destroy(),this._disposed=!0}async requestRaw(e,t){return new Promise(((r,n)=>{this.requestRawWithCallback(e,t,(function(e,t){e?n(e):t?r(t):n(Error("Unknown error"))}))}))}requestRawWithCallback(e,t,r){function n(e,t){i||(i=!0,r(e,t))}"string"==typeof t&&(e.options.headers||(e.options.headers={}),e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8"));let i=!1;const o=e.httpModule.request(e.options,(e=>{n(void 0,new Oi(e))}));let s;o.on("socket",(e=>{s=e})),o.setTimeout(this._socketTimeout||18e4,(()=>{s&&s.end(),n(Error("Request timeout: "+e.options.path))})),o.on("error",(function(e){n(e)})),t&&"string"==typeof t&&o.write(t,"utf8"),t&&"string"!=typeof t?(t.on("close",(function(){o.end()})),t.pipe(o)):o.end()}getAgent(e){const t=new URL(e);return this._getAgent(t)}async getAgentDispatcher(e){const t=new URL(e),r=i(t);if(r&&r.hostname)return await this._getProxyAgentDispatcher(t,r)}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const i="https:"===n.parsedUrl.protocol;n.httpModule=i?Vn:Hn;const o=i?443:80;if(n.options={},n.options.host=n.parsedUrl.hostname,n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):o,n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||""),n.options.method=e,n.options.headers=this._mergeHeaders(r),null!=this.userAgent&&(n.options.headers["user-agent"]=this.userAgent),n.options.agent=this._getAgent(n.parsedUrl),this.handlers)for(const s of this.handlers)s.prepareRequest(n.options);return n}_mergeHeaders(e){return this.requestOptions&&this.requestOptions.headers?Object.assign({},Ii(this.requestOptions.headers),Ii(e||{})):Ii(e||{})}_getExistingOrDefaultHeader(e,t,r){let n;return this.requestOptions&&this.requestOptions.headers&&(n=Ii(this.requestOptions.headers)[t]),e[t]||n||r}_getAgent(e){let t;const r=i(e),n=r&&r.hostname;if(this._keepAlive&&n&&(t=this._proxyAgent),n||(t=this._agent),t)return t;const o="https:"===e.protocol;let s=100;if(this.requestOptions&&(s=this.requestOptions.maxSockets||Hn.globalAgent.maxSockets),r&&r.hostname){const e={maxSockets:s,keepAlive:this._keepAlive,proxy:{...(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`},host:r.hostname,port:r.port}};let n;const i="https:"===r.protocol;n=o?i?gi.httpsOverHttps:gi.httpsOverHttp:i?gi.httpOverHttps:gi.httpOverHttp,t=n(e),this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:s};t=o?new Vn.Agent(e):new Hn.Agent(e),this._agent=t}return o&&this._ignoreSslError&&(t.options=Object.assign(t.options||{},{rejectUnauthorized:!1})),t}async _getProxyAgentDispatcher(e,t){let r;if(this._keepAlive&&(r=this._proxyAgentDispatcher),r)return r;const n="https:"===e.protocol;return r=new(await Promise.resolve().then((()=>require("./assets/proxy-agent-C54PwHVe.js"))).then((e=>e.proxyAgent)))({uri:t.href,pipelining:this._keepAlive?1:0,...(t.username||t.password)&&{token:"Basic "+Buffer.from(`${t.username}:${t.password}`).toString("base64")}}),this._proxyAgentDispatcher=r,n&&this._ignoreSslError&&(r.options=Object.assign(r.options.requestTls||{},{rejectUnauthorized:!1})),r}async _performExponentialBackoff(e){const t=5*Math.pow(2,e=Math.min(10,e));return new Promise((e=>setTimeout((()=>e()),t)))}async _processResponse(e,t){return new Promise((async(r,n)=>{const i=e.message.statusCode||0,o={statusCode:i,result:null,headers:{}};let s,a;i===di.NotFound&&r(o);try{a=await e.readBody(),a&&a.length>0&&(s=t&&t.deserializeDates?JSON.parse(a,(function(e,t){if("string"==typeof t){const e=new Date(t);if(!isNaN(e.valueOf()))return e}return t})):JSON.parse(a),o.result=s),o.headers=e.message.headers}catch(c){}if(i>299){let e;e=s&&s.message?s.message:a&&a.length>0?a:`Failed request: (${i})`;const t=new Si(e,i);t.result=o.result,n(t)}else r(o)}))}}const Ii=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{}),xi=r(Object.freeze(Object.defineProperty({__proto__:null,get Headers(){return mi},HttpClient:Ri,HttpClientError:Si,HttpClientResponse:Oi,get HttpCodes(){return di},get MediaTypes(){return vi},getProxyUrl:function(e){const t=i(new URL(e));return t?t.href:""},isHttps:function(e){return"https:"===new URL(e).protocol}},Symbol.toStringTag,{value:"Module"})));var Pi,Ti,Ni,Ci,$i,Ai,Li,ki,Di,ji,Ui={},Fi={},Mi={},Gi={},Bi={},qi={},Hi={},Vi={},zi=l();const{GITHUB_ACTIONS:Wi}=Qn;var Xi,Yi,Ki,Ji,Qi,Zi,eo,to,ro,no,io,oo,so,ao,co,uo,lo,fo,po,ho,mo,yo,vo,wo={exports:{}},go={exports:{}},Eo={};const _o=t(function(){function e(e,i,o){const s=r(e,i,o),a=t.spawn(s.command,s.args,s.options);return n.hookChildProcess(a,s),a}if(vo)return wo.exports;vo=1;const t=An,r=y(),n=function(){function e(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function t(t,n){return r&&1===t&&!n.file?e(n.original,"spawn"):null}if(yo)return mo;yo=1;const r="win32"===process.platform;return mo={hookChildProcess:function(e,n){if(!r)return;const i=e.emit;e.emit=function(r,o){if("exit"===r){const r=t(o,n);if(r)return i.call(e,"error",r)}return i.apply(e,arguments)}},verifyENOENT:t,verifyENOENTSync:function(t,n){return r&&1===t&&!n.file?e(n.original,"spawnSync"):null},notFoundError:e},mo}();return wo.exports=e,wo.exports.spawn=e,wo.exports.sync=function(e,i,o){const s=r(e,i,o),a=t.spawnSync(s.command,s.args,s.options);return a.error=a.error||n.verifyENOENTSync(a.status,s),a},wo.exports._parse=r,wo.exports._enoent=n,wo.exports}()),bo=({env:e=jn.env,...t}={})=>{const r=v({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=jn.cwd(),path:t=jn.env[v()],preferLocal:r=!0,execPath:n=jn.execPath,addExecPath:i=!0}={})=>{const o=e instanceof URL?Un.fileURLToPath(e):e,s=In.resolve(o),a=[];return r&&((e,t)=>{let r;for(;r!==t;)e.push(In.join(t,"node_modules/.bin")),r=t,t=In.resolve(t,"..")})(a,s),i&&((e,t,r)=>{const n=t instanceof URL?Un.fileURLToPath(t):t;e.push(In.resolve(r,n,".."))})(a,n,s),[...a,t].join(In.delimiter)})(t),e},So=(e,t,r,n)=>{if("length"===r||"prototype"===r)return;if("arguments"===r||"caller"===r)return;const i=Object.getOwnPropertyDescriptor(e,r),o=Object.getOwnPropertyDescriptor(t,r);!Oo(i,o)&&n||Object.defineProperty(e,r,o)},Oo=function(e,t){return void 0===e||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},Ro=(e,t)=>`/* Wrapped ${e}*/\n${t}`,Io=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),xo=Object.getOwnPropertyDescriptor(function(){}.toString,"name"),Po=new WeakMap,To=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let r,n=0;const i=e.displayName||e.name||"<anonymous>",o=function(...s){if(Po.set(o,++n),1===n)r=e.apply(this,s),e=null;else if(!0===t.throw)throw Error(`Function \`${i}\` can only be called once`);return r};return function(e,t,{ignoreNonConfigurable:r=!1}={}){const{name:n}=e;for(const i of Reflect.ownKeys(t))So(e,t,i,r);((e,t)=>{const r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)})(e,t),((e,t,r)=>{const n=""===r?"":`with ${r.trim()}() `,i=Ro.bind(null,n,""+t);Object.defineProperty(i,"name",xo),Object.defineProperty(e,"toString",{...Io,value:i})})(e,t,n)}(o,e),Po.set(o,n),o};To.callCount=e=>{if(!Po.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Po.get(e)};const No=(e,t)=>({name:"SIGRT"+(t+1),number:Co+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Co=34,$o=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],Ao=()=>{const e=Array.from({length:64-Co+1},No);return[...$o,...e].map(Lo)},Lo=({name:e,number:t,description:r,action:n,forced:i=!1,standard:o})=>{const{signals:{[e]:s}}=On.constants,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:i,standard:o}},ko=({name:e,number:t,description:r,supported:n,action:i,forced:o,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:i,forced:o,standard:s}],Do=(()=>{const e=Ao();return Object.fromEntries(e.map(ko))})(),jo=(e,t)=>{const r=t.find((({name:t})=>On.constants.signals[t]===e));return void 0!==r?r:t.find((t=>t.number===e))};(()=>{const e=Ao(),t=Array.from({length:65},((t,r)=>((e,t)=>{const r=jo(e,t);if(void 0===r)return{};const{name:n,description:i,supported:o,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:i,supported:o,action:s,forced:a,standard:c}}})(r,e)));Object.assign({},...t)})();const Uo=({stdout:e,stderr:t,all:r,error:n,signal:i,exitCode:o,command:s,escapedCommand:a,timedOut:c,isCanceled:u,killed:l,parsed:{options:{timeout:f,cwd:p=jn.cwd()}}})=>{const d=void 0===(i=null===i?void 0:i)?void 0:Do[i].description,h=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:i,exitCode:o,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?"failed with "+r:void 0!==n?`was killed with ${n} (${i})`:void 0!==o?"failed with exit code "+o:"failed")({timedOut:c,timeout:f,errorCode:n&&n.code,signal:i,signalDescription:d,exitCode:o=null===o?void 0:o,isCanceled:u}),m=`Command ${h}: ${s}`,y="[object Error]"==={}.toString.call(n),v=y?`${m}\n${n.message}`:m,w=[v,t,e].filter(Boolean).join("\n");return y?(n.originalMessage=n.message,n.message=w):n=Error(w),n.shortMessage=v,n.command=s,n.escapedCommand=a,n.exitCode=o,n.signal=i,n.signalDescription=d,n.stdout=e,n.stderr=t,n.cwd=p,void 0!==r&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!c,n.isCanceled=u,n.killed=l&&!c,n},Fo=["stdin","stdout","stderr"];var Mo,Go,Bo={exports:{}},qo={exports:{}};const Ho=t(function(){if(Go)return Bo.exports;Go=1;var e=Wn.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=Ln,i=(Mo||(Mo=1,(y=qo).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&y.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&y.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),qo.exports),o=/^win/i.test(e.platform),s=Nn;"function"!=typeof s&&(s=s.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new s).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),Bo.exports=function(e,i){if(!t(Wn.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===l&&f();var o="exit";return i&&i.alwaysLast&&(o="afterexit"),r.on(o,e),function(){r.removeListener(o,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&a()}};var a=function(){l&&t(Wn.process)&&(l=!1,i.forEach((function(t){try{e.removeListener(t,u[t])}catch(r){}})),e.emit=h,e.reallyExit=p,r.count-=1)};Bo.exports.unload=a;var c=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},u={};i.forEach((function(n){u[n]=function(){t(Wn.process)&&e.listeners(n).length===r.count&&(a(),c("exit",null,n),c("afterexit",null,n),o&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}})),Bo.exports.signals=function(){return i};var l=!1,f=function(){!l&&t(Wn.process)&&(l=!0,r.count+=1,i=i.filter((function(t){try{return e.on(t,u[t]),!0}catch(r){return!1}})),e.emit=m,e.reallyExit=d)};Bo.exports.load=f;var p=e.reallyExit,d=function(r){t(Wn.process)&&(e.exitCode=r||0,c("exit",e.exitCode,null),c("afterexit",e.exitCode,null),p.call(e,e.exitCode))},h=e.emit,m=function(r,n){if("exit"===r&&t(Wn.process)){void 0!==n&&(e.exitCode=n);var i=h.apply(this,arguments);return c("exit",e.exitCode,null),c("afterexit",e.exitCode,null),i}return h.apply(this,arguments)}}else Bo.exports=function(){return function(){}};var y;return Bo.exports}()),Vo=(e,t="SIGTERM",r={})=>{const n=e(t);return zo(e,t,r,n),n},zo=(e,t,r,n)=>{if(!Wo(t,r,n))return;const i=Yo(r),o=setTimeout((()=>{e("SIGKILL")}),i);o.unref&&o.unref()},Wo=(e,{forceKillAfterTimeout:t},r)=>Xo(e)&&!1!==t&&r,Xo=e=>e===On.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),Yo=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||0>e)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},Ko=(e,t)=>{e.kill()&&(t.isCanceled=!0)},Jo=(e,t,r)=>{if("string"==typeof r)return e[t].pipe(Rn.createWriteStream(r)),e;if(g(r))return e[t].pipe(r),e;if(!(e=>e instanceof An.ChildProcess&&"function"==typeof e.then)(r))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!g(r.stdin))throw new TypeError("The target child process's stdin must be available.");return e[t].pipe(r.stdin),r};var Qo,Zo,es,ts={exports:{}};const rs=t(function(){async function e(e,r){if(!e)throw Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,a=i(r);return await new Promise(((r,i)=>{const c=e=>{e&&a.getBufferedLength()<=t.MAX_LENGTH&&(e.bufferedData=a.getBufferedValue()),i(e)};(async()=>{try{await o(e,a),r()}catch(t){c(t)}})(),a.on("data",(()=>{a.getBufferedLength()>n&&c(new s)}))})),a.getBufferedValue()}if(es)return ts.exports;es=1;const{constants:t}=Dn,r=Fn,{promisify:n}=Cn,i=function(){if(Zo)return Qo;Zo=1;const{PassThrough:e}=Fn;return Qo=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const i="buffer"===n;let o=!1;r?o=!(n||i):n=n||"utf8",i&&(n=null);const s=new e({objectMode:o});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",(e=>{c.push(e),o?a=c.length:a+=e.length})),s.getBufferedValue=()=>r?c:i?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s}}(),o=n(r.pipeline);class s extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}return ts.exports=e,ts.exports.buffer=(t,r)=>e(t,{...r,encoding:"buffer"}),ts.exports.array=(t,r)=>e(t,{...r,array:!0}),ts.exports.MaxBufferError=s,ts.exports}());var ns,is;const os=t(function(){if(is)return ns;is=1;const{PassThrough:e}=Fn;return ns=function(){function t(e){return Array.isArray(e)?(e.forEach(t),this):(n.push(e),e.once("end",r.bind(null,e)),e.once("error",i.emit.bind(i,"error")),e.pipe(i,{end:!1}),this)}function r(e){!(n=n.filter((function(t){return t!==e}))).length&&i.readable&&i.end()}var n=[],i=new e({objectMode:!0});return i.setMaxListeners(0),i.add=t,i.isEmpty=function(){return 0==n.length},i.on("unpipe",r),[].slice.call(arguments).forEach(t),i}}()),ss=e=>{if(void 0!==e)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},as=async(e,t)=>{if(e&&void 0!==t){e.destroy();try{return await t}catch(r){return r.bufferedData}}},cs=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(e&&r)return t?rs(e,{encoding:t,maxBuffer:n}):rs.buffer(e,{maxBuffer:n})},us=(async()=>{})().constructor.prototype,ls=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(us,e)])),fs=(e,t)=>{for(const[r,n]of ls){const i="function"==typeof t?(...e)=>Reflect.apply(n.value,t(),e):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:i})}},ps=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],ds=/^[\w.-]+$/,hs=/"/g,ms=(e,t)=>ps(e,t).join(" "),ys=(e,t)=>ps(e,t).map((e=>(e=>"string"!=typeof e||ds.test(e)?e:`"${e.replace(hs,'\\"')}"`)(e))).join(" "),vs=/ +/g,ws=e=>{const t=[];for(const r of e.trim().split(vs)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t},gs=Cn.debuglog("execa").enabled,Es=(e,t)=>(e+"").padStart(t,"0"),_s=(e,{verbose:t})=>{t&&jn.stderr.write(`[${(()=>{const e=new Date;return`${Es(e.getHours(),2)}:${Es(e.getMinutes(),2)}:${Es(e.getSeconds(),2)}.${Es(e.getMilliseconds(),3)}`})()}] ${e}\n`)},bs=(e,t,r={})=>{const n=_o._parse(e,t,r);return e=n.command,t=n.args,(r={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(r=n.options).cwd||jn.cwd(),execPath:jn.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:gs,...r}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:i})=>{const o=t?{...jn.env,...e}:e;return r?bo({env:o,cwd:n,execPath:i}):o})(r),r.stdio=(e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return Fo.map((t=>e[t]));if((e=>Fo.some((t=>void 0!==e[t])))(e))throw Error("It's not possible to provide `stdio` in combination with one of "+Fo.map((e=>`\`${e}\``)).join(", "));if("string"==typeof t)return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);return Array.from({length:Math.max(t.length,Fo.length)},((e,r)=>t[r]))})(r),"win32"===jn.platform&&"cmd"===In.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:r,parsed:n}},Ss=(e,t,r)=>"string"==typeof t||Dn.Buffer.isBuffer(t)?e.stripFinalNewline?function(e){const t="string"==typeof e?"\r":13;return e[e.length-1]===("string"==typeof e?"\n":10)&&(e=e.slice(0,-1)),e[e.length-1]===t&&(e=e.slice(0,-1)),e}(t):t:void 0===r?void 0:"";var Os={},Rs={};const Is=qn.promises,{access:xs,appendFile:Ps,chmod:Ts,chown:Ns,copyFile:Cs,lchmod:$s,lchown:As,link:Ls,lstat:ks,mkdir:Ds,mkdtemp:js,open:Us,readdir:Fs,readFile:Ms,readlink:Gs,realpath:Bs,rename:qs,rmdir:Hs,stat:Vs,symlink:zs,truncate:Ws,unlink:Xs,utimes:Ys,writeFile:Ks}=qn.promises,Js="rm"in qn.promises?qn.promises.rm:Cn.promisify(qn.unlink),Qs=r(Object.freeze(Object.defineProperty({__proto__:null,access:xs,appendFile:Ps,chmod:Ts,chown:Ns,copyFile:Cs,default:Is,lchmod:$s,lchown:As,link:Ls,lstat:ks,mkdir:Ds,mkdtemp:js,open:Us,readFile:Ms,readdir:Fs,readlink:Gs,realpath:Bs,rename:qs,rm:Js,rmdir:Hs,stat:Vs,symlink:zs,truncate:Ws,unlink:Xs,utimes:Ys,writeFile:Ks},Symbol.toStringTag,{value:"Module"})));var Zs,ea,ta,ra,na,ia,oa={},sa={};const aa=t(function(){if(ia)return na;ia=1;const{isexe:e,sync:t}=b(),{join:r,delimiter:n,sep:i,posix:o}=In,s="win32"===process.platform,a=RegExp(`[${o.sep}${i===o.sep?"":i}]`.replace(/(\\)/g,"\\$1")),c=RegExp("^\\."+a.source),u=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),l=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:i=n})=>{const o=e.match(a)?[""]:[...s?[process.cwd()]:[],...(t||"").split(i)];if(s){const t=r||[".EXE",".CMD",".BAT",".COM"].join(i),n=t.split(i).flatMap((e=>[e,e.toLowerCase()]));return e.includes(".")&&""!==n[0]&&n.unshift(""),{pathEnv:o,pathExt:n,pathExtExe:t}}return{pathEnv:o,pathExt:[""]}},f=(e,t)=>{const n=/^".*"$/.test(e)?e.slice(1,-1):e;return(!n&&c.test(t)?t.slice(0,2):"")+r(n,t)},p=async(t,r={})=>{const{pathEnv:n,pathExt:i,pathExtExe:o}=l(t,r),s=[];for(const a of n){const n=f(a,t);for(const t of i){const i=n+t;if(await e(i,{pathExt:o,ignoreErrors:!0})){if(!r.all)return i;s.push(i)}}}if(r.all&&s.length)return s;if(r.nothrow)return null;throw u(t)};return na=p,p.sync=(e,r={})=>{const{pathEnv:n,pathExt:i,pathExtExe:o}=l(e,r),s=[];for(const a of n){const n=f(a,e);for(const e of i){const i=n+e;if(t(i,{pathExt:o,ignoreErrors:!0})){if(!r.all)return i;s.push(i)}}}if(r.all&&s.length)return s;if(r.nothrow)return null;throw u(e)},na}());let ca;var ua,la={};O(la,"hasSudo",(()=>R)),O(la,"isRoot",(()=>I)),O(la,"isSudo",(()=>x)),O(la,"prependSudo",(()=>P)),O(la,"defaultExecOptions",(()=>fa)),O(la,"execRootSync",(()=>T)),O(la,"execRoot",(()=>N));let fa={stdio:"inherit",shell:!0};O(ua={},"isAdminWindows",(()=>pa)),O(ua,"isAdminPosix",(()=>da)),O(ua,"isAdmin",(()=>A));let pa=async function(){var e;if("win32"!==process.platform)return!1;try{return await E("fsutil",["dirty","query",null!=(e=process.env.systemdrive)?e:""]),!0}catch(t){return"ENOENT"===t.code&&async function(){try{return await E("fltmc"),!0}catch{return!1}}()}},da=I;var ha,ma,ya,va,wa,ga,Ea,_a,ba,Sa,Oa,Ra,Ia,xa,Pa,Ta,Na,Ca,$a,Aa,La,ka,Da,ja,Ua,Fa;O({},"grantUserWriteAccess",(()=>L));var Ma,Ga,Ba,qa,Ha,Va,za,Wa,Xa,Ya,Ka,Ja,Qa,Za,ec,tc,rc,nc,ic,oc,sc,ac,cc,uc,lc,fc,pc,dc,hc,mc,yc,vc,wc,gc,Ec,_c,bc,Sc,Oc,Rc,Ic,xc,Pc,Tc,Nc,Cc,$c,Ac,Lc,kc,Dc,jc,Uc,Fc,Mc,Gc,Bc,qc,Hc,Vc,zc,Wc,Xc,Yc,Kc,Jc,Qc,Zc,eu,tu,ru,nu,iu,ou,su,au,cu,uu,lu,fu,pu,du,hu,mu,yu,vu,wu,gu,Eu,_u,bu,Su,Ou,Ru,Iu,xu,Pu,Tu,Nu,Cu,$u,Au,Lu,ku,Du,ju,Uu,Fu,Mu,Gu,Bu,qu,Hu,Vu,zu,Wu,Xu,Yu,Ku,Ju,Qu,Zu,el,tl,rl,nl,il,ol,sl,al,cl={},ul={exports:{}},ll={exports:{}},fl={exports:{}},pl={exports:{}},dl={},hl={},ml={exports:{}},yl={},vl={},wl={},gl={};const El=t(function(){if(al)return sl;al=1;var e=D(),t=U(),r=function(){if(pu)return fu;pu=1;var e=F(),t=G(),r=B(),n=Z(),i=U();return fu=function o(s){var a,c,u;if(e(s),(a=Object(arguments[1])).async&&a.promise)throw Error("Options 'async' and 'promise' cannot be used together");return hasOwnProperty.call(s,"__memoized__")&&!a.force?s:(c=i(a.length,s.length,a.async&&r.async),u=n(s,c,a),t(r,(function(e,t){a[t]&&e(a[t],u,a)})),o.__profiler__&&o.__profiler__(u),u.updateEnv(),u.memoized)},fu}();return sl=function(n){var i,o=e(arguments[1]);return o.normalizer||0!==(i=o.length=t(o.length,n.length,o.async))&&(o.primitive?!1===i?o.normalizer=hu?du:(hu=1,du=function(e){var t,r,n=e.length;if(!n)return"";for(t=e[r=0]+"";--n;)t+=""+e[++r];return t}):i>1&&(o.normalizer=(yu?mu:(yu=1,mu=function(e){return e?function(t){for(var r=t[0]+"",n=0,i=e;--i;)r+=""+t[++n];return r}:function(){return""}}))(i)):o.normalizer=!1===i?function(){if(Iu)return Ru;Iu=1;var e=ee(),t=Object.create;return Ru=function(){var r=0,n=[],i=t(null);return{get:function(t){var r,i=0,o=n,s=t.length;if(0===s)return o[s]||null;if(o=o[s]){for(;s-1>i;){if(-1===(r=e.call(o[0],t[i])))return null;o=o[1][r],++i}return-1===(r=e.call(o[0],t[i]))?null:o[1][r]||null}return null},set:function(t){var o,s=0,a=n,c=t.length;if(0===c)a[c]=++r;else{for(a[c]||(a[c]=[[],[]]),a=a[c];c-1>s;)-1===(o=e.call(a[0],t[s]))&&(o=a[0].push(t[s])-1,a[1].push([[],[]])),a=a[1][o],++s;-1===(o=e.call(a[0],t[s]))&&(o=a[0].push(t[s])-1),a[1][o]=++r}return i[r]=t,r},delete:function(t){var r,o=0,s=n,a=i[t],c=a.length,u=[];if(0===c)delete s[c];else if(s=s[c]){for(;c-1>o;){if(-1===(r=e.call(s[0],a[o])))return;u.push(s,r),s=s[1][r],++o}if(-1===(r=e.call(s[0],a[o])))return;for(t=s[1][r],s[0].splice(r,1),s[1].splice(r,1);!s[0].length&&u.length;)r=u.pop(),(s=u.pop())[0].splice(r,1),s[1].splice(r,1)}delete i[t]},clear:function(){n=[],i=t(null)}}}}()():1===i?function(){if(Pu)return xu;Pu=1;var e=ee();return xu=function(){var t=0,r=[],n=[];return{get:function(t){var i=e.call(r,t[0]);return-1===i?null:n[i]},set:function(e){return r.push(e[0]),n.push(++t),t},delete:function(t){var i=e.call(n,t);-1!==i&&(r.splice(i,1),n.splice(i,1))},clear:function(){r=[],n=[]}}}}()():function(){if(Nu)return Tu;Nu=1;var e=ee(),t=Object.create;return Tu=function(r){var n=0,i=[[],[]],o=t(null);return{get:function(t){for(var n,o=0,s=i;r-1>o;){if(-1===(n=e.call(s[0],t[o])))return null;s=s[1][n],++o}return-1===(n=e.call(s[0],t[o]))?null:s[1][n]||null},set:function(t){for(var s,a=0,c=i;r-1>a;)-1===(s=e.call(c[0],t[a]))&&(s=c[0].push(t[a])-1,c[1].push([[],[]])),c=c[1][s],++a;return-1===(s=e.call(c[0],t[a]))&&(s=c[0].push(t[a])-1),c[1][s]=++n,o[n]=t,n},delete:function(t){for(var n,s=0,a=i,c=[],u=o[t];r-1>s;){if(-1===(n=e.call(a[0],u[s])))return;c.push(a,n),a=a[1][n],++s}if(-1!==(n=e.call(a[0],u[s]))){for(t=a[1][n],a[0].splice(n,1),a[1].splice(n,1);!a[0].length&&c.length;)n=c.pop(),(a=c.pop())[0].splice(n,1),a[1].splice(n,1);delete o[t]}},clear:function(){i=[[],[]],o=t(null)}}}}()(i)),o.async&&function(){if(ku)return dl;ku=1;var e=Q(),t=te(),r=H(),n=V(),i=re(),o=[].slice,s=function(){}.apply,a=Object.create;B().async=function(c,u){var l,f,p,d=a(null),h=a(null),m=u.memoized,y=u.original;u.memoized=n((function(e){var t=arguments,r=t[t.length-1];return"function"==typeof r&&(l=r,t=o.call(t,0,-1)),m.apply(f=this,p=t)}),m);try{r(u.memoized,m)}catch(v){}u.on("get",(function(e){var t,r,n;if(l){if(d[e])return"function"==typeof d[e]?d[e]=[d[e],l]:d[e].push(l),void(l=null);t=l,r=f,n=p,l=f=p=null,i((function(){var i;hasOwnProperty.call(h,e)?(i=h[e],u.emit("getasync",e,n,r),s.call(t,i.context,i.args)):(l=t,f=r,p=n,m.apply(r,n))}))}})),u.original=function(){var t,r,n,o;return l?(t=e(arguments),r=function t(r){var n,a,c=t.id;if(null!=c){if(delete t.id,n=d[c],delete d[c],n)return a=e(arguments),u.has(c)&&(r?u.delete(c):(h[c]={context:this,args:a},u.emit("setasync",c,"function"==typeof n?1:n.length))),"function"==typeof n?o=s.call(n,this,a):n.forEach((function(e){o=s.call(e,this,a)}),this),o}else i(s.bind(t,this,arguments))},n=l,l=f=p=null,t.push(r),o=s.call(y,this,t),r.cb=n,l=r,o):s.call(y,this,arguments)},u.on("set",(function(e){l?(d[e]?"function"==typeof d[e]?d[e]=[d[e],l.cb]:d[e].push(l.cb):d[e]=l.cb,delete l.cb,l.id=e,l=null):u.delete(e)})),u.on("delete",(function(e){var t;hasOwnProperty.call(d,e)||h[e]&&(t=h[e],delete h[e],u.emit("deleteasync",e,o.call(t.args,1)))})),u.on("clear",(function(){var e=h;h=a(null),u.emit("clearasync",t(e,(function(e){return o.call(e.args,1)})))}))}}(),o.promise&&oe(),o.dispose&&function(){if(Ku)return yl;Ku=1;var e=F(),t=G(),r=B(),n=function(){}.apply;r.dispose=function(i,o,s){var a;if(e(i),s.async&&r.async||s.promise&&r.promise)return o.on("deleteasync",a=function(e,t){n.call(i,null,t)}),void o.on("clearasync",(function(e){t(e,(function(e,t){a(t,e)}))}));o.on("delete",a=function(e,t){i(t)}),o.on("clear",(function(e){t(e,(function(e,t){a(t,e)}))}))}}(),o.maxAge&&function(){if(tl)return vl;tl=1;var e=Q(),t=G(),r=re(),n=ie(),i=function(){if(el)return Zu;el=1;var e=j(),t=Qu?Ju:(Qu=1,Ju=2147483647);return Zu=function(r){if((r=e(r))>t)throw new TypeError(r+" exceeds maximum possible timeout");return r}}(),o=B(),s=Function.prototype,a=Math.max,c=Math.min,u=Object.create;o.maxAge=function(l,f,p){var d,h,m,y;(l=i(l))&&(d=u(null),f.on("set"+(h=p.async&&o.async||p.promise&&o.promise?"async":""),(function(e){d[e]=setTimeout((function(){f.delete(e)}),l),"function"==typeof d[e].unref&&d[e].unref(),y&&(y[e]&&"nextTick"!==y[e]&&clearTimeout(y[e]),y[e]=setTimeout((function(){delete y[e]}),m),"function"==typeof y[e].unref&&y[e].unref())})),f.on("delete"+h,(function(e){clearTimeout(d[e]),delete d[e],y&&("nextTick"!==y[e]&&clearTimeout(y[e]),delete y[e])})),p.preFetch&&(m=!0===p.preFetch||isNaN(p.preFetch)?.333:a(c(Number(p.preFetch),1),0))&&(y={},m=(1-m)*l,f.on("get"+h,(function(t,i,o){y[t]||(y[t]="nextTick",r((function(){var r;"nextTick"===y[t]&&(delete y[t],f.delete(t),p.async&&(i=e(i)).push(s),r=f.memoized.apply(o,i),p.promise&&n(r)&&("function"==typeof r.done?r.done(s,s):r.then(s,s)))})))}))),f.on("clear"+h,(function(){t(d,(function(e){clearTimeout(e)})),d={},y&&(t(y,(function(e){"nextTick"!==e&&clearTimeout(e)})),y={})})))}}(),o.max&&function(){if(il)return wl;il=1;var e=j(),t=function(){if(nl)return rl;nl=1;var e=j(),t=Object.create,r={}.hasOwnProperty;return rl=function(n){var i,o=0,s=1,a=t(null),c=t(null),u=0;return n=e(n),{hit:function(e){var t=c[e],l=++u;if(a[l]=e,c[e]=l,!t){if(++o,n>=o)return;return i(e=a[s]),e}if(delete a[t],s===t)for(;!r.call(a,++s);)continue},delete:i=function(e){var t=c[e];if(t&&(delete a[t],delete c[e],--o,s===t)){if(!o)return u=0,void(s=1);for(;!r.call(a,++s);)continue}},clear:function(){o=0,s=1,a=t(null),c=t(null),u=0}}}}(),r=B();r.max=function(n,i,o){var s,a,c;(n=e(n))&&(a=t(n),i.on("set"+(s=o.async&&r.async||o.promise&&r.promise?"async":""),c=function(e){void 0!==(e=a.hit(e))&&i.delete(e)}),i.on("get"+s,c),i.on("delete"+s,a.delete),i.on("clear"+s,a.clear))}}(),o.refCounter&&function(){if(ol)return gl;ol=1;var e=X(),t=B(),r=Object.create,n=Object.defineProperties;t.refCounter=function(i,o,s){var a,c;a=r(null),o.on("set"+(c=s.async&&t.async||s.promise&&t.promise?"async":""),(function(e,t){a[e]=t||1})),o.on("get"+c,(function(e){++a[e]})),o.on("delete"+c,(function(e){delete a[e]})),o.on("clear"+c,(function(){a={}})),n(o.memoized,{deleteRef:e((function(){var e=o.get(arguments);return null===e?null:a[e]?! --a[e]&&(o.delete(e),!0):null})),getRefCount:e((function(){var e=o.get(arguments);return null===e?0:a[e]?a[e]:0}))})}}(),r(n,o)}}()),_l=/^~(?=$|\/|\\)/,{appendFile:bl,readFile:Sl,writeFile:Ol}=Rn.promises,Rl=ae("~/.bashrc"),Il=El((async function(e){const t=void 0===e.guard?`\nsource "${e.rcPath}"\n`:`\n# ${e.guard}\nif [[ "$SOURCE_${e.guard.toUpperCase()}RC" != 0 && -f "${e.rcPath}" ]]; then source "${e.rcPath}"; fi\n`;try{await Promise.all([ce(e),ue(t,ae("~/.bashrc")),ue(t,ae("~/.profile"))])}catch(r){p(`Failed to add ${t} to .profile or .bashrc. You should add it manually: ${r}`)}}),{promise:!0});var xl,Pl;const Tl=t(function(){if(Pl)return xl;Pl=1;const e=On,t="win32"!==e.platform(),r=e.release(),n=/(\d+\.\d+)\.(\d+)/;return xl=function(e){return t?e.replace(/(\s+)/g,"\\$1"):((e="",t="")=>/1\d+\.\d+/.test(e)&&Number(t)>=17134.1184)(...n.exec(r).splice(1))?e:e.replace(/(\s+)/g,"%20")}}());var Nl,Cl,$l,Al,Ll,kl={exports:{}};const Dl=t(($l||($l=1,Al=function(){if(Cl)return Nl;Cl=1;var e=/[|\\{}()[\]^$+*?.]/g;return Nl=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(e,"\\$&")}}(),Ll=function(e){return e.split("").reverse().join("")},kl.exports=function(e,t,r){var n;return null==t&&(t="'"),null==r&&(r="\\"),"string"!=typeof e?e:(n=RegExp("(["+Al(t)+"])(?!"+Al(r)+")","g"),Ll(Ll(e).replace(n,"$1"+r)))}),kl.exports)),{GITHUB_ACTIONS:jl}=Qn,{appendFile:Ul}=Rn.promises,{GITHUB_ACTIONS:Fl}=Qn,{appendFile:Ml}=Rn.promises,Gl=[/\/usr\/bin\/?/,/\/usr\/local\/bin\/?/];var Bl,ql,Hl,Vl={exports:{}};const zl=t(ye());var Wl;const Xl=t((Wl||(Wl=1,me().addLocale("en",(function(e){var t=Math.floor(Math.abs(e)),r=(""+e).replace(/^[^.]*\.?/,"").length;return"string"==typeof e&&(e=parseInt(e,10)),1===t&&0===r?"one":"other"}))),{}));var Yl,Kl,Jl,Ql,Zl,ef={exports:{}};const tf=t(Zl?Ql:(Zl=1,Ql=function(){function e(e){Array.isArray(e)||(e=[e]);for(const t of e){const{id:e,data:r}=t;s[e]=r}}function t(e,t,n){const i=function(e){const t=s[e.locale];let r=e.unitTypeLookupOrder.slice();r.unshift(e.unitType),r=Array.from(new Set(r));let n=null;if(r.some((function(e){if(void 0!==t[e])return n=t[e],!0})),null===n)throw Error("Can not find any unit type data for locale: "+e.locale);return n}(n);return r.pluralize(n.locale,t,i[e]).replace("{0}",t)}if(Jl)return Kl;Jl=1;const r=ye(),n=Yl?ef.exports:(Yl=1,ef.exports=!("undefined"==typeof process||!process.versions||!process.versions.node)),i=[["years",290304e5],["months",24192e5],["weeks",6048e5],["days",864e5],["hours",36e5],["minutes",6e4],["seconds",1e3]],o={locale:"en",span:2,delimiter:", ",unitType:"long",unitTypeLookupOrder:["long","short","narrow"],autoloadLocales:!0},s={};return Kl={create:function(r){return r=Object.assign({},o,r||{}),{format:function(o,a,c){return function(r,o,a){if(function(t,r){const{autoload:i}=r;if(!s[t]){if(!n||!i)throw Error(`Missing locale: ${t}, you must load it manually before using it`);!function(t){try{e(he(`../locales/${t}.js`))}catch(r){throw Error(`Failed to load locale: ${t} from ../locales/${t}.js. If using a bundled time-delta, set 'autoloadLocales: false' in the config: ${r}`)}}(t)}}(a.locale,{autoload:a.autoloadLocales}),!r)throw Error("Missing first date argument");if(!o)throw Error("Missing second date argument");const c=function(e,t){let r=t-e;const n=[];return i.some((function(e){const t=e[0],i=e[1],o=Math.floor(r/i);if(r-=o*i,n.push([t,o]),0>=r)return!0})),n}(r,o),u=[];for(const e of c){const[r,n]=e;if(n>0&&u.push(t(r,n,a)),u.length>=a.span)break}return u.join(a.delimiter)}(o,a,c=Object.assign({},r,c||{}))}}},addLocale:e,defaultConfig:o}}()));var rf,nf;const of=t(nf?rf:(nf=1,rf={id:"en",data:{long:{years:{one:"{0} year",other:"{0} years"},months:{one:"{0} month",other:"{0} months"},weeks:{one:"{0} week",other:"{0} weeks"},days:{one:"{0} day",other:"{0} days"},hours:{one:"{0} hour",other:"{0} hours"},minutes:{one:"{0} minute",other:"{0} minutes"},seconds:{one:"{0} second",other:"{0} seconds"}},narrow:{years:{one:"{0}y",other:"{0}y"},months:{one:"{0}m",other:"{0}m"},weeks:{one:"{0}w",other:"{0}w"},days:{one:"{0}d",other:"{0}d"},hours:{one:"{0}h",other:"{0}h"},minutes:{one:"{0}m",other:"{0}m"},seconds:{one:"{0}s",other:"{0}s"}},short:{years:{one:"{0} yr",other:"{0} yrs"},months:{one:"{0} mth",other:"{0} mths"},weeks:{one:"{0} wk",other:"{0} wks"},days:{one:"{0} day",other:"{0} days"},hours:{one:"{0} hr",other:"{0} hr"},minutes:{one:"{0} min",other:"{0} min"},seconds:{one:"{0} sec",other:"{0} sec"}}}})),sf={name:"setup-cpp",version:"1.1.1"};var af,cf,uf,lf,ff,pf,df,hf,mf,yf,vf,wf,gf,Ef,_f,bf,Sf,Of,Rf,If,xf,Pf,Tf,Nf,Cf,$f,Af,Lf,kf,Df,jf,Uf,Ff,Mf,Gf,Bf,qf,Hf,Vf,zf,Wf,Xf,Yf,Kf,Jf,Qf,Zf,ep,tp,rp,np,ip,op,sp,ap,cp,up,lp,fp,pp,dp,hp,mp,yp,vp,wp,gp,Ep,_p,bp,Sp,Op,Rp,Ip,xp,Pp,Tp,Np,Cp,$p,Ap,Lp,kp,Dp,jp,Up,Fp,Mp,Gp,Bp,qp,Hp={exports:{}};const Vp=t(function(){function e(e,t,r,n){return new(r||(r=Promise))((function(t,i){function o(e){try{a(n.next(e))}catch(t){i(t)}}function s(e){try{a(n.throw(e))}catch(t){i(t)}}function a(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r((function(e){e(n)}))).then(o,s)}a((n=n.call(e)).next())}))}function t(e,t){function r(r){return function(c){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,r[0]&&(a=0)),a;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&o[3]>r[1])){a.label=r[1];break}if(6===r[0]&&o[1]>a.label){a.label=o[1],o=r;break}if(o&&o[2]>a.label){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(c){r=[6,c],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,c])}}var n,i,o,s,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s}if(qp)return Bp;qp=1;var r=jn,n=Me(),i=On,o=In,s=Rn,a=Pn,c=r.env.npm_package_json,u=r.env.npm_config_user_agent,l=!(!u||!u.startsWith("npm")),f=!(!c||!c.endsWith("package.json")),p=l||f,d=!(!u||!u.startsWith("yarn")),h=p||d,m=i.homedir(),y=process.env.XDG_CONFIG_HOME||o.join(m,".config","simple-update-notifier"),v=function(e){return o.join(y,"".concat(e.replace("@","").replace("/","__"),".json"))},w=function(r,n){return e(void 0,0,void 0,(function(){var e;return t(this,(function(t){return e="https://registry.npmjs.org/-/package/".concat(r,"/dist-tags"),[2,new Promise((function(t,r){a.get(e,(function(e){var i="";e.on("data",(function(e){return i+=e})),e.on("end",(function(){try{var e=JSON.parse(i)[n];e||r(Error("Error getting version")),t(e)}catch(o){r(Error("Could not parse version response"))}}))})).on("error",(function(e){return r(e)}))}))]}))}))},g=function(r){var i=r.pkg,o=r.updateCheckInterval,a=void 0===o?864e5:o,c=r.distTag,u=void 0===c?"latest":c,l=r.alwaysRun,f=r.debug;return e(void 0,0,void 0,(function(){var e,o;return t(this,(function(t){switch(t.label){case 0:return s.existsSync(y)||s.mkdirSync(y,{recursive:!0}),e=function(e){var t=v(e);try{if(!s.existsSync(t))return;return JSON.parse(s.readFileSync(t,"utf8")).lastUpdateCheck}catch(r){return}}(i.name),l||!e||e<(new Date).getTime()-a?[4,w(i.name,u)]:[3,2];case 1:return o=t.sent(),c=v(i.name),s.writeFileSync(c,JSON.stringify({lastUpdateCheck:(new Date).getTime()})),n.gt(o,i.version)?[2,o]:(f&&console.error("Latest version (".concat(o,") not newer than current version (").concat(i.version,")")),[3,3]);case 2:f&&console.error("Too recent to check for a new update. simpleUpdateNotifier() interval set to ".concat(a,"ms but only ").concat((new Date).getTime()-e,"ms since last check.")),t.label=3;case 3:return[2,!1]}var c}))}))};return Bp=function(r){return e(void 0,0,void 0,(function(){var e,n;return t(this,(function(t){switch(t.label){case 0:if(!r.alwaysRun&&(!process.stdout.isTTY||h&&!r.shouldNotifyInNpmScript))return r.debug&&console.error("Opting out of running simpleUpdateNotifier()"),[2];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,g(r)];case 2:return(e=t.sent())&&console.error(function(e){for(var t=e.split("\n"),r=Math.max.apply(Math,t.map((function(e){return e.length}))),n=["┌".concat("─".repeat(r+2),"┐")],i=0,o=t;o.length>i;i++)n.push("│ ".concat(o[i].padEnd(r)," │"));return n.push("└".concat("─".repeat(r+2),"┘")),n.join("\n")}("New version of ".concat(r.pkg.name," available!\nCurrent Version: ").concat(r.pkg.version,"\nLatest Version: ").concat(e))),[3,4];case 3:return n=t.sent(),r.debug&&n instanceof Error&&console.error("Unexpected error in simpleUpdateNotifier():",n),[3,4];case 4:return[2]}}))}))}}());var zp,Wp={},Xp=(zp||(zp=1,function(e){function t(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)({}).hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(e,"__esModule",{value:!0}),e.DownloaderHelper=e.DH_STATES=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var r,n=0;t.length>n;n++)(r=t[n]).enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=t(Rn),s=Un,a=t(In),c=t(xn),u=t(Pn),l=Nn,f=e.DH_STATES={IDLE:"IDLE",SKIPPED:"SKIPPED",STARTED:"STARTED",DOWNLOADING:"DOWNLOADING",RETRY:"RETRY",PAUSED:"PAUSED",RESUMED:"RESUMED",STOPPED:"STOPPED",FINISHED:"FINISHED",FAILED:"FAILED"};e.DownloaderHelper=function(e){function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{captureRejections:!0}));return o.__validate(e,n)?(o.url=o.requestURL=e.trim(),o.state=f.IDLE,o.__defaultOpts={body:null,retry:!1,method:"GET",headers:{},fileName:"",timeout:-1,metadata:null,override:!1,forceResume:!1,removeOnStop:!0,removeOnFail:!0,progressThrottle:1e3,httpRequestOptions:{},httpsRequestOptions:{},resumeOnIncomplete:!0,resumeIfFileExists:!1,resumeOnIncompleteMaxRetry:5},o.__opts=Object.assign({},o.__defaultOpts),o.__pipes=[],o.__total=0,o.__downloaded=0,o.__progress=0,o.__retryCount=0,o.__retryTimeout=null,o.__resumeRetryCount=0,o.__states=f,o.__promise=null,o.__request=null,o.__response=null,o.__isAborted=!1,o.__isResumed=!1,o.__isResumable=!1,o.__isRedirected=!1,o.__destFolder=n,o.__statsEstimate={time:0,bytes:0,prevBytes:0,throttleTime:0},o.__fileName="",o.__filePath="",o.updateOptions(i),o):r(o)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"start",value:function(){var e=this,t=function(){return new Promise((function(t,r){e.__promise={resolve:t,reject:r},e.__start()}))};return this.__opts.resumeIfFileExists&&this.state!==this.__states.RESUMED?this.getTotalSize().then((function(r){var n=r.name,i=r.total,s=e.__opts.override;return e.__opts.override=!0,e.__filePath=e.__getFilePath(n),e.__opts.override=s,e.__filePath&&o.existsSync(e.__filePath)?e.__getFilesizeInBytes(e.__filePath)===i?t():e.resumeFromFile(e.__filePath,{total:i,fileName:n}):t()})):t()}},{key:"pause",value:function(){var e=this;return this.state===this.__states.STOPPED?Promise.resolve(!0):(this.__response&&(this.__response.unpipe(),this.__pipes.forEach((function(e){return e.stream.unpipe()}))),this.__fileStream&&this.__fileStream.removeAllListeners(),this.__requestAbort(),this.__closeFileStream().then((function(){return e.__setState(e.__states.PAUSED),e.emit("pause"),!0})))}},{key:"resume",value:function(){return this.__promise?this.state===this.__states.STOPPED?Promise.resolve(!1):(this.__setState(this.__states.RESUMED),this.__isResumable&&(this.__isResumed=!0,this.__reqOptions.headers.range="bytes="+this.__downloaded+"-"),this.emit("resume",this.__isResumed),this.__start()):this.start()}},{key:"stop",value:function(){var e=this;return this.state===this.__states.STOPPED?Promise.resolve(!0):(this.__requestAbort(),this.__closeFileStream().then((function(){return e.__opts.removeOnStop?new Promise((function(t,r){o.access(e.__filePath,(function(n){return n?(e.__emitStop(),t(!0)):void o.unlink(e.__filePath,(function(n){return n?(e.__setState(e.__states.FAILED),e.emit("error",n),r(n)):(e.__emitStop(),void t(!0))}))}))})):(e.__emitStop(),Promise.resolve(!0))})))}},{key:"pipe",value:function(e){return this.__pipes.push({stream:e,options:arguments.length>1&&void 0!==arguments[1]?arguments[1]:null}),e}},{key:"unpipe",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=function(t){return e.__response?e.__response.unpipe(t):t.unpipe()};t?this.__pipes.find((function(e){return e.stream===t}))&&(r(t),this.__pipes=this.__pipes.filter((function(e){return e.stream!==t}))):(this.__pipes.forEach((function(e){return r(e.stream)})),this.__pipes=[])}},{key:"getDownloadPath",value:function(){return this.__filePath}},{key:"isResumable",value:function(){return this.__isResumable}},{key:"updateOptions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.__opts=Object.assign({},this.__opts,e),this.__headers=this.__opts.headers,this.__opts.timeout>-1&&(this.__opts.httpRequestOptions.timeout=this.__opts.timeout,this.__opts.httpsRequestOptions.timeout=this.__opts.timeout),("number"!=typeof this.__opts.progressThrottle||0>this.__opts.progressThrottle)&&(this.__opts.progressThrottle=this.__defaultOpts.progressThrottle),this.url=t||this.url,this.__reqOptions=this.__getReqOptions(this.__opts.method,this.url,this.__opts.headers),this.__initProtocol(this.url)}},{key:"getOptions",value:function(){return this.__opts}},{key:"getMetadata",value:function(){return this.__opts.metadata}},{key:"getStats",value:function(){return{total:this.__total,name:this.__fileName,downloaded:this.__downloaded,progress:this.__progress,speed:this.__statsEstimate.bytes}}},{key:"getTotalSize",value:function(){var e=this;return new Promise((function(t,r){var n=function(t){e.__initProtocol(t);var r=Object.assign({},e.__headers);r.hasOwnProperty("range")&&delete r.range;var n=e.__getReqOptions("HEAD",t,r);return Object.assign({},e.__reqOptions,n)},i=function(o,a){var c=e.__protocol.request(a,(function(a){if(e.__isRequireRedirect(a)){var c=/^https?:\/\//.test(a.headers.location)?a.headers.location:new s.URL(a.headers.location,o).href;return e.emit("redirected",c,o),i(c,n(c))}return 200===a.statusCode?void t({name:e.__getFileNameFromHeaders(a.headers,a),total:parseInt(a.headers["content-length"])||null}):r(Error("Response status was "+a.statusCode))}));c.on("error",(function(e){return r(e)})),c.on("timeout",(function(){return r(Error("timeout"))})),c.on("uncaughtException",(function(e){return r(e)})),c.end()};i(e.url,n(e.url))}))}},{key:"getResumeState",value:function(){return{downloaded:this.__downloaded,filePath:this.__filePath,fileName:this.__fileName,total:this.__total}}},{key:"resumeFromFile",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.__opts.override=!0,this.__filePath=e,(r.total&&r.fileName?Promise.resolve({name:r.fileName,total:r.total}):this.getTotalSize()).then((function(e){var n=e.name;return t.__total=r.total||e.total,t.__fileName=r.fileName||n,t.__downloaded=r.downloaded||t.__getFilesizeInBytes(t.__filePath),t.__reqOptions.headers.range="bytes="+t.__downloaded+"-",t.__isResumed=!0,t.__isResumable=!0,t.__setState(t.__states.RESUMED),t.emit("resume",t.__isResumed),new Promise((function(e,r){t.__promise={resolve:e,reject:r},t.__start()}))}))}},{key:"__start",value:function(){this.__isRedirected||this.state===this.__states.RESUMED||(this.emit("start"),this.__setState(this.__states.STARTED),this.__initProtocol(this.url)),this.__response=null,this.__isAborted=!1,this.__request&&!this.__request.destroyed&&this.__request.destroy(),this.__retryTimeout&&(clearTimeout(this.__retryTimeout),this.__retryTimeout=null),this.__request=this.__downloadRequest(this.__promise.resolve,this.__promise.reject),this.__request.on("error",this.__onError(this.__promise.resolve,this.__promise.reject)),this.__request.on("timeout",this.__onTimeout(this.__promise.resolve,this.__promise.reject)),this.__request.on("uncaughtException",this.__onError(this.__promise.resolve,this.__promise.reject,!0)),this.__opts.body&&this.__request.write(this.__opts.body),this.__request.end()}},{key:"__resolvePending",value:function(){if(this.__promise){var e=this.__promise.resolve;return this.__promise=null,e(!0)}}},{key:"__downloadRequest",value:function(e,t){var r=this;return this.__protocol.request(this.__reqOptions,(function(n){if(r.__response=n,r.__isResumed||(r.__total=parseInt(n.headers["content-length"])||null,r.__resetStats()),r.__isRequireRedirect(n)){var i=/^https?:\/\//.test(n.headers.location)?n.headers.location:new s.URL(n.headers.location,r.url).href;return r.__isRedirected=!0,r.__initProtocol(i),r.emit("redirected",i,r.url),r.__start()}if(200!==n.statusCode&&206!==n.statusCode){var o=Error("Response status was "+n.statusCode);return o.status=n.statusCode||0,o.body=n.body||"",r.__setState(r.__states.FAILED),r.emit("error",o),t(o)}(r.__opts.forceResume||n.headers.hasOwnProperty("accept-ranges")&&"none"!==n.headers["accept-ranges"])&&(r.__isResumable=!0),r.__startDownload(n,e,t)}))}},{key:"__startDownload",value:function(e,t,r){var i=this,s=e;if(this.__isResumed)this.__fileStream=o.createWriteStream(this.__filePath,{flags:"a"});else{var c=this.__getFileNameFromHeaders(e.headers);if(this.__filePath=this.__getFilePath(c),this.__fileName=this.__filePath.split(a.sep).pop(),o.existsSync(this.__filePath)){var u=this.__getFilesizeInBytes(this.__filePath),l=this.__total?this.__total:0;if("object"===n(this.__opts.override)&&this.__opts.override.skip&&(this.__opts.override.skipSmaller||u>=l))return this.emit("skip",{totalSize:this.__total,fileName:this.__fileName,filePath:this.__filePath,downloadedSize:u}),this.__setState(this.__states.SKIPPED),t(!0)}this.__fileStream=o.createWriteStream(this.__filePath,{})}this.emit("download",{fileName:this.__fileName,filePath:this.__filePath,totalSize:this.__total,isResumed:this.__isResumed,downloadedSize:this.__downloaded}),this.__retryCount=0,this.__isResumed=!1,this.__isRedirected=!1,this.__setState(this.__states.DOWNLOADING),this.__statsEstimate.time=new Date,this.__statsEstimate.throttleTime=new Date,s.on("data",(function(e){return i.__calculateStats(e.length)})),this.__pipes.forEach((function(e){s.pipe(e.stream,e.options),s=e.stream})),s.pipe(this.__fileStream),s.on("error",this.__onError(t,r)),this.__fileStream.on("finish",this.__onFinished(t,r)),this.__fileStream.on("error",this.__onError(t,r))}},{key:"__hasFinished",value:function(){return!this.__isAborted&&-1===[this.__states.PAUSED,this.__states.STOPPED,this.__states.RETRY,this.__states.FAILED,this.__states.RESUMED].indexOf(this.state)}},{key:"__isRequireRedirect",value:function(e){return e.statusCode>300&&400>e.statusCode&&e.headers.hasOwnProperty("location")&&e.headers.location}},{key:"__onFinished",value:function(e,t){var r=this;return function(){r.__fileStream.close((function(n){if(n)return t(n);if(r.__hasFinished()){var i=!!r.__total&&r.__downloaded!==r.__total;if(i&&r.__isResumable&&r.__opts.resumeOnIncomplete&&r.__opts.resumeOnIncompleteMaxRetry>=r.__resumeRetryCount)return r.__resumeRetryCount++,r.emit("warning",Error("uncomplete download, retrying")),r.resume();r.__setState(r.__states.FINISHED),r.__pipes=[],r.emit("end",{fileName:r.__fileName,filePath:r.__filePath,totalSize:r.__total,incomplete:i,onDiskSize:r.__getFilesizeInBytes(r.__filePath),downloadedSize:r.__downloaded})}return e(r.__downloaded===r.__total)}))}}},{key:"__closeFileStream",value:function(){var e=this;return this.__fileStream?new Promise((function(t,r){e.__fileStream.close((function(e){return e?r(e):t(!0)}))})):Promise.resolve(!0)}},{key:"__onError",value:function(e,t){var r=this,n=!(2>=arguments.length||void 0===arguments[2])&&arguments[2];return function(e){return r.__pipes=[],n&&r.__requestAbort(),r.state===r.__states.STOPPED||r.state===r.__states.FAILED?void 0:r.__opts.retry?r.__retry(e).catch((function(n){r.__removeFile().finally((function(){r.__setState(r.__states.FAILED),r.emit("error",n||e),t(n||e)}))})):r.__removeFile().finally((function(){r.__setState(r.__states.FAILED),r.emit("error",e),t(e)}))}}},{key:"__retry",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!this.__opts.retry||"object"!==n(this.__opts.retry))return Promise.reject(t||Error("wrong retry options"));var r=this.__opts.retry,i=r.delay,o=void 0===i?0:i,s=r.maxRetries;return(void 0===s?999:s)>this.__retryCount?(this.__retryCount++,this.__setState(this.__states.RETRY),this.emit("retry",this.__retryCount,this.__opts.retry,t),this.__response&&(this.__response.unpipe(),this.__pipes.forEach((function(e){return e.stream.unpipe()}))),this.__fileStream&&this.__fileStream.removeAllListeners(),this.__requestAbort(),this.__closeFileStream().then((function(){return new Promise((function(t){return e.__retryTimeout=setTimeout((function(){return t(e.__downloaded>0?e.resume():e.__start())}),o)}))}))):Promise.reject(t||Error("reached the maximum retries"))}},{key:"__onTimeout",value:function(e,t){var r=this;return function(){return r.__requestAbort(),r.__opts.retry?r.__retry(Error("timeout")).catch((function(e){r.__removeFile().finally((function(){r.__setState(r.__states.FAILED),e?t(e):(r.emit("timeout"),t(Error("timeout")))}))})):r.__removeFile().finally((function(){r.__setState(r.__states.FAILED),r.emit("timeout"),t(Error("timeout"))}))}}},{key:"__resetStats",value:function(){this.__retryCount=0,this.__downloaded=0,this.__progress=0,this.__resumeRetryCount=0,this.__statsEstimate={time:0,bytes:0,prevBytes:0,throttleTime:0}}},{key:"__getFileNameFromHeaders",value:function(e,t){var r="",n=e.hasOwnProperty("content-disposition"),i=n?e["content-disposition"].match(/.*filename\*=.*?'.*?'([^"].+?[^"])(?:(?:;)|$)/i):null,o=!n||i?null:e["content-disposition"].match(/.*filename="(.*?)";?/i),c=!n||i||o?null:e["content-disposition"].match(/.*filename=([^"].+?[^"])(?:(?:;)|$)/i);return n&&(i||o||c)?(r=(r=e["content-disposition"]).trim(),i?r=i[1]:o?r=o[1]:c&&(r=c[1]),r=r.replace(/[/\\]/g,"")):r=a.basename(new s.URL(this.requestURL).pathname).length>0?a.basename(new s.URL(this.requestURL).pathname):new s.URL(this.requestURL).hostname+".html",this.__opts.fileName?this.__getFileNameFromOpts(r,t):r.replace(/\.*$/,"")}},{key:"__getFilePath",value:function(e){var t=a.join(this.__destFolder,e),r=t;return this.__opts.override||this.state===this.__states.RESUMED||t!==(r=this.__uniqFileNameSync(r))&&this.emit("renamed",{path:r,fileName:r.split(a.sep).pop(),prevPath:t,prevFileName:t.split(a.sep).pop()}),r}},{key:"__getFileNameFromOpts",value:function(e,t){if(!this.__opts.fileName)return e;if("string"==typeof this.__opts.fileName)return this.__opts.fileName;if("function"==typeof this.__opts.fileName){var r=a.join(this.__destFolder,e);return t&&t.headers||this.__response&&this.__response.headers?this.__opts.fileName(e,r,(t||this.__response).headers["content-type"]):this.__opts.fileName(e,r)}if("object"===n(this.__opts.fileName)){var i=this.__opts.fileName,o=i.name,s=!!i.hasOwnProperty("ext")&&i.ext;if("string"==typeof s)return o+"."+s;if("boolean"==typeof s){if(s)return o;var c=e.includes(".")?e.split(".").pop():"";return""===c?o:o+"."+c}}return e}},{key:"__calculateStats",value:function(e){var t=new Date,r=t-this.__statsEstimate.time,n=t-this.__statsEstimate.throttleTime,i=this.__total||0;e&&(this.__downloaded+=e,this.__progress=0===i?0:this.__downloaded/i*100,(this.__downloaded===i||r>1e3)&&(this.__statsEstimate.time=t,this.__statsEstimate.bytes=this.__downloaded-this.__statsEstimate.prevBytes,this.__statsEstimate.prevBytes=this.__downloaded),(this.__downloaded===i||n>this.__opts.progressThrottle)&&(this.__statsEstimate.throttleTime=t,this.emit("progress.throttled",this.getStats())),this.emit("progress",this.getStats()))}},{key:"__setState",value:function(e){this.state=e,this.emit("stateChanged",this.state)}},{key:"__getReqOptions",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=new s.URL(t),i={protocol:n.protocol,host:n.hostname,port:n.port,path:n.pathname+n.search,method:e};return r&&(i.headers=r),i}},{key:"__getFilesizeInBytes",value:function(e){try{return o.statSync(e,{throwIfNoEntry:!1}).size||0}catch(t){this.emit("warning",t)}return 0}},{key:"__validate",value:function(e,t){if("string"!=typeof e)throw Error("URL should be an string");if(""===e.trim())throw Error("URL couldn't be empty");if("string"!=typeof t)throw Error("Destination Folder should be an string");if(""===t.trim())throw Error("Destination Folder couldn't be empty");if(!o.existsSync(t))throw Error("Destination Folder must exist");if(!o.statSync(t).isDirectory())throw Error("Destination Folder must be a directory");try{o.accessSync(t,o.constants.W_OK)}catch(r){throw Error("Destination Folder must be writable")}return!0}},{key:"__initProtocol",value:function(e){var t=this.__getReqOptions(this.__opts.method,e,this.__headers);this.requestURL=e,e.indexOf("https://")>-1?(this.__protocol=u,t.agent=new u.Agent({keepAlive:!1}),this.__reqOptions=Object.assign({},t,this.__opts.httpsRequestOptions)):(this.__protocol=c,t.agent=new c.Agent({keepAlive:!1}),this.__reqOptions=Object.assign({},t,this.__opts.httpRequestOptions))}},{key:"__uniqFileNameSync",value:function(e){if("string"!=typeof e||""===e)return e;try{o.accessSync(e,o.F_OK);var t=e.match(/(.*)(\([0-9]+\))(\..*)$/),r=t?t[1].trim():e,n=t?parseInt(t[2].replace(/\(|\)/,"")):0,i=e.split(".").pop();return i!==e&&i.length>0?r=r.replace(i="."+i,""):i="",this.__uniqFileNameSync(r+" ("+ ++n+")"+i)}catch(s){return e}}},{key:"__removeFile",value:function(){var e=this;return new Promise((function(t){return e.__fileStream?void e.__fileStream.close((function(r){return r&&e.emit("warning",r),e.__opts.removeOnFail?o.access(e.__filePath,(function(n){return n?t():void o.unlink(e.__filePath,(function(n){n&&e.emit("warning",r),t()}))})):void t()})):t()}))}},{key:"__requestAbort",value:function(){this.__isAborted=!0,this.__retryTimeout&&(clearTimeout(this.__retryTimeout),this.__retryTimeout=null),this.__response&&this.__response.destroy(),this.__request&&(this.__request.destroy?this.__request.destroy():this.__request.abort())}},{key:"__emitStop",value:function(){this.__resolvePending(),this.__setState(this.__states.STOPPED),this.emit("stop")}}]),t}(l.EventEmitter)}(Wp)),Wp);const{GITHUB_ACTIONS:Yp}=Qn,{appendFile:Kp}=Rn.promises,Jp="Dpkg::Lock::Timeout=300";let Qp=!1;const Zp=El((function(e=ze()){T(e,["update","-o",Jp],{...fa,env:He(e)}),Qp=!0}));var ed,td;(td=ed||(ed={}))[td.NameDashVersion=0]="NameDashVersion",td[td.NameEqualsVersion=1]="NameEqualsVersion",td[td.Name=2]="Name",td[td.None=3]="None";const rd=El((async function(e){Zp(e);const t=await Ye([{name:"ca-certificates"},{name:"gnupg"},{name:"apt-utils"}],e);0!==t.length&&T(e,["install","-y","--fix-broken","-o",Jp,...t],{...fa,env:He(e)})}),{promise:!0}),nd=["E: Could not get lock","dpkg: error processing archive","dpkg: error: dpkg status database is locked by another process"],id="/etc/apt/trusted.gpg.d",od="keyserver.ubuntu.com";let sd,ad,cd,ud,ld,fd=!1,pd=!1,dd=!1,hd=!1;const md=/Version\s*:\s*(.*)/g;let yd=!1;var vd,wd;const gd=t(function(){if(wd)return vd;wd=1;var e=In;return vd=function(t,r){if("string"!=typeof t)return t;if(0===t.length)return t;var n,i=e.basename(t,e.extname(t))+r,o=e.join(e.dirname(t),i);return(n=t.slice(0,2))==="."+e.sep||"./"===n?"."+e.sep+o:o}}());var Ed={},_d={};wt(_d,"name",(()=>gt));var bd={};wt(bd,"normalizeTrim",(()=>Et));var Sd={};wt(Sd,"addExeExt",(()=>_t));var Od={};wt(Od,"addNamePrefix",(()=>bt));var Rd={};wt(Rd,"addNameSuffix",(()=>St));var Id={};wt(Id,"addShExt",(()=>Ot));var xd={};wt(xd,"addShRelativePrefix",(()=>Rt));var Pd={};wt(Pd,"removeExt",(()=>It));var Td={};wt(Td,"replaceExt",(()=>xt));var Nd={};wt(Nd,"isPathInside",(()=>Pt)),vt(Ed,_d),vt(Ed,bd),vt(Ed,Sd),vt(Ed,Od),vt(Ed,Rd),vt(Ed,Id),vt(Ed,xd),vt(Ed,Pd),vt(Ed,Td),vt(Ed,Nd);const Cd=t(ke()),$d=t(Ae()),Ad=["x64","amd64","x86_64","win64","64","amd64_x86","amd64_arm64"],Ld=["x86","i386","ia32","win32","32","x32"],kd=["aarch64","arm64","woa64","arm"],Dd=["armv7","armv7a"],jd=["powerpc64le","ppc64le"],Ud=["sparc64"],Fd=["sparcv9"];var Md,Gd,Bd,qd,Hd,Vd={},zd={exports:{}},Wd={exports:{}},Xd=zd.exports,Yd={},Kd=function(){function e(e,t){const r=[];t=t||_.arch();const n=b.join(s(),e);if(g.existsSync(n)){const e=g.readdirSync(n);for(const o of e)if(i(o)){const e=b.join(n,o,t||"");g.existsSync(e)&&g.existsSync(e+".complete")&&r.push(o)}}return r}function t(e){return m(this,void 0,void 0,(function*(){return e||(e=b.join(a(),w.randomUUID())),yield v.mkdirP(e),e}))}function r(e,t,r){return m(this,void 0,void 0,(function*(){const n=b.join(s(),e,O.clean(t)||t,r||"");y.debug("destination "+n);const i=n+".complete";return yield v.rmRF(n),yield v.rmRF(i),yield v.mkdirP(n),n}))}function n(e,t,r){const n=b.join(s(),e,O.clean(t)||t,r||"");g.writeFileSync(n+".complete",""),y.debug("finished caching tool")}function i(e){const t=O.clean(e)||"";y.debug("isExplicit: "+t);const r=null!=O.valid(t);return y.debug("explicit? "+r),r}function o(e,t){let r="";y.debug(`evaluating ${e.length} versions`);for(let n=(e=e.sort(((e,t)=>O.gt(e,t)?1:-1))).length-1;n>=0;n--){const i=e[n];if(O.satisfies(i,t)){r=i;break}}return y.debug(r?"matched: "+r:"match not found"),r}function s(){const e=process.env.RUNNER_TOOL_CACHE||"";return(0,x.ok)(e,"Expected RUNNER_TOOL_CACHE to be defined"),e}function a(){const e=process.env.RUNNER_TEMP||"";return(0,x.ok)(e,"Expected RUNNER_TEMP to be defined"),e}function f(e,t){const r=Wn[e];return void 0!==r?r:t}if(qd)return Vd;qd=1;var p=Vd&&Vd.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),d=Vd&&Vd.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),h=Vd&&Vd.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&p(t,e,r);return d(t,e),t},m=Vd&&Vd.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(Vd,"__esModule",{value:!0}),Vd.evaluateVersions=Vd.isExplicitVersion=Vd.findFromManifest=Vd.getManifestFromRepo=Vd.findAllVersions=Vd.find=Vd.cacheFile=Vd.cacheDir=Vd.extractZip=Vd.extractXar=Vd.extractTar=Vd.extract7z=Vd.downloadTool=Vd.HTTPError=void 0;const y=h(l()),v=h(c()),w=h(si),g=h(Rn),E=h((Gd||(Gd=1,function(e,t){var r=Xd&&Xd.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),n=Xd&&Xd.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=Xd&&Xd.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&r(t,e,i);return n(t,e),t},o=Xd&&Xd.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t._readLinuxVersionFile=t._getOsVersion=t._findMatch=void 0;const s=i(Tt()),a=l(),c=On,u=An,f=Rn;t._findMatch=function(t,r,n,i){return o(this,void 0,void 0,(function*(){const o=c.platform();let u,l,f;for(const c of n){const n=c.version;if((0,a.debug)(`check ${n} satisfies ${t}`),s.satisfies(n,t)&&(!r||c.stable===r)&&(f=c.files.find((t=>{(0,a.debug)(`${t.arch}===${i} && ${t.platform}===${o}`);let r=t.arch===i&&t.platform===o;if(r&&t.platform_version){const n=e.exports._getOsVersion();r=n===t.platform_version||s.satisfies(n,t.platform_version)}return r})),f)){(0,a.debug)("matched "+c.version),l=c;break}}return l&&f&&(u=Object.assign({},l),u.files=[f]),u}))},t._getOsVersion=function(){const t=c.platform();let r="";if("darwin"===t)r=""+u.execSync("sw_vers -productVersion");else if("linux"===t){const t=e.exports._readLinuxVersionFile();if(t){const e=t.split("\n");for(const t of e){const e=t.split("=");if(2===e.length&&("VERSION_ID"===e[0].trim()||"DISTRIB_RELEASE"===e[0].trim())){r=e[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return r},t._readLinuxVersionFile=function(){const e="/etc/lsb-release",t="/etc/os-release";let r="";return f.existsSync(e)?r=""+f.readFileSync(e):f.existsSync(t)&&(r=""+f.readFileSync(t)),r}}(zd,zd.exports)),zd.exports)),_=h(On),b=h(In),S=h(xi),O=h(Tt()),R=h(Fn),I=h(Cn),x=Ln,P=u(),T=function(){if(Bd)return Yd;Bd=1;var e=Yd&&Yd.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=Yd&&Yd.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Yd&&Yd.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var i in r)"default"!==i&&{}.hasOwnProperty.call(r,i)&&e(n,r,i);return t(n,r),n},n=Yd&&Yd.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(Yd,"__esModule",{value:!0}),Yd.RetryHelper=void 0;const i=r(l());return Yd.RetryHelper=class{constructor(e,t,r){if(1>e)throw Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(t),this.maxSeconds=Math.floor(r),this.minSeconds>this.maxSeconds)throw Error("min seconds should be less than or equal to max seconds")}execute(e,t){return n(this,void 0,void 0,(function*(){let r=1;for(;this.maxAttempts>r;){try{return yield e()}catch(n){if(t&&!t(n))throw n;i.info(n.message)}const o=this.getSleepAmount();i.info(`Waiting ${o} seconds before trying again`),yield this.sleep(o),r++}return yield e()}))}getSleepAmount(){return Math.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(e){return n(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,1e3*e)))}))}},Yd}();class N extends Error{constructor(e){super("Unexpected HTTP response: "+e),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}}Vd.HTTPError=N;const C="win32"===process.platform,$="darwin"===process.platform;return Vd.downloadTool=function(e,t,r,n){return m(this,void 0,void 0,(function*(){t=t||b.join(a(),w.randomUUID()),yield v.mkdirP(b.dirname(t)),y.debug("Downloading "+e),y.debug("Destination "+t);const i=f("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),o=f("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20),s=new T.RetryHelper(3,i,o);return yield s.execute((()=>m(this,void 0,void 0,(function*(){return yield function(e,t,r,n){return m(this,void 0,void 0,(function*(){if(g.existsSync(t))throw Error(`Destination file path ${t} already exists`);const i=new S.HttpClient("actions/tool-cache",[],{allowRetries:!1});r&&(y.debug("set auth"),void 0===n&&(n={}),n.authorization=r);const o=yield i.get(e,n);if(200!==o.message.statusCode){const t=new N(o.message.statusCode);throw y.debug(`Failed to download from "${e}". Code(${o.message.statusCode}) Message(${o.message.statusMessage})`),t}const s=I.promisify(R.pipeline),a=f("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>o.message))();let c=!1;try{return yield s(a,g.createWriteStream(t)),y.debug("download complete"),c=!0,t}finally{if(!c){y.debug("download failed");try{yield v.rmRF(t)}catch(u){y.debug(`Failed to delete '${t}'. ${u.message}`)}}}}))}(e,t||"",r,n)}))),(e=>!(e instanceof N&&e.httpStatusCode&&500>e.httpStatusCode&&408!==e.httpStatusCode&&429!==e.httpStatusCode)))}))},Vd.extract7z=function(e,r,n){return m(this,void 0,void 0,(function*(){(0,x.ok)(C,"extract7z() not supported on current OS"),(0,x.ok)(e,'parameter "file" is required'),r=yield t(r);const i=process.cwd();if(process.chdir(r),n)try{const t=["x",y.isDebug()?"-bb1":"-bb0","-bd","-sccUTF-8",e],r={silent:!0};yield(0,P.exec)(`"${n}"`,t,r)}finally{process.chdir(i)}else{const t=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${b.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Source '${e.replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Target '${r.replace(/'/g,"''").replace(/"|\n|\r/g,"")}'`],n={silent:!0};try{const e=yield v.which("powershell",!0);yield(0,P.exec)(`"${e}"`,t,n)}finally{process.chdir(i)}}return r}))},Vd.extractTar=function(e,r,n="xz"){return m(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");r=yield t(r),y.debug("Checking tar --version");let i="";yield(0,P.exec)("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:e=>i+=""+e,stderr:e=>i+=""+e}}),y.debug(i.trim());const o=i.toUpperCase().includes("GNU TAR");let s;s=n instanceof Array?n:[n],y.isDebug()&&!n.includes("v")&&s.push("-v");let a=r,c=e;return C&&o&&(s.push("--force-local"),a=r.replace(/\\/g,"/"),c=e.replace(/\\/g,"/")),o&&(s.push("--warning=no-unknown-keyword"),s.push("--overwrite")),s.push("-C",a,"-f",c),yield(0,P.exec)("tar",s),r}))},Vd.extractXar=function(e,r,n=[]){return m(this,void 0,void 0,(function*(){let i;(0,x.ok)($,"extractXar() not supported on current OS"),(0,x.ok)(e,'parameter "file" is required'),r=yield t(r),i=n instanceof Array?n:[n],i.push("-x","-C",r,"-f",e),y.isDebug()&&i.push("-v");const o=yield v.which("xar",!0);var s;return yield(0,P.exec)(`"${o}"`,(s=i,Array.from(new Set(s)))),r}))},Vd.extractZip=function(e,r){return m(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");return r=yield t(r),C?yield function(e,t){return m(this,void 0,void 0,(function*(){const r=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),n=t.replace(/'/g,"''").replace(/"|\n|\r/g,""),i=yield v.which("pwsh",!1);if(i){const e=["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",["$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;",`try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${n}', $true) }`,`catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${r}' -DestinationPath '${n}' -Force } else { throw $_ } } ;`].join(" ")];y.debug("Using pwsh at path: "+i),yield(0,P.exec)(`"${i}"`,e)}else{const e=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",["$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;",`if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${r}' -DestinationPath '${n}' -Force }`,`else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${n}', $true) }`].join(" ")],t=yield v.which("powershell",!0);y.debug("Using powershell at path: "+t),yield(0,P.exec)(`"${t}"`,e)}}))}(e,r):yield function(e,t){return m(this,void 0,void 0,(function*(){const r=yield v.which("unzip",!0),n=[e];y.isDebug()||n.unshift("-q"),n.unshift("-o"),yield(0,P.exec)(`"${r}"`,n,{cwd:t})}))}(e,r),r}))},Vd.cacheDir=function(e,t,i,o){return m(this,void 0,void 0,(function*(){if(i=O.clean(i)||i,o=o||_.arch(),y.debug(`Caching tool ${t} ${i} ${o}`),y.debug("source dir: "+e),!g.statSync(e).isDirectory())throw Error("sourceDir is not a directory");const s=yield r(t,i,o);for(const t of g.readdirSync(e)){const r=b.join(e,t);yield v.cp(r,s,{recursive:!0})}return n(t,i,o),s}))},Vd.cacheFile=function(e,t,i,o,s){return m(this,void 0,void 0,(function*(){if(o=O.clean(o)||o,s=s||_.arch(),y.debug(`Caching tool ${i} ${o} ${s}`),y.debug("source file: "+e),!g.statSync(e).isFile())throw Error("sourceFile is not a file");const a=yield r(i,o,s),c=b.join(a,t);return y.debug("destination file "+c),yield v.cp(e,c),n(i,o,s),a}))},Vd.find=function(t,r,n){if(!t)throw Error("toolName parameter is required");if(!r)throw Error("versionSpec parameter is required");n=n||_.arch(),i(r)||(r=o(e(t,n),r));let a="";if(r){r=O.clean(r)||"";const e=b.join(s(),t,r,n);y.debug("checking cache: "+e),g.existsSync(e)&&g.existsSync(e+".complete")?(y.debug(`Found tool in cache ${t} ${r} ${n}`),a=e):y.debug("not found")}return a},Vd.findAllVersions=e,Vd.getManifestFromRepo=function(e,t,r,n="master"){return m(this,void 0,void 0,(function*(){let i=[];const o=`https://api.github.com/repos/${e}/${t}/git/trees/${n}`,s=new S.HttpClient("tool-cache"),a={};r&&(y.debug("set auth"),a.authorization=r);const c=yield s.getJson(o,a);if(!c.result)return i;let u="";for(const e of c.result.tree)if("versions-manifest.json"===e.path){u=e.url;break}a.accept="application/vnd.github.VERSION.raw";let l=yield(yield s.get(u,a)).readBody();if(l){l=l.replace(/^\uFEFF/,"");try{i=JSON.parse(l)}catch(f){y.debug("Invalid json")}}return i}))},Vd.findFromManifest=function(e,t,r,n=_.arch()){return m(this,void 0,void 0,(function*(){return yield E._findMatch(e,t,r,n)}))},Vd.isExplicitVersion=i,Vd.evaluateVersions=o,Vd}(),Jd={};const Qd=t(function(){function e(e,t){const r=e+Math.random()*t*(Math.random()>.5?1:-1);return Math.max(0,r)}function t(n,i){if(!n||!i)throw Error("retry-as-promised must be passed a callback and a options set");const o={$current:"$current"in(i="number"==typeof i?{max:i}:i)?i.$current:1,max:i.max,timeout:i.timeout||void 0,match:i.match?Array.isArray(i.match)?i.match:[i.match]:[],backoffBase:void 0===i.backoffBase?100:i.backoffBase,backoffExponent:i.backoffExponent||1.1,backoffJitter:i.backoffJitter||0,report:i.report,name:i.name||n.name||"unknown"};return o.match&&!Array.isArray(o.match)&&(o.match=[o.match]),o.report&&o.report("Trying "+o.name+" #"+o.$current+" at "+(new Date).toLocaleTimeString(),o),new Promise((function(i,s){let a,c,u;o.timeout&&(a=setTimeout((function(){c&&clearTimeout(c),s(new r(o.name+" timed out",u))}),o.timeout)),Promise.resolve(n({current:o.$current})).then(i).then((function(){a&&clearTimeout(a),c&&clearTimeout(c)})).catch((function(r){a&&clearTimeout(a),c&&clearTimeout(c),u=r,o.report&&o.report(r&&""+r||r,o,r);var l=o.max>o.$current;if(!l)return s(r);if(l=0===o.match.length||o.match.some((function(e){return function(e,t){if("function"==typeof e)try{if(t instanceof e)return!0}catch(r){return!!e(t)}return e===""+t||e===t.message||e instanceof RegExp&&(e.test(t.message)||e.test(""+t))}(e,r)})),!l)return s(r);var f=o.backoffBase*Math.pow(o.backoffExponent,o.$current-1);const p=o.backoffJitter;void 0!==p&&(f=e(f,p)),o.$current++,o.report&&o.report(`Retrying ${o.name} (${o.$current})`,o),f?(o.report&&o.report(`Delaying retry of ${o.name} by ${f}`,o),c=setTimeout((function(){t(n,o).then(i).catch(s)}),f)):t(n,o).then(i).catch(s)}))}))}if(Hd)return Jd;Hd=1,Object.defineProperty(Jd,"__esModule",{value:!0}),Jd.retryAsPromised=Jd.applyJitter=Jd.TimeoutError=void 0;class r extends Error{constructor(e,t){super(e),this.name="TimeoutError",this.previous=t}}return Jd.TimeoutError=r,Jd.applyJitter=e,Jd.retryAsPromised=t,Jd.default=t,Jd}());var Zd,eh,th,rh,nh,ih,oh,sh,ah,ch,uh,lh,fh,ph,dh,hh,mh,yh,vh,wh,gh,Eh,_h,bh,Sh,Oh,Rh,Ih,xh,Ph,Th,Nh,Ch,$h,Ah,Lh,kh,Dh,jh,Uh,Fh,Mh,Gh,Bh,qh,Hh,Vh,zh,Wh,Xh,Yh,Kh,Jh,Qh,Zh,em,tm,rm,nm,im,om,sm,am,cm,um={},lm={},fm={},pm={},dm=or();let hm;const{GITHUB_ACTIONS:mm}=Qn,ym=e=>{if(e)if("object"==typeof e)e={mode:511,...e};else if("number"==typeof e)e={mode:e};else{if("string"!=typeof e)throw new TypeError("invalid options argument");e={mode:parseInt(e,8)}}else e={mode:511};const t=e,r=e.fs||{};return e.mkdir=e.mkdir||r.mkdir||Rn.mkdir,e.mkdirAsync=e.mkdirAsync?e.mkdirAsync:async(e,r)=>new Promise(((n,i)=>t.mkdir(e,r,((e,t)=>e?i(e):n(t))))),e.stat=e.stat||r.stat||Rn.stat,e.statAsync=e.statAsync?e.statAsync:async e=>new Promise(((r,n)=>t.stat(e,((e,t)=>e?n(e):r(t))))),e.statSync=e.statSync||r.statSync||Rn.statSync,e.mkdirSync=e.mkdirSync||r.mkdirSync||Rn.mkdirSync,t},vm=(e,t,r)=>{const n=In.dirname(e),i={...ym(t),recursive:!1};if(n===e)try{return i.mkdirSync(e,i)}catch(o){if(o&&"EISDIR"!==o.code)throw o;return}try{return i.mkdirSync(e,i),r||e}catch(o){const t=o;if(t&&"ENOENT"===t.code)return vm(e,i,vm(n,i,r));if(t&&"EEXIST"!==t.code&&t&&"EROFS"!==t.code)throw o;try{if(!i.statSync(e).isDirectory())throw o}catch(s){throw o}}},wm=Object.assign((async(e,t,r)=>{const n=ym(t);n.recursive=!1;const i=In.dirname(e);return i===e?n.mkdirAsync(e,n).catch((e=>{if(e&&"EISDIR"!==e.code)throw e})):n.mkdirAsync(e,n).then((()=>r||e),(async t=>{const o=t;if(o&&"ENOENT"===o.code)return wm(i,n).then((t=>wm(e,n,t)));if(o&&"EEXIST"!==o.code&&"EROFS"!==o.code)throw t;return n.statAsync(e).then((e=>{if(e.isDirectory())return r;throw t}),(()=>{throw t}))}))}),{sync:vm}),gm=async(e,t,r)=>{if(r!==t)return e.statAsync(t).then((e=>e.isDirectory()?r:void 0),(r=>r&&"ENOENT"===r.code?gm(e,In.dirname(t),t):void 0))},Em=(e,t,r)=>{if(r!==t)try{return e.statSync(t).isDirectory()?r:void 0}catch(n){return n&&"ENOENT"===n.code?Em(e,In.dirname(t),t):void 0}},_m=(e,t)=>{const r=ym(t);if(r.recursive=!0,In.dirname(e)===e)return r.mkdirSync(e,r);const n=Em(r,e);try{return r.mkdirSync(e,r),n}catch(i){if(i&&"ENOENT"===i.code)return vm(e,r);throw i}},bm=Object.assign((async(e,t)=>{const r={...ym(t),recursive:!0};return In.dirname(e)===e?await r.mkdirAsync(e,r):gm(r,e).then((t=>r.mkdirAsync(e,r).then((e=>t||e)).catch((t=>{if(t&&"ENOENT"===t.code)return wm(e,r);throw t}))))}),{sync:_m}),Sm=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,Om=e=>{if(/\0/.test(e))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:e,code:"ERR_INVALID_ARG_VALUE"});if(e=In.resolve(e),"win32"===Sm){const t=/[*|"<>?:]/,{root:r}=In.parse(e);if(t.test(e.substring(r.length)))throw Object.assign(Error("Illegal characters in path."),{path:e,code:"EINVAL"})}return e},Rm=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),Im=+Rm[0]>10||10==+Rm[0]&&+Rm[1]>=12,xm=Im?e=>ym(e).mkdirSync===Rn.mkdirSync:()=>!1,Pm=Object.assign(Im?e=>ym(e).mkdir===Rn.mkdir:()=>!1,{sync:xm}),Tm=(e,t)=>{e=Om(e);const r=ym(t);return xm(r)?_m(e,r):vm(e,r)},Nm=Object.assign((async(e,t)=>{e=Om(e);const r=ym(t);return Pm(r)?bm(e,r):wm(e,r)}),{mkdirpSync:Tm,mkdirpNative:bm,mkdirpNativeSync:_m,mkdirpManual:wm,mkdirpManualSync:vm,sync:Tm,native:bm,nativeSync:_m,manual:wm,manualSync:vm,useNative:Pm,useNativeSync:xm});var Cm=u();const $m=t(Ie()),Am=t(Ue()),Lm=t(Oe()),km=/v?(\d\S*)/,Dm=El((function(){const e="string"==typeof __dirname?__dirname:In.dirname(Un.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Bn&&"SCRIPT"===Bn.tagName.toUpperCase()&&Bn.src||new URL("setup-cpp.js",document.baseURI).href)),t=In.join(e,"versions.json");return JSON.parse(Rn.readFileSync(t,"utf-8"))})),{GITHUB_ACTIONS:jm}=Qn,Um=El((async function(e){const t=[];"linux"===process.platform?t.push("/home/runner/.local/bin/"):"darwin"===process.platform&&t.push("/usr/local/bin/");const r=(await Cm.getExecOutput(e+' -c "import sys;print(sys.base_exec_prefix);"')).stdout.trim();return t.push(In.join(r,"Scripts"),In.join(r,"Scripts","bin"),In.join(r,"bin")),function(e){return[...new Set(e)]}(t)}),{promise:!0});var Fm,Mm={},Gm=function(){if(Fm)return Mm;Fm=1,Object.defineProperty(Mm,"__esModule",{value:!0}),Mm.getUbuntuVersion=void 0;const e=An;return Mm.getUbuntuVersion=async function(){if("linux"!==process.platform)return[];const t=await(r="lsb_release",n=["-a"],new Promise(((t,i)=>{e.execFile(r,n,{encoding:"utf8",shell:!1},((e,o,s)=>{if(e)return"errno"in e&&"ENOENT"===e.code?void t(null):void i(Error(`Could not execute \`${r} ${n.join(" ")}\`: ${e} (stderr=${s})`));t(o)}))})));var r,n;if(null===t)return[];const i=/^Distributor ID:\s*(.+)$/,o=/^Description:\s*Ubuntu\s+(\d+)\.(\d+)(?:\.(\d+))?/,s=/^Release:\s*(\d+)\.(\d+)(?:\.(\d+))?$/;let a=null,c=null,u=!1;for(const e of t.split("\n")){const t=e.match(i);if(null!==t){if("Ubuntu"!==t[1])return[];u=!0}const r=e.match(o);r&&(a=r);const n=e.match(s);if(n&&(c=n),u&&a&&c)break}if(!u)return[];for(const e of[a,c])if(e){const t=[e[1],e[2]];return e[3]&&t.push(e[3]),t.map((e=>parseInt(e,10)))}return[]},Mm}();const Bm=El((async function(){try{if(pt()){try{null===aa.sync("lsb_release",{nothrow:!0})&&await Ze([{name:"lsb-release"}])}catch{return Pr()}const e=await Gm.getUbuntuVersion();return 0===e.length?Pr():e}return null}catch(e){return p(""+e),null}}),{promise:!0}),qm=El((async function(){let e=process.env.PIPX_HOME;if(void 0!==e)return e;const t=ae("~/.local/pipx");if(await se(t))return t;switch(process.platform){case"win32":e=ae("~/AppData/Local/pipx");break;case"darwin":e=ae("~/Library/Application Support/pipx");break;default:e=ae("~/.local/share/pipx")}return await Nm(e),await Nm(In.join(e,"trash")),await Nm(In.join(e,"shared")),await Nm(In.join(e,"venv")),e}),{promise:!0}),Hm=El((async function(){if(void 0!==process.env.PIPX_BIN_DIR)return process.env.PIPX_BIN_DIR;const e=ae("~/.local/bin");return await pe(e,xy),await Nm(e),e}),{promise:!0});let Vm;const zm=new Map([[24,["Sequoia","15"]],[23,["Sonoma","14"]],[22,["Ventura","13"]],[21,["Monterey","12"]],[20,["Big Sur","11"]],[19,["Catalina","10.15"]],[18,["Mojave","10.14"]],[17,["High Sierra","10.13"]],[16,["Sierra","10.12"]],[15,["El Capitan","10.11"]],[14,["Yosemite","10.10"]],[13,["Mavericks","10.9"]],[12,["Mountain Lion","10.8"]],[11,["Lion","10.7"]],[10,["Snow Leopard","10.6"]],[9,["Leopard","10.5"]],[8,["Tiger","10.4"]],[7,["Panther","10.3"]],[6,["Jaguar","10.2"]],[5,["Puma","10.1"]]]),Wm=El((function(){if("darwin"!==process.platform)return[];const{version:e}=function(e){e=Number((e||On.release()).split(".")[0]);const[t,r]=zm.get(e)||["Unknown",""];return{name:t,version:r}}();return e.split(".").map((e=>Number.parseInt(e,10)))})),Xm=t(Re()),{GITHUB_ACTIONS:Ym}=Qn,Km="string"==typeof __dirname?__dirname:In.dirname(Un.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Bn&&"SCRIPT"===Bn.tagName.toUpperCase()&&Bn.src||new URL("setup-cpp.js",document.baseURI).href)),{GITHUB_ACTIONS:Jm}=Qn,Qm="string"==typeof __dirname?__dirname:In.dirname(Un.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Bn&&"SCRIPT"===Bn.tagName.toUpperCase()&&Bn.src||new URL("setup-cpp.js",document.baseURI).href)),Zm="string"==typeof __dirname?__dirname:In.dirname(Un.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Bn&&"SCRIPT"===Bn.tagName.toUpperCase()&&Bn.src||new URL("setup-cpp.js",document.baseURI).href)),ey="string"==typeof __dirname?__dirname:In.dirname(Un.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Bn&&"SCRIPT"===Bn.tagName.toUpperCase()&&Bn.src||new URL("setup-cpp.js",document.baseURI).href));var ty,ry={},ny=function(){function e(e){return Object.values(m).includes(e)?e:e in m?m[e]:e}function t(e){if(Object.keys(m).includes(e))return e;for(const[t,r]of Object.entries(m))if(r===e)return t;return e}function r(e,t){try{return(""+s.execSync(`vswhere -products * ${t} -prerelease -property installationPath`)).trim()+"\\"+e}catch(r){o.warning("vswhere failed: "+r)}return null}function n(n){const i=e(n);let s;if(i){const e=i.split(".")[0]+".9";s=`-version "${i},${e}"`}else s="-latest";let c=r("VC\\Auxiliary\\Build\\vcvarsall.bat",s);if(c&&a.existsSync(c))return o.info("Found with vswhere: "+c),c;o.info("Not found with vswhere");const u=n?[t(n)]:h;for(const e of p)for(const t of u)for(const r of d)if(c=`${e}\\Microsoft Visual Studio\\${t}\\${r}\\VC\\Auxiliary\\Build\\vcvarsall.bat`,o.info("Trying standard location: "+c),a.existsSync(c))return o.info("Found standard location: "+c),c;if(o.info("Not found in standard locations"),c=f+"\\Microsoft Visual C++ Build Tools\\vcbuildtools.bat",a.existsSync(c))return o.info("Found VS 2015: "+c),c;throw o.info("Not found in VS 2015 location: "+c),Error("Microsoft Visual Studio not found")}function i(e){return-1!=["PATH","INCLUDE","LIB","LIBPATH"].indexOf(e.toUpperCase())}if(ty)return ry;ty=1;const o=l(),s=An,a=Rn,c=In,u=jn,f=u.env["ProgramFiles(x86)"],p=[u.env["ProgramFiles(x86)"],u.env.ProgramFiles],d=["Enterprise","Professional","Community","BuildTools"],h=["2022","2019","2017"],m={2022:"17.0",2019:"16.0",2017:"15.0",2015:"14.0",2013:"12.0"};ry.vsversion_to_versionnumber=e,ry.vsversion_to_year=t;const y=f+"\\Microsoft Visual Studio\\Installer";return ry.findWithVswhere=r,ry.findVcvarsall=n,ry.setupMSVCDevCmd=function(e,t,r,a,l,f){if("win32"!=u.platform)return void o.info("This is not a Windows virtual environment, bye!");u.env.PATH+=c.delimiter+y;let p={win32:"x86",win64:"x64",x86_64:"x64","x86-64":"x64"};e.toLowerCase()in p&&(e=p[e.toLowerCase()]);var d=[e];a&&!0===JSON.parse(a)&&d.push("uwp"),t&&d.push(t),r&&d.push("-vcvars_ver="+r),l&&!0===JSON.parse(l)&&d.push("-vcvars_spectre_libs=spectre");const h=`"${n(f)}" ${d.join(" ")}`;o.debug("vcvars command-line: "+h);const m=(""+s.execSync(`set && cls && ${h} && cls && set`,{shell:"cmd"})).split("\f"),v=m[0].split("\r\n"),w=m[1].split("\r\n"),g=m[2].split("\r\n"),E=w.filter((e=>!(!e.match(/^\[ERROR.*\]/)||e.match(/Error in script usage. The correct usage is:$/))));if(E.length>0)throw Error("invalid parameters\r\n"+E.join("\r\n"));let _={};for(let n of v){const[e,t]=n.split("=");_[e]=t}o.startGroup("Environment variables");for(let n of g){if(!n.includes("="))continue;let[e,t]=n.split("=");t!==_[e]&&(o.info("Setting "+e),i(e)&&(t=t.split(";").filter((function(e,t,r){return r.indexOf(e)===t})).join(";")),o.exportVariable(e,t))}o.endGroup(),o.info("Configured Developer Command Prompt")},ry}();const iy=36e5,oy=El((function(e){const t=vr(e);return Number.parseInt(t.split(".")[0],10)})),sy="string"==typeof __dirname?__dirname:In.dirname(Un.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Bn&&"SCRIPT"===Bn.tagName.toUpperCase()&&Bn.src||new URL("setup-cpp.js",document.baseURI).href));var ay=(e=>(e[e.All=0]="All",e[e.ClangFormat=1]="ClangFormat",e[e.Core=2]="Core",e))(ay||{});const cy="string"==typeof __dirname?__dirname:In.dirname(Un.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Bn&&"SCRIPT"===Bn.tagName.toUpperCase()&&Bn.src||new URL("setup-cpp.js",document.baseURI).href)),uy=El((async function(e){if(pt())for(const n of["libtinfo5","libtinfo6"])try{await Ze([{name:n}])}catch(t){try{if("libtinfo5"===n){h(`Failed to install ${n}\nManually installing the package`);const e=`libtinfo5_6.3-2ubuntu0.1_${Ad.includes(process.arch)?"amd64":kd.includes(process.arch)?"arm64":process.arch}.deb`,t="http://launchpadlibrarian.net/666971015/"+e,r=new Xp.DownloaderHelper(t,On.tmpdir(),{fileName:e});r.on("error",(async e=>{h(`Failed to download ${t}: ${e}`),await r.stop()})),await r.start(),T("dpkg",["-i",In.join(On.tmpdir(),e)])}}catch(r){h(`Failed to install ${n}. Ignoring`)}}else ft()?await yt("ncurses5-compat-libs",void 0,"yay"):lt()&&await mt([{name:"ncurses-compat-libs"}])}),{promise:!0}),{GITHUB_ACTIONS:ly}=Qn,fy="string"==typeof __dirname?__dirname:In.dirname(Un.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Bn&&"SCRIPT"===Bn.tagName.toUpperCase()&&Bn.src||new URL("setup-cpp.js",document.baseURI).href)),py=El((async function(e){"linux"===process.platform&&await Yr(gr("gcc",void 0,await Bm()),"",e,40)}),{promise:!0}),{GITHUB_ACTIONS:dy}=Qn,hy="string"==typeof __dirname?__dirname:In.dirname(Un.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Bn&&"SCRIPT"===Bn.tagName.toUpperCase()&&Bn.src||new URL("setup-cpp.js",document.baseURI).href));let my,yy=!1;const vy={llvm:fn,clang:fn,"clang++":fn},wy={gcc:Yr,"g++":Yr},gy={mingw:Hr},Ey={msvc:mn,cl:mn,msbuild:mn,visualstudio:mn},_y={appleclang:an,applellvm:an,"apple-clang":an,"apple-llvm":an},by={cmakelang:kr,"cmake-lint":kr,"cmake-format":kr,cmakelint:kr,cmakeformat:kr},Sy=["llvm","clang","clang++","clang-tidy","clang-format","clangtidy","clangformat"],Oy={git:Zr,nala:async function(e,t,r){if(!pt())return;if("string"==typeof my)return{binDir:my};const n=aa.sync("nala",{nothrow:!0});if(null!==n)return my=In.dirname(n),{binDir:my};await Ze([{name:"python3-apt"}]),my="/usr/bin";try{const t=await Ke({name:"nala",version:e});if(void 0!==t)return await Ze([{name:t}]),{binDir:my}}catch(i){h("Failed to install nala: "+i)}try{const e=await Ke({name:"nala-legacy"});if(void 0!==e)return await Ze([{name:e}],!0),{binDir:my}}catch(i){h("Failed to install nala-legacy: "+i)}return await async function(){const e=new Xp.DownloaderHelper("https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh",On.tmpdir(),{fileName:"install-nala.sh"});e.on("error",(e=>{throw Error("Failed to download install-nala.sh: "+e)})),await e.start();const t=In.join(On.tmpdir(),"install-nala.sh"),r=await Ms(t,"utf8");await Ks(t,r.replace(/sudo/g,"")),await Ze([{name:"wget"}]);try{T("bash",[t])}catch(i){f("Failed to install nala via installer: "+i),T("apt",["install","-y","-t","nala","nala"])}}(),{binDir:my}},brew:nt,choco:dt,python:br,powershell:gn,pwsh:gn,...vy,...wy,...gy,...Ey,..._y,...by,cmake:mr,ninja:rn,vcpkg:async function(e,t,r){const n=await aa("vcpkg",{nothrow:!0});return yy&&null!==n?{binDir:In.dirname(n)}:(await Zr(""),"linux"===process.platform&&(ft()?await Promise.all([yt("curl"),yt("zip"),yt("unzip"),yt("tar"),yt("pkg-config")]):lt()?await mt([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"pkg-config"}]):pt()&&await Ze([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"pkg-config"}])),await se(In.join(t,Ot("bootstrap-vcpkg",".bat")))?d(`Vcpkg folder already exists at ${t}. Skipping the clone`):_("git",["clone","https://github.com/microsoft/vcpkg"],{cwd:In.dirname(t),stdio:"inherit"}),""!==e&&"true"!==e&&(h("Checking out vcpkg version "+e),_("git",["checkout",e],{cwd:t,stdio:"inherit"})),"linux"===process.platform&&r in kd&&await le("VCPKG_FORCE_SYSTEM_BINARIES","1"),_(Ot(Rt("bootstrap-vcpkg"),".bat"),{cwd:t,shell:!0,stdio:"inherit"}),await L(t),await pe(t,xy),yy=!0,{binDir:t})},bazel:async function(e,t,r){switch(process.platform){case"win32":return ht("bazelisk",e);case"darwin":return ut("bazelisk",e);case"linux":if(ft())throw Error("installing bazel on Arch linux is not supported yet");if(lt())return await mt([{name:"dnf-plugins-core"}]),T("dnf",["copr","enable","vbatts/bazel"]),mt([{name:"bazel4"}]);if(pt())return T("bash",["-c",`echo "deb [arch=amd64 signed-by=${await et({fileName:"bazel-archive-keyring.gpg",keyUrl:"https://bazel.build/bazel-release.pub.gpg"})}] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list`]),Ze([{name:"bazel",version:e}],!0);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},conan:function(e,t,r){return Tr("conan",e)},meson:function(e,t,r){return Tr("meson",e)},gcovr:function(e,t,r){return Tr("gcovr",e)},opencppcoverage:yn,OpenCppCoverage:yn,ccache:function(e,t,r){switch(process.platform){case"win32":return ht("ccache",e);case"darwin":return ut("ccache",e);case"linux":if(ft())return yt("ccache",e);if(lt())return mt([{name:"ccache",version:e}]);if(pt())return Ze([{name:"ccache",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},sccache:function(e,t,r){switch(process.platform){case"win32":return ht("sccache",e);case"linux":case"darwin":return ut("sccache",e);default:throw Error("Unsupported platform")}},doxygen:async function(e,t,r){switch(process.platform){case"win32":{await Qd((()=>ht("doxygen.install",e)),{name:"doxygen.install",max:4,backoffBase:2e3,report:e=>h(e)});const t={binDir:await async function(){if("win32"===process.platform){for(const e of["C:/ProgramData/chocolatey/bin","C:/Program Files/doxygen/bin","C:/Program Files (x86)/doxygen"])if(await se(In.join(e,"doxygen.exe")))return await pe(e,xy),e;throw Error("Failed to find doxygen binary")}throw Error("Unsupported platform")}()};return await Dr(gr("graphviz",void 0)),t}case"darwin":{const e=await ut("doxygen",void 0,{formula:!0});return Wm()[0]>11&&await Dr(gr("graphviz",void 0)),e}case"linux":{let i;if(""===e||ft()||lt())if(ft())i=await yt("doxygen",e);else{if(lt())return mt([{name:"doxygen",version:e}]);if(!pt())throw Error("Unsupported linux distributions");i=await Ze([{name:"doxygen",version:e}])}else{if(!pt())throw Error("Unsupported linux distributions");try{i=await dr("doxygen",e,Ur,t,r);try{await Ze([{name:"libclang-cpp9"}])}catch(n){h("Failed to download libclang-cpp9 that might be needed for running doxygen. "+n)}}catch(n){d(`Failed to download doxygen binary. ${n}. Falling back to apt-get.`),i=await Ze([{name:"doxygen"}])}}return await Dr(gr("graphviz",void 0,await Bm())),i}default:throw Error("Unsupported platform")}},graphviz:Dr,cppcheck:async function(e,t,r){switch(process.platform){case"win32":return await ht("cppcheck",e),{binDir:await async function(){const e="C:/Program Files/Cppcheck";return await pe(e,xy),e}()};case"darwin":return ut("cppcheck",e);case"linux":if(ft())return yt("cppcheck",e);if(lt())return mt([{name:"ccache",version:e}]);if(pt())return Ze([{name:"cppcheck",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},cpplint:function(e,t,r){return Tr("cpplint",e,{pythonVersion:">=3.8.0"})},flawfinder:function(e,t,r){return Tr("flawfinder",e)},lizard:function(e,t,r){return Tr("lizard",e)},infer:function(e,t,r){return dr("infer",e,en,t,r)},"clang-tidy":hn,clangtidy:hn,"clang-format":dn,clangformat:dn,vcvarsall:cn,kcov:async function(e,t,r){if("linux"!==process.platform)return void h("Kcov is not supported on non-linux");const n=e.split("-");let i=function(e){return e.match(/^v/)?e:"v"+e}(n[0]);const o=n[1],s=function(e){return Number.parseInt(e.replace(/^v/,""),10)}(i);let a;return 38===s&&(i="v38"),"binary"!==o||39>s?(a=await dr("kcov",i,on,t,r),a):(a=await dr("kcov",i,nn,t,r),ft()?await yt("binutils"):lt()?await mt([{name:"binutils"}]):pt()&&await Ze([{name:"libbinutils"}]),a)},make:async function(e,t,r){switch(process.platform){case"win32":return ht("make",e);case"darwin":{await ut("make",e);const t=In.join(st(),"opt/make/libexec/gnubin");return await pe(t,xy),{binDir:t}}case"linux":if(ft())return yt("make",e);if(lt())return mt([{name:"make",version:e}]);if(pt())return Ze([{name:"make",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},task:function(e,t,r){return dr("task",e,En,t,r)},sevenzip:sr,"7zip":sr,"7z":sr},Ry=Object.keys(Oy),Iy=["compiler","architecture","timeout",...Ry],xy={rcPath:ae("~/.cpprc"),guard:"cpp"},Py=/[.-]((?:\d{4}|\d+(?:\.\d+)*(?:-[\w.-]+)?(?:\+[\w.-]+)?)$)/;(async function(e){var t,r;const n=Jn.GITHUB_ACTIONS?Promise.resolve():async function(){try{await Vp({pkg:sf})}catch(e){p("Failed to check for updates: "+(e instanceof Error?e.message+e.stack:e))}}(),i=function(e){const t=Object.fromEntries(Iy.map((e=>[e,_n(e)])));return function(e,t){var r,n,i,o,s,a={_:[]},c=0,u=0,l=0,f=(e=e||[]).length;const p=void 0!==(t=t||{}).alias,d=void 0!==t.unknown,h=void 0!==t.default;if(t.alias=t.alias||{},t.string=Ge(t.string),t.boolean=Ge(t.boolean),p)for(r in t.alias)for(n=t.alias[r]=Ge(t.alias[r]),c=0;n.length>c;c++)(t.alias[n[c]]=n.concat(r)).splice(c,1);for(c=t.boolean.length;c-- >0;)for(u=(n=t.alias[t.boolean[c]]||[]).length;u-- >0;)t.boolean.push(n[u]);for(c=t.string.length;c-- >0;)for(u=(n=t.alias[t.string[c]]||[]).length;u-- >0;)t.string.push(n[u]);if(h)for(r in t.default)if(o=typeof t.default[r],n=t.alias[r]=t.alias[r]||[],void 0!==t[o])for(t[o].push(r),c=0;n.length>c;c++)t[o].push(n[c]);const m=d?Object.keys(t.alias):[];for(c=0;f>c;c++){if("--"===(i=e[c])){a._=a._.concat(e.slice(++c));break}for(u=0;i.length>u&&45===i.charCodeAt(u);u++);if(0===u)a._.push(i);else if("no-"===i.substring(u,u+3)){if(o=i.substring(u+3),d&&!~m.indexOf(o))return t.unknown(i);a[o]=!1}else{for(l=u+1;i.length>l&&61!==i.charCodeAt(l);l++);for(o=i.substring(u,l),s=i.substring(++l)||c+1===f||45===(""+e[c+1]).charCodeAt(0)||e[++c],n=2===u?[o]:o,l=0;n.length>l;l++){if(o=n[l],d&&!~m.indexOf(o))return t.unknown("-".repeat(u)+o);Be(a,o,n.length>l+1||s,t)}}}if(h)for(r in t.default)void 0===a[r]&&(a[r]=t.default[r]);if(p)for(r in a)for(n=t.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}(e,{string:[...Iy,"timeout","node-package-manager"],default:t,alias:{h:"help",v:"version"},boolean:["help","version","setup-cpp"]})}(e);i.help&&(h('\nsetup-cpp [options]\nsetup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true\n\nInstall all the tools required for building and testing C++/C projects.\n\n--architecture\t the cpu architecture to install the tools for. By default it uses the current CPU architecture.\n--timeout\t the timeout for the installation of each tool in minutes. By default it is 10 minutes.\n--compiler\t the <compiler> to install.\n \t You can specify the version instead of specifying just the name e.g: --compiler \'llvm-13.0.0\'\n--tool_name\t pass "true" or pass the <version> you would like to install for this tool. e.g. --conan true or --conan "1.42.1"\n--nodePackageManager\t the node package manager to use (npm/yarn/pnpm) when installing setup-cpp globally\n--help\t show this help message\n--version\t show the version of setup-cpp\n\nAll the available tools:\n'),console.table({"compiler and analyzer":{tools:"--llvm, --gcc, --msvc, --apple-clang, --vcvarsall"},"build system":{tools:"--cmake, --ninja, --meson, --make, --task, --bazel"},"package manager":{tools:"--vcpkg, --conan, --choco, --brew, --nala, --git, --setup-cpp"},"analyzer/linter":{tools:"--clang-tidy, --clang-format, --cppcheck, --cpplint, --flawfinder, --lizard, --infer, , --cmakelang, --cmake-lint, --cmake-format"},cache:{tools:"--ccache, --sccache"},documentation:{tools:"--doxygen, --graphviz"},coverage:{tools:"--gcovr, --opencppcoverage, --kcov"},other:{tools:"--python, --powershell, --sevenzip"}},["tools"])),i.version&&h(""+sf.version);const o=null!=(t=i.architecture)?t:process.arch,s=null!=(r=process.env.SETUP_CPP_DIR)?r:ae("~"),a=[],c=[],u=tf.create({autoloadLocales:!0});let l,d;tf.addLocale(of),zl.addLocale(Xl);const m=await Bm(),y=void 0!==i.compiler?function(e){try{const t=e.match(Py);if(null===t)return{compiler:e,version:void 0};const r=t[1],n=e.slice(0,t.index).replace(/[.-]$/,"");return r.match(/^\d{4}$/)||null!==Lm(r)||h("Non-semver version format: "+r),{compiler:n,version:r}}catch(t){return f(`Failed to parse the compiler info ${e}: ${t}`),{compiler:e,version:void 0}}}(i.compiler):void 0;if(!function(e,t,r){var n,i;const o=void 0!==r&&t.includes(r.compiler),s=(o?t:t.filter((e=>"compiler"!==e))).filter((t=>void 0!==e[t])),a=s.filter((t=>!_r(o&&"compiler"===t&&void 0!==r?r.version:e[t]))),c=0!==a.length?o&&"compiler"===a[0]&&void 0!==r?null!=(n=r.version)?n:"true":null!=(i=e[a[0]])?i:"true":"true";if(a.some((t=>o&&"compiler"===t&&void 0!==r?e.compiler!==`${r.compiler}-${c}`:e[t]!==c)))return!1;for(const u of s)e[u]=o&&"compiler"===u&&void 0!==r?`${r.compiler}-${c}`:c;return!0}(i,[...Sy,"compiler"],y))return f("The same version must be used for llvm, clang-format and clang-tidy"),1;ft()&&"string"==typeof i.cppcheck&&"string"==typeof i.gcovr&&(h("installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux"),await yt("python-pygments"));let v=!1;for(const f of Ry){const e=i[f];if(void 0===e||"false"===e)continue;const t=void 0!==i.timeout?60*Number.parseFloat(i.timeout)*1e3:void 0;if(l=Date.now(),await un(f,e,m,o,s,a,c,t),d=Date.now(),h("took "+(u.format(l,d)||"0 seconds")),0!==c.length&&Jn.isCI){v=!0;break}}if(!v&&void 0!==y){const e=Date.now();await async function(e,t,r,n,i,o,s){var a;let c;try{if(zi.startGroup(`Installing ${e} ${null!=t?t:""}`),e in vy)c=await fn(gr("llvm",t,r),In.join(n,"llvm"),i),await le("GCOV","llvm-cov gcov",xy);else if(e in wy){const e=gr("gcc",t,r);c=await Yr(e,In.join(n,"gcc"),i),await Qr(e)}else if(e in gy){const e=gr("mingw",t,r);c=await Hr(e,In.join(n,"gcc"),i),await Qr(e)}else e in Ey?c=await mn(gr("msvc",t,r),In.join(n,"msvc"),i):e in _y?await an():(c=null,s.push("Unsupported compiler "+e))}catch(u){f(u),u instanceof Error&&f(null!=(a=u.stack)?a:""),s.push(`Failed to install the ${e} compiler ${t}`)}null!==c&&o.push(bn(e,c)),zi.endGroup()}(y.compiler,y.version,m,s,o,a,c);const t=Date.now();h("took "+(u.format(e,t)||"0 seconds"))}await async function(e){if(await se(e.rcPath)){const t=(await Sl(e.rcPath,"utf-8")).split("\n"),r=[...new Set(t.reverse())].reverse();await Ol(e.rcPath,r.join("\n")),await L(e.rcPath)}}(xy),void 0===i["setup-cpp"]&&(i["setup-cpp"]=!(0===a.length&&0===c.length&&(i.version||i.help)));const w=i["setup-cpp"]?async function(e,t="npm"){try{if(null!==await aa("setup-cpp",{nothrow:!0}))return;h(`Installing setup-cpp@${e} via ${t}...`),await E(t,["install","-g","setup-cpp@"+e],{stdio:"inherit",timeout:6e4})}catch(r){f(`Failed to install the setup-cpp@${e} CLI: ${r}. Ignoring...`)}}(sf.version,i["node-package-manager"]):Promise.resolve();await Promise.all([n,w]);for(const f of a)console.log(`${f}`);for(const p of c)f(p);if((0!==a.length||0!==c.length)&&(h("setup-cpp finished"),!Jn.GITHUB_ACTIONS))switch(process.platform){case"win32":p("Run `RefreshEnv.cmd` or restart your shell to update the environment.");break;case"linux":case"darwin":p("Run `source ~/.cpprc` or restart your shell to update the environment.")}return 0===c.length?0:1})(process.argv).then((e=>{process.exitCode=e})).catch((e=>{f("main() panicked!"),f(e),process.exitCode=1})),exports.HttpClient=Ri,exports.ciInfo=Qn,exports.commonjsGlobal=Wn,exports.coreExports=zi,exports.execExports=Cm,exports.getAugmentedNamespace=r,exports.getDefaultExportFromCjs=t,exports.info=h,exports.pathExists=se,exports.require$$13=si,exports.requireSemver=Me,exports.toolCacheExports=Kd,exports.warning=p;
//# sourceMappingURL=setup-cpp.js.map